|
1 |
| -#define ARMORID "armor-[melee]-[bullet]-[laser]-[energy]-[bomb]-[bio]-[rad]-[fire]-[acid]-[magic]-[stamina]" |
| 1 | +//NSV13 - added overmap_light, overmap_medium, and overmap_heavy |
| 2 | +#define ARMORID "armor-[melee]-[bullet]-[laser]-[energy]-[bomb]-[bio]-[rad]-[fire]-[acid]-[magic]-[stamina]-[overmap_light]-[overmap_medium]-[overmap_heavy]" |
2 | 3 |
|
3 |
| -/proc/getArmor(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, stamina = 0) |
| 4 | +/proc/getArmor(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, stamina = 0, overmap_light = 0, overmap_medium = 0, overmap_heavy = 0) |
4 | 5 | . = locate(ARMORID)
|
5 | 6 | if (!.)
|
6 |
| - . = new /datum/armor(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic, stamina) |
| 7 | + . = new /datum/armor(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic, stamina, overmap_light, overmap_medium, overmap_heavy) |
7 | 8 |
|
8 | 9 | /datum/armor
|
9 | 10 | datum_flags = DF_USE_TAG
|
|
18 | 19 | var/acid
|
19 | 20 | var/magic
|
20 | 21 | var/stamina
|
| 22 | + var/overmap_light |
| 23 | + var/overmap_medium |
| 24 | + var/overmap_heavy |
21 | 25 |
|
22 |
| -/datum/armor/New(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, stamina = 0) |
| 26 | +/datum/armor/New(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, stamina = 0, overmap_light = 0, overmap_medium = 0, overmap_heavy = 0) |
23 | 27 | src.melee = melee
|
24 | 28 | src.bullet = bullet
|
25 | 29 | src.laser = laser
|
|
31 | 35 | src.acid = acid
|
32 | 36 | src.magic = magic
|
33 | 37 | src.stamina = stamina
|
| 38 | + src.overmap_light = overmap_light |
| 39 | + src.overmap_medium = overmap_medium |
| 40 | + src.overmap_heavy = overmap_heavy |
34 | 41 | tag = ARMORID
|
35 | 42 |
|
36 |
| -/datum/armor/proc/modifyRating(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, stamina = 0) |
37 |
| - return getArmor(src.melee+melee, src.bullet+bullet, src.laser+laser, src.energy+energy, src.bomb+bomb, src.bio+bio, src.rad+rad, src.fire+fire, src.acid+acid, src.magic+magic, src.stamina+stamina) |
| 43 | +/datum/armor/proc/modifyRating(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, stamina = 0, overmap_light = 0, overmap_medium = 0, overmap_heavy = 0) |
| 44 | + return getArmor(src.melee+melee, src.bullet+bullet, src.laser+laser, src.energy+energy, src.bomb+bomb, src.bio+bio, src.rad+rad, src.fire+fire, src.acid+acid, src.magic+magic, src.stamina+stamina, src.overmap_light+overmap_light, src.overmap_medium+overmap_medium, src.overmap_heavy+overmap_heavy) |
38 | 45 |
|
39 | 46 | /datum/armor/proc/modifyAllRatings(modifier = 0)
|
40 |
| - return getArmor(melee+modifier, bullet+modifier, laser+modifier, energy+modifier, bomb+modifier, bio+modifier, rad+modifier, fire+modifier, acid+modifier, magic+modifier, stamina+modifier) |
| 47 | + return getArmor(melee+modifier, bullet+modifier, laser+modifier, energy+modifier, bomb+modifier, bio+modifier, rad+modifier, fire+modifier, acid+modifier, magic+modifier, stamina+modifier, overmap_light+modifier, overmap_medium+modifier, overmap_heavy+modifier) |
41 | 48 |
|
42 |
| -/datum/armor/proc/setRating(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic) |
| 49 | +/datum/armor/proc/setRating(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic, stamina, overmap_light, overmap_medium, overmap_heavy) |
43 | 50 | return getArmor((isnull(melee) ? src.melee : melee),\
|
44 | 51 | (isnull(bullet) ? src.bullet : bullet),\
|
45 | 52 | (isnull(laser) ? src.laser : laser),\
|
|
50 | 57 | (isnull(fire) ? src.fire : fire),\
|
51 | 58 | (isnull(acid) ? src.acid : acid),\
|
52 | 59 | (isnull(magic) ? src.magic : magic),\
|
53 |
| - (isnull(stamina) ? src.stamina : stamina)) |
| 60 | + (isnull(stamina) ? src.stamina : stamina),\ |
| 61 | + (isnull(overmap_light) ? src.overmap_light : overmap_light), \ |
| 62 | + (isnull(overmap_medium) ? src.overmap_medium : overmap_medium), \ |
| 63 | + (isnull(overmap_heavy) ? src.overmap_heavy : overmap_heavy)) |
54 | 64 |
|
55 | 65 | /datum/armor/proc/getRating(rating)
|
56 | 66 | return vars[rating]
|
57 | 67 |
|
58 | 68 | /datum/armor/proc/getList()
|
59 |
| - return list("melee" = melee, "bullet" = bullet, "laser" = laser, "energy" = energy, "bomb" = bomb, "bio" = bio, "rad" = rad, "fire" = fire, "acid" = acid, "magic" = magic, "stamina" = stamina) |
| 69 | + return list("melee" = melee, "bullet" = bullet, "laser" = laser, "energy" = energy, "bomb" = bomb, "bio" = bio, "rad" = rad, "fire" = fire, "acid" = acid, "magic" = magic, "stamina" = stamina, "overmap_light" = overmap_light, "overmap_medium" = overmap_medium, "overmap_heavy" = overmap_heavy) |
60 | 70 |
|
61 | 71 | /datum/armor/proc/attachArmor(datum/armor/AA)
|
62 |
| - return getArmor(melee+AA.melee, bullet+AA.bullet, laser+AA.laser, energy+AA.energy, bomb+AA.bomb, bio+AA.bio, rad+AA.rad, fire+AA.fire, acid+AA.acid, magic+AA.magic, stamina+AA.stamina) |
| 72 | + return getArmor(melee+AA.melee, bullet+AA.bullet, laser+AA.laser, energy+AA.energy, bomb+AA.bomb, bio+AA.bio, rad+AA.rad, fire+AA.fire, acid+AA.acid, magic+AA.magic, stamina+AA.stamina, overmap_light+AA.overmap_light, overmap_medium+AA.overmap_medium, overmap_heavy+AA.overmap_heavy) |
63 | 73 |
|
64 | 74 | /datum/armor/proc/detachArmor(datum/armor/AA)
|
65 |
| - return getArmor(melee-AA.melee, bullet-AA.bullet, laser-AA.laser, energy-AA.energy, bomb-AA.bomb, bio-AA.bio, rad-AA.rad, fire-AA.fire, acid-AA.acid, magic-AA.magic, stamina-AA.stamina) |
| 75 | + return getArmor(melee-AA.melee, bullet-AA.bullet, laser-AA.laser, energy-AA.energy, bomb-AA.bomb, bio-AA.bio, rad-AA.rad, fire-AA.fire, acid-AA.acid, magic-AA.magic, stamina-AA.stamina, overmap_light-AA.overmap_light, overmap_medium-AA.overmap_medium, overmap_heavy-AA.overmap_heavy) |
66 | 76 |
|
67 | 77 | /datum/armor/vv_edit_var(var_name, var_value)
|
68 | 78 | if (var_name == NAMEOF(src, tag))
|
|
0 commit comments