Skip to content

Commit

Permalink
hrrrrnnggh colonel, I’m trying to fix runtimes but I'm *dummy thicc* …
Browse files Browse the repository at this point in the history
…and the clap from my asscheeks keeps alerting runtime.log
  • Loading branch information
Absolucy committed Nov 13, 2024
1 parent ae648a7 commit 5d19101
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 35 deletions.
9 changes: 5 additions & 4 deletions code/_onclick/hud/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,11 @@
if(ready)
new_player.ready = PLAYER_READY_TO_PLAY
base_icon_state = "ready"
if(!new_player.client.readied_store)
new_player.client.readied_store = new(new_player)
else
new_player.client.readied_store.ui_interact(new_player)
var/client/new_client = new_player.client
if(new_client)
if(!new_client.readied_store)
new_client.readied_store = new(new_player)
new_client.readied_store.ui_interact(new_player)
else
new_player.ready = PLAYER_NOT_READY
base_icon_state = "not_ready"
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/persistence/scars.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
if(!istype(ending_human) || !ending_human.mind?.original_character_slot_index || !ending_human.client?.prefs.read_preference(/datum/preference/toggle/persistent_scars))
continue

var/mob/living/carbon/human/original_human = ending_human.mind.original_character.resolve()
var/mob/living/carbon/human/original_human = ending_human.mind.original_character?.resolve()

if(!original_human)
continue
Expand Down
5 changes: 2 additions & 3 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,8 @@ SUBSYSTEM_DEF(ticker)
continue
item.post_equip_item(new_player_mob.client?.prefs, new_player_living)

if(new_player_mob.client.readied_store)
if(new_player_mob.client.readied_store.bought_item)
new_player_mob.client.readied_store.finalize_purchase_spawn(new_player_mob, new_player_living)
if(new_player_mob.client?.readied_store?.bought_item)
new_player_mob.client.readied_store.finalize_purchase_spawn(new_player_mob, new_player_living)

CHECK_TICK

Expand Down
2 changes: 1 addition & 1 deletion code/datums/cinematics/_cinematic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@

/// Unlocks a previously locked weakref
/datum/cinematic/proc/unlock_mob(datum/weakref/mob_ref)
var/mob/locked_mob = mob_ref.resolve()
var/mob/locked_mob = mob_ref?.resolve()
if(isnull(locked_mob))
return
REMOVE_TRAIT(locked_mob, TRAIT_NO_TRANSFORM, CINEMATIC_SOURCE)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/food/egg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ GLOBAL_VAR_INIT(chicks_from_eggs, 0)
pre_hatch()
GLOB.chicks_from_eggs++

reagents.expose(hit_atom, TOUCH)
reagents?.expose(hit_atom, TOUCH)

/obj/item/food/egg/attackby(obj/item/item, mob/user, params)
if(istype(item, /obj/item/toy/crayon))
Expand Down
9 changes: 3 additions & 6 deletions code/modules/bitrunning/event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@
/datum/round_event_control/bitrunning_glitch/can_spawn_event(players_amt, allow_magic = FALSE, fake_check = FALSE)
. = ..()
if(!.)
return .

return
active_servers.Cut()

get_active_servers()

if(length(active_servers))
return TRUE
if(!length(active_servers))
return FALSE

/// All servers currently running, has players in it, and map has valid mobs
/datum/round_event_control/bitrunning_glitch/proc/get_active_servers()
Expand Down
6 changes: 3 additions & 3 deletions code/modules/client/preferences/middleware/antags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
data["selected_antags"] = selected_antags

var/list/antag_bans = get_antag_bans()
if (antag_bans.len)
if (length(antag_bans))
data["antag_bans"] = antag_bans

var/list/antag_days_left = get_antag_days_left()
if (antag_days_left?.len)
if (length(antag_days_left))
data["antag_days_left"] = antag_days_left

return data
Expand Down Expand Up @@ -66,7 +66,7 @@
if (isnull(antag_flag))
continue

if (is_banned_from(preferences.parent.ckey, list(antag_flag_override || antag_flag, ROLE_SYNDICATE)))
if (is_banned_from(preferences.parent?.ckey, list(antag_flag_override || antag_flag, ROLE_SYNDICATE)))
antag_bans += serialize_antag_name(antag_flag)

return antag_bans
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/login.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@

if(hud_used)
if (forced_interaction_mode)
client.imode.replace(forced_interaction_mode)
client.imode?.replace(forced_interaction_mode)
else
client.imode.reload_hud(src)
client.imode?.reload_hud(src)
hud_used.show_hud(hud_used.hud_version) // see above, this can process a disconnect
if(!client)
return FALSE
Expand Down
5 changes: 2 additions & 3 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1488,9 +1488,8 @@
if(!canon_client)
return

for(var/foo in canon_client.player_details.post_logout_callbacks)
var/datum/callback/CB = foo
CB.Invoke()
for(var/datum/callback/callback as anything in canon_client.player_details?.post_logout_callbacks)
callback.Invoke()

if(canon_client?.movingmob)
LAZYREMOVE(canon_client.movingmob.client_mobs_in_contents, src)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
/datum/micro_organism/cell_line/proc/finish_growing(obj/machinery/plumbing/growing_vat/vat)
var/risk = 0 //Penalty for failure, goes up based on how much growth the other cell_lines have

for(var/datum/micro_organism/cell_line/cell_line in vat.biological_sample.micro_organisms)
for(var/datum/micro_organism/cell_line/cell_line in vat.biological_sample?.micro_organisms)
if(cell_line == src) //well duh
continue
if(cell_line.growth >= VATGROWING_DANGER_MINIMUM)
Expand Down
3 changes: 2 additions & 1 deletion monkestation/code/modules/liquids/liquid_groups.dm
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,10 @@ GLOBAL_VAR_INIT(liquid_debug_colors, FALSE)

///PROCESSING
/datum/liquid_group/proc/process_group(from_SS = FALSE)
list_clear_nulls(members)
if(merging)
return
if(!members || !length(members)) // this ideally shouldn't exist, ideally groups would die before they got to this point but alas here we are
if(!length(members)) // this ideally shouldn't exist, ideally groups would die before they got to this point but alas here we are
check_dead()
return

Expand Down
13 changes: 4 additions & 9 deletions monkestation/code/modules/store/pre_round/_pre_round_store.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ GLOBAL_LIST_EMPTY(cached_preround_items)
/datum/pre_round_store
var/datum/store_item/bought_item

/datum/pre_round_store/New(mob/user)
. = ..()
ui_interact(user)

/datum/pre_round_store/Destroy(force)
. = ..()
SStgui.close_uis(src)
bought_item = null
return ..()

/datum/pre_round_store/ui_interact(mob/user, datum/tgui/ui)
. = ..()
Expand Down Expand Up @@ -95,8 +92,7 @@ GLOBAL_LIST_EMPTY(cached_preround_items)
if(!granting_time.grant_effect(new_player_mob_living))
return
else
ui_close()
qdel(new_player_mob.client.readied_store)
QDEL_NULL(new_player_mob.client.readied_store)
return
else if(!new_player_mob.put_in_hands(created_item, FALSE))
var/obj/item/storage/backpack/backpack = new_player_mob_living.get_item_by_slot(ITEM_SLOT_BACK)
Expand All @@ -107,5 +103,4 @@ GLOBAL_LIST_EMPTY(cached_preround_items)

owners_prefs.adjust_metacoins(new_player_mob.client.ckey, (-initial(bought_item.item_cost)), donator_multipler = FALSE)
logger.Log(LOG_CATEGORY_META, "[new_player_mob.client] bought a [created_item] for [initial(bought_item.item_cost)] (Pre-round Store)", list("currency_left" = new_player_mob.client.prefs.metacoins))
ui_close()
qdel(new_player_mob.client.readied_store)
QDEL_NULL(new_player_mob.client.readied_store)

0 comments on commit 5d19101

Please sign in to comment.