mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
[MIRROR] update_appearance (#3508)
* update_appearance * a * a Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com> Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
This commit is contained in:
co-authored by
TemporalOroboros
Gandalf2k15
parent
3f106caf48
commit
18eca27569
@@ -87,7 +87,7 @@
|
||||
..()
|
||||
if(iscarbon(AM) && blood_state && bloodiness > 0)
|
||||
SEND_SIGNAL(AM, COMSIG_STEP_ON_BLOOD, src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/effect/decal/cleanable/wash(clean_types)
|
||||
. = ..()
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
icon_state = "" //All of the footprint visuals come from overlays
|
||||
if(mapload)
|
||||
entered_dirs |= dir //Keep the same appearance as in the map editor
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
//Rotate all of the footprint directions too
|
||||
/obj/effect/decal/cleanable/blood/footprints/setDir(newdir)
|
||||
@@ -196,25 +196,27 @@
|
||||
if(old_exited_dirs & Ddir)
|
||||
exited_dirs |= angle2dir_cardinal(dir2angle(Ddir) + ang_change)
|
||||
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/update_icon()
|
||||
cut_overlays()
|
||||
. = ..()
|
||||
alpha = min(BLOODY_FOOTPRINT_BASE_ALPHA + (255 - BLOODY_FOOTPRINT_BASE_ALPHA) * bloodiness / (BLOOD_ITEM_MAX / 2), 255)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/update_overlays()
|
||||
. = ..()
|
||||
for(var/Ddir in GLOB.cardinals)
|
||||
if(entered_dirs & Ddir)
|
||||
var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["entered-[blood_state]-[Ddir]"]
|
||||
if(!bloodstep_overlay)
|
||||
GLOB.bloody_footprints_cache["entered-[blood_state]-[Ddir]"] = bloodstep_overlay = image(icon, "[blood_state]1", dir = Ddir)
|
||||
add_overlay(bloodstep_overlay)
|
||||
. += bloodstep_overlay
|
||||
|
||||
if(exited_dirs & Ddir)
|
||||
var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["exited-[blood_state]-[Ddir]"]
|
||||
if(!bloodstep_overlay)
|
||||
GLOB.bloody_footprints_cache["exited-[blood_state]-[Ddir]"] = bloodstep_overlay = image(icon, "[blood_state]2", dir = Ddir)
|
||||
add_overlay(bloodstep_overlay)
|
||||
|
||||
alpha = min(BLOODY_FOOTPRINT_BASE_ALPHA + (255 - BLOODY_FOOTPRINT_BASE_ALPHA) * bloodiness / (BLOOD_ITEM_MAX / 2), 255)
|
||||
. += bloodstep_overlay
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/examine(mob/user)
|
||||
|
||||
@@ -330,7 +330,7 @@
|
||||
for(var/obj/machinery/atmospherics/components/unary/U in O)
|
||||
if(!U.welded)
|
||||
U.welded = TRUE
|
||||
U.update_icon()
|
||||
U.update_appearance()
|
||||
U.visible_message("<span class='danger'>[U] sealed shut!</span>")
|
||||
for(var/mob/living/L in O)
|
||||
L.extinguish_mob()
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
for(var/obj/machinery/atmospherics/components/unary/U in T)
|
||||
if(!isnull(U.welded) && !U.welded) //must be an unwelded vent pump or vent scrubber.
|
||||
U.welded = TRUE
|
||||
U.update_icon()
|
||||
U.update_appearance()
|
||||
U.visible_message("<span class='danger'>[U] is frozen shut!</span>")
|
||||
for(var/mob/living/L in T)
|
||||
L.extinguish_mob()
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
V.attached_device = A
|
||||
A.holder = V
|
||||
|
||||
V.update_icon()
|
||||
V.update_appearance()
|
||||
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
|
||||
@@ -480,22 +480,26 @@
|
||||
status = rcd_status
|
||||
delay = rcd_delay
|
||||
if (status == RCD_DECONSTRUCT)
|
||||
addtimer(CALLBACK(src, /atom/.proc/update_icon), 11)
|
||||
addtimer(CALLBACK(src, /atom/.proc/update_appearance), 1.1 SECONDS)
|
||||
delay -= 11
|
||||
icon_state = "rcd_end_reverse"
|
||||
else
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/effect/constructing_effect/update_icon_state()
|
||||
icon_state = "rcd"
|
||||
if (delay < 10)
|
||||
if(delay < 10)
|
||||
icon_state += "_shortest"
|
||||
else if (delay < 20)
|
||||
return ..()
|
||||
if (delay < 20)
|
||||
icon_state += "_shorter"
|
||||
else if (delay < 37)
|
||||
return ..()
|
||||
if (delay < 37)
|
||||
icon_state += "_short"
|
||||
if (status == RCD_DECONSTRUCT)
|
||||
return ..()
|
||||
if(status == RCD_DECONSTRUCT)
|
||||
icon_state += "_reverse"
|
||||
return ..()
|
||||
|
||||
/obj/effect/constructing_effect/proc/end_animation()
|
||||
if (status == RCD_DECONSTRUCT)
|
||||
|
||||
@@ -111,7 +111,7 @@ RLD
|
||||
loaded = loadwithsheets(O, user)
|
||||
if(loaded)
|
||||
to_chat(user, "<span class='notice'>[src] now holds [matter]/[max_matter] matter-units.</span>")
|
||||
update_icon() //ensures that ammo counters (if present) get updated
|
||||
update_appearance() //ensures that ammo counters (if present) get updated
|
||||
return loaded
|
||||
|
||||
/obj/item/construction/proc/loadwithsheets(obj/item/stack/S, mob/user)
|
||||
@@ -145,7 +145,7 @@ RLD
|
||||
to_chat(user, no_ammo_message)
|
||||
return FALSE
|
||||
matter -= amount
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return TRUE
|
||||
else
|
||||
if(silo_mats.on_hold())
|
||||
@@ -674,7 +674,7 @@ RLD
|
||||
|
||||
/obj/item/construction/rcd/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/construction/rcd/borg
|
||||
no_ammo_message = "<span class='warning'>Insufficient charge.</span>"
|
||||
@@ -825,6 +825,7 @@ RLD
|
||||
|
||||
/obj/item/construction/rld/update_icon_state()
|
||||
icon_state = "rld-[round(matter/matter_divisor)]"
|
||||
return ..()
|
||||
|
||||
/obj/item/construction/rld/attack_self(mob/user)
|
||||
..()
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
loaded.amount += transfer_amount
|
||||
else
|
||||
return
|
||||
update_icon()
|
||||
update_appearance()
|
||||
to_chat(user, "<span class='notice'>You add the pipe cleaners to [src]. It now contains [loaded.amount].</span>")
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(!loaded)
|
||||
@@ -96,7 +96,7 @@
|
||||
loaded.forceMove(get_turf(user))
|
||||
|
||||
loaded = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
if(!loaded)
|
||||
icon_state = "rcl-0"
|
||||
inhand_icon_state = "rcl-0"
|
||||
return
|
||||
return ..()
|
||||
switch(loaded.amount)
|
||||
if(61 to INFINITY)
|
||||
icon_state = "rcl-30"
|
||||
@@ -130,9 +130,10 @@
|
||||
else
|
||||
icon_state = "rcl-0"
|
||||
inhand_icon_state = "rcl-0"
|
||||
return ..()
|
||||
|
||||
/obj/item/rcl/proc/is_empty(mob/user, loud = 1)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(!loaded || !loaded.amount)
|
||||
if(loud)
|
||||
to_chat(user, "<span class='notice'>The last of the pipe cleaners unreel from [src].</span>")
|
||||
@@ -211,10 +212,10 @@
|
||||
else
|
||||
last = null
|
||||
loaded.color = GLOB.pipe_cleaner_colors[colors[current_color_index]]
|
||||
loaded.update_icon()
|
||||
loaded.update_appearance()
|
||||
last = loaded.place_turf(get_turf(src), user, turn(user.dir, 180))
|
||||
is_empty(user) //If we've run out, display message
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
|
||||
//searches the current tile for a stub pipe_cleaner of the same colour
|
||||
@@ -285,7 +286,7 @@
|
||||
return
|
||||
|
||||
loaded.color = GLOB.pipe_cleaner_colors[colors[current_color_index]]
|
||||
loaded.update_icon()
|
||||
loaded.update_appearance()
|
||||
|
||||
var/obj/structure/pipe_cleaner/linkingCable = findLinkingCable(user)
|
||||
if(linkingCable)
|
||||
@@ -304,11 +305,11 @@
|
||||
loaded = new()
|
||||
loaded.max_amount = max_amount
|
||||
loaded.amount = max_amount
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/rcl/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/rcl/ui_action_click(mob/user, action)
|
||||
if(istype(action, /datum/action/item_action/rcl_col))
|
||||
@@ -319,7 +320,7 @@
|
||||
to_chat(user, "Color changed to [cwname]!")
|
||||
if(loaded)
|
||||
loaded.color = GLOB.pipe_cleaner_colors[colors[current_color_index]]
|
||||
loaded.update_icon()
|
||||
loaded.update_appearance()
|
||||
if(wiring_gui_menu)
|
||||
wiringGuiUpdate(user)
|
||||
else if(istype(action, /datum/action/item_action/rcl_gui))
|
||||
@@ -338,7 +339,7 @@
|
||||
if(!loaded)
|
||||
icon_state = "rclg-0"
|
||||
inhand_icon_state = "rclg-0"
|
||||
return
|
||||
return ..()
|
||||
switch(loaded.amount)
|
||||
if(1 to INFINITY)
|
||||
icon_state = "rclg-1"
|
||||
@@ -346,3 +347,4 @@
|
||||
else
|
||||
icon_state = "rclg-1"
|
||||
inhand_icon_state = "rclg-1"
|
||||
return ..()
|
||||
|
||||
@@ -490,7 +490,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
activate()
|
||||
|
||||
C.add_fingerprint(usr)
|
||||
C.update_icon()
|
||||
C.update_appearance()
|
||||
if(mode & WRENCH_MODE)
|
||||
C.wrench_act(user, src)
|
||||
return
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
desc = "This is my BROOMSTICK! It can be used manually or braced with two hands to sweep items as you move. It has a telescopic handle for compact storage."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "broom0"
|
||||
base_icon_state = "broom"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
|
||||
force = 8
|
||||
@@ -24,10 +25,11 @@
|
||||
|
||||
/obj/item/pushbroom/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12, icon_wielded="broom1")
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12, icon_wielded="[base_icon_state]1")
|
||||
|
||||
/obj/item/pushbroom/update_icon_state()
|
||||
icon_state = "broom0"
|
||||
icon_state = "[base_icon_state]0"
|
||||
return ..()
|
||||
|
||||
/**
|
||||
* Handles registering the sweep proc when the broom is wielded
|
||||
@@ -90,7 +92,7 @@
|
||||
break
|
||||
if(i > 1)
|
||||
if (target_bin)
|
||||
target_bin.update_icon()
|
||||
target_bin.update_appearance()
|
||||
to_chat(user, "<span class='notice'>You sweep the pile of garbage into [target_bin].</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 30, TRUE, -1)
|
||||
|
||||
@@ -104,7 +106,7 @@
|
||||
/obj/item/pushbroom/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J) //bless you whoever fixes this copypasta
|
||||
J.put_in_cart(src, user)
|
||||
J.mybroom=src
|
||||
J.update_icon()
|
||||
J.update_appearance()
|
||||
|
||||
/obj/item/pushbroom/cyborg
|
||||
name = "robotic push broom"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
/obj/item/candle/update_icon_state()
|
||||
icon_state = "candle[(wax > 800) ? ((wax > 1500) ? 1 : 2) : 3][lit ? "_lit" : ""]"
|
||||
return ..()
|
||||
|
||||
/obj/item/candle/attackby(obj/item/W, mob/user, params)
|
||||
var/msg = W.ignition_effect(src, user)
|
||||
@@ -45,13 +46,13 @@
|
||||
usr.visible_message(show_message)
|
||||
set_light(CANDLE_LUMINOSITY)
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/candle/proc/put_out_candle()
|
||||
if(!lit)
|
||||
return
|
||||
lit = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
set_light(0)
|
||||
return TRUE
|
||||
|
||||
@@ -67,7 +68,7 @@
|
||||
if(wax <= 0)
|
||||
new /obj/item/trash/candle(loc)
|
||||
qdel(src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
open_flame()
|
||||
|
||||
/obj/item/candle/attack_self(mob/user)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/obj/item/card/data/Initialize()
|
||||
.=..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/card/data/update_overlays()
|
||||
. = ..()
|
||||
@@ -309,7 +309,7 @@
|
||||
var/obj/item/storage/wallet/powergaming = loc
|
||||
if(powergaming.front_id == src)
|
||||
powergaming.update_label()
|
||||
powergaming.update_icon()
|
||||
powergaming.update_appearance()
|
||||
|
||||
/obj/item/card/id/proc/get_cached_flat_icon()
|
||||
if(!cached_flat_icon)
|
||||
@@ -331,7 +331,7 @@ update_label()
|
||||
/obj/item/card/id/proc/update_label()
|
||||
var/blank = !registered_name
|
||||
name = "[blank ? id_type_name : "[registered_name]'s ID Card"][(!assignment) ? "" : " ([assignment])"]"
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/card/id/silver
|
||||
name = "silver identification card"
|
||||
@@ -509,7 +509,7 @@ update_label()
|
||||
/obj/item/card/id/captains_spare/update_label() //so it doesn't change to Captain's ID card (Captain) on a sneeze
|
||||
if(registered_name == "Captain")
|
||||
name = "[id_type_name][(!assignment || assignment == "Captain") ? "" : " ([assignment])"]"
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
cached_icon.Insert(mob_icon, "frame[i]")
|
||||
|
||||
mob_underlay = mutable_appearance(cached_icon, "frame1")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
desc = initial(desc) + "<br><span class='info'>It appears to contain [target.name].</span>"
|
||||
START_PROCESSING(SSobj, src)
|
||||
@@ -200,7 +200,8 @@
|
||||
gun.field_disconnect(src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/chrono_field/update_icon()
|
||||
/obj/structure/chrono_field/update_overlays()
|
||||
. = ..()
|
||||
var/ttk_frame = 1 - (timetokill / initial(timetokill))
|
||||
ttk_frame = clamp(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
|
||||
if(ttk_frame != RPpos)
|
||||
@@ -229,7 +230,7 @@
|
||||
captured.Unconscious(80)
|
||||
if(captured.loc != src)
|
||||
captured.forceMove(src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(gun)
|
||||
if(gun.field_check(src))
|
||||
timetokill -= delta_time
|
||||
|
||||
@@ -52,7 +52,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
attack_verb_continuous = string_list(list("burns", "sings"))
|
||||
attack_verb_simple = string_list(list("burn", "sing"))
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/match/proc/matchburnout()
|
||||
if(lit)
|
||||
@@ -643,7 +643,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
. = ..()
|
||||
if(!overlay_state)
|
||||
overlay_state = pick(overlay_list)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/lighter/cyborg_unequip(mob/user)
|
||||
if(!lit)
|
||||
@@ -665,6 +665,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
|
||||
/obj/item/lighter/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][lit ? "-on" : ""]"
|
||||
return ..()
|
||||
|
||||
/obj/item/lighter/proc/create_lighter_overlay()
|
||||
return mutable_appearance(icon, "lighter_overlay_[overlay_state][lit ? "-on" : ""]")
|
||||
@@ -691,7 +692,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
attack_verb_simple = null
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
set_light_on(lit)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/lighter/extinguish()
|
||||
set_lit(FALSE)
|
||||
@@ -790,7 +791,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
. = ..()
|
||||
if(!lighter_color)
|
||||
lighter_color = pick(color_list)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/lighter/greyscale/create_lighter_overlay()
|
||||
var/mutable_appearance/lighter_overlay = ..()
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
if(has_cap && user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
|
||||
is_capped = !is_capped
|
||||
to_chat(user, "<span class='notice'>The cap on [src] is now [is_capped ? "on" : "off"].</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/toy/crayon/CtrlClick(mob/user)
|
||||
if(can_change_colour && !isturf(loc) && user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
|
||||
@@ -257,7 +257,7 @@
|
||||
. = TRUE
|
||||
paint_mode = PAINT_NORMAL
|
||||
drawtype = "a"
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/toy/crayon/proc/select_colour(mob/user)
|
||||
var/chosen_colour = input(user, "", "Choose Color", paint_color) as color|null
|
||||
@@ -605,7 +605,7 @@
|
||||
new /obj/item/toy/crayon/blue(src)
|
||||
new /obj/item/toy/crayon/purple(src)
|
||||
new /obj/item/toy/crayon/black(src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/crayons/update_overlays()
|
||||
. = ..()
|
||||
@@ -685,7 +685,7 @@
|
||||
playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 5)
|
||||
if(can_change_colour)
|
||||
paint_color = "#C0C0C0"
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(actually_paints)
|
||||
H.update_lips("spray_face", paint_color)
|
||||
var/used = use_charges(user, 10, FALSE)
|
||||
@@ -700,7 +700,7 @@
|
||||
paint_color = pick("#DA0000","#FF9300","#FFF200","#A8E61D","#00B7EF",
|
||||
"#DA00FF")
|
||||
refill()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
|
||||
/obj/item/toy/crayon/spraycan/examine(mob/user)
|
||||
@@ -769,6 +769,7 @@
|
||||
|
||||
/obj/item/toy/crayon/spraycan/update_icon_state()
|
||||
icon_state = is_capped ? icon_capped : icon_uncapped
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/crayon/spraycan/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "A hard-light chip encoded with an amount of credits. It is a modern replacement for physical money that can be directly converted to virtual currency and viceversa. Keep away from magnets."
|
||||
icon = 'icons/obj/economy.dmi'
|
||||
icon_state = "holochip"
|
||||
base_icon_state = "holochip"
|
||||
throwforce = 0
|
||||
force = 0
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
@@ -11,7 +12,7 @@
|
||||
/obj/item/holochip/Initialize(mapload, amount)
|
||||
. = ..()
|
||||
credits = amount
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/holochip/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -21,21 +22,36 @@
|
||||
/obj/item/holochip/get_item_credit_value()
|
||||
return credits
|
||||
|
||||
/obj/item/holochip/update_icon()
|
||||
/obj/item/holochip/update_name()
|
||||
name = "\improper [credits] credit holochip"
|
||||
var/rounded_credits = credits
|
||||
return ..()
|
||||
|
||||
/obj/item/holochip/update_icon_state()
|
||||
var/icon_suffix = ""
|
||||
switch(credits)
|
||||
if(1 to 999)
|
||||
icon_state = "holochip"
|
||||
if(1000 to 999999)
|
||||
icon_state = "holochip_kilo"
|
||||
rounded_credits = round(rounded_credits * 0.001)
|
||||
if(1000000 to 999999999)
|
||||
icon_state = "holochip_mega"
|
||||
rounded_credits = round(rounded_credits * 0.000001)
|
||||
if(1000000000 to INFINITY)
|
||||
icon_state = "holochip_giga"
|
||||
rounded_credits = round(rounded_credits * 0.000000001)
|
||||
if(1e3 to (1e6 - 1))
|
||||
icon_suffix = "_kilo"
|
||||
if(1e6 to (1e9 - 1))
|
||||
icon_suffix = "_mega"
|
||||
if(1e9 to INFINITY)
|
||||
icon_suffix = "_giga"
|
||||
|
||||
icon_state = "[base_icon_state][icon_suffix]"
|
||||
return ..()
|
||||
|
||||
/obj/item/holochip/update_overlays()
|
||||
. = ..()
|
||||
var/rounded_credits
|
||||
switch(credits)
|
||||
if(0 to (1e3 - 1))
|
||||
rounded_credits = round(credits)
|
||||
if(1e3 to (1e6 - 1))
|
||||
rounded_credits = round(credits * 1e-3)
|
||||
if(1e6 to (1e9 - 1))
|
||||
rounded_credits = round(credits * 1e-6)
|
||||
if(1e9 to INFINITY)
|
||||
rounded_credits = round(credits * 1e-9)
|
||||
|
||||
var/overlay_color = "#914792"
|
||||
switch(rounded_credits)
|
||||
if(0 to 4)
|
||||
@@ -54,17 +70,17 @@
|
||||
overlay_color = "#0153C1"
|
||||
if(500 to INFINITY)
|
||||
overlay_color = "#2C2C2C"
|
||||
cut_overlays()
|
||||
|
||||
var/mutable_appearance/holochip_overlay = mutable_appearance('icons/obj/economy.dmi', "[icon_state]-color")
|
||||
holochip_overlay.color = overlay_color
|
||||
add_overlay(holochip_overlay)
|
||||
. += holochip_overlay
|
||||
|
||||
/obj/item/holochip/proc/spend(amount, pay_anyway = FALSE)
|
||||
if(credits >= amount)
|
||||
credits -= amount
|
||||
if(credits == 0)
|
||||
qdel(src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return amount
|
||||
else if(pay_anyway)
|
||||
qdel(src)
|
||||
@@ -78,7 +94,7 @@
|
||||
var/obj/item/holochip/H = I
|
||||
credits += H.credits
|
||||
to_chat(user, "<span class='notice'>You insert the credits into [src].</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
qdel(H)
|
||||
|
||||
/obj/item/holochip/AltClick(mob/user)
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
powered = TRUE
|
||||
else
|
||||
powered = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/defibrillator/update_overlays()
|
||||
. = ..()
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(cell)
|
||||
cell.update_icon()
|
||||
cell.update_appearance()
|
||||
cell.forceMove(get_turf(src))
|
||||
cell = null
|
||||
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
|
||||
@@ -232,7 +232,7 @@
|
||||
visible_message("<span class='notice'>[src] beeps: Charge depleted.</span>")
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE)
|
||||
paddles.cooldown = FALSE
|
||||
paddles.update_icon()
|
||||
paddles.update_appearance()
|
||||
update_power()
|
||||
|
||||
/obj/item/defibrillator/compact
|
||||
@@ -360,13 +360,13 @@
|
||||
if(req_defib || !time)
|
||||
return
|
||||
cooldown = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
sleep(time)
|
||||
var/turf/T = get_turf(src)
|
||||
T.audible_message("<span class='notice'>[src] beeps: Unit is recharged.</span>")
|
||||
playsound(src, 'sound/machines/defib_ready.ogg', 50, FALSE)
|
||||
cooldown = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/shockpaddles/Initialize()
|
||||
. = ..()
|
||||
@@ -379,7 +379,7 @@
|
||||
return INITIALIZE_HINT_QDEL
|
||||
defib = loc
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/shockpaddles/suicide_act(mob/user)
|
||||
user.visible_message("<span class='danger'>[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -393,6 +393,7 @@
|
||||
inhand_icon_state = icon_state
|
||||
if(cooldown)
|
||||
icon_state = "[base_icon_state][wielded]_cooldown"
|
||||
return ..()
|
||||
|
||||
/obj/item/shockpaddles/dropped(mob/user)
|
||||
. = ..()
|
||||
@@ -484,7 +485,7 @@
|
||||
defib.deductcharge(revivecost)
|
||||
cooldown = TRUE
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(req_defib)
|
||||
defib.cooldowncheck(user)
|
||||
else
|
||||
@@ -498,7 +499,7 @@
|
||||
user.visible_message("<span class='warning'>[user] begins to place [src] on [H]'s chest.</span>",
|
||||
"<span class='warning'>You overcharge the paddles and begin to place them onto [H]'s chest...</span>")
|
||||
busy = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(do_after(user, 1.5 SECONDS, H))
|
||||
user.visible_message("<span class='notice'>[user] places [src] on [H]'s chest.</span>",
|
||||
"<span class='warning'>You place [src] on [H]'s chest and begin to charge them.</span>")
|
||||
@@ -511,13 +512,13 @@
|
||||
if(do_after(user, 1.5 SECONDS, H)) //Takes longer due to overcharging
|
||||
if(!H)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
if(H && H.stat == DEAD)
|
||||
to_chat(user, "<span class='warning'>[H] is dead.</span>")
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
user.visible_message("<span class='boldannounce'><i>[user] shocks [H] with \the [src]!</span>", "<span class='warning'>You shock [H] with \the [src]!</span>")
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', 100, TRUE, -1)
|
||||
@@ -537,18 +538,18 @@
|
||||
defib.deductcharge(revivecost)
|
||||
cooldown = TRUE
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(!req_defib)
|
||||
recharge(60)
|
||||
if(req_defib && (defib.cooldowncheck(user)))
|
||||
return
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/shockpaddles/proc/do_help(mob/living/carbon/H, mob/living/user)
|
||||
user.visible_message("<span class='warning'>[user] begins to place [src] on [H]'s chest.</span>", "<span class='warning'>You begin to place [src] on [H]'s chest...</span>")
|
||||
busy = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(do_after(user, 3 SECONDS, H)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
|
||||
user.visible_message("<span class='notice'>[user] places [src] on [H]'s chest.</span>", "<span class='warning'>You place [src] on [H]'s chest.</span>")
|
||||
playsound(src, 'sound/machines/defib_charge.ogg', 75, FALSE)
|
||||
@@ -560,7 +561,7 @@
|
||||
user.audible_message("<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Patient's chest is obscured. Operation aborted.</span>")
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
if(H.stat == DEAD)
|
||||
H.visible_message("<span class='warning'>[H]'s body convulses a bit.</span>")
|
||||
@@ -621,7 +622,7 @@
|
||||
if(req_defib)
|
||||
defib.deductcharge(revivecost)
|
||||
cooldown = 1
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(req_defib)
|
||||
defib.cooldowncheck(user)
|
||||
else
|
||||
@@ -641,7 +642,7 @@
|
||||
user.visible_message("<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Patient is not in a valid state. Operation aborted.</span>")
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/shockpaddles/cyborg
|
||||
name = "cyborg defibrillator paddles"
|
||||
|
||||
@@ -117,7 +117,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
else
|
||||
inserted_item = new /obj/item/pen(src)
|
||||
RegisterSignal(src, COMSIG_LIGHT_EATER_ACT, .proc/on_light_eater)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/pda/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
@@ -318,7 +318,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if (pai)
|
||||
if(pai.loc != src)
|
||||
pai = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else
|
||||
dat += "<li><a href='byond://?src=[REF(src)];choice=pai;option=1'>pAI Device Configuration</a></li>"
|
||||
dat += "<li><a href='byond://?src=[REF(src)];choice=pai;option=2'>Eject pAI Device</a></li>"
|
||||
@@ -670,7 +670,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
//EXTRA FUNCTIONS===================================
|
||||
|
||||
if (mode == 2 || mode == 21)//To clear message overlays.
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
if ((honkamt > 0) && (prob(60)))//For clown virus.
|
||||
honkamt--
|
||||
@@ -701,7 +701,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
. = id
|
||||
id = null
|
||||
updateSelfDialog()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
playsound(src, 'sound/machines/terminal_eject.ogg', 50, TRUE)
|
||||
|
||||
if(ishuman(loc))
|
||||
@@ -817,7 +817,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
|
||||
to_chat(L, "<span class='infoplain'>[icon2html(src)] <b>PDA message from [hrefstart][signal.data["name"]] ([signal.data["job"]])[hrefend], </b>[inbound_message] [reply]</span>")
|
||||
|
||||
update_icon()
|
||||
update_appearance()
|
||||
add_overlay(icon_alert)
|
||||
|
||||
/obj/item/pda/proc/send_to_all(mob/living/U)
|
||||
@@ -887,7 +887,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
set_light_on(FALSE)
|
||||
else if(light_range)
|
||||
set_light_on(TRUE)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
@@ -910,7 +910,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
user.put_in_hands(inserted_item)
|
||||
to_chat(user, "<span class='notice'>You remove [inserted_item] from [src].</span>")
|
||||
inserted_item = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
playsound(src, 'sound/machines/pda_button2.ogg', 50, TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This PDA does not have a pen in it!</span>")
|
||||
@@ -925,7 +925,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
cartridge.host_pda = null
|
||||
cartridge = null
|
||||
updateSelfDialog()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
//trying to insert or remove an id
|
||||
/obj/item/pda/proc/id_check(mob/user, obj/item/card/id/I)
|
||||
@@ -942,7 +942,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return FALSE
|
||||
insert_id(I, user)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE)
|
||||
return TRUE
|
||||
|
||||
@@ -995,7 +995,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
cartridge.host_pda = src
|
||||
to_chat(user, "<span class='notice'>You insert [cartridge] into [src].</span>")
|
||||
updateSelfDialog()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE)
|
||||
|
||||
else if(istype(C, /obj/item/card/id))
|
||||
@@ -1025,7 +1025,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
return
|
||||
pai = C
|
||||
to_chat(user, "<span class='notice'>You slot \the [C] into [src].</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
updateUsrDialog()
|
||||
else if(is_type_in_list(C, contained_item)) //Checks if there is a pen
|
||||
if(inserted_item)
|
||||
@@ -1035,7 +1035,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You slide \the [C] into \the [src].</span>")
|
||||
inserted_item = C
|
||||
update_icon()
|
||||
update_appearance()
|
||||
playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE)
|
||||
else if(istype(C, /obj/item/photo))
|
||||
var/obj/item/photo/P = C
|
||||
|
||||
@@ -38,20 +38,21 @@
|
||||
target.transfer_ai(AI_TRANS_TO_CARD, user, null, src)
|
||||
if(AI)
|
||||
log_combat(user, AI, "carded", src)
|
||||
update_icon() //Whatever happened, update the card's state (icon, name) to match.
|
||||
update_appearance() //Whatever happened, update the card's state (icon, name) to match.
|
||||
|
||||
/obj/item/aicard/update_icon_state()
|
||||
if(!AI)
|
||||
name = initial(name)
|
||||
icon_state = initial(icon_state)
|
||||
return
|
||||
return ..()
|
||||
name = "[initial(name)] - [AI.name]"
|
||||
icon_state = "[initial(icon_state)][AI.stat == DEAD ? "-404" : "-full"]"
|
||||
AI.cancel_camera()
|
||||
return ..()
|
||||
|
||||
/obj/item/aicard/update_overlays()
|
||||
. = ..()
|
||||
if(!AI || AI.control_disabled)
|
||||
if(!AI?.control_disabled)
|
||||
return
|
||||
. += "[initial(icon_state)]-on"
|
||||
|
||||
@@ -105,4 +106,4 @@
|
||||
AI.radio_enabled = !AI.radio_enabled
|
||||
to_chat(AI, "<span class='warning'>Your Subspace Transceiver has been [AI.radio_enabled ? "enabled" : "disabled"]!</span>")
|
||||
. = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
@@ -458,6 +458,7 @@
|
||||
light_system = MOVABLE_LIGHT
|
||||
color = LIGHT_COLOR_GREEN
|
||||
icon_state = "glowstick"
|
||||
base_icon_state = "glowstick"
|
||||
inhand_icon_state = "glowstick"
|
||||
worn_icon_state = "lightstick"
|
||||
grind_results = list(/datum/reagent/phenol = 15, /datum/reagent/hydrogen = 10, /datum/reagent/oxygen = 5) //Meth-in-a-stick
|
||||
@@ -481,28 +482,35 @@
|
||||
if(fuel <= 0)
|
||||
turn_off()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/flashlight/glowstick/proc/turn_off()
|
||||
on = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/flashlight/glowstick/update_icon()
|
||||
inhand_icon_state = "glowstick"
|
||||
cut_overlays()
|
||||
/obj/item/flashlight/glowstick/update_appearance(updates=ALL)
|
||||
. = ..()
|
||||
if(fuel <= 0)
|
||||
icon_state = "glowstick-empty"
|
||||
cut_overlays()
|
||||
set_light_on(FALSE)
|
||||
else if(on)
|
||||
var/mutable_appearance/glowstick_overlay = mutable_appearance(icon, "glowstick-glow")
|
||||
glowstick_overlay.color = color
|
||||
add_overlay(glowstick_overlay)
|
||||
inhand_icon_state = "glowstick-on"
|
||||
return
|
||||
if(on)
|
||||
set_light_on(TRUE)
|
||||
else
|
||||
icon_state = "glowstick"
|
||||
cut_overlays()
|
||||
return
|
||||
|
||||
/obj/item/flashlight/glowstick/update_icon_state()
|
||||
icon_state = "[base_icon_state][(fuel <= 0) ? "-empty" : ""]"
|
||||
inhand_icon_state = "[base_icon_state][((fuel > 0) && on) ? "-on" : ""]"
|
||||
return ..()
|
||||
|
||||
/obj/item/flashlight/glowstick/update_overlays()
|
||||
. = ..()
|
||||
if(fuel <= 0 && !on)
|
||||
return
|
||||
|
||||
var/mutable_appearance/glowstick_overlay = mutable_appearance(icon, "glowstick-glow")
|
||||
glowstick_overlay.color = color
|
||||
. += glowstick_overlay
|
||||
|
||||
|
||||
/obj/item/flashlight/glowstick/attack_self(mob/user)
|
||||
if(fuel <= 0)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
current_tick_amount = 0
|
||||
|
||||
update_icon()
|
||||
update_appearance()
|
||||
update_sound()
|
||||
|
||||
/obj/item/geiger_counter/examine(mob/user)
|
||||
@@ -83,22 +83,25 @@
|
||||
/obj/item/geiger_counter/update_icon_state()
|
||||
if(!scanning)
|
||||
icon_state = "geiger_off"
|
||||
else if(obj_flags & EMAGGED)
|
||||
return ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
icon_state = "geiger_on_emag"
|
||||
else
|
||||
switch(radiation_count)
|
||||
if(-INFINITY to RAD_LEVEL_NORMAL)
|
||||
icon_state = "geiger_on_1"
|
||||
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
|
||||
icon_state = "geiger_on_2"
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
|
||||
icon_state = "geiger_on_3"
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
|
||||
icon_state = "geiger_on_5"
|
||||
return ..()
|
||||
|
||||
switch(radiation_count)
|
||||
if(-INFINITY to RAD_LEVEL_NORMAL)
|
||||
icon_state = "geiger_on_1"
|
||||
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
|
||||
icon_state = "geiger_on_2"
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
|
||||
icon_state = "geiger_on_3"
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
|
||||
icon_state = "geiger_on_5"
|
||||
return ..()
|
||||
|
||||
/obj/item/geiger_counter/proc/update_sound()
|
||||
var/datum/looping_sound/geiger/loop = soundloop
|
||||
@@ -116,11 +119,11 @@
|
||||
if(amount <= RAD_BACKGROUND_RADIATION || !scanning)
|
||||
return
|
||||
current_tick_amount += amount
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/geiger_counter/attack_self(mob/user)
|
||||
scanning = !scanning
|
||||
update_icon()
|
||||
update_appearance()
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] You switch [scanning ? "on" : "off"] [src].</span>")
|
||||
|
||||
/obj/item/geiger_counter/afterattack(atom/target, mob/living/user, params)
|
||||
@@ -161,7 +164,7 @@
|
||||
user.visible_message("<span class='notice'>[user] refastens [src]'s maintenance panel!</span>", "<span class='notice'>You reset [src] to its factory settings!</span>")
|
||||
obj_flags &= ~EMAGGED
|
||||
radiation_count = 0
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
@@ -174,7 +177,7 @@
|
||||
return
|
||||
radiation_count = 0
|
||||
to_chat(usr, "<span class='notice'>You flush [src]'s radiation counts, resetting it to normal.</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/geiger_counter/emag_act(mob/user)
|
||||
if(obj_flags & EMAGGED)
|
||||
@@ -194,7 +197,7 @@
|
||||
if(!scanning)
|
||||
return
|
||||
scanning = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/geiger_counter/cyborg/equipped(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -155,6 +155,7 @@
|
||||
|
||||
/obj/item/lightreplacer/update_icon_state()
|
||||
icon_state = "lightreplacer[(obj_flags & EMAGGED ? 1 : 0)]"
|
||||
return ..()
|
||||
|
||||
/obj/item/lightreplacer/proc/status_string()
|
||||
return "It has [uses] light\s remaining (plus [bulb_shards] fragment\s)."
|
||||
@@ -226,7 +227,7 @@
|
||||
name = "shortcircuited [initial(name)]"
|
||||
else
|
||||
name = initial(name)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/lightreplacer/proc/CanUse(mob/living/user)
|
||||
src.add_fingerprint(user)
|
||||
@@ -256,7 +257,7 @@
|
||||
/obj/item/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.put_in_cart(src, user)
|
||||
J.myreplacer = src
|
||||
J.update_icon()
|
||||
J.update_appearance()
|
||||
|
||||
/obj/item/lightreplacer/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
return
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
if(eye.eye_user)
|
||||
eye.setLoc(get_turf(src))
|
||||
multitool_detect()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
track_cooldown = world.time + track_delay
|
||||
|
||||
/obj/item/multitool/ai_detect/proc/toggle_hud(mob/user)
|
||||
|
||||
@@ -21,18 +21,18 @@
|
||||
/obj/item/paicard/Initialize()
|
||||
SSpai.pai_card_list += src
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/paicard/vv_edit_var(vname, vval)
|
||||
. = ..()
|
||||
if(vname == NAMEOF(src, emotion_icon))
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/paicard/handle_atom_del(atom/A)
|
||||
if(A == pai) //double check /mob/living/silicon/pai/Destroy() if you change these.
|
||||
pai = null
|
||||
emotion_icon = initial(emotion_icon)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return ..()
|
||||
|
||||
/obj/item/paicard/update_overlays()
|
||||
@@ -153,7 +153,7 @@
|
||||
/obj/item/paicard/proc/setPersonality(mob/living/silicon/pai/personality)
|
||||
pai = personality
|
||||
emotion_icon = "null"
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
playsound(loc, 'sound/effects/pai_boot.ogg', 50, TRUE, -1)
|
||||
audible_message("\The [src] plays a cheerful startup noise!")
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(!user.transferItemToLoc(B, src))
|
||||
return
|
||||
replace_beaker(user, B)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
updateUsrDialog()
|
||||
return
|
||||
return ..()
|
||||
@@ -70,23 +70,24 @@
|
||||
return
|
||||
|
||||
/obj/item/storage/portable_chem_mixer/update_icon_state()
|
||||
var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
|
||||
if (!locked)
|
||||
if(!SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED))
|
||||
icon_state = "portablechemicalmixer_open"
|
||||
else if (beaker)
|
||||
return ..()
|
||||
if(beaker)
|
||||
icon_state = "portablechemicalmixer_full"
|
||||
else
|
||||
icon_state = "portablechemicalmixer_empty"
|
||||
return ..()
|
||||
icon_state = "portablechemicalmixer_empty"
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/storage/portable_chem_mixer/AltClick(mob/living/user)
|
||||
var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
|
||||
if (!locked)
|
||||
if(!locked)
|
||||
return ..()
|
||||
if(!can_interact(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/portable_chem_mixer/CtrlClick(mob/living/user)
|
||||
var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
|
||||
@@ -95,7 +96,7 @@
|
||||
update_contents()
|
||||
if (locked)
|
||||
replace_beaker(user)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
playsound(src, 'sound/items/screwdriver2.ogg', 50)
|
||||
return
|
||||
|
||||
@@ -221,5 +222,5 @@
|
||||
. = TRUE
|
||||
if("eject")
|
||||
replace_beaker(usr)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
. = TRUE
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
/obj/item/powersink/update_icon_state()
|
||||
icon_state = "powersink[mode == OPERATING]"
|
||||
return ..()
|
||||
|
||||
/obj/item/powersink/set_anchored(anchorvalue)
|
||||
. = ..()
|
||||
@@ -57,7 +58,7 @@
|
||||
set_anchored(TRUE)
|
||||
|
||||
mode = value
|
||||
update_icon()
|
||||
update_appearance()
|
||||
set_light(0)
|
||||
|
||||
/obj/item/powersink/attackby(obj/item/I, mob/user, params)
|
||||
|
||||
@@ -26,7 +26,5 @@
|
||||
qpad = null
|
||||
|
||||
/obj/item/quantum_keycard/update_icon_state()
|
||||
if(qpad)
|
||||
icon_state = "quantum_keycard_on"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
icon_state = qpad ? "quantum_keycard_on" : initial(icon_state)
|
||||
return ..()
|
||||
|
||||
@@ -102,18 +102,15 @@
|
||||
|
||||
/obj/item/radio/intercom/emp_act(severity)
|
||||
. = ..() // Parent call here will set `on` to FALSE.
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/radio/intercom/end_emp_effect(curremp)
|
||||
. = ..()
|
||||
AreaPowerCheck() // Make sure the area/local APC is powered first before we actually turn back on.
|
||||
|
||||
/obj/item/radio/intercom/update_icon()
|
||||
. = ..()
|
||||
if(on)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "intercom-p"
|
||||
/obj/item/radio/intercom/update_icon_state()
|
||||
icon_state = on ? initial(icon_state) : "intercom-p"
|
||||
return ..()
|
||||
|
||||
/**
|
||||
* Proc called whenever the intercom's area loses or gains power. Responsible for setting the `on` variable and calling `update_icon()`.
|
||||
@@ -128,7 +125,7 @@
|
||||
on = FALSE
|
||||
else
|
||||
on = current_area.powered(AREA_USAGE_EQUIP) // set "on" to the equipment power status of our area.
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/radio/intercom/add_blood_DNA(list/blood_dna)
|
||||
return FALSE
|
||||
|
||||
@@ -16,15 +16,13 @@
|
||||
/obj/item/swapper/Destroy()
|
||||
if(linked_swapper)
|
||||
linked_swapper.linked_swapper = null //*inception music*
|
||||
linked_swapper.update_icon()
|
||||
linked_swapper.update_appearance()
|
||||
linked_swapper = null
|
||||
return ..()
|
||||
|
||||
/obj/item/swapper/update_icon_state()
|
||||
if(linked_swapper)
|
||||
icon_state = "swapper-linked"
|
||||
else
|
||||
icon_state = "swapper"
|
||||
icon_state = "swapper[linked_swapper ? "-linked" : null]"
|
||||
return ..()
|
||||
|
||||
/obj/item/swapper/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/swapper))
|
||||
@@ -38,8 +36,8 @@
|
||||
to_chat(user, "<span class='notice'>You establish a quantum link between the two devices.</span>")
|
||||
linked_swapper = other_swapper
|
||||
other_swapper.linked_swapper = src
|
||||
update_icon()
|
||||
linked_swapper.update_icon()
|
||||
update_appearance()
|
||||
linked_swapper.update_appearance()
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -74,9 +72,9 @@
|
||||
to_chat(user, "<span class='notice'>You break the current quantum link.</span>")
|
||||
if(!QDELETED(linked_swapper))
|
||||
linked_swapper.linked_swapper = null
|
||||
linked_swapper.update_icon()
|
||||
linked_swapper.update_appearance()
|
||||
linked_swapper = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
//Gets the topmost teleportable container
|
||||
/obj/item/swapper/proc/get_teleportable_container()
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if(starting_tape_type)
|
||||
mytape = new starting_tape_type(src)
|
||||
soundloop = new(list(src))
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/taperecorder/proc/readout()
|
||||
if(mytape)
|
||||
@@ -88,7 +88,7 @@
|
||||
mytape = I
|
||||
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
|
||||
playsound(src, 'sound/items/taperecorder/taperecorder_close.ogg', 50, FALSE)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
|
||||
/obj/item/taperecorder/proc/eject(mob/user)
|
||||
@@ -98,7 +98,7 @@
|
||||
stop()
|
||||
user.put_in_hands(mytape)
|
||||
mytape = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/taperecorder/fire_act(exposed_temperature, exposed_volume)
|
||||
mytape.unspool() //Fires unspool the tape, which makes sense if you don't think about it
|
||||
@@ -132,12 +132,15 @@
|
||||
/obj/item/taperecorder/update_icon_state()
|
||||
if(!mytape)
|
||||
icon_state = "taperecorder_empty"
|
||||
else if(recording)
|
||||
return ..()
|
||||
if(recording)
|
||||
icon_state = "taperecorder_recording"
|
||||
else if(playing)
|
||||
return ..()
|
||||
if(playing)
|
||||
icon_state = "taperecorder_playing"
|
||||
else
|
||||
icon_state = "taperecorder_idle"
|
||||
return ..()
|
||||
icon_state = "taperecorder_idle"
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/taperecorder/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, list/message_mods = list())
|
||||
@@ -166,7 +169,7 @@
|
||||
recording = TRUE
|
||||
say("Recording started.")
|
||||
update_sound()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
while(recording && used < max)
|
||||
@@ -200,7 +203,7 @@
|
||||
say("Playback stopped.")
|
||||
playing = FALSE
|
||||
time_warned = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
update_sound()
|
||||
|
||||
/obj/item/taperecorder/verb/play()
|
||||
@@ -217,7 +220,7 @@
|
||||
return
|
||||
|
||||
playing = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
update_sound()
|
||||
say("Playback started.")
|
||||
playsound(src, 'sound/items/taperecorder/taperecorder_play.ogg', 50, FALSE)
|
||||
|
||||
@@ -267,7 +267,7 @@ effective or pretty fucking useless.
|
||||
GLOB.active_jammers |= src
|
||||
else
|
||||
GLOB.active_jammers -= src
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/toolbox/emergency/turret
|
||||
desc = "You feel a strange urge to hit this with a wrench."
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
icon = 'icons/obj/assemblies.dmi'
|
||||
name = "tank transfer valve"
|
||||
icon_state = "valve_1"
|
||||
base_icon_state = "valve"
|
||||
inhand_icon_state = "ttv"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/bombs_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/bombs_righthand.dmi'
|
||||
@@ -35,7 +36,7 @@
|
||||
tank_two = item
|
||||
to_chat(user, "<span class='notice'>You attach the tank to the transfer valve.</span>")
|
||||
|
||||
update_icon()
|
||||
update_appearance()
|
||||
//TODO: Have this take an assemblyholder
|
||||
else if(isassembly(item))
|
||||
var/obj/item/assembly/A = item
|
||||
@@ -92,30 +93,34 @@
|
||||
/obj/item/transfer_valve/proc/toggle_off()
|
||||
toggle = TRUE
|
||||
|
||||
/obj/item/transfer_valve/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
if(!tank_one && !tank_two && !attached_device)
|
||||
icon_state = "valve_1"
|
||||
return
|
||||
icon_state = "valve"
|
||||
/obj/item/transfer_valve/update_icon_state()
|
||||
icon_state = "[base_icon_state][(!tank_one && !tank_two && !attached_device) ? "_1" : null]"
|
||||
return ..()
|
||||
|
||||
/obj/item/transfer_valve/update_overlays()
|
||||
. = ..()
|
||||
if(tank_one)
|
||||
add_overlay("[tank_one.icon_state]")
|
||||
if(tank_two)
|
||||
. += "[tank_one.icon_state]"
|
||||
|
||||
if(!tank_two)
|
||||
underlays = null
|
||||
else
|
||||
var/mutable_appearance/J = mutable_appearance(icon, icon_state = "[tank_two.icon_state]")
|
||||
var/matrix/T = matrix()
|
||||
T.Translate(-13, 0)
|
||||
J.transform = T
|
||||
underlays = list(J)
|
||||
else
|
||||
underlays = null
|
||||
if(attached_device)
|
||||
add_overlay("device")
|
||||
if(istype(attached_device, /obj/item/assembly/infra))
|
||||
var/obj/item/assembly/infra/sensor = attached_device
|
||||
if(sensor.on && sensor.visible)
|
||||
add_overlay("proxy_beam")
|
||||
|
||||
if(!attached_device)
|
||||
return
|
||||
|
||||
. += "device"
|
||||
if(!istype(attached_device, /obj/item/assembly/infra))
|
||||
return
|
||||
var/obj/item/assembly/infra/sensor = attached_device
|
||||
if(sensor.on && sensor.visible)
|
||||
. += "proxy_beam"
|
||||
|
||||
|
||||
/obj/item/transfer_valve/proc/merge_gases(datum/gas_mixture/target, change_volume = TRUE)
|
||||
var/target_self = FALSE
|
||||
@@ -182,12 +187,12 @@
|
||||
|
||||
merge_gases()
|
||||
for(var/i in 1 to 6)
|
||||
addtimer(CALLBACK(src, /atom/.proc/update_icon), 20 + (i - 1) * 10)
|
||||
addtimer(CALLBACK(src, /atom/.proc/update_appearance), 20 + (i - 1) * 10)
|
||||
|
||||
else if(valve_open && tank_one && tank_two)
|
||||
split_gases()
|
||||
valve_open = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
/*
|
||||
This doesn't do anything but the timer etc. expects it to be here
|
||||
eventually maybe have it update icon to show state (timer, prox etc.) like old bombs
|
||||
@@ -245,7 +250,7 @@
|
||||
attached_device = null
|
||||
. = TRUE
|
||||
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/**
|
||||
* Returns if this is ready to be detonated. Checks if both tanks are in place.
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
. = ..()
|
||||
if(!result)
|
||||
result = roll(sides)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/dice/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is gambling with death! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -203,7 +203,7 @@
|
||||
comment = "NAT 20!"
|
||||
else if(sides == 20 && result == 1)
|
||||
comment = "Ouch, bad luck."
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(initial(icon_state) == "d00")
|
||||
result = (result - 1)*10
|
||||
if(special_faces.len == sides)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
icon_state = "docs_[C.crayon_color]"
|
||||
forgedseal = C.crayon_color
|
||||
to_chat(user, "<span class='notice'>You forge the official seal with a [C.crayon_color] crayon. No one will notice... right?</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/inspector
|
||||
name = "\improper N-spect scanner"
|
||||
|
||||
@@ -73,10 +73,8 @@
|
||||
return wielded * sharpness
|
||||
|
||||
/obj/item/dualsaber/update_icon_state()
|
||||
if(wielded)
|
||||
icon_state = "dualsaber[saber_color][wielded]"
|
||||
else
|
||||
icon_state = "dualsaber0"
|
||||
icon_state = wielded ? "dualsaber[saber_color][wielded]" : "dualsaber0"
|
||||
return ..()
|
||||
|
||||
/obj/item/dualsaber/suicide_act(mob/living/carbon/user)
|
||||
if(wielded)
|
||||
@@ -196,7 +194,7 @@
|
||||
hacked = TRUE
|
||||
to_chat(user, "<span class='warning'>2XRNBW_ENGAGE</span>")
|
||||
saber_color = "rainbow"
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>It's starting to look like a triple rainbow - no, nevermind.</span>")
|
||||
else
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/obj/structure/etherealball/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/structure/etherealball/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
. = ..()
|
||||
@@ -49,7 +49,7 @@
|
||||
TurnedOn = FALSE
|
||||
set_light(0)
|
||||
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(TimerID)
|
||||
deltimer(TimerID)
|
||||
|
||||
@@ -58,11 +58,12 @@
|
||||
current_color = random_color()
|
||||
set_light(range, power, current_color)
|
||||
add_atom_colour("#[current_color]", FIXED_COLOUR_PRIORITY)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
TimerID = addtimer(CALLBACK(src, .proc/DiscoFever), 5, TIMER_STOPPABLE) //Call ourselves every 0.5 seconds to change colors
|
||||
|
||||
/obj/structure/etherealball/update_icon_state()
|
||||
icon_state = "ethdisco_head_[TurnedOn]"
|
||||
return ..()
|
||||
|
||||
/obj/structure/etherealball/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
/obj/item/fireaxe // DEM AXES MAN, marker -Agouri
|
||||
icon_state = "fireaxe0"
|
||||
base_icon_state = "fireaxe"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/axes_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/axes_righthand.dmi'
|
||||
name = "fire axe"
|
||||
@@ -30,7 +31,7 @@
|
||||
/obj/item/fireaxe/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 100, 80, 0 , hitsound) //axes are not known for being precision butchering tools
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=5, force_wielded=24, icon_wielded="fireaxe1")
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=5, force_wielded=24, icon_wielded="[base_icon_state]1")
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/fireaxe/proc/on_wield(obj/item/source, mob/user)
|
||||
@@ -45,7 +46,8 @@
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/fireaxe/update_icon_state()
|
||||
icon_state = "fireaxe0"
|
||||
icon_state = "[base_icon_state]0"
|
||||
return ..()
|
||||
|
||||
/obj/item/fireaxe/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] axes [user.p_them()]self from head to toe! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -65,27 +67,24 @@
|
||||
*/
|
||||
/obj/item/fireaxe/boneaxe // Blatant imitation of the fireaxe, but made out of bone.
|
||||
icon_state = "bone_axe0"
|
||||
base_icon_state = "bone_axe"
|
||||
name = "bone axe"
|
||||
desc = "A large, vicious axe crafted out of several sharpened bone plates and crudely tied together. Made of monsters, by killing monsters, for killing monsters."
|
||||
|
||||
/obj/item/fireaxe/boneaxe/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=5, force_wielded=23, icon_wielded="bone_axe1")
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=5, force_wielded=23, icon_wielded="[base_icon_state]1")
|
||||
|
||||
/obj/item/fireaxe/boneaxe/update_icon_state()
|
||||
icon_state = "bone_axe0"
|
||||
|
||||
/*
|
||||
* Metal Hydrogen Axe
|
||||
*/
|
||||
/obj/item/fireaxe/metal_h2_axe // Blatant imitation of the fireaxe, but made out of metallic hydrogen
|
||||
icon_state = "metalh2_axe0"
|
||||
base_icon_state = "metalh2_axe"
|
||||
name = "metallic hydrogen axe"
|
||||
desc = "A large, menacing axe made of an unknown substance that the eldest atmosians call Metallic Hydrogen. Truly an otherworldly weapon."
|
||||
|
||||
/obj/item/fireaxe/metal_h2_axe/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=5, force_wielded=23, icon_wielded="metalh2_axe1")
|
||||
|
||||
/obj/item/fireaxe/metal_h2_axe/update_icon_state()
|
||||
icon_state = "metalh2_axe0"
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=5, force_wielded=23, icon_wielded="[base_icon_state]1")
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
|
||||
/obj/item/flamethrower/update_icon_state()
|
||||
inhand_icon_state = "flamethrower_[lit]"
|
||||
return ..()
|
||||
|
||||
/obj/item/flamethrower/update_overlays()
|
||||
. = ..()
|
||||
@@ -105,7 +106,7 @@
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER && igniter && !lit)
|
||||
status = !status
|
||||
to_chat(user, "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
|
||||
else if(isigniter(W))
|
||||
@@ -117,7 +118,7 @@
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
igniter = I
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/tank/internals/plasma))
|
||||
@@ -130,7 +131,7 @@
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
ptank = W
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
|
||||
else
|
||||
@@ -150,7 +151,7 @@
|
||||
user.put_in_hands(ptank)
|
||||
ptank = null
|
||||
to_chat(user, "<span class='notice'>You remove the plasma tank from [src]!</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/flamethrower/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -176,7 +177,7 @@
|
||||
playsound(loc, deac_sound, 50, TRUE)
|
||||
STOP_PROCESSING(SSobj,src)
|
||||
set_light_on(lit)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/flamethrower/CheckParts(list/parts_list)
|
||||
..()
|
||||
@@ -185,7 +186,7 @@
|
||||
weldtool.status = FALSE
|
||||
igniter.secured = FALSE
|
||||
status = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
//Called from turf.dm turf/dblclick
|
||||
/obj/item/flamethrower/proc/flame_turf(turflist)
|
||||
@@ -235,7 +236,7 @@
|
||||
status = TRUE
|
||||
if(create_with_tank)
|
||||
ptank = new /obj/item/tank/internals/plasma/full(src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
RegisterSignal(src, COMSIG_ITEM_RECHARGED, .proc/instant_refill)
|
||||
|
||||
/obj/item/flamethrower/full
|
||||
@@ -267,4 +268,4 @@
|
||||
ptank.air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*ptank.volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
else
|
||||
ptank = new /obj/item/tank/internals/plasma/full(src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
@@ -229,14 +229,14 @@
|
||||
|
||||
/obj/item/food/popsicle/update_overlays()
|
||||
. = ..()
|
||||
if(bitecount)
|
||||
. += "[initial(overlay_state)]_[min(bitecount, 3)]"
|
||||
else
|
||||
if(!bitecount)
|
||||
. += initial(overlay_state)
|
||||
return
|
||||
. += "[initial(overlay_state)]_[min(bitecount, 3)]"
|
||||
|
||||
/obj/item/food/popsicle/proc/after_bite(mob/living/eater, mob/living/feeder, bitecount)
|
||||
src.bitecount = bitecount
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/popsicle_stick
|
||||
name = "popsicle stick"
|
||||
|
||||
@@ -770,15 +770,22 @@
|
||||
|
||||
/obj/item/food/pancakes/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/food/pancakes/update_name()
|
||||
name = contents.len ? "stack of pancakes" : initial(name)
|
||||
return ..()
|
||||
|
||||
/obj/item/food/pancakes/update_icon(updates=ALL)
|
||||
if(!(updates & UPDATE_OVERLAYS))
|
||||
return ..()
|
||||
|
||||
updates &= ~UPDATE_OVERLAYS
|
||||
. = ..() // Don't update overlays. We're doing that here
|
||||
|
||||
/obj/item/food/pancakes/update_icon()
|
||||
if(contents.len)
|
||||
name = "stack of pancakes"
|
||||
else
|
||||
name = initial(name)
|
||||
if(contents.len < LAZYLEN(overlays))
|
||||
overlays-=overlays[overlays.len]
|
||||
overlays -= overlays[overlays.len]
|
||||
. |= UPDATE_OVERLAYS
|
||||
|
||||
/obj/item/food/pancakes/examine(mob/user)
|
||||
var/ingredients_listed = ""
|
||||
@@ -831,14 +838,14 @@
|
||||
pancake_visual.pixel_x = rand(-1,1)
|
||||
pancake_visual.pixel_y = 3 * contents.len - 1
|
||||
add_overlay(pancake_visual)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/food/pancakes/attack(mob/M, mob/living/user, params, stacked = TRUE)
|
||||
if(user.combat_mode || !contents.len || !stacked)
|
||||
return ..()
|
||||
var/obj/item/O = contents[contents.len]
|
||||
. = O.attack(M, user, params, FALSE)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
#undef PANCAKE_MAX_STACK
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
damtype = BURN
|
||||
START_PROCESSING(SSobj, src)
|
||||
playsound(src, 'sound/effects/fuse.ogg', 20, TRUE)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/sparkler/process(delta_time)
|
||||
burntime -= delta_time
|
||||
@@ -94,7 +94,7 @@
|
||||
to_chat(user, "<span class='notice'>You shorten the fuse of [src] with [I].</span>")
|
||||
playsound(src, 'sound/items/wirecutter.ogg', 20, TRUE)
|
||||
icon_state = initial(icon_state) + "_[det_time]"
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else
|
||||
to_chat(user, "<span class='danger'>You've already removed all of the fuse!</span>")
|
||||
|
||||
|
||||
@@ -227,10 +227,11 @@
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][armed]"
|
||||
return ..()
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is sticking [user.p_their()] head in the [src.name]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -242,12 +243,12 @@
|
||||
if(!ishuman(user) || user.stat != CONSCIOUS || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
armed = !armed
|
||||
update_icon()
|
||||
update_appearance()
|
||||
to_chat(user, "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>")
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/proc/close_trap()
|
||||
armed = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
playsound(src, 'sound/effects/snap.ogg', 50, TRUE)
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/Crossed(AM as mob|obj)
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
/obj/item/hot_potato/proc/activate(delay, mob/user)
|
||||
if(active)
|
||||
return
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(sticky)
|
||||
ADD_TRAIT(src, TRAIT_NODROP, HOT_POTATO_TRAIT)
|
||||
name = "primed [name]"
|
||||
@@ -151,7 +151,7 @@
|
||||
active = TRUE
|
||||
|
||||
/obj/item/hot_potato/proc/deactivate()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
name = initial(name)
|
||||
REMOVE_TRAIT(src, TRAIT_NODROP, HOT_POTATO_TRAIT)
|
||||
deltimer(detonation_timerid)
|
||||
@@ -161,7 +161,8 @@
|
||||
active = FALSE
|
||||
|
||||
/obj/item/hot_potato/update_icon_state()
|
||||
icon_state = active? icon_on : icon_off
|
||||
icon_state = active ? icon_on : icon_off
|
||||
return ..()
|
||||
|
||||
/obj/item/hot_potato/syndicate
|
||||
detonate_light_range = 4
|
||||
|
||||
@@ -30,10 +30,8 @@
|
||||
stop()
|
||||
|
||||
/obj/item/hourglass/update_icon_state()
|
||||
if(timing_id)
|
||||
icon_state = "hourglass_active"
|
||||
else
|
||||
icon_state = "hourglass_idle"
|
||||
icon_state = "hourglass_[timing_id ? "active" : "idle"]"
|
||||
return ..()
|
||||
|
||||
/obj/item/hourglass/proc/start()
|
||||
finish_time = world.time + time
|
||||
@@ -54,7 +52,7 @@
|
||||
countdown.stop()
|
||||
finish_time = null
|
||||
animate(src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/hourglass/proc/finish()
|
||||
visible_message("<span class='notice'>[src] stops.</span>")
|
||||
|
||||
@@ -15,10 +15,8 @@
|
||||
|
||||
|
||||
/obj/item/implantcase/update_icon_state()
|
||||
if(imp)
|
||||
icon_state = "implantcase-[imp.implant_color]"
|
||||
else
|
||||
icon_state = "implantcase-0"
|
||||
icon_state = "implantcase-[imp ? imp.implant_color : 0]"
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/implantcase/attackby(obj/item/W, mob/user, params)
|
||||
@@ -43,9 +41,9 @@
|
||||
I.imp.forceMove(src)
|
||||
imp = I.imp
|
||||
I.imp = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
reagents = imp.reagents
|
||||
I.update_icon()
|
||||
I.update_appearance()
|
||||
else
|
||||
if(imp)
|
||||
if(I.imp)
|
||||
@@ -54,8 +52,8 @@
|
||||
I.imp = imp
|
||||
imp = null
|
||||
reagents = null
|
||||
update_icon()
|
||||
I.update_icon()
|
||||
update_appearance()
|
||||
I.update_appearance()
|
||||
|
||||
else
|
||||
return ..()
|
||||
@@ -64,7 +62,7 @@
|
||||
. = ..()
|
||||
if(imp_type)
|
||||
imp = new imp_type(src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(imp)
|
||||
reagents = imp.reagents
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/obj/machinery/implantchair/Initialize()
|
||||
. = ..()
|
||||
open_machine()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/machinery/implantchair/ui_state(mob/user)
|
||||
return GLOB.notcontained_state
|
||||
@@ -84,7 +84,7 @@
|
||||
addtimer(CALLBACK(src,.proc/set_ready),injection_cooldown)
|
||||
else
|
||||
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 25, TRUE)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/machinery/implantchair/proc/implant_action(mob/living/M)
|
||||
var/obj/item/I = new implant_type
|
||||
@@ -105,6 +105,7 @@
|
||||
icon_state += "_open"
|
||||
if(occupant)
|
||||
icon_state += "_occupied"
|
||||
return ..()
|
||||
|
||||
/obj/machinery/implantchair/update_overlays()
|
||||
. = ..()
|
||||
@@ -121,7 +122,7 @@
|
||||
|
||||
/obj/machinery/implantchair/proc/set_ready()
|
||||
ready = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/machinery/implantchair/container_resist_act(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
|
||||
@@ -15,10 +15,8 @@
|
||||
|
||||
|
||||
/obj/item/implanter/update_icon_state()
|
||||
if(imp)
|
||||
icon_state = "implanter1"
|
||||
else
|
||||
icon_state = "implanter0"
|
||||
icon_state = "implanter[imp ? 1 : 0]"
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/implanter/attack(mob/living/M, mob/user)
|
||||
@@ -37,7 +35,7 @@
|
||||
else
|
||||
M.visible_message("<span class='notice'>[user] implants [M].</span>", "<span class='notice'>[user] implants you.</span>")
|
||||
imp = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] fails to implant [M].</span>")
|
||||
|
||||
@@ -62,4 +60,4 @@
|
||||
. = ..()
|
||||
if(imp_type)
|
||||
imp = new imp_type(src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
/obj/item/implantpad/update_icon_state()
|
||||
icon_state = "implantpad-[!QDELETED(case)]"
|
||||
return ..()
|
||||
|
||||
/obj/item/implantpad/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -27,7 +28,7 @@
|
||||
/obj/item/implantpad/handle_atom_del(atom/A)
|
||||
if(A == case)
|
||||
case = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
updateSelfDialog()
|
||||
. = ..()
|
||||
|
||||
@@ -46,7 +47,7 @@
|
||||
case = null
|
||||
|
||||
updateSelfDialog()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/implantpad/attackby(obj/item/implantcase/C, mob/user, params)
|
||||
if(istype(C, /obj/item/implantcase) && !case)
|
||||
@@ -54,7 +55,7 @@
|
||||
return
|
||||
case = C
|
||||
updateSelfDialog()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
var/totransfer = min(cell.charge,(powertransfer * coefficient))
|
||||
var/transferred = target.give(totransfer)
|
||||
cell.use(transferred)
|
||||
cell.update_icon()
|
||||
target.update_icon()
|
||||
cell.update_appearance()
|
||||
target.update_appearance()
|
||||
|
||||
/obj/item/inducer/get_cell()
|
||||
return cell
|
||||
@@ -66,12 +66,12 @@
|
||||
if(!opened)
|
||||
to_chat(user, "<span class='notice'>You unscrew the battery compartment.</span>")
|
||||
opened = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You close the battery compartment.</span>")
|
||||
opened = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
if(istype(W, /obj/item/stock_parts/cell))
|
||||
if(opened)
|
||||
@@ -80,7 +80,7 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You insert [W] into [src].</span>")
|
||||
cell = W
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] already has \a [cell] installed!</span>")
|
||||
@@ -125,7 +125,7 @@
|
||||
induce(C, coefficient)
|
||||
do_sparks(1, FALSE, A)
|
||||
if(O)
|
||||
O.update_icon()
|
||||
O.update_appearance()
|
||||
else
|
||||
break
|
||||
if(done_any) // Only show a message if we succeeded at least once
|
||||
@@ -150,10 +150,10 @@
|
||||
/obj/item/inducer/attack_self(mob/user)
|
||||
if(opened && cell)
|
||||
user.visible_message("<span class='notice'>[user] removes [cell] from [src]!</span>", "<span class='notice'>You remove [cell].</span>")
|
||||
cell.update_icon()
|
||||
cell.update_appearance()
|
||||
user.put_in_hands(cell)
|
||||
cell = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
|
||||
/obj/item/inducer/examine(mob/living/M)
|
||||
@@ -167,11 +167,9 @@
|
||||
|
||||
/obj/item/inducer/update_overlays()
|
||||
. = ..()
|
||||
if(opened)
|
||||
if(!cell)
|
||||
. += "inducer-nobat"
|
||||
else
|
||||
. += "inducer-bat"
|
||||
if(!opened)
|
||||
return
|
||||
. += "inducer-[cell ? "bat" : "nobat"]"
|
||||
|
||||
/obj/item/inducer/sci
|
||||
icon_state = "inducer-sci"
|
||||
@@ -183,7 +181,7 @@
|
||||
|
||||
/obj/item/inducer/sci/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/inducer/syndicate
|
||||
icon_state = "inducer-syndi"
|
||||
|
||||
@@ -609,18 +609,18 @@
|
||||
held_sausage = target
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[target] doesn't seem to want to get on [src]!</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/melee/roastingstick/attack_hand(mob/user, list/modifiers)
|
||||
..()
|
||||
if (held_sausage)
|
||||
user.put_in_hands(held_sausage)
|
||||
held_sausage = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/melee/roastingstick/update_overlays()
|
||||
. = ..()
|
||||
if (held_sausage)
|
||||
if(held_sausage)
|
||||
. += mutable_appearance(icon, "roastingstick_sausage")
|
||||
|
||||
/obj/item/melee/roastingstick/proc/extend(user)
|
||||
@@ -638,7 +638,7 @@
|
||||
/obj/item/melee/roastingstick/handle_atom_del(atom/target)
|
||||
if (target == held_sausage)
|
||||
held_sausage = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/melee/roastingstick/afterattack(atom/target, mob/user, proximity)
|
||||
. = ..()
|
||||
@@ -669,7 +669,7 @@
|
||||
held_sausage.add_atom_colour(rgb(103,63,24), FIXED_COLOUR_PRIORITY)
|
||||
held_sausage.name = "[target.name]-roasted [held_sausage.name]"
|
||||
held_sausage.desc = "[held_sausage.desc] It has been cooked to perfection on \a [target]."
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/melee/cleric_mace
|
||||
name = "cleric mace"
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
if(insertable)
|
||||
J.put_in_cart(src, user)
|
||||
J.mymop=src
|
||||
J.update_icon()
|
||||
J.update_appearance()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are unable to fit your [name] into the [J.name].</span>")
|
||||
return
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
to_chat(user, "<span class='notice'>You open [src]'s door.</span>")
|
||||
playsound(user, 'sound/effects/bin_open.ogg', 50, TRUE)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/pet_carrier/AltClick(mob/living/user)
|
||||
if(open || !user.canUseTopic(src, BE_CLOSE))
|
||||
@@ -79,7 +79,7 @@
|
||||
playsound(user, 'sound/machines/boltsdown.ogg', 30, TRUE)
|
||||
else
|
||||
playsound(user, 'sound/machines/boltsup.ogg', 30, TRUE)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/pet_carrier/attack(mob/living/target, mob/living/user)
|
||||
if(user.combat_mode)
|
||||
@@ -112,7 +112,7 @@
|
||||
loc.visible_message("<span class='notice'>[user] pushes open the door to [src]!</span>", \
|
||||
"<span class='warning'>[user] pushes open the door of [src]!</span>")
|
||||
open = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
else if(user.client)
|
||||
container_resist_act(user)
|
||||
@@ -129,7 +129,7 @@
|
||||
to_chat(user, "<span class='boldannounce'>Bingo! The lock pops open!</span>")
|
||||
locked = FALSE
|
||||
playsound(src, 'sound/machines/boltsup.ogg', 30, TRUE)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else
|
||||
loc.visible_message("<span class='warning'>[src] starts rattling as something pushes against the door!</span>", null, null, null, user)
|
||||
to_chat(user, "<span class='notice'>You start pushing out of [src]... (This will take about 20 seconds.)</span>")
|
||||
@@ -139,14 +139,15 @@
|
||||
to_chat(user, "<span class='notice'>You shove open [src]'s door against the lock's resistance and fall out!</span>")
|
||||
locked = FALSE
|
||||
open = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
remove_occupant(user)
|
||||
|
||||
/obj/item/pet_carrier/update_icon_state()
|
||||
if(open)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "pet_carrier_[!occupants.len ? "closed" : "occupied"]"
|
||||
return ..()
|
||||
icon_state = "pet_carrier_[!occupants.len ? "closed" : "occupied"]"
|
||||
return ..()
|
||||
|
||||
/obj/item/pet_carrier/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -45,14 +45,14 @@
|
||||
else
|
||||
target = null
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/pinpointer/process()
|
||||
if(!active)
|
||||
return PROCESS_KILL
|
||||
if(process_scan)
|
||||
scan_for_target()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/pinpointer/proc/scan_for_target()
|
||||
return
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/obj/item/pitchfork
|
||||
icon_state = "pitchfork0"
|
||||
base_icon_state = "pitchfork"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
|
||||
name = "pitchfork"
|
||||
@@ -23,7 +24,7 @@
|
||||
|
||||
/obj/item/pitchfork/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=7, force_wielded=15, icon_wielded="pitchfork1")
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=7, force_wielded=15, icon_wielded="[base_icon_state]1")
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/pitchfork/proc/on_wield(obj/item/source, mob/user)
|
||||
@@ -38,4 +39,5 @@
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/pitchfork/update_icon_state()
|
||||
icon_state = "pitchfork0"
|
||||
icon_state = "[base_icon_state]0"
|
||||
return ..()
|
||||
|
||||
@@ -375,8 +375,9 @@
|
||||
mood_message = null
|
||||
cheer_up()
|
||||
|
||||
/obj/item/toy/plush/proc/update_desc()
|
||||
/obj/item/toy/plush/update_desc()
|
||||
desc = normal_desc
|
||||
. = ..()
|
||||
if(mood_message)
|
||||
desc += mood_message
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
loadedWeightClass--
|
||||
else if (A == tank)
|
||||
tank = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/pneumatic_cannon/ghetto //Obtainable by improvised methods; more gas per use, less capacity
|
||||
name = "improvised pneumatic cannon"
|
||||
@@ -256,7 +256,7 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You hook \the [thetank] up to \the [src].</span>")
|
||||
tank = thetank
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/pneumatic_cannon/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -159,6 +159,7 @@
|
||||
|
||||
/obj/item/borg/charger/update_icon_state()
|
||||
icon_state = "charger_[mode]"
|
||||
return ..()
|
||||
|
||||
/obj/item/borg/charger/attack_self(mob/user)
|
||||
if(mode == "draw")
|
||||
@@ -166,7 +167,7 @@
|
||||
else
|
||||
mode = "draw"
|
||||
to_chat(user, "<span class='notice'>You toggle [src] to \"[mode]\" mode.</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/borg/charger/afterattack(obj/item/target, mob/living/silicon/robot/user, proximity_flag)
|
||||
. = ..()
|
||||
@@ -229,7 +230,7 @@
|
||||
break
|
||||
if(!user.cell.give(draw))
|
||||
break
|
||||
target.update_icon()
|
||||
target.update_appearance()
|
||||
|
||||
to_chat(user, "<span class='notice'>You stop charging yourself.</span>")
|
||||
|
||||
@@ -267,7 +268,7 @@
|
||||
break
|
||||
if(!cell.give(draw))
|
||||
break
|
||||
target.update_icon()
|
||||
target.update_appearance()
|
||||
|
||||
to_chat(user, "<span class='notice'>You stop charging [target].</span>")
|
||||
|
||||
@@ -634,11 +635,12 @@
|
||||
to_chat(user, "<span class='warning'>[src]'s safety cutoff prevents you from activating it due to living beings being ontop of you!</span>")
|
||||
else
|
||||
deactivate_field()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
to_chat(user, "<span class='boldnotice'>You [active? "activate":"deactivate"] [src].</span>")
|
||||
|
||||
/obj/item/borg/projectile_dampen/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][active]"
|
||||
return ..()
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/activate_field()
|
||||
if(istype(dampening_field))
|
||||
@@ -812,7 +814,7 @@
|
||||
if(A == stored) //sanity check
|
||||
UnregisterSignal(stored, COMSIG_ATOM_UPDATE_ICON)
|
||||
stored = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
. = ..()
|
||||
|
||||
///A right-click verb, for those not using hotkey mode.
|
||||
@@ -844,14 +846,19 @@
|
||||
var/obj/item/O = A
|
||||
O.forceMove(src)
|
||||
stored = O
|
||||
RegisterSignal(stored, COMSIG_ATOM_UPDATE_ICON, /atom/.proc/update_icon)
|
||||
update_icon()
|
||||
RegisterSignal(stored, COMSIG_ATOM_UPDATE_ICON, .proc/on_update_icon)
|
||||
update_appearance()
|
||||
return
|
||||
else
|
||||
stored.melee_attack_chain(user, A, params)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/// Exists to eat signal args
|
||||
/obj/item/borg/apparatus/proc/on_update_icon(datum/source, updates)
|
||||
SIGNAL_HANDLER
|
||||
return on_update_icon(updates)
|
||||
|
||||
/obj/item/borg/apparatus/attackby(obj/item/W, mob/user, params)
|
||||
if(stored)
|
||||
W.melee_attack_chain(user, stored, params)
|
||||
@@ -872,8 +879,8 @@
|
||||
/obj/item/borg/apparatus/beaker/Initialize()
|
||||
. = ..()
|
||||
stored = new /obj/item/reagent_containers/glass/beaker/large(src)
|
||||
RegisterSignal(stored, COMSIG_ATOM_UPDATE_ICON, /atom/.proc/update_icon)
|
||||
update_icon()
|
||||
RegisterSignal(stored, COMSIG_ATOM_UPDATE_ICON, .proc/on_update_icon)
|
||||
update_appearance()
|
||||
|
||||
/obj/item/borg/apparatus/beaker/Destroy()
|
||||
if(stored)
|
||||
@@ -932,8 +939,8 @@
|
||||
/obj/item/borg/apparatus/beaker/service/Initialize()
|
||||
. = ..()
|
||||
stored = new /obj/item/reagent_containers/food/drinks/drinkingglass(src)
|
||||
RegisterSignal(stored, COMSIG_ATOM_UPDATE_ICON, /atom/.proc/update_icon)
|
||||
update_icon()
|
||||
RegisterSignal(stored, COMSIG_ATOM_UPDATE_ICON, .proc/on_update_icon)
|
||||
update_appearance()
|
||||
|
||||
/////////////////////
|
||||
//organ storage bag//
|
||||
@@ -997,7 +1004,7 @@
|
||||
|
||||
/obj/item/borg/apparatus/circuit/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/borg/apparatus/circuit/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
/obj/item/robot_suit/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/robot_suit/prebuilt/Initialize()
|
||||
. = ..()
|
||||
@@ -48,7 +48,7 @@
|
||||
chest = new(src)
|
||||
chest.wired = TRUE
|
||||
chest.cell = new /obj/item/stock_parts/cell/high/plus(chest)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/robot_suit/update_overlays()
|
||||
. = ..()
|
||||
@@ -106,7 +106,7 @@
|
||||
to_chat(user, "<span class='notice'>You disassemble the cyborg shell.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There is nothing to remove from the endoskeleton!</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/robot_suit/proc/put_in_hand_or_drop(mob/living/user, obj/item/I) //normal put_in_hands() drops the item ontop of the player, this drops it at the suit's loc
|
||||
if(!user.put_in_hands(I))
|
||||
@@ -170,7 +170,7 @@
|
||||
W.icon_state = initial(W.icon_state)
|
||||
W.cut_overlays()
|
||||
l_leg = W
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/r_leg/robot))
|
||||
if(src.r_leg)
|
||||
@@ -180,7 +180,7 @@
|
||||
W.icon_state = initial(W.icon_state)
|
||||
W.cut_overlays()
|
||||
r_leg = W
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/l_arm/robot))
|
||||
if(l_arm)
|
||||
@@ -190,7 +190,7 @@
|
||||
W.icon_state = initial(W.icon_state)
|
||||
W.cut_overlays()
|
||||
l_arm = W
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/r_arm/robot))
|
||||
if(r_arm)
|
||||
@@ -200,7 +200,7 @@
|
||||
W.icon_state = initial(W.icon_state)//in case it is a dismembered robotic limb
|
||||
W.cut_overlays()
|
||||
r_arm = W
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/chest/robot))
|
||||
var/obj/item/bodypart/chest/robot/CH = W
|
||||
@@ -212,7 +212,7 @@
|
||||
CH.icon_state = initial(CH.icon_state) //in case it is a dismembered robotic limb
|
||||
CH.cut_overlays()
|
||||
chest = CH
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else if(!CH.wired)
|
||||
to_chat(user, "<span class='warning'>You need to attach wires to it first!</span>")
|
||||
else
|
||||
@@ -232,7 +232,7 @@
|
||||
HD.icon_state = initial(HD.icon_state)//in case it is a dismembered robotic limb
|
||||
HD.cut_overlays()
|
||||
head = HD
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to attach a flash to it first!</span>")
|
||||
|
||||
|
||||
@@ -350,16 +350,17 @@
|
||||
icon_state = "selfrepair_[on ? "on" : "off"]"
|
||||
else
|
||||
icon_state = "cyborg_upgrade5"
|
||||
return ..()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/proc/activate_sr()
|
||||
START_PROCESSING(SSobj, src)
|
||||
on = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/proc/deactivate_sr()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
on = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/process()
|
||||
if(world.time < next_repair)
|
||||
|
||||
@@ -60,7 +60,11 @@
|
||||
uses-- //this doesn't cause issues because we check if uses == 0 earlier in this proc
|
||||
if(uses == 0)
|
||||
name = "worn out [name]" //whetstone becomes used whetstone
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/sharpener/update_name()
|
||||
name = "[!uses ? "worn out " : null][initial(name)]"
|
||||
return ..()
|
||||
|
||||
/**
|
||||
* # Super whetstone
|
||||
|
||||
@@ -137,17 +137,17 @@
|
||||
|
||||
/obj/item/shield/riot/flash/attack(mob/living/M, mob/user)
|
||||
. = embedded_flash.attack(M, user)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/shield/riot/flash/attack_self(mob/living/carbon/user)
|
||||
. = embedded_flash.attack_self(user)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/shield/riot/flash/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
. = ..()
|
||||
if (. && !embedded_flash.burnt_out)
|
||||
embedded_flash.activate()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
|
||||
/obj/item/shield/riot/flash/attackby(obj/item/W, mob/user)
|
||||
@@ -165,14 +165,14 @@
|
||||
qdel(embedded_flash)
|
||||
embedded_flash = flash
|
||||
flash.forceMove(src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/shield/riot/flash/emp_act(severity)
|
||||
. = ..()
|
||||
embedded_flash.emp_act(severity)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/shield/riot/flash/update_icon_state()
|
||||
if(!embedded_flash || embedded_flash.burnt_out)
|
||||
@@ -181,6 +181,7 @@
|
||||
else
|
||||
icon_state = "flashshield"
|
||||
inhand_icon_state = "flashshield"
|
||||
return ..()
|
||||
|
||||
/obj/item/shield/riot/flash/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "singularity hammer"
|
||||
desc = "The pinnacle of close combat technology, the hammer harnesses the power of a miniaturized singularity to deal crushing blows."
|
||||
icon_state = "singularity_hammer0"
|
||||
base_icon_state = "singularity_hammer"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/hammers_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi'
|
||||
worn_icon_state = "singularity_hammer"
|
||||
@@ -26,7 +27,7 @@
|
||||
|
||||
/obj/item/singularityhammer/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_multiplier=4, icon_wielded="singularity_hammer1")
|
||||
AddComponent(/datum/component/two_handed, force_multiplier=4, icon_wielded="[base_icon_state]1")
|
||||
|
||||
///triggered on wield of two handed item
|
||||
/obj/item/singularityhammer/proc/on_wield(obj/item/source, mob/user)
|
||||
@@ -41,8 +42,8 @@
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/singularityhammer/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = "singularity_hammer0"
|
||||
icon_state = "[base_icon_state]0"
|
||||
return ..()
|
||||
|
||||
/obj/item/singularityhammer/proc/recharge()
|
||||
charged = TRUE
|
||||
@@ -87,6 +88,7 @@
|
||||
name = "Mjolnir"
|
||||
desc = "A weapon worthy of a god, able to strike with the force of a lightning bolt. It crackles with barely contained energy."
|
||||
icon_state = "mjollnir0"
|
||||
base_icon_state = "mjollnir"
|
||||
worn_icon_state = "mjolnir"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/hammers_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi'
|
||||
@@ -105,7 +107,7 @@
|
||||
|
||||
/obj/item/mjollnir/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_multiplier=5, icon_wielded="mjollnir1", attacksound="sparks")
|
||||
AddComponent(/datum/component/two_handed, force_multiplier=5, icon_wielded="[base_icon_state]1", attacksound="sparks")
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/mjollnir/proc/on_wield(obj/item/source, mob/user)
|
||||
@@ -116,7 +118,8 @@
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/mjollnir/update_icon_state()
|
||||
icon_state = "mjollnir0"
|
||||
icon_state = "[base_icon_state]0"
|
||||
return ..()
|
||||
|
||||
/obj/item/mjollnir/proc/shock(mob/living/target)
|
||||
target.Stun(1.5 SECONDS)
|
||||
|
||||
@@ -29,10 +29,11 @@
|
||||
AddComponent(/datum/component/butchering, 100, 70) //decent in a pinch, but pretty bad.
|
||||
AddComponent(/datum/component/jousting)
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=10, force_wielded=18, icon_wielded="[icon_prefix]1")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/spear/update_icon_state()
|
||||
icon_state = "[icon_prefix]0"
|
||||
return ..()
|
||||
|
||||
/obj/item/spear/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins to sword-swallow \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -45,13 +46,16 @@
|
||||
throwforce = 21
|
||||
icon_prefix = "spearplasma"
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=11, force_wielded=19, icon_wielded="[icon_prefix]1")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
parts_list -= tip
|
||||
qdel(tip)
|
||||
return ..()
|
||||
|
||||
/obj/item/spear/explosive
|
||||
name = "explosive lance"
|
||||
icon_state = "spearbomb0"
|
||||
base_icon_state = "spearbomb"
|
||||
icon_prefix = "spearbomb"
|
||||
var/obj/item/grenade/explosive = null
|
||||
var/wielded = FALSE // track wielded status on item
|
||||
|
||||
@@ -63,7 +67,7 @@
|
||||
|
||||
/obj/item/spear/explosive/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=10, force_wielded=18, icon_wielded="spearbomb1")
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=10, force_wielded=18, icon_wielded="[icon_prefix]1")
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/spear/explosive/proc/on_wield(obj/item/source, mob/user)
|
||||
@@ -77,9 +81,6 @@
|
||||
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/spear/explosive/update_icon_state()
|
||||
icon_state = "spearbomb0"
|
||||
|
||||
/obj/item/spear/explosive/proc/set_explosive(obj/item/grenade/G)
|
||||
if(explosive)
|
||||
QDEL_NULL(explosive)
|
||||
@@ -167,6 +168,8 @@
|
||||
*/
|
||||
/obj/item/spear/bonespear //Blatant imitation of spear, but made out of bone. Not valid for explosive modification.
|
||||
icon_state = "bone_spear0"
|
||||
base_icon_state = "bone_spear0"
|
||||
icon_prefix = "bone_spear"
|
||||
name = "bone spear"
|
||||
desc = "A haphazardly-constructed yet still deadly weapon. The pinnacle of modern technology."
|
||||
force = 12
|
||||
@@ -176,7 +179,4 @@
|
||||
|
||||
/obj/item/spear/bonespear/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=12, force_wielded=20, icon_wielded="bone_spear1")
|
||||
|
||||
/obj/item/spear/bonespear/update_icon_state()
|
||||
icon_state = "bone_spear0"
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=12, force_wielded=20, icon_wielded="[icon_prefix]1")
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "cannonballs"
|
||||
desc = "A stack of heavy plasteel cannonballs. Gunnery for the space age!"
|
||||
icon_state = "cannonballs"
|
||||
base_icon_state = "cannonballs"
|
||||
max_amount = 14
|
||||
singular_name = "cannonball"
|
||||
merge_type = /obj/item/stack/cannonball
|
||||
@@ -15,11 +16,8 @@
|
||||
var/obj/projectile/projectile_type = /obj/projectile/bullet/cannonball
|
||||
|
||||
/obj/item/stack/cannonball/update_icon_state()
|
||||
if(amount == 1)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]_[min(amount, 14)]"
|
||||
|
||||
. = ..()
|
||||
icon_state = (amount == 1) ? "[base_icon_state]" : "[base_icon_state]_[min(amount, 14)]"
|
||||
|
||||
/obj/item/stack/cannonball/fourteen
|
||||
amount = 14
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
. = ..()
|
||||
update_desc()
|
||||
|
||||
/obj/item/stack/spacecash/proc/update_desc()
|
||||
/obj/item/stack/spacecash/update_desc()
|
||||
. = ..()
|
||||
var/total_worth = get_item_credit_value()
|
||||
desc = "It's worth [total_worth] credit[( total_worth > 1 ) ? "s" : ""] in total."
|
||||
desc = "It's worth [total_worth] credit[(total_worth > 1) ? "s" : null] in total."
|
||||
|
||||
/obj/item/stack/spacecash/get_item_credit_value()
|
||||
return (amount*value)
|
||||
@@ -34,6 +35,7 @@
|
||||
update_desc()
|
||||
|
||||
/obj/item/stack/spacecash/update_icon_state()
|
||||
. = ..()
|
||||
var/cash_value = get_item_credit_value()
|
||||
switch(cash_value)
|
||||
if(1 to 9)
|
||||
|
||||
@@ -22,11 +22,13 @@
|
||||
|
||||
///Override to allow for variations
|
||||
/obj/item/stack/license_plates/filled/update_icon_state()
|
||||
. = ..()
|
||||
if(novariants)
|
||||
return
|
||||
if(amount <= (max_amount * (1/3)))
|
||||
icon_state = "filled_plate_[rand(1,6)]_1"
|
||||
else if (amount <= (max_amount * (2/3)))
|
||||
return
|
||||
if (amount <= (max_amount * (2/3)))
|
||||
icon_state = "filled_plate_[rand(1,6)]_2"
|
||||
else
|
||||
icon_state = "filled_plate_[rand(1,6)]_3"
|
||||
return
|
||||
icon_state = "filled_plate_[rand(1,6)]_3"
|
||||
|
||||
@@ -292,13 +292,12 @@
|
||||
. = ..()
|
||||
if(amount == max_amount) //only seal full mesh packs
|
||||
is_open = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/stack/medical/mesh/update_icon_state()
|
||||
if(!is_open)
|
||||
icon_state = "regen_mesh_closed"
|
||||
else
|
||||
if(is_open)
|
||||
return ..()
|
||||
icon_state = "regen_mesh_closed"
|
||||
|
||||
/obj/item/stack/medical/mesh/try_heal(mob/living/M, mob/user, silent = FALSE)
|
||||
if(!is_open)
|
||||
@@ -322,7 +321,7 @@
|
||||
if(!is_open)
|
||||
is_open = TRUE
|
||||
to_chat(user, "<span class='notice'>You open the sterile mesh package.</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
playsound(src, 'sound/items/poster_ripped.ogg', 20, TRUE)
|
||||
return
|
||||
return ..()
|
||||
@@ -340,10 +339,9 @@
|
||||
merge_type = /obj/item/stack/medical/mesh/advanced
|
||||
|
||||
/obj/item/stack/medical/mesh/advanced/update_icon_state()
|
||||
if(!is_open)
|
||||
icon_state = "aloe_mesh_closed"
|
||||
else
|
||||
if(is_open)
|
||||
return ..()
|
||||
icon_state = "aloe_mesh_closed"
|
||||
|
||||
/obj/item/stack/medical/aloe
|
||||
name = "aloe cream"
|
||||
|
||||
@@ -38,13 +38,14 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
|
||||
/obj/item/stack/rods/Initialize(mapload, new_amount, merge = TRUE, list/mat_override=null, mat_amt=1)
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/stack/rods/get_main_recipes()
|
||||
. = ..()
|
||||
. += GLOB.rod_recipes
|
||||
|
||||
/obj/item/stack/rods/update_icon_state()
|
||||
. = ..()
|
||||
var/amount = get_amount()
|
||||
if(amount <= 5)
|
||||
icon_state = "rods-[amount]"
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
var/list/temp = SSmaterials.rigid_stack_recipes.Copy()
|
||||
recipes += temp
|
||||
update_weight()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/** Sets the amount of materials per unit for this stack.
|
||||
*
|
||||
@@ -125,13 +125,15 @@
|
||||
|
||||
/obj/item/stack/update_icon_state()
|
||||
if(novariants)
|
||||
return
|
||||
return ..()
|
||||
if(amount <= (max_amount * (1/3)))
|
||||
icon_state = initial(icon_state)
|
||||
else if (amount <= (max_amount * (2/3)))
|
||||
return ..()
|
||||
if (amount <= (max_amount * (2/3)))
|
||||
icon_state = "[initial(icon_state)]_2"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]_3"
|
||||
return ..()
|
||||
icon_state = "[initial(icon_state)]_3"
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -364,7 +366,7 @@
|
||||
return TRUE
|
||||
if(length(mats_per_unit))
|
||||
update_custom_materials()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
update_weight()
|
||||
return TRUE
|
||||
|
||||
@@ -402,7 +404,7 @@
|
||||
amount += _amount
|
||||
if(length(mats_per_unit))
|
||||
update_custom_materials()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
update_weight()
|
||||
|
||||
/** Checks whether this stack can merge itself into another stack.
|
||||
|
||||
@@ -10,9 +10,10 @@
|
||||
|
||||
/obj/item/stack/arcadeticket/Initialize(mapload, new_amount, merge = TRUE, list/mat_override=null, mat_amt=1)
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/stack/arcadeticket/update_icon_state()
|
||||
. = ..()
|
||||
var/amount = get_amount()
|
||||
switch(amount)
|
||||
if(12 to INFINITY)
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/bag/trash/cyborg
|
||||
insertable = FALSE
|
||||
@@ -73,7 +74,7 @@
|
||||
if(insertable)
|
||||
J.put_in_cart(src, user)
|
||||
J.mybag=src
|
||||
J.update_icon()
|
||||
J.update_appearance()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are unable to fit your [name] into the [J.name].</span>")
|
||||
return
|
||||
@@ -355,7 +356,7 @@
|
||||
if(ishuman(M))
|
||||
if(prob(10))
|
||||
M.Paralyze(40)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/bag/tray/proc/do_scatter(obj/item/I)
|
||||
for(var/i in 1 to rand(1,2))
|
||||
@@ -373,11 +374,11 @@
|
||||
|
||||
/obj/item/storage/bag/tray/Entered()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/bag/tray/Exited()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/bag/tray/cafeteria
|
||||
name = "cafeteria tray"
|
||||
|
||||
@@ -20,13 +20,14 @@
|
||||
|
||||
/obj/item/storage/belt/update_overlays()
|
||||
. = ..()
|
||||
if(content_overlays)
|
||||
for(var/obj/item/I in contents)
|
||||
. += I.get_belt_overlay()
|
||||
if(!content_overlays)
|
||||
return
|
||||
for(var/obj/item/I in contents)
|
||||
. += I.get_belt_overlay()
|
||||
|
||||
/obj/item/storage/belt/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/belt/utility
|
||||
name = "toolbelt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
|
||||
@@ -208,7 +209,7 @@
|
||||
new /obj/item/stack/medical/bone_gel(src)
|
||||
new /obj/item/stack/sticky_tape/surgical(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/formaldehyde(src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/belt/security
|
||||
name = "security belt"
|
||||
@@ -249,7 +250,7 @@
|
||||
new /obj/item/grenade/flashbang(src)
|
||||
new /obj/item/assembly/flash/handheld(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/belt/security/webbing
|
||||
name = "security webbing"
|
||||
@@ -710,7 +711,7 @@
|
||||
var/obj/item/I = contents[1]
|
||||
user.visible_message("<span class='notice'>[user] takes [I] out of [src].</span>", "<span class='notice'>You take [I] out of [src].</span>")
|
||||
user.put_in_hands(I)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
|
||||
@@ -722,10 +723,11 @@
|
||||
icon_state += "-sabre"
|
||||
inhand_icon_state += "-sabre"
|
||||
worn_icon_state += "-sabre"
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/belt/sabre/PopulateContents()
|
||||
new /obj/item/melee/sabre(src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/belt/plant
|
||||
name = "botanical belt"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/obj/item/storage/box/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/box/suicide_act(mob/living/carbon/user)
|
||||
var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD)
|
||||
@@ -924,6 +924,7 @@
|
||||
icon_state = "[inhand_icon_state]"
|
||||
else
|
||||
icon_state = "[inhand_icon_state]_closed"
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/box/papersack/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen))
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
* The 'fancy' path is for objects like donut boxes that show how many items are in the storage item on the sprite itself
|
||||
* .. Sorry for the shitty path name, I couldnt think of a better one.
|
||||
*
|
||||
* WARNING: var/icon_type is used for both examine text and sprite name. Please look at the procs below and adjust your sprite names accordingly
|
||||
* TODO: Cigarette boxes should be ported to this standard
|
||||
*
|
||||
* Contains:
|
||||
* Donut Box
|
||||
* Egg Box
|
||||
@@ -16,51 +13,59 @@
|
||||
|
||||
/obj/item/storage/fancy
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox"
|
||||
base_icon_state = "donutbox"
|
||||
resistance_flags = FLAMMABLE
|
||||
custom_materials = list(/datum/material/cardboard = 2000)
|
||||
var/icon_type = "donut"
|
||||
/// Used by examine to report what this thing is holding.
|
||||
var/contents_tag = "errors"
|
||||
/// What type of thing to fill this storage with.
|
||||
var/spawn_type = null
|
||||
var/fancy_open = FALSE
|
||||
/// Whether the container is open or not
|
||||
var/is_open = FALSE
|
||||
/// What this container folds up into when it's empty.
|
||||
var/obj/fold_result = /obj/item/stack/sheet/cardboard
|
||||
|
||||
/obj/item/storage/fancy/PopulateContents()
|
||||
if(!spawn_type)
|
||||
return
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
for(var/i = 1 to STR.max_items)
|
||||
new spawn_type(src)
|
||||
|
||||
/obj/item/storage/fancy/update_icon_state()
|
||||
if(fancy_open)
|
||||
icon_state = "[icon_type]box[contents.len]"
|
||||
else
|
||||
icon_state = "[icon_type]box"
|
||||
icon_state = "[base_icon_state][is_open ? contents.len : null]"
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/fancy/examine(mob/user)
|
||||
. = ..()
|
||||
if(fancy_open)
|
||||
if(length(contents) == 1)
|
||||
. += "There is one [icon_type] left."
|
||||
else
|
||||
. += "There are [contents.len <= 0 ? "no" : "[contents.len]"] [icon_type]s left."
|
||||
if(!is_open)
|
||||
return
|
||||
if(length(contents) == 1)
|
||||
. += "There is one [contents_tag] left."
|
||||
else
|
||||
. += "There are [contents.len <= 0 ? "no" : "[contents.len]"] [contents_tag]s left."
|
||||
|
||||
/obj/item/storage/fancy/attack_self(mob/user)
|
||||
fancy_open = !fancy_open
|
||||
update_icon()
|
||||
is_open = !is_open
|
||||
update_appearance()
|
||||
. = ..()
|
||||
if(!contents.len)
|
||||
new fold_result(user.drop_location())
|
||||
to_chat(user, "<span class='notice'>You fold the [src] into [initial(fold_result.name)].</span>")
|
||||
user.put_in_active_hand(fold_result)
|
||||
qdel(src)
|
||||
if(contents.len)
|
||||
return
|
||||
new fold_result(user.drop_location())
|
||||
to_chat(user, "<span class='notice'>You fold the [src] into [initial(fold_result.name)].</span>")
|
||||
user.put_in_active_hand(fold_result)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/storage/fancy/Exited()
|
||||
. = ..()
|
||||
fancy_open = TRUE
|
||||
update_icon()
|
||||
is_open = TRUE
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/fancy/Entered()
|
||||
. = ..()
|
||||
fancy_open = TRUE
|
||||
update_icon()
|
||||
is_open = TRUE
|
||||
update_appearance()
|
||||
|
||||
#define DONUT_INBOX_SPRITE_WIDTH 3
|
||||
|
||||
@@ -73,11 +78,12 @@
|
||||
desc = "Mmm. Donuts."
|
||||
icon = 'icons/obj/food/donuts.dmi'
|
||||
icon_state = "donutbox_inner"
|
||||
icon_type = "donut"
|
||||
base_icon_state = "donutbox"
|
||||
spawn_type = /obj/item/food/donut
|
||||
fancy_open = TRUE
|
||||
is_open = TRUE
|
||||
appearance_flags = KEEP_TOGETHER
|
||||
custom_premium_price = PAYCHECK_HARD * 1.75
|
||||
contents_tag = "donut"
|
||||
|
||||
/obj/item/storage/fancy/donut_box/ComponentInitialize()
|
||||
. = ..()
|
||||
@@ -87,23 +93,19 @@
|
||||
|
||||
/obj/item/storage/fancy/donut_box/PopulateContents()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/fancy/donut_box/update_icon_state()
|
||||
if(fancy_open)
|
||||
icon_state = "donutbox_inner"
|
||||
else
|
||||
icon_state = "donutbox"
|
||||
. = ..()
|
||||
icon_state = "[base_icon_state][is_open ? "_inner" : null]"
|
||||
|
||||
/obj/item/storage/fancy/donut_box/update_overlays()
|
||||
. = ..()
|
||||
|
||||
if (!fancy_open)
|
||||
if(!is_open)
|
||||
return
|
||||
|
||||
var/donuts = 0
|
||||
|
||||
for (var/_donut in contents)
|
||||
for(var/_donut in contents)
|
||||
var/obj/item/food/donut/donut = _donut
|
||||
if (!istype(donut))
|
||||
continue
|
||||
@@ -111,7 +113,7 @@
|
||||
. += image(icon = initial(icon), icon_state = donut.in_box_sprite(), pixel_x = donuts * DONUT_INBOX_SPRITE_WIDTH)
|
||||
donuts += 1
|
||||
|
||||
. += image(icon = initial(icon), icon_state = "donutbox_top")
|
||||
. += image(icon = initial(icon), icon_state = "[base_icon_state]_top")
|
||||
|
||||
#undef DONUT_INBOX_SPRITE_WIDTH
|
||||
|
||||
@@ -123,12 +125,13 @@
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
inhand_icon_state = "eggbox"
|
||||
icon_state = "eggbox"
|
||||
icon_type = "egg"
|
||||
base_icon_state = "eggbox"
|
||||
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
name = "egg box"
|
||||
desc = "A carton for containing eggs."
|
||||
spawn_type = /obj/item/food/egg
|
||||
contents_tag = "egg"
|
||||
|
||||
/obj/item/storage/fancy/egg_box/ComponentInitialize()
|
||||
. = ..()
|
||||
@@ -145,13 +148,14 @@
|
||||
desc = "A pack of red candles."
|
||||
icon = 'icons/obj/candle.dmi'
|
||||
icon_state = "candlebox5"
|
||||
icon_type = "candle"
|
||||
base_icon_state = "candlebox"
|
||||
inhand_icon_state = "candlebox5"
|
||||
worn_icon_state = "cigpack"
|
||||
throwforce = 2
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
spawn_type = /obj/item/candle
|
||||
fancy_open = TRUE
|
||||
is_open = TRUE
|
||||
contents_tag = "candle"
|
||||
|
||||
/obj/item/storage/fancy/candle_box/ComponentInitialize()
|
||||
. = ..()
|
||||
@@ -175,13 +179,14 @@
|
||||
icon_state = "cig"
|
||||
inhand_icon_state = "cigpacket"
|
||||
worn_icon_state = "cigpack"
|
||||
base_icon_state = "cig"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
icon_type = "cigarette"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette
|
||||
custom_price = PAYCHECK_MEDIUM
|
||||
age_restricted = TRUE
|
||||
contents_tag = "cigarette"
|
||||
///for cigarette overlay
|
||||
var/candy = FALSE
|
||||
/// Does this cigarette packet come with a coupon attached?
|
||||
@@ -190,19 +195,20 @@
|
||||
var/rigged_omen = FALSE
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack_self(mob/user)
|
||||
if(contents.len == 0 && spawn_coupon)
|
||||
to_chat(user, "<span class='notice'>You rip the back off \the [src] and get a coupon!</span>")
|
||||
var/obj/item/coupon/attached_coupon = new
|
||||
user.put_in_hands(attached_coupon)
|
||||
attached_coupon.generate(rigged_omen)
|
||||
attached_coupon = null
|
||||
spawn_coupon = FALSE
|
||||
name = "discarded cigarette packet"
|
||||
desc = "An old cigarette packet with the back torn off, worth less than nothing now."
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 0
|
||||
return
|
||||
return ..()
|
||||
if(contents.len != 0 || !spawn_coupon)
|
||||
return ..()
|
||||
|
||||
to_chat(user, "<span class='notice'>You rip the back off \the [src] and get a coupon!</span>")
|
||||
var/obj/item/coupon/attached_coupon = new
|
||||
user.put_in_hands(attached_coupon)
|
||||
attached_coupon.generate(rigged_omen)
|
||||
attached_coupon = null
|
||||
spawn_coupon = FALSE
|
||||
name = "discarded cigarette packet"
|
||||
desc = "An old cigarette packet with the back torn off, worth less than nothing now."
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 0
|
||||
return
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/ComponentInitialize()
|
||||
. = ..()
|
||||
@@ -227,99 +233,109 @@
|
||||
contents -= W
|
||||
to_chat(user, "<span class='notice'>You take \a [W] out of the pack.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
|
||||
to_chat(user, "<span class='notice'>There are no [contents_tag]s left in the pack.</span>")
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/update_icon_state()
|
||||
if(fancy_open || !contents.len)
|
||||
if(!contents.len)
|
||||
icon_state = "[initial(icon_state)]_empty"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
. = ..()
|
||||
icon_state = "[base_icon_state][contents.len ? null : "_empty"]"
|
||||
return
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/update_overlays()
|
||||
. = ..()
|
||||
if(fancy_open && contents.len)
|
||||
. += "[icon_state]_open"
|
||||
var/cig_position = 1
|
||||
for(var/C in contents)
|
||||
var/mutable_appearance/inserted_overlay = mutable_appearance(icon)
|
||||
|
||||
if(istype(C, /obj/item/lighter/greyscale))
|
||||
inserted_overlay.icon_state = "lighter_in"
|
||||
else if(istype(C, /obj/item/lighter))
|
||||
inserted_overlay.icon_state = "zippo_in"
|
||||
else if(candy)
|
||||
inserted_overlay.icon_state = "candy"
|
||||
else
|
||||
inserted_overlay.icon_state = "cigarette"
|
||||
|
||||
inserted_overlay.icon_state = "[inserted_overlay.icon_state]_[cig_position]"
|
||||
. += inserted_overlay
|
||||
cig_position++
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!ismob(M))
|
||||
if(!is_open || !contents.len)
|
||||
return
|
||||
var/obj/item/clothing/mask/cigarette/cig = locate(/obj/item/clothing/mask/cigarette) in contents
|
||||
if(cig)
|
||||
if(M == user && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/cigarette/W = cig
|
||||
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_TAKE, W, M)
|
||||
M.equip_to_slot_if_possible(W, ITEM_SLOT_MASK)
|
||||
contents -= W
|
||||
to_chat(user, "<span class='notice'>You take \a [W] out of the pack.</span>")
|
||||
|
||||
. += "[icon_state]_open"
|
||||
var/cig_position = 1
|
||||
for(var/C in contents)
|
||||
var/mutable_appearance/inserted_overlay = mutable_appearance(icon)
|
||||
|
||||
if(istype(C, /obj/item/lighter/greyscale))
|
||||
inserted_overlay.icon_state = "lighter_in"
|
||||
else if(istype(C, /obj/item/lighter))
|
||||
inserted_overlay.icon_state = "zippo_in"
|
||||
else if(candy)
|
||||
inserted_overlay.icon_state = "candy"
|
||||
else
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
|
||||
inserted_overlay.icon_state = "cigarette"
|
||||
|
||||
inserted_overlay.icon_state = "[inserted_overlay.icon_state]_[cig_position]"
|
||||
. += inserted_overlay
|
||||
cig_position++
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/target, mob/living/carbon/user)
|
||||
if(!istype(target))
|
||||
return
|
||||
|
||||
var/obj/item/clothing/mask/cigarette/cig = locate() in contents
|
||||
if(!cig)
|
||||
to_chat(user, "<span class='notice'>There are no [contents_tag]s left in the pack.</span>")
|
||||
return
|
||||
if(target != user || !contents.len || user.wear_mask)
|
||||
return ..()
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_TAKE, cig, target)
|
||||
target.equip_to_slot_if_possible(cig, ITEM_SLOT_MASK)
|
||||
contents -= cig
|
||||
to_chat(user, "<span class='notice'>You take \a [cig] out of the pack.</span>")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/dromedaryco
|
||||
name = "\improper DromedaryCo packet"
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
icon_state = "dromedary"
|
||||
base_icon_state = "dromedary"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/dromedary
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_uplift
|
||||
name = "\improper Uplift Smooth packet"
|
||||
desc = "Your favorite brand, now menthol flavored."
|
||||
icon_state = "uplift"
|
||||
base_icon_state = "uplift"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/uplift
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_robust
|
||||
name = "\improper Robust packet"
|
||||
desc = "Smoked by the robust."
|
||||
icon_state = "robust"
|
||||
base_icon_state = "robust"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robust
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_robustgold
|
||||
name = "\improper Robust Gold packet"
|
||||
desc = "Smoked by the truly robust."
|
||||
icon_state = "robustg"
|
||||
base_icon_state = "robustg"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robustgold
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_carp
|
||||
name = "\improper Carp Classic packet"
|
||||
desc = "Since 2313."
|
||||
icon_state = "carp"
|
||||
base_icon_state = "carp"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/carp
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_syndicate
|
||||
name = "cigarette packet"
|
||||
desc = "An obscure brand of cigarettes."
|
||||
icon_state = "syndie"
|
||||
base_icon_state = "syndie"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/syndicate
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_midori
|
||||
name = "\improper Midori Tabako packet"
|
||||
desc = "You can't understand the runes, but the packet smells funny."
|
||||
icon_state = "midori"
|
||||
base_icon_state = "midori"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/rollie/nicotine
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_candy
|
||||
name = "\improper Timmy's First Candy Smokes packet"
|
||||
desc = "Unsure about smoking? Want to bring your children safely into the family tradition? Look no more with this special packet! Includes 100%* Nicotine-Free candy cigarettes."
|
||||
icon_state = "candy"
|
||||
icon_type = "candy cigarette"
|
||||
base_icon_state = "candy"
|
||||
contents_tag = "candy cigarette"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/candy
|
||||
candy = TRUE
|
||||
age_restricted = FALSE
|
||||
@@ -333,24 +349,28 @@
|
||||
name = "\improper Shady Jim's Super Slims packet"
|
||||
desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!"
|
||||
icon_state = "shadyjim"
|
||||
base_icon_state = "shadyjim"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/shadyjims
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_xeno
|
||||
name = "\improper Xeno Filtered packet"
|
||||
desc = "Loaded with 100% pure slime. And also nicotine."
|
||||
icon_state = "slime"
|
||||
base_icon_state = "slime"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/xeno
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_cannabis
|
||||
name = "\improper Freak Brothers' Special packet"
|
||||
desc = "A label on the packaging reads, \"Endorsed by Phineas, Freddy and Franklin.\""
|
||||
icon_state = "midori"
|
||||
base_icon_state = "midori"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/rollie/cannabis
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_mindbreaker
|
||||
name = "\improper Leary's Delight packet"
|
||||
desc = "Banned in over 36 galaxies."
|
||||
icon_state = "shadyjim"
|
||||
base_icon_state = "shadyjim"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/rollie/mindbreaker
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers
|
||||
@@ -359,8 +379,8 @@
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig_paper_pack"
|
||||
///The value in here has NOTHING to do with icons. It needs to be this for the proper examine.
|
||||
icon_type = "rolling paper"
|
||||
base_icon_state = "cig_paper_pack"
|
||||
contents_tag = "rolling paper"
|
||||
spawn_type = /obj/item/rollingpaper
|
||||
custom_price = PAYCHECK_PRISONER
|
||||
|
||||
@@ -372,12 +392,13 @@
|
||||
|
||||
///Overrides to do nothing because fancy boxes are fucking insane.
|
||||
/obj/item/storage/fancy/rollingpapers/update_icon_state()
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
return
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers/update_overlays()
|
||||
. = ..()
|
||||
if(!contents.len)
|
||||
. += "[icon_state]_empty"
|
||||
. += "[base_icon_state]_empty"
|
||||
|
||||
/////////////
|
||||
//CIGAR BOX//
|
||||
@@ -388,8 +409,9 @@
|
||||
desc = "A case of premium cigars. Very expensive."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cigarcase"
|
||||
base_icon_state = "cigarcase"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
icon_type = "premium cigar"
|
||||
contents_tag = "premium cigar"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar
|
||||
spawn_coupon = FALSE
|
||||
|
||||
@@ -400,30 +422,31 @@
|
||||
STR.set_holdable(list(/obj/item/clothing/mask/cigarette/cigar))
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/update_icon_state()
|
||||
if(fancy_open)
|
||||
icon_state = "[initial(icon_state)]_open"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
. = ..()
|
||||
icon_state = "[base_icon_state][is_open ? "_open" : null]"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/update_overlays()
|
||||
. = ..()
|
||||
if(fancy_open)
|
||||
var/cigar_position = 1 //generate sprites for cigars in the box
|
||||
for(var/obj/item/clothing/mask/cigarette/cigar/smokes in contents)
|
||||
var/mutable_appearance/cigar_overlay = mutable_appearance(icon, "[smokes.icon_off]_[cigar_position]")
|
||||
. += cigar_overlay
|
||||
cigar_position++
|
||||
if(!is_open)
|
||||
return
|
||||
var/cigar_position = 1 //generate sprites for cigars in the box
|
||||
for(var/obj/item/clothing/mask/cigarette/cigar/smokes in contents)
|
||||
var/mutable_appearance/cigar_overlay = mutable_appearance(icon, "[smokes.icon_off]_[cigar_position]")
|
||||
. += cigar_overlay
|
||||
cigar_position++
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/cohiba
|
||||
name = "\improper Cohiba Robusto cigar case"
|
||||
desc = "A case of imported Cohiba cigars, renowned for their strong flavor."
|
||||
icon_state = "cohibacase"
|
||||
base_icon_state = "cohibacase"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/havana
|
||||
name = "\improper premium Havanian cigar case"
|
||||
desc = "A case of classy Havanian cigars."
|
||||
icon_state = "cohibacase"
|
||||
base_icon_state = "cohibacase"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/havana
|
||||
|
||||
/*
|
||||
@@ -436,9 +459,10 @@
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
inhand_icon_state = "chocolatebox"
|
||||
icon_state = "chocolatebox"
|
||||
icon_type = "chocolate"
|
||||
base_icon_state = "chocolatebox"
|
||||
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
contents_tag = "chocolate"
|
||||
spawn_type = /obj/item/food/tinychocolate
|
||||
|
||||
/obj/item/storage/fancy/heart_box/ComponentInitialize()
|
||||
@@ -453,7 +477,8 @@
|
||||
desc = "A cardboard box used for holding chicken nuggies."
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "nuggetbox"
|
||||
icon_type = "nugget"
|
||||
base_icon_state = "nuggetbox"
|
||||
contents_tag = "nugget"
|
||||
spawn_type = /obj/item/food/nugget
|
||||
|
||||
/obj/item/storage/fancy/nugget_box/ComponentInitialize()
|
||||
|
||||
@@ -541,6 +541,7 @@
|
||||
name = "organ transport box"
|
||||
desc = "An advanced box with an cooling mechanism that uses cryostylane or other cold reagents to keep the organs or bodyparts inside preserved."
|
||||
icon_state = "organbox"
|
||||
base_icon_state = "organbox"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
throw_speed = 3
|
||||
@@ -581,22 +582,19 @@
|
||||
cool = TRUE
|
||||
if(!cooling && cool)
|
||||
cooling = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
for(var/C in contents)
|
||||
freeze(C)
|
||||
return
|
||||
if(cooling && !cool)
|
||||
cooling = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
for(var/C in contents)
|
||||
unfreeze(C)
|
||||
|
||||
/obj/item/storage/organbox/update_icon()
|
||||
. = ..()
|
||||
if(cooling)
|
||||
icon_state = "organbox-working"
|
||||
else
|
||||
icon_state = "organbox"
|
||||
/obj/item/storage/organbox/update_icon_state()
|
||||
icon_state = "[base_icon_state][cooling ? "-working" : null]"
|
||||
return ..()
|
||||
|
||||
///freezes the organ and loops bodyparts like heads
|
||||
/obj/item/storage/organbox/proc/freeze(datum/source, obj/item/I)
|
||||
|
||||
@@ -60,12 +60,12 @@
|
||||
/obj/item/storage/lockbox/Entered()
|
||||
. = ..()
|
||||
open = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/lockbox/Exited()
|
||||
. = ..()
|
||||
open = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/lockbox/loyalty
|
||||
name = "lockbox of mindshield implants"
|
||||
@@ -114,7 +114,7 @@
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
if(!SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED))
|
||||
open = (open ? FALSE : TRUE)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
..()
|
||||
|
||||
/obj/item/storage/lockbox/medal/PopulateContents()
|
||||
@@ -132,12 +132,14 @@
|
||||
var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
|
||||
if(locked)
|
||||
icon_state = "medalbox+l"
|
||||
else
|
||||
icon_state = "medalbox"
|
||||
if(open)
|
||||
icon_state += "open"
|
||||
if(broken)
|
||||
icon_state += "+b"
|
||||
return ..()
|
||||
|
||||
icon_state = "medalbox"
|
||||
if(open)
|
||||
icon_state += "open"
|
||||
if(broken)
|
||||
icon_state += "+b"
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/lockbox/medal/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
|
||||
/obj/item/storage/cans/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][contents.len]"
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/cans/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/cans/ComponentInitialize()
|
||||
. = ..()
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
latches = "double_latch"
|
||||
if(prob(1))
|
||||
latches = "triple_latch"
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/storage/toolbox/update_overlays()
|
||||
. = ..()
|
||||
@@ -311,7 +311,7 @@
|
||||
if(/obj/item/storage/toolbox/syndicate)
|
||||
B.toolbox_color = "s"
|
||||
user.put_in_hands(B)
|
||||
B.update_icon()
|
||||
B.update_appearance()
|
||||
to_chat(user, "<span class='notice'>You add the tiles into the empty [name]. They protrude from the top.</span>")
|
||||
qdel(src)
|
||||
else
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(H.wear_id == src)
|
||||
H.sec_hud_set_ID()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
update_label()
|
||||
|
||||
/obj/item/storage/wallet/Entered(atom/movable/AM)
|
||||
@@ -67,10 +67,11 @@
|
||||
/obj/item/storage/wallet/update_overlays()
|
||||
. = ..()
|
||||
cached_flat_icon = null
|
||||
if(front_id)
|
||||
. += mutable_appearance(front_id.icon, front_id.icon_state)
|
||||
. += front_id.overlays
|
||||
. += mutable_appearance(icon, "wallet_overlay")
|
||||
if(!front_id)
|
||||
return
|
||||
. += mutable_appearance(front_id.icon, front_id.icon_state)
|
||||
. += front_id.overlays
|
||||
. += mutable_appearance(icon, "wallet_overlay")
|
||||
|
||||
/obj/item/storage/wallet/proc/get_cached_flat_icon()
|
||||
if(!cached_flat_icon)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
log_mapping("[src] at [AREACOORD(src)] had an invalid preload_cell_type: [preload_cell_type].")
|
||||
else
|
||||
cell = new preload_cell_type(src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
RegisterSignal(src, COMSIG_PARENT_ATTACKBY, .proc/convert)
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
if(A == cell)
|
||||
cell = null
|
||||
turned_on = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/baton/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
@@ -103,17 +103,19 @@
|
||||
if(turned_on && cell.charge < cell_hit_cost)
|
||||
//we're below minimum, turn off
|
||||
turned_on = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
playsound(src, activate_sound, 75, TRUE, -1)
|
||||
|
||||
|
||||
/obj/item/melee/baton/update_icon_state()
|
||||
if(turned_on)
|
||||
icon_state = "[initial(icon_state)]_active"
|
||||
else if(!cell)
|
||||
return ..()
|
||||
if(!cell)
|
||||
icon_state = "[initial(icon_state)]_nocell"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
return ..()
|
||||
icon_state = "[initial(icon_state)]"
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/baton/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -135,7 +137,7 @@
|
||||
return
|
||||
cell = W
|
||||
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
tryremovecell(user)
|
||||
@@ -144,12 +146,12 @@
|
||||
|
||||
/obj/item/melee/baton/proc/tryremovecell(mob/user)
|
||||
if(cell && can_remove_cell)
|
||||
cell.update_icon()
|
||||
cell.update_appearance()
|
||||
cell.forceMove(get_turf(src))
|
||||
cell = null
|
||||
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
|
||||
turned_on = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/melee/baton/attack_self(mob/user)
|
||||
toggle_on(user)
|
||||
@@ -165,7 +167,7 @@
|
||||
to_chat(user, "<span class='warning'>[src] does not have a power source!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is out of charge.</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/melee/baton/proc/clumsy_check(mob/living/carbon/human/user)
|
||||
@@ -341,14 +343,5 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/melee/baton/boomerang/update_icon_state()
|
||||
if(turned_on)
|
||||
icon_state = "[initial(icon_state)]_active"
|
||||
else if(!cell)
|
||||
icon_state = "[initial(icon_state)]_nocell"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/obj/item/melee/baton/boomerang/loaded //Same as above, comes with a cell.
|
||||
preload_cell_type = /obj/item/stock_parts/cell/high
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
return
|
||||
src.master = F
|
||||
F.ptank = src
|
||||
F.update_icon()
|
||||
F.update_appearance()
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -423,7 +423,7 @@
|
||||
var/inj_am = injection_amount * delta_time
|
||||
var/used_amount = inj_am / usage_ratio
|
||||
reagents.trans_to(user, used_amount, multiplier=usage_ratio, methods = INJECT)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
user.update_inv_back() //for overlays update
|
||||
|
||||
//Operator backpack spray
|
||||
|
||||
@@ -100,18 +100,30 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
|
||||
. = ..()
|
||||
flip_card(user)
|
||||
|
||||
/obj/item/tcgcard/update_icon_state()
|
||||
/obj/item/tcgcard/update_name(updates)
|
||||
. = ..()
|
||||
if(!flipped)
|
||||
var/datum/card/template = extract_datum()
|
||||
name = template.name
|
||||
desc = "<i>[template.desc]</i>"
|
||||
icon_state = template.icon_state
|
||||
|
||||
else
|
||||
name = "Trading Card"
|
||||
|
||||
/obj/item/tcgcard/update_desc(updates)
|
||||
. = ..()
|
||||
if(!flipped)
|
||||
var/datum/card/template = GLOB.cached_cards[series]["ALL"][id]
|
||||
desc = "<i>[template.desc]</i>"
|
||||
else
|
||||
desc = "It's the back of a trading card... no peeking!"
|
||||
|
||||
/obj/item/tcgcard/update_icon_state()
|
||||
if(flipped)
|
||||
icon_state = "cardback"
|
||||
return ..()
|
||||
|
||||
var/datum/card/template = GLOB.cached_cards[series]["ALL"][id]
|
||||
icon_state = template.icon_state
|
||||
return ..()
|
||||
|
||||
/obj/item/tcgcard/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/tcgcard))
|
||||
@@ -129,8 +141,8 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
|
||||
return
|
||||
user.transferItemToLoc(src, old_deck)
|
||||
flipped = old_deck.flipped
|
||||
old_deck.update_icon()
|
||||
update_icon()
|
||||
old_deck.update_appearance()
|
||||
update_appearance()
|
||||
return ..()
|
||||
|
||||
/obj/item/tcgcard/proc/check_menu(mob/living/user)
|
||||
@@ -171,6 +183,7 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
|
||||
desc = "A stack of TCG cards."
|
||||
icon = 'icons/obj/tcgmisc.dmi'
|
||||
icon_state = "deck_up"
|
||||
base_icon_state = "deck"
|
||||
obj_flags = UNIQUE_RENAME
|
||||
var/flipped = FALSE
|
||||
var/static/radial_draw = image(icon = 'icons/hud/radial.dmi', icon_state = "radial_draw")
|
||||
@@ -182,17 +195,20 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
|
||||
LoadComponent(/datum/component/storage/concrete/tcg)
|
||||
|
||||
/obj/item/tcgcard_deck/update_icon_state()
|
||||
. = ..()
|
||||
if(flipped)
|
||||
switch(contents.len)
|
||||
if(1 to 10)
|
||||
icon_state = "deck_tcg_low"
|
||||
if(11 to 20)
|
||||
icon_state = "deck_tcg_half"
|
||||
if(21 to INFINITY)
|
||||
icon_state = "deck_tcg_full"
|
||||
else
|
||||
icon_state = "deck_up"
|
||||
if(!flipped)
|
||||
icon_state = "[base_icon_state]_up"
|
||||
return ..()
|
||||
|
||||
switch(contents.len)
|
||||
if(1 to 10)
|
||||
icon_state = "[icon_state]_tcg_low"
|
||||
if(11 to 20)
|
||||
icon_state = "[icon_state]_tcg_half"
|
||||
if(21 to INFINITY)
|
||||
icon_state = "[icon_state]_tcg_full"
|
||||
else
|
||||
icon_state = "[base_icon_state]_tcg"
|
||||
return ..()
|
||||
|
||||
/obj/item/tcgcard_deck/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
return FALSE
|
||||
forceMove(tongs)
|
||||
tongs.sliver = src
|
||||
tongs.update_icon()
|
||||
tongs.update_appearance()
|
||||
to_chat(user, "<span class='notice'>You carefully pick up [src] with [tongs].</span>")
|
||||
else if(istype(W, /obj/item/scalpel/supermatter) || istype(W, /obj/item/nuke_core_container/supermatter/)) // we don't want it to dust
|
||||
return
|
||||
@@ -253,6 +253,7 @@
|
||||
/obj/item/hemostat/supermatter/update_icon_state()
|
||||
icon_state = "supermatter_tongs[sliver ? "_loaded" : null]"
|
||||
inhand_icon_state = "supermatter_tongs[sliver ? "_loaded" : null]"
|
||||
return ..()
|
||||
|
||||
/obj/item/hemostat/supermatter/afterattack(atom/O, mob/user, proximity)
|
||||
. = ..()
|
||||
@@ -266,7 +267,7 @@
|
||||
sliver.forceMove(loc)
|
||||
visible_message("<span class='notice'>\The [sliver] falls out of \the [src] as it hits the ground.</span>")
|
||||
sliver = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return ..()
|
||||
|
||||
/obj/item/hemostat/supermatter/proc/Consume(atom/movable/AM, mob/living/user)
|
||||
@@ -293,4 +294,4 @@
|
||||
radiation_pulse(src, 500, 2)
|
||||
playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE)
|
||||
QDEL_NULL(sliver)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
@@ -99,25 +99,27 @@
|
||||
tool_behaviour = TOOL_WIRECUTTER
|
||||
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")
|
||||
usesound = 'sound/items/jaws_cut.ogg'
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
else
|
||||
tool_behaviour = TOOL_CROWBAR
|
||||
to_chat(user, "<span class='notice'>You attach the prying jaws to [src].</span>")
|
||||
usesound = 'sound/items/jaws_pry.ogg'
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/crowbar/power/update_icon()
|
||||
/obj/item/crowbar/power/update_icon_state()
|
||||
if(tool_behaviour == TOOL_WIRECUTTER)
|
||||
icon_state = "jaws_cutter"
|
||||
else
|
||||
icon_state = "jaws_pry"
|
||||
return ..()
|
||||
|
||||
/obj/item/crowbar/power/syndicate/update_icon()
|
||||
/obj/item/crowbar/power/syndicate/update_icon_state()
|
||||
if(tool_behaviour == TOOL_WIRECUTTER)
|
||||
icon_state = "jaws_cutter_syndie"
|
||||
else
|
||||
icon_state = "jaws_pry_syndie"
|
||||
return ..()
|
||||
|
||||
/obj/item/crowbar/power/attack(mob/living/carbon/C, mob/user)
|
||||
if(istype(C) && C.handcuffed && tool_behaviour == TOOL_WIRECUTTER)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
icon_state = "screwdriver"
|
||||
var/our_color = pick(screwdriver_colors)
|
||||
add_atom_colour(screwdriver_colors[our_color], FIXED_COLOUR_PRIORITY)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(prob(75))
|
||||
pixel_y = rand(0, 16)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
. = ..()
|
||||
create_reagents(max_fuel)
|
||||
reagents.add_reagent(/datum/reagent/fuel, max_fuel)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/weldingtool/ComponentInitialize()
|
||||
. = ..()
|
||||
@@ -59,6 +59,7 @@
|
||||
inhand_icon_state = "[initial(inhand_icon_state)]1"
|
||||
else
|
||||
inhand_icon_state = "[initial(inhand_icon_state)]"
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weldingtool/update_overlays()
|
||||
@@ -76,7 +77,7 @@
|
||||
if(0)
|
||||
force = 3
|
||||
damtype = BRUTE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(!can_off_process)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
@@ -87,7 +88,7 @@
|
||||
burned_fuel_for += delta_time
|
||||
if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL)
|
||||
use(1)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
//This is to start fires. process() is only called if the welder is on.
|
||||
open_flame()
|
||||
@@ -105,7 +106,7 @@
|
||||
flamethrower_rods(I, user)
|
||||
else
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/weldingtool/proc/explode()
|
||||
var/turf/T = get_turf(loc)
|
||||
@@ -147,7 +148,7 @@
|
||||
if(!status && O.is_refillable())
|
||||
reagents.trans_to(O, reagents.total_volume, transfered_by = user)
|
||||
to_chat(user, "<span class='notice'>You empty [src]'s fuel tank into [O].</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/weldingtool/attack_qdeleted(atom/O, mob/user, proximity)
|
||||
. = ..()
|
||||
@@ -170,7 +171,7 @@
|
||||
explode()
|
||||
switched_on(user)
|
||||
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
|
||||
// Ah fuck, I can't believe you've done this
|
||||
@@ -214,7 +215,7 @@
|
||||
if(get_fuel() <= 0 && welding)
|
||||
set_light_on(FALSE)
|
||||
switched_on(user)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -231,7 +232,7 @@
|
||||
force = 15
|
||||
damtype = BURN
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
update_icon()
|
||||
update_appearance()
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more fuel!</span>")
|
||||
@@ -248,7 +249,7 @@
|
||||
force = 3
|
||||
damtype = BRUTE
|
||||
hitsound = "swing_hit"
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
|
||||
/obj/item/weldingtool/examine(mob/user)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
icon_state = "cutters"
|
||||
var/our_color = pick(wirecutter_colors)
|
||||
add_atom_colour(wirecutter_colors[our_color], FIXED_COLOUR_PRIORITY)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/wirecutters/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
toolspeed = 1
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 5, TRUE)
|
||||
to_chat(user, "<span class='warning'>[src] is now active. Woe onto your enemies!</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/wrench/combat/update_icon_state()
|
||||
if(on)
|
||||
@@ -121,3 +121,4 @@
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
inhand_icon_state = "[initial(inhand_icon_state)]"
|
||||
return ..()
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
A.reagents.trans_to(src, 10, transfered_by = user)
|
||||
to_chat(user, "<span class='notice'>You fill the balloon with the contents of [A].</span>")
|
||||
desc = "A translucent balloon with some form of liquid sloshing around in it."
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/toy/waterballoon/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/reagent_containers/glass))
|
||||
@@ -81,7 +81,7 @@
|
||||
desc = "A translucent balloon with some form of liquid sloshing around in it."
|
||||
to_chat(user, "<span class='notice'>You fill the balloon with the contents of [I].</span>")
|
||||
I.reagents.trans_to(src, 10, transfered_by = user)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else if(I.get_sharpness())
|
||||
balloon_burst()
|
||||
else
|
||||
@@ -106,12 +106,13 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/toy/waterballoon/update_icon_state()
|
||||
if(src.reagents.total_volume >= 1)
|
||||
if(reagents.total_volume >= 1)
|
||||
icon_state = "waterballoon"
|
||||
inhand_icon_state = "balloon"
|
||||
else
|
||||
icon_state = "waterballoon-e"
|
||||
inhand_icon_state = "balloon-empty"
|
||||
return ..()
|
||||
|
||||
#define BALLOON_COLORS list("red", "blue", "green", "yellow")
|
||||
|
||||
@@ -272,7 +273,7 @@
|
||||
to_chat(user, text("<span class='notice'>You reload [] cap\s.</span>", 7 - src.bullets))
|
||||
A.amount_left -= 7 - src.bullets
|
||||
src.bullets = 7
|
||||
A.update_icon()
|
||||
A.update_appearance()
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
@@ -306,6 +307,7 @@
|
||||
|
||||
/obj/item/toy/ammo/gun/update_icon_state()
|
||||
icon_state = "357OLD-[amount_left]"
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/ammo/gun/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -719,7 +721,7 @@
|
||||
H.pickup(user)
|
||||
user.put_in_hands(H)
|
||||
user.visible_message("<span class='notice'>[user] draws a card from the deck.</span>", "<span class='notice'>You draw a card from the deck.</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return H
|
||||
|
||||
/obj/item/toy/cards/deck/update_icon_state()
|
||||
@@ -732,6 +734,7 @@
|
||||
icon_state = "deck_[deckstyle]_low"
|
||||
else
|
||||
icon_state = "deck_[deckstyle]_empty"
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/cards/deck/attack_self(mob/user)
|
||||
if(cooldown < world.time - 50)
|
||||
@@ -752,7 +755,7 @@
|
||||
qdel(SC)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't mix cards from other decks!</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else if(istype(I, /obj/item/toy/cards/cardhand))
|
||||
var/obj/item/toy/cards/cardhand/CH = I
|
||||
if(CH.parentdeck == src)
|
||||
@@ -764,7 +767,7 @@
|
||||
qdel(CH)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't mix cards from other decks!</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -1514,10 +1517,11 @@
|
||||
|
||||
/obj/item/toy/eldritch_book/attack_self(mob/user)
|
||||
book_open = !book_open
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/toy/eldritch_book/update_icon_state()
|
||||
icon_state = book_open ? "book_open" : "book"
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Fake tear
|
||||
|
||||
@@ -70,13 +70,12 @@
|
||||
set_expression("veryhappy", 2 SECONDS) //v happy to be back in the pinpointer business
|
||||
START_PROCESSING(SSmachines, src)
|
||||
|
||||
/obj/machinery/pinpointer_dispenser/update_icon_state()
|
||||
if(machine_stat & BROKEN)
|
||||
set_light(0)
|
||||
else if(powered())
|
||||
set_light(1.4)
|
||||
else
|
||||
/obj/machinery/pinpointer_dispenser/update_appearance(updates)
|
||||
. = ..()
|
||||
if((machine_stat & BROKEN) || !powered())
|
||||
set_light(0)
|
||||
return
|
||||
set_light(1.4)
|
||||
|
||||
/obj/machinery/pinpointer_dispenser/process(delta_time)
|
||||
if(machine_stat & (BROKEN|NOPOWER))
|
||||
|
||||
@@ -788,6 +788,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
//HF blade
|
||||
/obj/item/vibro_weapon
|
||||
icon_state = "hfrequency0"
|
||||
base_icon_state = "hfrequency"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
name = "vibro sword"
|
||||
@@ -813,7 +814,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
/obj/item/vibro_weapon/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 20, 105)
|
||||
AddComponent(/datum/component/two_handed, force_multiplier=2, icon_wielded="hfrequency1")
|
||||
AddComponent(/datum/component/two_handed, force_multiplier=2, icon_wielded="[base_icon_state]1")
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/vibro_weapon/proc/on_wield(obj/item/source, mob/user)
|
||||
@@ -828,7 +829,8 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/vibro_weapon/update_icon_state()
|
||||
icon_state = "hfrequency0"
|
||||
icon_state = "[base_icon_state]0"
|
||||
return ..()
|
||||
|
||||
/obj/item/vibro_weapon/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(wielded)
|
||||
|
||||
@@ -180,7 +180,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
if(!(resistance_flags & ON_FIRE) && (resistance_flags & FLAMMABLE) && !(resistance_flags & FIRE_PROOF))
|
||||
resistance_flags |= ON_FIRE
|
||||
SSfire_burning.processing[src] = src
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
@@ -194,7 +194,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
/obj/proc/extinguish()
|
||||
if(resistance_flags & ON_FIRE)
|
||||
resistance_flags &= ~ON_FIRE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
SSfire_burning.processing -= src
|
||||
|
||||
///Called when the obj is hit by a tesla bolt.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
circuit = null
|
||||
if((state != GLASS_CORE) && (state != AI_READY_CORE))
|
||||
state = EMPTY_CORE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(A == brain)
|
||||
brain = null
|
||||
return ..()
|
||||
@@ -120,7 +120,7 @@
|
||||
return
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE)
|
||||
to_chat(user, "<span class='notice'>You place the circuit board inside the frame.</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
state = CIRCUIT_CORE
|
||||
circuit = P
|
||||
return
|
||||
@@ -129,13 +129,13 @@
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
|
||||
state = SCREWED_CORE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
if(P.tool_behaviour == TOOL_CROWBAR)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
|
||||
state = EMPTY_CORE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
circuit.forceMove(loc)
|
||||
circuit = null
|
||||
return
|
||||
@@ -144,7 +144,7 @@
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
|
||||
state = CIRCUIT_CORE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
@@ -154,7 +154,7 @@
|
||||
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use(5))
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
state = CABLED_CORE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the AI core!</span>")
|
||||
return
|
||||
@@ -166,7 +166,7 @@
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
state = SCREWED_CORE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
new /obj/item/stack/cable_coil(drop_location(), 5)
|
||||
return
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
if(do_after(user, 20, target = src) && state == CABLED_CORE && G.use(2))
|
||||
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
|
||||
state = GLASS_CORE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need two sheets of reinforced glass to insert them into the AI core!</span>")
|
||||
return
|
||||
@@ -206,7 +206,7 @@
|
||||
|
||||
brain = M
|
||||
to_chat(user, "<span class='notice'>You add [M.name] to the frame.</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
|
||||
if(P.tool_behaviour == TOOL_CROWBAR && brain)
|
||||
@@ -214,7 +214,7 @@
|
||||
to_chat(user, "<span class='notice'>You remove the brain.</span>")
|
||||
brain.forceMove(loc)
|
||||
brain = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
|
||||
if(GLASS_CORE)
|
||||
@@ -222,7 +222,7 @@
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
state = CABLED_CORE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
new /obj/item/stack/sheet/rglass(loc, 2)
|
||||
return
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
qdel(src)
|
||||
else
|
||||
state = AI_READY_CORE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
|
||||
if(AI_READY_CORE)
|
||||
@@ -260,7 +260,7 @@
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
|
||||
state = GLASS_CORE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -281,6 +281,7 @@
|
||||
icon_state = "4"
|
||||
if(AI_READY_CORE)
|
||||
icon_state = "ai-empty"
|
||||
return ..()
|
||||
|
||||
/obj/structure/ai_core/deconstruct(disassembled = TRUE)
|
||||
if(state == GLASS_CORE)
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
|
||||
/obj/structure/alien/egg/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(status == GROWING || status == GROWN)
|
||||
child = new(src)
|
||||
if(status == GROWING)
|
||||
@@ -298,6 +298,7 @@
|
||||
icon_state = "[base_icon]"
|
||||
if(BURST)
|
||||
icon_state = "[base_icon]_hatched"
|
||||
return ..()
|
||||
|
||||
/obj/structure/alien/egg/attack_paw(mob/living/user, list/modifiers)
|
||||
return attack_hand(user, modifiers)
|
||||
@@ -330,7 +331,7 @@
|
||||
|
||||
/obj/structure/alien/egg/proc/Grow()
|
||||
status = GROWN
|
||||
update_icon()
|
||||
update_appearance()
|
||||
proximity_monitor.SetRange(1)
|
||||
|
||||
//drops and kills the hugger if any is remaining
|
||||
@@ -338,7 +339,7 @@
|
||||
if(status == GROWN || status == GROWING)
|
||||
proximity_monitor.SetRange(0)
|
||||
status = BURST
|
||||
update_icon()
|
||||
update_appearance()
|
||||
flick("egg_opening", src)
|
||||
addtimer(CALLBACK(src, .proc/finish_bursting, kill), 15)
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
var/y = text2num(params["y"])
|
||||
grid[x][y] = color
|
||||
used = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
. = TRUE
|
||||
if("finalize")
|
||||
. = TRUE
|
||||
@@ -133,17 +133,19 @@
|
||||
|
||||
/obj/item/canvas/update_overlays()
|
||||
. = ..()
|
||||
if(!icon_generated)
|
||||
if(used)
|
||||
var/mutable_appearance/detail = mutable_appearance(icon,"[icon_state]wip")
|
||||
detail.pixel_x = 1
|
||||
detail.pixel_y = 1
|
||||
. += detail
|
||||
else
|
||||
if(icon_generated)
|
||||
var/mutable_appearance/detail = mutable_appearance(generated_icon)
|
||||
detail.pixel_x = 1
|
||||
detail.pixel_y = 1
|
||||
. += detail
|
||||
return
|
||||
if(!used)
|
||||
return
|
||||
|
||||
var/mutable_appearance/detail = mutable_appearance(icon, "[icon_state]wip")
|
||||
detail.pixel_x = 1
|
||||
detail.pixel_y = 1
|
||||
. += detail
|
||||
|
||||
/obj/item/canvas/proc/generate_proper_overlay()
|
||||
if(icon_generated)
|
||||
@@ -154,7 +156,7 @@
|
||||
CRASH("Error generating painting png : [result]")
|
||||
generated_icon = new(png_filename)
|
||||
icon_generated = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/canvas/proc/get_data_string()
|
||||
var/list/data = list()
|
||||
@@ -241,6 +243,7 @@
|
||||
desc = "Art or \"Art\"? You decide."
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "frame-empty"
|
||||
base_icon_state = "frame"
|
||||
custom_materials = list(/datum/material/wood = 2000)
|
||||
buildable_sign = FALSE
|
||||
///Canvas we're currently displaying.
|
||||
@@ -284,8 +287,7 @@
|
||||
current_canvas.forceMove(drop_location())
|
||||
current_canvas = null
|
||||
to_chat(user, "<span class='notice'>You remove the painting from the frame.</span>")
|
||||
update_icon()
|
||||
update_name_and_desc()
|
||||
update_appearance()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/sign/painting/proc/frame_canvas(mob/user,obj/item/canvas/new_canvas)
|
||||
@@ -294,40 +296,37 @@
|
||||
if(!current_canvas.finalized)
|
||||
current_canvas.finalize(user)
|
||||
to_chat(user,"<span class='notice'>You frame [current_canvas].</span>")
|
||||
update_icon()
|
||||
update_name_and_desc()
|
||||
update_appearance()
|
||||
|
||||
/obj/structure/sign/painting/proc/try_rename(mob/user)
|
||||
if(current_canvas.painting_name == initial(current_canvas.painting_name))
|
||||
current_canvas.try_rename(user)
|
||||
|
||||
/obj/structure/sign/painting/proc/update_name_and_desc()
|
||||
if(current_canvas)
|
||||
name = "painting - [current_canvas.painting_name]"
|
||||
desc = desc_with_canvas
|
||||
else
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
/obj/structure/sign/painting/update_name(updates)
|
||||
name = current_canvas ? "painting - [current_canvas.painting_name]" : initial(name)
|
||||
return ..()
|
||||
|
||||
/obj/structure/sign/painting/update_desc(updates)
|
||||
desc = current_canvas ? desc_with_canvas : initial(desc)
|
||||
return ..()
|
||||
|
||||
/obj/structure/sign/painting/update_icon_state()
|
||||
. = ..()
|
||||
if(current_canvas?.generated_icon)
|
||||
icon_state = "frame-overlay"
|
||||
else
|
||||
icon_state = "frame-empty"
|
||||
|
||||
icon_state = "[base_icon_state]-[current_canvas?.generated_icon ? "overlay" : "empty"]"
|
||||
return ..()
|
||||
|
||||
/obj/structure/sign/painting/update_overlays()
|
||||
. = ..()
|
||||
if(current_canvas?.generated_icon)
|
||||
var/mutable_appearance/MA = mutable_appearance(current_canvas.generated_icon)
|
||||
MA.pixel_x = current_canvas.framed_offset_x
|
||||
MA.pixel_y = current_canvas.framed_offset_y
|
||||
. += MA
|
||||
var/mutable_appearance/frame = mutable_appearance(current_canvas.icon,"[current_canvas.icon_state]frame")
|
||||
frame.pixel_x = current_canvas.framed_offset_x - 1
|
||||
frame.pixel_y = current_canvas.framed_offset_y - 1
|
||||
. += frame
|
||||
if(!current_canvas?.generated_icon)
|
||||
return
|
||||
|
||||
var/mutable_appearance/MA = mutable_appearance(current_canvas.generated_icon)
|
||||
MA.pixel_x = current_canvas.framed_offset_x
|
||||
MA.pixel_y = current_canvas.framed_offset_y
|
||||
. += MA
|
||||
var/mutable_appearance/frame = mutable_appearance(current_canvas.icon,"[current_canvas.icon_state]frame")
|
||||
frame.pixel_x = current_canvas.framed_offset_x - 1
|
||||
frame.pixel_y = current_canvas.framed_offset_y - 1
|
||||
. += frame
|
||||
|
||||
/obj/structure/sign/painting/proc/load_persistent()
|
||||
if(!persistence_id)
|
||||
@@ -362,8 +361,7 @@
|
||||
new_canvas.author_ckey = author
|
||||
new_canvas.name = "painting - [title]"
|
||||
current_canvas = new_canvas
|
||||
update_icon()
|
||||
update_name_and_desc()
|
||||
update_appearance()
|
||||
|
||||
/obj/structure/sign/painting/proc/save_persistent()
|
||||
if(!persistence_id || !current_canvas)
|
||||
@@ -439,7 +437,6 @@
|
||||
for(var/obj/structure/sign/painting/P in SSpersistence.painting_frames)
|
||||
if(P.current_canvas && md5(P.current_canvas.get_data_string()) == md5)
|
||||
QDEL_NULL(P.current_canvas)
|
||||
P.update_icon()
|
||||
P.update_name_and_desc()
|
||||
P.update_appearance()
|
||||
log_admin("[key_name(user)] has deleted a persistent painting made by [author].")
|
||||
message_admins("<span class='notice'>[key_name_admin(user)] has deleted persistent painting made by [author].</span>")
|
||||
|
||||
@@ -325,11 +325,12 @@ LINEN BINS
|
||||
icon_state = "linenbin-half"
|
||||
else
|
||||
icon_state = "linenbin-full"
|
||||
return ..()
|
||||
|
||||
/obj/structure/bedsheetbin/fire_act(exposed_temperature, exposed_volume)
|
||||
if(amount)
|
||||
amount = 0
|
||||
update_icon()
|
||||
update_appearance()
|
||||
..()
|
||||
|
||||
/obj/structure/bedsheetbin/attackby(obj/item/I, mob/user, params)
|
||||
@@ -339,7 +340,7 @@ LINEN BINS
|
||||
sheets.Add(I)
|
||||
amount++
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
else if(default_unfasten_wrench(user, I, 5))
|
||||
return
|
||||
@@ -388,7 +389,7 @@ LINEN BINS
|
||||
B.forceMove(drop_location())
|
||||
user.put_in_hands(B)
|
||||
to_chat(user, "<span class='notice'>You take [B] out of [src].</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
if(hidden)
|
||||
hidden.forceMove(drop_location())
|
||||
@@ -412,7 +413,7 @@ LINEN BINS
|
||||
|
||||
B.forceMove(drop_location())
|
||||
to_chat(user, "<span class='notice'>You telekinetically remove [B] from [src].</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
if(hidden)
|
||||
hidden.forceMove(drop_location())
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
if(mapload && !opened) // if closed, any item at the crate's loc is put in the contents
|
||||
addtimer(CALLBACK(src, .proc/take_contents), 0)
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
PopulateContents()
|
||||
|
||||
//USE THIS TO FILL IT, NOT INITIALIZE OR NEW
|
||||
@@ -56,14 +56,19 @@
|
||||
dump_contents()
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/update_appearance(updates=ALL)
|
||||
. = ..()
|
||||
if(opened || broken || !secure)
|
||||
luminosity = 0
|
||||
return
|
||||
luminosity = 1
|
||||
|
||||
/obj/structure/closet/update_icon()
|
||||
. = ..()
|
||||
if (istype(src, /obj/structure/closet/supplypod))
|
||||
if(istype(src, /obj/structure/closet/supplypod))
|
||||
return
|
||||
if(!opened)
|
||||
layer = OBJ_LAYER
|
||||
else
|
||||
layer = BELOW_OBJ_LAYER
|
||||
|
||||
layer = opened ? BELOW_OBJ_LAYER : OBJ_LAYER
|
||||
|
||||
/obj/structure/closet/update_overlays()
|
||||
. = ..()
|
||||
@@ -71,28 +76,19 @@
|
||||
|
||||
/obj/structure/closet/proc/closet_update_overlays(list/new_overlays)
|
||||
. = new_overlays
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
luminosity = 0
|
||||
if(!opened)
|
||||
if(icon_door)
|
||||
. += "[icon_door]_door"
|
||||
else
|
||||
. += "[icon_state]_door"
|
||||
if(welded)
|
||||
. += icon_welded
|
||||
if(secure && !broken)
|
||||
//Overlay is similar enough for both that we can use the same mask for both
|
||||
luminosity = 1
|
||||
SSvis_overlays.add_vis_overlay(src, icon, "locked", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
|
||||
if(locked)
|
||||
. += "locked"
|
||||
else
|
||||
. += "unlocked"
|
||||
else
|
||||
if(icon_door_override)
|
||||
. += "[icon_door]_open"
|
||||
else
|
||||
. += "[icon_state]_open"
|
||||
if(opened)
|
||||
. += "[icon_door_override ? icon_door : icon_state]_open"
|
||||
return
|
||||
|
||||
. += "[icon_door || icon_state]_door"
|
||||
if(welded)
|
||||
. += icon_welded
|
||||
|
||||
if(broken || !secure)
|
||||
return
|
||||
//Overlay is similar enough for both that we can use the same mask for both
|
||||
SSvis_overlays.add_vis_overlay(src, icon, "locked", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
|
||||
. += locked ? "locked" : "unlocked"
|
||||
|
||||
/obj/structure/closet/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -168,7 +164,7 @@
|
||||
if(!dense_when_open)
|
||||
density = FALSE
|
||||
dump_contents()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
after_open(user, force)
|
||||
return TRUE
|
||||
|
||||
@@ -224,7 +220,7 @@
|
||||
playsound(loc, close_sound, close_sound_volume, TRUE, -3)
|
||||
opened = FALSE
|
||||
density = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
after_close(user)
|
||||
return TRUE
|
||||
|
||||
@@ -294,7 +290,7 @@
|
||||
"<span class='notice'>You [welded ? "weld" : "unwelded"] \the [src] with \the [W].</span>",
|
||||
"<span class='hear'>You hear welding.</span>")
|
||||
log_game("[key_name(user)] [welded ? "welded":"unwelded"] closet [src] with [W] at [AREACOORD(src)]")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else if(W.tool_behaviour == TOOL_WRENCH && anchorable)
|
||||
if(isinspace() && !anchored)
|
||||
return
|
||||
@@ -466,7 +462,7 @@
|
||||
locked = !locked
|
||||
user.visible_message("<span class='notice'>[user] [locked ? null : "un"]locks [src].</span>",
|
||||
"<span class='notice'>You [locked ? null : "un"]lock [src].</span>")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else if(!silent)
|
||||
to_chat(user, "<span class='alert'>Access Denied.</span>")
|
||||
else if(secure && broken)
|
||||
@@ -481,7 +477,7 @@
|
||||
playsound(src, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
broken = TRUE
|
||||
locked = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
@@ -497,7 +493,7 @@
|
||||
if(secure && !broken && !(. & EMP_PROTECT_SELF))
|
||||
if(prob(50 / severity))
|
||||
locked = !locked
|
||||
update_icon()
|
||||
update_appearance()
|
||||
if(prob(20 / severity) && !opened)
|
||||
if(!locked)
|
||||
open()
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
if(t)
|
||||
name = "[initial(name)] - [t]"
|
||||
tagged = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
else
|
||||
name = initial(name)
|
||||
return
|
||||
@@ -47,7 +47,7 @@
|
||||
to_chat(user, "<span class='notice'>You cut the tag off [src].</span>")
|
||||
name = "body bag"
|
||||
tagged = FALSE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/structure/closet/body_bag/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
if(allowed(user) || !registered_name || (istype(I) && (registered_name == I.registered_name)))
|
||||
//they can open all lockers, or nobody owns this, or they own this locker
|
||||
locked = !locked
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
if(!registered_name)
|
||||
registered_name = I.registered_name
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user