Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into dynamic-tweaks
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
var/message_cooldown = 0
|
||||
var/ai_message_cooldown = 0
|
||||
var/tmp_alertlevel = 0
|
||||
var/static/security_level_cd // used to stop mass spam.
|
||||
var/const/STATE_DEFAULT = 1
|
||||
var/const/STATE_CALLSHUTTLE = 2
|
||||
var/const/STATE_CANCELSHUTTLE = 3
|
||||
@@ -94,16 +95,18 @@
|
||||
I = pda.id
|
||||
if (I && istype(I))
|
||||
if(ACCESS_CAPTAIN in I.access)
|
||||
if(security_level_cd > world.time)
|
||||
to_chat(usr, "<span class='warning'>Security level protocols are currently on cooldown. Please stand by.</span>")
|
||||
return
|
||||
var/old_level = GLOB.security_level
|
||||
if(!tmp_alertlevel)
|
||||
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
if(tmp_alertlevel < SEC_LEVEL_GREEN)
|
||||
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
if(tmp_alertlevel == SEC_LEVEL_BLUE)
|
||||
tmp_alertlevel = SEC_LEVEL_BLUE
|
||||
if(tmp_alertlevel > SEC_LEVEL_AMBER)
|
||||
tmp_alertlevel = SEC_LEVEL_AMBER //Cannot engage delta with this
|
||||
set_security_level(tmp_alertlevel)
|
||||
security_level_cd = world.time + 15 SECONDS
|
||||
if(GLOB.security_level != old_level)
|
||||
to_chat(usr, "<span class='notice'>Authorization confirmed. Modifying security level.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
@@ -376,19 +379,21 @@
|
||||
if("ai-announce")
|
||||
make_announcement(usr, 1)
|
||||
if("ai-securitylevel")
|
||||
if(security_level_cd > world.time)
|
||||
to_chat(usr, "<span class='warning'>Security level protocols are currently on cooldown. Please stand by.</span>")
|
||||
return
|
||||
tmp_alertlevel = text2num( href_list["newalertlevel"] )
|
||||
if(!tmp_alertlevel)
|
||||
tmp_alertlevel = 0
|
||||
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
var/old_level = GLOB.security_level
|
||||
if(!tmp_alertlevel)
|
||||
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
if(tmp_alertlevel < SEC_LEVEL_GREEN)
|
||||
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
if(tmp_alertlevel == SEC_LEVEL_BLUE)
|
||||
tmp_alertlevel = SEC_LEVEL_BLUE
|
||||
if(tmp_alertlevel > SEC_LEVEL_AMBER)
|
||||
tmp_alertlevel = SEC_LEVEL_AMBER //Cannot engage delta with this
|
||||
set_security_level(tmp_alertlevel)
|
||||
security_level_cd = world.time + 15 SECONDS
|
||||
if(GLOB.security_level != old_level)
|
||||
//Only notify people if an actual change happened
|
||||
var/security_level = get_security_level()
|
||||
|
||||
@@ -138,13 +138,13 @@
|
||||
name = "flux wave anomaly"
|
||||
icon_state = "electricity2"
|
||||
density = TRUE
|
||||
var/canshock = 0
|
||||
var/canshock = FALSE
|
||||
var/shockdamage = 20
|
||||
var/explosive = TRUE
|
||||
|
||||
/obj/effect/anomaly/flux/anomalyEffect()
|
||||
..()
|
||||
canshock = 1
|
||||
canshock = TRUE
|
||||
for(var/mob/living/M in range(0, src))
|
||||
mobShock(M)
|
||||
|
||||
@@ -159,18 +159,8 @@
|
||||
|
||||
/obj/effect/anomaly/flux/proc/mobShock(mob/living/M)
|
||||
if(canshock && istype(M))
|
||||
canshock = 0 //Just so you don't instakill yourself if you slam into the anomaly five times in a second.
|
||||
if(iscarbon(M))
|
||||
if(ishuman(M))
|
||||
M.electrocute_act(shockdamage, "[name]", safety=1)
|
||||
return
|
||||
M.electrocute_act(shockdamage, "[name]")
|
||||
return
|
||||
else
|
||||
M.adjustFireLoss(shockdamage)
|
||||
M.visible_message("<span class='danger'>[M] was shocked by \the [name]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
|
||||
"<span class='italics'>You hear a heavy electrical crack.</span>")
|
||||
canshock = FALSE //Just so you don't instakill yourself if you slam into the anomaly five times in a second.
|
||||
M.electrocute_act(shockdamage, "[name]", flags = SHOCK_NOGLOVES)
|
||||
|
||||
/obj/effect/anomaly/flux/detonate()
|
||||
if(explosive)
|
||||
|
||||
@@ -230,7 +230,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/mutable_appearance/overlay = mutable_appearance(icon, screen_state)
|
||||
overlay.pixel_x = overlays_x_offset
|
||||
overlay.pixel_y = overlays_y_offset
|
||||
. += overlay
|
||||
. += new /mutable_appearance(overlay)
|
||||
if(id)
|
||||
overlay.icon_state = current_overlays[PDA_OVERLAY_ID]
|
||||
. += new /mutable_appearance(overlay)
|
||||
@@ -242,7 +242,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
. += new /mutable_appearance(overlay)
|
||||
if(pai)
|
||||
overlay.icon_state = "[current_overlays[PDA_OVERLAY_PAI]][pai.pai ? "" : "_off"]"
|
||||
. += new /mutable_appearance(overlay)
|
||||
. += overlay
|
||||
new_overlays = FALSE
|
||||
new_alert = FALSE
|
||||
|
||||
|
||||
@@ -342,15 +342,25 @@
|
||||
/obj/item/restraints/legcuffs/bola/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
if(..() || !iscarbon(hit_atom))//if it gets caught or the target can't be cuffed,
|
||||
return//abort
|
||||
var/mob/living/carbon/C = hit_atom
|
||||
ensnare(hit_atom)
|
||||
|
||||
/**
|
||||
* Attempts to legcuff someone with the bola
|
||||
*
|
||||
* Arguments:
|
||||
* * C - the carbon that we will try to ensnare
|
||||
*/
|
||||
/obj/item/restraints/legcuffs/bola/proc/ensnare(mob/living/carbon/C)
|
||||
if(!C.legcuffed && C.get_num_legs(FALSE) >= 2)
|
||||
visible_message("<span class='danger'>\The [src] ensnares [C]!</span>")
|
||||
C.legcuffed = src
|
||||
forceMove(C)
|
||||
C.update_equipment_speed_mods()
|
||||
C.update_inv_legcuffed()
|
||||
SSblackbox.record_feedback("tally", "handcuffs", 1, type)
|
||||
to_chat(C, "<span class='userdanger'>\The [src] ensnares you!</span>")
|
||||
C.DefaultCombatKnockdown(knockdown)
|
||||
C.Knockdown(knockdown)
|
||||
playsound(src, 'sound/effects/snap.ogg', 50, TRUE)
|
||||
|
||||
/obj/item/restraints/legcuffs/bola/tactical//traitor variant
|
||||
name = "reinforced bola"
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
if(scooldown < world.time)
|
||||
if(M.health >= 0)
|
||||
if(ishuman(M)||ismonkey(M))
|
||||
M.electrocute_act(5, "[user]", safety = 1)
|
||||
M.electrocute_act(5, "[user]", flags = SHOCK_NOGLOVES)
|
||||
user.visible_message("<span class='userdanger'>[user] electrocutes [M] with [user.p_their()] touch!</span>", \
|
||||
"<span class='danger'>You electrocute [M] with your touch!</span>")
|
||||
else
|
||||
|
||||
@@ -464,6 +464,7 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \
|
||||
new /datum/stack_recipe("egg box", /obj/item/storage/fancy/egg_box), \
|
||||
new /datum/stack_recipe("donk-pockets box", /obj/item/storage/box/donkpockets), \
|
||||
new /datum/stack_recipe("monkey cube box", /obj/item/storage/box/monkeycubes), \
|
||||
new /datum/stack_recipe("nugget box", /obj/item/storage/fancy/nugget_box), \
|
||||
new /datum/stack_recipe("box (internals)", /obj/item/storage/box/otwo), \
|
||||
null, \
|
||||
new /datum/stack_recipe("security-styled box", /obj/item/storage/box/seclooking), \
|
||||
|
||||
@@ -357,6 +357,20 @@
|
||||
STR.max_items = 8
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/tinychocolate))
|
||||
|
||||
/obj/item/storage/fancy/nugget_box
|
||||
name = "nugget box"
|
||||
desc = "A cardboard box used for holding chicken nuggies."
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "nuggetbox"
|
||||
icon_type = "nugget"
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/nugget
|
||||
|
||||
/obj/item/storage/fancy/nugget_box/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 6
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/nugget))
|
||||
|
||||
/*
|
||||
* Ring Box
|
||||
*/
|
||||
|
||||
@@ -244,7 +244,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.electrocute_act((CLAMP(round(strength/400), 10, 90) + rand(-5, 5)), src, tesla_shock = 1)
|
||||
buckled_mob.electrocute_act((CLAMP(round(strength/400), 10, 90) + rand(-5, 5)), src, flags = SHOCK_TESLA)
|
||||
|
||||
/obj/proc/reset_shocked()
|
||||
obj_flags &= ~BEING_SHOCKED
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/AIcore/update_icon()
|
||||
/obj/structure/AIcore/update_icon_state()
|
||||
switch(state)
|
||||
if(EMPTY_CORE)
|
||||
icon_state = "0"
|
||||
|
||||
@@ -234,8 +234,7 @@
|
||||
if(status == BURST)
|
||||
obj_integrity = integrity_failure * max_integrity
|
||||
|
||||
/obj/structure/alien/egg/update_icon()
|
||||
..()
|
||||
/obj/structure/alien/egg/update_icon_state()
|
||||
switch(status)
|
||||
if(GROWING)
|
||||
icon_state = "[base_icon]_growing"
|
||||
|
||||
@@ -303,7 +303,7 @@ LINEN BINS
|
||||
. += "There are [amount] sheets in the bin."
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/update_icon()
|
||||
/obj/structure/bedsheetbin/update_icon_state()
|
||||
switch(amount)
|
||||
if(0)
|
||||
icon_state = "linenbin-empty"
|
||||
|
||||
@@ -58,30 +58,40 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/update_icon()
|
||||
cut_overlays()
|
||||
if(opened & icon_door_override)
|
||||
add_overlay("[icon_door]_open")
|
||||
. = ..()
|
||||
if(!opened)
|
||||
layer = OBJ_LAYER
|
||||
return
|
||||
else if(opened)
|
||||
add_overlay("[icon_state]_open")
|
||||
return
|
||||
if(icon_door)
|
||||
add_overlay("[icon_door]_door")
|
||||
else
|
||||
layer = BELOW_OBJ_LAYER
|
||||
add_overlay("[icon_state]_door")
|
||||
if(welded)
|
||||
add_overlay("welded")
|
||||
if(!secure)
|
||||
return
|
||||
if(broken)
|
||||
add_overlay("off")
|
||||
add_overlay("sparking")
|
||||
else if(locked)
|
||||
add_overlay("locked")
|
||||
|
||||
/obj/structure/closet/update_overlays()
|
||||
. = ..()
|
||||
closet_update_overlays(.)
|
||||
|
||||
/obj/structure/closet/proc/closet_update_overlays(list/new_overlays)
|
||||
. = new_overlays
|
||||
if(!opened)
|
||||
if(icon_door)
|
||||
. += "[icon_door]_door"
|
||||
else
|
||||
. += "[icon_state]_door"
|
||||
if(welded)
|
||||
. += "welded"
|
||||
if(!secure)
|
||||
return
|
||||
if(broken)
|
||||
. += "off"
|
||||
. += "sparking"
|
||||
else if(locked)
|
||||
. += "locked"
|
||||
else
|
||||
. += "unlocked"
|
||||
else
|
||||
add_overlay("unlocked")
|
||||
if(icon_door_override)
|
||||
. += "[icon_door]_open"
|
||||
else
|
||||
. += "[icon_state]_open"
|
||||
|
||||
|
||||
/obj/structure/closet/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -38,10 +38,10 @@
|
||||
tagged = 0
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/body_bag/update_icon()
|
||||
..()
|
||||
/obj/structure/closet/body_bag/update_overlays()
|
||||
. = ..()
|
||||
if (tagged)
|
||||
add_overlay("bodybag_label")
|
||||
. += "bodybag_label"
|
||||
|
||||
/obj/structure/closet/body_bag/close()
|
||||
if(..())
|
||||
|
||||
@@ -33,12 +33,13 @@
|
||||
return 1
|
||||
return !density
|
||||
|
||||
/obj/structure/closet/crate/update_icon()
|
||||
/obj/structure/closet/crate/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][opened ? "open" : ""]"
|
||||
|
||||
cut_overlays()
|
||||
/obj/structure/closet/crate/closet_update_overlays(list/new_overlays)
|
||||
. = new_overlays
|
||||
if(manifest)
|
||||
add_overlay("manifest")
|
||||
. += "manifest"
|
||||
|
||||
/obj/structure/closet/crate/attack_hand(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/crate/bin/update_icon()
|
||||
..()
|
||||
/obj/structure/closet/crate/bin/closet_update_overlays(list/new_overlays)
|
||||
. = new_overlays
|
||||
cut_overlays()
|
||||
if(contents.len == 0)
|
||||
add_overlay("largebing")
|
||||
. += "largebing"
|
||||
else if(contents.len >= storage_capacity)
|
||||
add_overlay("largebinr")
|
||||
. += "largebinr"
|
||||
else
|
||||
add_overlay("largebino")
|
||||
. += "largebino"
|
||||
|
||||
/obj/structure/closet/crate/bin/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/storage/bag/trash))
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/critter/update_icon()
|
||||
cut_overlays()
|
||||
/obj/structure/closet/crate/critter/closet_update_overlays(list/new_overlays)
|
||||
. = new_overlays
|
||||
if(opened)
|
||||
add_overlay("crittercrate_door_open")
|
||||
. += "crittercrate_door_open"
|
||||
else
|
||||
add_overlay("crittercrate_door")
|
||||
. += "crittercrate_door"
|
||||
if(manifest)
|
||||
add_overlay("manifest")
|
||||
. += "manifest"
|
||||
|
||||
/obj/structure/closet/crate/critter/return_air()
|
||||
if(tank)
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/obj/structure/closet/crate/secure/update_icon()
|
||||
..()
|
||||
/obj/structure/closet/crate/secure/update_overlays()
|
||||
. += ..()
|
||||
if(broken)
|
||||
add_overlay("securecrateemag")
|
||||
. += "securecrateemag"
|
||||
else if(locked)
|
||||
add_overlay("securecrater")
|
||||
. += "securecrater"
|
||||
else
|
||||
add_overlay("securecrateg")
|
||||
. += "securecrateg"
|
||||
|
||||
/obj/structure/closet/crate/secure/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
if(prob(tamperproof) && damage_amount >= DAMAGE_PRECISION)
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
alarmed.burglaralert(src)
|
||||
playsound(src, 'sound/effects/alert.ogg', 50, 1)
|
||||
|
||||
/obj/structure/displaycase/update_icon()
|
||||
/obj/structure/displaycase/update_icon_state()
|
||||
var/icon/I
|
||||
if(open)
|
||||
I = icon('icons/obj/stationobjs.dmi',"glassbox_open")
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
addtimer(CALLBACK(src, /atom/.proc/update_icon), time_between_uses)
|
||||
|
||||
|
||||
/obj/structure/healingfountain/update_icon()
|
||||
/obj/structure/healingfountain/update_icon_state()
|
||||
if(last_process + time_between_uses > world.time)
|
||||
icon_state = "fountain"
|
||||
else
|
||||
|
||||
@@ -260,13 +260,13 @@
|
||||
update_name()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/update_icon()
|
||||
cut_overlays()
|
||||
/obj/structure/door_assembly/update_overlays()
|
||||
. = ..()
|
||||
if(!glass)
|
||||
add_overlay(get_airlock_overlay("fill_construction", icon))
|
||||
. += get_airlock_overlay("fill_construction", icon)
|
||||
else if(glass)
|
||||
add_overlay(get_airlock_overlay("glass_construction", overlays_file))
|
||||
add_overlay(get_airlock_overlay("panel_c[state+1]", overlays_file))
|
||||
. += get_airlock_overlay("glass_construction", overlays_file)
|
||||
. += get_airlock_overlay("panel_c[state+1]", overlays_file)
|
||||
|
||||
/obj/structure/door_assembly/proc/update_name()
|
||||
name = ""
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
opened = !opened
|
||||
update_icon()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/update_icon()
|
||||
/obj/structure/extinguisher_cabinet/update_icon_state()
|
||||
if(!opened)
|
||||
icon_state = "extinguisher_closed"
|
||||
return
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
update_icon()
|
||||
air_update_turf(TRUE)
|
||||
|
||||
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
|
||||
/obj/structure/falsewall/update_icon_state()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
|
||||
if(opening)
|
||||
if(density)
|
||||
icon_state = "fwall_opening"
|
||||
|
||||
@@ -140,30 +140,30 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/fireaxecabinet/update_icon()
|
||||
cut_overlays()
|
||||
/obj/structure/fireaxecabinet/update_overlays()
|
||||
. = ..()
|
||||
if(fireaxe)
|
||||
add_overlay("axe")
|
||||
. += "axe"
|
||||
if(!open)
|
||||
var/hp_percent = obj_integrity/max_integrity * 100
|
||||
if(broken)
|
||||
add_overlay("glass4")
|
||||
. += "glass4"
|
||||
else
|
||||
switch(hp_percent)
|
||||
if(-INFINITY to 40)
|
||||
add_overlay("glass3")
|
||||
. += "glass3"
|
||||
if(40 to 60)
|
||||
add_overlay("glass2")
|
||||
. += "glass2"
|
||||
if(60 to 80)
|
||||
add_overlay("glass1")
|
||||
. += "glass1"
|
||||
if(80 to INFINITY)
|
||||
add_overlay("glass")
|
||||
. += "glass"
|
||||
if(locked)
|
||||
add_overlay("locked")
|
||||
. += "locked"
|
||||
else
|
||||
add_overlay("unlocked")
|
||||
. += "unlocked"
|
||||
else
|
||||
add_overlay("glass_raised")
|
||||
. += "glass_raised"
|
||||
|
||||
/obj/structure/fireaxecabinet/proc/toggle_lock(mob/user)
|
||||
to_chat(user, "<span class = 'caution'> Resetting circuitry...</span>")
|
||||
|
||||
@@ -69,21 +69,22 @@
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/structure/fireplace/update_icon()
|
||||
cut_overlays()
|
||||
if(lit)
|
||||
switch(burn_time_remaining())
|
||||
if(0 to 500)
|
||||
add_overlay("fireplace_fire0")
|
||||
if(500 to 1000)
|
||||
add_overlay("fireplace_fire1")
|
||||
if(1000 to 1500)
|
||||
add_overlay("fireplace_fire2")
|
||||
if(1500 to 2000)
|
||||
add_overlay("fireplace_fire3")
|
||||
if(2000 to MAXIMUM_BURN_TIMER)
|
||||
add_overlay("fireplace_fire4")
|
||||
add_overlay("fireplace_glow")
|
||||
/obj/structure/fireplace/update_overlays()
|
||||
. = ..()
|
||||
if(!lit)
|
||||
return
|
||||
switch(burn_time_remaining())
|
||||
if(0 to 500)
|
||||
. += "fireplace_fire0"
|
||||
if(500 to 1000)
|
||||
. += "fireplace_fire1"
|
||||
if(1000 to 1500)
|
||||
. += "fireplace_fire2"
|
||||
if(1500 to 2000)
|
||||
. += "fireplace_fire3"
|
||||
if(2000 to MAXIMUM_BURN_TIMER)
|
||||
. += "fireplace_fire4"
|
||||
. += "fireplace_glow"
|
||||
|
||||
/obj/structure/fireplace/proc/adjust_light()
|
||||
if(!lit)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/grille/update_icon()
|
||||
/obj/structure/grille/update_icon_state()
|
||||
if(QDELETED(src) || broken)
|
||||
return
|
||||
|
||||
|
||||
@@ -22,17 +22,17 @@
|
||||
break
|
||||
update_icon()
|
||||
|
||||
/obj/structure/guncase/update_icon()
|
||||
cut_overlays()
|
||||
/obj/structure/guncase/update_overlays()
|
||||
. = ..()
|
||||
if(case_type && LAZYLEN(contents))
|
||||
var/mutable_appearance/gun_overlay = mutable_appearance(icon, case_type)
|
||||
for(var/i in 1 to contents.len)
|
||||
gun_overlay.pixel_x = 3 * (i - 1)
|
||||
add_overlay(gun_overlay)
|
||||
. += gun_overlay
|
||||
if(open)
|
||||
add_overlay("[icon_state]_open")
|
||||
. += "[icon_state]_open"
|
||||
else
|
||||
add_overlay("[icon_state]_door")
|
||||
. += "[icon_state]_door"
|
||||
|
||||
/obj/structure/guncase/attackby(obj/item/I, mob/user, params)
|
||||
if(iscyborg(user) || isalien(user))
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
. = ..()
|
||||
pixel_x = rand(-8, 8)
|
||||
|
||||
/obj/structure/headpike/update_icon()
|
||||
..()
|
||||
/obj/structure/headpike/update_overlays()
|
||||
. = ..()
|
||||
var/obj/item/bodypart/head/H = locate() in contents
|
||||
var/mutable_appearance/MA = new()
|
||||
if(H)
|
||||
var/mutable_appearance/MA = new()
|
||||
MA.copy_overlays(H)
|
||||
MA.pixel_y = 12
|
||||
add_overlay(H)
|
||||
. += H
|
||||
|
||||
/obj/structure/headpike/attack_hand(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
if(!shockcd)
|
||||
if(ismob(user))
|
||||
var/mob/living/M = user
|
||||
M.electrocute_act(15,"Energy Barrier", safety=1)
|
||||
M.electrocute_act(15,"Energy Barrier", flags = SHOCK_NOGLOVES)
|
||||
shockcd = TRUE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), 5)
|
||||
|
||||
@@ -201,6 +201,6 @@
|
||||
return
|
||||
|
||||
var/mob/living/M = AM
|
||||
M.electrocute_act(15,"Energy Barrier", safety=1)
|
||||
M.electrocute_act(15,"Energy Barrier", flags = SHOCK_NOGLOVES)
|
||||
shockcd = TRUE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), 5)
|
||||
|
||||
@@ -161,20 +161,20 @@
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/update_icon()
|
||||
cut_overlays()
|
||||
/obj/structure/janitorialcart/update_overlays()
|
||||
. = ..()
|
||||
if(mybag)
|
||||
add_overlay("cart_garbage")
|
||||
. += "cart_garbage"
|
||||
if(mymop)
|
||||
add_overlay("cart_mop")
|
||||
. += "cart_mop"
|
||||
if(mybroom)
|
||||
add_overlay("cart_broom")
|
||||
. += "cart_broom"
|
||||
if(myspray)
|
||||
add_overlay("cart_spray")
|
||||
. += "cart_spray"
|
||||
if(myreplacer)
|
||||
add_overlay("cart_replacer")
|
||||
. += "cart_replacer"
|
||||
if(signs)
|
||||
add_overlay("cart_sign[signs]")
|
||||
. += "cart_sign[signs]"
|
||||
if(reagents.total_volume > 0)
|
||||
add_overlay("cart_water")
|
||||
. += "cart_water"
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
down.update_icon()
|
||||
up = down = null
|
||||
|
||||
/obj/structure/ladder/update_icon()
|
||||
/obj/structure/ladder/update_icon_state()
|
||||
if(up && down)
|
||||
icon_state = "ladder11"
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
set_light(0)
|
||||
|
||||
/obj/structure/life_candle/update_icon()
|
||||
/obj/structure/life_candle/update_icon_state()
|
||||
if(linked_minds.len)
|
||||
icon_state = icon_state_active
|
||||
else
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
/obj/structure/mineral_door/update_icon()
|
||||
/obj/structure/mineral_door/update_icon_state()
|
||||
if(state)
|
||||
icon_state = "[initial_state]open"
|
||||
else
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/mopbucket/update_icon()
|
||||
cut_overlays()
|
||||
/obj/structure/mopbucket/update_overlays()
|
||||
. = ..()
|
||||
if(reagents.total_volume > 0)
|
||||
add_overlay("mopbucket_water")
|
||||
. += "mopbucket_water"
|
||||
@@ -45,9 +45,6 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bodycontainer/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/bodycontainer/relaymove(mob/user)
|
||||
if(user.stat || !isturf(loc))
|
||||
return
|
||||
@@ -174,7 +171,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
|
||||
to_chat(user, "<span class='notice'>You turn the speaker function [beeper ? "on" : "off"].</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/structure/bodycontainer/morgue/update_icon()
|
||||
/obj/structure/bodycontainer/morgue/update_icon_state()
|
||||
if (!connected || connected.loc != src) // Open or tray is gone.
|
||||
icon_state = "morgue0"
|
||||
else
|
||||
@@ -228,20 +225,17 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
GLOB.crematoriums.Add(src)
|
||||
..()
|
||||
|
||||
/obj/structure/bodycontainer/crematorium/update_icon()
|
||||
/obj/structure/bodycontainer/crematorium/update_icon_state()
|
||||
if(!connected || connected.loc != src)
|
||||
icon_state = "crema0"
|
||||
else
|
||||
|
||||
if(src.contents.len > 1)
|
||||
src.icon_state = "crema2"
|
||||
if(contents.len > 1)
|
||||
icon_state = "crema2"
|
||||
else
|
||||
src.icon_state = "crema1"
|
||||
icon_state = "crema1"
|
||||
|
||||
if(locked)
|
||||
src.icon_state = "crema_active"
|
||||
|
||||
return
|
||||
icon_state = "crema_active"
|
||||
|
||||
/obj/structure/bodycontainer/crematorium/proc/cremate(mob/user)
|
||||
if(locked)
|
||||
|
||||
@@ -203,7 +203,8 @@
|
||||
if(lines.len)
|
||||
var/bpm_string = "BPM: "
|
||||
if(findtext(lines[1], bpm_string, 1, length(bpm_string) + 1))
|
||||
tempo = sanitize_tempo(600 / text2num(copytext(lines[1], length(bpm_string) + 1)))
|
||||
var/divisor = text2num(copytext(lines[1], length(bpm_string) + 1)) || 120 // default
|
||||
tempo = sanitize_tempo(600 / round(divisor, 1))
|
||||
lines.Cut(1, 2)
|
||||
else
|
||||
tempo = sanitize_tempo(5) // default 120 BPM
|
||||
|
||||
@@ -13,7 +13,7 @@ FLOOR SAFES
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT
|
||||
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT
|
||||
var/open = FALSE //is the safe open?
|
||||
var/tumbler_1_pos //the tumbler position- from 0 to 72
|
||||
var/tumbler_1_open //the tumbler position to open at- 0 to 72
|
||||
@@ -73,7 +73,7 @@ FLOOR SAFES
|
||||
num = 0
|
||||
return num
|
||||
|
||||
/obj/structure/safe/update_icon()
|
||||
/obj/structure/safe/update_icon_state()
|
||||
if(open)
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
else
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/structure/stairs/update_icon()
|
||||
/obj/structure/stairs/update_icon_state()
|
||||
if(isTerminator())
|
||||
icon_state = "stairs_t"
|
||||
else
|
||||
|
||||
@@ -25,18 +25,18 @@
|
||||
new /obj/item/tank/internals/plasma(src)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/tank_dispenser/update_icon()
|
||||
cut_overlays()
|
||||
/obj/structure/tank_dispenser/update_overlays()
|
||||
. = ..()
|
||||
switch(oxygentanks)
|
||||
if(1 to 3)
|
||||
add_overlay("oxygen-[oxygentanks]")
|
||||
. += "oxygen-[oxygentanks]"
|
||||
if(4 to TANK_DISPENSER_CAPACITY)
|
||||
add_overlay("oxygen-4")
|
||||
. += "oxygen-4"
|
||||
switch(plasmatanks)
|
||||
if(1 to 4)
|
||||
add_overlay("plasma-[plasmatanks]")
|
||||
. += "plasma-[plasmatanks]"
|
||||
if(5 to TANK_DISPENSER_CAPACITY)
|
||||
add_overlay("plasma-5")
|
||||
. += "plasma-5"
|
||||
|
||||
/obj/structure/tank_dispenser/attackby(obj/item/I, mob/user, params)
|
||||
var/full
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
empty_pod()
|
||||
return ..()
|
||||
|
||||
/obj/structure/transit_tube_pod/update_icon()
|
||||
/obj/structure/transit_tube_pod/update_icon_state()
|
||||
if(contents.len)
|
||||
icon_state = "pod_occupied"
|
||||
else
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
icon_state = "trap-shock"
|
||||
|
||||
/obj/structure/trap/stun/trap_effect(mob/living/L)
|
||||
L.electrocute_act(30, src, safety=1) // electrocute act does a message.
|
||||
L.electrocute_act(30, src, flags = SHOCK_NOGLOVES) // electrocute act does a message.
|
||||
L.DefaultCombatKnockdown(100)
|
||||
|
||||
/obj/structure/trap/fire
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
/obj/structure/trap/cult/trap_effect(mob/living/L)
|
||||
to_chat(L, "<span class='danger'><B>With a crack, the hostile constructs come out of hiding, stunning you!</B></span>")
|
||||
L.electrocute_act(10, src, safety = TRUE) // electrocute act does a message.
|
||||
L.electrocute_act(10, src, flags = SHOCK_NOGLOVES) // electrocute act does a message.
|
||||
L.DefaultCombatKnockdown(20)
|
||||
new /mob/living/simple_animal/hostile/construct/proteon/hostile(loc)
|
||||
new /mob/living/simple_animal/hostile/construct/proteon/hostile(loc)
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/structure/toilet/update_icon()
|
||||
/obj/structure/toilet/update_icon_state()
|
||||
icon_state = "toilet[open][cistern]"
|
||||
|
||||
|
||||
@@ -216,8 +216,6 @@
|
||||
density = FALSE
|
||||
use_power = NO_POWER_USE
|
||||
var/on = FALSE
|
||||
var/obj/effect/mist/mymist = null
|
||||
var/ismist = 0 //needs a var so we can make it linger~
|
||||
var/watertemp = "normal" //freezing, normal, or boiling
|
||||
var/datum/looping_sound/showering/soundloop
|
||||
|
||||
@@ -240,6 +238,7 @@
|
||||
/obj/machinery/shower/interact(mob/M)
|
||||
on = !on
|
||||
update_icon()
|
||||
handle_mist()
|
||||
add_fingerprint(M)
|
||||
if(on)
|
||||
START_PROCESSING(SSmachines, src)
|
||||
@@ -280,31 +279,30 @@
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/shower/update_icon() //this is terribly unreadable, but basically it makes the shower mist up
|
||||
cut_overlays() //once it's been on for a while, in addition to handling the water overlay.
|
||||
if(mymist)
|
||||
qdel(mymist)
|
||||
|
||||
/obj/machinery/shower/update_overlays()
|
||||
. = ..()
|
||||
if(on)
|
||||
add_overlay(mutable_appearance('icons/obj/watercloset.dmi', "water", ABOVE_MOB_LAYER))
|
||||
if(watertemp == "freezing")
|
||||
return
|
||||
if(!ismist)
|
||||
spawn(50)
|
||||
if(src && on)
|
||||
ismist = 1
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
else
|
||||
ismist = 1
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
else if(ismist)
|
||||
ismist = 1
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
spawn(250)
|
||||
if(!on && mymist)
|
||||
qdel(mymist)
|
||||
ismist = 0
|
||||
. += mutable_appearance('icons/obj/watercloset.dmi', "water", ABOVE_MOB_LAYER)
|
||||
|
||||
/obj/machinery/shower/proc/handle_mist()
|
||||
// If there is no mist, and the shower was turned on (on a non-freezing temp): make mist in 5 seconds
|
||||
// If there was already mist, and the shower was turned off (or made cold): remove the existing mist in 25 sec
|
||||
var/obj/effect/mist/mist = locate() in loc
|
||||
if(!mist && on && watertemp != "freezing")
|
||||
addtimer(CALLBACK(src, .proc/make_mist), 5 SECONDS)
|
||||
|
||||
if(mist && (!on || watertemp == "freezing"))
|
||||
addtimer(CALLBACK(src, .proc/clear_mist), 25 SECONDS)
|
||||
|
||||
/obj/machinery/shower/proc/make_mist()
|
||||
var/obj/effect/mist/mist = locate() in loc
|
||||
if(!mist && on && watertemp != "freezing")
|
||||
new /obj/effect/mist(loc)
|
||||
|
||||
/obj/machinery/shower/proc/clear_mist()
|
||||
var/obj/effect/mist/mist = locate() in loc
|
||||
if(mist && (!on || watertemp == "freezing"))
|
||||
qdel(mist)
|
||||
|
||||
/obj/machinery/shower/Crossed(atom/movable/AM)
|
||||
..()
|
||||
@@ -692,7 +690,7 @@
|
||||
open = !open
|
||||
update_icon()
|
||||
|
||||
/obj/structure/curtain/update_icon()
|
||||
/obj/structure/curtain/update_icon_state()
|
||||
if(!open)
|
||||
icon_state = "closed"
|
||||
layer = WALL_OBJ_LAYER
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
setDir(ini_dir)
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/windoor_assembly/update_icon()
|
||||
/obj/structure/windoor_assembly/update_icon_state()
|
||||
icon_state = "[facing]_[secure ? "secure_" : ""]windoor_assembly[state]"
|
||||
|
||||
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target)
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
var/obj/item/stack/sheet/glass_type = /obj/item/stack/sheet/glass
|
||||
var/cleanable_type = /obj/effect/decal/cleanable/glass
|
||||
var/glass_amount = 1
|
||||
var/mutable_appearance/crack_overlay
|
||||
can_be_unanchored = TRUE
|
||||
resistance_flags = ACID_PROOF
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
|
||||
@@ -337,22 +336,19 @@
|
||||
queue_smooth_neighbors(src)
|
||||
|
||||
//merges adjacent full-tile windows into one
|
||||
/obj/structure/window/update_icon()
|
||||
if(!QDELETED(src))
|
||||
if(!fulltile)
|
||||
return
|
||||
/obj/structure/window/update_overlays()
|
||||
. = ..()
|
||||
if(QDELETED(src) || !fulltile)
|
||||
return
|
||||
var/ratio = obj_integrity / max_integrity
|
||||
ratio = CEILING(ratio*4, 1) * 25
|
||||
|
||||
var/ratio = obj_integrity / max_integrity
|
||||
ratio = CEILING(ratio*4, 1) * 25
|
||||
if(smooth)
|
||||
queue_smooth(src)
|
||||
|
||||
if(smooth)
|
||||
queue_smooth(src)
|
||||
|
||||
cut_overlay(crack_overlay)
|
||||
if(ratio > 75)
|
||||
return
|
||||
crack_overlay = mutable_appearance('icons/obj/structures.dmi', "damage[ratio]", -(layer+0.1))
|
||||
add_overlay(crack_overlay)
|
||||
if(ratio > 75)
|
||||
return
|
||||
. += mutable_appearance('icons/obj/structures.dmi', "damage[ratio]", -(layer+0.1))
|
||||
|
||||
/obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user