Skip to content

Commit 621817e

Browse files
committedJan 20, 2016
Rename function. License in the .inc file
1 parent 793a37b commit 621817e

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed
 

‎README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ for (new i = 0; i < compatible_types_count; i++) {
1818
# Functions
1919

2020
```Pawn
21-
GetComponentTypeId(name[]);
22-
GetComponentTypeName(type, name[], size = sizeof(name));
21+
GetVehicleComponentTypeId(name[]);
22+
GetVehicleComponentTypeName(type, name[], size = sizeof(name));
2323
GetVehicleCompatibleTypes(model, array[ZVEH_MAX_COMPONENT_TYPES], &array_size);
24-
GetComponentName(componentid, cname[], size = sizeof(cname));
24+
GetVehicleComponentName(componentid, cname[], size = sizeof(cname));
2525
GetVehicleCompatibleUpgrades(model, array[ZVEH_MAX_COMPONENTS], &array_size);
2626
IsVehicleUpgradeCompatible(model, componentid);
2727
```

‎zvehcomp.inc

+25-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
11
/*
2-
32
About: vehicle component system
43
Author: ziggi
54
Thanks:
65
AirKite for component names
76
JernejL и Y_Less for components data (fixes.inc)
7+
*/
8+
/*
9+
The MIT License (MIT)
10+
11+
Copyright (c) 2015
12+
13+
Permission is hereby granted, free of charge, to any person obtaining a copy
14+
of this software and associated documentation files (the "Software"), to deal
15+
in the Software without restriction, including without limitation the rights
16+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17+
copies of the Software, and to permit persons to whom the Software is
18+
furnished to do so, subject to the following conditions:
19+
20+
The above copyright notice and this permission notice shall be included in all
21+
copies or substantial portions of the Software.
822
23+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29+
SOFTWARE.
930
*/
1031

1132
#if defined _z_vehicle_component_included
@@ -2163,7 +2184,7 @@ static gComponents[212][ZVEH_MAX_COMPONENTS char] = {
21632184
Component type functions
21642185
*/
21652186

2166-
stock GetComponentTypeId(name[])
2187+
stock GetVehicleComponentTypeId(name[])
21672188
{
21682189
for (new i = 0; i < sizeof(gComponentType); i++) {
21692190
if (strcmp(gComponentType[i], name, true) == 0) {
@@ -2174,7 +2195,7 @@ stock GetComponentTypeId(name[])
21742195
return ZVEH_INVALID_COMPONENT_ID;
21752196
}
21762197

2177-
stock GetComponentTypeName(type, name[], size = sizeof(name))
2198+
stock GetVehicleComponentTypeName(type, name[], size = sizeof(name))
21782199
{
21792200
if (type < 0 || type >= sizeof(gComponentType)) {
21802201
return 0;
@@ -2217,7 +2238,7 @@ stock GetVehicleCompatibleTypes(model, array[ZVEH_MAX_COMPONENT_TYPES], &array_s
22172238
Component upgrade functions
22182239
*/
22192240

2220-
stock GetComponentName(componentid, cname[], size = sizeof(cname))
2241+
stock GetVehicleComponentName(componentid, cname[], size = sizeof(cname))
22212242
{
22222243
new index = componentid - 1000;
22232244
if (index < 0 || index >= sizeof(gComponentName)) {

0 commit comments

Comments
 (0)
Please sign in to comment.