mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
optimized some copypasted code (#285)
* less copypaste = good * fix * Update lewd_definitions.dm oops
This commit is contained in:
@@ -125,12 +125,12 @@ GLOBAL_VAR_INIT(miscreants_allowed, FALSE)
|
|||||||
if(getorganslot(ORGAN_SLOT_BREASTS))
|
if(getorganslot(ORGAN_SLOT_BREASTS))
|
||||||
return TRUE
|
return TRUE
|
||||||
return FALSE
|
return FALSE
|
||||||
*/
|
|
||||||
|
|
||||||
/mob/living/carbon/proc/has_butt()
|
/mob/living/carbon/proc/has_butt()
|
||||||
if(getorganslot(ORGAN_SLOT_BUTT))
|
if(getorganslot(ORGAN_SLOT_BUTT))
|
||||||
return TRUE
|
return TRUE
|
||||||
return FALSE
|
return FALSE
|
||||||
|
*/
|
||||||
|
|
||||||
/mob/living/carbon/proc/is_groin_exposed(list/L)
|
/mob/living/carbon/proc/is_groin_exposed(list/L)
|
||||||
if(!L)
|
if(!L)
|
||||||
|
|||||||
@@ -18,8 +18,10 @@
|
|||||||
|
|
||||||
/mob/living
|
/mob/living
|
||||||
var/has_penis = FALSE
|
var/has_penis = FALSE
|
||||||
|
var/has_balls = FALSE
|
||||||
var/has_vagina = FALSE
|
var/has_vagina = FALSE
|
||||||
var/has_anus = TRUE
|
var/has_anus = TRUE
|
||||||
|
var/has_butt = FALSE
|
||||||
var/anus_always_accessible = FALSE
|
var/anus_always_accessible = FALSE
|
||||||
var/has_breasts = FALSE
|
var/has_breasts = FALSE
|
||||||
var/anus_exposed = FALSE
|
var/anus_exposed = FALSE
|
||||||
@@ -87,99 +89,45 @@
|
|||||||
/mob/living/proc/toggle_anus_always_accessible()
|
/mob/living/proc/toggle_anus_always_accessible()
|
||||||
anus_always_accessible = !anus_always_accessible
|
anus_always_accessible = !anus_always_accessible
|
||||||
|
|
||||||
/mob/living/proc/has_penis(visibility = REQUIRE_ANY)
|
/mob/living/proc/has_genital(slot, visibility = REQUIRE_ANY)
|
||||||
var/mob/living/carbon/C = src
|
var/mob/living/carbon/C = src
|
||||||
if(has_penis && !istype(C))
|
|
||||||
return TRUE
|
|
||||||
if(istype(C))
|
if(istype(C))
|
||||||
var/obj/item/organ/genital/peepee = C.getorganslot(ORGAN_SLOT_PENIS)
|
var/obj/item/organ/genital/genital = C.getorganslot(slot)
|
||||||
if(peepee)
|
if(genital)
|
||||||
switch(visibility)
|
switch(visibility)
|
||||||
if(REQUIRE_ANY)
|
if(REQUIRE_ANY)
|
||||||
return TRUE
|
return TRUE
|
||||||
if(REQUIRE_EXPOSED)
|
if(REQUIRE_EXPOSED)
|
||||||
if(peepee.is_exposed() || peepee.always_accessible)
|
return genital.is_exposed() || genital.always_accessible
|
||||||
return TRUE
|
|
||||||
else
|
|
||||||
return FALSE
|
|
||||||
if(REQUIRE_UNEXPOSED)
|
if(REQUIRE_UNEXPOSED)
|
||||||
if(!peepee.is_exposed())
|
return !genital.is_exposed()
|
||||||
return TRUE
|
|
||||||
else
|
|
||||||
return FALSE
|
|
||||||
else
|
else
|
||||||
return TRUE
|
return TRUE
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
|
/mob/living/proc/has_penis(visibility = REQUIRE_ANY)
|
||||||
|
var/mob/living/carbon/C = src
|
||||||
|
if(has_penis && !istype(C))
|
||||||
|
return TRUE
|
||||||
|
return has_genital(ORGAN_SLOT_PENIS, visibility)
|
||||||
|
|
||||||
/mob/living/proc/has_balls(visibility = REQUIRE_ANY)
|
/mob/living/proc/has_balls(visibility = REQUIRE_ANY)
|
||||||
var/mob/living/carbon/C = src
|
var/mob/living/carbon/C = src
|
||||||
if(istype(C))
|
if(has_balls && !istype(C))
|
||||||
var/obj/item/organ/genital/peepee = C.getorganslot(ORGAN_SLOT_TESTICLES)
|
return TRUE
|
||||||
if(peepee)
|
return has_genital(ORGAN_SLOT_TESTICLES, visibility)
|
||||||
switch(visibility)
|
|
||||||
if(REQUIRE_ANY)
|
|
||||||
return TRUE
|
|
||||||
if(REQUIRE_EXPOSED)
|
|
||||||
if(peepee.is_exposed() || peepee.always_accessible)
|
|
||||||
return TRUE
|
|
||||||
else
|
|
||||||
return FALSE
|
|
||||||
if(REQUIRE_UNEXPOSED)
|
|
||||||
if(!peepee.is_exposed())
|
|
||||||
return TRUE
|
|
||||||
else
|
|
||||||
return FALSE
|
|
||||||
else
|
|
||||||
return TRUE
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
/mob/living/proc/has_vagina(visibility = REQUIRE_ANY)
|
/mob/living/proc/has_vagina(visibility = REQUIRE_ANY)
|
||||||
var/mob/living/carbon/C = src
|
var/mob/living/carbon/C = src
|
||||||
if(has_vagina && !istype(C))
|
if(has_vagina && !istype(C))
|
||||||
return TRUE
|
return TRUE
|
||||||
if(istype(C))
|
return has_genital(ORGAN_SLOT_VAGINA, visibility)
|
||||||
var/obj/item/organ/genital/peepee = C.getorganslot(ORGAN_SLOT_VAGINA)
|
|
||||||
if(peepee)
|
|
||||||
switch(visibility)
|
|
||||||
if(REQUIRE_ANY)
|
|
||||||
return TRUE
|
|
||||||
if(REQUIRE_EXPOSED)
|
|
||||||
if(peepee.is_exposed() || peepee.always_accessible)
|
|
||||||
return TRUE
|
|
||||||
else
|
|
||||||
return FALSE
|
|
||||||
if(REQUIRE_UNEXPOSED)
|
|
||||||
if(!peepee.is_exposed())
|
|
||||||
return TRUE
|
|
||||||
else
|
|
||||||
return FALSE
|
|
||||||
else
|
|
||||||
return TRUE
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
/mob/living/proc/has_breasts(visibility = REQUIRE_ANY)
|
/mob/living/proc/has_breasts(visibility = REQUIRE_ANY)
|
||||||
var/mob/living/carbon/C = src
|
var/mob/living/carbon/C = src
|
||||||
if(has_breasts && !istype(C))
|
if(has_breasts && !istype(C))
|
||||||
return TRUE
|
return TRUE
|
||||||
if(istype(C))
|
return has_genital(ORGAN_SLOT_BREASTS, visibility)
|
||||||
var/obj/item/organ/genital/peepee = C.getorganslot(ORGAN_SLOT_BREASTS)
|
|
||||||
if(peepee)
|
|
||||||
switch(visibility)
|
|
||||||
if(REQUIRE_ANY)
|
|
||||||
return TRUE
|
|
||||||
if(REQUIRE_EXPOSED)
|
|
||||||
if(peepee.is_exposed() || peepee.always_accessible)
|
|
||||||
return TRUE
|
|
||||||
else
|
|
||||||
return FALSE
|
|
||||||
if(REQUIRE_UNEXPOSED)
|
|
||||||
if(!peepee.is_exposed())
|
|
||||||
return TRUE
|
|
||||||
else
|
|
||||||
return FALSE
|
|
||||||
else
|
|
||||||
return TRUE
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
/mob/living/proc/has_anus(visibility = REQUIRE_ANY)
|
/mob/living/proc/has_anus(visibility = REQUIRE_ANY)
|
||||||
if(has_anus && !iscarbon(src))
|
if(has_anus && !iscarbon(src))
|
||||||
@@ -369,6 +317,12 @@
|
|||||||
return TRUE
|
return TRUE
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
|
/mob/living/proc/has_butt(visibility = REQUIRE_ANY)
|
||||||
|
var/mob/living/carbon/C = src
|
||||||
|
if(has_butt && !istype(C))
|
||||||
|
return TRUE
|
||||||
|
return has_genital(ORGAN_SLOT_BUTT, visibility)
|
||||||
|
|
||||||
///Are we wearing something that covers our chest?
|
///Are we wearing something that covers our chest?
|
||||||
/mob/living/proc/is_topless()
|
/mob/living/proc/is_topless()
|
||||||
for(var/slot in GLOB.slots)
|
for(var/slot in GLOB.slots)
|
||||||
|
|||||||
Reference in New Issue
Block a user