fixed belly (and butt) sizes

before, it was impossible to select a size of 0 for either bellies or butts, and all the belly sizes rendered one size smaller. this fixes that - all sizes are accurate and you can choose 0 for both belly and butt. also makes belly back sprite show up as right color
This commit is contained in:
sarcoph
2022-05-02 20:04:29 -08:00
parent 556d560aed
commit 027632ffd1
10 changed files with 78 additions and 60 deletions
@@ -211,13 +211,7 @@
return
if(href_list["shrink_belly"])
var/obj/item/organ/genital/belly/E = usr.getorganslot("belly")
if(E.size > 0)
to_chat(usr, "<span class='userlove'>You feel your belly diminish.</span>")
E.size -= 1
H.update_genitals()
else
to_chat(usr, "<span class='warning'>Your belly is already at the minimum size! </span>")
H.shrink_belly(1)
if(href_list["removecondom"])
H.menuremovecondom()
@@ -0,0 +1,35 @@
/mob/living/carbon/proc/expand_belly(expansion = 1)
var/obj/item/organ/genital/belly/_belly = getorganslot("belly")
if(!expansion || !_belly || !_belly.inflatable)
return
var/original_size = _belly.size
_belly.size = clamp(_belly.size + expansion, BELLY_MIN_SIZE, BELLY_MAX_SIZE)
if(_belly.size == original_size)
return
var/_verb = "expand"
switch(_belly.size)
if(BELLY_MAX_SIZE to INFINITY)
_verb = "stretch to its limit"
if(BELLY_STRETCH_SIZE to BELLY_MAX_SIZE)
_verb = "stretch"
if(BELLY_STRAIN_SIZE to BELLY_STRETCH_SIZE)
_verb = "strain"
to_chat(src, "<span class='userlove'>You feel your belly [_verb].</span>")
_belly.update()
/mob/living/carbon/proc/shrink_belly(shrinkage = 1)
var/obj/item/organ/genital/belly/_belly = getorganslot("belly")
if(!shrinkage ||!_belly || !_belly.inflatable)
return
var/original_size = _belly.size
_belly.size = clamp(_belly.size - shrinkage, BELLY_MIN_SIZE, BELLY_MAX_SIZE)
if(_belly.size == original_size)
return
var/_verb = "diminish"
var/_class = "userlove"
if(_belly.size == BELLY_MIN_SIZE)
_verb = "can't shrink anymore"
_class = "warning"
to_chat(src, "<span class='[_class]'>You feel your belly [_verb].</span>")
_belly.update()