Skip to content

Commit 1ed508b

Browse files
Added octopus modpack.
1 parent 80fbea9 commit 1ed508b

39 files changed

+428
-43
lines changed

code/__defines/damage_organs.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@
7777
#define ORGAN_CATEGORY_STANCE "stance"
7878
/// Limb is considered the 'root' of a given stance limb (leg) - also counted for stance damage a la ORGAN_CATEGORY_STANCE
7979
#define ORGAN_CATEGORY_STANCE_ROOT "stance_root"
80+
// Limb is considered a manipulator, currently only used when trying to pilot a wheelchair.
81+
#define ORGAN_CATEGORY_MANIPLE "maniple"
8082

8183
// Droplimb types.
8284
#define DISMEMBER_METHOD_EDGE 0

code/_helpers/global_lists.dm

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,15 @@ var/global/list/string_slot_flags = list(
3737
)
3838

3939
// Used to avoid constantly generating new lists during movement.
40+
var/global/list/all_maniple_limbs = list(
41+
(ORGAN_CATEGORY_MANIPLE)
42+
)
4043
var/global/list/all_stance_limbs = list(
41-
ORGAN_CATEGORY_STANCE,
42-
ORGAN_CATEGORY_STANCE_ROOT
44+
(ORGAN_CATEGORY_STANCE),
45+
(ORGAN_CATEGORY_STANCE_ROOT)
4346
)
4447
var/global/list/child_stance_limbs = list(
45-
ORGAN_CATEGORY_STANCE
48+
(ORGAN_CATEGORY_STANCE)
4649
)
4750

4851
// TODO: Replace keybinding datums with keybinding decls to make this unnecessary.

code/controllers/subsystems/jobs.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ SUBSYSTEM_DEF(jobs)
556556
if(job.req_admin_notify)
557557
to_chat(H, "<b>You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.</b>")
558558

559-
if(H.needs_wheelchair())
559+
if(H.cannot_stand())
560560
equip_wheelchair(H)
561561

562562
BITSET(H.hud_updateflag, ID_HUD)

code/modules/bodytype/_bodytype.dm

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,20 +415,19 @@ var/global/list/bodytypes_by_category = list()
415415
var/list/organ_data = has_limbs[organ_tag]
416416
var/obj/item/organ/organ = organ_data["path"]
417417
organ_data["descriptor"] = initial(organ.name)
418-
var/organ_cat = initial(organ.organ_category)
419-
if(organ_cat)
418+
for(var/organ_cat in cached_json_decode(initial(organ.organ_categories)))
420419
LAZYINITLIST(_organs_by_category)
421420
LAZYADD(_organs_by_category[organ_cat], organ)
422421
LAZYINITLIST(_organ_tags_by_category)
423422
LAZYADD(_organ_tags_by_category[organ_cat], organ_tag)
423+
424424
var/list/parent_organ_data = has_limbs[organ::parent_organ]
425425
if(parent_organ_data)
426426
parent_organ_data["has_children"]++
427427

428428
for(var/organ_tag in has_organ)
429429
var/obj/item/organ/organ = has_organ[organ_tag]
430-
var/organ_cat = initial(organ.organ_category)
431-
if(organ_cat)
430+
for(var/organ_cat in cached_json_decode(initial(organ.organ_categories)))
432431
LAZYINITLIST(_organs_by_category)
433432
LAZYADD(_organs_by_category[organ_cat], organ)
434433
LAZYINITLIST(_organ_tags_by_category)

code/modules/mob/language/language.dm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66

77
/* Current unused keys, please update when you use one.
8-
* e
98
* n
109
* r
1110
* t

code/modules/mob/living/human/human_movement.dm

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,25 @@
2525
if(can_feel_pain() && get_shock() >= 10)
2626
tally += (get_shock() / 10) //pain shouldn't slow you down if you can't even feel it
2727

28+
var/list/limbs_to_check
2829
if(istype(buckled, /obj/structure/chair/wheelchair))
29-
for(var/organ_name in list(BP_L_HAND, BP_R_HAND, BP_L_ARM, BP_R_ARM))
30-
var/obj/item/organ/external/E = GET_EXTERNAL_ORGAN(src, organ_name)
31-
tally += E ? E.get_movement_delay(4) : 4
32-
else
3330
for(var/obj/item/I in get_equipped_items(include_carried = TRUE))
3431
var/slot = get_equipped_slot_for_item(I)
3532
tally += LAZYACCESS(I.slowdown_per_slot, slot)
3633
tally += I.slowdown_general
3734
tally += I.slowdown_accessory
35+
limbs_to_check = global.all_maniple_limbs
36+
else
37+
limbs_to_check = global.all_stance_limbs
3838

39-
for(var/organ_name in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT))
40-
var/obj/item/organ/external/E = GET_EXTERNAL_ORGAN(src, organ_name)
41-
tally += E ? E.get_movement_delay(4) : 4
39+
var/missing_limbs = H ? H.bodytype.get_expected_organ_count_for_categories(limbs_to_check) : 4
40+
if(missing_limbs > 0)
41+
var/max_delay_per_limb = ceil(16/missing_limbs)
42+
for(var/obj/item/organ/external/limb in get_organs_by_categories(limbs_to_check))
43+
tally += limb.get_movement_delay(max_delay_per_limb)
44+
missing_limbs--
45+
if(missing_limbs > 0)
46+
tally += missing_limbs * max_delay_per_limb
4247

4348
if(shock_stage >= 10 || get_stamina() <= 0)
4449
tally += 3
@@ -96,6 +101,11 @@
96101
handle_leg_damage()
97102
species.handle_post_move(src)
98103

104+
/mob/living/human/forceMove()
105+
. = ..()
106+
if(.)
107+
species.handle_post_move(src, exertion = FALSE)
108+
99109
/mob/living/human/proc/handle_leg_damage()
100110
if(!can_feel_pain())
101111
return

code/modules/mob/living/human/human_organs.dm

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@
7070
LAZYDISTINCTADD(external_organs, O)
7171

7272
// Update our organ category lists, if neeed.
73-
if(O.organ_category)
74-
LAZYINITLIST(organs_by_category)
75-
LAZYDISTINCTADD(organs_by_category[O.organ_category], O)
73+
if(O.organ_categories)
74+
for(var/category in cached_json_decode(O.organ_categories))
75+
LAZYINITLIST(organs_by_category)
76+
LAZYDISTINCTADD(organs_by_category[category], O)
7677

7778
// Update stat organs as well
7879
if(O.has_stat_info)
@@ -112,10 +113,11 @@
112113
LAZYREMOVE(external_organs, O)
113114

114115
// Update our organ category lists, if neeed.
115-
if(O.organ_category && islist(organs_by_category))
116-
organs_by_category[O.organ_category] -= O
117-
if(LAZYLEN(organs_by_category[O.organ_category]) <= 0)
118-
LAZYREMOVE(organs_by_category, O.organ_category)
116+
if(O.organ_categories && islist(organs_by_category))
117+
for(var/category in cached_json_decode(O.organ_categories))
118+
organs_by_category[category] -= O
119+
if(LAZYLEN(organs_by_category[category]) <= 0)
120+
LAZYREMOVE(organs_by_category, category)
119121

120122
// Update stat organs as well
121123
if(O.has_stat_info && stat_organs)

code/modules/mob/living/living.dm

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -838,14 +838,6 @@ default behaviour is:
838838
if(saturation > 0)
839839
fluids.trans_to_holder(touching_reagents, saturation)
840840

841-
/mob/living/proc/needs_wheelchair()
842-
var/tmp_stance_damage = 0
843-
for(var/limb_tag in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT))
844-
var/obj/item/organ/external/E = GET_EXTERNAL_ORGAN(src, limb_tag)
845-
if(!E || !E.is_usable())
846-
tmp_stance_damage += 2
847-
return tmp_stance_damage >= 4
848-
849841
/mob/living/proc/seizure()
850842
set waitfor = 0
851843
sleep(rand(5,10))

code/modules/organs/external/quadruped.dm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
amputation_point = "front left knee"
2121
tendon_name = "cruciate ligament"
2222
artery_name = "femoral artery"
23-
organ_category = ORGAN_CATEGORY_STANCE_ROOT
23+
organ_categories = @"['" + ORGAN_CATEGORY_STANCE_ROOT + "']"
2424
limb_flags = ORGAN_FLAG_CAN_AMPUTATE | ORGAN_FLAG_CAN_STAND | ORGAN_FLAG_HAS_TENDON | ORGAN_FLAG_CAN_BREAK | ORGAN_FLAG_CAN_DISLOCATE
2525

2626
/obj/item/organ/external/arm/right/quadruped
@@ -29,7 +29,7 @@
2929
amputation_point = "front right knee"
3030
tendon_name = "cruciate ligament"
3131
artery_name = "femoral artery"
32-
organ_category = ORGAN_CATEGORY_STANCE_ROOT
32+
organ_categories = @"['" + ORGAN_CATEGORY_STANCE_ROOT + "']"
3333
limb_flags = ORGAN_FLAG_CAN_AMPUTATE | ORGAN_FLAG_CAN_STAND | ORGAN_FLAG_HAS_TENDON | ORGAN_FLAG_CAN_BREAK | ORGAN_FLAG_CAN_DISLOCATE
3434

3535
/obj/item/organ/external/hand/quadruped
@@ -38,7 +38,7 @@
3838
amputation_point = "front left ankle"
3939
tendon_name = "Achilles tendon"
4040
limb_flags = ORGAN_FLAG_CAN_AMPUTATE | ORGAN_FLAG_CAN_STAND | ORGAN_FLAG_HAS_TENDON | ORGAN_FLAG_CAN_BREAK | ORGAN_FLAG_CAN_DISLOCATE
41-
organ_category = ORGAN_CATEGORY_STANCE
41+
organ_categories = @"['" + ORGAN_CATEGORY_STANCE + "']"
4242
gripper_type = null
4343

4444
/obj/item/organ/external/hand/right/quadruped
@@ -47,5 +47,5 @@
4747
amputation_point = "front right ankle"
4848
tendon_name = "Achilles tendon"
4949
limb_flags = ORGAN_FLAG_CAN_AMPUTATE | ORGAN_FLAG_CAN_STAND | ORGAN_FLAG_HAS_TENDON | ORGAN_FLAG_CAN_BREAK | ORGAN_FLAG_CAN_DISLOCATE
50-
organ_category = ORGAN_CATEGORY_STANCE
50+
organ_categories = @"['" + ORGAN_CATEGORY_STANCE + "']"
5151
gripper_type = null

code/modules/organs/external/standard.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
tendon_name = "cruciate ligament"
8484
artery_name = "femoral artery"
8585
arterial_bleed_severity = 0.75
86-
organ_category = ORGAN_CATEGORY_STANCE_ROOT
86+
organ_categories = @"['" + ORGAN_CATEGORY_STANCE_ROOT + "']"
8787
limb_flags = ORGAN_FLAG_CAN_AMPUTATE | ORGAN_FLAG_CAN_STAND | ORGAN_FLAG_HAS_TENDON | ORGAN_FLAG_CAN_BREAK | ORGAN_FLAG_CAN_DISLOCATE
8888

8989
/obj/item/organ/external/leg/right
@@ -108,7 +108,7 @@
108108
tendon_name = "Achilles tendon"
109109
arterial_bleed_severity = 0.5
110110
limb_flags = ORGAN_FLAG_CAN_AMPUTATE | ORGAN_FLAG_CAN_STAND | ORGAN_FLAG_HAS_TENDON | ORGAN_FLAG_CAN_BREAK | ORGAN_FLAG_CAN_DISLOCATE
111-
organ_category = ORGAN_CATEGORY_STANCE
111+
organ_categories = @"['" + ORGAN_CATEGORY_STANCE + "']"
112112

113113
/obj/item/organ/external/foot/get_natural_attacks()
114114
var/static/list/unarmed_attacks = list(

0 commit comments

Comments
 (0)