Skip to content

Commit

Permalink
Aetherening (#1121)
Browse files Browse the repository at this point in the history
* base impl

* particles!

* slight particle adjustments

* particle tweak

* improve rune code a bit

* exchange rune

* organ bug fixes

* target must be lying down

* exchange rune failures

* heal rune

* job name swap

* tome + reorganize

* spells early

* fixes

* fixes

* cleanup

* empyrean

* pagers

* more pager stuff

* hard del smiles

* using a syringe leaves trace dna

* dirty syringes

* merge master

* add overlay, inject one person at a time

* forensic analysis of syringes

* syringe box change

* words

* ranged aether runes

* add adenosine to autoinjectors

* small tweak to debughealth

* autoinjector changes

* rename medbay to ward

* flavah (and adjusts sprinting cost to account for slower speed)

* FIX WARDROBE AND INVENTORY CODE

* probably better

* this is kind of fucked up

* reduce odds

* sterilize syringes with a welding tool

* liver death gives the concussed effect

* fix runtime

* this bugs me

* not yet

* impliment revival rune and unit test it

* fixes

* exchange rune

* whoops, include file

* bruh

* i forgot

* rewrite heal, add unit test

* properly clear reagents

* impliment  bimmer's runes

* rename to sigil

* update

* round organ damage

* revival rune heals organs

* reduce max pain slowdown

* aetherite trait

* aether dream framework

* dreams

* augur reflavor + minor fix

* acolyte reflavor

* aether language

* screenshot tests

* make pushable

* finalize(?)
  • Loading branch information
Kapu1178 authored Feb 17, 2025
1 parent 01c9eb6 commit 4aa2915
Show file tree
Hide file tree
Showing 125 changed files with 2,251 additions and 417 deletions.
6 changes: 3 additions & 3 deletions _maps/map_files/Theseus/Theseus.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -18108,9 +18108,6 @@
/turf/open/floor/plating,
/area/station/medical/virology)
"gHq" = (
/obj/machinery/modular_computer/console/preset/command{
dir = 8
},
/obj/structure/disposalpipe/segment{
dir = 4
},
Expand All @@ -18120,6 +18117,9 @@
/obj/structure/cable/yellow{
icon_state = "9"
},
/obj/machinery/computer/pager/aether{
dir = 8
},
/turf/open/floor/carpet/blue,
/area/station/command/heads_quarters/cmo)
"gHx" = (
Expand Down
44 changes: 44 additions & 0 deletions code/__DEFINES/aether_runes.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Generic BB keys
#define RUNE_BB_INVOKER "user"
#define RUNE_BB_TOME "tome"
#define RUNE_BB_CANCEL_REASON "cancel_reason"
#define RUNE_BB_CANCEL_SOURCE "cancel_source"
#define RUNE_BB_TARGET_MOB "target_mob"
/// The reagent container containing the blood required.
#define RUNE_BB_BLOOD_CONTAINER "revival_blood_container"

// Exchange rune
/// The list of parts to exchange for the exchange rune.
#define RUNE_BB_EXCHANGE_PARTS "exchange_parts"

// Revival rune
/// The heart used.
#define RUNE_BB_REVIVAL_HEART "revival_heart"
/// The reagent container containing Woundseal used.
#define RUNE_BB_REVIVAL_WOUNDSEAL_CONTAINER "revival_woundseal_container"

// Heal rune
/// List of reagents containers containing tinctures.
#define RUNE_BB_HEAL_REAGENT_CONTAINERS "heal_reagent_containers"

/// Graceful fails should have NO SIDE EFFECTS.
#define RUNE_FAIL_GRACEFUL "graceful_fail"

// ~& Global failure states, handle these always! &~//
#define RUNE_FAIL_INVOKER_INCAP "invoker_incap"
/// Helper removed their hand from the rune.
#define RUNE_FAIL_HELPER_REMOVED_HAND "helper_incap"
/// Target mob moved off the center.
#define RUNE_FAIL_TARGET_MOB_MOVED "target_mob_moved"
/// Target stood up.
#define RUNE_FAIL_TARGET_STOOD_UP "target_stood_up"
#define RUNE_FAIL_TOME_GONE "tome_gone"
/// An item has moved out of the rune.
#define RUNE_FAIL_TARGET_ITEM_OUT_OF_RUNE "item_out_of_rune"

/// Special failure condition where the revival target was revived mid ritual.
#define RUNE_FAIL_REVIVAL_TARGET_ALIVE "revival_target_alive"

#define RUNE_INVOKING_PENDING_CANCEL -1
#define RUNE_INVOKING_IDLE 0
#define RUNE_INVOKING_ACTIVE 1
12 changes: 8 additions & 4 deletions code/__DEFINES/dream.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/// Dream is generic, and rollable by anyone.
#define DREAM_GENERIC (1<<0)
/// Dream can only be dreampt once per round per mind.
#define DREAM_ONCE_PER_ROUND (1<<1)
#define DREAM_ONCE_PER_ROUND (1<<0)
/// Dream is considered complete even if cut short.
#define DREAM_CUT_SHORT_IS_COMPLETE (1<<2)
#define DREAM_CUT_SHORT_IS_COMPLETE (1<<1)

/// Rollable by anyone
#define DREAM_CLASS_GENERIC "generic_dream"
#define DREAM_CLASS_DETECTIVE "detective_dream"
#define DREAM_CLASS_AETHERITE "aether_dream"
#define DREAM_CLASS_VAMPIRE "vampire_dream"
2 changes: 1 addition & 1 deletion code/__DEFINES/economy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define ACCOUNT_ENG "ENG"
#define ACCOUNT_ENG_NAME "Daedalus Industries Funds"
#define ACCOUNT_MED "MED"
#define ACCOUNT_MED_NAME "Aether Pharmaceuticals Funds"
#define ACCOUNT_MED_NAME "Aether Association Funds"
#define ACCOUNT_SRV "SRV"
#define ACCOUNT_CAR "CAR"
#define ACCOUNT_CAR_NAME "Hermes Galactic Freight Funds"
Expand Down
6 changes: 3 additions & 3 deletions code/__DEFINES/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
#define JOB_STATION_ENGINEER "Station Engineer"
#define JOB_ATMOSPHERIC_TECHNICIAN "Atmospheric Technician"
//Medical
#define JOB_MEDICAL_DIRECTOR "Medical Director"
#define JOB_MEDICAL_DOCTOR "General Practitioner"
#define JOB_AUGUR "Augur"
#define JOB_ACOLYTE "Acolyte"
#define JOB_PARAMEDIC "Paramedic"
#define JOB_CHEMIST "Chemist"
#define JOB_VIROLOGIST "Virologist"
Expand Down Expand Up @@ -109,7 +109,7 @@
#define DEPARTMENT_BITFLAG_SCIENCE (1<<5)
#define DEPARTMENT_SCIENCE "Science"
#define DEPARTMENT_BITFLAG_MEDICAL (1<<6)
#define DEPARTMENT_MEDICAL "Aether Pharmaceuticals"
#define DEPARTMENT_MEDICAL "Aether Association"
#define DEPARTMENT_BITFLAG_SILICON (1<<7)
#define DEPARTMENT_SILICON "Silicon"
#define DEPARTMENT_BITFLAG_ASSISTANT (1<<8)
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/magic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#define SCHOOL_NECROMANCY "necromancy"
/// Other forbidden magics, such as heretic spells
#define SCHOOL_FORBIDDEN "forbidden"
/// Blood magic
#define SCHOOL_BLOOD "blood"

// Invocation types - what does the wizard need to do to invoke (cast) the spell?
/// Allows being able to cast the spell without saying or doing anything.
Expand Down
6 changes: 6 additions & 0 deletions code/__DEFINES/packetnet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
/// Network Class of a device, used as part of ping replies.
#define PACKET_NETCLASS "netclass"

// Pagers
/// Packet arg for pager types
#define PACKET_ARG_PAGER_CLASS "pager_class"
/// Packet arg for the message sent
#define PACKET_ARG_PAGER_MESSAGE "pager_message"

// Special addresses
#define NET_ADDRESS_PING "ping"

Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/pager_defines.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define PAGER_CLASS_AETHER "aetherpager"
#define PAGER_CLASS_MARS "marspager"
#define PAGER_CLASS_MANAGEMENT "managementpager"
2 changes: 1 addition & 1 deletion code/__DEFINES/pain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

/// The amount of pain where movement slowdown beings
#define PAIN_AMT_BEGIN_SLOWDOWN (PAIN_AMT_PASSOUT * 0.075)
#define PAIN_MAX_SLOWDOWN 5
#define PAIN_MAX_SLOWDOWN 3

#define PAIN_AMT_LOW (PAIN_AMT_PASSOUT * 0.05)
#define PAIN_AMT_MEDIUM (PAIN_AMT_PASSOUT * 0.35)
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
#define RADIO_AIRLOCK "airlock"
#define RADIO_MAGNETS "magnets"
#define RADIO_PDAMESSAGE "pdamessage"
#define RADIO_PAGER_MESSAGE "pager_message"

#define DEFAULT_SIGNALER_CODE 30

Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/stamina.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@
///The amount of stamina required to sprint
#define STAMINA_MIN2SPRINT_MODIFER 0.4 //Same as exhaustion threshold
///How much stamina is taken per tile while sprinting
#define STAMINA_SPRINT_COST 4
#define STAMINA_SPRINT_COST 8
4 changes: 4 additions & 0 deletions code/__DEFINES/status_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@

#define STASIS_DEBUG_HEALTH "stasis_debug_health"

/// Head fracture
#define BROKEN_SKULL_EFFECT "broken_head"
/// Missing or dead liver.
#define DEAD_LIVER_EFFECT "dead_liver"

#define VAMPIRE_EFFECT "vampire_effect"

// Status effect application helpers.
Expand Down
7 changes: 6 additions & 1 deletion code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// Stops all slipping and sliding from ocurring
#define TRAIT_NO_SLIP_ALL "noslip_all"

/// Invoking a Miracle rune
#define TRAIT_INVOKING_MIRACLE "invokingmiracle"

#define TRAIT_NODEATH "nodeath"
#define TRAIT_NOHARDCRIT "nohardcrit"
#define TRAIT_NOSOFTCRIT "nosoftcrit"
Expand Down Expand Up @@ -470,6 +473,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// Maybe worth generalizing into a general "is sneaky" / "is stealth" trait in the future.
#define TRAIT_ALIEN_SNEAK "sneaking_alien"

/// Smoke temporarily cannot affect this mob.
#define TRAIT_AFFECTED_BY_SMOKE_RECENTLY "affected_by_smoke_recently"

// METABOLISMS
// Various jobs on the station have historically had better reactions
// to various drinks and foodstuffs. Security liking donuts is a classic
Expand Down Expand Up @@ -507,7 +513,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_LIGHTBULB_REMOVER "lightbulb_remover"
#define TRAIT_KNOW_CYBORG_WIRES "know_cyborg_wires"
#define TRAIT_KNOW_ENGI_WIRES "know_engi_wires"
#define TRAIT_ENTRAILS_READER "entrails_reader"
/// this skillchip trait lets you wash brains in washing machines to heal them
#define TRAIT_BRAINWASHING "brainwashing"

Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/traits_job.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// A trait given to Aether members on job spawn.
#define TRAIT_AETHERITE "aetherite"
2 changes: 0 additions & 2 deletions code/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@

init_employers()

init_dreams()

/// Inits the crafting recipe list, sorting crafting recipe requirements in the process.
/proc/init_crafting_recipes(list/crafting_recipes)
for(var/path in subtypesof(/datum/crafting_recipe))
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/id_access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ SUBSYSTEM_DEF(id_access)
),
"[ACCESS_CMO]" = list(
"regions" = list(REGION_MEDBAY),
"head" = JOB_MEDICAL_DIRECTOR,
"head" = JOB_AUGUR,
"templates" = list(),
"pdas" = list(),
),
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ SUBSYSTEM_DEF(job)
JOB_CAPTAIN = 1,
JOB_HEAD_OF_PERSONNEL = 2,
JOB_CHIEF_ENGINEER = 3,
JOB_MEDICAL_DIRECTOR = 4,
JOB_AUGUR = 4,
JOB_SECURITY_MARSHAL = 5,
JOB_QUARTERMASTER = 6,
)
Expand Down
13 changes: 13 additions & 0 deletions code/controllers/subsystem/tgui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,19 @@ SUBSYSTEM_DEF(tgui)
return ui
return null

/**
* public
*
* Get a open UI given a user and src_object.
*
* required src_object datum The object/datum which owns the UIs.
*
* return list of datum/tguis belonging to src_object
*/
/datum/controller/subsystem/tgui/proc/get_open_uis(datum/src_object)
var/key = "[REF(src_object)]"
return open_uis_by_src[key]

/**
* public
*
Expand Down
14 changes: 14 additions & 0 deletions code/controllers/subsystem/wardrobe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ SUBSYSTEM_DEF(wardrobe)
stock_hit = 0
stock_miss = 0

/// Returns TRUE if the atom is already stashed inside the wardrobe.
/datum/controller/subsystem/wardrobe/proc/contains_object(atom/test_for)
var/list/stock_info = preloaded_stock[test_for.type]
if(stock_info)
return test_for in stock_info[WARDROBE_STOCK_CONTENTS]
return FALSE

/// Resets the load queue to the master template, accounting for the existing stock
/datum/controller/subsystem/wardrobe/proc/hard_refresh_queue()
for(var/datum/type_to_queue as anything in canon_minimum)
Expand Down Expand Up @@ -217,6 +224,12 @@ SUBSYSTEM_DEF(wardrobe)
/datum/controller/subsystem/wardrobe/proc/stash_object(atom/movable/object)
var/object_type = object.type
var/list/master_info = canon_minimum[object_type]

#ifdef UNIT_TESTS
if(contains_object(object))
CRASH("Tried to stash an atom we already have.")
#endif

// I will not permit objects you didn't reserve ahead of time
if(!master_info)
qdel(object)
Expand All @@ -232,6 +245,7 @@ SUBSYSTEM_DEF(wardrobe)
if(amount_held - stock_target >= overflow_lienency)
qdel(object)
return

// Fuck off
if(QDELETED(object))
stack_trace("We tried to stash a qdeleted object, what did you do")
Expand Down
5 changes: 5 additions & 0 deletions code/datums/forensics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@
LAZYNULL(fibers)
return TRUE

/// Clear the trace DNA list
/datum/forensics/proc/wipe_trace_DNA()
LAZYNULL(trace_DNA)
return TRUE

/// Clear the gunshot residue list.
/datum/forensics/proc/wipe_gunshot_residue()
LAZYNULL(gunshot_residue)
Expand Down
16 changes: 9 additions & 7 deletions code/datums/id_trim/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,21 @@
job = /datum/job/chief_engineer

/datum/id_trim/job/chief_medical_officer
assignment = "Medical Director"
assignment = JOB_AUGUR
intern_alt_name = "Medical Director-in-Training"
trim_state = "trim_chiefmedicalofficer"
sechud_icon_state = SECHUD_CHIEF_MEDICAL_OFFICER
extra_access = list(ACCESS_TELEPORTER)
extra_wildcard_access = list()
minimal_access = list(ACCESS_CHEMISTRY, ACCESS_EVA, ACCESS_KEYCARD_AUTH, ACCESS_MAINT_TUNNELS, ACCESS_MECH_MEDICAL,
ACCESS_MEDICAL, ACCESS_MINERAL_STOREROOM, ACCESS_MORGUE, ACCESS_PHARMACY, ACCESS_PSYCHOLOGY, ACCESS_RC_ANNOUNCE,
ACCESS_BRIG_ENTRANCE, ACCESS_SURGERY, ACCESS_VIROLOGY, ACCESS_ROBOTICS)
minimal_access = list(
ACCESS_CHEMISTRY, ACCESS_EVA, ACCESS_KEYCARD_AUTH, ACCESS_MAINT_TUNNELS, ACCESS_MECH_MEDICAL,
ACCESS_MEDICAL, ACCESS_MINERAL_STOREROOM, ACCESS_MORGUE, ACCESS_PHARMACY, ACCESS_PSYCHOLOGY, ACCESS_RC_ANNOUNCE,
ACCESS_BRIG_ENTRANCE, ACCESS_SURGERY, ACCESS_VIROLOGY, ACCESS_ROBOTICS
)
minimal_wildcard_access = list(ACCESS_CMO)
config_job = "chief_medical_officer"
template_access = list(ACCESS_CAPTAIN, ACCESS_CHANGE_IDS)
job = /datum/job/chief_medical_officer
job = /datum/job/augur

/datum/id_trim/job/clown
assignment = "Clown"
Expand Down Expand Up @@ -332,14 +334,14 @@
job = /datum/job/lawyer

/datum/id_trim/job/medical_doctor
assignment = JOB_MEDICAL_DOCTOR
assignment = JOB_ACOLYTE
trim_state = "trim_medicaldoctor"
sechud_icon_state = SECHUD_MEDICAL_DOCTOR
extra_access = list(ACCESS_CHEMISTRY, ACCESS_VIROLOGY, ACCESS_ROBOTICS)
minimal_access = list(ACCESS_MECH_MEDICAL, ACCESS_MEDICAL, ACCESS_MINERAL_STOREROOM, ACCESS_MORGUE, ACCESS_PHARMACY, ACCESS_SURGERY)
config_job = "medical_doctor"
template_access = list(ACCESS_CAPTAIN, ACCESS_CMO, ACCESS_CHANGE_IDS)
job = /datum/job/doctor
job = /datum/job/acolyte

/datum/id_trim/job/mime
assignment = JOB_CLOWN
Expand Down
8 changes: 8 additions & 0 deletions code/datums/outfit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@
*/
var/list/skillchips = null

/// List of languages to grant upon equipping.
var/list/grant_languages

///Should we preload some of this job's items?
var/preload = FALSE

Expand Down Expand Up @@ -258,8 +261,10 @@

if(!visualsOnly)
apply_fingerprints(H)

if(internals_slot)
H.open_internals(H.get_item_by_slot(internals_slot))

if(implants)
for(var/implant_type in implants)
var/obj/item/implant/I = SSwardrobe.provide_type(implant_type, H)
Expand All @@ -279,6 +284,9 @@
if(activate_msg)
CRASH("Failed to activate [H]'s [skillchip_instance], on job [src]. Failure message: [activate_msg]")

if(LAZYLEN(grant_languages))
for(var/language_path in grant_languages)
H.grant_language(language_path)

H.update_body()
return TRUE
Expand Down
Loading

0 comments on commit 4aa2915

Please sign in to comment.