Skip to content

Commit 3c70bee

Browse files
author
Matt Atlas
committed
Merge remote-tracking branch 'Aurora/master' into whereabouts_of_the_heart
# Conflicts: # code/__DEFINES/organs.dm
2 parents 5d2fb20 + 094d4ff commit 3c70bee

File tree

15 files changed

+125
-100
lines changed

15 files changed

+125
-100
lines changed

aurorastation.dme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3139,6 +3139,7 @@
31393139
#include "code\modules\organs\subtypes\augment\augments\eye_sensors.dm"
31403140
#include "code\modules\organs\subtypes\augment\augments\fluff.dm"
31413141
#include "code\modules\organs\subtypes\augment\augments\fuel_cell.dm"
3142+
#include "code\modules\organs\subtypes\augment\augments\gravity_adaptations.dm"
31423143
#include "code\modules\organs\subtypes\augment\augments\gustatorial_centre.dm"
31433144
#include "code\modules\organs\subtypes\augment\augments\health_analyzer.dm"
31443145
#include "code\modules\organs\subtypes\augment\augments\language_processor.dm"

code/__DEFINES/mobs.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@
192192
#define BP_AUG_FLUFF_L_HAND_BIO "left hand bioaug"
193193
#define BP_AUG_GLARE_DAMPENER "glare dampeners"
194194
#define BP_AUG_GUSTATORIAL "integrated gustatorial centre"
195+
#define BP_AUG_GRAV_ADAPTATION "gravity adaptations"
195196
#define BP_AUG_HAIR "synthetic hair extensions"
196197
#define BP_AUG_HEALTHSCAN "integrated health scanner"
197198
#define BP_AUG_LANGUAGE "integrated language processor"

code/__DEFINES/organs.dm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@
4343
*/
4444
#define COMSIG_LIVER_FILTER_EVENT "liver_filter_event"
4545

46+
/**
47+
* Raised on an entity with the gravity weakness feature that is about to take damage from said weakness.
48+
* Set the canceled variable to true in order to negate said weakness.
49+
*/
50+
#define COMSIG_GRAVITY_WEAKNESS_EVENT "gravity_weakness_event"
51+
4652
/// Raised external organ (a limb) takes damage. Used for the synthetic endoskeleton at the moment. Must supply damage.
4753
#define COMSIG_EXTERNAL_ORGAN_DAMAGE "machine_internal_damage"
4854

code/datums/uplink/implants.dm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@
7676
desc = "An augment implanter, with a Auxiliary Heart bioaug. ONLY WORKS ON HUMANS!"
7777
path = /obj/item/device/augment_implanter/auxiliary_heart
7878

79+
/datum/uplink_item/item/implants/gravity_adaptations
80+
name = "Galatean Gravity Adaptations Implanter"
81+
bluecrystal_cost = 1
82+
telecrystal_cost = 1
83+
desc = "An augment implanter, with a Gravity Adaptations bioaug. ONLY WORKS ON OFF-WORLDERS!"
84+
path = /obj/item/device/augment_implanter/gravity_adaptations
85+
7986
/datum/uplink_item/item/implants/mind_blanker
8087
name = "Galatean Mind Blanker Implanter"
8188
bluecrystal_cost = 2

code/game/objects/items/devices/augment_implanter.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
/obj/item/device/augment_implanter/auxiliary_heart
8181
new_augment = /obj/item/organ/internal/augment/bioaug/auxiliary_heart
8282

83+
/obj/item/device/augment_implanter/gravity_adaptations
84+
new_augment = /obj/item/organ/internal/augment/bioaug/gravity_adaptations
85+
8386
/obj/item/device/augment_implanter/mind_blanker
8487
new_augment = /obj/item/organ/internal/augment/bioaug/mind_blanker
8588

code/modules/client/preference_setup/loadout/items/augments.dm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,14 @@
323323
whitelisted = list(SPECIES_HUMAN, SPECIES_HUMAN_OFFWORLD)
324324
cost = 2
325325

326+
/datum/gear/augment/gravity_adaptations
327+
display_name = "Gravity Adaptations"
328+
description = "A suite of chemical glands, tailored genetic therapies, and skeletal reinforcements that are aimed towards Galatean Off-worlders. These bioaugmentations serve to eliminate the weakness experienced by Off-worlders in standard terrestrial gravity."
329+
path = /obj/item/organ/internal/augment/bioaug/gravity_adaptations
330+
origin_restriction = list(/singleton/origin_item/origin/galatea)
331+
whitelisted = list(SPECIES_HUMAN_OFFWORLD)
332+
cost = 1
333+
326334
/datum/gear/augment/mind_blanker
327335
display_name = "Galatean Mind Blanker"
328336
description = "A small, discrete organ attached near the base of the brainstem. Any attempt to read the mind of an individual with this augment installed will fail, as will attempts at psychic brainwashing."

code/modules/clothing/under/accessories/accessory.dm

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,24 @@
818818
item_state = "legbrace"
819819
drop_sound = 'sound/items/drop/gun.ogg'
820820

821+
/obj/item/clothing/accessory/offworlder/bracer/on_attached(obj/item/clothing/S, mob/user)
822+
. = ..()
823+
if(!user)
824+
return
825+
826+
RegisterSignal(user, COMSIG_GRAVITY_WEAKNESS_EVENT, PROC_REF(negate_weakness))
827+
828+
/obj/item/clothing/accessory/offworlder/bracer/on_removed(mob/user)
829+
. = ..()
830+
if(!user)
831+
return
832+
833+
UnregisterSignal(user, COMSIG_GRAVITY_WEAKNESS_EVENT)
834+
835+
/obj/item/clothing/accessory/offworlder/bracer/proc/negate_weakness(var/equipee, var/canceled)
836+
SIGNAL_HANDLER
837+
*canceled = TRUE //TODO: TCJ just make this a component I can shove onto anything.
838+
821839
/obj/item/clothing/accessory/offworlder/bracer/neckbrace
822840
name = "neckbrace"
823841
desc = "A lightweight polymer frame meant to brace and hold someone's neck upright comfortably."

code/modules/mob/living/carbon/human/species/station/human/human_subspecies.dm

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
H.put_in_hands(PB)
3333

3434
/datum/species/human/offworlder/get_species_tally(var/mob/living/carbon/human/H)
35+
// Check via cancelable reference signal if arbitrarily anything on the character wants to negate the offworlder weakness.
36+
var/canceled = FALSE
37+
SEND_SIGNAL(H, COMSIG_GRAVITY_WEAKNESS_EVENT, &canceled)
38+
if(canceled)
39+
return 0
3540

3641
if(istype(H.back, /obj/item/rig/light/offworlder))
3742
var/obj/item/rig/light/offworlder/rig = H.back
@@ -46,10 +51,6 @@
4651
if((l_leg.status & ORGAN_ROBOT) && (r_leg.status & ORGAN_ROBOT))
4752
return
4853

49-
if(H.w_uniform)
50-
var/obj/item/clothing/under/suit = H.w_uniform
51-
if(locate(/obj/item/clothing/accessory/offworlder/bracer) in suit.accessories)
52-
return 0
5354

5455
var/obj/item/organ/internal/stomach/S = H.internal_organs_by_name[BP_STOMACH]
5556
if(S)
@@ -68,6 +69,12 @@
6869
if(A && !A.has_gravity())
6970
return
7071

72+
// Check via cancelable reference signal if arbitrarily anything on the character wants to negate the offworlder weakness.
73+
var/canceled = FALSE
74+
SEND_SIGNAL(H, COMSIG_GRAVITY_WEAKNESS_EVENT, &canceled)
75+
if(canceled)
76+
return
77+
7178
var/obj/item/organ/external/l_leg = H.get_organ(BP_L_LEG)
7279
var/obj/item/organ/external/r_leg = H.get_organ(BP_R_LEG)
7380

@@ -79,11 +86,6 @@
7986
if(!rig.offline)
8087
return
8188

82-
if(H.w_uniform)
83-
var/obj/item/clothing/under/uniform = H.w_uniform
84-
if(locate(/obj/item/clothing/accessory/offworlder/bracer) in uniform.accessories)
85-
return
86-
8789
var/obj/item/organ/internal/stomach/S = H.internal_organs_by_name[BP_STOMACH]
8890
if(S)
8991
for(var/_R in S.ingested.reagent_volumes)

code/modules/organs/subtypes/augment/augments/auxiliary_heart.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
if(!owner)
1313
return
1414

15-
RegisterSignal(owner, COMSIG_HEART_PUMP_EVENT, PROC_REF(stabilize_circulation))
15+
RegisterSignal(owner, COMSIG_HEART_PUMP_EVENT, PROC_REF(stabilize_circulation), override = TRUE)
1616

1717
/obj/item/organ/internal/augment/bioaug/auxiliary_heart/replaced()
1818
. = ..()
1919
if(!owner)
2020
return
2121

22-
RegisterSignal(owner, COMSIG_HEART_PUMP_EVENT, PROC_REF(stabilize_circulation))
22+
RegisterSignal(owner, COMSIG_HEART_PUMP_EVENT, PROC_REF(stabilize_circulation), override = TRUE)
2323

2424
/obj/item/organ/internal/augment/bioaug/auxiliary_heart/removed()
2525
. = ..()
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/obj/item/organ/internal/augment/bioaug/gravity_adaptations
2+
name = "gravity adaptations"
3+
desc = "A suite of chemical glands, tailored epigenetic therapies, and skeletal reinforcements that are aimed towards Galatean Off-worlders" \
4+
+ "These bioaugmentations serve to eliminate the weakness experienced by Off-worlders in standard terrestrial gravity."
5+
icon_state = "mind_blanker" //It's small and just looks like a little blob of flesh, so good enough for a placeholder for chemical glands.
6+
organ_tag = BP_AUG_GRAV_ADAPTATION
7+
parent_organ = BP_CHEST
8+
9+
/obj/item/organ/internal/augment/bioaug/gravity_adaptations/Initialize()
10+
. = ..()
11+
if(!owner)
12+
return
13+
14+
RegisterSignal(owner, COMSIG_GRAVITY_WEAKNESS_EVENT, PROC_REF(negate_weakness), override = TRUE)
15+
16+
/obj/item/organ/internal/augment/bioaug/gravity_adaptations/replaced()
17+
. = ..()
18+
if(!owner)
19+
return
20+
21+
RegisterSignal(owner, COMSIG_GRAVITY_WEAKNESS_EVENT, PROC_REF(negate_weakness), override = TRUE)
22+
23+
/obj/item/organ/internal/augment/bioaug/gravity_adaptations/removed()
24+
. = ..()
25+
if(!owner)
26+
return
27+
28+
UnregisterSignal(owner, COMSIG_GRAVITY_WEAKNESS_EVENT)
29+
30+
/obj/item/organ/internal/augment/bioaug/gravity_adaptations/proc/negate_weakness(var/implantee, var/canceled)
31+
SIGNAL_HANDLER
32+
*canceled = TRUE //TODO: TCJ just make this a component I can shove onto anything.

0 commit comments

Comments
 (0)