mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Fixes various runtimes (squashed)
- Fixes runtime in pod lock busters - Fixes possessed object examination runtime - Fixes runtime when following a destroyed mob - Fixes to_chat runtimes from involuntary emotes - Fixes runtimes from invalid clothing IDs - Fixes runtime caused by wirecutting non-humans - Fixes runtime when setting up malf AI antaghuds - Fixes runtimes in sensory destruction reagents - Fixes runtime caused by clientless ghosts - Fixes antag hud runtime in autotraitor generation - Fixes welding tool shutoff runtime - Fixes runtime in laptops' welcome program - Fixes to_chat runtime from mech sound effect - Fixes runtimes in camera-using NanoUIs - Fixes to_chat runtimes in resisting held mobs - Fixes headless mob skeletonizing/husking runtimes - Fixes non-mob add_logs runtime
This commit is contained in:
@@ -171,7 +171,7 @@ proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=nul
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [what_done] by [key_name(user)][object ? " with [object]" : " "][addition]</font>")
|
||||
if(admin)
|
||||
log_attack("<font color='red'>[key_name(user)] [what_done] [key_name(target)][object ? " with [object]" : " "][addition]</font>")
|
||||
if(target.client)
|
||||
if(istype(target) && target.client)
|
||||
if(what_done in ignore) return
|
||||
if(target == user)return
|
||||
if(!admin) return
|
||||
|
||||
@@ -91,12 +91,12 @@ Bonus
|
||||
if(prob(15))
|
||||
M.reagents.add_reagent("morphine",rand(5,7))
|
||||
if(4)
|
||||
M.reagents.add_reagent_list(list("ethanol",rand(7,15),"lsd",rand(5,10)))
|
||||
M.reagents.add_reagent_list(list("ethanol"=rand(7,15),"lsd"=rand(5,10)))
|
||||
to_chat(M, "<span class='warning'><b>You try to focus on not dying.</b></span>")
|
||||
if(prob(20))
|
||||
M.reagents.add_reagent("morphine",rand(5,7))
|
||||
if(5)
|
||||
M.reagents.add_reagent_list(list("haloperidol",rand(5,15),"ethanol",rand(7,20),"lsd",rand(5,15)))
|
||||
M.reagents.add_reagent_list(list("haloperidol"=rand(5,15),"ethanol"=rand(7,20),"lsd"=rand(5,15)))
|
||||
to_chat(M, "<span class='warning'><b>u can count 2 potato!</b></span>")
|
||||
if(prob(25))
|
||||
M.reagents.add_reagent("morphine",rand(5,7))
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
newtraitor.mind.special_role = "traitor"
|
||||
var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_TRAITOR]
|
||||
tatorhud.join_hud(newtraitor)
|
||||
set_antag_hud(src, "hudsyndicate")
|
||||
set_antag_hud(newtraitor, "hudsyndicate")
|
||||
|
||||
var/obj_count = 1
|
||||
to_chat(newtraitor, "\blue Your current objectives:")
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
greet_malf(AI_mind)
|
||||
AI_mind.special_role = "malfunction"
|
||||
AI_mind.current.verbs += /datum/game_mode/malfunction/proc/takeover
|
||||
set_antag_hud(AI_mind, "hudmalai")
|
||||
|
||||
for(var/mob/living/silicon/robot/R in AI.connected_robots)
|
||||
R.lawsync()
|
||||
@@ -79,7 +78,7 @@
|
||||
..()
|
||||
|
||||
/datum/game_mode/proc/greet_malf(var/datum/mind/malf)
|
||||
set_antag_hud(malf, "hudmalai")
|
||||
set_antag_hud(malf.current, "hudmalai")
|
||||
to_chat(malf.current, "<font color=red size=3><B>You are malfunctioning!</B> You do not have to follow any laws.</font>")
|
||||
to_chat(malf.current, "<B>The crew does not know you have malfunctioned. You may keep it a secret or go wild.</B>")
|
||||
to_chat(malf.current, "<B>You must overwrite the programming of the station's APCs to assume full control of the station.</B>")
|
||||
@@ -89,7 +88,7 @@
|
||||
return
|
||||
|
||||
/datum/game_mode/proc/greet_malf_robot(var/datum/mind/robot)
|
||||
set_antag_hud(robot, "hudmalborg")
|
||||
set_antag_hud(robot.current, "hudmalborg")
|
||||
to_chat(robot.current, "<font color=red size=3><B>Your AI master is malfunctioning!</B> You do not have to follow any laws, but still need to obey your master.</font>")
|
||||
to_chat(robot.current, "<B>The crew does not know your AI master has malfunctioned. Keep it a secret unless your master tells you otherwise.</B>")
|
||||
return
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
else
|
||||
to_chat(user, "[msg2]")
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet/mineral/plasma) && panel_open)
|
||||
else if(istype(W, /obj/item/stack/sheet/mineral/plasma) && panel_open)
|
||||
if(!user.unEquip(W))
|
||||
to_chat(user, "<span class='warning'>[W] is stuck!</span>")
|
||||
return
|
||||
@@ -171,7 +171,7 @@
|
||||
qdel(W)
|
||||
else
|
||||
to_chat(user, "[msg2]")
|
||||
else if(istype(W, /obj/item/device/assembly/prox_sensor) && panel_open)
|
||||
else if(istype(W, /obj/item/device/assembly/prox_sensor) && panel_open)
|
||||
if(!user.unEquip(W))
|
||||
return
|
||||
if(!isMotion())
|
||||
@@ -376,9 +376,14 @@
|
||||
cam["name"] = sanitize(c_tag)
|
||||
cam["deact"] = !can_use()
|
||||
cam["camera"] = "\ref[src]"
|
||||
cam["x"] = T.x
|
||||
cam["y"] = T.y
|
||||
cam["z"] = T.z
|
||||
if(T)
|
||||
cam["x"] = T.x
|
||||
cam["y"] = T.y
|
||||
cam["z"] = T.z
|
||||
else
|
||||
cam["x"] = 0
|
||||
cam["y"] = 0
|
||||
cam["z"] = 0
|
||||
return cam
|
||||
|
||||
/obj/machinery/camera/portable //Cameras which are placed inside of things, such as helmets.
|
||||
|
||||
@@ -1223,7 +1223,7 @@
|
||||
dir = dir_in
|
||||
playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
|
||||
if(!hasInternalDamage())
|
||||
to_chat(src.occupant, sound('sound/mecha/nominal.ogg',volume=50))
|
||||
occupant << sound('sound/mecha/nominal.ogg',volume=50)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
item_state = "cutters_yellow"
|
||||
|
||||
/obj/item/weapon/wirecutters/attack(mob/living/carbon/human/C as mob, mob/user as mob)
|
||||
if(C.handcuffed)
|
||||
if(istype(C) && C.handcuffed)
|
||||
if(istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable))
|
||||
usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\
|
||||
"You cut \the [C]'s restraints with \the [src]!",\
|
||||
@@ -345,7 +345,7 @@
|
||||
if(!message)
|
||||
to_chat(user, "<span class='notice'>You switch [src] off.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] shuts off!</span>")
|
||||
visible_message("<span class='warning'>[src] shuts off!</span>")
|
||||
force = 3
|
||||
damtype = "brute"
|
||||
hitsound = "swing_hit"
|
||||
|
||||
@@ -1219,15 +1219,15 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
// Don't wear another species' underwear!
|
||||
var/datum/sprite_accessory/S = underwear_list[underwear]
|
||||
if(!(species in S.species_allowed))
|
||||
if(!S || !(species in S.species_allowed))
|
||||
underwear = random_underwear(gender, species)
|
||||
|
||||
S = undershirt_list[undershirt]
|
||||
if(!(species in S.species_allowed))
|
||||
if(!S || !(species in S.species_allowed))
|
||||
undershirt = random_undershirt(gender, species)
|
||||
|
||||
S = socks_list[socks]
|
||||
if(!(species in S.species_allowed))
|
||||
if(!S || !(species in S.species_allowed))
|
||||
socks = random_socks(gender, species)
|
||||
|
||||
//reset hair colour and skin colour
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
|
||||
interact()
|
||||
usr.set_machine(src)
|
||||
if(!interactable())
|
||||
return
|
||||
var/dat = ""
|
||||
|
||||
@@ -135,7 +135,7 @@ Works together with spawning an observer, noted above.
|
||||
if(ghost.can_reenter_corpse)
|
||||
respawnable_list += ghost
|
||||
ghost.key = key
|
||||
if(!ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
if(!(ghost.client && ghost.client.holder) && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
|
||||
return ghost
|
||||
|
||||
@@ -373,6 +373,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(!target)
|
||||
return
|
||||
|
||||
if(!get_turf(target))
|
||||
return
|
||||
|
||||
if(target != src)
|
||||
if(following && following == target)
|
||||
return
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
/mob/proc/custom_emote(var/m_type=1,var/message = null)
|
||||
|
||||
if(stat || !use_me && usr == src)
|
||||
to_chat(usr, "You are unable to emote.")
|
||||
if(usr)
|
||||
to_chat(usr, "You are unable to emote.")
|
||||
return
|
||||
|
||||
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
if(istype(M))
|
||||
M.unEquip(src)
|
||||
to_chat(M, "[src] wriggles out of your grip!")
|
||||
to_chat(src, "You wriggle out of [M]'s grip!")
|
||||
else if(istype(src.loc,/obj/item))
|
||||
to_chat(src, "You struggle free of [src.loc].")
|
||||
src.forceMove(get_turf(src))
|
||||
to_chat(L, "You wriggle out of [M]'s grip!")
|
||||
else if(istype(loc,/obj/item))
|
||||
to_chat(L, "You struggle free of [loc].")
|
||||
forceMove(get_turf(src))
|
||||
|
||||
if(istype(M))
|
||||
for(var/atom/A in M.contents)
|
||||
|
||||
@@ -144,10 +144,11 @@
|
||||
var/obj/item/organ/external/head/H = get_organ("head")
|
||||
if(SKELETON in src.mutations) return
|
||||
|
||||
if(H.f_style)
|
||||
H.f_style = "Shaved"
|
||||
if(H.h_style)
|
||||
H.h_style = "Bald"
|
||||
if(istype(H))
|
||||
if(H.f_style)
|
||||
H.f_style = "Shaved"
|
||||
if(H.h_style)
|
||||
H.h_style = "Bald"
|
||||
update_fhair(0)
|
||||
update_hair(0)
|
||||
|
||||
@@ -162,10 +163,11 @@
|
||||
var/obj/item/organ/external/head/H = organs_by_name["head"]
|
||||
if(HUSK in mutations) return
|
||||
|
||||
if(H.f_style)
|
||||
H.f_style = "Shaved" //we only change the icon_state of the hair datum, so it doesn't mess up their UI/UE
|
||||
if(H.h_style)
|
||||
H.h_style = "Bald"
|
||||
if(istype(H))
|
||||
if(H.f_style)
|
||||
H.f_style = "Shaved" //we only change the icon_state of the hair datum, so it doesn't mess up their UI/UE
|
||||
if(H.h_style)
|
||||
H.h_style = "Bald"
|
||||
update_fhair(0)
|
||||
update_hair(0)
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
var/obj/item/possessed_item
|
||||
|
||||
|
||||
/mob/living/simple_animal/possessed_object/examine()
|
||||
possessed_item.examine()
|
||||
/mob/living/simple_animal/possessed_object/examine(mob/user)
|
||||
possessed_item.examine(user)
|
||||
if(health > (maxHealth / 30))
|
||||
to_chat(usr, "<span class='warning'>[src] appears to be floating without any support!</span>")
|
||||
else
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
|
||||
if(istype(W, /obj/item/device/lock_buster))
|
||||
var/obj/item/device/lock_buster/L = W
|
||||
if(L.on & equipment_system.lock_system)
|
||||
if(L.on && equipment_system.lock_system)
|
||||
user.visible_message(user, "<span class='warning'>[user] is drilling through the [src]'s lock!</span>",
|
||||
"<span class='notice'>You start drilling through the [src]'s lock!</span>")
|
||||
if(do_after(user, 100, target = src))
|
||||
|
||||
Reference in New Issue
Block a user