mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Update SSOverlays (ported from Baystation) (#19051)
Our SSOverlays system is outdated, and is likely the cause of many of the issues seen in #18895. It has also been linked to a massive server performance decrease. This brings an updated system from Baystation, hopefully with speed increases. Should be testmerged, ideally with #18895. --------- Co-authored-by: Cody Brittain <cbrittain10@live.com>
This commit is contained in:
co-authored by
Cody Brittain
parent
405a05b819
commit
9983fca311
@@ -106,11 +106,11 @@
|
||||
if(!S.blood_DNA)
|
||||
S.blood_DNA = list()
|
||||
S.blood_overlay.color = basecolor
|
||||
S.add_overlay(S.blood_overlay)
|
||||
S.AddOverlays(S.blood_overlay)
|
||||
if(S.blood_overlay && S.blood_overlay.color != basecolor)
|
||||
S.cut_overlay(S.blood_overlay, TRUE)
|
||||
S.CutOverlays(S.blood_overlay, ATOM_ICON_CACHE_PROTECTED)
|
||||
S.blood_overlay.color = basecolor
|
||||
S.add_overlay(S.blood_overlay, TRUE)
|
||||
S.AddOverlays(S.blood_overlay, ATOM_ICON_CACHE_PROTECTED)
|
||||
if(blood_DNA)
|
||||
S.blood_DNA |= blood_DNA.Copy()
|
||||
|
||||
@@ -217,8 +217,8 @@
|
||||
blood.Blend(basecolor,ICON_MULTIPLY)
|
||||
|
||||
icon = blood
|
||||
cut_overlays()
|
||||
add_overlay(giblets)
|
||||
ClearOverlays()
|
||||
AddOverlays(giblets)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gibup1","gibup1","gibup1")
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
color = "#FFFFFF"
|
||||
var/truedir = 0
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
track.fresh = 0
|
||||
track.overlay = I
|
||||
stack[stack_idx] = track
|
||||
add_overlay(I)
|
||||
AddOverlays(I)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/footprints
|
||||
name = "wet footprints"
|
||||
|
||||
@@ -28,6 +28,6 @@
|
||||
shadeOverlay.Blend(shade,ICON_ADD)
|
||||
SSicon_cache.crayon_cache["[type]_s"] = shadeOverlay
|
||||
|
||||
add_overlay(list(mainOverlay, shadeOverlay))
|
||||
AddOverlays(list(mainOverlay, shadeOverlay))
|
||||
|
||||
add_hiddenprint(usr)
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
var/turf/T = get_turf(src)
|
||||
var/image/I = image(icon, icon_state = icon_state, dir = dir)
|
||||
I.color = color
|
||||
T.add_overlay(I, TRUE) // Register it as priority so we don't lose it on icon update.
|
||||
T.AddOverlays(I, ATOM_ICON_CACHE_PROTECTED) // Register it as protected so we don't lose it on icon update.
|
||||
qdel(src)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
if(prob(75))
|
||||
var/image/web_overlay = image(icon, icon_state = "[initial(icon_state)]-overlay[pick(1, 2, 3)]", layer = ABOVE_HUMAN_LAYER)
|
||||
add_overlay(web_overlay)
|
||||
AddOverlays(web_overlay)
|
||||
|
||||
/obj/effect/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || height == 0)
|
||||
|
||||
@@ -270,11 +270,11 @@
|
||||
/obj/item/update_icon()
|
||||
. = ..()
|
||||
if(build_from_parts || has_accents)
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(build_from_parts)
|
||||
add_overlay(overlay_image(icon,"[icon_state]_[worn_overlay]", flags=RESET_COLOR)) //add the overlay w/o coloration of the original sprite
|
||||
AddOverlays(overlay_image(icon,"[icon_state]_[worn_overlay]", flags=RESET_COLOR)) //add the overlay w/o coloration of the original sprite
|
||||
if(has_accents)
|
||||
add_overlay(overlay_image(icon, "[icon_state]_acc", accent_color, accent_flags))
|
||||
AddOverlays(overlay_image(icon, "[icon_state]_acc", accent_color, accent_flags))
|
||||
|
||||
/obj/item/device
|
||||
icon = 'icons/obj/device.dmi'
|
||||
@@ -784,7 +784,7 @@ var/list/global/slot_flags_enumeration = list(
|
||||
/obj/item/clean_blood()
|
||||
. = ..()
|
||||
if(blood_overlay)
|
||||
cut_overlay(blood_overlay, TRUE)
|
||||
CutOverlays(blood_overlay, TRUE)
|
||||
if(istype(src, /obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = src
|
||||
G.transfer_blood = 0
|
||||
@@ -815,7 +815,7 @@ var/list/global/slot_flags_enumeration = list(
|
||||
//apply the blood-splatter overlay if it isn't already in there
|
||||
if(!blood_DNA.len)
|
||||
blood_overlay.color = blood_color
|
||||
add_overlay(blood_overlay, TRUE) // Priority overlay so we don't lose it somehow.
|
||||
AddOverlays(blood_overlay, TRUE) // Priority overlay so we don't lose it somehow.
|
||||
|
||||
//if this blood isn't already in the list, add it
|
||||
if(istype(M))
|
||||
|
||||
@@ -492,15 +492,15 @@
|
||||
return contains_body
|
||||
|
||||
/obj/structure/closet/airbubble/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(ripped)
|
||||
name = "ripped air bubble"
|
||||
icon_state = "[icon_state]_ripped"
|
||||
else
|
||||
icon_state = "[initial(icon_state)][opened ? "_open" : ""]"
|
||||
if(zipped)
|
||||
add_overlay("[icon_state]_restrained")
|
||||
add_overlay("pressure_[(use_internal_tank) ?("on") : ("off") ]")
|
||||
AddOverlays("[icon_state]_restrained")
|
||||
AddOverlays("pressure_[(use_internal_tank) ?("on") : ("off") ]")
|
||||
|
||||
// Process transfer of air from the tank. Handle if it is ripped open.
|
||||
/obj/structure/closet/airbubble/proc/process_tank_give_air()
|
||||
|
||||
@@ -92,10 +92,10 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/pen/crayon/augment/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
var/image/crayon_tip = image('icons/obj/crayons.dmi', "crayonaugment_tip")
|
||||
crayon_tip.color = colour
|
||||
add_overlay(crayon_tip)
|
||||
AddOverlays(crayon_tip)
|
||||
|
||||
/obj/item/pen/crayon/augment/throw_at(atom/target, range, speed, mob/user)
|
||||
user.drop_from_inventory(src)
|
||||
|
||||
@@ -104,10 +104,10 @@
|
||||
. = TRUE
|
||||
|
||||
/obj/item/aicard/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(carded_ai)
|
||||
if (!carded_ai.control_disabled)
|
||||
add_overlay("aicard-on")
|
||||
AddOverlays("aicard-on")
|
||||
if(carded_ai.stat)
|
||||
icon_state = "aicard-404"
|
||||
else
|
||||
|
||||
@@ -65,35 +65,35 @@
|
||||
var/c_state = "battery[battery_level][contained_sprite ? slot_str_to_contained_flag(slot) : ""]"
|
||||
var/image/battery_overlay = image(c_icon, c_state)
|
||||
battery_overlay.appearance_flags = RESET_ALPHA
|
||||
I.add_overlay(battery_overlay)
|
||||
I.AddOverlays(battery_overlay)
|
||||
if(breath_mask)
|
||||
var/c_state = "mask_[mask_on ? "worn" : "idle"][contained_sprite ? slot_str_to_contained_flag(slot) : ""]"
|
||||
var/image/mask_overlay = image(c_icon, c_state)
|
||||
mask_overlay.appearance_flags = RESET_ALPHA
|
||||
I.add_overlay(mask_overlay)
|
||||
I.AddOverlays(mask_overlay)
|
||||
if(tank)
|
||||
if(tank_level)
|
||||
var/c_state = "tank_indicator[tank_level][contained_sprite ? slot_str_to_contained_flag(slot) : ""]"
|
||||
var/image/tank_level_overlay = image(c_icon, c_state)
|
||||
tank_level_overlay.appearance_flags = RESET_ALPHA
|
||||
I.add_overlay(tank_level_overlay)
|
||||
I.AddOverlays(tank_level_overlay)
|
||||
var/c_state = "tank_[tank_type][contained_sprite ? slot_str_to_contained_flag(slot) : ""]"
|
||||
var/image/tank_overlay = image(c_icon, c_state)
|
||||
tank_overlay.appearance_flags = RESET_ALPHA
|
||||
I.add_overlay(tank_overlay)
|
||||
I.AddOverlays(tank_overlay)
|
||||
if(epp_active)
|
||||
var/c_state = "epp_active[cpr_mode ? "_cpr" : ""][contained_sprite ? slot_str_to_contained_flag(slot) : ""]"
|
||||
var/image/epp_overlay = image(c_icon, c_state)
|
||||
epp_overlay.appearance_flags = RESET_ALPHA
|
||||
I.add_overlay(epp_overlay)
|
||||
I.AddOverlays(epp_overlay)
|
||||
return I
|
||||
|
||||
/obj/item/auto_cpr/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
item_state = "[cpr_mode ? "med_harness_cpr" : "[initial(item_state)]"]"
|
||||
|
||||
if(breath_mask)
|
||||
add_overlay("mask_[mask_on ? "worn" : "idle"]")
|
||||
AddOverlays("mask_[mask_on ? "worn" : "idle"]")
|
||||
if(battery)
|
||||
switch(battery.percent())
|
||||
if(90 to INFINITY) battery_level = 6
|
||||
@@ -103,7 +103,7 @@
|
||||
if(20 to 39) battery_level = 2
|
||||
if(05 to 19) battery_level = 1
|
||||
if(-INFINITY to 4) battery_level = 0
|
||||
add_overlay("battery[battery_level]")
|
||||
AddOverlays("battery[battery_level]")
|
||||
if(tank)
|
||||
switch(tank.percent())
|
||||
if(90 to INFINITY) tank_level = 6
|
||||
@@ -113,7 +113,7 @@
|
||||
if(20 to 39) tank_level = 2
|
||||
if(05 to 19) tank_level = 1
|
||||
if(-INFINITY to 4) tank_level = 0
|
||||
add_overlay("tank_indicator[tank_level]")
|
||||
AddOverlays("tank_indicator[tank_level]")
|
||||
|
||||
if(istype(tank, /obj/item/tank/emergency_oxygen/engi))
|
||||
tank_type = "engi"
|
||||
@@ -121,11 +121,11 @@
|
||||
tank_type = "oxy"
|
||||
else
|
||||
tank_type = "other"
|
||||
add_overlay("tank_[tank_type]")
|
||||
AddOverlays("tank_[tank_type]")
|
||||
if(epp_active)
|
||||
add_overlay("epp_active")
|
||||
AddOverlays("epp_active")
|
||||
if(panel_open)
|
||||
add_overlay("panel_open[battery ? "_battery" : ""]")
|
||||
AddOverlays("panel_open[battery ? "_battery" : ""]")
|
||||
|
||||
/obj/item/auto_cpr/mob_can_equip(mob/living/carbon/human/H, slot, disable_warning = 0, force = 0)
|
||||
. = ..()
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
else if(on)
|
||||
var/image/I = overlay_image(icon, "glowstick-overlay", color)
|
||||
I.blend_mode = BLEND_ADD
|
||||
add_overlay(I)
|
||||
AddOverlays(I)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
item_state = "[initial(icon_state)]-on"
|
||||
set_light(brightness_on, flashlight_power, light_color)
|
||||
|
||||
@@ -52,10 +52,10 @@
|
||||
set_light(brightness_on, flashlight_power, light_color)
|
||||
else
|
||||
set_light(0)
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
var/image/I = image(icon = icon, icon_state = "lavalamp-[on ? "on" : "off"]")
|
||||
I.color = light_color
|
||||
add_overlay(I)
|
||||
AddOverlays(I)
|
||||
|
||||
/obj/item/device/flashlight/lamp/lava/red
|
||||
light_color = COLOR_RED
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
/obj/item/device/lightreplacer/update_icon()
|
||||
if(emagged)
|
||||
add_overlay("emagged")
|
||||
AddOverlays("emagged")
|
||||
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Use(var/mob/user)
|
||||
|
||||
@@ -167,15 +167,15 @@
|
||||
if (WT.use(2, user))
|
||||
user.visible_message(SPAN_NOTICE("[user] starts welding the metal shell of [src]."), SPAN_NOTICE("You start [hacked ? "repairing" : "welding open"] the metal covering of [src]."))
|
||||
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
add_overlay("overlay_welding")
|
||||
AddOverlays("overlay_welding")
|
||||
if(WT.use_tool(src, user, 25, volume = 50))
|
||||
to_chat(user, SPAN_NOTICE("You are able to [hacked ? "repair" : "weld through"] the metal shell of [src]."))
|
||||
if (hacked) locked = 1
|
||||
else locked = 0
|
||||
hacked = !hacked
|
||||
cut_overlay("overlay_welding")
|
||||
CutOverlays("overlay_welding")
|
||||
else
|
||||
cut_overlay("overlay_welding")
|
||||
CutOverlays("overlay_welding")
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
@@ -402,7 +402,7 @@
|
||||
update_overlays()
|
||||
|
||||
/obj/item/device/magnetic_lock/proc/update_overlays()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
switch (status)
|
||||
if (STATUS_BROKEN)
|
||||
icon_state = "broken"
|
||||
@@ -410,16 +410,16 @@
|
||||
|
||||
if (STATUS_INACTIVE to STATUS_ACTIVE)
|
||||
if (hacked)
|
||||
add_overlay("overlay_hacked")
|
||||
AddOverlays("overlay_hacked")
|
||||
else if (locked)
|
||||
add_overlay("overlay_locked")
|
||||
AddOverlays("overlay_locked")
|
||||
else
|
||||
add_overlay("overlay_unlocked")
|
||||
AddOverlays("overlay_unlocked")
|
||||
switch (constructionstate)
|
||||
if (0)
|
||||
return
|
||||
if (1 to 4)
|
||||
add_overlay("overlay_deconstruct_[constructionstate]")
|
||||
AddOverlays("overlay_deconstruct_[constructionstate]")
|
||||
|
||||
/obj/item/device/magnetic_lock/proc/takedamage(var/damage)
|
||||
if(invincible)
|
||||
@@ -453,7 +453,7 @@
|
||||
switch (status)
|
||||
if (STATUS_INACTIVE to STATUS_ACTIVE)
|
||||
if(istype(src, /obj/item/device/magnetic_lock/keypad))
|
||||
add_overlay("overlay_keypad")
|
||||
AddOverlays("overlay_keypad")
|
||||
|
||||
/obj/item/device/magnetic_lock/keypad/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
|
||||
@@ -35,13 +35,13 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/memorywiper/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(anchored)
|
||||
icon_state = "[initial(icon_state)]_opened"
|
||||
if(attached)
|
||||
add_overlay("wireout")
|
||||
AddOverlays("wireout")
|
||||
if(wiping)
|
||||
add_overlay("screen")
|
||||
AddOverlays("screen")
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
if(tracking_apc)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
apc_indicator = mutable_appearance(icon, "lost")
|
||||
add_overlay(apc_indicator)
|
||||
AddOverlays(apc_indicator)
|
||||
else
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
QDEL_NULL(apc_indicator)
|
||||
@@ -169,7 +169,7 @@
|
||||
apc_indicator.icon_state = "medium"
|
||||
if(16 to INFINITY)
|
||||
apc_indicator.icon_state = "far"
|
||||
set_overlays(apc_indicator)
|
||||
SetOverlays(apc_indicator)
|
||||
|
||||
/obj/item/device/multitool/proc/wire(datum/integrated_io/io, mob/user)
|
||||
if(!io.holder.assembly)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
/obj/item/device/paicard/Initialize()
|
||||
. = ..()
|
||||
add_overlay("pai_off")
|
||||
AddOverlays("pai_off")
|
||||
SSpai.all_pai_devices += src
|
||||
update_light()
|
||||
|
||||
@@ -389,19 +389,19 @@
|
||||
|
||||
/obj/item/device/paicard/proc/setPersonality(mob/living/silicon/pai/personality)
|
||||
src.pai = personality
|
||||
add_overlay("pai-happy")
|
||||
AddOverlays("pai-happy")
|
||||
playsound(src, 'sound/effects/pai/pai_restore.ogg', 75)
|
||||
|
||||
/obj/item/device/paicard/proc/removePersonality()
|
||||
src.pai = null
|
||||
cut_overlays()
|
||||
add_overlay("pai-off")
|
||||
ClearOverlays()
|
||||
AddOverlays("pai-off")
|
||||
|
||||
/obj/item/device/paicard
|
||||
var/current_emotion = 1
|
||||
/obj/item/device/paicard/proc/setEmotion(var/emotion)
|
||||
if(pai)
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
var/new_state
|
||||
switch(emotion)
|
||||
if(1) new_state = "pai-happy"
|
||||
@@ -420,7 +420,7 @@
|
||||
if(14) new_state = "pai-exclamation"
|
||||
if(15) new_state = "pai-question"
|
||||
if (new_state)
|
||||
add_overlay(new_state)
|
||||
AddOverlays(new_state)
|
||||
current_emotion = emotion
|
||||
|
||||
/obj/item/device/paicard/proc/alertUpdate()
|
||||
|
||||
@@ -431,19 +431,19 @@ pixel_x = 8;
|
||||
..(dest)
|
||||
|
||||
/obj/item/device/radio/intercom/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(!on)
|
||||
icon_state = initial(icon_state)
|
||||
set_light(FALSE)
|
||||
return
|
||||
else
|
||||
add_overlay(screen_overlays["intercom_screen"])
|
||||
add_overlay(screen_overlays["intercom_scanline"])
|
||||
AddOverlays(screen_overlays["intercom_screen"])
|
||||
AddOverlays(screen_overlays["intercom_scanline"])
|
||||
set_light(1.4, 1.3, COLOR_CYAN)
|
||||
if(broadcasting)
|
||||
add_overlay(screen_overlays["intercom_b"])
|
||||
AddOverlays(screen_overlays["intercom_b"])
|
||||
if(listening)
|
||||
add_overlay(screen_overlays["intercom_l"])
|
||||
AddOverlays(screen_overlays["intercom_l"])
|
||||
|
||||
/obj/item/device/radio/intercom/broadcasting/Initialize()
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
|
||||
@@ -472,10 +472,10 @@ BREATH ANALYZER
|
||||
origin_tech = list(TECH_MAGNET = 4, TECH_BIO = 2)
|
||||
|
||||
/obj/item/device/mass_spectrometer/adv/clear_blood_overlay()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
|
||||
/obj/item/device/mass_spectrometer/adv/add_blood_overlay(var/image/I)
|
||||
add_overlay(I)
|
||||
AddOverlays(I)
|
||||
|
||||
/obj/item/device/reagent_scanner
|
||||
name = "reagent scanner"
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
if(!istype(I))
|
||||
qdel(src)
|
||||
return
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
var/mutable_appearance/MA = new(I)
|
||||
MA.plane = EFFECTS_ABOVE_LIGHTING_PLANE
|
||||
MA.appearance_flags = RESET_ALPHA
|
||||
@@ -202,6 +202,6 @@
|
||||
if(!istype(P))
|
||||
qdel(src)
|
||||
return
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(P.info)
|
||||
icon_state = "text[rand(1,3)]"
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/device/suit_cooling_unit/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(cover_open)
|
||||
if(cell)
|
||||
icon_state = "suitcooler1"
|
||||
@@ -202,7 +202,7 @@
|
||||
if(-INFINITY to 17)
|
||||
battery_level = 5
|
||||
|
||||
add_overlay("battery-[battery_level]")
|
||||
AddOverlays("battery-[battery_level]")
|
||||
item_state = "coolingpack[battery_level]"
|
||||
|
||||
if(ismob(loc))
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
toggle = 1
|
||||
|
||||
/obj/item/device/transfer_valve/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
underlays = null
|
||||
|
||||
if(!tank_one && !tank_two && !attached_device)
|
||||
@@ -126,13 +126,13 @@
|
||||
icon_state = "valve"
|
||||
|
||||
if(tank_one)
|
||||
add_overlay("[tank_one.icon_state]")
|
||||
AddOverlays("[tank_one.icon_state]")
|
||||
if(tank_two)
|
||||
var/icon/J = new(icon, icon_state = "[tank_two.icon_state]")
|
||||
J.Shift(WEST, 13)
|
||||
underlays += J
|
||||
if(attached_device)
|
||||
add_overlay("device")
|
||||
AddOverlays("device")
|
||||
|
||||
/obj/item/device/transfer_valve/proc/remove_tank(obj/item/tank/T, mob/user)
|
||||
if(tank_one == T)
|
||||
|
||||
@@ -114,6 +114,6 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/box/fancy/crayons/chalkbox/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
for(var/obj/item/pen/drafting/chalk in contents)
|
||||
add_overlay("[chalk.colorName]")
|
||||
AddOverlays("[chalk.colorName]")
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
|
||||
/obj/item/glass_jar/update_icon() // Also updates name and desc
|
||||
underlays.Cut()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
switch(contains)
|
||||
if(JAR_NOTHING)
|
||||
name = initial(name)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/holomenu/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(anchored)
|
||||
set_light(2)
|
||||
if(rave_mode)
|
||||
@@ -46,11 +46,11 @@
|
||||
holo_lights.color = null
|
||||
holo_text.color = null
|
||||
holo_border.color = null
|
||||
add_overlay(holo_lights)
|
||||
AddOverlays(holo_lights)
|
||||
if(length(menu_text))
|
||||
add_overlay(holo_text)
|
||||
AddOverlays(holo_text)
|
||||
if(border_on)
|
||||
add_overlay(holo_border)
|
||||
AddOverlays(holo_border)
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
|
||||
@@ -284,12 +284,12 @@
|
||||
|
||||
/obj/item/storage/overloader/update_icon()
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
var/obj/item/ipc_overloader/overloader = locate() in contents
|
||||
if(overloader)
|
||||
add_overlay(image(overloader.icon, null, overloader.icon_state, sealed ? layer - 0.01 : layer + 0.01))
|
||||
AddOverlays(image(overloader.icon, null, overloader.icon_state, sealed ? layer - 0.01 : layer + 0.01))
|
||||
if(!sealed)
|
||||
add_overlay(image(icon, null, "box-overlay", layer + 0.02))
|
||||
AddOverlays(image(icon, null, "box-overlay", layer + 0.02))
|
||||
if(!sealed)
|
||||
icon_state = "box-open"
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@ var/list/mob_icon_icon_states = list()
|
||||
I = overlay_image(mob_overlay_icon, color = color, flags = RESET_COLOR|RESET_ALPHA)
|
||||
var/image/additional_parts = build_additional_parts(H, mob_icon, slot)
|
||||
if(additional_parts)
|
||||
I.add_overlay(additional_parts)
|
||||
I.AddOverlays(additional_parts)
|
||||
if(has_accents)
|
||||
I.add_overlay(overlay_image(icon, "[UNDERSCORE_OR_NULL(src.icon_species_tag)][item_state][contained_sprite ? slot_str_to_contained_flag(slot) : ""]_acc", accent_color, accent_flags))
|
||||
I.AddOverlays(overlay_image(icon, "[UNDERSCORE_OR_NULL(src.icon_species_tag)][item_state][contained_sprite ? slot_str_to_contained_flag(slot) : ""]_acc", accent_color, accent_flags))
|
||||
var/offset_x = worn_x_dimension
|
||||
var/offset_y = worn_y_dimension
|
||||
center_image(I, offset_x, offset_y)
|
||||
|
||||
@@ -59,9 +59,9 @@
|
||||
yarn_overlay.color = ball.color
|
||||
else
|
||||
yarn_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(yarn_overlay)
|
||||
AddOverlays(yarn_overlay)
|
||||
else
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/knittingneedles/attackby(obj/item/attacking_item, mob/user)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
return TRUE
|
||||
var/obj/item/weldingtool/WT = attacking_item
|
||||
if(WT.use(0, user))
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
LAZYCLEARLIST(bullet_holes)
|
||||
icon = initial(icon)
|
||||
hp = initial(hp)
|
||||
@@ -97,7 +97,7 @@
|
||||
virtual_icon.DrawBox(null, B.b2x, B.b2y1, B.b2x, B.b2y2) // vertical line, top to bottom
|
||||
|
||||
|
||||
add_overlay(bmark) // add the decal
|
||||
AddOverlays(bmark) // add the decal
|
||||
icon = virtual_icon // apply bullet_holes over decals
|
||||
return
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
. = ..()
|
||||
if(!glow_state)
|
||||
glow_state = make_screen_overlay(icon, icon_state)
|
||||
add_overlay(glow_state)
|
||||
AddOverlays(glow_state)
|
||||
|
||||
/obj/effect/temp_visual/constellation/attackby(obj/item/attacking_item, mob/user)
|
||||
visible_message("<span class='notice'>\The [src] vanishes!</span>")
|
||||
@@ -151,10 +151,10 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/skrell_projector/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(working)
|
||||
var/image/overlay = overlay_image(icon, "projector_light", light_color, RESET_COLOR)
|
||||
add_overlay(overlay)
|
||||
AddOverlays(overlay)
|
||||
|
||||
/obj/item/skrell_projector/process()
|
||||
if(!selected_world)
|
||||
|
||||
@@ -106,7 +106,7 @@ Contains:
|
||||
if(!automatic_charge_overlays) //Checks if the item has this feature enabled
|
||||
return //If it does not, do nothing
|
||||
var/ratio = CEILING(clamp(amount / max_amount, 0, 1) * charge_sections, 1)
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
var/iconState = "[icon_state]_charge"
|
||||
if(!amount) //Checks if there are still charges left in the item
|
||||
return //If it does not, do nothing, as the overlays have been cut before this already.
|
||||
@@ -114,7 +114,7 @@ Contains:
|
||||
var/mutable_appearance/charge_overlay = mutable_appearance(icon, iconState)
|
||||
for(var/i = ratio, i >= 1, i--)
|
||||
charge_overlay.pixel_x = charge_x_offset * (i - 1)
|
||||
add_overlay(charge_overlay)
|
||||
AddOverlays(charge_overlay)
|
||||
|
||||
// Bruise Pack.
|
||||
/obj/item/stack/medical/bruise_pack
|
||||
|
||||
@@ -256,9 +256,9 @@
|
||||
..()
|
||||
if(status == BALLOON_BURST)
|
||||
worn_overlay = null
|
||||
cut_overlay()
|
||||
CutOverlays()
|
||||
if(worn_overlay)
|
||||
add_overlay(overlay_image(icon, "[initial(icon_state)]_[worn_overlay]", flags=RESET_COLOR))
|
||||
AddOverlays(overlay_image(icon, "[initial(icon_state)]_[worn_overlay]", flags=RESET_COLOR))
|
||||
|
||||
#undef BALLOON_NORMAL
|
||||
#undef BALLOON_BLOW
|
||||
|
||||
@@ -115,10 +115,10 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/skrell_projector/vaurca_projector/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(working)
|
||||
var/image/overlay = overlay_image(icon, "zora_projector_light", light_color, RESET_COLOR)
|
||||
add_overlay(overlay)
|
||||
AddOverlays(overlay)
|
||||
|
||||
/obj/item/skrell_projector/vaurca_projector/process()
|
||||
if(!selected_world || !possible_messages)
|
||||
|
||||
@@ -112,10 +112,10 @@
|
||||
check_obfuscation()
|
||||
|
||||
/obj/item/card/id/syndicate/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(electronic_warfare)
|
||||
var/mutable_appearance/electro_overlay = mutable_appearance(icon, "electronic_warfare")
|
||||
add_overlay(electro_overlay)
|
||||
AddOverlays(electro_overlay)
|
||||
|
||||
/obj/item/card/id/syndicate/proc/check_obfuscation()
|
||||
if(electronic_warfare)
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/clothing/mask/chewable/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(wrapped)
|
||||
var/mutable_appearance/base_overlay = mutable_appearance(icon, "[initial(icon_state)]_wrapper")
|
||||
base_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(base_overlay)
|
||||
AddOverlays(base_overlay)
|
||||
|
||||
/obj/item/clothing/mask/chewable/Initialize()
|
||||
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
|
||||
@@ -236,12 +236,12 @@
|
||||
spitout(0)
|
||||
|
||||
/obj/item/clothing/mask/chewable/candy/lolli/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
var/mutable_appearance/base_overlay = mutable_appearance(icon, "[initial(icon_state)]_stick")
|
||||
base_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(base_overlay)
|
||||
AddOverlays(base_overlay)
|
||||
if(wrapped)
|
||||
add_overlay("[initial(icon_state)]_wrapper")
|
||||
AddOverlays("[initial(icon_state)]_wrapper")
|
||||
|
||||
/obj/item/clothing/mask/chewable/candy/lolli/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
pickup_sound = 'sound/items/pickup/screwdriver.ogg'
|
||||
|
||||
/obj/item/lipstick/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(open)
|
||||
worn_overlay = "open_overlay"
|
||||
worn_overlay_color = lipstick_color
|
||||
icon_state = "[initial(icon_state)]_open"
|
||||
var/image/stick_overlay = image('icons/obj/cosmetics.dmi', null, "[initial(icon_state)]_open_overlay")
|
||||
stick_overlay.color = lipstick_color
|
||||
add_overlay(stick_overlay)
|
||||
AddOverlays(stick_overlay)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
worn_overlay = initial(worn_overlay)
|
||||
|
||||
@@ -65,19 +65,19 @@
|
||||
location.hotspot_expose(700, 2)
|
||||
|
||||
/obj/item/flamethrower/update_icon()
|
||||
cut_overlays()
|
||||
add_overlay("+[initial(welding_tool.icon_state)]")
|
||||
ClearOverlays()
|
||||
AddOverlays("+[initial(welding_tool.icon_state)]")
|
||||
|
||||
if(igniter)
|
||||
add_overlay("+igniter[secured]")
|
||||
AddOverlays("+igniter[secured]")
|
||||
|
||||
if(istype(gas_tank, /obj/item/tank/phoron))
|
||||
add_overlay("+phoron_tank")
|
||||
AddOverlays("+phoron_tank")
|
||||
else if(istype(gas_tank, /obj/item/tank/hydrogen))
|
||||
add_overlay("+hydro_tank")
|
||||
AddOverlays("+hydro_tank")
|
||||
|
||||
if(lit)
|
||||
add_overlay("+lit")
|
||||
AddOverlays("+lit")
|
||||
set_light(1.4, 2)
|
||||
item_state = "flamethrower_1"
|
||||
else
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
if(build_from_parts) //random colors!
|
||||
if(!color)
|
||||
color = pick(COLOR_RED, COLOR_BLUE, COLOR_LIME, COLOR_ORANGE, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
|
||||
add_overlay(overlay_image(icon, "[initial(icon_state)]_end", flags=RESET_COLOR))
|
||||
AddOverlays(overlay_image(icon, "[initial(icon_state)]_end", flags=RESET_COLOR))
|
||||
|
||||
/obj/item/handcuffs/cable/attack_self(mob/user)
|
||||
legcuff = !legcuff
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
|
||||
|
||||
/obj/item/implantcase/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if (imp)
|
||||
var/overlay_icon_state = "implantstorage_[imp.implant_icon]"
|
||||
var/mutable_appearance/overlay_implant_icon = mutable_appearance(icon, overlay_icon_state)
|
||||
add_overlay(overlay_implant_icon)
|
||||
AddOverlays(overlay_implant_icon)
|
||||
|
||||
/obj/item/implantcase/attackby(obj/item/attacking_item, mob/user)
|
||||
if (attacking_item.ispen())
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/implanter/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
icon_state = "implanter-[imp ? "1" : "0"]"
|
||||
if (imp)
|
||||
var/mutable_appearance/overlay_implant_icon = mutable_appearance(icon, "implanter-overlay")
|
||||
overlay_implant_icon.color = imp.implant_color
|
||||
add_overlay(overlay_implant_icon)
|
||||
AddOverlays(overlay_implant_icon)
|
||||
|
||||
/obj/item/implanter/attackby(obj/item/attacking_item, mob/user)
|
||||
if(!imp && istype(attacking_item, /obj/item/implant) && user.unEquip(attacking_item, src))
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
var/listening = TRUE
|
||||
|
||||
/obj/item/implantpad/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
icon_state = "implantpad-[case ? "1" : "0"]"
|
||||
if(case?.imp)
|
||||
var/obj/item/implant/caseimplant = case.imp
|
||||
var/implant_overlay_icon_state = "implantstorage_[caseimplant.implant_icon]"
|
||||
var/mutable_appearance/implant_case_implant_overlay = mutable_appearance(icon, implant_overlay_icon_state)
|
||||
add_overlay(implant_case_implant_overlay)
|
||||
AddOverlays(implant_case_implant_overlay)
|
||||
|
||||
|
||||
/obj/item/implantpad/attack_hand(mob/user)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
var/image/I = image(icon, null, "wiredrod_cable")
|
||||
I.appearance_flags = RESET_COLOR
|
||||
I.color = cable_color
|
||||
add_overlay(I)
|
||||
AddOverlays(I)
|
||||
|
||||
/obj/item/material/wirerod/attackby(obj/item/attacking_item, mob/user)
|
||||
..()
|
||||
|
||||
@@ -39,20 +39,20 @@
|
||||
|
||||
/obj/item/material/ashtray/update_icon()
|
||||
color = null
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
var/list/ashtray_cache = SSicon_cache.ashtray_cache
|
||||
var/cache_key = "base-[material.name]"
|
||||
if(!ashtray_cache[cache_key])
|
||||
var/image/I = image('icons/obj/ashtray.dmi',"ashtray")
|
||||
I.color = material.icon_colour
|
||||
ashtray_cache[cache_key] = I
|
||||
add_overlay(ashtray_cache[cache_key])
|
||||
AddOverlays(ashtray_cache[cache_key])
|
||||
|
||||
if (contents.len == max_butts)
|
||||
add_overlay("ashtray_full")
|
||||
AddOverlays("ashtray_full")
|
||||
desc = "It's stuffed full."
|
||||
else if (contents.len > max_butts/2)
|
||||
add_overlay("ashtray_half")
|
||||
AddOverlays("ashtray_half")
|
||||
desc = "It's half-filled."
|
||||
else
|
||||
desc = "An ashtray made of [material.display_name]."
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
is_liquid = FALSE
|
||||
else
|
||||
playsound(user.loc, 'sound/items/eatfood.ogg', rand(10, 50), 1)
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
return
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("You don't have anything on \the [src].")) //if we have help intent and no food scooped up DON'T STAB OURSELVES WITH THE FORK)
|
||||
@@ -70,7 +70,7 @@
|
||||
reagents.clear_reagents()
|
||||
is_liquid = FALSE
|
||||
loaded = null
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
return
|
||||
|
||||
/obj/item/material/kitchen/utensil/verb/bite_size()
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
if(build_from_parts)
|
||||
var/image/I = image(icon, icon_state = "machete_handle")
|
||||
I.color = pick(COLOR_BLUE, COLOR_RED, COLOR_CYAN, COLOR_BLACK, COLOR_AMBER, COLOR_GREEN, COLOR_OLIVE, COLOR_GUNMETAL, COLOR_DARK_BLUE_GRAY)
|
||||
add_overlay(I)
|
||||
AddOverlays(I)
|
||||
|
||||
/obj/item/material/hatchet/machete/unbreakable
|
||||
unbreakable = TRUE
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
usr.drop_from_inventory(attacking_item, HS)
|
||||
var/mutable_appearance/MA = new(attacking_item)
|
||||
MA.layer = FLOAT_LAYER
|
||||
HS.add_overlay(MA)
|
||||
HS.AddOverlays(MA)
|
||||
HS.name = "[attacking_item.name] on a spear"
|
||||
HS.material = material.name
|
||||
qdel(src)
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/paint/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(!is_open_container())
|
||||
add_overlay("paint_lid")
|
||||
AddOverlays("paint_lid")
|
||||
else if(reagents.total_volume)
|
||||
var/image/I = image(icon, "paint_full")
|
||||
I.color = reagents.get_color()
|
||||
add_overlay(I)
|
||||
AddOverlays(I)
|
||||
|
||||
/obj/item/reagent_containers/glass/paint/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
@@ -193,11 +193,11 @@ var/list/tape_roll_applications = list()
|
||||
|
||||
if(tape_roll_applications[F] & direction) // hazard_overlay in F.overlays wouldn't work.
|
||||
user.visible_message("[user] uses the adhesive of \the [src] to remove area markings from \the [F].", "You use the adhesive of \the [src] to remove area markings from \the [F].")
|
||||
F.cut_overlay(hazard_overlay, TRUE)
|
||||
F.CutOverlays(hazard_overlay, ATOM_ICON_CACHE_PROTECTED)
|
||||
tape_roll_applications[F] &= ~direction
|
||||
else
|
||||
user.visible_message("[user] applied \the [src] on \the [F] to create area markings.", "You apply \the [src] on \the [F] to create area markings.")
|
||||
F.add_overlay(hazard_overlay, TRUE)
|
||||
F.AddOverlays(hazard_overlay, ATOM_ICON_CACHE_PROTECTED)
|
||||
tape_roll_applications[F] |= direction
|
||||
return
|
||||
|
||||
|
||||
@@ -947,7 +947,7 @@
|
||||
/obj/item/storage/backpack/cloak/get_mob_overlay(var/mob/living/carbon/human/human, var/mob_icon, var/mob_state, var/slot)
|
||||
var/image/I = ..()
|
||||
var/image/cape_backing = image(mob_icon, null, "[icon_state]_backing", MOB_SHADOW_LAYER)
|
||||
I.add_overlay(cape_backing)
|
||||
I.AddOverlays(cape_backing)
|
||||
return I
|
||||
|
||||
/obj/item/storage/backpack/cloak/sedantis
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
M.update_inv_belt()
|
||||
|
||||
/obj/item/storage/belt/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(content_overlays)
|
||||
for(var/obj/item/I in contents)
|
||||
add_overlay(I.get_belt_overlay())
|
||||
AddOverlays(I.get_belt_overlay())
|
||||
..()
|
||||
|
||||
/obj/item/storage/belt/build_additional_parts(H, mob_icon, slot)
|
||||
@@ -44,7 +44,7 @@
|
||||
var/image/belt_item_image = image(c_icon, c_state)
|
||||
belt_item_image.color = i.color
|
||||
belt_item_image.appearance_flags = RESET_ALPHA
|
||||
I.add_overlay(belt_item_image)
|
||||
I.AddOverlays(belt_item_image)
|
||||
return I
|
||||
|
||||
/obj/item/storage/belt/verb/toggle_layer()
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
if(ispath(src.trash))
|
||||
desc_info += "This can be crumpled up into a trash item when empty, or forcibly crumpled on harm intent. "
|
||||
if(illustration)
|
||||
add_overlay(illustration)
|
||||
AddOverlays(illustration)
|
||||
|
||||
/obj/item/storage/box/proc/damage(var/severity)
|
||||
health -= severity
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
can_hold = list(/obj/item/paper/business_card)
|
||||
|
||||
/obj/item/storage/business_card_holder/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
var/overlay_type
|
||||
if(length(contents))
|
||||
var/obj/O = contents[1]
|
||||
@@ -22,7 +22,7 @@
|
||||
card_overlay.color = O.color
|
||||
else
|
||||
card_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(card_overlay)
|
||||
AddOverlays(card_overlay)
|
||||
|
||||
/obj/item/storage/business_card_holder/wood
|
||||
icon_state = "holder_wood"
|
||||
@@ -44,8 +44,8 @@
|
||||
/obj/item/paper/business_card/update_icon()
|
||||
. = ..()
|
||||
if(worn_overlay)
|
||||
cut_overlays()
|
||||
add_overlay(overlay_image(icon, worn_overlay, flags=RESET_COLOR))
|
||||
ClearOverlays()
|
||||
AddOverlays(overlay_image(icon, worn_overlay, flags=RESET_COLOR))
|
||||
|
||||
/obj/item/paper/business_card/attack_self(mob/living/user)
|
||||
if(last_flash <= world.time - 20)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
icon_state = "[initial(icon_state)][src.opened]"
|
||||
..()
|
||||
else
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
icon_state = "[initial(icon_state)]" // closed
|
||||
..()
|
||||
|
||||
@@ -102,10 +102,10 @@
|
||||
/obj/item/storage/box/fancy/donut/update_icon() // One of the few unique update_icon()s, due to having to store both regular and sprinkled donuts.
|
||||
. = ..()
|
||||
if(opened)
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
var/i = 0
|
||||
for(var/obj/item/reagent_containers/food/snacks/donut/D in contents)
|
||||
add_overlay("[i][D.overlay_state]")
|
||||
AddOverlays("[i][D.overlay_state]")
|
||||
i++
|
||||
|
||||
/obj/item/storage/box/fancy/donut/empty
|
||||
@@ -221,10 +221,10 @@
|
||||
|
||||
/obj/item/storage/box/fancy/crayons/update_icon()
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
add_overlay("crayonbox")
|
||||
ClearOverlays()
|
||||
AddOverlays("crayonbox")
|
||||
for(var/obj/item/pen/crayon/crayon in contents)
|
||||
add_overlay("[crayon.colourName]")
|
||||
AddOverlays("[crayon.colourName]")
|
||||
|
||||
/obj/item/storage/box/fancy/crayons/attackby(obj/item/attacking_item, mob/user)
|
||||
if(istype(attacking_item, /obj/item/pen/crayon))
|
||||
@@ -467,13 +467,13 @@
|
||||
. = ..()
|
||||
var/total_contents = src.contents.len - itemremoved
|
||||
src.icon_state = "vialbox[total_contents]"
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if (!broken)
|
||||
add_overlay("led[locked]")
|
||||
AddOverlays("led[locked]")
|
||||
if(locked)
|
||||
add_overlay("cover")
|
||||
AddOverlays("cover")
|
||||
else
|
||||
add_overlay("ledb")
|
||||
AddOverlays("ledb")
|
||||
|
||||
/obj/item/storage/lockbox/vials/attackby(attacking_item, mob/user)
|
||||
..()
|
||||
@@ -527,7 +527,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/pizzabox/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
|
||||
// Set appropriate description
|
||||
if( open && pizza )
|
||||
@@ -555,7 +555,7 @@
|
||||
if( pizza )
|
||||
var/image/pizzaimg = image(pizza.icon, pizza.icon_state)
|
||||
pizzaimg.pixel_y = -2
|
||||
add_overlay(pizzaimg)
|
||||
AddOverlays(pizzaimg)
|
||||
|
||||
return
|
||||
else
|
||||
@@ -572,7 +572,7 @@
|
||||
if( doimgtag )
|
||||
var/image/tagimg = image(icon, icon_state = "pizzabox_tag")
|
||||
tagimg.pixel_y = boxes.len * 3
|
||||
add_overlay(tagimg)
|
||||
AddOverlays(tagimg)
|
||||
|
||||
icon_state = "pizzabox[boxes.len+1]"
|
||||
|
||||
|
||||
@@ -105,15 +105,15 @@
|
||||
src.l_set = 1
|
||||
else if ((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
|
||||
src.locked = 0
|
||||
cut_overlays()
|
||||
add_overlay(icon_opened)
|
||||
ClearOverlays()
|
||||
AddOverlays(icon_opened)
|
||||
src.code = null
|
||||
else
|
||||
src.code = "ERROR"
|
||||
else
|
||||
if ((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort))
|
||||
src.locked = 1
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
src.code = null
|
||||
src.close(usr)
|
||||
else
|
||||
@@ -130,10 +130,10 @@
|
||||
/obj/item/storage/secure/emag_act(var/remaining_charges, var/mob/user, var/feedback)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
add_overlay(icon_sparking)
|
||||
AddOverlays(icon_sparking)
|
||||
sleep(6)
|
||||
cut_overlays()
|
||||
add_overlay(icon_locking)
|
||||
ClearOverlays()
|
||||
AddOverlays(icon_locking)
|
||||
locked = 0
|
||||
to_chat(user, (feedback ? feedback : "You short out the lock of \the [src]."))
|
||||
return 1
|
||||
|
||||
@@ -360,12 +360,12 @@
|
||||
ND.sample_object.maptext = SMALL_FONTS(7, "[(ND.number > 1)? "[ND.number]" : ""]")
|
||||
ND.sample_object.hud_layerise()
|
||||
if(display_contents_initials)
|
||||
ND.sample_object.cut_overlays() // a limitation of this code is that overlays get blasted off the item, since we need to add one to add the second maptext. woe is me
|
||||
ND.sample_object.ClearOverlays() // a limitation of this code is that overlays get blasted off the item, since we need to add one to add the second maptext. woe is me
|
||||
var/object_initials = handle_name_initials(ND.sample_object.name)
|
||||
var/image/name_overlay = image(null)
|
||||
name_overlay.maptext = SMALL_FONTS(7, object_initials)
|
||||
name_overlay.maptext_x = 22 - ((length(object_initials) - 1) * 6)
|
||||
ND.sample_object.add_overlay(name_overlay)
|
||||
ND.sample_object.AddOverlays(name_overlay)
|
||||
cx++
|
||||
if (cx > (4+cols))
|
||||
cx = 4
|
||||
@@ -395,7 +395,7 @@
|
||||
var/stored_cap_width = 4 //length of sprite for start and end of the box representing the stored item
|
||||
var/storage_width = min( round( 224 * max_storage_space/baseline_max_storage_space ,1) ,284) //length of sprite for the box representing total storage space
|
||||
|
||||
storage_start.cut_overlays()
|
||||
storage_start.ClearOverlays()
|
||||
|
||||
var/matrix/M = matrix()
|
||||
M.Scale((storage_width-storage_cap_width*2+3)/32,1)
|
||||
@@ -439,7 +439,7 @@
|
||||
O.hud_layerise()
|
||||
|
||||
if (!defer_overlays)
|
||||
storage_start.compile_overlays()
|
||||
storage_start.UpdateOverlays()
|
||||
|
||||
closer.screen_loc = "4:[storage_width+19],2:16"
|
||||
return
|
||||
@@ -654,7 +654,7 @@
|
||||
if(W.maptext)
|
||||
W.maptext = ""
|
||||
if(display_contents_initials)
|
||||
W.cut_overlays()
|
||||
W.ClearOverlays()
|
||||
W.on_exit_storage(src)
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/wallet/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
worn_overlay = "fasteners"
|
||||
if(front_id)
|
||||
if(("[icon_state]-open") in icon_states(icon))
|
||||
@@ -89,10 +89,10 @@
|
||||
if(("[initial(icon_state)]-[front_id.icon_state]") in icon_states(icon))
|
||||
tiny_state = "[initial(icon_state)]-[front_id.icon_state]"
|
||||
var/image/tiny_image = overlay_image(icon, icon_state = tiny_state, flags = RESET_COLOR)
|
||||
add_overlay(tiny_image)
|
||||
AddOverlays(tiny_image)
|
||||
if(("[initial(icon_state)]-film") in icon_states(icon))
|
||||
var/image/film_image = overlay_image(icon, "[initial(icon_state)]-film", flags = RESET_COLOR)
|
||||
add_overlay(film_image)
|
||||
AddOverlays(film_image)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
. = ..()
|
||||
@@ -205,16 +205,16 @@
|
||||
. = ..()
|
||||
if(("[initial(icon_state)]-film") in icon_states(icon))
|
||||
var/image/film_image = overlay_image(icon, "[initial(icon_state)]-film", flags = RESET_COLOR)
|
||||
add_overlay(film_image)
|
||||
AddOverlays(film_image)
|
||||
|
||||
/obj/item/storage/wallet/lanyard/get_mob_overlay(mob/living/carbon/human/H, mob_icon, mob_state, slot)
|
||||
var/image/I = ..()
|
||||
if(front_id)
|
||||
I.add_overlay(image('icons/mob/lanyard_overlays.dmi', icon_state = "lanyard-[front_id_overlay_state]"))
|
||||
I.AddOverlays(image('icons/mob/lanyard_overlays.dmi', icon_state = "lanyard-[front_id_overlay_state]"))
|
||||
else
|
||||
if(!plastic_film)
|
||||
plastic_film = image('icons/mob/lanyard_overlays.dmi', icon_state = "[plastic_film_overlay_state]")
|
||||
I.add_overlay(plastic_film)
|
||||
I.AddOverlays(plastic_film)
|
||||
return I
|
||||
|
||||
// wallet subtypes
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
if(!cable_color)
|
||||
cable_color = COLOR_RED
|
||||
I.color = cable_color
|
||||
add_overlay(I)
|
||||
AddOverlays(I)
|
||||
|
||||
/obj/item/melee/baton/stunrod
|
||||
name = "stunrod"
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
)
|
||||
|
||||
/obj/item/storage/box/fancy/tray/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
|
||||
var/list/types_and_overlays = list(
|
||||
/obj/item/surgery/bonesetter = "tray_bonesetter",
|
||||
@@ -248,7 +248,7 @@
|
||||
)
|
||||
for (var/obj/item/W in contents)
|
||||
if (types_and_overlays[W.type])
|
||||
add_overlay(types_and_overlays[W.type])
|
||||
AddOverlays(types_and_overlays[W.type])
|
||||
types_and_overlays -= W.type
|
||||
|
||||
/obj/item/storage/box/fancy/tray/fill()
|
||||
|
||||
@@ -77,13 +77,13 @@
|
||||
add_fingerprint(user)
|
||||
|
||||
if(blood_overlay && blood_DNA && (blood_DNA.len >= 1)) //updates blood overlay, if any
|
||||
cut_overlay(blood_overlay, TRUE)
|
||||
CutOverlays(blood_overlay, ATOM_ICON_CACHE_PROTECTED)
|
||||
var/icon/I = new /icon(src.icon, src.icon_state)
|
||||
I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD)
|
||||
I.Blend(new /icon('icons/effects/blood.dmi', "itemblood"),ICON_MULTIPLY)
|
||||
blood_overlay = image(I)
|
||||
blood_overlay.color = blood_color
|
||||
add_overlay(blood_overlay, TRUE)
|
||||
AddOverlays(blood_overlay, ATOM_ICON_CACHE_PROTECTED)
|
||||
update_icon()
|
||||
|
||||
return
|
||||
|
||||
@@ -226,9 +226,9 @@
|
||||
return
|
||||
|
||||
last_gauge_pressure = gauge_pressure
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
// SSoverlay will handle icon caching.
|
||||
add_overlay("[gauge_icon][(gauge_pressure == -1) ? "overload" : gauge_pressure]")
|
||||
AddOverlays("[gauge_icon][(gauge_pressure == -1) ? "overload" : gauge_pressure]")
|
||||
|
||||
/obj/item/tank/proc/percent()
|
||||
var/gauge_pressure = 0
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
. = ..()
|
||||
if(build_from_parts) //random colors!
|
||||
color = pick(COLOR_BLUE, COLOR_RED, COLOR_PURPLE, COLOR_BROWN, COLOR_GREEN, COLOR_CYAN, COLOR_YELLOW)
|
||||
add_overlay(overlay_image(icon, "[initial(icon_state)]_[worn_overlay]", flags=RESET_COLOR))
|
||||
AddOverlays(overlay_image(icon, "[initial(icon_state)]_[worn_overlay]", flags=RESET_COLOR))
|
||||
|
||||
/obj/item/screwdriver/update_icon()
|
||||
var/matrix/tf = matrix()
|
||||
@@ -88,7 +88,7 @@
|
||||
var/mutable_appearance/body = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver")
|
||||
var/mutable_appearance/head = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver_head")
|
||||
body.color = color
|
||||
head.add_overlay(body)
|
||||
head.AddOverlays(body)
|
||||
return head
|
||||
|
||||
/obj/item/screwdriver/pickup(mob/user)
|
||||
@@ -153,7 +153,7 @@
|
||||
. = ..()
|
||||
if(build_from_parts)
|
||||
color = pick(color_options)
|
||||
add_overlay(overlay_image(icon, "[initial(icon_state)]_[worn_overlay]", flags=RESET_COLOR))
|
||||
AddOverlays(overlay_image(icon, "[initial(icon_state)]_[worn_overlay]", flags=RESET_COLOR))
|
||||
|
||||
/obj/item/wirecutters/update_icon()
|
||||
var/matrix/tf = matrix()
|
||||
@@ -166,7 +166,7 @@
|
||||
var/mutable_appearance/body = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "wirecutters")
|
||||
var/mutable_appearance/head = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "wirecutters_head")
|
||||
body.color = color
|
||||
head.add_overlay(body)
|
||||
head.AddOverlays(body)
|
||||
return head
|
||||
|
||||
/obj/item/wirecutters/pickup(mob/user)
|
||||
@@ -306,13 +306,13 @@
|
||||
/obj/item/weldingtool/use_tool(atom/target, mob/living/user, delay, amount, volume, datum/callback/extra_checks)
|
||||
var/image/welding_sparks = image('icons/effects/effects.dmi', welding_state)
|
||||
welding_sparks.plane = EFFECTS_ABOVE_LIGHTING_PLANE
|
||||
target.add_overlay(welding_sparks)
|
||||
target.AddOverlays(welding_sparks)
|
||||
. = ..()
|
||||
target.cut_overlay(welding_sparks)
|
||||
target.CutOverlays(welding_sparks)
|
||||
|
||||
/obj/item/weldingtool/proc/update_torch()
|
||||
if(welding)
|
||||
add_overlay("[initial(icon_state)]-on")
|
||||
AddOverlays("[initial(icon_state)]-on")
|
||||
item_state = "[initial(item_state)]1"
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
@@ -325,11 +325,11 @@
|
||||
set_light(0)
|
||||
|
||||
/obj/item/weldingtool/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(change_icons)
|
||||
var/ratio = get_fuel() / max_fuel
|
||||
ratio = CEILING(ratio*4, 1) * 25
|
||||
add_overlay("[initial(icon_state)][ratio]")
|
||||
AddOverlays("[initial(icon_state)][ratio]")
|
||||
update_torch()
|
||||
var/mob/M = loc
|
||||
if(istype(M))
|
||||
@@ -582,7 +582,7 @@
|
||||
to_chat(user, SPAN_NOTICE("You install \the [attacking_item] into \the [src]."))
|
||||
eyeshield = attacking_item
|
||||
produces_flash = FALSE
|
||||
add_overlay("eyeshield_attached", TRUE)
|
||||
AddOverlays("eyeshield_attached", ATOM_ICON_CACHE_PROTECTED)
|
||||
return TRUE
|
||||
if(istype(attacking_item, /obj/item/overcapacitor))
|
||||
if(overcap)
|
||||
@@ -591,7 +591,7 @@
|
||||
user.drop_from_inventory(attacking_item, src)
|
||||
to_chat(user, SPAN_NOTICE("You install \the [attacking_item] into \the [src]."))
|
||||
overcap = attacking_item
|
||||
add_overlay("overcap_attached", TRUE)
|
||||
AddOverlays("overcap_attached", ATOM_ICON_CACHE_PROTECTED)
|
||||
toolspeed *= 2
|
||||
return TRUE
|
||||
if(attacking_item.isscrewdriver())
|
||||
@@ -619,7 +619,7 @@
|
||||
return TRUE
|
||||
user.put_in_hands(remove_accessory)
|
||||
to_chat(user, SPAN_NOTICE("You remove \the [remove_accessory] into \the [src]."))
|
||||
cut_overlay("[remove_accessory.icon_state]_attached", TRUE)
|
||||
CutOverlays("[remove_accessory.icon_state]_attached", ATOM_ICON_CACHE_PROTECTED)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
@@ -1005,7 +1005,7 @@
|
||||
. = ..()
|
||||
var/mutable_appearance/handle = mutable_appearance('icons/obj/tools.dmi', "hammer_handle")
|
||||
handle.color = pick(COLOR_BLUE, COLOR_RED, COLOR_PURPLE, COLOR_BROWN, COLOR_GREEN, COLOR_CYAN, COLOR_YELLOW)
|
||||
add_overlay(handle)
|
||||
AddOverlays(handle)
|
||||
|
||||
/obj/item/hammer/ishammer()
|
||||
return TRUE
|
||||
|
||||
@@ -357,20 +357,20 @@ GLOBAL_LIST_EMPTY(total_active_bonfires)
|
||||
name = "[material.display_name] fireplace"
|
||||
|
||||
/obj/structure/bonfire/fireplace/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(on_fire)
|
||||
switch(fuel)
|
||||
if(0 to 250)
|
||||
add_overlay("fireplace_fire0")
|
||||
AddOverlays("fireplace_fire0")
|
||||
if(251 to 750)
|
||||
add_overlay("fireplace_fire1")
|
||||
AddOverlays("fireplace_fire1")
|
||||
if(751 to 1200)
|
||||
add_overlay("fireplace_fire2")
|
||||
AddOverlays("fireplace_fire2")
|
||||
if(1201 to 1700)
|
||||
add_overlay("fireplace_fire3")
|
||||
AddOverlays("fireplace_fire3")
|
||||
if(1700 to 2000)
|
||||
add_overlay("fireplace_fire4")
|
||||
add_overlay("fireplace_glow")
|
||||
AddOverlays("fireplace_fire4")
|
||||
AddOverlays("fireplace_glow")
|
||||
|
||||
/obj/structure/bonfire/fireplace/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(!istype(mover) || mover.checkpass(PASSTABLE))
|
||||
|
||||
@@ -58,10 +58,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/coatrack/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(coat)
|
||||
if(is_type_in_list(coat, custom_sprites))
|
||||
add_overlay(coat.icon_state)
|
||||
AddOverlays(coat.icon_state)
|
||||
else if(istype(coat, /obj/item/clothing/suit/storage/toggle)) // Using onmob sprites, because they're more consistent than object sprites.
|
||||
var/obj/item/clothing/suit/storage/toggle/T = coat
|
||||
if(!T.opened)
|
||||
@@ -73,7 +73,7 @@
|
||||
handle_coat_image(T)
|
||||
if(hat)
|
||||
if(is_type_in_list(hat, custom_sprites))
|
||||
add_overlay(hat.icon_state)
|
||||
AddOverlays(hat.icon_state)
|
||||
else if(istype(hat, /obj/item/clothing/head))
|
||||
var/obj/item/clothing/head/H = hat
|
||||
var/matrix/M = matrix()
|
||||
@@ -82,15 +82,15 @@
|
||||
var/hat_icon_state = "[H.icon_state][WORN_HEAD]" // Needed to bypass contained sprite phoney baloney.
|
||||
hat_image = image(H.icon, hat_icon_state, src.layer, EAST)
|
||||
if(H.build_from_parts)
|
||||
hat_image.add_overlay(overlay_image(H.icon, "[H.icon_state]_[H.worn_overlay]", flags=RESET_COLOR))
|
||||
hat_image.AddOverlays(overlay_image(H.icon, "[H.icon_state]_[H.worn_overlay]", flags=RESET_COLOR))
|
||||
else
|
||||
hat_image = image(INV_HEAD_DEF_ICON, H.icon_state, src.layer, EAST)
|
||||
if(H.build_from_parts)
|
||||
hat_image.add_overlay(overlay_image(icon, "[INV_HEAD_DEF_ICON]_[H.worn_overlay]", flags=RESET_COLOR))
|
||||
hat_image.AddOverlays(overlay_image(icon, "[INV_HEAD_DEF_ICON]_[H.worn_overlay]", flags=RESET_COLOR))
|
||||
M.Turn(90) // Flip the hat over and stick it on the coatrack.
|
||||
M.Translate(-6, 6)
|
||||
hat_image.transform = M
|
||||
add_overlay(hat_image)
|
||||
AddOverlays(hat_image)
|
||||
|
||||
/obj/structure/coatrack/proc/handle_coat_image(var/obj/item/clothing/T)
|
||||
var/icon/coat_outline = icon('icons/obj/coatrack.dmi', "outline")
|
||||
@@ -115,8 +115,8 @@
|
||||
overlay_icon.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0)) // Slice the overlay in half and slap it on the coat.
|
||||
var/image/overlay_image = image(overlay_icon)
|
||||
overlay_image.appearance_flags = RESET_COLOR
|
||||
coat_image.add_overlay(overlay_image)
|
||||
coat_image.AddOverlays(overlay_image)
|
||||
|
||||
M.Translate(-1, 5) // Stick it on the coat rack.
|
||||
coat_image.transform = M
|
||||
add_overlay(coat_image)
|
||||
AddOverlays(coat_image)
|
||||
|
||||
@@ -546,21 +546,21 @@
|
||||
|
||||
/obj/structure/closet/update_icon()
|
||||
if(!door_underlay)
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
|
||||
if(!opened)
|
||||
layer = OBJ_LAYER
|
||||
if(welded)
|
||||
add_overlay("[icon_door_overlay]welded")
|
||||
AddOverlays("[icon_door_overlay]welded")
|
||||
if(!is_animating_door)
|
||||
if(icon_door)
|
||||
add_overlay("[icon_door]_door")
|
||||
AddOverlays("[icon_door]_door")
|
||||
if(double_doors)
|
||||
add_overlay("[icon_door]_door_alt")
|
||||
AddOverlays("[icon_door]_door_alt")
|
||||
if(!icon_door)
|
||||
add_overlay("[icon_state]_door")
|
||||
AddOverlays("[icon_state]_door")
|
||||
if(double_doors)
|
||||
add_overlay("[icon_state]_door_alt")
|
||||
AddOverlays("[icon_state]_door_alt")
|
||||
if(secure)
|
||||
update_secure_overlays()
|
||||
if(secure && secure_lights)
|
||||
@@ -568,18 +568,18 @@
|
||||
else if(opened)
|
||||
layer = BELOW_OBJ_LAYER
|
||||
if(!is_animating_door)
|
||||
add_overlay("[icon_door_override ? icon_door : icon_state]_open")
|
||||
AddOverlays("[icon_door_override ? icon_door : icon_state]_open")
|
||||
if(secure && secure_lights)
|
||||
update_secure_overlays()
|
||||
|
||||
/obj/structure/closet/proc/update_secure_overlays()
|
||||
if(broken)
|
||||
add_overlay("[icon_door_overlay]emag")
|
||||
AddOverlays("[icon_door_overlay]emag")
|
||||
else
|
||||
if(locked)
|
||||
add_overlay("[icon_door_overlay]locked")
|
||||
AddOverlays("[icon_door_overlay]locked")
|
||||
else
|
||||
add_overlay("[icon_door_overlay]unlocked")
|
||||
AddOverlays("[icon_door_overlay]unlocked")
|
||||
|
||||
/obj/structure/closet/proc/animate_door(var/closing = FALSE)
|
||||
if(!door_anim_time)
|
||||
@@ -610,7 +610,7 @@
|
||||
is_animating_door = FALSE // comment this out and the line below to manually tweak the animation end state by fiddling with the door_anim vars to match the open door icon
|
||||
remove_vis_contents(door_obj)
|
||||
update_icon()
|
||||
compile_overlays(src)
|
||||
UpdateOverlays(src)
|
||||
|
||||
/obj/structure/closet/proc/animate_door_alt(var/closing = FALSE)
|
||||
if(!door_anim_time)
|
||||
@@ -641,7 +641,7 @@
|
||||
is_animating_door = FALSE // comment this out and the line below to manually tweak the animation end state by fiddling with the door_anim vars to match the open door icon
|
||||
remove_vis_contents(door_obj_alt)
|
||||
update_icon()
|
||||
compile_overlays(src)
|
||||
UpdateOverlays(src)
|
||||
|
||||
/obj/structure/closet/proc/get_door_transform(angle, var/inverse_hinge = FALSE)
|
||||
var/matrix/M = matrix()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/secure_closet/guncabinet/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
var/lazors = 0
|
||||
var/shottas = 0
|
||||
for (var/obj/item/gun/G in contents)
|
||||
@@ -36,10 +36,10 @@
|
||||
for (var/i = 0 to 2)
|
||||
if (lazors > 0 && (shottas <= 0 || prob(50)))
|
||||
lazors--
|
||||
add_overlay("laser[i]")
|
||||
AddOverlays("laser[i]")
|
||||
else if (shottas > 0)
|
||||
shottas--
|
||||
add_overlay("projectile[i]")
|
||||
AddOverlays("projectile[i]")
|
||||
. = ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/guncabinet/sci
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
if(!broken)
|
||||
spark(src, 5)
|
||||
desc += " It appears to be broken."
|
||||
add_overlay("[icon_door_overlay]sparking")
|
||||
AddOverlays("[icon_door_overlay]sparking")
|
||||
CUT_OVERLAY_IN("[icon_door_overlay]sparking", 6)
|
||||
playsound(loc, /singleton/sound_category/spark_sound, 60, 1)
|
||||
broken = TRUE
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
dir = L.dir
|
||||
var/image/I
|
||||
I = image(icon = 'icons/obj/statue.dmi', icon_state = "icecube")
|
||||
add_overlay(I)
|
||||
AddOverlays(I)
|
||||
|
||||
/obj/structure/closet/statue/ice/shatter(mob/user as mob)
|
||||
if (user)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
desc = replacetext(desc, "chemical", lowertext(initial(reagent_id.name)))
|
||||
var/mutable_appearance/crystal_overlay = mutable_appearance(icon, "[initial(icon_state)]-overlay")
|
||||
crystal_overlay.color = initial(reagent_id.color)
|
||||
add_overlay(crystal_overlay)
|
||||
AddOverlays(crystal_overlay)
|
||||
if(our_creator)
|
||||
creator = our_creator
|
||||
|
||||
|
||||
@@ -76,16 +76,16 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(has_extinguisher)
|
||||
if(istype(has_extinguisher, /obj/item/extinguisher/mini))
|
||||
add_overlay("extinguisher_mini")
|
||||
AddOverlays("extinguisher_mini")
|
||||
else
|
||||
add_overlay("extinguisher_full")
|
||||
AddOverlays("extinguisher_full")
|
||||
if(opened)
|
||||
add_overlay("cabinet_door_open")
|
||||
AddOverlays("cabinet_door_open")
|
||||
else
|
||||
add_overlay("cabinet_door_closed")
|
||||
AddOverlays("cabinet_door_closed")
|
||||
|
||||
/obj/structure/extinguisher_cabinet/do_simple_ranged_interaction(var/mob/user)
|
||||
if(has_extinguisher)
|
||||
|
||||
@@ -46,19 +46,19 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/fireaxecabinet/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(fireaxe)
|
||||
add_overlay("axe")
|
||||
AddOverlays("axe")
|
||||
if(shattered)
|
||||
add_overlay("glass4")
|
||||
AddOverlays("glass4")
|
||||
if(unlocked)
|
||||
add_overlay("unlocked")
|
||||
AddOverlays("unlocked")
|
||||
else
|
||||
add_overlay("locked")
|
||||
AddOverlays("locked")
|
||||
if(open)
|
||||
add_overlay("glass_raised")
|
||||
AddOverlays("glass_raised")
|
||||
else
|
||||
add_overlay("glass")
|
||||
AddOverlays("glass")
|
||||
|
||||
|
||||
/obj/structure/fireaxecabinet/New()
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
topple()
|
||||
|
||||
/obj/structure/hadii_statue/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(toppled)
|
||||
icon_state = "[initial(icon_state)]_toppled"
|
||||
return
|
||||
if(outside)
|
||||
add_overlay("snow")
|
||||
AddOverlays("snow")
|
||||
|
||||
/obj/structure/hadii_statue/ex_act(severity)
|
||||
switch(severity)
|
||||
|
||||
@@ -331,30 +331,30 @@
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/structure/janitorialcart/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
has_items = 0
|
||||
if(mybucket)
|
||||
add_overlay("cart_bucket")
|
||||
AddOverlays("cart_bucket")
|
||||
has_items = 1
|
||||
if(mybucket.reagents.total_volume > 0)
|
||||
add_overlay("cart_water")
|
||||
AddOverlays("cart_water")
|
||||
if(mybag)
|
||||
add_overlay("cart_garbage")
|
||||
AddOverlays("cart_garbage")
|
||||
has_items = 1
|
||||
if(mymop)
|
||||
add_overlay("cart_mop")
|
||||
AddOverlays("cart_mop")
|
||||
has_items = 1
|
||||
if(myspray)
|
||||
add_overlay("cart_spray")
|
||||
AddOverlays("cart_spray")
|
||||
has_items = 1
|
||||
if(myreplacer)
|
||||
if (istype(myreplacer, /obj/item/device/lightreplacer/advanced))
|
||||
add_overlay("cart_adv_lightreplacer")
|
||||
AddOverlays("cart_adv_lightreplacer")
|
||||
else
|
||||
add_overlay("cart_replacer")
|
||||
AddOverlays("cart_replacer")
|
||||
has_items = 1
|
||||
if(signs)
|
||||
add_overlay("cart_sign[signs]")
|
||||
AddOverlays("cart_sign[signs]")
|
||||
has_items = 1
|
||||
|
||||
//Shamelessly copied from wheelchair code
|
||||
|
||||
@@ -31,17 +31,17 @@
|
||||
if(!istype(victim))
|
||||
return
|
||||
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(istype(victim, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
if(!issmall(H))
|
||||
return 0
|
||||
meat_type = H.species.meat_type
|
||||
add_overlay(overlay_image(icon, "spikebloody"))
|
||||
AddOverlays(overlay_image(icon, "spikebloody"))
|
||||
else if(istype(victim, /mob/living/carbon/alien))
|
||||
var/mob/living/carbon/alien/A = victim
|
||||
meat_type = A.meat_type
|
||||
add_overlay(overlay_image(icon, "spikebloodygreen"))
|
||||
AddOverlays(overlay_image(icon, "spikebloodygreen"))
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
/obj/structure/lattice/catwalk/indoor/grate/old/Initialize()
|
||||
. = ..()
|
||||
add_overlay("rust")
|
||||
AddOverlays("rust")
|
||||
|
||||
/obj/structure/lattice/catwalk/indoor/grate/damaged
|
||||
icon_state = "grate_dark_dam0"
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
/obj/structure/lattice/catwalk/indoor/grate/light/old/Initialize()
|
||||
. = ..()
|
||||
add_overlay("rust")
|
||||
AddOverlays("rust")
|
||||
|
||||
/obj/structure/lattice/catwalk/indoor/grate/light/damaged
|
||||
icon_state = "grate_light_dam0"
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
/obj/structure/utility_pole/street/on/Initialize(mapload)
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
overlays += /obj/effect/overlay/street_light
|
||||
return
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
/obj/structure/utility_pole/street/classic/on/Initialize(mapload)
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
overlays += /obj/effect/overlay/street_light/classic
|
||||
return
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
/obj/structure/utility_pole/street/crosswalk/Initialize(mapload)
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
overlays += /obj/effect/overlay/street_light/crosswalk
|
||||
return
|
||||
|
||||
@@ -119,13 +119,13 @@
|
||||
|
||||
/obj/structure/utility_pole/street/traffic/base/Initialize(mapload)
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
overlays += /obj/effect/overlay/street_light/traffic
|
||||
return
|
||||
|
||||
/obj/structure/utility_pole/street/traffic/inverted/Initialize(mapload)
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
overlays += /obj/effect/overlay/street_light/traffic/inverted
|
||||
return
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/mopbucket/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(reagents.total_volume > 0)
|
||||
add_overlay("mopbucket_water")
|
||||
AddOverlays("mopbucket_water")
|
||||
|
||||
/obj/structure/mopbucket/on_reagent_change()
|
||||
. = ..()
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
var/image/plasticflaps_overlay = overlay_image(icon, "plasticflaps_overlay", null, RESET_COLOR)
|
||||
if(dir == WEST || dir == EAST)
|
||||
plasticflaps_overlay.pixel_y = -13
|
||||
add_overlay(plasticflaps_overlay)
|
||||
AddOverlays(plasticflaps_overlay)
|
||||
|
||||
/obj/structure/plasticflaps/Destroy()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(airtight)
|
||||
clear_airtight()
|
||||
. = ..()
|
||||
|
||||
@@ -97,12 +97,12 @@ FLOOR SAFES
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
cut_overlay(drill_overlay)
|
||||
CutOverlays(drill_overlay)
|
||||
if(istype(drill, /obj/item/thermal_drill))
|
||||
var/drill_icon = istype(drill, /obj/item/thermal_drill/diamond_drill) ? "d" : "h"
|
||||
var/state = "[initial(icon_state)]_[drill_icon]-drill-[(datum_flags & DF_ISPROCESSING) ? "on" : "off"]"
|
||||
drill_overlay = image(icon = 'icons/effects/drill.dmi', icon_state = state, pixel_x = drill_x_offset, pixel_y = drill_y_offset)
|
||||
add_overlay(drill_overlay)
|
||||
AddOverlays(drill_overlay)
|
||||
|
||||
/obj/structure/safe/attack_hand(mob/user as mob)
|
||||
if(drill)
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
generate_strings()
|
||||
// Prep icon.
|
||||
icon_state = ""
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
// Base icon.
|
||||
|
||||
generate_overlay_cache(material) //Generate base icon cache
|
||||
@@ -105,7 +105,7 @@
|
||||
else if(overlay_material.icon_colour) // Either that, or just fall back on the regular material color.
|
||||
I.color = overlay_material.icon_colour
|
||||
furniture_cache[cache_key] = I
|
||||
add_overlay(furniture_cache[cache_key]) // Use image from cache key!
|
||||
AddOverlays(furniture_cache[cache_key]) // Use image from cache key!
|
||||
|
||||
/obj/structure/bed/proc/generate_strings()
|
||||
if(material_alteration & MATERIAL_ALTERATION_NAME)
|
||||
@@ -390,7 +390,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/roller/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
vis_contents = list()
|
||||
if(density)
|
||||
if(anchored)
|
||||
@@ -404,15 +404,15 @@
|
||||
var/percentage = round((beaker.reagents.total_volume / beaker.volume) * 100, 25)
|
||||
var/image/filling = image(icon, "iv_filling[percentage]")
|
||||
filling.color = beaker.reagents.get_color()
|
||||
iv.add_overlay(filling)
|
||||
iv.AddOverlays(filling)
|
||||
if(percentage < 25)
|
||||
iv.add_overlay(image(icon, "light_low"))
|
||||
iv.AddOverlays(image(icon, "light_low"))
|
||||
if(density)
|
||||
iv.pixel_y = 7
|
||||
add_overlay(iv)
|
||||
AddOverlays(iv)
|
||||
if(has_iv_light)
|
||||
var/image/light = image(icon, "iv[iv_attached]_l")
|
||||
add_overlay(light)
|
||||
AddOverlays(light)
|
||||
if(vitals)
|
||||
vitals.update_monitor()
|
||||
add_vis_contents(vitals)
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
|
||||
/obj/item/material/stool/update_icon()
|
||||
icon_state = "[base_icon]_item"
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(padding_material) // Handles padding overlay and inhand overlays.
|
||||
var/image/padding_overlay = image(icon, "[base_icon]_item_padding")
|
||||
padding_overlay.appearance_flags = RESET_COLOR
|
||||
@@ -255,7 +255,7 @@
|
||||
else if(padding_material.icon_colour)
|
||||
padding_overlay.color = padding_material.icon_colour
|
||||
worn_overlay_color = padding_material.icon_colour
|
||||
add_overlay(padding_overlay)
|
||||
AddOverlays(padding_overlay)
|
||||
else
|
||||
build_from_parts = FALSE
|
||||
update_held_icon()
|
||||
|
||||
@@ -28,17 +28,17 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/dispenser/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
switch(oxygen_tanks)
|
||||
if(1 to 4)
|
||||
add_overlay("oxygen-[oxygen_tanks]")
|
||||
AddOverlays("oxygen-[oxygen_tanks]")
|
||||
if(5 to INFINITY)
|
||||
add_overlay("oxygen-5")
|
||||
AddOverlays("oxygen-5")
|
||||
switch(phoron_tanks)
|
||||
if(1 to 4)
|
||||
add_overlay("phoron-[phoron_tanks]")
|
||||
AddOverlays("phoron-[phoron_tanks]")
|
||||
if(5 to INFINITY)
|
||||
add_overlay("phoron-5")
|
||||
AddOverlays("phoron-5")
|
||||
|
||||
/obj/structure/dispenser/attack_ai(mob/user)
|
||||
if(user.Adjacent(src))
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
/obj/structure/undies_wardrobe/Initialize(mapload)
|
||||
. = ..()
|
||||
add_overlay("cabinet_door")
|
||||
add_overlay("cabinet_door_alt")
|
||||
AddOverlays("cabinet_door")
|
||||
AddOverlays("cabinet_door_alt")
|
||||
|
||||
/obj/structure/undies_wardrobe/attack_hand(var/mob/user)
|
||||
if(!human_who_can_use_underwear(user))
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/obj/structure/automobile/random/Initialize(mapload)
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
name = "[pick("deluxe Shibata Sport automotive","beat-up Poplar Auto Group automotive","weathered Shibata Sport automotive","beat-up Langenfeld automotive","deluxe Langenfeld automotive","weathered Langenfeld automotive")]"
|
||||
desc = "A [name] vehicle of working condition."
|
||||
icon_state = "car[rand(1, 10)]"
|
||||
@@ -449,7 +449,7 @@
|
||||
|
||||
/obj/structure/sign/billboard/advert/random/Initialize(mapload)
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
icon_state = "sign[rand(1, 14)]"
|
||||
return
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(H.old_mob)
|
||||
to_chat(H, SPAN_WARNING("The chair rejects you! You cannot recursively control bodies."))
|
||||
return
|
||||
add_overlay(image('icons/obj/furniture.dmi', src, "vr_helmet", FLY_LAYER))
|
||||
AddOverlays(image('icons/obj/furniture.dmi', src, "vr_helmet", FLY_LAYER))
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
|
||||
@@ -64,6 +64,6 @@
|
||||
var/mob/M = buckled
|
||||
if(istype(M) && M.vr_mob)
|
||||
M.vr_mob.body_return()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
..()
|
||||
|
||||
@@ -185,13 +185,13 @@
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/machinery/shower/update_icon() //this is terribly unreadable, but basically it makes the shower mist up
|
||||
cut_overlays() //once it's been on for a while, in addition to handling the water overlay.
|
||||
ClearOverlays() //once it's been on for a while, in addition to handling the water overlay.
|
||||
if(mymist)
|
||||
qdel(mymist)
|
||||
|
||||
if(on)
|
||||
soundloop.start(src)
|
||||
add_overlay(image('icons/obj/watercloset.dmi', src, "water", MOB_LAYER + 1, dir))
|
||||
AddOverlays(image('icons/obj/watercloset.dmi', src, "water", MOB_LAYER + 1, dir))
|
||||
if(temperature_settings[watertemp] < T20C)
|
||||
return //no mist for cold water
|
||||
if(!ismist)
|
||||
|
||||
@@ -104,12 +104,12 @@
|
||||
updateSilicate()
|
||||
|
||||
/obj/structure/window/proc/updateSilicate()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
|
||||
var/image/img = image(icon, icon_state)
|
||||
img.color = "#ffffff"
|
||||
img.alpha = silicate * 255 / 100
|
||||
add_overlay(img)
|
||||
AddOverlays(img)
|
||||
|
||||
/obj/structure/window/proc/shatter(var/display_message = 1)
|
||||
playsound(src, /singleton/sound_category/glass_break_sound, 70, 1)
|
||||
|
||||
Reference in New Issue
Block a user