Skip to content

Commit

Permalink
The list and actual peeking
Browse files Browse the repository at this point in the history
  • Loading branch information
Majkl-J committed Sep 16, 2024
1 parent 570a45a commit 236f821
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 5 deletions.
104 changes: 104 additions & 0 deletions modular_zzplurt/code/_globalvars/lists/global_lewd.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,107 @@ GLOBAL_LIST_INIT(brap_noises, list(
'modular_zzplurt/sound/voice/farts/fart8.ogg'
))

GLOBAL_LIST_INIT(skirt_peekable, typecacheof(list(
// Everyone's jumpskirts
/obj/item/clothing/under/color/jumpskirt,
/obj/item/clothing/under/costume/buttondown/skirt,
/obj/item/clothing/under/dress,
/obj/item/clothing/under/suit/white/skirt,
/obj/item/clothing/under/suit/black_really/skirt,
/obj/item/clothing/under/syndicate/skirt,
/obj/item/clothing/under/syndicate/tacticool/skirt,
/obj/item/clothing/accessory/skilt,
/obj/item/clothing/under/rank/civilian/curator/skirt,

/* Centcom */
/obj/item/clothing/under/rank/centcom/officer_skirt,
/obj/item/clothing/under/rank/centcom/centcom_skirt,

/* Heads */
// Captain
/obj/item/clothing/under/rank/captain/skirt,
/obj/item/clothing/under/rank/captain/suit/skirt,


/* Service */
// Head of Personnel
/obj/item/clothing/under/rank/civilian/head_of_personnel/skirt,
/obj/item/clothing/under/rank/civilian/head_of_personnel/suit/skirt,
// Chaplain
/obj/item/clothing/under/rank/civilian/chaplain/skirt,

// Botanist
/obj/item/clothing/under/rank/civilian/hydroponics/skirt,

// Janitor
/obj/item/clothing/under/rank/civilian/janitor/skirt,
// Lawyer
/obj/item/clothing/under/rank/civilian/lawyer/black/skirt,
/obj/item/clothing/under/rank/civilian/lawyer/beige/skirt,
/obj/item/clothing/under/rank/civilian/lawyer/red/skirt,
/obj/item/clothing/under/rank/civilian/lawyer/blue/skirt,
/obj/item/clothing/under/rank/civilian/lawyer/bluesuit/skirt,
/obj/item/clothing/under/rank/civilian/lawyer/purpsuit/skirt,
/obj/item/clothing/under/rank/civilian/lawyer/galaxy/skirt,
/obj/item/clothing/under/rank/civilian/lawyer/galaxy/red/skirt,
// Clown and Mime
/obj/item/clothing/under/rank/civilian/mime/skirt,
/* Security */
// Head of Security
/obj/item/clothing/under/rank/security/head_of_security/skirt,
/obj/item/clothing/under/rank/security/head_of_security/alt/skirt,
// Warden
/obj/item/clothing/under/rank/security/warden/skirt,
// Secoff
/obj/item/clothing/under/rank/security/officer/skirt,
// Detective
/obj/item/clothing/under/rank/security/detective/skirt,
/obj/item/clothing/under/rank/security/detective/noir/skirt,
// Prisoner
/obj/item/clothing/under/rank/prisoner/skirt,


/* Science */
// Research director
/obj/item/clothing/under/rank/rnd/research_director/skirt,
/obj/item/clothing/under/rank/rnd/research_director/alt/skirt,
/obj/item/clothing/under/rank/rnd/research_director/turtleneck/skirt,
// Scientist
/obj/item/clothing/under/rank/rnd/scientist/skirt,
// Roboticist
/obj/item/clothing/under/rank/rnd/roboticist/skirt,
// Geneticist
/obj/item/clothing/under/rank/rnd/geneticist/skirt,


/* Engineering */
// Chief Engineer
/obj/item/clothing/under/rank/engineering/chief_engineer/skirt,
/obj/item/clothing/under/rank/engineering/chief_engineer/turtleneck/skirt,
// Engineer
/obj/item/clothing/under/rank/engineering/engineer/skirt,
// Atmos tech
/obj/item/clothing/under/rank/engineering/atmospheric_technician/skirt,


/* Medical */
// Chief Medical Officer
/obj/item/clothing/under/rank/medical/chief_medical_officer/skirt,
/obj/item/clothing/under/rank/medical/chief_medical_officer/turtleneck/skirt,
// Medical doctor
/obj/item/clothing/under/rank/medical/doctor/skirt,
/obj/item/clothing/under/rank/medical/virologist/skirt,
// Coroner
/obj/item/clothing/under/rank/medical/coroner/skirt,
// Paramedic
/obj/item/clothing/under/rank/medical/paramedic/skirt,
// Chemist
/obj/item/clothing/under/rank/medical/chemist/skirt,


/* Cargo */
// Quartermaster
/obj/item/clothing/under/rank/cargo/qm/skirt,
// Everyone else
/obj/item/clothing/under/rank/cargo/tech/skirt,
)))
17 changes: 12 additions & 5 deletions modular_zzplurt/code/datums/elements/skirt_peeking.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
UnregisterSignal(peeked, list(COMSIG_ATOM_EXAMINE, COMSIG_ATOM_EXAMINE_MORE))

/datum/element/skirt_peeking/proc/can_skirt_peek(mob/living/carbon/human/peeked, mob/peeker)
if(peeked == peeker)
return FALSE

var/mob/living/living_peeker = peeker
var/obj/item/clothing/under/worn_uniform = peeked.get_item_by_slot(ITEM_SLOT_ICLOTHING)
var/obj/item/clothing/suit/outer_clothing = peeked.get_item_by_slot(ITEM_SLOT_OCLOTHING)
Expand All @@ -23,12 +26,12 @@
return FALSE

// We are now peeking under a uniform
if(worn_uniform /*TODO - peekability && is_type_in_typecache(worn_uniform.type, GLOB.skirt_peekable)*/)
if(worn_uniform && (is_type_in_typecache(worn_uniform.type, GLOB.skirt_peekable) || worn_uniform.female_sprite_flags & FEMALE_UNIFORM_TOP_ONLY)) // FEMALE_UNIFORM_TOP_ONLY fallback incase something is missed
if(isobserver(peeker))
return TRUE
if(istype(living_peeker) && (living_peeker != peeked))
if(istype(living_peeker))
// Is the peeker not standing and the peeked not laying down
if((get_turf(peeked) == get_turf(living_peeker)) && !(living_peeker.mobility_flags & MOBILITY_STAND) && (peeked.mobility_flags & MOBILITY_STAND))
if((living_peeker.loc == peeked.loc) && (living_peeker.resting && !peeked.resting))
return TRUE

// Or are you nearby and we are up high
Expand All @@ -47,8 +50,12 @@

/datum/element/skirt_peeking/proc/on_closer_look(mob/living/carbon/human/peeked, mob/peeker, list/examine_content)
if(can_skirt_peek(peeked, peeker))
//TODO: Shove the skyrat examines here
// Let's see if we caught them, addtimer so it appears after the peek.
for(var/obj/item/organ/external/genital/genital in peeked.organs)
if(genital.zone != BODY_ZONE_PRECISE_GROIN)
continue
if(genital.visibility_preference = GENITAL_SKIP_VISIBILITY)

Check failure on line 56 in modular_zzplurt/code/datums/elements/skirt_peeking.dm

View workflow job for this annotation

GitHub Actions / Run Linters

if condition is always false
continue
examine_content += genital.get_description_string()
addtimer(CALLBACK(src, PROC_REF(try_notice), peeked, peeker), 1)

/// Alright, they've peeked us and everything, did we notice it though?
Expand Down

0 comments on commit 236f821

Please sign in to comment.