Port TG updating appearances (#17943)

* Get pants that match or else you gonna look silly yo

* Posters

* Fix other hud elements

* Rereviewed

* Update shotglass.dm

* Fix for new merged PRs

* Typo

* Coming across other stuff

* Update theblob.dm

* No takebacksies

* smh i forget to leave a comment

* Updated for the detgun and cards

* Should have rerun langserver again

* No longer plastic, more in scope

* Damn you bluespace

* Reverting turret logic, out of scope at this point

* Tweak that part

* Went over energy guns again, and fixed UI White's sprite sheet

* Welding masks, glasses, and JUSTICE

* Update portable_atmospherics.dm

* Cleaning up, clearing things up

* Review and suggestions

* Update valve.dm

* More tweaks

* Missing character

* Not distinct lightmasks, so they can be overlays

* Update generator.dm

* Add parameter so holodeck doesn't try to make a perfect copy

* Update unsorted.dm

* Spiders

* Better fix for spiders, fix vamps too

* Ghosts

* Update telekinesis.dm

* Cleaning up old procs

* It's set up to not copy datums... Unless they're in a list

* Donuts, duct tape, and detgun. D3VR coming to Early Access

* Update procs that interact with doors so they call update_state instead

* Forgot one spot, and actually might as well just force lock

* Cleaning up other things... Sigh, and kitty ears

* oops

* Getting used to how it works

* blinds

* Going back to the suit obscuring thing, so it doesn't update all the time

* Missed that from merging master

* I made this PR and forgot about it

* Fix runtimes in cards

* Make things a bit more unified

* Update update_icons.dm

* yarn, really?

* Update library_equipment.dm

* Update shieldgen.dm

* Every time Charlie merges something, I go back and see if I can improve things further

* what's this? more?

* Update misc_special.dm

* wow, paper

* Review

* More reviews

* To be sure, seems like being broken messed something sometimes

* Brought airlocks closer to how TG works to iron out some stuff

* Pizza and morgue

* Doesn't seem to hurt, tried with holodeck

* Revert "Doesn't seem to hurt, tried with holodeck"

This reverts commit 158529302b.

* Icon conflict

* Fix organ damage

* Don't ask how. Why. It's like that on prod too.

* Cutting down on things and updating from TG.

* More flexible. Just in case the thing you stuck it on didn't destroy.

* Hydro was one the things I touched earlier on, better rework it

* Reviews

* Cleaning up further, also bri'ish

* Undo a change I did, and switch over to a more recent implementation

* Update biogenerator.dm

* Rolling back to old airlocks, but with new duct taped note

* Functionally the same. I'd just rather not have the smoothing happen there

* Went over APCs again

* Fix welding helmet names in species files

* Update airlock.dm

* Update persistent_overlay.dm

* Oh, topic
This commit is contained in:
Vi3trice
2022-07-21 08:11:59 +02:00
committed by GitHub
parent aa06a09f5f
commit f4b37b4177
429 changed files with 3487 additions and 3296 deletions
+5 -6
View File
@@ -34,7 +34,7 @@
loaded.amount = amount
else
return
update_icon()
update_icon(UPDATE_ICON_STATE)
to_chat(user, "<span class='notice'>You add the cables to [src]. It now contains [loaded.amount].</span>")
else
..()
@@ -58,7 +58,7 @@
loaded.forceMove(user.loc)
user.put_in_hands(loaded)
loaded = null
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/twohanded/rcl/examine(mob/user)
. = ..()
@@ -71,7 +71,7 @@
active = FALSE
return ..()
/obj/item/twohanded/rcl/update_icon()
/obj/item/twohanded/rcl/update_icon_state()
if(!loaded)
icon_state = "rcl-0"
item_state = "rcl-0"
@@ -89,10 +89,9 @@
else
icon_state = "rcl-0"
item_state = "rcl-0"
..()
/obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
update_icon()
update_icon(UPDATE_ICON_STATE)
if(!loaded || !loaded.amount)
if(loud)
to_chat(user, "<span class='notice'>The last of the cables unreel from [src].</span>")
@@ -151,4 +150,4 @@
loaded = new()
loaded.max_amount = max_amount
loaded.amount = max_amount
update_icon()
update_icon(UPDATE_ICON_STATE)
+2 -3
View File
@@ -16,10 +16,9 @@
/obj/item/stack/spacecash/New(loc, amt = null)
..()
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/stack/spacecash/update_icon()
..()
/obj/item/stack/spacecash/update_icon_state()
name = "[amount == max_amount ? "1000000" : amount] Credit[amount > 1 ? "s" : ""]"
if(amount >= 1 && amount < 10)
icon_state = "cashgreen"
@@ -63,8 +63,8 @@
TED = new(src.loc)
qdel(src)
/obj/item/gun/energy/chrono_gun/update_icon()
return
/obj/item/gun/energy/chrono_gun/update_overlays()
return list()
/obj/item/gun/energy/chrono_gun/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override, bonus_spread = 0)
if(field)
@@ -177,7 +177,7 @@
cached_icon.Insert(mob_icon, "frame[i]")
mob_underlay = mutable_appearance(cached_icon, "frame1")
update_icon()
update_icon(UPDATE_ICON_STATE)
desc = initial(desc) + "<br><span class='info'>It appears to contain [target.name].</span>"
START_PROCESSING(SSobj, src)
@@ -188,7 +188,7 @@
gun.field_disconnect(src)
return ..()
/obj/structure/chrono_field/update_icon()
/obj/structure/chrono_field/update_icon_state()
var/ttk_frame = 1 - (tickstokill / initial(tickstokill))
ttk_frame = clamp(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
if(ttk_frame != RPpos)
@@ -217,7 +217,7 @@
captured.Paralyse(8 SECONDS)
if(captured.loc != src)
captured.forceMove(src)
update_icon()
update_icon(UPDATE_ICON_STATE)
if(gun)
if(gun.field_check(src))
tickstokill--
+50 -54
View File
@@ -33,17 +33,16 @@
/obj/item/defibrillator/Initialize(mapload) //starts without a cell for rnd
. = ..()
paddles = new paddle_type(src)
update_icon()
update_icon(UPDATE_OVERLAYS)
/obj/item/defibrillator/loaded/Initialize(mapload) //starts with hicap
. = ..()
cell = new(src)
update_icon()
update_icon(UPDATE_OVERLAYS)
/obj/item/defibrillator/update_icon()
/obj/item/defibrillator/update_icon(updates=ALL)
update_power()
update_overlays()
update_charge()
..()
/obj/item/defibrillator/examine(mob/user)
. = ..()
@@ -58,28 +57,25 @@
else
powered = FALSE
/obj/item/defibrillator/proc/update_overlays()
overlays.Cut()
/obj/item/defibrillator/update_overlays()
. = ..()
if(paddles_on_defib)
overlays += "[icon_state]-paddles"
if(powered)
overlays += "[icon_state]-powered"
if(!cell)
overlays += "[icon_state]-nocell"
. += "[icon_state]-paddles"
if(!safety)
overlays += "[icon_state]-emagged"
/obj/item/defibrillator/proc/update_charge()
if(powered) //so it doesn't show charge if it's unpowered
if(cell)
var/ratio = cell.charge / cell.maxcharge
ratio = CEILING(ratio*4, 1) * 25
overlays += "[icon_state]-charge[ratio]"
. += "[icon_state]-emagged"
if(powered)
. += "[icon_state]-powered"
if(powered && cell)
var/ratio = cell.charge / cell.maxcharge
ratio = CEILING(ratio*4, 1) * 25
. += "[icon_state]-charge[ratio]"
if(!cell)
. += "[icon_state]-nocell"
/obj/item/defibrillator/CheckParts(list/parts_list)
..()
cell = locate(/obj/item/stock_parts/cell) in contents
update_icon()
update_icon(UPDATE_OVERLAYS)
/obj/item/defibrillator/ui_action_click()
toggle_paddles()
@@ -109,7 +105,7 @@
cell = null
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
update_icon()
update_icon(UPDATE_OVERLAYS)
return
/obj/item/defibrillator/emag_act(user as mob)
@@ -131,7 +127,7 @@
safety = TRUE
visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
playsound(get_turf(src), 'sound/machines/defib_saftyon.ogg', 50, 0)
update_icon()
update_icon(UPDATE_OVERLAYS)
..()
/obj/item/defibrillator/verb/toggle_paddles()
@@ -146,7 +142,7 @@
if(!usr.put_in_hands(paddles))
to_chat(user, "<span class='warning'>You need a free hand to hold the paddles!</span>")
update_icon()
update_icon(UPDATE_OVERLAYS)
return
paddles.loc = user
paddles_on_defib = FALSE
@@ -154,7 +150,7 @@
//Remove from their hands and back onto the defib unit
remove_paddles(user)
update_icon()
update_icon(UPDATE_OVERLAYS)
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
@@ -163,7 +159,7 @@
..()
if(slot != slot_back)
remove_paddles(user)
update_icon()
update_icon(UPDATE_OVERLAYS)
/obj/item/defibrillator/item_action_slot_check(slot, mob/user)
if(slot == slot_back)
@@ -174,7 +170,7 @@
if(paddles in get_both_hands(M))
M.unEquip(paddles)
paddles_on_defib = TRUE
update_icon()
update_icon(UPDATE_OVERLAYS)
return
/obj/item/defibrillator/Destroy()
@@ -189,12 +185,12 @@
if(cell)
if(cell.charge < (paddles.revivecost+chrgdeductamt))
powered = FALSE
update_icon()
update_icon(UPDATE_OVERLAYS)
if(cell.use(chrgdeductamt))
update_icon()
update_icon(UPDATE_OVERLAYS)
return TRUE
else
update_icon()
update_icon(UPDATE_OVERLAYS)
return FALSE
/obj/item/defibrillator/proc/cooldowncheck(mob/user)
@@ -207,8 +203,8 @@
user.visible_message("<span class='notice'>[src] beeps: Charge depleted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
paddles.cooldown = FALSE
paddles.update_icon()
update_icon()
paddles.update_icon(UPDATE_ICON_STATE)
update_icon(UPDATE_OVERLAYS)
/obj/item/defibrillator/compact
name = "compact defibrillator"
@@ -223,7 +219,7 @@
/obj/item/defibrillator/compact/loaded/Initialize(mapload)
. = ..()
cell = new(src)
update_icon()
update_icon(UPDATE_OVERLAYS)
/obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user)
if(slot == slot_belt)
@@ -242,7 +238,7 @@
/obj/item/defibrillator/compact/combat/loaded/Initialize(mapload)
. = ..()
cell = new(src)
update_icon()
update_icon(UPDATE_OVERLAYS)
/obj/item/defibrillator/compact/advanced
name = "advanced compact defibrillator"
@@ -260,12 +256,12 @@
if(W == paddles)
paddles.unwield()
toggle_paddles()
update_icon()
update_icon(UPDATE_OVERLAYS)
/obj/item/defibrillator/compact/advanced/loaded/Initialize(mapload)
. = ..()
cell = new /obj/item/stock_parts/cell/bluespace/charging(src)
update_icon()
update_icon(UPDATE_OVERLAYS)
/obj/item/defibrillator/compact/advanced/emp_act(severity)
if(world.time > next_emp_message)
@@ -277,7 +273,7 @@
if(W == paddles)
paddles.unwield()
toggle_paddles()
update_icon()
update_icon(UPDATE_OVERLAYS)
return
//paddles
@@ -306,10 +302,10 @@
defib = mainunit
loc = defib
busy = FALSE
update_icon()
update_icon(UPDATE_ICON_STATE)
return
/obj/item/twohanded/shockpaddles/update_icon()
/obj/item/twohanded/shockpaddles/update_icon_state()
icon_state = "[base_icon_state][wielded]"
item_state = "[base_icon_state][wielded]"
if(cooldown)
@@ -330,8 +326,8 @@
to_chat(user, "<span class='notice'>The paddles snap back into the main unit.</span>")
defib.paddles_on_defib = TRUE
loc = defib
defib.update_icon()
update_icon()
defib.update_icon(UPDATE_OVERLAYS)
update_icon(UPDATE_ICON_STATE)
unwield(user)
/obj/item/twohanded/shockpaddles/on_mob_move(dir, mob/user)
@@ -384,12 +380,12 @@
defib.deductcharge(revivecost)
cooldown = TRUE
busy = FALSE
update_icon()
update_icon(UPDATE_ICON_STATE)
defib.cooldowncheck(user)
return
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
busy = TRUE
update_icon()
update_icon(UPDATE_ICON_STATE)
var/mob/dead/observer/ghost = H.get_ghost(TRUE)
if(ghost && ghost.can_reenter_corpse)
to_chat(ghost, "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)")
@@ -415,14 +411,14 @@
user.visible_message("<span class='notice'>[defib] buzzes: Patient's chest is obscured. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = FALSE
update_icon()
update_icon(UPDATE_ICON_STATE)
return
if(H.undergoing_cardiac_arrest())
if(!H.get_int_organ(/obj/item/organ/internal/heart) && !H.get_int_organ(/obj/item/organ/internal/brain/slime)) //prevents defibing someone still alive suffering from a heart attack attack if they lack a heart
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Failed to pick up any heart electrical activity.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = FALSE
update_icon()
update_icon(UPDATE_ICON_STATE)
return
else
var/obj/item/organ/internal/heart/heart = H.get_int_organ(/obj/item/organ/internal/heart)
@@ -430,7 +426,7 @@
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Heart necrosis detected.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = FALSE
update_icon()
update_icon(UPDATE_ICON_STATE)
return
H.set_heartattack(FALSE)
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK, 100)
@@ -442,7 +438,7 @@
defib.deductcharge(revivecost)
busy = FALSE
cooldown = TRUE
update_icon()
update_icon(UPDATE_ICON_STATE)
defib.cooldowncheck(user)
return
if(H.stat == DEAD)
@@ -497,14 +493,14 @@
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
defib.deductcharge(revivecost)
update_icon()
cooldown = TRUE
update_icon(UPDATE_ICON_STATE)
defib.cooldowncheck(user)
else
user.visible_message("<span class='notice'>[defib] buzzes: Patient is not in a valid state. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = FALSE
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/borg_defib
name = "defibrillator paddles"
@@ -551,10 +547,10 @@
R.cell.use(revivecost)
cooldown = TRUE
busy = FALSE
update_icon()
update_icon(UPDATE_ICON_STATE)
spawn(50)
cooldown = FALSE
update_icon()
update_icon(UPDATE_ICON_STATE)
return
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
busy = TRUE
@@ -619,16 +615,16 @@
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
update_icon()
cooldown = TRUE
update_icon(UPDATE_ICON_STATE)
spawn(50)
cooldown = FALSE
update_icon()
update_icon(UPDATE_ICON_STATE)
else
user.visible_message("<span class='notice'>[user] buzzes: Patient is not in a valid state. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = FALSE
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/twohanded/shockpaddles/syndicate
name = "combat defibrillator paddles"
+6 -6
View File
@@ -304,8 +304,8 @@
icon_state = "d100"
sides = 100
/obj/item/dice/d100/update_icon()
return
/obj/item/dice/d100/update_overlays()
return list()
/obj/item/dice/d20/e20
var/triggered = FALSE
@@ -333,7 +333,7 @@
comment = "NAT 20!"
else if(sides == 20 && result == 1)
comment = "Ouch, bad luck."
update_icon()
update_icon(UPDATE_OVERLAYS)
if(initial(icon_state) == "d00")
result = (result - 1) * 10
if(length(special_faces) == sides)
@@ -375,9 +375,9 @@
log_game("E20 detonated at [A.name] ([epicenter.x],[epicenter.y],[epicenter.z]) with a roll of [actual_result]. Triggered by: [key_name(user)]")
add_attack_logs(user, src, "detonated with a roll of [actual_result]", ATKLOG_FEW)
/obj/item/dice/update_icon()
overlays.Cut()
overlays += "[icon_state][result]"
/obj/item/dice/update_overlays()
. = ..()
. += "[icon_state][result]"
/obj/item/storage/box/dice
name = "Box of dice"
@@ -6,7 +6,7 @@
icon_state = "lepopen"
var/used = FALSE
/obj/item/dnascrambler/update_icon()
/obj/item/dnascrambler/update_icon_state()
if(used)
icon_state = "lepopen0"
else
@@ -52,5 +52,5 @@
add_attack_logs(user, target, "injected with [src]")
used = TRUE
update_icon()
update_icon(UPDATE_ICON_STATE)
name = "used " + name
@@ -33,14 +33,14 @@
assemblyattacher = user.ckey
to_chat(user, "<span class='notice'>You add [A] to [src].</span>")
playsound(src, 'sound/weapons/tap.ogg', 20, 1)
update_icon()
update_icon(UPDATE_ICON_STATE)
return
if(nadeassembly && istype(I, /obj/item/wirecutters))
playsound(src, I.usesound, 20, 1)
nadeassembly.loc = get_turf(src)
nadeassembly.master = null
nadeassembly = null
update_icon()
update_icon(UPDATE_ICON_STATE)
return
..()
@@ -80,16 +80,16 @@
if(do_after(user, 50 * toolspeed, target = AM))
if(!user.unEquip(src))
return
src.target = AM
target = AM
loc = null
message_admins("[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>) with [det_time] second fuse",0,1)
log_game("[key_name(user)] planted [name] on [target.name] at ([target.x],[target.y],[target.z]) with [det_time] second fuse")
target.overlays += image_overlay
AddComponent(/datum/component/persistent_overlay, image_overlay, target)
if(!nadeassembly)
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>")
addtimer(CALLBACK(src, .proc/prime), det_time*10)
addtimer(CALLBACK(src, .proc/prime), det_time SECONDS)
/obj/item/grenade/plastic/suicide_act(mob/user)
message_admins("[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) suicided with [src.name] at ([user.x],[user.y],[user.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",0,1)
@@ -120,7 +120,7 @@
user.gib()
return OBLITERATION
/obj/item/grenade/plastic/update_icon()
/obj/item/grenade/plastic/update_icon_state()
if(nadeassembly)
icon_state = "[item_state]1"
else
@@ -153,7 +153,6 @@
if(target)
if(!QDELETED(target))
location = get_turf(target)
target.overlays -= image_overlay
if(!ex_breach && istype(target, /turf/simulated/wall)) //Walls get dismantled instead of destroyed to avoid making unwanted holes to space.
var/turf/simulated/wall/W = target
W.dismantle_wall(TRUE, TRUE)
@@ -219,7 +218,6 @@
if(target)
if(!QDELETED(target))
location = get_turf(target)
target.overlays -= image_overlay
else
location = get_turf(src)
if(location)
@@ -48,14 +48,8 @@
igniter.flamethrower_process(location)
/obj/item/flamethrower/update_icon()
cut_overlays()
if(igniter)
add_overlay("+igniter[status]")
if(ptank)
add_overlay("+ptank")
/obj/item/flamethrower/update_icon_state()
if(lit)
add_overlay("+lit")
item_state = "flamethrower_1"
else
item_state = "flamethrower_0"
@@ -64,6 +58,15 @@
M.update_inv_l_hand()
M.update_inv_r_hand()
/obj/item/flamethrower/update_overlays()
. = ..()
if(igniter)
. += "+igniter[status]"
if(ptank)
. += "+ptank"
if(lit)
. += "+lit"
/obj/item/flamethrower/can_enter_storage(obj/item/storage/S, mob/user)
if(lit)
to_chat(user, "<span class='warning'>[S] can't hold [src] while it's lit!</span>")
+12 -20
View File
@@ -10,32 +10,24 @@
icon_state = "garrot_wrap"
w_class = WEIGHT_CLASS_TINY
var/mob/living/carbon/human/strangling
var/improvised = 0
var/improvised = FALSE
var/garrote_time
/obj/item/twohanded/garrote/Destroy()
strangling = null
return ..()
/obj/item/twohanded/garrote/update_icon()
/obj/item/twohanded/garrote/update_icon_state()
if(strangling) // If we're strangling someone we want our icon to stay wielded
icon_state = "garrot_unwrap"
return
icon_state = "garrot_[wielded ? "un" : ""]wrap"
icon_state = "garrot_[improvised ? "I_" : ""]unwrap"
else
icon_state = "garrot_[improvised ? "I_" : ""][wielded ? "un" : ""]wrap"
/obj/item/twohanded/garrote/improvised // Made via tablecrafting
name = "garrote"
desc = "A length of cable with a shoddily-carved wooden handle tied to either end.<br>You suspect you'd have to be behind the target to use this weapon effectively."
icon_state = "garrot_I_wrap"
improvised = 1
/obj/item/twohanded/garrote/improvised/update_icon()
if(strangling)
icon_state = "garrot_I_unwrap"
return
icon_state = "garrot_I_[wielded ? "un" : ""]wrap"
improvised = TRUE
/obj/item/twohanded/garrote/wield(mob/living/carbon/user)
if(strangling)
@@ -43,7 +35,7 @@
"<span class='warning'>You remove [src] from [strangling]'s neck.</span>")
strangling = null
update_icon()
update_icon(UPDATE_ICON_STATE)
STOP_PROCESSING(SSobj, src)
else
@@ -99,7 +91,7 @@
garrote_time = world.time + 10
START_PROCESSING(SSobj, src)
strangling = M
update_icon()
update_icon(UPDATE_ICON_STATE)
playsound(src.loc, 'sound/weapons/cablecuff.ogg', 15, 1, -1)
@@ -112,14 +104,14 @@
/obj/item/twohanded/garrote/process()
if(!strangling)
// Our mark got gibbed or similar
update_icon()
update_icon(UPDATE_ICON_STATE)
STOP_PROCESSING(SSobj, src)
return
if(!istype(loc, /mob/living/carbon/human))
strangling = null
update_icon()
update_icon(UPDATE_ICON_STATE)
STOP_PROCESSING(SSobj, src)
return
@@ -137,7 +129,7 @@
"<span class='warning'>You lose your grip on [strangling]'s neck.</span>")
strangling = null
update_icon()
update_icon(UPDATE_ICON_STATE)
STOP_PROCESSING(SSobj, src)
return
@@ -147,7 +139,7 @@
"<span class='warning'>You lose your grip on [strangling]'s neck.</span>")
strangling = null
update_icon()
update_icon(UPDATE_ICON_STATE)
STOP_PROCESSING(SSobj, src)
return
@@ -50,22 +50,10 @@
return O
return null
/obj/item/grenade/chem_grenade/proc/update_overlays()
underlays = list()
if(nadeassembly)
underlays += "[nadeassembly.a_left.icon_state]_left"
for(var/O in nadeassembly.a_left.attached_overlays)
underlays += "[O]_l"
underlays += "[nadeassembly.a_right.icon_state]_right"
for(var/O in nadeassembly.a_right.attached_overlays)
underlays += "[O]_r"
/obj/item/grenade/chem_grenade/update_icon()
/obj/item/grenade/chem_grenade/update_icon_state()
if(nadeassembly)
icon = 'icons/obj/assemblies/new_assemblies.dmi'
icon_state = bomb_state
update_overlays()
var/obj/item/assembly/A = get_trigger()
if(stage != READY)
name = "bomb casing[label]"
@@ -90,6 +78,15 @@
else
icon_state += "_locked"
name = payload_name + "grenade" + label
underlays.Cut()
if(nadeassembly)
underlays += "[nadeassembly.a_left.icon_state]_left"
for(var/O in nadeassembly.a_left.attached_overlays)
underlays += "[O]_l"
underlays += "[nadeassembly.a_right.icon_state]_right"
for(var/O in nadeassembly.a_right.attached_overlays)
underlays += "[O]_r"
/obj/item/grenade/chem_grenade/attack_self(mob/user)
@@ -98,7 +95,7 @@
var/area/A = get_area(bombturf)
if(nadeassembly)
nadeassembly.attack_self(user)
update_icon()
update_icon(UPDATE_ICON_STATE)
else if(clown_check(user))
// This used to go before the assembly check, but that has absolutely zero to do with priming the damn thing. You could spam the admins with it.
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) [contained].")
@@ -133,7 +130,7 @@
else
if(label)
label = null
update_icon()
update_icon(UPDATE_ICON_STATE)
to_chat(user, "You remove the label from [src].")
return 1
if(istype(I, /obj/item/screwdriver))
@@ -142,7 +139,7 @@
to_chat(user, "<span class='notice'>You lock the assembly.</span>")
playsound(loc, prime_sound, 25, -3)
stage = READY
update_icon()
update_icon(UPDATE_ICON_STATE)
contained = ""
cores = "" // clear them out so no recursive logging by accidentally
for(var/obj/O in beakers)
@@ -195,7 +192,7 @@
assemblyattacher = user.ckey
stage = WIRED
to_chat(user, "<span class='notice'>You add [A] to [src]!</span>")
update_icon()
update_icon(UPDATE_ICON_STATE)
else if(stage == EMPTY && istype(I, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = I
@@ -203,12 +200,12 @@
stage = WIRED
to_chat(user, "<span class='notice'>You rig [src].</span>")
update_icon()
update_icon(UPDATE_ICON_STATE)
else if(stage == READY && istype(I, /obj/item/wirecutters))
to_chat(user, "<span class='notice'>You unlock the assembly.</span>")
stage = WIRED
update_icon()
update_icon(UPDATE_ICON_STATE)
else if(stage == WIRED && istype(I, /obj/item/wrench))
to_chat(user, "<span class='notice'>You open the grenade and remove the contents.</span>")
@@ -223,7 +220,7 @@
for(var/obj/O in beakers)
O.forceMove(get_turf(src))
beakers = list()
update_icon()
update_icon(UPDATE_ICON_STATE)
//assembly stuff
@@ -286,7 +283,7 @@
O.forceMove(get_turf(src))
beakers = list()
stage = EMPTY
update_icon()
update_icon(UPDATE_ICON_STATE)
return
if(nadeassembly)
@@ -448,7 +445,7 @@
beakers += B1
beakers += B2
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/grenade/chem_grenade/firefighting
@@ -466,7 +463,7 @@
beakers += B1
beakers += B2
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/grenade/chem_grenade/incendiary
payload_name = "incendiary"
@@ -485,7 +482,7 @@
beakers += B1
beakers += B2
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/grenade/chem_grenade/antiweed
@@ -506,7 +503,7 @@
beakers += B1
beakers += B2
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/grenade/chem_grenade/cleaner
@@ -526,7 +523,7 @@
beakers += B1
beakers += B2
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/grenade/chem_grenade/teargas
@@ -546,7 +543,7 @@
beakers += B1
beakers += B2
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/grenade/chem_grenade/facid
payload_name = "acid smoke"
@@ -566,7 +563,7 @@
beakers += B1
beakers += B2
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/grenade/chem_grenade/saringas
payload_name = "sarin gas"
@@ -585,7 +582,7 @@
beakers += B1
beakers += B2
update_icon()
update_icon(UPDATE_ICON_STATE)
#undef EMPTY
#undef WIRED
@@ -42,8 +42,6 @@
/obj/item/implanter/mindshield/New()
imp = new /obj/item/implant/mindshield(src)
..()
update_icon()
/obj/item/implantcase/mindshield
name = "implant case - 'mindshield'"
@@ -12,18 +12,22 @@
materials = list(MAT_GLASS=500)
var/obj/item/implant/imp = null
/obj/item/implantcase/update_icon()
/obj/item/implantcase/proc/update_state()
if(imp)
icon_state = "implantcase-[imp.item_color]"
origin_tech = imp.origin_tech
flags = imp.flags & ~DROPDEL
reagents = imp.reagents
else
icon_state = "implantcase-0"
origin_tech = initial(origin_tech)
flags = initial(flags)
reagents = null
update_icon(UPDATE_ICON_STATE)
/obj/item/implantcase/update_icon_state()
if(imp)
icon_state = "implantcase-[imp.item_color]"
else
icon_state = "implantcase-0"
/obj/item/implantcase/attackby(obj/item/W, mob/user, params)
@@ -38,8 +42,8 @@
I.imp.loc = src
imp = I.imp
I.imp = null
update_icon()
I.update_icon()
update_state()
I.update_icon(UPDATE_ICON_STATE)
else
if(imp)
if(I.imp)
@@ -47,8 +51,8 @@
imp.loc = I
I.imp = imp
imp = null
update_icon()
I.update_icon()
update_state()
I.update_icon(UPDATE_ICON_STATE)
/*else if(istype(W, /obj/item/ammo_casing/shotgun/implanter))
var/obj/item/ammo_casing/shotgun/implanter/I = W
@@ -57,7 +61,7 @@
/obj/item/implantcase/New()
..()
update_icon()
update_state()
/obj/item/implantcase/tracking
@@ -13,7 +13,7 @@
var/obj/item/implant/imp = null
/obj/item/implanter/update_icon()
/obj/item/implanter/update_icon_state()
if(imp)
icon_state = "implanter1"
origin_tech = imp.origin_tech
@@ -38,7 +38,7 @@
else
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
imp = null
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/implanter/attackby(obj/item/W, mob/user, params)
..()
@@ -48,7 +48,7 @@
/obj/item/implanter/New()
..()
spawn(1)
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/implanter/adrenalin
@@ -14,12 +14,11 @@
dropcase()
return ..()
/obj/item/implantpad/update_icon()
/obj/item/implantpad/update_icon_state()
if(case)
src.icon_state = "implantpad-1"
icon_state = "implantpad-1"
else
src.icon_state = "implantpad-0"
return
icon_state = "implantpad-0"
/obj/item/implantpad/proc/addcase(mob/user as mob, obj/item/implantcase/C as obj)
if(!user || !C)
@@ -30,7 +29,7 @@
user.unEquip(C)
C.forceMove(src)
case = C
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/implantpad/proc/dropcase(mob/user as mob)
if(!case)
@@ -41,12 +40,12 @@
add_fingerprint(user)
case.add_fingerprint(user)
case = null
update_icon()
update_icon(UPDATE_ICON_STATE)
return
case.forceMove(get_turf(src))
case = null
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/implantpad/verb/remove_implant()
set category = "Object"
+2 -2
View File
@@ -26,7 +26,7 @@
/obj/item/restraints/legcuffs/beartrap/New()
..()
/obj/item/restraints/legcuffs/beartrap/update_icon()
/obj/item/restraints/legcuffs/beartrap/update_icon_state()
icon_state = "beartrap[armed]"
/obj/item/restraints/legcuffs/beartrap/Destroy()
@@ -43,7 +43,7 @@
..()
if(ishuman(user) && !user.stat && !user.restrained())
armed = !armed
update_icon()
update_icon(UPDATE_ICON_STATE)
to_chat(user, "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>")
/obj/item/restraints/legcuffs/beartrap/attackby(obj/item/I, mob/user) //Let's get explosive.
+1 -2
View File
@@ -70,9 +70,8 @@
return ..()
/obj/item/mop/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
J.mymop = src
J.put_in_cart(src, user)
J.mymop=src
J.update_icon()
/obj/item/mop/wash(mob/user, atom/source)
reagents.add_reagent("water", 5)
+1
View File
@@ -14,6 +14,7 @@
possible_transfer_amounts = list(5,10,20,30,50,70)
volume = 70
container_type = OPENCONTAINER
blocks_emissive = EMISSIVE_BLOCK_GENERIC
/obj/item/reagent_containers/glass/paint/afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity)
+20 -29
View File
@@ -45,7 +45,7 @@
playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1)
return TOXLOSS
/obj/item/storage/bag/trash/update_icon()
/obj/item/storage/bag/trash/update_icon_state()
switch(contents.len)
if(21 to INFINITY)
icon_state = "[initial(icon_state)]3"
@@ -59,14 +59,12 @@
var/mob/living/carbon/human/H = loc
H.update_inv_l_hand()
H.update_inv_r_hand()
..()
/obj/item/storage/bag/trash/cyborg
/obj/item/storage/bag/trash/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
J.mybag = src
J.put_in_cart(src, user)
J.mybag=src
J.update_icon()
/obj/item/storage/bag/trash/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
return
@@ -405,58 +403,51 @@
if(prob(10))
M.Weaken(4 SECONDS)
/obj/item/storage/bag/tray/proc/rebuild_overlays()
overlays.Cut()
/obj/item/storage/bag/tray/update_icon_state()
return
/obj/item/storage/bag/tray/update_overlays()
. = ..()
for(var/obj/item/I in contents)
overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = -1)
/obj/item/storage/bag/tray/remove_from_storage(obj/item/W as obj, atom/new_location)
..()
rebuild_overlays()
/obj/item/storage/bag/tray/handle_item_insertion(obj/item/I, prevent_warning = 0)
overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = -1)
..()
. += image(icon = I.icon, icon_state = I.icon_state, layer = -1)
/obj/item/storage/bag/tray/cyborg
/obj/item/storage/bag/tray/cyborg/afterattack(atom/target, mob/user as mob)
if( isturf(target) || istype(target,/obj/structure/table) )
var/foundtable = istype(target,/obj/structure/table/)
if( !foundtable ) //it must be a turf!
var/found_table = istype(target,/obj/structure/table/)
if(!found_table) //it must be a turf!
for(var/obj/structure/table/T in target)
foundtable = 1
found_table = TRUE
break
var/turf/dropspot
if( !foundtable ) // don't unload things onto walls or other silly places.
if(!found_table) // don't unload things onto walls or other silly places.
dropspot = user.loc
else if( isturf(target) ) // they clicked on a turf with a table in it
dropspot = target
else // they clicked on a table
dropspot = target.loc
overlays = null
var/droppedSomething = 0
var/dropped_something = FALSE
for(var/obj/item/I in contents)
I.loc = dropspot
contents.Remove(I)
droppedSomething = 1
if(!foundtable && isturf(dropspot))
dropped_something = TRUE
if(!found_table && isturf(dropspot))
// if no table, presume that the person just shittily dropped the tray on the ground and made a mess everywhere!
spawn()
for(var/i = 1, i <= rand(1,2), i++)
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))
if( droppedSomething )
if( foundtable )
if(dropped_something)
if(found_table)
user.visible_message("<span class='notice'>[user] unloads [user.p_their()] service tray.</span>")
else
user.visible_message("<span class='notice'>[user] drops all the items on [user.p_their()] tray.</span>")
update_icon(UPDATE_OVERLAYS)
return ..()
@@ -466,8 +457,8 @@
/obj/item/storage/bag/tray/cookies_tray/populate_contents() // By Azule Utama, thank you a lot!
for(var/i in 1 to 6)
var/obj/item/C = new cookie(src)
handle_item_insertion(C) // Done this way so the tray actually has the cookies visible when spawned
rebuild_overlays()
C.in_inventory = TRUE
update_icon(UPDATE_OVERLAYS)
/obj/item/storage/bag/tray/cookies_tray/sugarcookie
cookie = /obj/item/reagent_containers/food/snacks/sugarcookie
@@ -13,14 +13,13 @@
/// Do we have overlays for items held inside the belt?
var/use_item_overlays = FALSE
/obj/item/storage/belt/update_icon()
/obj/item/storage/belt/update_overlays()
. = ..()
if(use_item_overlays)
cut_overlays()
for(var/obj/item/I in contents)
var/image/belt_image = image(icon, I.belt_icon)
belt_image.color = I.color
add_overlay(belt_image)
..()
. += belt_image
/obj/item/storage/belt/proc/can_use()
return is_equipped()
@@ -433,8 +432,7 @@
. = ..()
update_icon()
/obj/item/storage/belt/lazarus/update_icon()
..()
/obj/item/storage/belt/lazarus/update_icon_state()
icon_state = "[initial(icon_state)]_[length(contents)]"
/obj/item/storage/belt/lazarus/attackby(obj/item/I, mob/user)
@@ -465,8 +463,7 @@
for(var/I in 1 to 8)
new /obj/item/ammo_casing/shotgun/beanbag(src)
/obj/item/storage/belt/bandolier/update_icon()
..()
/obj/item/storage/belt/bandolier/update_icon_state()
icon_state = "[initial(icon_state)]_[length(contents)]"
/obj/item/storage/belt/bandolier/attackby(obj/item/I, mob/user)
@@ -611,13 +608,13 @@
return
playsound(src, 'sound/weapons/blade_unsheath.ogg', 20)
/obj/item/storage/belt/rapier/update_icon()
. = ..()
icon_state = initial(icon_state)
item_state = initial(item_state)
/obj/item/storage/belt/rapier/update_icon_state()
if(length(contents))
icon_state = "[icon_state]-rapier"
item_state = "[item_state]-rapier"
else
icon_state = initial(icon_state)
item_state = initial(item_state)
if(isliving(loc))
var/mob/living/L = loc
L.update_inv_belt()
@@ -724,10 +724,26 @@
foldable = null
var/design = NODESIGN
/obj/item/storage/box/papersack/update_icon()
if(!contents.len)
/obj/item/storage/box/papersack/update_desc()
. = ..()
switch(design)
if(NODESIGN)
desc = "A sack neatly crafted out of paper."
if(NANOTRASEN)
desc = "A standard Nanotrasen paper lunch sack for loyal employees on the go."
if(SYNDI)
desc = "The design on this paper sack is a remnant of the notorious 'SyndieSnacks' program."
if(HEART)
desc = "A paper sack with a heart etched onto the side."
if(SMILE)
desc = "A paper sack with a crude smile etched onto the side."
/obj/item/storage/box/papersack/update_icon_state()
item_state = "paperbag_[design]"
if(!length(contents))
icon_state = "[item_state]"
else icon_state = "[item_state]_closed"
else
icon_state = "[item_state]_closed"
/obj/item/storage/box/papersack/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
@@ -746,19 +762,7 @@
return
to_chat(usr, "<span class='notice'>You make some modifications to [src] using your pen.</span>")
design = switchDesign
icon_state = "paperbag_[design]"
item_state = "paperbag_[design]"
switch(design)
if(NODESIGN)
desc = "A sack neatly crafted out of paper."
if(NANOTRASEN)
desc = "A standard Nanotrasen paper lunch sack for loyal employees on the go."
if(SYNDI)
desc = "The design on this paper sack is a remnant of the notorious 'SyndieSnacks' program."
if(HEART)
desc = "A paper sack with a heart etched onto the side."
if(SMILE)
desc = "A paper sack with a crude smile etched onto the side."
update_appearance(UPDATE_DESC|UPDATE_ICON_STATE)
return
else if(is_sharp(W))
if(!contents.len)
@@ -18,10 +18,8 @@
resistance_flags = FLAMMABLE
var/icon_type
/obj/item/storage/fancy/update_icon(itemremoved = 0)
var/total_contents = length(contents) - itemremoved
icon_state = "[icon_type]box[total_contents]"
return
/obj/item/storage/fancy/update_icon_state()
icon_state = "[icon_type]box[length(contents)]"
/obj/item/storage/fancy/examine(mob/user)
. = ..()
@@ -48,23 +46,23 @@
foldable = /obj/item/stack/sheet/cardboard
foldable_amt = 1
/obj/item/storage/fancy/donut_box/update_icon()
overlays.Cut()
/obj/item/storage/fancy/donut_box/update_overlays()
. = ..()
for(var/I = 1 to length(contents))
var/obj/item/reagent_containers/food/snacks/donut/donut = contents[I]
var/icon/new_donut_icon = icon('icons/obj/food/containers.dmi', "donut_[donut.donut_sprite_type]")
new_donut_icon.Shift(EAST, 3 * (I-1))
overlays += new_donut_icon
. += new_donut_icon
overlays += icon('icons/obj/food/containers.dmi', "donutbox_front")
. += "donutbox_front"
/obj/item/storage/fancy/donut_box/populate_contents()
for(var/I in 1 to storage_slots)
new /obj/item/reagent_containers/food/snacks/donut(src)
update_icon()
update_icon(UPDATE_OVERLAYS)
/obj/item/storage/fancy/donut_box/empty/populate_contents()
update_icon(UPDATE_OVERLAYS)
return
/*
@@ -138,11 +136,11 @@
new /obj/item/toy/crayon/black(src)
update_icon()
/obj/item/storage/fancy/crayons/update_icon()
overlays = list() //resets list
overlays += image('icons/obj/crayons.dmi',"crayonbox")
/obj/item/storage/fancy/crayons/update_overlays()
. = ..()
. += image('icons/obj/crayons.dmi',"crayonbox")
for(var/obj/item/toy/crayon/crayon in contents)
overlays += image('icons/obj/crayons.dmi',crayon.colourName)
. += image('icons/obj/crayons.dmi',crayon.colourName)
/obj/item/storage/fancy/crayons/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/toy/crayon))
@@ -184,7 +182,7 @@
for(var/I in 1 to storage_slots)
new cigarette_type(src)
/obj/item/storage/fancy/cigarettes/update_icon()
/obj/item/storage/fancy/cigarettes/update_icon_state()
icon_state = "[initial(icon_state)][contents.len]"
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
@@ -325,10 +323,10 @@
for(var/I in 1 to storage_slots)
new /obj/item/rollingpaper(src)
/obj/item/storage/fancy/rollingpapers/update_icon()
overlays.Cut()
/obj/item/storage/fancy/rollingpapers/update_overlays()
. = ..()
if(!contents.len)
overlays += "[icon_state]_empty"
. += "[icon_state]_empty"
/*
* Vial Box
@@ -364,15 +362,18 @@
. = ..()
update_icon()
/obj/item/storage/lockbox/vials/update_icon()
/obj/item/storage/lockbox/vials/update_icon_state()
icon_state = "vialbox[length(contents)]"
cut_overlays()
/obj/item/storage/lockbox/vials/update_overlays()
. = ..()
if(!broken)
overlays += image(icon, src, "led[locked]")
. += "led[locked]"
if(locked)
overlays += image(icon, src, "cover")
. += "cover"
else
overlays += image(icon, src, "ledb")
. += "ledb"
/obj/item/storage/lockbox/vials/attackby(obj/item/I, mob/user, params)
..()
@@ -460,7 +460,7 @@
if(istype(src, /obj/item/storage/fancy))
var/obj/item/storage/fancy/F = src
F.update_icon(TRUE)
F.update_icon()
for(var/_M in mobs_viewing)
var/mob/M = _M
@@ -24,16 +24,16 @@
. = ..()
if(has_latches)
if(prob(10))
latches = "double_latch"
if(prob(1))
latches = "triple_latch"
update_icon()
else
latches = "double_latch"
update_icon(UPDATE_OVERLAYS)
/obj/item/storage/toolbox/update_icon()
..()
cut_overlays()
/obj/item/storage/toolbox/update_overlays()
. = ..()
if(has_latches)
add_overlay(latches)
. += latches
/obj/item/storage/toolbox/emergency
name = "emergency toolbox"
@@ -36,17 +36,16 @@
if(.)
if(W == front_id)
front_id = null
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/storage/wallet/handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
. = ..(W, prevent_warning)
if(.)
if(!front_id && istype(W, /obj/item/card/id))
front_id = W
update_icon()
/obj/item/storage/wallet/update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/storage/wallet/update_icon_state()
if(front_id)
switch(front_id.icon_state)
if("silver")
@@ -112,7 +111,7 @@
desc = "A cheap, [item_color] wallet from the arcade."
icon_state = "[item_color]_wallet"
/obj/item/storage/wallet/color/update_icon()
/obj/item/storage/wallet/color/update_icon_state()
if(front_id)
switch(front_id.icon_state)
if("silver")
+4 -4
View File
@@ -59,7 +59,7 @@
user.visible_message("<span class='suicide'>[user] is putting the live [name] in [user.p_their()] mouth! It looks like [user.p_theyre()] trying to commit suicide.</span>")
return FIRELOSS
/obj/item/melee/baton/update_icon()
/obj/item/melee/baton/update_icon_state()
if(turned_on)
icon_state = "[base_icon]_active"
else if(!cell)
@@ -97,7 +97,7 @@
if(cell.rigged)
cell = null
turned_on = FALSE
update_icon()
update_icon(UPDATE_ICON_STATE)
if(cell.charge < (hitcost)) // If after the deduction the baton doesn't have enough charge for a stun hit it turns off.
turned_on = FALSE
update_icon()
@@ -117,7 +117,7 @@
I.forceMove(src)
cell = I
to_chat(user, "<span class='notice'>You install [I] into [src].</span>")
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/melee/baton/screwdriver_act(mob/living/user, obj/item/I)
if(!cell)
@@ -131,7 +131,7 @@
cell.update_icon()
cell = null
turned_on = FALSE
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/melee/baton/attack_self(mob/user)
if(cell?.charge >= hitcost)
@@ -61,7 +61,7 @@
if(!silent)
to_chat(C, "<span class='warning'>You are not wearing a suitable mask or helmet.</span>")
return FALSE
if(M.mask_adjusted) // If the mask is equipped but pushed down
if(M.up) // If the mask is equipped but pushed away
M.adjustmask(C) // Adjust it back
if(!silent)
+2 -4
View File
@@ -10,8 +10,7 @@
/obj/item/stack/tape_roll/New(loc, amount=null)
..()
update_icon()
update_icon(UPDATE_ICON_STATE)
/obj/item/stack/tape_roll/attack(mob/living/carbon/human/M, mob/living/user)
if(!istype(M)) //What good is a duct tape mask if you are unable to speak?
@@ -42,7 +41,7 @@
M.equip_to_slot(G, slot_wear_mask)
G.add_fingerprint(user)
/obj/item/stack/tape_roll/update_icon()
/obj/item/stack/tape_roll/update_icon_state()
var/amount = get_amount()
if((amount <= 2) && (amount > 0))
icon_state = "taperoll"
@@ -54,4 +53,3 @@
icon_state = "taperoll-4"
else
icon_state = "taperoll-4"
..()
+9 -15
View File
@@ -202,9 +202,8 @@
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 30)
resistance_flags = FIRE_PROOF
/obj/item/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons.
/obj/item/twohanded/fireaxe/update_icon_state() //Currently only here to fuck with the on-mob icons.
icon_state = "fireaxe[wielded]"
..()
/obj/item/twohanded/fireaxe/afterattack(atom/A, mob/user, proximity)
if(!proximity)
@@ -221,7 +220,7 @@
force_wielded = 23
needs_permit = TRUE
/obj/item/twohanded/fireaxe/boneaxe/update_icon()
/obj/item/twohanded/fireaxe/boneaxe/update_icon_state()
icon_state = "bone_axe[wielded]"
/obj/item/twohanded/fireaxe/energized
@@ -231,7 +230,7 @@
var/charge = 30
var/max_charge = 30
/obj/item/twohanded/fireaxe/energized/update_icon()
/obj/item/twohanded/fireaxe/energized/update_icon_state()
if(wielded)
icon_state = "fireaxe2"
else
@@ -298,14 +297,13 @@
if(!blade_color)
blade_color = pick("red", "blue", "green", "purple")
/obj/item/twohanded/dualsaber/update_icon()
/obj/item/twohanded/dualsaber/update_icon_state()
if(wielded)
icon_state = "dualsaber[blade_color][wielded]"
set_light(brightness_on, l_color=colormap[blade_color])
else
icon_state = "dualsaber0"
set_light(0)
..()
/obj/item/twohanded/dualsaber/attack(mob/target, mob/living/user)
if(HAS_TRAIT(user, TRAIT_HULK))
@@ -406,7 +404,7 @@
needs_permit = TRUE
var/icon_prefix = "spearglass"
/obj/item/twohanded/spear/update_icon()
/obj/item/twohanded/spear/update_icon_state()
icon_state = "[icon_prefix][wielded]"
/obj/item/twohanded/spear/CheckParts(list/parts_list)
@@ -609,12 +607,11 @@
attack_verb = list("sawed", "cut", "hacked", "carved", "cleaved", "butchered", "felled", "timbered")
sharp = TRUE
/obj/item/twohanded/chainsaw/update_icon()
/obj/item/twohanded/chainsaw/update_icon_state()
if(wielded)
icon_state = "chainsaw[wielded]"
else
icon_state = "chainsaw0"
..()
/obj/item/twohanded/chainsaw/attack(mob/living/target, mob/living/user)
if(wielded)
@@ -685,9 +682,8 @@
if(charged < 2)
charged++
/obj/item/twohanded/singularityhammer/update_icon() //Currently only here to fuck with the on-mob icons.
/obj/item/twohanded/singularityhammer/update_icon_state() //Currently only here to fuck with the on-mob icons.
icon_state = "singulohammer[wielded]"
..()
/obj/item/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
for(var/atom/movable/X in orange(5, pull))
@@ -762,9 +758,8 @@
L.Stun(6 SECONDS)
shock(L)
/obj/item/twohanded/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons.
/obj/item/twohanded/mjollnir/update_icon_state() //Currently only here to fuck with the on-mob icons.
icon_state = "mjollnir[wielded]"
..()
/obj/item/twohanded/knighthammer
name = "singuloth knight's hammer"
@@ -793,9 +788,8 @@
if(charged < 5)
charged++
/obj/item/twohanded/knighthammer/update_icon() //Currently only here to fuck with the on-mob icons.
/obj/item/twohanded/knighthammer/update_icon_state() //Currently only here to fuck with the on-mob icons.
icon_state = "knighthammer[wielded]"
..()
/obj/item/twohanded/knighthammer/afterattack(atom/A, mob/user, proximity)
if(!proximity)