Skip to content

Commit

Permalink
purges rename_platoon due to runtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
silencer-pl committed Sep 5, 2024
1 parent 77cf240 commit 8d823b3
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 214 deletions.
2 changes: 0 additions & 2 deletions code/__DEFINES/dcs/signals/signals_global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,3 @@
/// From /obj/structure/machinery/power/fusion_engine/proc/set_overloading() : (set_overloading)
#define COMSIG_GLOB_GENERATOR_SET_OVERLOADING "!generator_set_overloading"

/// From /client/proc/rename_platoon()
#define COMSIG_GLOB_PLATOON_NAME_CHANGE "platoon_name_change"
12 changes: 0 additions & 12 deletions code/datums/datacore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
//This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character().
var/locked[] = list()

/datum/datacore/New()
. = ..()

RegisterSignal(SSdcs, COMSIG_GLOB_PLATOON_NAME_CHANGE, PROC_REF(rename_platoon))

/datum/datacore/proc/rename_platoon(datum/source, new_name, old_name)
SIGNAL_HANDLER

for(var/datum/data/record/cycled_data_record in general)
if(cycled_data_record.fields["squad"] == old_name)
cycled_data_record.fields["squad"] = new_name

/datum/datacore/proc/get_manifest(monochrome, OOC, nonHTML)
var/list/cic = ROLES_CIC.Copy()
var/list/auxil = ROLES_AUXIL_SUPPORT.Copy()
Expand Down
30 changes: 0 additions & 30 deletions code/game/jobs/job/marine/squads.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,6 @@
squad_one_access = ACCESS_UPP_SQUAD_ONE
squad_two_access = ACCESS_UPP_SQUAD_TWO

/datum/squad/marine/upp/New()
. = ..()

RegisterSignal(SSdcs, COMSIG_GLOB_PLATOON_NAME_CHANGE, PROC_REF(rename_platoon))

/datum/squad/marine/forecon
name = SQUAD_LRRP
access = list(ACCESS_MARINE_ALPHA)
Expand Down Expand Up @@ -338,31 +333,6 @@

RegisterSignal(SSdcs, COMSIG_GLOB_MODE_POSTSETUP, PROC_REF(setup_supply_drop_list))

/datum/squad/marine/alpha/New()
. = ..()

RegisterSignal(SSdcs, COMSIG_GLOB_PLATOON_NAME_CHANGE, PROC_REF(rename_platoon))

/datum/squad/marine/proc/rename_platoon(datum/source, new_name, old_name)
SIGNAL_HANDLER

name = new_name

for(var/mob/living/carbon/human/marine in marines_list)
if(!istype(marine.wear_id, /obj/item/card/id))
continue

var/obj/item/card/id/marine_card = marine.wear_id
var/datum/weakref/marine_card_registered = marine.wear_id.registered_ref

if(!istype(marine_card_registered))
continue

if(marine != marine_card_registered.resolve())
continue

marine_card.assignment = "[new_name] [marine.job]"
marine_card.name = "[marine_card.registered_name]'s [marine_card.card_name] ([marine_card.assignment])"

/datum/squad/proc/setup_supply_drop_list()
SIGNAL_HANDLER
Expand Down
10 changes: 0 additions & 10 deletions code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@ GLOBAL_LIST_INIT(frozen_items, list(SQUAD_MARINE_1 = list(), SQUAD_MARINE_2 = li
/obj/structure/machinery/computer/cryopod/alpha
cryotype = SQUAD_MARINE_1

/obj/structure/machinery/computer/cryopod/alpha/Initialize()
. = ..()

RegisterSignal(SSdcs, COMSIG_GLOB_PLATOON_NAME_CHANGE, PROC_REF(rename_platoon))

/obj/structure/machinery/computer/cryopod/alpha/proc/rename_platoon(datum/source, new_name, old_name)
SIGNAL_HANDLER

cryotype = new_name

/obj/structure/machinery/computer/cryopod/bravo
cryotype = SQUAD_MARINE_2

Expand Down
28 changes: 0 additions & 28 deletions code/game/objects/effects/landmarks/landmarks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,6 @@
else
LAZYADD(GLOB.spawns_by_job[job], src)

RegisterSignal(SSdcs, COMSIG_GLOB_PLATOON_NAME_CHANGE, PROC_REF(rename_platoon))

/obj/effect/landmark/start/Destroy()
if(job)
if(squad)
Expand All @@ -265,17 +263,6 @@
LAZYREMOVE(GLOB.spawns_by_job[job], src)
return ..()

/obj/effect/landmark/start/proc/rename_platoon(datum/source, new_name, old_name)
SIGNAL_HANDLER
if(squad != old_name)
return

LAZYREMOVE(GLOB.spawns_by_squad_and_job, squad)
squad = new_name
LAZYINITLIST(GLOB.spawns_by_squad_and_job)
LAZYINITLIST(GLOB.spawns_by_squad_and_job[squad])
LAZYADD(GLOB.spawns_by_squad_and_job[squad][job], src)

/obj/effect/landmark/start/AISloc
name = "AI"

Expand Down Expand Up @@ -398,16 +385,6 @@
name = "alpha late join"
squad = SQUAD_MARINE_1

/obj/effect/landmark/late_join/alpha/Initialize(mapload, ...)
. = ..()

RegisterSignal(SSdcs, COMSIG_GLOB_PLATOON_NAME_CHANGE, PROC_REF(rename_platoon))

/obj/effect/landmark/late_join/proc/rename_platoon(datum/source, new_name, old_name)
SIGNAL_HANDLER

squad = new_name

/obj/effect/landmark/late_join/bravo
name = "bravo late join"
squad = SQUAD_MARINE_2
Expand All @@ -424,11 +401,6 @@
name = "upp late join"
squad = SQUAD_UPP

/obj/effect/landmark/late_join/upp/Initialize(mapload, ...)
. = ..()

RegisterSignal(SSdcs, COMSIG_GLOB_PLATOON_NAME_CHANGE, PROC_REF(rename_platoon))

/obj/effect/landmark/late_join/working_joe
name = "working joe late join"
job = JOB_WORKING_JOE
Expand Down
32 changes: 0 additions & 32 deletions code/game/objects/items/devices/radio/encryptionkey.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,6 @@
var/list/tracking_options
var/abstract = FALSE

/obj/item/device/encryptionkey/Initialize(mapload, ...)
. = ..()

RegisterSignal(SSdcs, COMSIG_GLOB_PLATOON_NAME_CHANGE, PROC_REF(rename_platoon))

if(!isnull(channels[SQUAD_MARINE_1]) && SQUAD_MARINE_1 != GLOB.main_platoon_name)
rename_platoon(null, GLOB.main_platoon_name, SQUAD_MARINE_1)

/obj/item/device/encryptionkey/proc/rename_platoon(datum/source, new_name, old_name)
SIGNAL_HANDLER

var/toggled_channel = channels[old_name]

if(isnull(toggled_channel))
return

channels -= old_name

channels[new_name] = toggled_channel

if(!istype(loc, /obj/item/device/radio/headset))
return

var/obj/item/device/radio/headset/current_headset = loc

var/passed_freq = current_headset.secure_radio_connections[old_name].frequency
current_headset.secure_radio_connections -= old_name

SSradio.remove_object(current_headset, passed_freq)

current_headset.recalculateChannels()

/obj/item/device/encryptionkey/binary
icon_state = "binary_key"
translate_apollo = TRUE
Expand Down
16 changes: 0 additions & 16 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,6 @@
if(radiochannels[cycled_channel] == frequency)
default_freq = cycled_channel

RegisterSignal(SSdcs, COMSIG_GLOB_PLATOON_NAME_CHANGE, PROC_REF(rename_platoon))

if(SQUAD_MARINE_1 == default_freq && SQUAD_MARINE_1 != GLOB.main_platoon_name)
rename_platoon(null, GLOB.main_platoon_name, SQUAD_MARINE_1)

/obj/item/device/radio/headset/proc/rename_platoon(datum/source, new_name, old_name)
SIGNAL_HANDLER

set_frequency(frequency)

/obj/item/device/radio/headset/Destroy()
wearer = null
QDEL_NULL_LIST(keys)
Expand Down Expand Up @@ -809,12 +799,6 @@
desc = "This is used by [SQUAD_MARINE_CRYO] squad members."
frequency = CRYO_FREQ

if(H.assigned_squad.name == GLOB.main_platoon_name)
name = "[GLOB.main_platoon_name] radio headset"
desc = "This is used by [GLOB.main_platoon_name] squad members."
icon_state = "alpha_headset"
frequency = ALPHA_FREQ

switch(GET_DEFAULT_ROLE(H.job))
if(JOB_SQUAD_LEADER)
name = "marine leader " + name
Expand Down
2 changes: 0 additions & 2 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ var/list/roundstart_mod_verbs = list(
add_verb(src, /client/proc/open_resin_panel)
add_verb(src, /client/proc/open_sound_panel)
add_verb(src, /client/proc/toggle_join_xeno)
add_verb(src, /client/proc/game_master_rename_platoon)
add_verb(src, /client/proc/toggle_vehicle_blockers)
add_verb(src, /client/proc/toggle_ai_xeno_weeding)
add_verb(src, /client/proc/toggle_rappel_menu)
Expand Down Expand Up @@ -380,7 +379,6 @@ var/list/roundstart_mod_verbs = list(
/client/proc/open_resin_panel,
/client/proc/open_sound_panel,
/client/proc/toggle_join_xeno,
/client/proc/game_master_rename_platoon,
/client/proc/toggle_vehicle_blockers,
/client/proc/toggle_ai_xeno_weeding,
/client/proc/toggle_rappel_menu,
Expand Down
63 changes: 0 additions & 63 deletions code/modules/admin/game_master/extra_buttons/rename_platoon.dm

This file was deleted.

10 changes: 0 additions & 10 deletions code/modules/cm_marines/overwatch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -945,16 +945,6 @@
icon_state = "alphadrop"
squad = SQUAD_MARINE_1

/obj/structure/supply_drop/alpha/Initialize(mapload, ...)
. = ..()

RegisterSignal(SSdcs, COMSIG_GLOB_PLATOON_NAME_CHANGE, PROC_REF(rename_platoon))

/obj/structure/supply_drop/alpha/proc/rename_platoon(datum/source, new_name, old_name)
SIGNAL_HANDLER

squad = new_name

/obj/structure/supply_drop/bravo
icon_state = "bravodrop"
squad = SQUAD_MARINE_2
Expand Down
8 changes: 0 additions & 8 deletions code/modules/gear_presets/uscm_ship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -594,14 +594,6 @@
new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/general/medium(new_human), WEAR_R_STORE)
new_human.equip_to_slot_or_del(new /obj/item/device/binoculars/range(new_human), WEAR_L_HAND)

/datum/equipment_preset/uscm_ship/so/load_status(mob/living/carbon/human/new_human, client/mob_client)
. = ..()

if(!new_human.client)
return

add_verb(new_human.client, /client/proc/commander_rename_platoon)

/datum/equipment_preset/uscm_ship/so/lesser_rank
paygrade = "MO1"

Expand Down
1 change: 0 additions & 1 deletion colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,6 @@
#include "code\modules\admin\game_master\sound_panel.dm"
#include "code\modules\admin\game_master\extra_buttons\fire_support_menu.dm"
#include "code\modules\admin\game_master\extra_buttons\rappel_menu.dm"
#include "code\modules\admin\game_master\extra_buttons\rename_platoon.dm"
#include "code\modules\admin\game_master\extra_buttons\toggle_ai_xeno_weeding.dm"
#include "code\modules\admin\game_master\extra_buttons\toggle_join_xeno.dm"
#include "code\modules\admin\game_master\extra_buttons\toggle_vehicle_blockers.dm"
Expand Down

0 comments on commit 8d823b3

Please sign in to comment.