mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-11 16:08:32 +01:00
Merge pull request #1242 from ArchieBeepBoop/runtimesssss
Fixes a lot of runtimes
This commit is contained in:
@@ -123,6 +123,8 @@
|
||||
signal_enabled = TRUE
|
||||
|
||||
/datum/proc/UnregisterSignal(datum/target, sig_type_or_types)
|
||||
if(!target)
|
||||
CRASH("[src] tried to unregister a signal without having a target.")
|
||||
var/list/lookup = target.comp_lookup
|
||||
if(!signal_procs || !signal_procs[target] || !lookup)
|
||||
return
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
|
||||
/datum/quirk/draconicspeaker/remove()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.remove_language(/datum/language/draconic)
|
||||
M?.remove_language(/datum/language/draconic)
|
||||
|
||||
/datum/quirk/slimespeaker
|
||||
name = "Slime speaker"
|
||||
@@ -316,7 +316,7 @@
|
||||
|
||||
/datum/quirk/slimespeaker/remove()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.remove_language(/datum/language/slime)
|
||||
M?.remove_language(/datum/language/slime)
|
||||
|
||||
/datum/quirk/tajaspeaker
|
||||
name = "Siik-Tajr speaker"
|
||||
@@ -332,7 +332,7 @@
|
||||
|
||||
/datum/quirk/tajaspeaker/remove()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.remove_language(/datum/language/tajara)
|
||||
M?.remove_language(/datum/language/tajara)
|
||||
|
||||
/datum/quirk/russianspeaker
|
||||
name = "Neo-Russkiya speaker"
|
||||
@@ -348,4 +348,4 @@
|
||||
|
||||
/datum/quirk/russianspeaker/remove()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.remove_language(/datum/language/spacerussian)
|
||||
M?.remove_language(/datum/language/spacerussian)
|
||||
|
||||
@@ -429,8 +429,11 @@ GLOBAL_LIST_EMPTY(family_heirlooms)
|
||||
/datum/quirk/mute/add()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
mute = new
|
||||
H.gain_trauma(mute, TRAUMA_RESILIENCE_SURGERY)
|
||||
H.gain_trauma(TRAIT_MUTE, TRAUMA_RESILIENCE_SURGERY)
|
||||
H.gain_trauma(mute, TRAUMA_RESILIENCE_ABSOLUTE)
|
||||
|
||||
/datum/quirk/mute/remove()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
H?.cure_trauma_type(mute, TRAUMA_RESILIENCE_ABSOLUTE)
|
||||
|
||||
/datum/quirk/mute/on_process()
|
||||
if(quirk_holder.mind && LAZYLEN(quirk_holder.mind.antag_datums))
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
return
|
||||
inuse = TRUE
|
||||
flick("posialertflash",src)
|
||||
visible_message("There are positronic personalities available!", runechat_popup = TRUE)
|
||||
visible_message("There are positronic personalities available!")
|
||||
radio.talk_into(src, "There are positronic personalities available!", science_channel)
|
||||
playsound(loc, 'sound/machines/ping.ogg', 50)
|
||||
addtimer(CALLBACK(src, .proc/liftcooldown), 300)
|
||||
|
||||
@@ -113,13 +113,12 @@
|
||||
|
||||
if(materials)
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = mat_id
|
||||
var/amount = materials.materials[mat_id]
|
||||
var/datum/material/M = materials.materials[mat_id]
|
||||
var/ref = REF(M)
|
||||
output += "<span class=\"res_name\">[M.name]: </span>[amount] cm³"
|
||||
if(amount >= MINERAL_MATERIAL_AMOUNT)
|
||||
output += "<span class=\"res_name\">[M.name]: </span>[M.amount] cm³"
|
||||
if(M.amount >= MINERAL_MATERIAL_AMOUNT)
|
||||
output += "<span style='font-size:80%;'>- Remove \[<a href='?src=[REF(src)];remove_mat=1;material=[ref]'>1</a>\]"
|
||||
if(amount >= (MINERAL_MATERIAL_AMOUNT * 10))
|
||||
if(M.amount >= (MINERAL_MATERIAL_AMOUNT * 10))
|
||||
output += " | \[<a href='?src=[REF(src)];remove_mat=10;material=[ref]'>10</a>\]"
|
||||
output += " | \[<a href='?src=[REF(src)];remove_mat=50;material=[ref]'>50</a>\]</span>"
|
||||
output += "<br>"
|
||||
@@ -290,8 +289,9 @@
|
||||
left_part += output_parts_list(part_set)
|
||||
left_part += "<hr><a href='?src=[REF(src)];screen=main'>Return</a>"
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<title>[name]</title>
|
||||
<head>
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
|
||||
<title>[name]</title>
|
||||
<style>
|
||||
.res_name {font-weight: bold; text-transform: capitalize;}
|
||||
.red {color: #f00;}
|
||||
|
||||
@@ -487,7 +487,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
if(alert("This mob is being controlled by [M.key]. Are you sure you wish to assume control of it? [M.key] will be made a ghost.",,"Yes","No") != "Yes")
|
||||
return
|
||||
else
|
||||
var/mob/dead/observer/ghost = new/mob/dead/observer(M,1)
|
||||
var/mob/dead/observer/ghost = new/mob/dead/observer(get_turf(M), M)
|
||||
ghost.ckey = M.ckey
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] assumed direct control of [M].</span>")
|
||||
log_admin("[key_name(usr)] assumed direct control of [M].")
|
||||
|
||||
@@ -56,7 +56,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
var/deadchat_name
|
||||
var/datum/spawners_menu/spawners_menu
|
||||
|
||||
/mob/dead/observer/Initialize()
|
||||
/mob/dead/observer/Initialize(mapload, mob/body)
|
||||
set_invisibility(GLOB.observer_default_invisibility)
|
||||
|
||||
add_verb(src, list(
|
||||
@@ -77,11 +77,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
|
||||
updateallghostimages()
|
||||
|
||||
var/turf/T
|
||||
var/mob/body = loc
|
||||
if(ismob(body))
|
||||
T = get_turf(body) //Where is the body located?
|
||||
|
||||
if(body)
|
||||
gender = body.gender
|
||||
if(body.mind && body.mind.name)
|
||||
name = body.mind.name
|
||||
@@ -106,14 +102,15 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
|
||||
update_icon()
|
||||
|
||||
if(!T)
|
||||
if(!isturf(loc))
|
||||
var/turf/T
|
||||
var/list/turfs = get_area_turfs(/area/shuttle/arrival)
|
||||
if(turfs.len)
|
||||
T = pick(turfs)
|
||||
else
|
||||
T = SSmapping.get_station_center()
|
||||
|
||||
forceMove(T)
|
||||
forceMove(T)
|
||||
|
||||
if(!name) //To prevent nameless ghosts
|
||||
name = random_unique_name(gender)
|
||||
@@ -268,7 +265,7 @@ Works together with spawning an observer, noted above.
|
||||
if(!key || key[1] == "@" || (SEND_SIGNAL(src, COMSIG_MOB_GHOSTIZE, can_reenter_corpse, special, penalize) & COMPONENT_BLOCK_GHOSTING))
|
||||
return //mob has no key, is an aghost or some component hijacked.
|
||||
stop_sound_channel(CHANNEL_HEARTBEAT) //Stop heartbeat sounds because You Are A Ghost Now
|
||||
var/mob/dead/observer/ghost = new(src) // Transfer safety to observer spawning proc.
|
||||
var/mob/dead/observer/ghost = new(get_turf(src), src) // Transfer safety to observer spawning proc.
|
||||
SStgui.on_transfer(src, ghost) // Transfer NanoUIs.
|
||||
ghost.can_reenter_corpse = can_reenter_corpse
|
||||
if (client && client.prefs && client.prefs.auto_ooc)
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
battery = new battery_type(src)
|
||||
..()
|
||||
|
||||
/obj/item/computer_hardware/battery/Destroy()
|
||||
. = ..()
|
||||
QDEL_NULL(battery)
|
||||
|
||||
/obj/item/computer_hardware/battery/try_insert(obj/item/I, mob/living/user = null)
|
||||
if(!holder)
|
||||
return FALSE
|
||||
@@ -50,7 +54,6 @@
|
||||
holder.shutdown_computer()
|
||||
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
@@ -91,4 +94,4 @@
|
||||
name = "nano battery"
|
||||
desc = "A tiny power cell, commonly seen in low-end portable microcomputers."
|
||||
icon_state = "cell_micro"
|
||||
maxcharge = 300
|
||||
maxcharge = 300
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
var/now_fixed
|
||||
var/high_threshold_cleared
|
||||
var/low_threshold_cleared
|
||||
rad_flags = RAD_NO_CONTAMINATE
|
||||
|
||||
/obj/item/organ/proc/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
|
||||
if(!iscarbon(M) || owner == M)
|
||||
@@ -134,7 +135,8 @@
|
||||
///Damage decrements by a percent of its maxhealth
|
||||
var/healing_amount = -(maxHealth * healing_factor)
|
||||
///Damage decrements again by a percent of its maxhealth, up to a total of 4 extra times depending on the owner's health
|
||||
healing_amount -= owner.satiety > 0 ? 4 * healing_factor * owner.satiety / MAX_SATIETY : 0
|
||||
if(owner)
|
||||
healing_amount -= owner.satiety > 0 ? 4 * healing_factor * owner.satiety / MAX_SATIETY : 0
|
||||
applyOrganDamage(healing_amount) //to FERMI_TWEAK
|
||||
//Make it so each threshold is stuck.
|
||||
|
||||
|
||||
@@ -117,7 +117,9 @@
|
||||
else
|
||||
option = "Fuck"
|
||||
|
||||
var/obj/item/organ/genital/vagina/V = portalunderwear.loc
|
||||
var/obj/item/organ/genital/vagina/V
|
||||
if(istype(portalunderwear.loc, /obj/item/organ/genital/vagina)) //Sanity check. Without this it will runtime.
|
||||
V = portalunderwear.loc
|
||||
if(!V)
|
||||
return
|
||||
var/mob/living/carbon/human/M = V.owner
|
||||
@@ -179,7 +181,12 @@
|
||||
//get their looks and vagina colour!
|
||||
cut_overlays()//remove current overlays
|
||||
|
||||
var/obj/item/organ/genital/vagina/V = portalunderwear.loc
|
||||
var/obj/item/organ/genital/vagina/V
|
||||
if(istype(portalunderwear.loc, /obj/item/organ/genital/vagina)) //Sanity check. Without this it will runtime.
|
||||
V = portalunderwear.loc
|
||||
if(!V)
|
||||
useable = FALSE
|
||||
return
|
||||
var/mob/living/carbon/human/H = V.owner
|
||||
|
||||
if(H) //if the portal panties are on someone.
|
||||
@@ -298,4 +305,4 @@
|
||||
|
||||
/obj/item/paper/fluff/portallight
|
||||
name = "Portal Fleshlight Instructions"
|
||||
info = "Thank you for purchasing the Silver Love Portal Fleshlight!<BR>To use, simply register your new portal fleshlight with the provided underwear to link them together. The ask your lover to wear the underwear.<BR>Have fun lovers,<BR><BR>Wilhelmina Steiner."
|
||||
info = "Thank you for purchasing the Silver Love Portal Fleshlight!<BR>To use, simply register your new portal fleshlight with the provided underwear to link them together. The ask your lover to wear the underwear.<BR>Have fun lovers,<BR><BR>Wilhelmina Steiner."
|
||||
|
||||
Reference in New Issue
Block a user