Skip to content

Commit

Permalink
Merge branch 'master' into UGL-rounds-expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
BonniePandora committed Oct 31, 2024
2 parents 91b0847 + 4abd748 commit f14abae
Show file tree
Hide file tree
Showing 18 changed files with 138 additions and 33 deletions.
3 changes: 2 additions & 1 deletion code/__DEFINES/conflict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@
#define HEALTH_WALL_XENO_REFLECTIVE 300
#define HEALTH_WALL_XENO_MEMBRANE_THICK 600

#define HEALTH_DOOR 1200
#define HEALTH_DOOR 2400
#define HEALTH_ASSEMBLY 400
#define HEALTH_DOOR_XENO 600
#define HEALTH_DOOR_XENO_THICK 900

Expand Down
4 changes: 2 additions & 2 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

// Job name defines
#define JOB_SQUAD_MARINE "Rifleman"
#define JOB_SQUAD_LEADER "Platoon Sergeant"
#define JOB_SQUAD_LEADER "Section Sergeant"
#define JOB_SQUAD_ENGI "Combat Technician"
#define JOB_SQUAD_MEDIC "Platoon Corpsman"
#define JOB_SQUAD_MEDIC "Corpsman"
#define JOB_SQUAD_SPECIALIST "Weapons Specialist"
#define JOB_SQUAD_TEAM_LEADER "Squad Sergeant"
#define JOB_SQUAD_SMARTGUN "Smartgunner"
Expand Down
5 changes: 3 additions & 2 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@
#define XENO_HITS_TO_DESTROY_WINDOW_FRAME 3
#define XENO_HITS_TO_DESTROY_R_WINDOW_FRAME 5
#define XENO_HITS_TO_DESTROY_BOLTED_DOOR 10
#define XENO_HITS_TO_DESTROY_DOOR 10
#define XENO_HITS_TO_DESTROY_WELDED_DOOR 15
#define XENO_HITS_TO_DESTROY_DOOR 12
#define XENO_HITS_TO_DESTROY_WELDED_DOOR 20
#define XENO_HITS_TO_DESTROY_AIRLOCK_ASSEMBLY 2
#define XENO_HITS_TO_EXPOSE_WIRES_MIN 3
#define XENO_HITS_TO_EXPOSE_WIRES_MAX 4
#define XENO_HITS_TO_CUT_WIRES 10
Expand Down
3 changes: 3 additions & 0 deletions code/game/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
blood_overlay.color = b_color

/mob/living/carbon/human/add_blood(b_color = "#830303", blood_flags = BLOOD_ALL)
if(b_color == BLOOD_COLOR_XENO || b_color == BLOOD_COLOR_XENO_ROYAL)
return FALSE

if(blood_flags & BLOOD_BODY)
if(wear_suit)
wear_suit.add_blood(b_color)
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/marine/squad/leader.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
flags_startup_parameters = ROLE_ADD_TO_DEFAULT|ROLE_ADD_TO_SQUAD
gear_preset = /datum/equipment_preset/uscm/leader
gear_preset_secondary = /datum/equipment_preset/uscm/leader/lesser_rank
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>You are responsible for the men and women of your entire platoon.</a> Make sure they are on task, working together, and communicating. You are also in charge of communicating with command and letting them know about the situation first hand. Keep out of harm's way.<br><b>You remember that you've stored your personal gear and uniform are located in the dorm or locker rooms.</b>"
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>You are responsible for the men and women of your entire section.</a> Make sure they are on task, working together, and communicating. You are also in charge of communicating with command and letting them know about the situation first hand. Keep out of harm's way.<br><b>You remember that you've stored your personal gear and uniform are located in the dorm or locker rooms.</b>"

job_options = list(GYSGT_VARIANT = "GYSGT", SSGT_VARIANT = "SSGT")

Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/marine/squad/medic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
flags_startup_parameters = ROLE_ADD_TO_DEFAULT|ROLE_ADD_TO_SQUAD
gear_preset = /datum/equipment_preset/uscm/medic
gear_preset_secondary = /datum/equipment_preset/uscm/medic/lesser_rank
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>You tend the wounds of your squad mates</a> and make sure they are healthy and active. You may not be a fully-fledged doctor, but you stand between life and death when it matters.<br><b>You remember that you've stored your personal gear and uniform are located in your medical office.</b>"
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>You tend the wounds of your fellow Marines</a> and make sure they are healthy and active. You may not be a fully-fledged doctor, but you stand between life and death when it matters.<br><b>You remember that you've stored your personal gear and uniform are located in your medical office.</b>"

job_options = list(CPL_VARIANT = "CPL", LCPL_VARIANT = "LCPL")

Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/marine/squad/tl.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
allow_additional = 1
flags_startup_parameters = ROLE_ADD_TO_DEFAULT|ROLE_ADD_TO_SQUAD
gear_preset = /datum/equipment_preset/uscm/tl
entry_message_body = "You are the <a href='"+WIKI_PLACEHOLDER+"'>Squad Leader.</a> Your task is leading the designated squad and utilize available ordnance. If the platoon leader dies, you are expected to lead in their place.<br><b>You remember that you've stored your personal gear and uniform are located in the dorm or locker rooms.</b>"
entry_message_body = "You are the <a href='"+WIKI_PLACEHOLDER+"'>Squad Leader.</a> Your task is leading the designated squad and utilize available ordnance. If the section sergeant dies, you are expected to lead in their place.<br><b>You remember that you've stored your personal gear and uniform are located in the dorm or locker rooms.</b>"

job_options = list(SGT_VARIANT = "SGT")

Expand Down
28 changes: 14 additions & 14 deletions code/game/jobs/job/marine/squad_info.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
update_all_squad_info()
if(squad_info_data["total_mar"] != count) //updates for new marines
update_free_mar()
if(squad_leader && squad_info_data["pltsgt"]["name"] != squad_leader.real_name)
if(squad_leader && squad_info_data["sctsgt"]["name"] != squad_leader.real_name)
update_squad_leader()
var/list/data = squad_info_data.Copy()
data["squad"] = name
Expand All @@ -29,7 +29,7 @@
/datum/squad/proc/get_leadership(mob/user)
var/mob/living/carbon/human/H = user
if (squad_leader && H.name == squad_leader.name)
return "pltsgt"
return "sctsgt"
else
for(var/fireteam in fireteams)
var/mob/living/carbon/human/ftl = fireteam_leaders[fireteam]
Expand Down Expand Up @@ -58,7 +58,7 @@
var/target_marine = params["target_marine"]
var/target_team = params["target_ft"]

if (islead != "pltsgt")
if (islead != "sctsgt")
return

var/mob/living/carbon/human/target = get_marine_from_name(target_marine)
Expand All @@ -72,7 +72,7 @@
if ("unassign_ft")
var/target_marine = params["target_marine"]

if (islead != "pltsgt")
if (islead != "sctsgt")
return

var/mob/living/carbon/human/target = get_marine_from_name(target_marine)
Expand All @@ -85,7 +85,7 @@
if ("demote_ftl")
var/target_team = params["target_ft"]

if (islead != "pltsgt")
if (islead != "sctsgt")
return

unassign_ft_leader(target_team, FALSE, TRUE)
Expand All @@ -96,7 +96,7 @@
var/target_marine = params["target_marine"]
var/target_team = params["target_ft"]

if (islead != "pltsgt")
if (islead != "sctsgt")
return

var/mob/living/carbon/human/target = get_marine_from_name(target_marine)
Expand All @@ -108,7 +108,7 @@

//used once on first opening
/datum/squad/proc/update_all_squad_info()
squad_info_data["pltsgt"] = list()
squad_info_data["sctsgt"] = list()
update_squad_leader()
squad_info_data["fireteams"] = list()
var/i = 1
Expand All @@ -120,14 +120,14 @@
squad_info_data["mar_free"] = list()
update_free_mar()

//pltsgt update. Should always be paired up with FT or free marines update
//sctsgt update. Should always be paired up with FT or free marines update
/datum/squad/proc/update_squad_leader()
var/obj/item/card/id/ID = null
if(squad_leader)
ID = squad_leader.get_idcard()
squad_info_data["pltsgt"]["name"] = squad_leader ? squad_leader.real_name : "None"
squad_info_data["pltsgt"]["refer"] = squad_leader ? "\ref[squad_leader]" : null
squad_info_data["pltsgt"]["paygrade"] = ID ? get_paygrades(ID.paygrade, 1) : ""
squad_info_data["sctsgt"]["name"] = squad_leader ? squad_leader.real_name : "None"
squad_info_data["sctsgt"]["refer"] = squad_leader ? "\ref[squad_leader]" : null
squad_info_data["sctsgt"]["paygrade"] = ID ? get_paygrades(ID.paygrade, 1) : ""

//fireteam and TL update
/datum/squad/proc/update_fireteam(team)
Expand Down Expand Up @@ -173,7 +173,7 @@
if(JOB_SQUAD_TEAM_LEADER)
rank = "SqSgt"
if(JOB_SQUAD_LEADER)
rank = "PltSgt"
rank = "SctSgt"
if(JOB_SQUAD_RTO)
rank = "RTO"
else
Expand Down Expand Up @@ -252,7 +252,7 @@
if(JOB_SQUAD_TEAM_LEADER)
rank = "SqSgt"
if(JOB_SQUAD_LEADER)
rank = "PltSgt"
rank = "SctSgt"
if(JOB_SQUAD_RTO)
rank = "RTO"
else
Expand Down Expand Up @@ -301,7 +301,7 @@
if(JOB_SQUAD_TEAM_LEADER)
rank = "SqSgt"
if(JOB_SQUAD_LEADER)
rank = "PltSgt"
rank = "SctSgt"
if(JOB_SQUAD_RTO)
rank = "RTO"
else
Expand Down
6 changes: 3 additions & 3 deletions code/game/jobs/job/marine/squads.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
var/sub_leader

/datum/squad_type/marine_squad
name = "Platoon"
lead_name = "Platoon Sergeant"
name = "Section"
lead_name = "Section Sergeant"
lead_icon = "leader"
sub_squad = "Squad"
sub_leader = "Squad Sergeant"
Expand Down Expand Up @@ -701,7 +701,7 @@
old_lead.comm_title = "SG"
if(JOB_SQUAD_LEADER)
if(!leader_killed)
old_lead.comm_title = "PltSgt"
old_lead.comm_title = "SctSgt"
if(JOB_SQUAD_RTO)
old_lead.comm_title = "RTO"
if(JOB_MARINE_RAIDER)
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,14 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list(
/obj/structure/machinery/door/airlock/deconstruct(disassembled = TRUE)
if(!disassembled)
if(width == 1)
new /obj/structure/airlock_assembly(loc)
new /obj/item/stack/rods(loc)
new /obj/item/stack/cable_coil/cut(loc)
new /obj/effect/spawner/gibspawner/robot(loc)
new /obj/effect/decal/cleanable/blood/oil(loc)
else // big airlock, big debris
for(var/turf/DT in locs) // locs = covered by airlock bounding box
new /obj/structure/airlock_assembly(DT)
new /obj/item/stack/rods(DT)
new /obj/item/stack/cable_coil/cut(DT)
new /obj/effect/spawner/gibspawner/robot(DT)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/doors/multi_tile.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//Terribly sorry for the code doubling, but things go derpy otherwise.
/obj/structure/machinery/door/airlock/multi_tile
width = 2
damage_cap = 650 // Bigger = more endurable
damage_cap = 2600 // Bigger = more endurable
assembly_type = /obj/structure/airlock_assembly/multi_tile

/obj/structure/machinery/door/airlock/multi_tile/close() //Nasty as hell O(n^2) code but unfortunately necessary
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/effects/decals/cleanable/blood/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
// can make footprints
if(!amount || !ishuman(AM))
return

if(basecolor == BLOOD_COLOR_XENO || basecolor == BLOOD_COLOR_XENO_ROYAL)
return FALSE
if(SSticker.mode && MODE_HAS_TOGGLEABLE_FLAG(MODE_BLOOD_OPTIMIZATION))
return

Expand Down
56 changes: 55 additions & 1 deletion code/game/objects/structures/airlock_assembly.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
name = "airlock assembly"
icon = 'icons/obj/structures/doors/airlock_assembly.dmi'
icon_state = "door_as_0"
anchored = FALSE
anchored = TRUE
density = TRUE
var/state = STATE_STANDARD
var/base_icon_state = ""
Expand All @@ -22,9 +22,63 @@
var/airlock_type = "generic" //the type path of the airlock once completed
var/glass = AIRLOCK_NOGLASS // see defines
var/created_name = null

var/damage = 0 //This should let marines destroy Assemblies spawned by destroyed airlocks now
var/damage_cap = HEALTH_ASSEMBLY // Assembly gets destroyed
/// Used for multitile assemblies
var/width = 1

/obj/structure/airlock_assembly/proc/take_damage(dam, mob/M)
if(!dam || unacidable)
return FALSE

damage = max(0, damage + dam)

if(damage >= damage_cap)
if(M && istype(M))
SEND_SIGNAL(M, COMSIG_MOB_DESTROY_AIRLOCK, src)
to_chat(loc, SPAN_DANGER("[src] blows apart!"))
deconstruct(FALSE)
playsound(src, 'sound/effects/metal_crash.ogg', 25, 1)
return TRUE

/obj/structure/airlock_assembly/ex_act(severity, explosion_direction, datum/cause_data/cause_data)
var/exp_damage = severity * EXPLOSION_DAMAGE_MULTIPLIER_DOOR
var/location = get_turf(src)
if(!density)
exp_damage *= EXPLOSION_DAMAGE_MODIFIER_DOOR_OPEN
if(take_damage(exp_damage)) // destroyed by explosion, shards go flying
create_shrapnel(location, rand(2,5), explosion_direction, , /datum/ammo/bullet/shrapnel/light, cause_data)

/obj/structure/airlock_assembly/get_explosion_resistance()
if(density)
if(unacidable)
return 1000000
else
return (damage_cap-damage)/EXPLOSION_DAMAGE_MULTIPLIER_DOOR //this should exactly match the amount of damage needed to destroy the door
else
return FALSE

/obj/structure/airlock_assembly/bullet_act(obj/projectile/P)
bullet_ping(P)
if(P.damage)
if(P.ammo.flags_ammo_behavior & AMMO_ROCKET)
take_damage(P.damage * 4, P.firer) // rockets wreck airlocks
return TRUE
else
take_damage(P.damage, P.firer)
return TRUE
return FALSE

/obj/structure/airlock_assembly/handle_tail_stab(mob/living/carbon/xenomorph/xeno)

playsound(src, 'sound/effects/metalhit.ogg', 50, TRUE)
xeno.visible_message(SPAN_XENOWARNING("\The [xeno] strikes \the [src] with its tail!"), SPAN_XENOWARNING("You strike \the [src] with your tail!"))
xeno.emote("tail")
var/damage = xeno.melee_damage_upper * TAILSTAB_AIRLOCK_DAMAGE_MULTIPLIER
take_damage(damage, xeno)
return TAILSTAB_COOLDOWN_NORMAL

/obj/structure/airlock_assembly/Initialize(mapload, ...)
. = ..()
update_icon()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/asset_cache/asset_list_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
list("SG", "hudsquad_gun"),
list("Spc", "hudsquad_spec"),
list("SqSgt", "hudsquad_tl"),
list("PltSgt", "hudsquad_leader"),
list("SctSgt", "hudsquad_leader"),
list("RTO", "hudsquad_rto"),
)

Expand Down
8 changes: 4 additions & 4 deletions code/modules/gear_presets/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -495,13 +495,13 @@
//*****************************************************************************************************/

/datum/equipment_preset/uscm/leader
name = "USCM Platoon Sergeant"
name = "USCM Section Sergeant"
flags = EQUIPMENT_PRESET_EXTRA|EQUIPMENT_PRESET_MARINE
access = list(ACCESS_MARINE_PREP, ACCESS_MARINE_LEADER, ACCESS_MARINE_DROPSHIP)
assignment = JOB_SQUAD_LEADER
rank = JOB_SQUAD_LEADER
paygrades = list(PAY_SHORT_ME7 = JOB_PLAYTIME_TIER_0)
role_comm_title = "PltSgt"
role_comm_title = "SctSgt"
minimum_age = 27
skills = /datum/skills/SL

Expand Down Expand Up @@ -605,14 +605,14 @@
//*****************************************************************************************************/

/datum/equipment_preset/uscm/leader_equipped
name = "USCM Platoon Sergeant (Equipped)"
name = "USCM Section Sergeant (Equipped)"
flags = EQUIPMENT_PRESET_EXTRA|EQUIPMENT_PRESET_MARINE

access = list(ACCESS_MARINE_PREP, ACCESS_MARINE_LEADER, ACCESS_MARINE_DROPSHIP)
assignment = JOB_SQUAD_LEADER
rank = JOB_SQUAD_LEADER
paygrades = list(PAY_SHORT_ME7 = JOB_PLAYTIME_TIER_0)
role_comm_title = "PltSgt"
role_comm_title = "SctSgt"
minimum_age = 27
skills = /datum/skills/SL

Expand Down
19 changes: 19 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/attack_alien.dm
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,25 @@
SPAN_DANGER("We [M.slash_verb] \the [src]!"), null, 5, CHAT_TYPE_XENO_COMBAT)
return XENO_ATTACK_ACTION

//This SHOULD, if I did it right, have xenos target assemblies finally please god let me have done it right
/obj/structure/airlock_assembly/attack_alien(mob/living/carbon/xenomorph/M)
if(unslashable || health <= 0 && !HAS_TRAIT(usr, TRAIT_OPPOSABLE_THUMBS))
to_chat(M, SPAN_WARNING("We stare at \the [src] cluelessly."))
return XENO_NO_DELAY_ACTION

M.animation_attack_on(src)
playsound(src, 'sound/effects/metalhit.ogg', 25, 1)
update_health(rand(M.melee_damage_lower, M.melee_damage_upper) * M.melee_sentry_damage_multiplier)
if(health <= 0)
M.visible_message(SPAN_DANGER("[M] slices \the [src] apart!"), \
SPAN_DANGER("We slice \the [src] apart!"), null, 5, CHAT_TYPE_XENO_COMBAT)
if(!unacidable)
qdel(src)
else
M.visible_message(SPAN_DANGER("[M] [M.slashes_verb] \the [src]!"), \
SPAN_DANGER("We [M.slash_verb] \the [src]!"), null, 5, CHAT_TYPE_XENO_COMBAT)
return XENO_ATTACK_ACTION

// Destroying reagent dispensers
/obj/structure/reagent_dispensers/attack_alien(mob/living/carbon/xenomorph/M)
if(unslashable || health <= 0 && !HAS_TRAIT(usr, TRAIT_OPPOSABLE_THUMBS))
Expand Down
13 changes: 13 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,19 @@ At bare minimum, make sure the relevant checks from parent types gets copied in

return DOOR_PENALTY

////////////////////////////////////////
// AIRLOCK ASSEMBLIES //
////////////////////////////////////////

/obj/structure/airlock_assembly/xeno_ai_obstacle(mob/living/carbon/xenomorph/X, direction, turf/target)
. = ..()
if(!.)
return

if(isfacehugger(X))
return -1 // We LOVE going under doors!

return DOOR_PENALTY

/////////////////////////////
// TABLES //
Expand Down
Loading

0 comments on commit f14abae

Please sign in to comment.