mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 18:33:36 +00:00
* ports all the tg junk for icemoon, not yet changed to make it all compile * fixes * fixes * fixes * fixes * fixes * new stuff * whew * fixes * it compiles, now to fix the maps * fixes the maps * fixes solars + removes the space tiles in the toxins burn chamber * nukes the SpawnTerrain proc used for tg geysers * linter fix * fix * fixes the non matching turf atmos (hopefully) * more mapping fixes * dmm2tgm * unfucks changeturf for the more_caves * fixes the volanic subtypes of the other thing * fixes the stupid fucking tile placing list * some map fixes, fixes the station_ruin loader shitting out errors this commit took 2 hours of my fucking life * fixes a bunch of mismatch atmos in ruins * fixes wendigo cave having no air * backwards couch backwards couch * fixes the SM up * wendigos can't runtime when butchering if you can't butcher them 😎 * makes the wendigo fight have the same atmos as the surrounding icemoon * Tweaks atmos mixture from o2=22;n2=82;TEMP=180 to o2=18;n2=63;TEMP=180, making lavaland weapons actually work * makes the wendigo screech shake not completely aids * fixes snowlegion portals dropping proper legions instead of skeles * brings the engioutpost ruin over as well * whoopps * empty commit to reroll bots * Fixes pirates, ops, the mining base, and gives pirates and ops drills * fixes lone ops and ninjas * fixes the snowed plating getting fucked when tiles are placed on it * removes some OP junk from the wabbajack pool (aka removes non-antag headslugs again) * more bug fixes * empty commit to reroll bots * hopefully finally kills the active turfs on the library ruin Co-authored-by: kevinz000 <2003111+kevinz000@users.noreply.github.com>
94 lines
2.6 KiB
Plaintext
94 lines
2.6 KiB
Plaintext
//Note to future generations: I didn't write this god-awful code I just ported it to the event system and tried to make it less moon-speaky.
|
|
//Don't judge me D; ~Carn //Maximum judging occuring - Remie.
|
|
// Tut tut Remie, let's keep our comments constructive. - coiax
|
|
|
|
/*
|
|
|
|
Contents:
|
|
- The Ninja "Random" Event
|
|
- Ninja creation code
|
|
*/
|
|
|
|
/datum/round_event_control/ninja
|
|
name = "Space Ninja"
|
|
typepath = /datum/round_event/ghost_role/ninja
|
|
max_occurrences = 1
|
|
earliest_start = 40 MINUTES
|
|
gamemode_blacklist = list("dynamic")
|
|
min_players = 15
|
|
|
|
/datum/round_event/ghost_role/ninja
|
|
var/success_spawn = 0
|
|
role_name = "space ninja"
|
|
minimum_required = 1
|
|
|
|
var/helping_station
|
|
var/spawn_loc
|
|
var/give_objectives = TRUE
|
|
|
|
/datum/round_event/ghost_role/ninja/setup()
|
|
helping_station = rand(0,1)
|
|
|
|
/datum/round_event/ghost_role/ninja/kill()
|
|
if(!success_spawn && control)
|
|
control.occurrences--
|
|
return ..()
|
|
|
|
/datum/round_event/ghost_role/ninja/spawn_role()
|
|
//selecting a spawn_loc
|
|
if(!spawn_loc)
|
|
var/list/spawn_locs = list()
|
|
for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list)
|
|
if(isturf(L.loc))
|
|
spawn_locs += L.loc
|
|
for(var/obj/effect/landmark/loneopspawn/L in GLOB.landmarks_list)
|
|
if(isturf(L.loc))
|
|
spawn_locs += L.loc
|
|
if(!spawn_locs.len)
|
|
return kill()
|
|
spawn_loc = pick(spawn_locs)
|
|
if(!spawn_loc)
|
|
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_n_take(candidates)
|
|
var/key = selected_candidate.key
|
|
|
|
//Prepare ninja player mind
|
|
var/datum/mind/Mind = new /datum/mind(key)
|
|
Mind.assigned_role = ROLE_NINJA
|
|
Mind.special_role = ROLE_NINJA
|
|
Mind.active = 1
|
|
|
|
//spawn the ninja and assign the candidate
|
|
var/mob/living/carbon/human/Ninja = create_space_ninja(spawn_loc)
|
|
Mind.transfer_to(Ninja)
|
|
var/datum/antagonist/ninja/ninjadatum = new
|
|
ninjadatum.helping_station = pick(TRUE,FALSE)
|
|
Mind.add_antag_datum(ninjadatum)
|
|
|
|
if(Ninja.mind != Mind) //something has gone wrong!
|
|
stack_trace("Ninja created with incorrect mind")
|
|
|
|
spawned_mobs += Ninja
|
|
message_admins("[ADMIN_LOOKUPFLW(Ninja)] has been made into a ninja by an event.")
|
|
log_game("[key_name(Ninja)] was spawned as a ninja by an event.")
|
|
success_spawn = TRUE
|
|
|
|
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/A = new()//Randomize appearance for the ninja.
|
|
A.real_name = "[pick(GLOB.ninja_titles)] [pick(GLOB.ninja_names)]"
|
|
A.copy_to(new_ninja)
|
|
new_ninja.dna.update_dna_identity()
|
|
return new_ninja
|