Merge remote-tracking branch 'upstream/master' into dynamicport

This commit is contained in:
keronshb
2021-09-19 18:09:18 -04:00
143 changed files with 5772 additions and 4116 deletions
+21 -1
View File
@@ -10,8 +10,28 @@
/datum/round_event/cat_surgeon/start()
var/list/spawn_locs = list()
var/list/unsafe_spawn_locs = list()
for(var/X in GLOB.xeno_spawn)
spawn_locs += X
if(!isfloorturf(X))
unsafe_spawn_locs += X
continue
var/turf/open/floor/F = X
var/datum/gas_mixture/A = F.air
var/oxy_moles = A.get_moles(GAS_O2)
if((oxy_moles < 16 || oxy_moles > 50) || A.get_moles(GAS_PLASMA) || A.get_moles(GAS_CO2) >= 10)
unsafe_spawn_locs += F
continue
if((A.return_temperature() <= 270) || (A.return_temperature() >= 360))
unsafe_spawn_locs += F
continue
var/pressure = A.return_pressure()
if((pressure <= 20) || (pressure >= 550))
unsafe_spawn_locs += F
continue
spawn_locs += F
if(!spawn_locs.len)
spawn_locs += unsafe_spawn_locs
if(!spawn_locs.len)
message_admins("No valid spawn locations found, aborting...")
+2 -2
View File
@@ -9,7 +9,7 @@
/datum/round_event_control/mass_hallucination/admin_setup()
if(!check_rights(R_FUN))
return
forced_hallucination = input(usr, "Choose the hallucination to apply","Send Hallucination") as null|anything in subtypesof(/datum/hallucination)
/datum/round_event/mass_hallucination
@@ -26,7 +26,7 @@
switch(rand(1,4))
if(1) //same sound for everyone
var/sound = pick("airlock","airlock_pry","console","explosion","far_explosion","mech","glass","alarm","beepsky","mech","wall_decon","door_hack","tesla")
var/sound = pick("airlock","airlock_pry","console","explosion","far_explosion","mech","glass","alarm","beepsky","mech","wall_decon","door_hack","tesla","seth")
for(var/mob/living/carbon/C in GLOB.alive_mob_list)
new /datum/hallucination/sounds(C, TRUE, sound)
if(2)
+51
View File
@@ -0,0 +1,51 @@
/datum/round_event_control/space_ninja
name = "Spawn Space Ninja"
typepath = /datum/round_event/ghost_role/space_ninja
max_occurrences = 1
weight = 10
earliest_start = 20 MINUTES
min_players = 15
/datum/round_event/ghost_role/space_ninja
minimum_required = 1
role_name = "Space Ninja"
/datum/round_event/ghost_role/space_ninja/spawn_role()
var/list/spawn_locs = list()
for(var/obj/effect/landmark/carpspawn/carp_spawn in GLOB.landmarks_list)
if(!isturf(carp_spawn.loc))
stack_trace("Carp spawn found not on a turf: [carp_spawn.type] on [isnull(carp_spawn.loc) ? "null" : carp_spawn.loc.type]")
continue
spawn_locs += carp_spawn.loc
if(!spawn_locs.len)
message_admins("No valid spawn locations found, aborting...")
return MAP_ERROR
//selecting a candidate player
var/list/candidates = get_candidates(ROLE_NINJA, null, ROLE_NINJA)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS
var/mob/dead/selected_candidate = pick(candidates)
var/key = selected_candidate.key
//spawn the ninja and assign the candidate
var/mob/living/carbon/human/ninja = create_space_ninja(pick(spawn_locs))
ninja.key = key
ninja.mind.add_antag_datum(/datum/antagonist/ninja)
spawned_mobs += ninja
message_admins("[ADMIN_LOOKUPFLW(ninja)] has been made into a space ninja by an event.")
log_game("[key_name(ninja)] was spawned as a ninja by an event.")
return SUCCESSFUL_SPAWN
//=======//NINJA CREATION PROCS//=======//
/proc/create_space_ninja(spawn_loc)
var/mob/living/carbon/human/new_ninja = new(spawn_loc)
var/datum/preferences/random_human_options = new()//Randomize appearance for the ninja.
random_human_options.real_name = "[pick(GLOB.ninja_titles)] [pick(GLOB.ninja_names)]"
random_human_options.copy_to(new_ninja)
new_ninja.dna.update_dna_identity()
return new_ninja