mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +01:00
Make more object lists lazy to pay for my sins
This commit is contained in:
@@ -232,7 +232,7 @@
|
||||
user.setClickCooldown(user.get_attack_speed(W))
|
||||
if (W.force >= src.toughness)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='warning'><b>[src] has been [W.attack_verb.len? pick(W.attack_verb) : "attacked"] with [W] by [user]!</b></span>")
|
||||
visible_message("<span class='warning'><b>[src] has been [LAZYLEN(W.attack_verb) ? pick(W.attack_verb) : "attacked"] with [W] by [user]!</b></span>")
|
||||
if (istype(W, /obj/item)) //is it even possible to get into attackby() with non-items?
|
||||
var/obj/item/I = W
|
||||
if (I.hitsound)
|
||||
|
||||
@@ -270,7 +270,7 @@ GLOBAL_LIST_EMPTY(suit_cycler_emagged)
|
||||
// the presence of the species in the sprite_sheets_obj list on the helmet and suit
|
||||
/datum/suit_cycler_choice/species/proc/can_refit_to(obj/item/clothing/head/helmet/helmet, obj/item/clothing/suit/space/suit)
|
||||
for(var/obj/item/clothing/C in list(helmet, suit))
|
||||
if(C.sprite_sheets_obj[name])
|
||||
if(LAZYACCESS(C.sprite_sheets_obj, name))
|
||||
if(!(C.icon_state in cached_icon_states(C.sprite_sheets_obj[name])))
|
||||
return FALSE // Species was in sprite_sheets_obj, but had no sprite for this object in particular
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@
|
||||
|
||||
/obj/effect/alien/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
user.setClickCooldown(user.get_attack_speed(W))
|
||||
if(W.attack_verb.len)
|
||||
if(LAZYLEN(W.attack_verb))
|
||||
visible_message("<span class='danger'>\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]</span>")
|
||||
else
|
||||
visible_message("<span class='danger'>\The [src] have been attacked with \the [W][(user ? " by [user]." : ".")]</span>")
|
||||
@@ -523,7 +523,7 @@
|
||||
/obj/effect/alien/egg/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(health <= 0)
|
||||
return
|
||||
if(W.attack_verb.len)
|
||||
if(LAZYLEN(W.attack_verb))
|
||||
src.visible_message("<span class='danger'>\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]</span>")
|
||||
else
|
||||
src.visible_message("<span class='danger'>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]</span>")
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/obj/effect/spider/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
user.setClickCooldown(user.get_attack_speed(W))
|
||||
|
||||
if(W.attack_verb.len)
|
||||
if(LAZYLEN(W.attack_verb))
|
||||
visible_message("<span class='warning'>\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]</span>")
|
||||
else
|
||||
visible_message("<span class='warning'>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]</span>")
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// causeerrorheresoifixthis
|
||||
var/obj/item/master = null
|
||||
var/list/origin_tech = null //Used by R&D to determine what research bonuses it grants.
|
||||
var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
var/force = 0
|
||||
|
||||
var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
|
||||
@@ -50,8 +50,8 @@
|
||||
var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit)
|
||||
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
|
||||
var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N
|
||||
var/list/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
var/list/armorsoak = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
var/list/armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0)
|
||||
var/list/armorsoak = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0)
|
||||
var/list/allowed = null //suit storage stuff.
|
||||
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
|
||||
var/zoomdevicename = null //name used for message when binoculars/scope is used
|
||||
@@ -63,12 +63,12 @@
|
||||
|
||||
//** These specify item/icon overrides for _slots_
|
||||
|
||||
var/list/item_state_slots = list() //overrides the default item_state for particular slots.
|
||||
var/list/item_state_slots //overrides the default item_state for particular slots.
|
||||
|
||||
// Used to specify the icon file to be used when the item is worn. If not set the default icon for that slot will be used.
|
||||
// If icon_override or sprite_sheets are set they will take precendence over this, assuming they apply to the slot in question.
|
||||
// Only slot_l_hand/slot_r_hand are implemented at the moment. Others to be implemented as needed.
|
||||
var/list/item_icons = list()
|
||||
var/list/item_icons
|
||||
|
||||
//** These specify item/icon overrides for _species_
|
||||
|
||||
@@ -79,11 +79,11 @@
|
||||
)
|
||||
If index term exists and icon_override is not set, this sprite sheet will be used.
|
||||
*/
|
||||
var/list/sprite_sheets = list()
|
||||
var/list/sprite_sheets
|
||||
|
||||
// Species-specific sprite sheets for inventory sprites
|
||||
// Works similarly to worn sprite_sheets, except the alternate sprites are used when the clothing/refit_for_species() proc is called.
|
||||
var/list/sprite_sheets_obj = list()
|
||||
var/list/sprite_sheets_obj
|
||||
|
||||
var/toolspeed = 1.0 // This is a multipler on how 'fast' a tool works. e.g. setting this to 0.5 will make the tool work twice as fast.
|
||||
var/attackspeed = DEFAULT_ATTACK_COOLDOWN // How long click delay will be when using this, in 1/10ths of a second. Checked in the user's get_attack_speed().
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
w_class = ITEMSIZE_LARGE
|
||||
max_w_class = ITEMSIZE_NORMAL
|
||||
max_storage_space = ITEMSIZE_COST_NORMAL * 100 // can store a ton of shit!
|
||||
item_state_slots = null
|
||||
|
||||
/obj/item/weapon/storage/backpack/cultpack
|
||||
name = "trophy rack"
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='warning'>\The [src] has been [I.attack_verb.len ? "[pick(I.attack_verb)]":"attacked"] with \the [I] by [user].</span>")
|
||||
visible_message("<span class='warning'>\The [src] has been [LAZYLEN(I.attack_verb) ? "[pick(I.attack_verb)]":"attacked"] with \the [I] by [user].</span>")
|
||||
take_damage(I.force)
|
||||
|
||||
/obj/structure/mob_spawner/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
@@ -13,10 +13,9 @@
|
||||
body_parts_covered = copy.body_parts_covered
|
||||
flags_inv = copy.flags_inv
|
||||
|
||||
item_icons = copy.item_icons.Copy()
|
||||
if(copy.item_state_slots) //Runtime prevention for backpacks
|
||||
item_state_slots = copy.item_state_slots.Copy()
|
||||
sprite_sheets = copy.sprite_sheets.Copy()
|
||||
item_icons = copy.item_icons?.Copy()
|
||||
item_state_slots = copy.item_state_slots?.Copy()
|
||||
sprite_sheets = copy.sprite_sheets?.Copy()
|
||||
//copying sprite_sheets_obj should be unnecessary as chameleon items are not refittable.
|
||||
|
||||
return copy //for inheritance
|
||||
@@ -54,7 +53,7 @@
|
||||
name = "psychedelic"
|
||||
desc = "Groovy!"
|
||||
icon_state = "psyche"
|
||||
item_state_slots[slot_w_uniform_str] = "psyche"
|
||||
LAZYSET(item_state_slots, slot_w_uniform_str, "psyche")
|
||||
update_icon()
|
||||
update_clothing_icon()
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
//Set icon
|
||||
if (sprite_sheets_refit && (target_species in sprite_sheets_refit))
|
||||
sprite_sheets[target_species] = sprite_sheets_refit[target_species]
|
||||
LAZYSET(sprite_sheets, target_species, sprite_sheets_refit[target_species])
|
||||
|
||||
if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
|
||||
icon = sprite_sheets_obj[target_species]
|
||||
@@ -212,7 +212,7 @@
|
||||
|
||||
//Set icon
|
||||
if (sprite_sheets_refit && (target_species in sprite_sheets_refit))
|
||||
sprite_sheets[target_species] = sprite_sheets_refit[target_species]
|
||||
LAZYSET(sprite_sheets, target_species, sprite_sheets_refit[target_species])
|
||||
|
||||
if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
|
||||
icon = sprite_sheets_obj[target_species]
|
||||
@@ -542,9 +542,9 @@
|
||||
|
||||
// Generate and cache the on-mob icon, which is used in update_inv_head().
|
||||
var/body_type = (H && H.species.get_bodytype(H))
|
||||
var/cache_key = "[light_overlay][body_type && sprite_sheets[body_type] ? body_type : ""]"
|
||||
var/cache_key = "[light_overlay][body_type && LAZYACCESS(sprite_sheets, body_type) ? body_type : ""]"
|
||||
if(!light_overlay_cache[cache_key])
|
||||
var/use_icon = LAZYACCESS(sprite_sheets,body_type) || 'icons/mob/light_overlays.dmi'
|
||||
var/use_icon = LAZYACCESS(sprite_sheets, body_type) || 'icons/mob/light_overlays.dmi'
|
||||
light_overlay_cache[cache_key] = image(icon = use_icon, icon_state = "[light_overlay]")
|
||||
|
||||
else if(helmet_light)
|
||||
@@ -867,9 +867,7 @@
|
||||
/obj/item/clothing/under/New()
|
||||
..()
|
||||
if(worn_state)
|
||||
if(!item_state_slots)
|
||||
item_state_slots = list()
|
||||
item_state_slots[slot_w_uniform_str] = worn_state
|
||||
LAZYSET(item_state_slots, slot_w_uniform_str, worn_state)
|
||||
else
|
||||
worn_state = icon_state
|
||||
|
||||
@@ -891,9 +889,9 @@
|
||||
var/icon/under_icon
|
||||
if(icon_override)
|
||||
under_icon = icon_override
|
||||
else if(H && sprite_sheets && sprite_sheets[H.species.get_bodytype(H)])
|
||||
else if(H && LAZYACCESS(sprite_sheets, H.species.get_bodytype(H)))
|
||||
under_icon = sprite_sheets[H.species.get_bodytype(H)]
|
||||
else if(item_icons && item_icons[slot_w_uniform_str])
|
||||
else if(LAZYACCESS(item_icons, slot_w_uniform_str))
|
||||
under_icon = item_icons[slot_w_uniform_str]
|
||||
else if (worn_state in cached_icon_states(rolled_down_icon))
|
||||
under_icon = rolled_down_icon
|
||||
@@ -914,9 +912,9 @@
|
||||
var/icon/under_icon
|
||||
if(icon_override)
|
||||
under_icon = icon_override
|
||||
else if(H && sprite_sheets && sprite_sheets[H.species.get_bodytype(H)])
|
||||
else if(H && LAZYACCESS(sprite_sheets, H.species.get_bodytype(H)))
|
||||
under_icon = sprite_sheets[H.species.get_bodytype(H)]
|
||||
else if(item_icons && item_icons[slot_w_uniform_str])
|
||||
else if(LAZYACCESS(item_icons, slot_w_uniform_str))
|
||||
under_icon = item_icons[slot_w_uniform_str]
|
||||
else if (worn_state in cached_icon_states(rolled_down_sleeves_icon))
|
||||
under_icon = rolled_down_sleeves_icon
|
||||
@@ -1009,16 +1007,16 @@
|
||||
body_parts_covered &= ~(UPPER_TORSO|ARMS)
|
||||
if(worn_state in cached_icon_states(rolled_down_icon))
|
||||
icon_override = rolled_down_icon
|
||||
item_state_slots[slot_w_uniform_str] = worn_state
|
||||
LAZYSET(item_state_slots, slot_w_uniform_str, worn_state)
|
||||
else
|
||||
item_state_slots[slot_w_uniform_str] = "[worn_state]_d"
|
||||
LAZYSET(item_state_slots, slot_w_uniform_str, "[worn_state]_d")
|
||||
|
||||
to_chat(usr, "<span class='notice'>You roll down your [src].</span>")
|
||||
else
|
||||
body_parts_covered = initial(body_parts_covered)
|
||||
if(icon_override == rolled_down_icon)
|
||||
icon_override = initial(icon_override)
|
||||
item_state_slots[slot_w_uniform_str] = worn_state
|
||||
LAZYSET(item_state_slots, slot_w_uniform_str, worn_state)
|
||||
to_chat(usr, "<span class='notice'>You roll up your [src].</span>")
|
||||
update_clothing_icon()
|
||||
|
||||
@@ -1042,15 +1040,15 @@
|
||||
body_parts_covered &= ~(ARMS)
|
||||
if(worn_state in cached_icon_states(rolled_down_sleeves_icon))
|
||||
icon_override = rolled_down_sleeves_icon
|
||||
item_state_slots[slot_w_uniform_str] = worn_state
|
||||
LAZYSET(item_state_slots, slot_w_uniform_str, worn_state)
|
||||
else
|
||||
item_state_slots[slot_w_uniform_str] = "[worn_state]_r"
|
||||
LAZYSET(item_state_slots, slot_w_uniform_str, "[worn_state]_r")
|
||||
to_chat(usr, "<span class='notice'>You roll up your [src]'s sleeves.</span>")
|
||||
else
|
||||
body_parts_covered = initial(body_parts_covered)
|
||||
if(icon_override == rolled_down_sleeves_icon)
|
||||
icon_override = initial(icon_override)
|
||||
item_state_slots[slot_w_uniform_str] = worn_state
|
||||
LAZYSET(item_state_slots, slot_w_uniform_str, worn_state)
|
||||
to_chat(usr, "<span class='notice'>You roll down your [src]'s sleeves.</span>")
|
||||
update_clothing_icon()
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/obj/item/clothing/head/make_worn_icon(var/body_type,var/slot_name,var/inhands,var/default_icon,var/default_layer = 0,var/icon/clip_mask = null)
|
||||
var/image/standing = ..()
|
||||
if(light_on && slot_name == slot_head_str)
|
||||
var/cache_key = "[light_overlay][LAZYACCESS(sprite_sheets,body_type) ? "_[body_type]" : ""]"
|
||||
var/cache_key = "[light_overlay][LAZYACCESS(sprite_sheets, body_type) ? "_[body_type]" : ""]"
|
||||
if(standing && light_overlay_cache[cache_key])
|
||||
standing.add_overlay(light_overlay_cache[cache_key])
|
||||
return standing
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
icon_state = "kitty"
|
||||
body_parts_covered = 0
|
||||
siemens_coefficient = 1.5
|
||||
item_icons = list()
|
||||
item_icons = null
|
||||
|
||||
/obj/item/clothing/head/kitty/update_icon(var/mob/living/carbon/human/user)
|
||||
if(!istype(user)) return
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/clothing/mask/breath/transparent
|
||||
name = "transparent breath mask"
|
||||
item_state = "golem" //This is dumb and hacky but was here when I got here.
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
@@ -594,7 +594,7 @@
|
||||
var/species_icon = default_mob_icon
|
||||
// Since setting mob_icon will override the species checks in
|
||||
// update_inv_wear_suit(), handle species checks here.
|
||||
if(wearer && sprite_sheets && sprite_sheets[wearer.species.get_bodytype(wearer)])
|
||||
if(wearer && LAZYACCESS(sprite_sheets, wearer.species.get_bodytype(wearer)))
|
||||
species_icon = sprite_sheets[wearer.species.get_bodytype(wearer)]
|
||||
mob_icon = icon(icon = species_icon, icon_state = "[icon_state]")
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
icon_state = "techno_rig"
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
/obj/item/clothing/suit/space/rig/focalpoint
|
||||
icon = 'icons/inventory/suit/item_vr.dmi'
|
||||
@@ -102,7 +102,7 @@
|
||||
icon_state = "techno_rig"
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
/obj/item/clothing/shoes/magboots/rig/focalpoint
|
||||
icon = 'icons/inventory/feet/item_vr.dmi'
|
||||
@@ -110,7 +110,7 @@
|
||||
icon_state = "techno_rig"
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
/obj/item/clothing/gloves/gauntlets/rig/focalpoint
|
||||
icon = 'icons/inventory/hands/item_vr.dmi'
|
||||
@@ -119,7 +119,7 @@
|
||||
siemens_coefficient = 0
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
// 'Ironhammer' hardsuit
|
||||
/obj/item/weapon/rig/hephaestus
|
||||
@@ -153,7 +153,7 @@
|
||||
icon_state = "ihs_rig"
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
/obj/item/clothing/suit/space/rig/hephaestus
|
||||
icon = 'icons/inventory/suit/item_vr.dmi'
|
||||
@@ -161,7 +161,7 @@
|
||||
icon_state = "ihs_rig"
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
/obj/item/clothing/shoes/magboots/rig/hephaestus
|
||||
icon = 'icons/inventory/feet/item_vr.dmi'
|
||||
@@ -169,7 +169,7 @@
|
||||
icon_state = "ihs_rig"
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
/obj/item/clothing/gloves/gauntlets/rig/hephaestus
|
||||
icon = 'icons/inventory/hands/item_vr.dmi'
|
||||
@@ -177,4 +177,4 @@
|
||||
icon_state = "ihs_rig"
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
verbs |= /obj/item/clothing/head/helmet/space/proc/toggle_camera
|
||||
|
||||
if(type == /obj/item/clothing/head/helmet/space) //VOREStation edit - use the specially refitted sprites by KBraid. Done this way to avoid breaking subtypes.
|
||||
sprite_sheets[SPECIES_TESHARI] = 'icons/inventory/head/mob_vr_teshari.dmi'
|
||||
LAZYSET(sprite_sheets, SPECIES_TESHARI, 'icons/inventory/head/mob_vr_teshari.dmi')
|
||||
|
||||
/obj/item/clothing/head/helmet/space/proc/toggle_camera()
|
||||
set name = "Toggle Helmet Camera"
|
||||
@@ -94,7 +94,7 @@
|
||||
/obj/item/clothing/suit/space/Initialize()
|
||||
. = ..()
|
||||
if(type == /obj/item/clothing/suit/space)
|
||||
sprite_sheets[SPECIES_TESHARI] = 'icons/inventory/suit/mob_vr_teshari.dmi' // aAAAaaAAAAA
|
||||
LAZYSET(sprite_sheets, SPECIES_TESHARI, 'icons/inventory/suit/mob_vr_teshari.dmi')
|
||||
//VOREStation edit end.
|
||||
|
||||
/obj/item/clothing/suit/space/equipped(mob/M)
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
/obj/item/clothing/suit/space/void/hev/violet
|
||||
icon_state = "hev_violet"
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
/obj/item/clothing/head/helmet/space/void/hev/violet
|
||||
icon_state = "hev_violet"
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
/obj/item/clothing/head/helmet/space/void/makeshift
|
||||
name = "makeshift voidsuit helmet"
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
// 'Custodian' armor
|
||||
/obj/item/clothing/suit/space/void/custodian
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
/obj/item/clothing/head/helmet/space/void/custodian
|
||||
name = "custodian helmet"
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
// 'Moebius' armor
|
||||
/obj/item/clothing/suit/space/void/aether
|
||||
@@ -179,7 +179,7 @@
|
||||
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
/obj/item/clothing/head/helmet/space/void/aether
|
||||
name = "\improper Aether voidsuit helmet"
|
||||
@@ -193,7 +193,7 @@
|
||||
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
/obj/item/clothing/head/helmet/space/void/aether/verb/select_color()
|
||||
set name = "Helmet Color"
|
||||
@@ -218,7 +218,7 @@
|
||||
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
/obj/item/clothing/head/helmet/space/void/excelsior
|
||||
name = "\improper Excelsior voidsuit helmet"
|
||||
@@ -230,4 +230,4 @@
|
||||
|
||||
// No animal people sprites for these yet, sad times
|
||||
species_restricted = list("exclude", SPECIES_TESHARI, SPECIES_VOX, SPECIES_DIONA)
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if("[tmp_icon_state]_mob" in cached_icon_states(icon_override))
|
||||
tmp_icon_state = "[tmp_icon_state]_mob"
|
||||
mob_overlay = image("icon" = icon_override, "icon_state" = "[tmp_icon_state]")
|
||||
else if(wearer && sprite_sheets[wearer.species.get_bodytype(wearer)]) //Teshari can finally into webbing, too!
|
||||
else if(wearer && LAZYACCESS(sprite_sheets, wearer.species.get_bodytype(wearer))) //Teshari can finally into webbing, too!
|
||||
mob_overlay = image("icon" = sprite_sheets[wearer.species.get_bodytype(wearer)], "icon_state" = "[tmp_icon_state]")
|
||||
else
|
||||
mob_overlay = image("icon" = INV_ACCESSORIES_DEF_ICON, "icon_state" = "[tmp_icon_state]")
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
body_parts_covered = 0
|
||||
equip_sound = null
|
||||
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
item_state = "golem" //This is dumb and hacky but was here when I got here.
|
||||
worn_state = "golem" //It's basically just a coincidentally black iconstate in the file.
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
//this has to mirror the way update_inv_*_hand() selects the state
|
||||
/datum/custom_item/proc/get_state(var/obj/item/item, var/slot_str, var/hand_str)
|
||||
var/t_state
|
||||
if(item.item_state_slots && item.item_state_slots[slot_str])
|
||||
if(LAZYACCESS(item.item_state_slots, slot_str))
|
||||
t_state = item.item_state_slots[slot_str]
|
||||
else if(item.item_state)
|
||||
t_state = item.item_state
|
||||
@@ -111,7 +111,7 @@
|
||||
var/icon/t_icon
|
||||
if(item.icon_override)
|
||||
t_icon = item.icon_override
|
||||
else if(item.item_icons && (slot_str in item.item_icons))
|
||||
else if(LAZYACCESS(item.item_icons, slot_str))
|
||||
t_icon = item.item_icons[slot_str]
|
||||
else
|
||||
t_icon = hand_icon
|
||||
|
||||
@@ -267,7 +267,7 @@ emp_act
|
||||
if(!affecting)
|
||||
return //should be prevented by attacked_with_item() but for sanity.
|
||||
|
||||
visible_message("<span class='danger'>[src] has been [I.attack_verb.len? pick(I.attack_verb) : "attacked"] in the [affecting.name] with [I.name] by [user]!</span>")
|
||||
visible_message("<span class='danger'>[src] has been [LAZYLEN(I.attack_verb) ? pick(I.attack_verb) : "attacked"] in the [affecting.name] with [I.name] by [user]!</span>")
|
||||
|
||||
var/soaked = get_armor_soak(hit_zone, "melee", I.armor_penetration)
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
user.setClickCooldown(user.get_attack_speed(W))
|
||||
|
||||
if(W.force)
|
||||
visible_message("<span class='warning'>\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]</span>")
|
||||
visible_message("<span class='warning'>\The [src] has been [LAZYLEN(W.attack_verb) ? pick(W.attack_verb) : "attacked"] with \the [W][(user ? " by [user]." : ".")]</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/weaversilk/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
|
||||
//Called when the mob is hit with an item in combat. Returns the blocked result
|
||||
/mob/living/proc/hit_with_weapon(obj/item/I, mob/living/user, var/effective_force, var/hit_zone)
|
||||
visible_message("<span class='danger'>[src] has been [I.attack_verb.len? pick(I.attack_verb) : "attacked"] with [I.name] by [user]!</span>")
|
||||
visible_message("<span class='danger'>[src] has been [LAZYLEN(I.attack_verb) ? pick(I.attack_verb) : "attacked"] with [I.name] by [user]!</span>")
|
||||
|
||||
if(ai_holder)
|
||||
ai_holder.react_to_attack(user)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
var/list/mob_hat_cache = list()
|
||||
/proc/get_hat_icon(var/obj/item/hat, var/offset_x = 0, var/offset_y = 0)
|
||||
var/t_state = hat.icon_state
|
||||
if(hat.item_state_slots && hat.item_state_slots[slot_head_str])
|
||||
if(LAZYACCESS(hat.item_state_slots, slot_head_str))
|
||||
t_state = hat.item_state_slots[slot_head_str]
|
||||
else if(hat.item_state)
|
||||
t_state = hat.item_state
|
||||
@@ -10,7 +10,7 @@ var/list/mob_hat_cache = list()
|
||||
var/t_icon = INV_HEAD_DEF_ICON // are unique across multiple dmis, but whatever.
|
||||
if(hat.icon_override)
|
||||
t_icon = hat.icon_override
|
||||
else if(hat.item_icons && (slot_head_str in hat.item_icons))
|
||||
else if(LAZYACCESS(hat.item_icons, slot_head_str))
|
||||
t_icon = hat.item_icons[slot_head_str]
|
||||
var/image/I = image(icon = t_icon, icon_state = t_state)
|
||||
I.pixel_x = offset_x
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
//determine icon state to use
|
||||
var/t_state
|
||||
if(r_hand.item_state_slots && r_hand.item_state_slots[slot_r_hand_str])
|
||||
if(LAZYACCESS(r_hand.item_state_slots, slot_r_hand_str))
|
||||
t_state = r_hand.item_state_slots[slot_r_hand_str]
|
||||
else if(r_hand.item_state)
|
||||
t_state = r_hand.item_state
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
//determine icon to use
|
||||
var/icon/t_icon
|
||||
if(r_hand.item_icons && (slot_r_hand_str in r_hand.item_icons))
|
||||
if(LAZYACCESS(r_hand.item_icons, slot_r_hand_str))
|
||||
t_icon = r_hand.item_icons[slot_r_hand_str]
|
||||
else if(r_hand.icon_override)
|
||||
t_state += "_r"
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
//determine icon state to use
|
||||
var/t_state
|
||||
if(l_hand.item_state_slots && l_hand.item_state_slots[slot_l_hand_str])
|
||||
if(LAZYACCESS(l_hand.item_state_slots, slot_l_hand_str))
|
||||
t_state = l_hand.item_state_slots[slot_l_hand_str]
|
||||
else if(l_hand.item_state)
|
||||
t_state = l_hand.item_state
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
//determine icon to use
|
||||
var/icon/t_icon
|
||||
if(l_hand.item_icons && (slot_l_hand_str in l_hand.item_icons))
|
||||
if(LAZYACCESS(l_hand.item_icons, slot_l_hand_str))
|
||||
t_icon = l_hand.item_icons[slot_l_hand_str]
|
||||
else if(l_hand.icon_override)
|
||||
t_state += "_l"
|
||||
|
||||
@@ -156,11 +156,11 @@
|
||||
var/mob/living/M = loc
|
||||
if(istype(M))
|
||||
if(M.can_wield_item(src) && src.is_held_twohanded(M))
|
||||
item_state_slots[slot_l_hand_str] = wielded_item_state
|
||||
item_state_slots[slot_r_hand_str] = wielded_item_state
|
||||
LAZYSET(item_state_slots, slot_l_hand_str, wielded_item_state)
|
||||
LAZYSET(item_state_slots, slot_r_hand_str, wielded_item_state)
|
||||
else
|
||||
item_state_slots[slot_l_hand_str] = initial(item_state)
|
||||
item_state_slots[slot_r_hand_str] = initial(item_state)
|
||||
LAZYSET(item_state_slots, slot_l_hand_str, initial(item_state))
|
||||
LAZYSET(item_state_slots, slot_r_hand_str, initial(item_state))
|
||||
..()
|
||||
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
edge = initial(edge)
|
||||
w_class = initial(w_class)
|
||||
set_light(0,0)
|
||||
attack_verb = list()
|
||||
attack_verb = null
|
||||
|
||||
|
||||
/obj/item/weapon/cell/device/weapon/gunsword/attack_self(mob/living/user as mob)
|
||||
|
||||
@@ -1018,7 +1018,7 @@
|
||||
icon_state = "gildedcuffs"
|
||||
|
||||
icon_override = 'icons/vore/custom_onmob_vr.dmi'
|
||||
item_icons = list()
|
||||
item_icons = null
|
||||
|
||||
body_parts_covered = 0
|
||||
|
||||
@@ -1847,7 +1847,7 @@ Departamental Swimsuits, for general use
|
||||
rolled_down = 0
|
||||
rolled_sleeves = 0
|
||||
starting_accessories = null
|
||||
item_icons = list()
|
||||
item_icons = null
|
||||
|
||||
//Vorrarkul: Melanie Farmer
|
||||
/obj/item/clothing/under/fluff/slime_skeleton
|
||||
@@ -1901,10 +1901,10 @@ Departamental Swimsuits, for general use
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
icon = 'icons/vore/custom_clothes_vr.dmi'
|
||||
icon_state = "latex_clothes"
|
||||
item_icons = list()
|
||||
item_icons = null
|
||||
default_worn_icon = 'icons/vore/custom_clothes_vr.dmi'
|
||||
color = COLOR_NAVY
|
||||
sprite_sheets = list()
|
||||
sprite_sheets = null
|
||||
|
||||
//SweetBlueSylveon:Pip Shyner
|
||||
/obj/item/clothing/accessory/poncho/roles/cloak/hop/fluff/pip
|
||||
@@ -1994,7 +1994,7 @@ Departamental Swimsuits, for general use
|
||||
icon_override = 'icons/vore/custom_onmob_vr.dmi'
|
||||
icon_state = "nikki_outfit"
|
||||
item_state = "nikki_outfit"
|
||||
item_icons = list()
|
||||
item_icons = null
|
||||
sensor_mode = 3 // I'm a dumbass and forget these all the time please understand :(
|
||||
|
||||
/obj/item/clothing/under/skirt/outfit/fluff/nikki/mob_can_equip(var/mob/living/carbon/human/M, slot, disable_warning = 0)
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
icon_override = 'icons/inventory/head/mob_vr.dmi'
|
||||
slot_flags = SLOT_FEET | SLOT_HEAD | SLOT_ID
|
||||
w_class = ITEMSIZE_SMALL
|
||||
item_icons = list() // No in-hand sprites (for now, anyway, we could totally add some)
|
||||
pixel_y = 0 // Override value from parent.
|
||||
item_icons = null // No in-hand sprites (for now, anyway, we could totally add some)
|
||||
pixel_y = 0 // Override value from parent.
|
||||
|
||||
/obj/item/weapon/holder/micro/examine(mob/user)
|
||||
. = list()
|
||||
|
||||
Reference in New Issue
Block a user