Mobility exoskeleton & modules, max fat genital sizes

Added the mobility exoskeleton, weak MODsuit that comes with mobility-related modules.
Added mobility-related modules
Added preference for max genital sizes due to fat increase
This commit is contained in:
Alphas00
2024-12-22 13:05:34 +01:00
parent f2ab8dc9a5
commit 7597de2ab8
16 changed files with 316 additions and 11 deletions
@@ -7,6 +7,7 @@
slot = ORGAN_SLOT_BELLY
w_class = 3
size = 0
var/max_size = 0
shape = DEF_BELLY_SHAPE
var/statuscheck = FALSE
genital_flags = UPDATE_OWNER_APPEARANCE
@@ -65,6 +66,7 @@
else
color = "#[D.features["belly_color"]]"
size = D.features["belly_size"]
max_size = D.features["max_belly_size"]
starting_size = D.features["belly_size"]
shape = D.features["belly_shape"]
inflatable = D.features["inflatable_belly"]
@@ -7,11 +7,23 @@
var/obj/item/organ/genital/breasts/breasts = H.getorganslot(ORGAN_SLOT_BREASTS)
if(butt)
butt.modify_size(size_change)
if(butt.max_size > 0)
if((butt.size + size_change) <= butt.max_size)
butt.modify_size(size_change)
else
butt.modify_size(size_change)
if(belly)
belly.modify_size(size_change)
if(belly.max_size > 0)
if((belly.size + size_change) <= belly.max_size)
belly.modify_size(size_change)
else
belly.modify_size(size_change)
if(breasts)
breasts.modify_size(size_change)
if(breasts.max_size > 0)
if((breasts.cached_size + size_change) <= breasts.max_size)
breasts.modify_size(size_change)
else
breasts.modify_size(size_change)
H.genital_override = TRUE
H.update_body()
@@ -38,7 +50,7 @@
/datum/species/proc/handle_helplessness(mob/living/carbon/human/fatty)
var/datum/preferences/preferences = fatty?.client?.prefs
if(!istype(preferences))
if(!istype(preferences) || HAS_TRAIT(fatty, TRAIT_NO_HELPLESSNESS))
return FALSE
if(preferences.helplessness_no_movement)
@@ -161,17 +173,17 @@
ADD_TRAIT(fatty, TRAIT_NO_MISC, HELPLESSNESS_TRAIT)
var/obj/item/clothing/suit/worn_suit = fatty.wear_suit
if(istype(worn_suit))
if(istype(worn_suit) && !istype(worn_suit, /obj/item/clothing/suit/mod))
to_chat(fatty, "<span class='warning'>[worn_suit] can no longer contain your weight!</span>")
fatty.dropItemToGround(worn_suit)
var/obj/item/clothing/gloves/worn_gloves = fatty.gloves
if(istype(worn_gloves))
if(istype(worn_gloves)&& !istype(worn_gloves, /obj/item/clothing/gloves/mod))
to_chat(fatty, "<span class='warning'>[worn_gloves] can no longer contain your weight!</span>")
fatty.dropItemToGround(worn_gloves)
var/obj/item/clothing/shoes/worn_shoes = fatty.shoes
if(istype(worn_shoes))
if(istype(worn_shoes) && !istype(worn_shoes, /obj/item/clothing/shoes/mod))
to_chat(fatty, "<span class='warning'>[worn_shoes] can no longer contain your weight!</span>")
fatty.dropItemToGround(worn_shoes)
@@ -189,7 +201,7 @@
if(fatty.fatness >= preferences.helplessness_clothing_back)
ADD_TRAIT(fatty, TRAIT_NO_BACKPACK, HELPLESSNESS_TRAIT)
var/obj/item/back_item = fatty.back
if(istype(back_item))
if(istype(back_item) && !istype(back_item, /obj/item/mod))
to_chat(fatty, "<span class='warning'>Your weight makes it impossible for you to carry [back_item].</span>")
fatty.dropItemToGround(back_item)
@@ -220,6 +232,42 @@
id = "fat"
variable = TRUE
/mob/living/carbon
var/list/fatness_delay_modifiers
/datum/fatness_delay_modifier
var/name
var/amount = 0
var/multiplier = 1
/mob/living/carbon/proc/add_fat_delay_modifier(name = "", amount = 0, multiplier = 1)
var/find_name = FALSE
for(var/datum/fatness_delay_modifier/modifier in fatness_delay_modifiers)
if(modifier.name == name && find_name == FALSE)
modifier.amount = amount
modifier.multiplier = multiplier
find_name = TRUE
if(find_name == FALSE)
var/datum/fatness_delay_modifier/new_modifier = new()
new_modifier.name = name
new_modifier.amount = amount
new_modifier.multiplier = multiplier
LAZYADD(fatness_delay_modifiers, new_modifier)
/mob/living/carbon/proc/remove_fat_delay_modifier(name)
for(var/datum/fatness_delay_modifier/modifier in fatness_delay_modifiers)
if(modifier.name == name)
LAZYREMOVE(fatness_delay_modifiers, modifier)
/datum/species/proc/apply_fatness_speed_modifiers(mob/living/carbon/human/H, fatness_delay)
for(var/datum/fatness_delay_modifier/modifier in H.fatness_delay_modifiers)
fatness_delay = fatness_delay + modifier.amount
for(var/datum/fatness_delay_modifier/modifier in H.fatness_delay_modifiers)
fatness_delay *= modifier.multiplier
fatness_delay = max(fatness_delay, 0)
fatness_delay = min(fatness_delay, FATNESS_MAX_MOVE_PENALTY)
return fatness_delay
/datum/species/proc/handle_fatness(mob/living/carbon/human/H)
handle_helplessness(H)
H.handle_modular_items()
@@ -241,6 +289,7 @@
fatness_delay = min(fatness_delay, 60)
if(fatness_delay)
fatness_delay = apply_fatness_speed_modifiers(H, fatness_delay)
H.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/fatness, TRUE, fatness_delay)
else
H.remove_movespeed_modifier(/datum/movespeed_modifier/fatness)
@@ -0,0 +1,215 @@
/obj/item/mod/module/hydraulic_movement
icon = 'GainStation13/icons/obj/clothing/modsuit/mod_modules.dmi'
icon_state = "hydraulic_mod"
name = "MOD hydraulic movement assistance module"
desc = "A module created by GATO, installed across the suit, featuring a system of hydraulic pistons \
that support and lighten vast amounts of excess weight to provide easier movement."
complexity = 1
incompatible_modules = list(/obj/item/mod/module/hydraulic_movement)
idle_power_cost = 5
var/amount = -2
var/modifier_name = "hydraulic_mod"
/obj/item/mod/module/hydraulic_movement/on_suit_activation()
var/mob/living/carbon/human/wearer = mod.wearer
wearer.add_fat_delay_modifier(modifier_name, amount)
if(!HAS_TRAIT_FROM(wearer, TRAIT_NO_HELPLESSNESS, src))
ADD_TRAIT(wearer, TRAIT_NO_HELPLESSNESS, src)
if(HAS_TRAIT_FROM(wearer, TRAIT_NO_MOVE, HELPLESSNESS_TRAIT))
REMOVE_TRAIT(wearer, TRAIT_NO_MOVE, HELPLESSNESS_TRAIT)
// if(HAS_TRAIT_FROM(wearer, TRAIT_CLUMSY, HELPLESSNESS_TRAIT))
// REMOVE_TRAIT(wearer, TRAIT_CLUMSY, HELPLESSNESS_TRAIT)
// if(HAS_TRAIT_FROM(wearer, TRAIT_NEARSIGHT, HELPLESSNESS_TRAIT))
// wearer.cure_nearsighted(HELPLESSNESS_TRAIT)
// if(HAS_TRAIT_FROM(wearer, TRAIT_DISFIGURED, HELPLESSNESS_TRAIT))
// REMOVE_TRAIT(wearer, TRAIT_DISFIGURED, HELPLESSNESS_TRAIT)
if(HAS_TRAIT_FROM(wearer, TRAIT_MUTE, HELPLESSNESS_TRAIT))
REMOVE_TRAIT(wearer, TRAIT_MUTE, HELPLESSNESS_TRAIT)
if(HAS_TRAIT_FROM(wearer, TRAIT_PARALYSIS_L_ARM, HELPLESSNESS_TRAIT))
REMOVE_TRAIT(wearer, TRAIT_PARALYSIS_L_ARM, HELPLESSNESS_TRAIT)
REMOVE_TRAIT(wearer, TRAIT_PARALYSIS_R_ARM, HELPLESSNESS_TRAIT)
wearer.update_disabled_bodyparts()
// if(HAS_TRAIT_FROM(wearer, TRAIT_NO_JUMPSUIT, HELPLESSNESS_TRAIT))
// REMOVE_TRAIT(wearer, TRAIT_NO_JUMPSUIT, HELPLESSNESS_TRAIT)
if(HAS_TRAIT_FROM(wearer, TRAIT_NO_MISC, HELPLESSNESS_TRAIT))
REMOVE_TRAIT(wearer, TRAIT_NO_MISC, HELPLESSNESS_TRAIT)
if(HAS_TRAIT_FROM(wearer, TRAIT_NO_BACKPACK, HELPLESSNESS_TRAIT))
REMOVE_TRAIT(wearer, TRAIT_NO_BACKPACK, HELPLESSNESS_TRAIT)
// if(HAS_TRAIT_FROM(wearer, TRAIT_NO_BUCKLE, HELPLESSNESS_TRAIT))
// REMOVE_TRAIT(wearer, TRAIT_NO_BUCKLE, HELPLESSNESS_TRAIT)
/obj/item/mod/module/hydraulic_movement/on_suit_deactivation(deleting = FALSE)
if(deleting)
return
if(HAS_TRAIT_FROM(mod.wearer, TRAIT_NO_HELPLESSNESS, src))
REMOVE_TRAIT(mod.wearer, TRAIT_NO_HELPLESSNESS, src)
mod.wearer.remove_fat_delay_modifier(modifier_name)
/datum/design/module/hydraulic_movement
name = "Hydraulic Assistance Module"
id = "mod_hydraulic"
materials = list(/datum/material/iron = 1000, /datum/material/glass = 200)
build_path = /datum/design/module/hydraulic_movement
desc = "A GATO-designed module that supports plumper bodies and allows easier movement."
/obj/item/mod/module/calovoltaic
icon = 'GainStation13/icons/obj/clothing/modsuit/mod_modules.dmi'
icon_state = "calovoltaic_mod"
name = "MOD calovoltaic generator module"
desc = "A module created by GATO, capable of burning adipose tissue \
to generate power for the suit it is installed onto."
module_type = MODULE_TOGGLE
complexity = 1
incompatible_modules = list(/obj/item/mod/module/calovoltaic)
var/rate = 5
/obj/item/mod/module/calovoltaic/on_select()
. = ..()
if(active)
balloon_alert(mod.wearer, "activeted!")
else
balloon_alert(mod.wearer, "deactivated!")
/obj/item/mod/module/calovoltaic/on_active_process(delta_time)
if(istype(mod.wearer, /mob/living/carbon))
var/mob/living/carbon/C = mod.wearer
var/adjusted_rate = rate * C.weight_loss_rate
if(C.fatness_real > 0 && (C.fatness_real - adjusted_rate) >= adjusted_rate)
C.adjust_fatness(-rate, FATTENING_TYPE_WEIGHT_LOSS)
mod.cell.give(rate)
/datum/design/module/calovoltaic
name = "Calovoltaic Generator Module"
id = "mod_calovoltaic"
materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/plasma = 500)
build_path = /obj/item/mod/module/calovoltaic
desc = "A GATO-designed module for burning excess fat to make power for your suit."
/obj/item/mod/construction/armor/exoskeleton
theme = /datum/mod_theme/exoskeleton
/obj/item/mod/control/Initialize(mapload, new_theme, new_skin)
. = ..()
gs13_icon_update()
/obj/item/mod/control/proc/gs13_icon_update()
if(theme.use_gs_icon == TRUE)
icon = 'GainStation13/icons/obj/clothing/modsuit/mod_clothing.dmi'
mob_overlay_icon = 'GainStation13/icons/mob/clothing/modsuit/mod_clothing.dmi'
icon_state = "[theme]-control"
item_state = "[theme]-control"
helmet.icon = 'GainStation13/icons/obj/clothing/modsuit/mod_clothing.dmi'
helmet.mob_overlay_icon = 'GainStation13/icons/mob/clothing/modsuit/mod_clothing.dmi'
helmet.icon_state = "[theme]-helmet"
helmet.item_state = "[theme]-helmet"
chestplate.icon = 'GainStation13/icons/obj/clothing/modsuit/mod_clothing.dmi'
chestplate.mob_overlay_icon = 'GainStation13/icons/mob/clothing/modsuit/mod_clothing.dmi'
chestplate.icon_state = "[theme]-chestplate"
chestplate.item_state = "[theme]-chestplate"
gauntlets.icon = 'GainStation13/icons/obj/clothing/modsuit/mod_clothing.dmi'
gauntlets.mob_overlay_icon = 'GainStation13/icons/mob/clothing/modsuit/mod_clothing.dmi'
gauntlets.icon_state = "[theme]-gauntlets"
gauntlets.item_state = "[theme]-gauntlets"
boots.icon = 'GainStation13/icons/obj/clothing/modsuit/mod_clothing.dmi'
boots.mob_overlay_icon = 'GainStation13/icons/mob/clothing/modsuit/mod_clothing.dmi'
boots.icon_state = "[theme]-boots"
boots.item_state = "[theme]-boots"
/datum/mod_theme
var/use_gs_icon = FALSE
/datum/mod_theme/exoskeleton
use_gs_icon = TRUE
name = "exoskeleton"
desc = "The design for a GATO-branded mobility exoskeleton"
extended_desc = "To combat the obesity epidemic that spreads on its stations, \
GATO scientists have worked hard to create this simple yet efficient way to support \
people whose weight proves restrictive and help them on their journey to lose it."
default_skin = "exoskeleton"
complexity_max = 5
armor = list(MELEE = 5, BULLET = 5, LASER = 5, ENERGY = 5, BOMB = 5, BIO = 5, FIRE = 5, ACID = 5, WOUND = 5, RAD = 5)
resistance_flags = FIRE_PROOF
max_heat_protection_temperature = 1
min_cold_protection_temperature = -1
permeability_coefficient = 1
siemens_coefficient = 1
slowdown_inactive = 0.5
slowdown_active = 0
inbuilt_modules = list(/obj/item/mod/module/hydraulic_movement, /obj/item/mod/module/calovoltaic, /obj/item/mod/module/storage)
allowed = list(/obj/item/flashlight, /obj/item/tank/internals)
skins = list(
"exoskeleton" = list(
HELMET_LAYER = NECK_LAYER,
HELMET_FLAGS = list(
UNSEALED_CLOTHING = NONE,
SEALED_CLOTHING = NONE,
UNSEALED_INVISIBILITY = NONE,
SEALED_INVISIBILITY = NONE,
SEALED_COVER = NONE,
),
CHESTPLATE_FLAGS = list(
UNSEALED_CLOTHING = NONE,
SEALED_CLOTHING = NONE,
SEALED_INVISIBILITY = NONE,
),
GAUNTLETS_FLAGS = list(
UNSEALED_CLOTHING = NONE,
SEALED_CLOTHING = NONE,
),
BOOTS_FLAGS = list(
UNSEALED_CLOTHING = NONE,
SEALED_CLOTHING = NONE,
),
),
"invisible" = list(
HELMET_LAYER = NECK_LAYER,
HELMET_FLAGS = list(
UNSEALED_CLOTHING = NONE,
SEALED_CLOTHING = NONE,
UNSEALED_INVISIBILITY = NONE,
SEALED_INVISIBILITY = NONE,
SEALED_COVER = NONE,
),
CHESTPLATE_FLAGS = list(
UNSEALED_CLOTHING = NONE,
SEALED_CLOTHING = NONE,
SEALED_INVISIBILITY = NONE,
),
GAUNTLETS_FLAGS = list(
UNSEALED_CLOTHING = NONE,
SEALED_CLOTHING = NONE,
),
BOOTS_FLAGS = list(
UNSEALED_CLOTHING = NONE,
SEALED_CLOTHING = NONE,
),
)
)
/obj/item/mod/control/pre_equipped/exoskeleton
desc = "A pre-built GATO mobility exoskeleton, designed to support high weights, favor movement and weight loss."
theme = /datum/mod_theme/exoskeleton
cell = /obj/item/stock_parts/cell/upgraded/plus
/datum/design/module/exoskeleton
name = "MOD exoskeleton"
id = "mod_exoskeleton"
materials = list(/datum/material/iron = 5000, /datum/material/glass = 5000, /datum/material/plasma = 5000)
build_path = /obj/item/mod/control/pre_equipped/exoskeleton
desc = "A GATO-designed assistance exoskeleton based on MODsuit tech."
build_type = MECHFAB
construction_time = 10 SECONDS
category = list("MODsuit Chassis", "MODsuit Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
/datum/gear/hands/exoskeleton
name = "MOD exoskeleton"
category = LOADOUT_CATEGORY_HANDS
path = /obj/item/mod/control/pre_equipped/exoskeleton
cost = 4