Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Hunting Grounds (Needs Testing) #7480

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@
#define PLAY_SYNTH (1<<5)
#define PLAY_MISC (1<<6)

//toggles_hunting_grounds
#define PLAY_MERC (1<<0)
#define PLAY_TWE (1<<1)
#define PLAY_UPP (1<<2)
#define PLAY_CLF (1<<3)
#define PLAY_XENO_T2 (1<<4)
#define PLAY_XENO_T3 (1<<5)

//toggles_admin
/// Splits admin tabs in Statpanel
#define SPLIT_ADMIN_TABS (1<<0)
Expand All @@ -167,6 +175,8 @@

#define TOGGLES_ERT_DEFAULT (PLAY_LEADER|PLAY_MEDIC|PLAY_ENGINEER|PLAY_HEAVY|PLAY_SMARTGUNNER|PLAY_SYNTH|PLAY_MISC)

#define TOGGLES_ERT_GROUNDS (PLAY_MERC|PLAY_TWE|PLAY_UPP|PLAY_CLF|PLAY_XENO_T2|PLAY_XENO_T3)

#define TOGGLES_ADMIN_DEFAULT (ADMIN_AFK_SAFE)

// Game Intents
Expand Down
15 changes: 15 additions & 0 deletions code/datums/emergency_calls/emergency_call.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,21 @@
var/max_engineers = 1
var/max_heavies = 1
var/max_smartgunners = 1
///xeno roles
var/xeno_t3 = 0
var/xeno_t2 = 0
var/max_xeno_t3 = 1
var/max_xeno_t2 = 1
///Hunting Grounds
var/mercs = 0
var/royal_marines= 0
var/upp = 0
var/clf = 0
var/max_mercs = 1
var/max_royal_marines= 1
var/max_upp = 1
var/max_clf = 1

var/shuttle_id = MOBILE_SHUTTLE_ID_ERT1 //Empty shuttle ID means we're not using shuttles (aka spawn straight into cryo)
var/auto_shuttle_launch = TRUE
var/spawn_max_amount = FALSE
Expand Down
155 changes: 155 additions & 0 deletions code/datums/emergency_calls/pred_hunt/hunting_calls.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
///Predator Hunting Ground ERTs


/datum/emergency_call/pred
name = "template"
var/hunt_name
var/message = "You are still expected to uphold the RP of the standard as this character!"
probability = 0
name_of_spawn = /obj/effect/landmark/ert_spawns/distress/hunt_spawner
shuttle_id = ""

/datum/emergency_call/pred/mixed
name = "Hunting Grounds Mutil Faction Small"
hunt_name = "Multi Faction (small)"
mob_max = 4
mob_min = 1
max_clf = 1
max_upp = 1
max_royal_marines = 1

/datum/emergency_call/pred/create_member(datum/mind/man, turf/override_spawn_loc)
var/turf/spawn_loc = override_spawn_loc ? override_spawn_loc : get_spawn_point()

if(!istype(spawn_loc))
return //Didn't find a useable spawn point.

var/mob/living/carbon/human/hunted = new(spawn_loc)
man.transfer_to(hunted, TRUE)

if(mercs < max_mercs && HAS_FLAG(hunted.client.prefs.toggles_ert_pred, PLAY_MERC))
mercs++
var/list/hunted_types = list(/datum/equipment_preset/other/freelancer/leader/hunted, /datum/equipment_preset/other/freelancer/standard/hunted)
var/hunted_type = pick(hunted_types)
arm_equipment(hunted, hunted_type , TRUE, TRUE)
to_chat(hunted, SPAN_BOLD("No one is more professional than I. Unlike other mercenaries, your group was registered as a legitimate business that dealt in violence. Working for various high profile clients, information classified to the public circulated somewhat freely in your circle - stories you dismissed as anecdotal or hearsay. The last job you took proved particularly hazardous and truthful: as you were clearing local fauna around a dig site, a massive man-shaped shimmering thing lunged at you and knocked you out in one blow. Groggily opening your eyes, you try to make sense of your surroundings, and get up."))
else if(upp < max_upp && HAS_FLAG(hunted.client.prefs.toggles_ert_pred, PLAY_UPP))
upp++
var/list/hunted_types = list(/datum/equipment_preset/upp/soldier/hunted, /datum/equipment_preset/upp/leader/hunted, /datum/equipment_preset/upp/machinegunner/hunted, /datum/equipment_preset/upp/sapper/hunted)
var/hunted_type = pick(hunted_types)
arm_equipment(hunted, hunted_type , TRUE, TRUE)
to_chat(hunted, SPAN_BOLD("Life was alright. Previously relocated from your noisier post on the frontier, you were now stationed just on the outer veil of Union territory. Combat patrols and sawdust rations turned into boring guard shifts and proper food, making your peacekeeping duty a much envied task. Then, your life came crumbling down. An unknown alien surprised you and the rest of your garrison, slaughtering effectively everyone. Just as you were about to escape, it caught you in a trap, and dragged you into the darkness. Now awake in a completely different place, still sore from the confrontation, you wonder what you'd have to do to get back home safe and sound."))
else if(royal_marines < max_royal_marines && HAS_FLAG(hunted.client.prefs.toggles_ert_pred, PLAY_TWE))
royal_marines++
var/list/hunted_types = list(/datum/equipment_preset/twe/royal_marine/standard/hunted, /datum/equipment_preset/twe/royal_marine/team_leader/hunted, /datum/equipment_preset/twe/royal_marine/lieuteant/hunted)
var/hunted_type = pick(hunted_types)
arm_equipment(hunted, hunted_type , TRUE, TRUE)
to_chat(hunted, SPAN_BOLD("You were starting to get sick and tired of these Australians. Posted and wrangled around Oceania, you had spent the last half decade from refugee camp to metropolis, making sure order was maintained most of the time and partaking in a riot action now and then. You were ready to give about anything for your job to be more interesting, and like a monkey's paw, the wish came true. One night, your barracks got blown up before your very eyes while on guard duty, and to your dismay, it was not a terrorist. You attempted to gun the monster down, but failed, your friends torn apart before your very eyes. Being the last one alive, the thing takes you with it, shackles you, and throws you into a cell. You black out again, and wake up here, wherever you are. At least you hope things will be more interesting now, or so you tell yourself."))
else if(clf < max_clf && HAS_FLAG(hunted.client.prefs.toggles_ert_pred, PLAY_CLF))
clf++
var/list/hunted_types = list(/datum/equipment_preset/clf/soldier/hunted, /datum/equipment_preset/clf/leader/hunted, /datum/equipment_preset/clf/engineer/hunted)
var/hunted_type = pick(hunted_types)
arm_equipment(hunted, hunted_type , TRUE, TRUE)
to_chat(hunted, SPAN_BOLD("Your whole life was a struggle. Fighting tooth and nail for the independence of your colony from one master to the next, with not much change, your home ended up crushed under the boot of the oppressor. Filled with rage, you traveled with your cell of freedom fighters from one system to the next, wreaking havoc and mayhem, which eventually makes you notorious for your brutal executions of government officials and military. While on a raid gone wrong, your comrades get slaughtered by a marine squad, and as you scamper to get away, something else catches you off guard. KO'd and taken away, you wake up in conditions not much different from your previous ones, determined to get revenge against your oppressor once more."))
else
var/list/hunted_types = list(/datum/equipment_preset/uscm/rifleman_pve/hunted, /datum/equipment_preset/uscm/tl_pve/hunted, /datum/equipment_preset/uscm/sg_pve/hunted,)
var/hunted_type = pick(hunted_types)
arm_equipment(hunted, hunted_type , TRUE, TRUE)
to_chat(hunted, SPAN_BOLD("You dreamt of becoming the ultimate badass ever since you were a kid. Nukes, knives, sharp sticks - and the corps was for you, enlisting into the marines as soon as you could join. There were little regrets from you, happily gunning down anything, anytime, and anywhere you were told to go... until now. During a jungle patrol, your entire squad was torn to shreds by a single cloaker - something you previously figured was made up just to scare chickenshit privates. Riddling the freak with bullet holes, it finally catches you off guard, and after that it's all hazy. Waking up, you realize you're still alive... and that it left you with your weapon. Big mistake. You get up."))

addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(playsound_client), hunted.client, 'sound/misc/hunt_start.ogg'), 10 SECONDS)
show_blurb(hunted, 15, message, null, "center", "center", COLOR_RED, null, null, 1)
message_all_yautja("Let the hunt begin!")

/datum/emergency_call/pred/mixed/medium
name = "Hunting Grounds Mutil Faction Medium"
hunt_name = "Multi Faction (group)"
mob_max = 6
mob_min = 4
max_clf = 2
max_upp = 2
max_royal_marines = 1
max_mercs = 1


/datum/emergency_call/pred/mixed/hard
name = "Hunting Grounds Mutil Faction Large"
hunt_name = "Multi Faction (large)"
mob_max = 8
mob_min = 6
max_clf = 2
max_upp = 2
max_royal_marines = 1
max_mercs = 1

/datum/emergency_call/pred/mixed/harder
name = "Hunting Grounds Mutil Faction Larger"
hunt_name = "Multi Faction (larger)"
mob_max = 12
mob_min = 6
max_clf = 3
max_upp = 2
max_royal_marines = 2
max_mercs = 2

/datum/emergency_call/pred/xeno
name = "Hunting Grounds Xenos Small"
hunt_name = "serpents (small)"
mob_max = 3
mob_min = 2
hostility = TRUE
max_xeno_t3 = 1
max_xeno_t2 = 1

/datum/emergency_call/pred/xeno/create_member(datum/mind/player, turf/override_spawn_loc)
var/turf/spawn_loc = override_spawn_loc ? override_spawn_loc : get_spawn_point()
var/mob/current_mob = player.current
var/mob/living/carbon/xenomorph/new_xeno

if(!istype(spawn_loc))
return // Didn't find a usable spawn point.

if(xeno_t3 < max_xeno_t3 && HAS_FLAG(current_mob.client.prefs.toggles_ert_pred, PLAY_XENO_T3))
xeno_t3++
var/list/xeno_types = list(/mob/living/carbon/xenomorph/praetorian, /mob/living/carbon/xenomorph/ravager)
var/xeno_type = pick(xeno_types)
new_xeno = new xeno_type(spawn_loc, null, XENO_HIVE_FERAL)
player.transfer_to(new_xeno, TRUE)
QDEL_NULL(current_mob)
to_chat(new_xeno, SPAN_BOLD("You are a xeno"))
else if(xeno_t2 < max_xeno_t2 && HAS_FLAG(current_mob.client.prefs.toggles_ert_pred, PLAY_XENO_T2))
xeno_t2++
var/list/xeno_types = list(/mob/living/carbon/xenomorph/lurker, /mob/living/carbon/xenomorph/warrior)
var/xeno_type = pick(xeno_types)
new_xeno = new xeno_type(spawn_loc, null, XENO_HIVE_FERAL)
player.transfer_to(new_xeno, TRUE)
QDEL_NULL(current_mob)
to_chat(new_xeno, SPAN_BOLD("You are a xeno let loose on a strang "))
else
var/list/xeno_types = list(/mob/living/carbon/xenomorph/warrior)
var/xeno_type = pick(xeno_types)
new_xeno = new xeno_type(spawn_loc, null, XENO_HIVE_FERAL)
player.transfer_to(new_xeno, TRUE)
to_chat(new_xeno, SPAN_BOLD("You are a xeno"))

addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(playsound_client), new_xeno.client, 'sound/misc/hunt_start.ogg'), 10 SECONDS)
show_blurb(new_xeno, 15, message, null, "center", "center", COLOR_RED, null, null, 1)
message_all_yautja("Let the hunt begin!")

/datum/emergency_call/pred/xeno/med
name = "Hunting Grounds Xenos Medium"
hunt_name = "serpents (group)"
mob_max = 4
mob_min = 3
hostility = TRUE
max_xeno_t3 = 3
max_xeno_t2 = 1

/datum/emergency_call/pred/xeno/hard
name = "Hunting Grounds Xenos Large"
hunt_name = "serpents (large)"
mob_max = 6
mob_min = 4
hostility = TRUE
max_xeno_t3 = 3
max_xeno_t2 = 3
7 changes: 7 additions & 0 deletions code/datums/lazy_template.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@
for(var/thing in (turf.get_all_contents() - turf))
loaded_atom_movables |= thing

for(var/turf/initializing_turf as anything in loaded_turfs)
var/area/turf_area = initializing_turf.loc // not using get_area as these are turfs, and the loc is guaranteed to be an area
if(!turf_area.static_lighting)
continue

new/datum/static_lighting_object(initializing_turf)

SSatoms.InitializeAtoms(loaded_areas + loaded_atom_movables + loaded_turfs)

SEND_SIGNAL(src, COMSIG_LAZY_TEMPLATE_LOADED, loaded_atom_movables, loaded_turfs, loaded_areas)
Expand Down
1 change: 1 addition & 0 deletions code/game/area/admin_level.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
soundscape_playlist = SCAPE_PL_ELEVATOR_MUSIC
icon_state = "yellow"


//Simulation area
/area/adminlevel/simulation
name = "Simulated Reality"
Expand Down
3 changes: 3 additions & 0 deletions code/game/machinery/door_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@
if(!(stat & NOPOWER))
icon_state = initial(icon_state) + "0"




/obj/structure/machinery/door_control/brbutton
icon_state = "big_red_button_wallv"

Expand Down
33 changes: 33 additions & 0 deletions code/game/turfs/open.dm
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,39 @@
/turf/open/gm/coast/beachcorner2/south_east
dir = 8

/turf/open/gm/coast/beachcorner2
icon_state = "beachcorner2"

/turf/open/gm/coast/beachcorner2/east
dir = EAST

/turf/open/gm/coast/east
dir = EAST

/turf/open/gm/coast/beachcorner
icon_state = "beachcorner"

/turf/open/gm/dirtgrassborder/north
dir = NORTH

/turf/open/gm/dirtgrassborder/grassdirt_corner
icon_state = "grassdirt_corner"

/turf/open/gm/dirtgrassborder/grassdirt_corner2
icon_state = "grassdirt_corner2"

/turf/open/gm/dirt/beach
icon_state = "beach"

/turf/open/gm/dirt/beach/northeast
dir = NORTHEAST

/turf/open/gm/dirt/beach/southeast
dir = SOUTHEAST

/turf/open/gm/dirt/beach/northwest
dir = NORTHWEST

/turf/open/gm/riverdeep
name = "river"
icon_state = "seadeep"
Expand Down
5 changes: 5 additions & 0 deletions code/game/turfs/walls/wall_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen)
desc = "The patterns engraved on the wall seem to shift as you try to focus on them. You feel sick"
icon = 'icons/turf/walls/cult.dmi'
icon_state = "cult"
baseturfs = /turf/open/floor/strata
walltype = WALL_CULT
color = "#3c3434"

Expand All @@ -479,6 +480,10 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen)
. = ..()
icon_state = "[type]vault"

/turf/closed/wall/cult/hunting_grounds
name = "wall"
hull = 1


//Hangar walls
/turf/closed/wall/hangar
Expand Down
16 changes: 15 additions & 1 deletion code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ GLOBAL_LIST_INIT(bgstate_options, list(
var/toggles_sound = TOGGLES_SOUND_DEFAULT
var/toggles_flashing = TOGGLES_FLASHING_DEFAULT
var/toggles_ert = TOGGLES_ERT_DEFAULT
var/toggles_ert_pred = TOGGLES_ERT_GROUNDS
var/chat_display_preferences = CHAT_TYPE_ALL
var/item_animation_pref_level = SHOW_ITEM_ANIMATIONS_ALL
var/pain_overlay_pref_level = PAIN_OVERLAY_BLURRY
Expand Down Expand Up @@ -657,8 +658,17 @@ GLOBAL_LIST_INIT(bgstate_options, list(
dat += "<b>Spawn as Synth:</b> <a href='?_src_=prefs;preference=toggles_ert;flag=[PLAY_SYNTH]'><b>[toggles_ert & PLAY_SYNTH ? "Yes" : "No"]</b></a><br>"
dat += "<b>Spawn as Miscellaneous:</b> <a href='?_src_=prefs;preference=toggles_ert;flag=[PLAY_MISC]'><b>[toggles_ert & PLAY_MISC ? "Yes" : "No"]</b></a><br>"
dat += "</div>"
dat += "<div id='column2'>"
dat += "<h2><b><u>Hunting Ground ERT Settings:</u></b></h2>"
dat += "<b>Spawn as Mercenary:</b> <a href='?_src_=prefs;preference=toggles_ert_pred;flag=[PLAY_MERC]'><b>[toggles_ert_pred & PLAY_MERC ? "Yes" : "No"]</b></a><br>"
dat += "<b>Spawn as Royal Marine:</b> <a href='?_src_=prefs;preference=toggles_ert_pred;flag=[PLAY_TWE]'><b>[toggles_ert_pred & PLAY_TWE ? "Yes" : "No"]</b></a><br>"
dat += "<b>Spawn as UPP:</b> <a href='?_src_=prefs;preference=toggles_ert_pred;flag=[PLAY_UPP]'><b>[toggles_ert_pred & PLAY_UPP ? "Yes" : "No"]</b></a><br>"
dat += "<b>Spawn as CLF:</b> <a href='?_src_=prefs;preference=toggles_ert_pred;flag=[PLAY_CLF]'><b>[toggles_ert_pred & PLAY_CLF ? "Yes" : "No"]</b></a><br>"
dat += "<b>Spawn as Xeno T2:</b> <a href='?_src_=prefs;preference=toggles_ert_pred;flag=[PLAY_XENO_T2]'><b>[toggles_ert_pred & PLAY_XENO_T2 ? "Yes" : "No"]</b></a><br>"
dat += "<b>Spawn as Xeno T3:</b> <a href='?_src_=prefs;preference=toggles_ert_pred;flag=[PLAY_XENO_T3]'><b>[toggles_ert_pred & PLAY_XENO_T3 ? "Yes" : "No"]</b></a><br>"
dat += "</div>"
dat += "</body>"

dat += "</div></body>"

winshow(user, "preferencewindow", TRUE)
show_browser(user, dat, "Preferences", "preferencewindow")
Expand Down Expand Up @@ -1914,6 +1924,10 @@ GLOBAL_LIST_INIT(bgstate_options, list(
var/flag = text2num(href_list["flag"])
toggles_ert ^= flag

if("toggles_ert_pred")
var/flag = text2num(href_list["flag"])
toggles_ert_pred ^= flag

if("ambientocclusion")
toggle_prefs ^= TOGGLE_AMBIENT_OCCLUSION
var/atom/movable/screen/plane_master/game_world/plane_master = locate() in user?.client.screen
Expand Down
10 changes: 10 additions & 0 deletions code/modules/cm_preds/hunting_grounds.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
///Hunting Grounds Maps

/datum/lazy_template/pred
map_dir = "maps/templates/lazy_templates/pred"
///visible name of the hunting ground on the selection computer
var/hunting_ground_name

/datum/lazy_template/pred/jungle_moon
map_name = "jungle_moon"
hunting_ground_name = "Jungle Moon"
Loading
Loading