Skip to content

Commit

Permalink
Merge branch 'master' into Command-Area-Remake
Browse files Browse the repository at this point in the history
  • Loading branch information
LC4492 committed Jul 21, 2023
2 parents 8ad9197 + 06ff6e3 commit 8d5c416
Show file tree
Hide file tree
Showing 29 changed files with 169 additions and 103 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@
//the define for visible message range in combat
#define COMBAT_MESSAGE_RANGE 3
#define DEFAULT_MESSAGE_RANGE 7

#define BAYONET_DRAW_DELAY (1 SECONDS)
3 changes: 2 additions & 1 deletion code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ var/global/list/whitelist_hierarchy = list(WHITELIST_NORMAL, WHITELIST_COUNCIL,
#define FACTION_CLF "CLF"
#define FACTION_PMC "PMC"
#define FACTION_CONTRACTOR "VAI"
#define FACTION_MARSHAL "Colonial Marshal"
#define FACTION_WY_DEATHSQUAD "WY Death Squad"
#define FACTION_MERCENARY "Mercenary"
#define FACTION_FREELANCER "Freelancer"
Expand All @@ -238,7 +239,7 @@ var/global/list/whitelist_hierarchy = list(WHITELIST_NORMAL, WHITELIST_COUNCIL,

#define FACTION_LIST_MARINE list(FACTION_MARINE)
#define FACTION_LIST_HUMANOID list(FACTION_MARINE, FACTION_PMC, FACTION_WY, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_UPP, FACTION_FREELANCER, FACTION_SURVIVOR, FACTION_NEUTRAL, FACTION_COLONIST, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_YAUTJA, FACTION_ZOMBIE)
#define FACTION_LIST_ERT list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_UPP, FACTION_FREELANCER, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO)
#define FACTION_LIST_ERT list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_UPP, FACTION_FREELANCER, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_MARSHAL)
#define FACTION_LIST_WY list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
#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)
Expand Down
6 changes: 3 additions & 3 deletions code/datums/emergency_calls/goons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
/datum/emergency_call/goon/chem_retrieval/New()
..()
dispatch_message = "[MAIN_SHIP_NAME], this is USCSS Royce. Our squad is boarding to retrieve all samples of a chemical recently scanned from your research department. You should already have received a significant sum of money for your department's discovery. In return we ask that you cooperate and provide everything related to the chemical to our retrieval team."
objectives = "Secure all documents, samples, and chemicals containing the property DNA_Disintegrating from [MAIN_SHIP_NAME] research department."
objectives = "Secure all documents, samples, and chemicals containing the property DNA_Disintegrating from [MAIN_SHIP_NAME] research department and return them to Response Team Station."

/datum/emergency_call/goon/chem_retrieval/proc/check_objective_info()
if(objective_info)
objectives = "Secure all documents, samples and chemicals related to [objective_info] from [MAIN_SHIP_NAME] research department."
objectives += "Assume at least 30 units are located within the department. If they can not make more that should be all. Cooperate with the onboard CL to ensure all who know the complete recipe are kept silenced with a contract of confidentiality. All humans who have ingested the chemical must be brought back dead or alive. Viral scan is required for any humans who is suspected of ingestion. The professor may call for PMC back up if things get out of hand."
objectives = "Secure all documents, samples and chemicals related to [objective_info] from [MAIN_SHIP_NAME] research department and return them to Response Team Station."
objectives += "Assume at least 30 units are located within the department. If they can not make more that should be all. Cooperate with the onboard CL to ensure all who know the complete recipe are kept silenced with a contract of confidentiality. All humans who have ingested the chemical must be brought back dead or alive. Viral scan is required for any humans who is suspected of ingestion. You must not deploy to the colony without explicit permission from PMC Dispatch. The professor may call for PMC back up if things get out of hand."
checked_objective = TRUE

/datum/emergency_call/goon/chem_retrieval/create_member(datum/mind/M, turf/override_spawn_loc)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/reagent_containers/blood_pack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
if(user.action_busy)
return

if(!do_after(user, 3 SECONDS * user.get_skill_duration_multiplier(SKILL_SURGERY), INTERRUPT_ALL, BUSY_ICON_FRIENDLY, attacked_mob, INTERRUPT_MOVED, BUSY_ICON_MEDICAL))
if(!do_after(user, (1 SECONDS) * user.get_skill_duration_multiplier(SKILL_SURGERY), INTERRUPT_ALL, BUSY_ICON_FRIENDLY, attacked_mob, INTERRUPT_MOVED, BUSY_ICON_MEDICAL))
to_chat(user, SPAN_WARNING("You were interrupted before you could finish!"))
return

Expand Down
8 changes: 4 additions & 4 deletions code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,8 @@
)
cant_hold = list()
flap = FALSE
var/draw_cooldown = 0
var/draw_cooldown_interval = 1 SECONDS

COOLDOWN_DECLARE(draw_cooldown)

/obj/item/storage/belt/knifepouch/fill_preset_inventory()
for(var/i = 1 to storage_slots)
Expand All @@ -758,9 +758,9 @@
playsound(src, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE)

/obj/item/storage/belt/knifepouch/attack_hand(mob/user, mods)
if(draw_cooldown < world.time)
if(COOLDOWN_FINISHED(src, draw_cooldown))
..()
draw_cooldown = world.time + draw_cooldown_interval
COOLDOWN_START(src, draw_cooldown, BAYONET_DRAW_DELAY)
playsound(src, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE)
else
to_chat(user, SPAN_WARNING("You need to wait before drawing another knife!"))
Expand Down
8 changes: 4 additions & 4 deletions code/game/objects/items/storage/pouch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@
icon_state = "bayonet"
storage_slots = 5
storage_flags = STORAGE_FLAGS_POUCH|STORAGE_USING_DRAWING_METHOD|STORAGE_ALLOW_QUICKDRAW
var/draw_cooldown = 0
var/draw_cooldown_interval = 1 SECONDS
var/default_knife_type = /obj/item/weapon/throwing_knife

COOLDOWN_DECLARE(draw_cooldown)

/obj/item/storage/pouch/bayonet/Initialize()
. = ..()
for(var/total_storage_slots in 1 to storage_slots)
Expand All @@ -149,9 +149,9 @@
playsound(src, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE)

/obj/item/storage/pouch/bayonet/attack_hand(mob/user, mods)
if(draw_cooldown < world.time)
if(COOLDOWN_FINISHED(src, draw_cooldown))
..()
draw_cooldown = world.time + draw_cooldown_interval
COOLDOWN_START(src, draw_cooldown, BAYONET_DRAW_DELAY)
playsound(src, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE)
else
to_chat(user, SPAN_WARNING("You need to wait before drawing another knife!"))
Expand Down
69 changes: 32 additions & 37 deletions code/game/objects/structures/stool_bed_chair_nest/xeno_nest.dm
Original file line number Diff line number Diff line change
Expand Up @@ -192,82 +192,77 @@
recently_nested = TRUE
addtimer(VARSET_CALLBACK(src, recently_nested, FALSE), 5 SECONDS)

/obj/structure/bed/nest/buckle_mob(mob/M as mob, mob/user as mob)
/obj/structure/bed/nest/buckle_mob(mob/mob, mob/user)
. = FALSE
if(!isliving(M) || islarva(user) || (get_dist(src, user) > 1) || user.is_mob_restrained() || user.stat || user.lying || M.buckled || !iscarbon(user))
if(!isliving(mob) || islarva(user) || (get_dist(src, user) > 1) || user.is_mob_restrained() || user.stat || user.lying || mob.buckled || !iscarbon(user))
return

if(isxeno(M))
if(isxeno(mob))
to_chat(user, SPAN_WARNING("You can't buckle your sisters."))
return

if(buckled_mob)
to_chat(user, SPAN_WARNING("There's already someone in [src]."))
return

if(M.mob_size > MOB_SIZE_HUMAN)
to_chat(user, SPAN_WARNING("\The [M] is too big to fit in [src]."))
if(mob.mob_size > MOB_SIZE_HUMAN)
to_chat(user, SPAN_WARNING("\The [mob] is too big to fit in [src]."))
return

if(!isxeno(user) || issynth(M))
if(!isxeno(user) || issynth(mob))
to_chat(user, SPAN_WARNING("Gross! You're not touching that stuff."))
return

if(isyautja(M) && !force_nest)
to_chat(user, SPAN_WARNING("\The [M] seems to be wearing some kind of resin-resistant armor!"))
if(isyautja(mob) && !force_nest)
to_chat(user, SPAN_WARNING("\The [mob] seems to be wearing some kind of resin-resistant armor!"))
return

if(M == user)
if(mob == user)
return

if(ishuman(M))
var/mob/living/carbon/human/H = M
if(!H.lying) //Don't ask me why is has to be
to_chat(user, SPAN_WARNING("[M] is resisting, ground them."))
var/mob/living/carbon/human/human = null
if(ishuman(mob))
human = mob
if(!human.lying) //Don't ask me why is has to be
to_chat(user, SPAN_WARNING("[mob] is resisting, ground them."))
return

var/securing_time = 15
// Don't increase the nesting time for monkeys and other species
if(ishuman_strict(M))
if(ishuman_strict(mob))
securing_time = 75

user.visible_message(SPAN_WARNING("[user] pins [M] into [src], preparing the securing resin."),
SPAN_WARNING("[user] pins [M] into [src], preparing the securing resin."))
var/M_loc = M.loc
user.visible_message(SPAN_WARNING("[user] pins [mob] into [src], preparing the securing resin."),
SPAN_WARNING("[user] pins [mob] into [src], preparing the securing resin."))
var/M_loc = mob.loc
if(!do_after(user, securing_time, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE))
return
if(M.loc != M_loc)
if(mob.loc != M_loc)
return

if(buckled_mob) //Just in case
to_chat(user, SPAN_WARNING("There's already someone in [src]."))
return

if(ishuman(M)) //Improperly stunned Marines won't be nested
var/mob/living/carbon/human/H = M
if(!H.lying) //Don't ask me why is has to be
to_chat(user, SPAN_WARNING("[M] is resisting, ground them."))
if(human) //Improperly stunned Marines won't be nested
if(!human.lying) //Don't ask me why is has to be
to_chat(user, SPAN_WARNING("[mob] is resisting, ground them."))
return

do_buckle(M, user)
ADD_TRAIT(M, TRAIT_NESTED, TRAIT_SOURCE_BUCKLE)
do_buckle(mob, user)
ADD_TRAIT(mob, TRAIT_NESTED, TRAIT_SOURCE_BUCKLE)

if(!ishuman(M))
if(!human)
return TRUE

//Disabling motion detectors and other stuff they might be carrying
var/mob/living/carbon/human/H = M
H.start_nesting_cooldown()
H.disable_special_flags()
H.disable_lights()
H.disable_special_items()

if(H.mind)
var/choice = alert(M, "You have no possibility of escaping unless freed by your fellow marines, do you wish to Ghost? If you are freed while ghosted, you will be given the choice to return to your body.", ,"Ghost", "Remain")
if(choice == "Ghost")
// Ask to ghostize() so they can reenter, to leave mind and such intact
ghost_of_buckled_mob = M.ghostize(can_reenter_corpse = TRUE)
ghost_of_buckled_mob?.can_reenter_corpse = FALSE // Just don't for now
human.start_nesting_cooldown()
human.disable_special_flags()
human.disable_lights()
human.disable_special_items()

if(human.client)
human.do_ghost()

return TRUE

Expand Down
32 changes: 32 additions & 0 deletions code/modules/clothing/under/ties.dm
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,12 @@
icon_state = "vest_knives"
hold = /obj/item/storage/internal/accessory/knifeharness

/obj/item/clothing/accessory/storage/knifeharness/attack_hand(mob/user, mods)
if(!mods || !mods["alt"] || !length(hold.contents))
return ..()

hold.contents[length(contents)].attack_hand(user, mods)

/obj/item/storage/internal/accessory/knifeharness
storage_slots = 5
max_storage_space = 5
Expand All @@ -603,6 +609,32 @@
/obj/item/attachable/bayonet,
/obj/item/weapon/throwing_knife,
)
storage_flags = STORAGE_ALLOW_QUICKDRAW|STORAGE_FLAGS_POUCH

COOLDOWN_DECLARE(draw_cooldown)

/obj/item/storage/internal/accessory/knifeharness/fill_preset_inventory()
for(var/i = 1 to storage_slots)
new /obj/item/weapon/throwing_knife(src)

/obj/item/storage/internal/accessory/knifeharness/attack_hand(mob/user, mods)
. = ..()

if(!COOLDOWN_FINISHED(src, draw_cooldown))
to_chat(user, SPAN_WARNING("You need to wait before drawing another knife!"))
return FALSE

if(length(contents))
contents[length(contents)].attack_hand(user, mods)
COOLDOWN_START(src, draw_cooldown, BAYONET_DRAW_DELAY)

/obj/item/storage/internal/accessory/knifeharness/_item_insertion(obj/item/inserted_item, prevent_warning = 0)
..()
playsound(src, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE)

/obj/item/storage/internal/accessory/knifeharness/_item_removal(obj/item/removed_item, atom/new_location)
..()
playsound(src, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE)

/obj/item/clothing/accessory/storage/knifeharness/duelling
name = "decorated harness"
Expand Down
6 changes: 4 additions & 2 deletions code/modules/gear_presets/cmb.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/datum/equipment_preset/cmb
name = "Colonial Marshal"
faction = FACTION_USCM
faction = FACTION_MARSHAL
faction_group = list(FACTION_MARSHAL, FACTION_MARINE)
rank = JOB_CMB
idtype = /obj/item/card/id/deputy
languages = list(LANGUAGE_ENGLISH, LANGUAGE_JAPANESE)
Expand Down Expand Up @@ -410,7 +411,8 @@
paygrade = "ME2"
role_comm_title = "A-RFN"
skills = /datum/skills/pfc/crafty
faction = FACTION_USCM
faction = FACTION_MARSHAL
faction_group = list(FACTION_MARSHAL, FACTION_MARINE)

/datum/equipment_preset/uscm/cmb/load_status(mob/living/carbon/human/new_human)
. = ..()
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/dead/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
ghostize(TRUE)
else
var/list/options = list("Ghost", "Stay in body")
if(check_rights(R_MOD))
if(check_other_rights(client, R_MOD, FALSE))
options = list("Aghost") + options
var/text_prompt = "Are you -sure- you want to ghost?\n(You are alive. If you ghost, you won't be able to return to your body. You can't change your mind so choose wisely!)"
var/is_nested = (buckled && istype(buckled, /obj/structure/bed/nest)) ? TRUE : FALSE
Expand All @@ -412,8 +412,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
AdjustSleeping(2) // Sleep so you will be properly recognized as ghosted
var/turf/location = get_turf(src)
if(location) //to avoid runtime when a mob ends up in nullspace
msg_admin_niche("[key_name_admin(usr)] has ghosted. [ADMIN_JMP(location)]")
log_game("[key_name_admin(usr)] has ghosted.")
msg_admin_niche("[key_name_admin(client)] has ghosted. [ADMIN_JMP(location)]")
log_game("[key_name_admin(client)] has ghosted.")
var/mob/dead/observer/ghost = ghostize((is_nested && nest && !QDELETED(nest))) //FALSE parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
if(ghost && !is_admin_level(z))
ghost.timeofdeath = world.time
Expand Down
12 changes: 12 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/Embryo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,18 @@
to_chat(new_xeno, "Talk in Hivemind using <strong>;</strong> (e.g. ';My life for the queen!')")
playsound_client(new_xeno.client, 'sound/effects/xeno_newlarva.ogg', 25, 1)

// Inform observers to grab some popcorn if it isnt nested
if(!HAS_TRAIT(affected_mob, TRAIT_NESTED))
var/area/burst_area = get_area(src)
if(burst_area)
for(var/mob/dead/observer/observer as anything in GLOB.observer_list)
to_chat(observer, SPAN_DEADSAY("A <b>[new_xeno.hive.prefix]Larva</b> is about to chestburst out of <b>[affected_mob]</b> at \the <b>[burst_area]!</b> [OBSERVER_JMP(observer, affected_mob)]"))
to_chat(src, SPAN_DEADSAY("A <b>[new_xeno.hive.prefix]Larva</b> is about to chestburst out of <b>[affected_mob]</b> at \the <b>[burst_area]!</b>"))
else
for(var/mob/dead/observer/observer as anything in GLOB.observer_list)
to_chat(observer, SPAN_DEADSAY("A <b>[new_xeno.hive.prefix]Larva</b> is about to chestburst out of <b>[affected_mob]!</b> [OBSERVER_JMP(observer, affected_mob)]"))
to_chat(src, SPAN_DEADSAY("A <b>[new_xeno.hive.prefix]Larva</b> is about to chestburst out of <b>[affected_mob]!</b>"))

stage = 6

/mob/living/carbon/xenomorph/larva/proc/cause_unbearable_pain(mob/living/carbon/victim)
Expand Down
6 changes: 6 additions & 0 deletions code/modules/projectiles/gun_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,12 @@ As sniper rifles have both and weapon mods can change them as well. ..() deals w
var/obj/item/storage/internal/accessory/holster/holster = cycled_holster.hold
if(holster.current_gun)
return holster.current_gun

for(var/obj/item/clothing/accessory/storage/cycled_accessory in w_uniform.accessories)
var/obj/item/storage/internal/accessory/accessory_storage = cycled_accessory.hold
if(accessory_storage.storage_flags & STORAGE_ALLOW_QUICKDRAW)
return accessory_storage

return FALSE

if(istype(slot) && (slot.storage_flags & STORAGE_ALLOW_QUICKDRAW))
Expand Down
6 changes: 4 additions & 2 deletions code/modules/tents/folded_tents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
var/off_y = 0
/// Map Template to use for the tent
var/template
/// If this tent can be deployed anywhere
var/unrestricted_deployment = FALSE

/// Check an area is clear for deployment of the tent
/obj/item/folded_tent/proc/check_area(turf/ref_turf, mob/message_receiver, display_error = FALSE)
Expand All @@ -20,7 +22,7 @@
var/list/turf_block = get_deployment_area(ref_turf)
for(var/turf/turf as anything in turf_block)
var/area/area = get_area(turf)
if(!area.can_build_special)
if(!area.can_build_special && !unrestricted_deployment)
if(message_receiver)
to_chat(message_receiver, SPAN_WARNING("You cannot deploy tents on restricted areas."))
if(display_error)
Expand Down Expand Up @@ -73,7 +75,7 @@
if(!istype(deploy_turf) || (deploy_turf.x + dim_x > world.maxx) || (deploy_turf.y + dim_y > world.maxy)) // Map border basically
return

if(!is_ground_level(deploy_turf.z))
if(!is_ground_level(deploy_turf.z) && !unrestricted_deployment)
to_chat(user, SPAN_WARNING("USCM Operational Tents are intended for operations, not ship or space recreation."))
return

Expand Down
6 changes: 0 additions & 6 deletions html/changelogs/AutoChangeLog-pr-3850.yml

This file was deleted.

4 changes: 0 additions & 4 deletions html/changelogs/AutoChangeLog-pr-3911.yml

This file was deleted.

4 changes: 0 additions & 4 deletions html/changelogs/AutoChangeLog-pr-3927.yml

This file was deleted.

4 changes: 0 additions & 4 deletions html/changelogs/AutoChangeLog-pr-3932.yml

This file was deleted.

6 changes: 0 additions & 6 deletions html/changelogs/AutoChangeLog-pr-3934.yml

This file was deleted.

5 changes: 0 additions & 5 deletions html/changelogs/AutoChangeLog-pr-3935.yml

This file was deleted.

Loading

0 comments on commit 8d5c416

Please sign in to comment.