Skip to content

Commit

Permalink
TGS Test Merge (#7025)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Sep 3, 2024
2 parents 0b773fd + 023f225 commit fa60ecc
Show file tree
Hide file tree
Showing 8 changed files with 308 additions and 52 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ DEFINE_BITFIELD(whitelist_status, list(
#define FACTION_LIST_MARINE_WY list(FACTION_MARINE, FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
#define FACTION_LIST_MARINE_UPP list(FACTION_MARINE, FACTION_UPP)
#define FACTION_LIST_MARINE_TWE list(FACTION_MARINE, FACTION_TWE)
#define FACTION_LIST_YAUTJA list(FACTION_YAUTJA)

// Xenomorphs
#define FACTION_PREDALIEN "Predalien"
Expand Down
3 changes: 3 additions & 0 deletions code/_globalvars/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,6 @@ GLOBAL_VAR(xeno_queue_candidate_count)
GLOBAL_VAR(obfs_x)
/// A number between -500 and 500.
GLOBAL_VAR(obfs_y)

/// The current amount of giant lizards that are alive.
GLOBAL_VAR_INIT(giant_lizards_alive, 0)
1 change: 1 addition & 0 deletions code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ Additional game mode variables.
player.mind_initialize() //Will work on ghosts too, but won't add them to active minds.
player.mind.setup_human_stats()
player.faction = FACTION_YAUTJA
player.faction_group = FACTION_LIST_YAUTJA
players += player.mind
return players

Expand Down
18 changes: 18 additions & 0 deletions code/game/objects/effects/landmarks/landmarks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@
GLOB.monkey_spawns -= src
return ..()

#define MAXIMUM_LIZARD_AMOUNT 4

/obj/effect/landmark/lizard_spawn
name = "lizard spawn"
icon_state = "lizard_spawn"
Expand All @@ -129,6 +131,22 @@
. = ..()
if(prob(66))
new /mob/living/simple_animal/hostile/retaliate/giant_lizard(loc)
addtimer(CALLBACK(src, PROC_REF(latespawn_lizard)), rand(35 MINUTES, 50 MINUTES))

/obj/effect/landmark/lizard_spawn/proc/latespawn_lizard()
//if there's already a ton of lizards alive, try again later
if(GLOB.giant_lizards_alive > MAXIMUM_LIZARD_AMOUNT)
addtimer(CALLBACK(src, PROC_REF(latespawn_lizard)), rand(15 MINUTES, 25 MINUTES))
return
//if there's a living mob that can witness the spawn then try again later
for(var/mob/living/living_mob in range(7, src))
if(living_mob.stat != DEAD || living_mob.client)
continue
addtimer(CALLBACK(src, PROC_REF(latespawn_lizard)), 1 MINUTES)
return
new /mob/living/simple_animal/hostile/retaliate/giant_lizard(loc)

#undef MAXIMUM_LIZARD_AMOUNT

/obj/effect/landmark/latewhiskey
name = "Whiskey Outpost Late join"
Expand Down
2 changes: 2 additions & 0 deletions code/modules/gear_presets/yautja.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
languages = list(LANGUAGE_YAUTJA)
rank = "Predator"
faction = FACTION_YAUTJA
faction_group = FACTION_LIST_YAUTJA
uses_special_name = TRUE
skills = /datum/skills/yautja/warrior

Expand All @@ -23,6 +24,7 @@
/datum/equipment_preset/yautja/load_id(mob/living/carbon/human/new_human)
new_human.job = rank
new_human.faction = faction
new_human.faction_group = faction_group

/datum/equipment_preset/yautja/load_vanity(mob/living/carbon/human/new_human)
return //No vanity items for Yautja!
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
return 0

if(!gibbed)
visible_message("<b>\The [src.name]</b> [deathmessage]")
visible_message("<b>[src.name]</b> [deathmessage]")

if(cause_data && !istype(cause_data))
stack_trace("death called with string cause ([cause_data]) instead of datum")
Expand Down
Loading

0 comments on commit fa60ecc

Please sign in to comment.