Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cmss13-devs/cmss13
Browse files Browse the repository at this point in the history
  • Loading branch information
BeagleGaming1 committed Jul 24, 2023
2 parents c438267 + 4ef3b9e commit 6818bf0
Show file tree
Hide file tree
Showing 58 changed files with 721 additions and 211 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/conflicts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ jobs:
- uses: eps1lon/[email protected]
with:
dirtyLabel: 'Merge Conflict'
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly."
repoToken: ${{ secrets.BOT_TOKEN_CM || secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,18 @@
#define DEFAULT_MESSAGE_RANGE 7

#define BAYONET_DRAW_DELAY (1 SECONDS)

//Predator decloak multpliers based on the standard.
#define DECLOAK_STANDARD (10 SECONDS)
/// Forced for any unspecified reason.
#define DECLOAK_FORCED 1
/// Caused by being worn by non humans.
#define DECLOAK_SPECIES 0.75
/// Caused by fire extinguisher.
#define DECLOAK_EXTINGUISHER 1.5
/// Caused by predalien screech.
#define DECLOAK_PREDALIEN 2
/// Caused by being in a body of water.
#define DECLOAK_SUBMERGED 2
/// Caused by an EMP.
#define DECLOAK_EMP 3
1 change: 0 additions & 1 deletion code/__DEFINES/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
#define NOTABLEMERGE (1<<13)
/// Has heat source but isn't 'on fire' and thus can be stored
#define IGNITING_ITEM (1<<14)

//==========================================================================================


Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/keybinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
#define COMSIG_KB_OBSERVER_JOIN_XENO "keybinding_observer_join_as_xeno"
#define COMSIG_KB_OBSERVER_JOIN_ERT "keybinding_observer_join_ert"
#define COMSIG_KB_OBSERVER_JOIN_PREDATOR "keybinding_observer_join_pred"
#define COMSIG_KB_OBSERVER_JOIN_LESSER_DRONE "keybinding_observer_join_lesser_drone"

#define CATEGORY_CLIENT "CLIENT"
#define CATEGORY_EMOTE "EMOTE"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@
#define COOLDOWN_COMM_CENTRAL 30 SECONDS
#define COOLDOWN_COMM_DESTRUCT 5 MINUTES

///Cooldown for pred recharge
#define COOLDOWN_BRACER_CHARGE 3 MINUTES

// magic value to use for indicating a proc slept
#define PROC_RETURN_SLEEP -1
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@
//Mob sizes
#define MOB_SIZE_SMALL 0
#define MOB_SIZE_HUMAN 1
#define MOB_SIZE_XENO_VERY_SMALL 1.5
#define MOB_SIZE_XENO_SMALL 2
#define MOB_SIZE_XENO 3
#define MOB_SIZE_BIG 4
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/typecheck/humanoids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define isspeciessynth(A) (A.species?.group == SPECIES_SYNTHETIC)

//Size checks for carbon to use instead of typechecks. (Hellhounds are deprecated)
#define iscarbonsizexeno(A) (A.mob_size >= MOB_SIZE_XENO_SMALL)
#define iscarbonsizexeno(A) (A.mob_size >= MOB_SIZE_XENO_VERY_SMALL)
#define iscarbonsizehuman(A) (A.mob_size <= MOB_SIZE_HUMAN)

//job/role helpers
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/typecheck/xenos.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#define islarva(A) (istype(A, /mob/living/carbon/xenomorph/larva))
#define ispredalienlarva(A) (istype(A, /mob/living/carbon/xenomorph/larva/predalien))
#define isfacehugger(A) (istype(A, /mob/living/carbon/xenomorph/facehugger))
#define islesserdrone(A) (istype(A, /mob/living/carbon/xenomorph/lesser_drone))
#define ispraetorian(A) (istype(A, /mob/living/carbon/xenomorph/praetorian))
#define isqueen(A) (istype(A, /mob/living/carbon/xenomorph/queen))
#define isravager(A) (istype(A, /mob/living/carbon/xenomorph/ravager))
Expand Down
10 changes: 8 additions & 2 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
#define HUD_ARMOR_STATES_XENO 10

/// Multiplier for time taken for a xeno to place down a resin structure
#define BUILD_TIME_MULT_LESSER_DRONE 2
#define BUILD_TIME_MULT_XENO 1
#define BUILD_TIME_MULT_BUILDER 1
#define BUILD_TIME_MULT_HIVELORD 0.5
Expand Down Expand Up @@ -206,6 +207,7 @@

// Health bands
#define XENO_HEALTH_LARVA 35 * XENO_UNIVERSAL_HPMULT
#define XENO_HEALTH_LESSER_DRONE 160 * XENO_UNIVERSAL_HPMULT
#define XENO_HEALTH_RUNNER 230 * XENO_UNIVERSAL_HPMULT // Killed by 1 PB
#define XENO_HEALTH_TIER_1 250 * XENO_UNIVERSAL_HPMULT
#define XENO_HEALTH_TIER_2 300 * XENO_UNIVERSAL_HPMULT
Expand Down Expand Up @@ -603,7 +605,8 @@
#define XENO_CASTE_LARVA "Bloody Larva"
#define XENO_CASTE_PREDALIEN_LARVA "Predalien Larva"
#define XENO_CASTE_FACEHUGGER "Facehugger"
#define XENO_T0_CASTES list(XENO_CASTE_LARVA, XENO_CASTE_PREDALIEN_LARVA, XENO_CASTE_FACEHUGGER)
#define XENO_CASTE_LESSER_DRONE "Lesser Drone"
#define XENO_T0_CASTES list(XENO_CASTE_LARVA, XENO_CASTE_PREDALIEN_LARVA, XENO_CASTE_FACEHUGGER, XENO_CASTE_LESSER_DRONE)

//t1
#define XENO_CASTE_DRONE "Drone"
Expand Down Expand Up @@ -631,7 +634,7 @@
#define XENO_CASTE_HELLHOUND "Hellhound"
#define XENO_SPECIAL_CASTES list(XENO_CASTE_QUEEN, XENO_CASTE_PREDALIEN, XENO_CASTE_HELLHOUND)

#define ALL_XENO_CASTES list(XENO_CASTE_LARVA, XENO_CASTE_PREDALIEN_LARVA, XENO_CASTE_FACEHUGGER, XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_SENTINEL, XENO_CASTE_DEFENDER, XENO_CASTE_BURROWER, XENO_CASTE_CARRIER, XENO_CASTE_HIVELORD, XENO_CASTE_LURKER, XENO_CASTE_WARRIOR, XENO_CASTE_SPITTER, XENO_CASTE_BOILER, XENO_CASTE_PRAETORIAN, XENO_CASTE_CRUSHER, XENO_CASTE_RAVAGER, XENO_CASTE_QUEEN, XENO_CASTE_PREDALIEN, XENO_CASTE_HELLHOUND)
#define ALL_XENO_CASTES list(XENO_CASTE_LARVA, XENO_CASTE_PREDALIEN_LARVA, XENO_CASTE_FACEHUGGER, XENO_CASTE_LESSER_DRONE, XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_SENTINEL, XENO_CASTE_DEFENDER, XENO_CASTE_BURROWER, XENO_CASTE_CARRIER, XENO_CASTE_HIVELORD, XENO_CASTE_LURKER, XENO_CASTE_WARRIOR, XENO_CASTE_SPITTER, XENO_CASTE_BOILER, XENO_CASTE_PRAETORIAN, XENO_CASTE_CRUSHER, XENO_CASTE_RAVAGER, XENO_CASTE_QUEEN, XENO_CASTE_PREDALIEN, XENO_CASTE_HELLHOUND)

// Checks if two hives are allied to each other.
// PARAMETERS:
Expand Down Expand Up @@ -695,3 +698,6 @@
#define TAILSTAB_AIRLOCK_DAMAGE_MULTIPLIER 2

#define FRENZY_DAMAGE_MULTIPLIER 2

#define JOIN_AS_FACEHUGGER_DELAY (3 MINUTES)
#define JOIN_AS_LESSER_DRONE_DELAY (30 SECONDS)
6 changes: 6 additions & 0 deletions code/_globalvars/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ GLOBAL_LIST_EMPTY(mainship_pipes)
// Resin constructions parameters
GLOBAL_LIST_INIT_TYPED(resin_constructions_list, /datum/resin_construction, setup_resin_constructions())

GLOBAL_LIST_INIT(resin_build_order_lesser_drone, list(
/datum/resin_construction/resin_turf/wall,
/datum/resin_construction/resin_turf/membrane,
/datum/resin_construction/resin_obj/door,
))

GLOBAL_LIST_INIT(resin_build_order_drone, list(
/datum/resin_construction/resin_turf/wall,
/datum/resin_construction/resin_turf/membrane,
Expand Down
32 changes: 32 additions & 0 deletions code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,38 @@ Additional game mode variables.

return TRUE

/datum/game_mode/proc/attempt_to_join_as_lesser_drone(mob/xeno_candidate)
var/list/active_hives = list()
var/datum/hive_status/hive
var/last_active_hive = 0
for(var/hivenumber in GLOB.hive_datum)
hive = GLOB.hive_datum[hivenumber]
if(hive.totalXenos.len <= 0)
continue
active_hives[hive.name] = hive.hivenumber
last_active_hive = hive.hivenumber

if(active_hives.len <= 0)
to_chat(xeno_candidate, SPAN_WARNING("There aren't any Hives active at this point for you to join."))
return FALSE

if(active_hives.len > 1)
var/hive_picked = tgui_input_list(xeno_candidate, "Select which Hive to attempt joining.", "Hive Choice", active_hives, theme="hive_status")
if(!hive_picked)
to_chat(xeno_candidate, SPAN_ALERT("Hive choice error. Aborting."))
return
hive = GLOB.hive_datum[active_hives[hive_picked]]
else
hive = GLOB.hive_datum[last_active_hive]

if(!hive.hive_location)
to_chat(xeno_candidate, SPAN_WARNING("The selected hive does not have a hive core to spawn from!"))
return

hive.hive_location.spawn_lesser_drone(xeno_candidate)

return TRUE

/datum/game_mode/proc/transfer_xeno(xeno_candidate, mob/living/new_xeno)
if(!xeno_candidate || !isxeno(new_xeno) || QDELETED(new_xeno))
return FALSE
Expand Down
2 changes: 2 additions & 0 deletions code/game/jobs/role_authority.dm
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,8 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
M = /mob/living/carbon/xenomorph/larva/predalien
if(XENO_CASTE_FACEHUGGER)
M = /mob/living/carbon/xenomorph/facehugger
if(XENO_CASTE_LESSER_DRONE)
M = /mob/living/carbon/xenomorph/lesser_drone
if(XENO_CASTE_RUNNER)
M = /mob/living/carbon/xenomorph/runner
if(XENO_CASTE_DRONE)
Expand Down
27 changes: 14 additions & 13 deletions code/game/machinery/vending/vendor_types/requisitions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,26 +92,27 @@

list("POUCHES", -1, null, null),
list("Autoinjector Pouch", round(scale * 2), /obj/item/storage/pouch/autoinjector, VENDOR_ITEM_REGULAR),
list("Bayonet Pouch", round(scale * 2), /obj/item/storage/pouch/bayonet, VENDOR_ITEM_REGULAR),
list("Medkit Pouch", round(scale * 2), /obj/item/storage/pouch/medkit, VENDOR_ITEM_REGULAR),
list("Medical Pouch", round(scale * 2), /obj/item/storage/pouch/medical, VENDOR_ITEM_REGULAR),
list("First-Aid Pouch (Full)", round(scale * 5), /obj/item/storage/pouch/firstaid/full, VENDOR_ITEM_REGULAR),
list("First Responder Pouch", round(scale * 2), /obj/item/storage/pouch/first_responder, VENDOR_ITEM_REGULAR),
list("Syringe Pouch", round(scale * 2), /obj/item/storage/pouch/syringe, VENDOR_ITEM_REGULAR),
list("Tools Pouch (Full)", round(scale * 2), /obj/item/storage/pouch/tools/full, VENDOR_ITEM_REGULAR),
list("Construction Pouch", round(scale * 2), /obj/item/storage/pouch/construction, VENDOR_ITEM_REGULAR),
list("Document Pouch", round(scale * 2), /obj/item/storage/pouch/document/small, VENDOR_ITEM_REGULAR),
list("Electronics Pouch", round(scale * 2), /obj/item/storage/pouch/electronics, VENDOR_ITEM_REGULAR),
list("Explosive Pouch", round(scale * 2), /obj/item/storage/pouch/explosive, VENDOR_ITEM_REGULAR),
list("First-Aid Pouch (Full)", round(scale * 5), /obj/item/storage/pouch/firstaid/full, VENDOR_ITEM_REGULAR),
list("First Responder Pouch", round(scale * 2), /obj/item/storage/pouch/first_responder, VENDOR_ITEM_REGULAR),
list("Flare Pouch (Full)", round(scale * 5), /obj/item/storage/pouch/flare/full, VENDOR_ITEM_REGULAR),
list("Fuel Tank Strap Pouch", round(scale * 4), /obj/item/storage/pouch/flamertank, VENDOR_ITEM_REGULAR),
list("Large Pistol Magazine Pouch", round(scale * 5), /obj/item/storage/pouch/magazine/pistol/large, VENDOR_ITEM_REGULAR),
list("Magazine Pouch", round(scale * 5), /obj/item/storage/pouch/magazine, VENDOR_ITEM_REGULAR),
list("Shotgun Shell Pouch", round(scale * 5), /obj/item/storage/pouch/shotgun, VENDOR_ITEM_REGULAR),
list("Document Pouch", round(scale * 2), /obj/item/storage/pouch/document/small, VENDOR_ITEM_REGULAR),
list("Sling Pouch", round(scale * 2), /obj/item/storage/pouch/sling, VENDOR_ITEM_REGULAR),
list("Machete Pouch (Full)", round(scale * 4), /obj/item/storage/pouch/machete/full, VENDOR_ITEM_REGULAR),
list("Medical Pouch", round(scale * 2), /obj/item/storage/pouch/medical, VENDOR_ITEM_REGULAR),
list("Bayonet Pouch", round(scale * 2), /obj/item/storage/pouch/bayonet, VENDOR_ITEM_REGULAR),
list("Medium General Pouch", round(scale * 2), /obj/item/storage/pouch/general/medium, VENDOR_ITEM_REGULAR),
list("Medkit Pouch", round(scale * 2), /obj/item/storage/pouch/medkit, VENDOR_ITEM_REGULAR),
list("Magazine Pouch", round(scale * 5), /obj/item/storage/pouch/magazine, VENDOR_ITEM_REGULAR),
list("Shotgun Shell Pouch", round(scale * 5), /obj/item/storage/pouch/shotgun, VENDOR_ITEM_REGULAR),
list("Sidearm Pouch", round(scale * 5), /obj/item/storage/pouch/pistol, VENDOR_ITEM_REGULAR),
list("Syringe Pouch", round(scale * 2), /obj/item/storage/pouch/syringe, VENDOR_ITEM_REGULAR),
list("Tools Pouch (Full)", round(scale * 2), /obj/item/storage/pouch/tools/full, VENDOR_ITEM_REGULAR),
list("Sling Pouch", round(scale * 2), /obj/item/storage/pouch/sling, VENDOR_ITEM_REGULAR),
list("Large Pistol Magazine Pouch", round(scale * 5), /obj/item/storage/pouch/magazine/pistol/large, VENDOR_ITEM_REGULAR),
list("Fuel Tank Strap Pouch", round(scale * 4), /obj/item/storage/pouch/flamertank, VENDOR_ITEM_REGULAR),
list("Large General Pouch", round(scale * 2), /obj/item/storage/pouch/general/large, VENDOR_ITEM_REGULAR),
list("Large Magazine Pouch", round(scale * 2), /obj/item/storage/pouch/magazine/large, VENDOR_ITEM_REGULAR),
list("Large Shotgun Shell Pouch", round(scale * 2), /obj/item/storage/pouch/shotgun/large, VENDOR_ITEM_REGULAR),

Expand Down
22 changes: 12 additions & 10 deletions code/game/objects/items/bodybag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -122,25 +122,27 @@

/obj/structure/closet/bodybag/store_mobs(stored_units) // overriding this
var/list/dead_mobs = list()
for(var/mob/living/M in loc)
if(M.buckled)
for(var/mob/living/mob in loc)
if(mob.buckled)
continue
if(M.stat != DEAD) // covers alive mobs
if(mob.stat != DEAD) // covers alive mobs
continue
if(!ishuman(M)) // all the dead other shit
dead_mobs += M
if(!ishuman(mob)) // all the dead other shit
dead_mobs += mob
continue
var/mob/living/carbon/human/H = M
if(H.check_tod() || issynth(H) || H.is_revivable() && H.get_ghost()) // revivable
var/mob/living/carbon/human/human = mob
if(issynth(human))
continue
dead_mobs += M
if(human.check_tod() && human.is_revivable()) // revivable
continue
dead_mobs += mob
var/mob/living/mob_to_store
if(dead_mobs.len)
mob_to_store = pick(dead_mobs)
mob_to_store.forceMove(src)
stored_units += mob_size
for(var/obj/item/limb/L in loc)
L.forceMove(src)
for(var/obj/item/limb/limb in loc)
limb.forceMove(src)
return stored_units

/obj/structure/closet/bodybag/attack_hand(mob/living/user)
Expand Down
86 changes: 62 additions & 24 deletions code/game/objects/items/explosives/plastic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -213,23 +213,6 @@

return TRUE

/obj/item/explosive/plastic/breaching_charge/can_place(mob/user, atom/target)
if(!is_type_in_list(target, breachable))//only items on the list are allowed
to_chat(user, SPAN_WARNING("You cannot plant \the [name] on \the [target]!"))
return FALSE

if(SSinterior.in_interior(target))// vehicle checks again JUST IN CASE
to_chat(user, SPAN_WARNING("It's too cramped in here to deploy \the [src]."))
return FALSE

if(istype(target, /obj/structure/window))//no breaching charges on the briefing windows / brig / CIC e.e
var/obj/structure/window/W = target
if(W.not_damageable)
to_chat(user, SPAN_WARNING("[W] is much too tough for you to do anything to it with [src].")) //On purpose to mimic wall message
return FALSE

return TRUE

/obj/item/explosive/plastic/proc/calculate_pixel_offset(mob/user, atom/target)
switch(get_dir(user, target))
if(NORTH)
Expand Down Expand Up @@ -312,13 +295,6 @@
cell_explosion(target_turf, 120, 30, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, cause_data)
qdel(src)

/obj/item/explosive/plastic/breaching_charge/handle_explosion(turf/target_turf, dir, cause_data)
var/explosion_target = get_step(target_turf, dir)
create_shrapnel(explosion_target, 40, dir, angle,/datum/ammo/bullet/shrapnel/metal, cause_data)
sleep(1)// prevents explosion from eating shrapnel
cell_explosion(target_turf, 60, 60, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, dir, cause_data)
qdel(src)

/obj/item/explosive/plastic/proc/delayed_prime(turf/target_turf)
prime(TRUE)

Expand All @@ -342,3 +318,65 @@
min_timer = 3
penetration = 0.60
deploying_time = 10
var/shrapnel_volume = 40

/obj/item/explosive/plastic/breaching_charge/can_place(mob/user, atom/target)
if(!is_type_in_list(target, breachable))//only items on the list are allowed
to_chat(user, SPAN_WARNING("You cannot plant [name] on [target]!"))
return FALSE

if(SSinterior.in_interior(target))// vehicle checks again JUST IN CASE
to_chat(user, SPAN_WARNING("It's too cramped in here to deploy [src]."))
return FALSE

if(istype(target, /obj/structure/window))//no breaching charges on the briefing windows / brig / CIC e.e
var/obj/structure/window/window = target
if(window.not_damageable)
to_chat(user, SPAN_WARNING("[window] is much too tough for you to do anything to it with [src].")) //On purpose to mimic wall message
return FALSE

if(istype(target, /turf/closed/wall))
var/turf/closed/wall/targeted_wall = target
if(targeted_wall.hull)
to_chat(user, SPAN_WARNING("You are unable to stick [src] to [targeted_wall]!"))
return FALSE

return TRUE

/obj/item/explosive/plastic/breaching_charge/handle_explosion(turf/target_turf, dir, cause_data)
var/explosion_target = get_step(target_turf, dir)
create_shrapnel(explosion_target, shrapnel_volume, dir, angle,/datum/ammo/bullet/shrapnel/metal, cause_data)
addtimer(CALLBACK(src, PROC_REF(trigger_explosion), target_turf, dir, cause_data), 1)

/obj/item/explosive/plastic/breaching_charge/proc/trigger_explosion(turf/target_turf, dir, cause_data)
cell_explosion(target_turf, 60, 60, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, dir, cause_data)
qdel(src)

/obj/item/explosive/plastic/breaching_charge/plasma
name = "plasma charge"
desc = "An alien explosive device. Who knows what it might do."
icon_state = "plasma-charge"
overlay_image = "plasma-active"
w_class = SIZE_SMALL
angle = 55
timer = 5
min_timer = 5
penetration = 0.60
deploying_time = 10
flags_item = NOBLUDGEON|ITEM_PREDATOR
shrapnel_volume = 10

/obj/item/explosive/plastic/breaching_charge/plasma/can_place(mob/user, atom/target)
if(!HAS_TRAIT(user, TRAIT_YAUTJA_TECH))
to_chat(user, SPAN_WARNING("You don't quite understand how the device works..."))
return FALSE
. = ..()

/obj/item/explosive/plastic/breaching_charge/plasma/handle_explosion(turf/target_turf, dir, cause_data)
var/explosion_target = get_step(target_turf, dir)
create_shrapnel(explosion_target, shrapnel_volume, dir, angle,/datum/ammo/bullet/shrapnel/plasma, cause_data)
addtimer(CALLBACK(src, PROC_REF(trigger_explosion), target_turf, dir, cause_data), 1)

/obj/item/explosive/plastic/breaching_charge/plasma/trigger_explosion(turf/target_turf, dir, cause_data)
cell_explosion(target_turf, 90, 90, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, dir, cause_data)
qdel(src)
Loading

0 comments on commit 6818bf0

Please sign in to comment.