Merge pull request #11 from AlManiak/feature/port-stuffed-functionality
Feature/port stuffed functionality
This commit is contained in:
@@ -21,10 +21,8 @@ GLOBAL_LIST_INIT(uncapped_resize_areas, list(/area/command/bridge, /area/mainten
|
||||
var/doorstuck = 0
|
||||
|
||||
var/fullness = FULLNESS_LEVEL_HALF_FULL
|
||||
var/fullness_reduction_timer = 0
|
||||
var/burpslurring = 0
|
||||
|
||||
var/fullness_reducion_timer = 0 // When was the last time they emoted to reduce their fullness
|
||||
var/fullness_reduction_timer = 0 // When was the last time they emoted to reduce their fullness
|
||||
|
||||
/**
|
||||
* Adjusts the fatness level of the parent mob.
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
desc = "A tasteful grey jumpsuit that reminds you of the good old days. Now adjusts to the match the wearer's size!" //description same as above
|
||||
|
||||
var/icon_location = 'GainStation13/icons/mob/modclothes/graymodular.dmi' //specify the file path where the modular overlays for those clothes are located
|
||||
var/icon_stuffed_location = 'GainStation13/icons/mob/modclothes/graymodular_stuffed.dmi'
|
||||
var/mob/living/carbon/U //instance a variable for keeping track of the user
|
||||
|
||||
/obj/item/clothing/under/color/grey/modular/equipped(mob/user, slot) //whenever the clothes are in someone's inventory the clothes keep track of who that user is
|
||||
@@ -93,16 +94,36 @@
|
||||
for(O in U.internal_organs) //check the user for the organs they have
|
||||
if(istype(O, /obj/item/organ/genital/belly)) //if that organ is a belly
|
||||
G = O //treat that organ as a genital
|
||||
if(!adjusted) //check the style, if it needs to be the adjusted variants
|
||||
if(G.size <= 9) //check that the size is within accepted values, NOTE: these need to be removed later, better to cap organ sizes to begin with
|
||||
. += mutable_appearance(icon_location, "belly_[G.size]", GENITALS_UNDER_LAYER) //add, from the clothes' icon file the overlay corresponding to that genital at that size and draw it onto the layer
|
||||
else //if not an expected size value, bigger than the max, default to max size
|
||||
. += mutable_appearance(icon_location, "belly_9", GENITALS_UNDER_LAYER)
|
||||
else //use the alternative adjusted sprites
|
||||
if(G.size <= 9)
|
||||
. += mutable_appearance(icon_location, "belly_[G.size]_d", GENITALS_UNDER_LAYER)
|
||||
else
|
||||
. += mutable_appearance(icon_location, "belly_9_d", GENITALS_UNDER_LAYER)
|
||||
// Change to visually update sprite depending on fullness.
|
||||
if(ishuman(O.owner))
|
||||
var/mob/living/carbon/human/H = O.owner
|
||||
var/size = 0
|
||||
var/used_icon_location = icon_location
|
||||
|
||||
switch(H.fullness)
|
||||
if(-100 to FULLNESS_LEVEL_BLOATED) // Normal
|
||||
size = G.size
|
||||
if(FULLNESS_LEVEL_BLOATED to FULLNESS_LEVEL_BEEG) // Take the stuffed sprite of the same size
|
||||
size = G.size
|
||||
used_icon_location = icon_stuffed_location
|
||||
if(FULLNESS_LEVEL_BEEG to FULLNESS_LEVEL_NOMOREPLZ) // Take the stuffed sprite of size + 1
|
||||
size = G.size + 1
|
||||
used_icon_location = icon_stuffed_location
|
||||
if(FULLNESS_LEVEL_NOMOREPLZ to INFINITY)// Take the stuffed sprite of size + 2
|
||||
size = G.size + 2
|
||||
used_icon_location = icon_stuffed_location
|
||||
|
||||
if(!adjusted) //check the style, if it needs to be the adjusted variants
|
||||
if(G.size <= 9+FULLNESS_STUFFED_EXTRA_SPRITE_SIZES) //check that the size is within accepted values, NOTE: these need to be removed later, better to cap organ sizes to begin with. Cap is 9 (max fat stage) + 2 (stuffed stages)
|
||||
. += mutable_appearance(used_icon_location, "belly_[size]", GENITALS_FRONT_LAYER) //add, from the clothes' icon file the overlay corresponding to that genital at that size and draw it onto the layer
|
||||
else //if not an expected size value, bigger than the max, default to max size
|
||||
. += mutable_appearance(used_icon_location, "belly_11", GENITALS_FRONT_LAYER)
|
||||
else //use the alternative adjusted sprites
|
||||
if(G.size <= 9+FULLNESS_STUFFED_EXTRA_SPRITE_SIZES)
|
||||
. += mutable_appearance(used_icon_location, "belly_[size]_d", GENITALS_FRONT_LAYER)
|
||||
else
|
||||
. += mutable_appearance(used_icon_location, "belly_11_d", GENITALS_FRONT_LAYER)
|
||||
|
||||
if(istype(O, /obj/item/organ/genital/butt)) //if that organ is the butt
|
||||
G = O
|
||||
if(mutantrace_variation == STYLE_DIGITIGRADE) //check if the suit needs to use sprites for digitigrade characters
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
size = 0
|
||||
var/statuscheck = FALSE
|
||||
shape = "belly"
|
||||
genital_flags = UPDATE_OWNER_APPEARANCE
|
||||
masturbation_verb = "massage"
|
||||
var/sent_full_message = TRUE //defaults to 1 since they're full to start
|
||||
var/inflatable = FALSE //For inflation connoisseurs
|
||||
@@ -27,7 +28,22 @@
|
||||
..()
|
||||
|
||||
/obj/item/organ/genital/belly/update_appearance()
|
||||
//GS13 - Port Stuffed states
|
||||
// Default settings
|
||||
icon_state = "belly_[shape]_[size]"
|
||||
icon = 'hyperstation/icons/obj/genitals/belly.dmi'
|
||||
|
||||
// Change belly sprite and size based on current fullness
|
||||
switch(owner.fullness)
|
||||
if(FULLNESS_LEVEL_BLOATED to FULLNESS_LEVEL_BEEG)
|
||||
icon = 'hyperstation/icons/obj/genitals/belly_stuffed.dmi'
|
||||
if(FULLNESS_LEVEL_BEEG to FULLNESS_LEVEL_NOMOREPLZ)
|
||||
icon = 'hyperstation/icons/obj/genitals/belly_stuffed.dmi'
|
||||
icon_state = "belly_[shape]_[size+1]"
|
||||
if(FULLNESS_LEVEL_NOMOREPLZ to INFINITY)
|
||||
icon = 'hyperstation/icons/obj/genitals/belly_stuffed.dmi'
|
||||
icon_state = "belly_[shape]_[size+2]"
|
||||
|
||||
if(owner)
|
||||
if(owner.dna.species.use_skintones && owner.dna.features["genitals_use_skintone"])
|
||||
if(ishuman(owner)) // Check before recasting type, although someone fucked up if you're not human AND have use_skintones somehow...
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
if(!ishuman(src))
|
||||
return
|
||||
|
||||
if(fullness >= FULLNESS_LEVEL_BLOATED && fullness_reducion_timer + FULLNESS_REDUCTION_COOLDOWN < world.time)
|
||||
if(fullness >= FULLNESS_LEVEL_BLOATED && fullness_reduction_timer + FULLNESS_REDUCTION_COOLDOWN < world.time)
|
||||
|
||||
fullness -= amount // Remove Fullness
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 35 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
@@ -175,6 +175,15 @@
|
||||
#define NUTRITION_LEVEL_START_MIN 250
|
||||
#define NUTRITION_LEVEL_START_MAX 400
|
||||
|
||||
//GS13 Port - Hyperstation Thirst
|
||||
#define THIRST_LEVEL_THRESHOLD 800 //Set to 0 to stop clamping
|
||||
#define THIRST_LEVEL_QUENCHED 450
|
||||
#define THIRST_LEVEL_THIRSTY 250
|
||||
#define THIRST_LEVEL_PARCHED 150
|
||||
|
||||
#define THIRST_LEVEL_START_MIN 250
|
||||
#define THIRST_LEVEL_START_MAX 400
|
||||
|
||||
// Disgust levels for humans
|
||||
#define DISGUST_LEVEL_MAXEDOUT 150
|
||||
#define DISGUST_LEVEL_DISGUSTED 75
|
||||
@@ -388,6 +397,7 @@
|
||||
#define FULLNESS_LEVEL_FILLED 40
|
||||
#define FULLNESS_LEVEL_HALF_FULL 20
|
||||
#define FULLNESS_LEVEL_EMPTY 0
|
||||
#define FULLNESS_STUFFED_EXTRA_SPRITE_SIZES 2 //GS13 - Stuffed sprite range
|
||||
|
||||
//Fullness emote cooldown
|
||||
#define FULLNESS_REDUCTION_COOLDOWN 50
|
||||
|
||||
@@ -71,6 +71,8 @@
|
||||
if(genital_flags & UPDATE_OWNER_APPEARANCE && owner && ishuman(owner))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.update_genitals()
|
||||
if(owner)//GS13: rebuild overlays on genitals appearance update, for modular clothes
|
||||
owner.update_inv_w_uniform()
|
||||
if(linked_organ_slot || (linked_organ && !owner))
|
||||
update_link()
|
||||
|
||||
@@ -356,7 +358,13 @@
|
||||
if("belly_color")
|
||||
genital_overlay.color = "#[dna.features["belly_color"]]"
|
||||
|
||||
genital_overlay.icon_state = "[G.slot]_[S.icon_state]_[size][(dna.species.use_skintones && !dna.skin_tone_override) ? "_s" : ""]_[aroused_state]_[layertext]"
|
||||
//GS13 Port - Specific check for belly since we need organ values specifically and not sprite_accessories, maybe can rewrite this more generically later?
|
||||
// In any case I don't want any specific calculations done here
|
||||
if(G.slot == "belly")
|
||||
genital_overlay.icon = G.icon
|
||||
genital_overlay.icon_state = "[G.icon_state]_[aroused_state]_[layertext]"
|
||||
else
|
||||
genital_overlay.icon_state = "[G.slot]_[S.icon_state]_[size][(dna.species.use_skintones && !dna.skin_tone_override) ? "_s" : ""]_[aroused_state]_[layertext]"
|
||||
|
||||
if(layers_num[layer] == GENITALS_FRONT_LAYER && G.genital_flags & GENITAL_THROUGH_CLOTHES)
|
||||
genital_overlay.layer = -GENITALS_EXPOSED_LAYER
|
||||
|
||||
@@ -46,6 +46,13 @@
|
||||
checkLiked(fraction, M)
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
reagents.trans_to(M, gulp_size, log = TRUE)
|
||||
//GS13 Port - Fullness
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/human/human_eater = M
|
||||
if(HAS_TRAIT(M, TRAIT_VORACIOUS))
|
||||
human_eater.fullness += min(gulp_size * 0.67, reagents.total_volume * 0.67)
|
||||
else
|
||||
human_eater.fullness += min(gulp_size, reagents.total_volume) // GS13 drinks will fill your stomach
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ All foods are distributed among various categories. Use common sense.
|
||||
return FALSE
|
||||
|
||||
//GS13 EDIT, FULNESS
|
||||
var/fullness = M.nutrition + 10
|
||||
var/fullness = 0
|
||||
//for(var/datum/reagent/consumable/C in M.reagents.reagent_list) //we add the nutrition value of what we're currently digesting
|
||||
// fullness += C.nutriment_factor * C.volume / C.metabolization_rate
|
||||
//GS13 Edit
|
||||
@@ -137,6 +137,8 @@ All foods are distributed among various categories. Use common sense.
|
||||
else if(fullness > (FULLNESS_LEVEL_BEEG * (1 + M.overeatduration / 2000))) // The more you eat - the more you can eat
|
||||
user.visible_message("<span class='warning'>[user] cannot force any more of \the [src] to go down [user.p_their()] throat!</span>", "<span class='danger'>You cannot force any more of \the [src] to go down your throat!</span>")
|
||||
return FALSE
|
||||
if(HAS_TRAIT(M, TRAIT_VORACIOUS))
|
||||
M.SetNextAction(CLICK_CD_MELEE * 0.5) //nom nom nom
|
||||
else
|
||||
if(!isbrain(M)) //If you're feeding it to someone else.
|
||||
if(fullness <= (FULLNESS_LEVEL_BEEG * (1 + M.overeatduration / 1000)))
|
||||
@@ -164,6 +166,7 @@ All foods are distributed among various categories. Use common sense.
|
||||
var/bitevolume = 1
|
||||
if(HAS_TRAIT(M, TRAIT_VORACIOUS))
|
||||
bitevolume = bitevolume * 0.67
|
||||
human_eater.fullness += bitevolume;
|
||||
if(istype(human_eater))
|
||||
human_eater.fullness += bitevolume;
|
||||
|
||||
|
||||
@@ -393,11 +393,11 @@
|
||||
//GS13 EDIT FAT EXAMINE
|
||||
switch(fullness)
|
||||
if(FULLNESS_LEVEL_BLOATED to FULLNESS_LEVEL_BEEG)
|
||||
. += "[t_He] look[p_s()] like [t_He] ate a bit too much.\n"
|
||||
. += span_warning("[t_He] look[p_s()] like [t_He] ate a bit too much.\n")
|
||||
if(FULLNESS_LEVEL_BEEG to FULLNESS_LEVEL_NOMOREPLZ)
|
||||
. += "[t_His] stomach looks very round and very full.\n"
|
||||
. += span_warning("[t_His] stomach looks very round and very full.\n")
|
||||
if(FULLNESS_LEVEL_NOMOREPLZ to INFINITY)
|
||||
. += "[t_His] stomach has been stretched to enormous proportions.\n"
|
||||
. += span_boldwarning("[t_His] stomach has been stretched to enormous proportions.\n")
|
||||
|
||||
if(nutrition < NUTRITION_LEVEL_STARVING - 50)
|
||||
. += "[t_He] [t_is] severely malnourished.\n"
|
||||
|
||||
@@ -1608,8 +1608,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
H.remove_movespeed_modifier(/datum/movespeed_modifier/hunger)
|
||||
|
||||
switch(H.nutrition)
|
||||
if(NUTRITION_LEVEL_FULL to INFINITY)
|
||||
H.throw_alert("nutrition", /atom/movable/screen/alert/fat)
|
||||
//if(NUTRITION_LEVEL_FULL to INFINITY)
|
||||
// H.throw_alert("nutrition", /atom/movable/screen/alert/fat)
|
||||
if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FULL)
|
||||
H.clear_alert("nutrition")
|
||||
if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
|
||||
@@ -1617,6 +1617,22 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(0 to NUTRITION_LEVEL_STARVING)
|
||||
H.throw_alert("nutrition", /atom/movable/screen/alert/starving)
|
||||
|
||||
//GS13 Port - Add back the fullness Alerts
|
||||
switch(H.fullness)
|
||||
if(0 to FULLNESS_LEVEL_BLOATED)
|
||||
H.clear_alert("fullness")
|
||||
if(FULLNESS_LEVEL_BLOATED to FULLNESS_LEVEL_BEEG)
|
||||
H.throw_alert("fullness", /atom/movable/screen/alert/gs13/bloated)
|
||||
if(FULLNESS_LEVEL_BEEG to FULLNESS_LEVEL_NOMOREPLZ)
|
||||
H.throw_alert("fullness", /atom/movable/screen/alert/gs13/stuffed)
|
||||
if(FULLNESS_LEVEL_NOMOREPLZ to INFINITY)
|
||||
H.throw_alert("fullness", /atom/movable/screen/alert/gs13/beegbelly)
|
||||
|
||||
//GS13 - Update here for changing belly to match stuffed-ness
|
||||
var/obj/item/organ/genital/belly/B= H.getorganslot("belly")
|
||||
if(!isnull(B) && istype(B))
|
||||
B.update()
|
||||
|
||||
//GS13 EDIT
|
||||
switch(H.fatness)
|
||||
if(FATNESS_LEVEL_BLOB to INFINITY)
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
var/dizziness = 0//Carbon
|
||||
var/jitteriness = 0//Carbon
|
||||
var/nutrition = NUTRITION_LEVEL_START_MIN // randomised in Initialize
|
||||
var/thirst = THIRST_LEVEL_START_MIN //same for this
|
||||
var/satiety = 0//Carbon
|
||||
|
||||
var/overeatduration = 0 // How long this guy is overeating //Carbon
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
Reference in New Issue
Block a user