Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes a bunch of runtimes #5651

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/controllers/subsystem/characters/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

tim_sort(species_lookup, /proc/cmp_auto_compare, TRUE)
tim_sort(species_names, /proc/cmp_auto_compare, TRUE)
tim_sort(species_lookup, /proc/cmp_auto_compare, TRUE)
tim_sort(species_paths, /proc/cmp_auto_compare, TRUE)
tim_sort(playable_species, /proc/cmp_auto_compare)
tim_sort(custom_species_bases, /proc/cmp_auto_compare)

Expand Down
8 changes: 7 additions & 1 deletion code/game/atoms/movable/throwing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@
if(SEND_SIGNAL(src, COMSIG_MOVABLE_PRE_THROW, target, range, speed, flags, thrower, on_hit, on_land, FALSE) & COMPONENT_CANCEL_PRE_THROW)
return FALSE

if(!isnull(throwing))
QDEL_NULL(throwing)

var/datum/thrownthing/TT = _init_throw_datum(target, range, speed, flags, thrower, on_hit, on_land, force)
if(!TT)
return FALSE
Expand Down Expand Up @@ -144,6 +147,9 @@
SHOULD_CALL_PARENT(TRUE)
RETURN_TYPE(/datum/thrownthing)

if(!isnull(throwing))
QDEL_NULL(throwing)

if(SEND_SIGNAL(src, COMSIG_MOVABLE_PRE_THROW, target, range, speed, flags, thrower, on_hit, on_land, TRUE) & COMPONENT_CANCEL_PRE_THROW)
return FALSE

Expand All @@ -162,7 +168,7 @@
return TRUE

/atom/movable/proc/_init_throw_datum(atom/target, range, speed, flags, atom/thrower, datum/callback/on_hit, datum/callback/on_land, force, emulated)
if(throwing)
if(!isnull(throwing))
CRASH("already throwing")
var/calculated_speed = isnull(speed)? ((movable_flags & MOVABLE_NO_THROW_SPEED_SCALING)? (throw_speed) : (throw_speed * (force > throw_resist? (force / throw_resist) ** (throw_speed_scaling_exponential * 0.1) : 1 / (throw_resist / force) ** (throw_speed_scaling_exponential * 0.1)))) : speed
if(!calculated_speed)
Expand Down
5 changes: 4 additions & 1 deletion code/game/machinery/computer/atmos_alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var/global/list/minor_air_alarms = list()

/obj/machinery/computer/atmos_alert/Initialize(mapload)
. = ..()
atmosphere_alarm.register_alarm(src, /atom/proc/update_icon)
atmosphere_alarm.register_alarm(src, PROC_REF(on_alarm_update))

/obj/machinery/computer/atmos_alert/Destroy()
atmosphere_alarm.unregister_alarm(src)
Expand Down Expand Up @@ -55,6 +55,9 @@ var/global/list/minor_air_alarms = list()
icon_screen = initial(icon_screen)
..()

/obj/machinery/computer/atmos_alert/proc/on_alarm_update()
update_icon()

/obj/machinery/computer/atmos_alert/ui_act(action, params)
if(..())
return TRUE
Expand Down
5 changes: 4 additions & 1 deletion code/game/machinery/computer/station_alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/obj/machinery/computer/station_alert/Initialize(mapload)
alarm_monitor = new monitor_type(src)
alarm_monitor.register_alarm(src, /atom/proc/update_icon)
alarm_monitor.register_alarm(src, PROC_REF(on_alarm_update))
. = ..()

/obj/machinery/computer/station_alert/Destroy()
Expand Down Expand Up @@ -52,3 +52,6 @@
else
icon_screen = initial(icon_screen)
..()

/obj/machinery/computer/station_alert/proc/on_alarm_update()
update_icon()
Original file line number Diff line number Diff line change
Expand Up @@ -321,5 +321,5 @@
deconstruct()

/obj/machinery/atmospherics/valve/examine(mob/user, dist)
..()
. = ..()
. += "It is [open ? "open" : "closed"]."
4 changes: 2 additions & 2 deletions code/modules/clothing/clothing_accessories.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
if(istype(src, /obj/item/clothing/accessory))
var/obj/item/clothing/accessory/A = src
old = A.get_mob_overlay()
if(old.plane == FLOAT_PLANE)
if(!isnull(old) && old.plane == FLOAT_PLANE)
old.layer = layer_used + BODY_LAYER + 0.1
return old
var/list/mutable_appearance/rendered = render_mob_appearance(M, accessory_render_specific? resolve_inventory_slot_meta(/datum/inventory_slot_meta/abstract/use_one_for_accessory) : slot_meta, bodytype)
Expand Down Expand Up @@ -247,7 +247,7 @@
if(A)
remove_accessory(usr,A)
if(!LAZYLEN(accessories))
remove_verb(src, /obj/item/clothing/proc/removetie_verb)
remove_obj_verb(src, /obj/item/clothing/proc/removetie_verb)
accessories = null

/obj/item/clothing/emp_act(severity)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/suits/eventclothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@
if(A) //If a selection is made, call the other proc
hide_accessory(usr,A)
if(!LAZYLEN(accessories)) //But if there are no accessories, list will be empty, meaning we ought to remove access to verb
remove_verb(src, /obj/item/clothing/under/event_reward/foxmiko/verb/hidetie) //Removes access to verb
remove_obj_verb(src, /obj/item/clothing/under/event_reward/foxmiko/verb/hidetie) //Removes access to verb
accessories = null
2 changes: 1 addition & 1 deletion code/modules/clothing/under/accessories/holster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@

/obj/item/clothing/accessory/holster/on_removed(mob/user as mob)
if(accessory_host)
remove_verb(accessory_host, /obj/item/clothing/accessory/holster/verb/holster_verb)
remove_obj_verb(accessory_host, /obj/item/clothing/accessory/holster/verb/holster_verb)
..()

//For the holster hotkey
Expand Down
2 changes: 1 addition & 1 deletion code/modules/tgui/modules/general/cardmod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
.["card_rank"] = editing?.rank
.["card_assignment"] = editing?.assignment
.["granted"] = editing?.access
.["can_demote"] = auth_demote(user, editing, authing, editing.rank)
.["can_demote"] = auth_demote(user, editing, authing, editing?.rank)

/datum/tgui_module/card_mod/ui_act(action, list/params, datum/tgui/ui)
. = ..()
Expand Down
Loading