From cf12bdbfe7d7bd39328556cfd202a62c23d30cbc Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Wed, 5 Jun 2024 08:28:34 -0500 Subject: [PATCH] no ship accses on subshuttles and stuff --- code/controllers/subsystem/mapping.dm | 5 +-- code/datums/shuttles.dm | 1 + .../frontiersmen/frontiersmen_event.dm | 20 ++++++----- code/modules/events/aurora_caelus.dm | 2 +- .../{refactor_and_unticked => }/sentience.dm | 33 +++++-------------- code/modules/events/ship/lottery.dm | 2 +- code/modules/events/ship/random_pet.dm | 2 +- .../modules/events/ship/rodent_infestation.dm | 2 +- code/modules/jobs/access.dm | 3 +- shiptest.dme | 1 + 10 files changed, 30 insertions(+), 41 deletions(-) rename code/modules/events/{refactor_and_unticked => }/sentience.dm (66%) diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 03720e4d641f..37c6d1d19907 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -152,6 +152,7 @@ SUBSYSTEM_DEF(mapping) #define CHECK_STRING_EXISTS(X) if(!istext(data[X])) { log_world("[##X] missing from json!"); continue; } #define CHECK_LIST_EXISTS(X) if(!islist(data[X])) { log_world("[##X] missing from json!"); continue; } + /datum/controller/subsystem/mapping/proc/load_ship_templates() maplist = list() ship_purchase_list = list() @@ -194,8 +195,8 @@ SUBSYSTEM_DEF(mapping) if(islist(data["namelists"])) S.name_categories = data["namelists"] - if(isnum(data[ "unique_ship_access" ] && data["unique_ship_access"])) - S.unique_ship_access = data[ "unique_ship_access" ] + if(isnum(data["unique_ship_access"])) + S.unique_ship_access = data["unique_ship_access"] if(istext(data["description"])) S.description = data["description"] diff --git a/code/datums/shuttles.dm b/code/datums/shuttles.dm index d7b60476d977..27c3dc83dc2e 100644 --- a/code/datums/shuttles.dm +++ b/code/datums/shuttles.dm @@ -329,6 +329,7 @@ /datum/map_template/shuttle/subshuttles category = "subshuttles" starting_funds = 0 + unique_ship_access = FALSE /datum/map_template/shuttle/subshuttles/pill file_name = "independent_pill" diff --git a/code/modules/antagonists/frontiersmen/frontiersmen_event.dm b/code/modules/antagonists/frontiersmen/frontiersmen_event.dm index 47f911dc7e5f..98a5b918ce0c 100644 --- a/code/modules/antagonists/frontiersmen/frontiersmen_event.dm +++ b/code/modules/antagonists/frontiersmen/frontiersmen_event.dm @@ -3,8 +3,8 @@ typepath = /datum/round_event/ghost_role/frontiersmen weight = 0 earliest_start = 0 - max_occurrences = 2 - min_players = 500 + max_occurrences = 0 + min_players = 0 //30 /datum/round_event/ghost_role/frontiersmen role_name = ROLE_FRONTIERSMEN @@ -13,9 +13,8 @@ priority_announce("A Frontiersmen vessel has invaded the outpost, please help", station_name()) /datum/round_event/ghost_role/frontiersmen/spawn_role() - makeERT(/datum/ert/frontier) + return makeERT(/datum/ert/frontier) -/datum/round_event_control/team/frontiersmen /// If we spawn an ERT with the "choose experienced leader" option, select the leader from the top X playtimes #define ERT_EXPERIENCED_LEADER_CHOOSE_TOP 3 @@ -37,21 +36,20 @@ var/turf/brief_spawn if(!length(candidates)) - to_chat(usr, span_warning("No applicants for ERT. Aborting spawn.")) - return FALSE + return NOT_ENOUGH_PLAYERS if(ertemplate.use_custom_shuttle && ertemplate.ert_template) - to_chat(usr, span_boldnotice("Attempting to spawn ERT custom shuttle, this may take a few seconds...")) + message_admins("Attempting to spawn ERT custom shuttle, this may take a few seconds...") var/datum/map_template/shuttle/template = new ertemplate.ert_template var/spawn_location if(ertemplate.spawn_at_outpost) if(length(SSovermap.outposts) > 1) - var/temp_loc = input(usr, "Select outpost to spawn at") as null|anything in SSovermap.outposts + var/temp_loc = pick(SSovermap.outposts) if(!temp_loc) message_admins("ERT found no outpost to spawn at!") - return + return MAP_ERROR spawn_location = temp_loc else spawn_location = SSovermap.outposts[1] @@ -63,6 +61,7 @@ if(!ship) CRASH("Loading ERT shuttle failed!") + return MAP_ERROR var/list/shuttle_turfs = ship.shuttle_port.return_turfs() @@ -85,6 +84,7 @@ message_admins("No outpost spawns found!") spawn_turfs = GLOB.emergencyresponseteam_outpostspawn + /* if(ertemplate.spawn_admin) if(isobserver(usr)) var/mob/living/carbon/human/admin_officer = new (brief_spawn || spawnpoints[1]) @@ -94,6 +94,7 @@ admin_officer.key = usr.key else to_chat(usr, span_warning("Could not spawn you in as briefing officer as you are not a ghost!")) + */ //Pick the (un)lucky players var/numagents = min(ertemplate.teamsize, length(candidates)) @@ -200,5 +201,6 @@ member.guestbook.add_guest(member_mob, other_member_mob, other_member_mob.real_name, other_member_mob.real_name, TRUE) message_admins("[ertemplate.rename_team] has spawned with the mission: [ertemplate.mission]") + return SUCCESSFUL_SPAWN #undef ERT_EXPERIENCED_LEADER_CHOOSE_TOP diff --git a/code/modules/events/aurora_caelus.dm b/code/modules/events/aurora_caelus.dm index 784dd44060fb..13b6c3fe32af 100644 --- a/code/modules/events/aurora_caelus.dm +++ b/code/modules/events/aurora_caelus.dm @@ -4,7 +4,7 @@ weight = 5 earliest_start = 0 min_players = 1 - max_occurrences = 1 + max_occurrences = 0 /datum/round_event_control/aurora_caelus/canSpawnEvent(players, gamemode) if(!CONFIG_GET(flag/starlight)) diff --git a/code/modules/events/refactor_and_unticked/sentience.dm b/code/modules/events/sentience.dm similarity index 66% rename from code/modules/events/refactor_and_unticked/sentience.dm rename to code/modules/events/sentience.dm index 80ebae9a8f27..c5aba7f41d1b 100644 --- a/code/modules/events/refactor_and_unticked/sentience.dm +++ b/code/modules/events/sentience.dm @@ -20,34 +20,21 @@ GLOBAL_LIST_INIT(high_priority_sentience, typecacheof(list( name = "Random Human-level Intelligence" typepath = /datum/round_event/ghost_role/sentience weight = 10 - + earliest_start = 10 MINUTES + max_occurrences = 0 /datum/round_event/ghost_role/sentience minimum_required = 1 role_name = "random animal" var/animals = 1 var/one = "one" - fakeable = TRUE - -/datum/round_event/ghost_role/sentience/announce(fake) - var/sentience_report = "" - - var/data = pick("scans from our long-range sensors", "our sophisticated probabilistic models", "our omnipotence", "the communications traffic in your sector", "energy emissions we detected", "\[REDACTED\]") - var/pets = pick("animals/bots", "bots/animals", "pets", "simple animals", "lesser lifeforms", "\[REDACTED\]") - var/strength = pick("human", "moderate", "lizard", "security", "command", "clown", "low", "very low", "\[REDACTED\]") - - sentience_report += "Based on [data], we believe that [one] of the station's [pets] has developed [strength] level intelligence, and the ability to communicate." - - priority_announce(sentience_report,"[command_name()] Medium-Priority Update") +// find our chosen mob to breathe life into +// Mobs have to be simple animals, mindless, on station, and NOT holograms. +// prioritize starter animals that people will recognise /datum/round_event/ghost_role/sentience/spawn_role() var/list/mob/dead/observer/candidates - candidates = get_candidates(role_name, null, role_name) - - // find our chosen mob to breathe life into - // Mobs have to be simple animals, mindless, on station, and NOT holograms. - // prioritize starter animals that people will recognise - + candidates = get_candidates(null, null, null) var/list/potential = list() @@ -55,7 +42,7 @@ GLOBAL_LIST_INIT(high_priority_sentience, typecacheof(list( var/list/low_pri = list() for(var/mob/living/simple_animal/L in GLOB.alive_mob_list) - if((L in GLOB.player_list) || L.mind || (L.flags_1 & HOLOGRAM_1)) + if((L in GLOB.player_list)) continue if(is_type_in_typecache(L, GLOB.high_priority_sentience)) hi_pri += L @@ -81,20 +68,16 @@ GLOBAL_LIST_INIT(high_priority_sentience, typecacheof(list( SA.key = SG.key - SA.grant_all_languages(TRUE, FALSE, FALSE) - SA.sentience_act() SA.maxHealth = max(SA.maxHealth, 200) SA.health = SA.maxHealth - SA.del_on_death = FALSE spawned_mobs += SA to_chat(SA, "Hello world!") to_chat(SA, "Due to freak radiation and/or chemicals \ - and/or lucky chance, you have gained human level intelligence \ - and the ability to speak and understand human language!") + and/or lucky chance, you have gained human level intelligence!") return SUCCESSFUL_SPAWN diff --git a/code/modules/events/ship/lottery.dm b/code/modules/events/ship/lottery.dm index 97e691614290..a02a1d49c9f7 100644 --- a/code/modules/events/ship/lottery.dm +++ b/code/modules/events/ship/lottery.dm @@ -1,5 +1,5 @@ /datum/round_event_control/ship_lottery - name = "lottery" + name = "Lottery" typepath = /datum/round_event/ship/lottery weight = 2 earliest_start = 20 MINUTES diff --git a/code/modules/events/ship/random_pet.dm b/code/modules/events/ship/random_pet.dm index a8ba2f709bba..af8ed73e4aa7 100644 --- a/code/modules/events/ship/random_pet.dm +++ b/code/modules/events/ship/random_pet.dm @@ -1,7 +1,7 @@ /datum/round_event_control/random_pet name = "Random Pet" typepath = /datum/round_event/ship/random_pet - weight = 10 + weight = 5 max_occurrences = 3 min_players = 1 earliest_start = 5 MINUTES diff --git a/code/modules/events/ship/rodent_infestation.dm b/code/modules/events/ship/rodent_infestation.dm index 7dccd0c75743..c821705bf0f4 100644 --- a/code/modules/events/ship/rodent_infestation.dm +++ b/code/modules/events/ship/rodent_infestation.dm @@ -1,7 +1,7 @@ /datum/round_event_control/rodent_infestation name = "Small Rodent Infestation" typepath = /datum/round_event/ship/rodent_infestation - weight = 10 + weight = 15 max_occurrences = 5 min_players = 1 earliest_start = 5 MINUTES diff --git a/code/modules/jobs/access.dm b/code/modules/jobs/access.dm index cdd44cab9ae8..c9f9fc829611 100644 --- a/code/modules/jobs/access.dm +++ b/code/modules/jobs/access.dm @@ -113,7 +113,8 @@ var/datum/overmap/ship/controlled/ship = SSshuttle.get_ship(src) if (gen_ship_access(ship)) return TRUE - + if(!item) + return FALSE var/obj/item/card/id/id = item?.GetID() if (id?.has_ship_access(ship)) return TRUE diff --git a/shiptest.dme b/shiptest.dme index a7073c73b4d1..02bb5b876094 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2082,6 +2082,7 @@ #include "code\modules\events\fax_spam.dm" #include "code\modules\events\ion_storm.dm" #include "code\modules\events\salesman.dm" +#include "code\modules\events\sentience.dm" #include "code\modules\events\spacevine.dm" #include "code\modules\events\holiday\halloween.dm" #include "code\modules\events\holiday\vday.dm"