Skip to content

Commit

Permalink
Merge branch 'master' into autocpr
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMelbert committed Nov 8, 2023
2 parents 3a3661d + 602823b commit 84ad398
Show file tree
Hide file tree
Showing 22 changed files with 814 additions and 60 deletions.
20 changes: 9 additions & 11 deletions code/game/objects/items/defib.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,13 @@
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/defibrillator/attack_hand(mob/user, list/modifiers)
if(loc == user)
if(slot_flags & ITEM_SLOT_BACK)
if(user.get_item_by_slot(ITEM_SLOT_BACK) == src)
ui_action_click()
else
to_chat(user, span_warning("Put the defibrillator on your back first!"))

else if(slot_flags & ITEM_SLOT_BELT)
if(user.get_item_by_slot(ITEM_SLOT_BELT) == src)
ui_action_click()
else
to_chat(user, span_warning("Strap the defibrillator's belt on first!"))
// NON-MODULE CHANGE START
if(user.get_slot_by_item(src) & slot_flags)
ui_action_click()
else
balloon_alert(user, "equip the unit first!")
return
// NON-MODULE CHANGE END
else if(istype(loc, /obj/machinery/defibrillator_mount))
ui_action_click() //checks for this are handled in defibrillator.mount.dm
return ..()
Expand Down Expand Up @@ -283,9 +278,12 @@
nocell_state = "defibcompact-nocell"
emagged_state = "defibcompact-emagged"

/*
// NON-MODULE CHANGE
/obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user)
if(slot & user.getBeltSlot())
return TRUE
*/

/obj/item/defibrillator/compact/loaded/Initialize(mapload)
. = ..()
Expand Down
3 changes: 1 addition & 2 deletions code/modules/mob/living/carbon/human/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
HM.on_life(seconds_per_tick, times_fired)

if(stat != DEAD)
//heart attack stuff
handle_heart(seconds_per_tick, times_fired)
// handle_heart(seconds_per_tick, times_fired) // NON-MODULE CHANGE
handle_liver(seconds_per_tick, times_fired)

dna.species.spec_life(src, seconds_per_tick, times_fired) // for mutantraces
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
if(attacker_style?.help_act(user, target) == MARTIAL_ATTACK_SUCCESS)
return TRUE

if(target.body_position == STANDING_UP || target.appears_alive())
if(!target.undergoing_cardiac_arrest() && (target.body_position == STANDING_UP || target.appears_alive())) // NON-MODULE CHANGE
target.help_shake_act(user)
if(target != user)
log_combat(user, target, "shaken")
Expand Down
7 changes: 6 additions & 1 deletion code/modules/mob/living/carbon/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -778,4 +778,9 @@
if(!istype(heart))
return

heart.beating = !status
// NON-MODULE CHANGE START
if(status)
heart.Stop()
else
heart.Restart()
// NON-MODULE CHANGE END
2 changes: 1 addition & 1 deletion code/modules/mob/living/status_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,6 @@

/// Helper to check if we seem to be alive or not
/mob/living/proc/appears_alive()
return health >= 0 && !HAS_TRAIT(src, TRAIT_FAKEDEATH)
return stat != DEAD && !HAS_TRAIT(src, TRAIT_FAKEDEATH)

#undef IS_STUN_IMMUNE
3 changes: 1 addition & 2 deletions code/modules/surgery/organs/heart.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@

/obj/item/organ/internal/heart/OnEatFrom(eater, feeder)
. = ..()
beating = FALSE
update_appearance()
Stop() // NON-MODULE CHANGE

/obj/item/organ/internal/heart/on_life(seconds_per_tick, times_fired)
..()
Expand Down
3 changes: 3 additions & 0 deletions maplestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5558,6 +5558,7 @@
#include "maplestation_modules\code\modules\jobs\job_types\asset_protection.dm"
#include "maplestation_modules\code\modules\jobs\job_types\assistant.dm"
#include "maplestation_modules\code\modules\jobs\job_types\bridge_officer.dm"
#include "maplestation_modules\code\modules\jobs\job_types\captain.dm"
#include "maplestation_modules\code\modules\jobs\job_types\lawyer.dm"
#include "maplestation_modules\code\modules\jobs\job_types\ordnance_tech.dm"
#include "maplestation_modules\code\modules\jobs\job_types\psychologist.dm"
Expand All @@ -5571,6 +5572,7 @@
#include "maplestation_modules\code\modules\language\japanese.dm"
#include "maplestation_modules\code\modules\language\language_holder.dm"
#include "maplestation_modules\code\modules\language\skrellian.dm"
#include "maplestation_modules\code\modules\library\skill_learning\job_skillchips\medbay.dm"
#include "maplestation_modules\code\modules\library\skill_learning\job_skillchips\mining.dm"
#include "maplestation_modules\code\modules\loadouts\loadout_items\_limb_datums.dm"
#include "maplestation_modules\code\modules\loadouts\loadout_items\_loadout_categories.dm"
Expand Down Expand Up @@ -5657,6 +5659,7 @@
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\skrell.dm"
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\species.dm"
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\synths.dm"
#include "maplestation_modules\code\modules\mob\living\carbon\human\species_types\vampire.dm"
#include "maplestation_modules\code\modules\mob\living\silicon\robot\robot_defines.dm"
#include "maplestation_modules\code\modules\mob\living\simple_animal\corpse.dm"
#include "maplestation_modules\code\modules\mod\mod_control.dm"
Expand Down
5 changes: 4 additions & 1 deletion maplestation_modules/code/__DEFINES/_module_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@
#define TOOLTIP_NO_DAMAGE "This item has very low force and is largely cosmetic."
#define TOOLTIP_RANDOM_COLOR "This item has a random color and will change every round."

/// Modular traits
// Modular traits
/// Provides additional resistance to contracting diseases. Should be removed next upstream
#define TRAIT_DISEASE_RESISTANT "disease_resistant"
/// Does not harm patients when undergoing CPR
#define TRAIT_CPR_CERTIFIED "cpr_certified"

/// Bitflags for speech sounds
#define SOUND_NORMAL (1<<0)
Expand Down
8 changes: 8 additions & 0 deletions maplestation_modules/code/__DEFINES/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@

/// Item generating their worn icon
#define COMSIG_ITEM_WORN_ICON_MADE "item_worn_icon_made"

/// Entering or exiting a vent.
#define COMSIG_HANDLE_VENTCRAWLING "handle_ventcrawl"
/// Return to block entrance / exit
#define COMPONENT_NO_VENT (1<<0)

/// A carbon is being flashed - actually being blinded and taking (eye) damage
#define COMSIG_CARBON_FLASH_ACT "carbon_flash_act"
7 changes: 7 additions & 0 deletions maplestation_modules/code/datums/quirks/neutral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@
//Will add named cardbinder, starting base 2 cards, packbox of 28 Red cards, 4 counters, and a paper with rules. Now in a handy box!
give_item_to_holder(card_binder, list(LOCATION_BACKPACK = ITEM_SLOT_BACKPACK, LOCATION_HANDS = ITEM_SLOT_HANDS))
give_item_to_holder(/obj/item/storage/box/tdatet_starter, list(LOCATION_BACKPACK = ITEM_SLOT_BACKPACK, LOCATION_HANDS = ITEM_SLOT_HANDS))

/datum/quirk/cpr_certified
name = "CPR Certified"
desc = "You are certified to perform CPR on others independent of your job."
icon = FA_ICON_HEARTBEAT
value = 0
mob_trait = TRAIT_CPR_CERTIFIED
143 changes: 143 additions & 0 deletions maplestation_modules/code/game/area/space_station_13_areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
name = "Bridge Officer's Office"
icon = 'maplestation_modules/icons/turf/areas.dmi'
icon_state = "bo_office"
associated_department_flags = DEPARTMENT_BITFLAG_COMMAND|DEPARTMENT_BITFLAG_SECURITY
associated_department = DEPARTMENT_COMMAND

//AP Office, possibly going unused? We're adding it anyway, fuck you
/area/station/command/ap_office
Expand All @@ -20,6 +22,8 @@

/area/station/service/hydroponics/park
name = "Park"
associated_department_flags = NONE
associated_department = null

/area/station/service/bar/lower
name = "Lower Bar"
Expand All @@ -29,11 +33,15 @@
name = "\improper Abandoned Robotics"
icon_state = "abandoned_sci"
sound_environment = SOUND_AREA_SMALL_ENCLOSED
associated_department_flags = NONE
associated_department = null

/area/station/service/kitchen/abandoned
name = "\improper Abandoned Kitchen"
icon_state = "kitchen"
sound_environment = SOUND_AREA_SMALL_ENCLOSED
associated_department_flags = NONE
associated_department = null

/area/station/maintenance/starboard/lower
name = "Lower Starboard Maintenance"
Expand Down Expand Up @@ -78,3 +86,138 @@
name = "\improper Baseball Locker Room"
icon = 'maplestation_modules/icons/turf/areas.dmi'
icon_state = "baseball_locker"

/area/station
/// All department flags that are associated with this department
var/associated_department_flags = NONE
/// The PRIMARY department this area may be located in
var/associated_department

/area/station/security
associated_department_flags = DEPARTMENT_BITFLAG_SECURITY
associated_department = DEPARTMENT_SECURITY

/area/station/security/checkpoint/medical
associated_department_flags = DEPARTMENT_BITFLAG_SECURITY|DEPARTMENT_BITFLAG_MEDICAL
associated_department = DEPARTMENT_MEDICAL

/area/station/security/checkpoint/medical/medsci
associated_department_flags = DEPARTMENT_BITFLAG_SECURITY|DEPARTMENT_BITFLAG_MEDICAL|DEPARTMENT_BITFLAG_SCIENCE

/area/station/security/checkpoint/science
associated_department_flags = DEPARTMENT_BITFLAG_SECURITY|DEPARTMENT_BITFLAG_SCIENCE
associated_department = DEPARTMENT_SCIENCE

/area/station/security/checkpoint/engineering
associated_department_flags = DEPARTMENT_BITFLAG_SECURITY|DEPARTMENT_BITFLAG_ENGINEERING
associated_department = DEPARTMENT_ENGINEERING

/area/station/security/checkpoint/supply
associated_department_flags = DEPARTMENT_BITFLAG_SECURITY|DEPARTMENT_BITFLAG_COMMAND
associated_department = DEPARTMENT_COMMAND

/area/station/medical
associated_department_flags = DEPARTMENT_BITFLAG_MEDICAL
associated_department = DEPARTMENT_MEDICAL

/area/station/medical/abandoned
associated_department_flags = NONE
associated_department = null

/area/station/science
associated_department_flags = DEPARTMENT_BITFLAG_SCIENCE
associated_department = DEPARTMENT_SCIENCE

/area/station/science/research/abandoned
associated_department_flags = NONE
associated_department = null

/area/station/service
associated_department_flags = DEPARTMENT_BITFLAG_SERVICE
associated_department = DEPARTMENT_SERVICE

/area/station/service/electronic_marketing_den
associated_department_flags = NONE
associated_department = null

/area/station/service/abandoned_gambling_den
associated_department_flags = NONE
associated_department = null

/area/station/service/abandoned_gambling_den/gaming
associated_department_flags = NONE
associated_department = null

/area/station/service/theater/abandoned
associated_department_flags = NONE
associated_department = null

/area/station/service/library/abandoned
associated_department_flags = NONE
associated_department = null

/area/station/service/hydroponics/garden/abandoned
associated_department_flags = NONE
associated_department = null

/area/station/engineering
associated_department_flags = DEPARTMENT_BITFLAG_ENGINEERING
associated_department = DEPARTMENT_ENGINEERING

/area/station/supply
associated_department_flags = DEPARTMENT_BITFLAG_CARGO
associated_department = DEPARTMENT_CARGO

/area/station/command
associated_department_flags = DEPARTMENT_BITFLAG_COMMAND
associated_department = DEPARTMENT_COMMAND

/area/station/command/heads_quarters/captain
associated_department_flags = DEPARTMENT_BITFLAG_CAPTAIN

/area/station/command/heads_quarters/cmo
associated_department = DEPARTMENT_MEDICAL

/area/station/command/heads_quarters/ce
associated_department = DEPARTMENT_ENGINEERING

/area/station/command/heads_quarters/rd
associated_department = DEPARTMENT_SCIENCE

/area/station/command/heads_quarters/hos
associated_department = DEPARTMENT_SECURITY

/area/station/ai_monitored
associated_department_flags = DEPARTMENT_BITFLAG_SILICON

/area/station/ai_monitored/command
associated_department_flags = DEPARTMENT_BITFLAG_COMMAND|DEPARTMENT_BITFLAG_SILICON
associated_department = DEPARTMENT_COMMAND

/area/station/ai_monitored/security
associated_department_flags = DEPARTMENT_BITFLAG_COMMAND|DEPARTMENT_BITFLAG_SECURITY
associated_department = DEPARTMENT_BITFLAG_SECURITY

/area/station/ai_monitored/aisat
associated_department_flags = DEPARTMENT_BITFLAG_COMMAND|DEPARTMENT_BITFLAG_SILICON
associated_department = DEPARTMENT_SILICON

/area/station/ai_monitored/turret_protected/ai
associated_department_flags = DEPARTMENT_BITFLAG_COMMAND|DEPARTMENT_BITFLAG_SILICON
associated_department = DEPARTMENT_SILICON

/area/station/ai_monitored/turret_protected/aisat
associated_department_flags = DEPARTMENT_BITFLAG_COMMAND|DEPARTMENT_BITFLAG_SILICON
associated_department = DEPARTMENT_SILICON

/area/station/ai_monitored/turret_protected/aisat_interior
associated_department_flags = DEPARTMENT_BITFLAG_COMMAND|DEPARTMENT_BITFLAG_SILICON
associated_department = DEPARTMENT_SILICON

/area/station/ai_monitored/turret_protected/ai_upload
associated_department_flags = DEPARTMENT_BITFLAG_COMMAND|DEPARTMENT_BITFLAG_SILICON
associated_department = DEPARTMENT_SILICON

/area/station/ai_monitored/turret_protected/ai_upload_foyer
associated_department_flags = DEPARTMENT_BITFLAG_COMMAND|DEPARTMENT_BITFLAG_SILICON
associated_department = DEPARTMENT_SILICON
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// -- Quartermaster locker stuff. --
/obj/structure/closet/secure_closet/quartermaster/PopulateContents()
. = ..()
new /obj/item/storage/box/skillchips/cargo(src)
new /obj/item/storage/bag/garment/magic/quartermaster(src) // done at the veeeery end for a reason.
22 changes: 22 additions & 0 deletions maplestation_modules/code/modules/clothing/suits/labcoat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,28 @@
/obj/item/tank/internals/emergency_oxygen,
/obj/item/tank/internals/plasmaman,
/obj/item/storage/bag/bio,
/obj/item/defibrillator/compact,
)
armor_type = /datum/armor/science_rd
species_exception = list(/datum/species/golem)

// Adding combat defib to allowed list of non-modular labcouts and co.
/obj/item/defibrillator/compact
slot_flags = ITEM_SLOT_BELT|ITEM_SLOT_SUITSTORE|ITEM_SLOT_DEX_STORAGE
worn_icon = 'icons/mob/clothing/belt.dmi'

/obj/item/clothing/suit/toggle/labcoat/Initialize(mapload)
. = ..()
allowed += /obj/item/defibrillator/compact

/obj/item/clothing/suit/hooded/wintercoat/medical/Initialize(mapload)
. = ..()
allowed += /obj/item/defibrillator/compact

/obj/item/clothing/suit/apron/surgical/Initialize(mapload)
. = ..()
allowed += /obj/item/defibrillator/compact

/datum/mod_theme/medical/New() // Maybe not necessary because the defib MOD exists
. = ..()
allowed_suit_storage += /obj/item/defibrillator/compact
Loading

0 comments on commit 84ad398

Please sign in to comment.