Skip to content

Commit

Permalink
no ship accses on subshuttles and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Jun 5, 2024
1 parent 76cf4c8 commit cf12bdb
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 41 deletions.
5 changes: 3 additions & 2 deletions code/controllers/subsystem/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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"]
Expand Down
1 change: 1 addition & 0 deletions code/datums/shuttles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
20 changes: 11 additions & 9 deletions code/modules/antagonists/frontiersmen/frontiersmen_event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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]
Expand All @@ -63,6 +61,7 @@

if(!ship)
CRASH("Loading ERT shuttle failed!")
return MAP_ERROR

var/list/shuttle_turfs = ship.shuttle_port.return_turfs()

Expand All @@ -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])
Expand All @@ -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))
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion code/modules/events/aurora_caelus.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,29 @@ 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()

var/list/hi_pri = 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
Expand All @@ -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, "<span class='userdanger'>Hello world!</span>")
to_chat(SA, "<span class='warning'>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!</span>")
and/or lucky chance, you have gained human level intelligence!</span>")

return SUCCESSFUL_SPAWN

Expand Down
2 changes: 1 addition & 1 deletion code/modules/events/ship/lottery.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/events/ship/random_pet.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/events/ship/rodent_infestation.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion code/modules/jobs/access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions shiptest.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit cf12bdb

Please sign in to comment.