From cf1a95dabc929f397f3c9e4b191104f669fc200c Mon Sep 17 00:00:00 2001 From: datlo Date: Mon, 4 Feb 2019 00:21:13 +0000 Subject: [PATCH] fix config options --- code/_globalvars/lists/objects.dm | 2 +- code/game/gamemodes/blob/blob.dm | 1 + code/game/gamemodes/game_mode.dm | 9 ++++++++- code/game/gamemodes/nuclear/nuclear.dm | 1 + code/game/gamemodes/wizard/wizard.dm | 1 + .../mission_code/ghost_role_spawners/golems.dm | 7 ++++++- 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index acb86875a5a..5ecc6938aa2 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -36,7 +36,7 @@ GLOBAL_LIST_INIT(tracked_implants, list()) //list of all current implants that GLOBAL_LIST_INIT(pinpointer_list, list()) //list of all pinpointers. Used to change stuff they are pointing to all at once. GLOBAL_LIST_INIT(nuclear_uplink_list, list()) //list of all existing nuke ops uplinks GLOBAL_LIST_INIT(abductor_equipment, list()) //list of all abductor equipment - +GLOBAL_LIST_INIT(free_golem_shells, list()) //list of all free golem shells GLOBAL_LIST_INIT(global_intercoms, list()) //list of all intercomms, across all z-levels GLOBAL_LIST_INIT(global_radios, list()) //list of all radios, across all z-levels diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index 42a42240ad5..41068876a54 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -12,6 +12,7 @@ var/list/blob_nodes = list() required_enemies = 1 recommended_enemies = 1 restricted_jobs = list("Cyborg", "AI") + free_golems_disabled = TRUE var/declared = 0 var/burst = 0 diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 863b31832a0..ae3ddb35000 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -27,6 +27,7 @@ var/recommended_enemies = 0 var/newscaster_announcements = null var/ert_disabled = 0 + var/free_golems_disabled = FALSE var/uplink_welcome = "Syndicate Uplink Console:" var/uplink_uses = 20 @@ -79,6 +80,7 @@ // feedback_set_details("revision","[revdata.revision]") feedback_set_details("server_ip","[world.internet_address]:[world.port]") generate_station_goals() + check_free_golems() start_state = new /datum/station_state() start_state.count() return 1 @@ -494,4 +496,9 @@ proc/display_roundstart_logout_report() /datum/game_mode/proc/declare_station_goal_completion() for(var/V in station_goals) var/datum/station_goal/G = V - G.print_result() \ No newline at end of file + G.print_result() + +/datum/game_mode/proc/check_free_golems() //check config and gamemode for free golems setting and run the prob to check if the round will have free golems spawned or not + if((!config.unrestricted_free_golems && free_golems_disabled) || !prob(config.prob_free_golems)) + for(var/obj/effect/mob_spawn/human/golem/G in GLOB.free_golem_shells) + qdel(G) \ No newline at end of file diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index a3d4a89033a..195629197c5 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -12,6 +12,7 @@ proc/issyndicate(mob/living/M as mob) required_players = 30 // 30 players - 5 players to be the nuke ops = 25 players remaining required_enemies = 5 recommended_enemies = 5 + free_golems_disabled = TRUE var/const/agents_possible = 5 //If we ever need more syndicate agents. diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 5951814660b..b249ebe8520 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -7,6 +7,7 @@ required_players = 20 required_enemies = 1 recommended_enemies = 1 + free_golems_disabled = TRUE var/use_huds = 0 var/finished = 0 diff --git a/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm b/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm index 636204c296e..95057e90d54 100644 --- a/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm +++ b/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm @@ -67,6 +67,11 @@ travel the stars with a single declaration: \"Yeah go do whatever.\" Though you are bound to the one who created you, it is customary in your society to repeat those same words to newborn \ golems, so that no golem may ever be forced to serve again." +/obj/effect/mob_spawn/human/golem/New() + ..() + if(!has_owner) + GLOB.free_golem_shells += src + /obj/effect/mob_spawn/human/golem/Initialize(mapload, datum/species/golem/species = null, mob/creator = null) if(species) //spawners list uses object name to register so this goes before ..() name += " ([initial(species.prefix)])" @@ -132,4 +137,4 @@ desc = "A humanoid shape, empty, lifeless, and full of potential." mob_name = "a free golem" can_transfer = FALSE - mob_species = /datum/species/golem/adamantine \ No newline at end of file + mob_species = /datum/species/golem/adamantine