mirror of
https://github.com/Sandstorm-Station/Sandstorm-Station-13.git
synced 2026-08-25 14:17:32 +01:00
size peeking, both standing on table, message
This commit is contained in:
@@ -14,3 +14,15 @@
|
||||
return has_dna.features["body_size"]
|
||||
else
|
||||
return target.size_multiplier
|
||||
|
||||
/*
|
||||
* # COMPARE_SIZES(mob/living/user, mob/living/target)
|
||||
* Returns how bigger or smaller the target is in comparison to user
|
||||
* Example:
|
||||
* - user = 2, target = 1, result = 0.5
|
||||
* - user = 1, target = 2, result = 2
|
||||
* Args:
|
||||
* - user = /mob/living
|
||||
* - target = /mob/living
|
||||
*/
|
||||
#define COMPARE_SIZES(user, target) abs((get_size(user) / get_size(target)))
|
||||
|
||||
@@ -29,12 +29,17 @@
|
||||
// And are you under us while we're standing up?
|
||||
if(!(CHECK_BITFIELD(living_peeker.mobility_flags, MOBILITY_STAND)) && (CHECK_BITFIELD(peeked.mobility_flags, MOBILITY_STAND)) && (peeked.loc == living_peeker.loc))
|
||||
return TRUE
|
||||
// Do you happen to be small enough to easily look under us?
|
||||
if(COMPARE_SIZES(peeked, peeker) >= 2)
|
||||
return TRUE
|
||||
// Or are you nearby and we are up high
|
||||
// to-do SOMEONE PLEASE PORT /datum/element/climbable
|
||||
var/obj/structure/high_ground = locate(/obj/structure) in get_turf(peeked)
|
||||
if(high_ground && high_ground.climbable && CHECK_BITFIELD(peeked.mobility_flags, MOBILITY_STAND) && \
|
||||
peeked.Adjacent(peeker))
|
||||
return TRUE
|
||||
var/obj/structure/high_ground_peeked = locate(/obj/structure) in get_turf(peeked)
|
||||
var/obj/structure/high_ground_peeker = locate(/obj/structure) in get_turf(peeker)
|
||||
if(high_ground_peeked && high_ground_peeked.climbable && CHECK_BITFIELD(peeked.mobility_flags, MOBILITY_STAND) && peeked.Adjacent(peeker))
|
||||
// Funnily enough, if we're at the same height, they can't just peek under us!
|
||||
if(!(high_ground_peeker && high_ground_peeker.climbable))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/element/skirt_peeking/proc/on_examine(mob/living/carbon/human/peeked, mob/peeker, list/examine_list)
|
||||
@@ -99,3 +104,22 @@
|
||||
string += " on full display."
|
||||
|
||||
examine_content += span_purple(string)
|
||||
// Let's see if we caught them, addtimer so it appears after the peek.
|
||||
addtimer(CALLBACK(src, .proc/try_notice, peeked, peeker), 1)
|
||||
|
||||
/// Alright, they've peeked us and everything, did we notice it though?
|
||||
/datum/element/skirt_peeking/proc/try_notice(mob/living/carbon/human/peeked, mob/living/peeker)
|
||||
if(!peeked || !peeker)
|
||||
return
|
||||
if(!istype(peeked) || !istype(peeker))
|
||||
return
|
||||
var/obj/item/clothing/under/worn_uniform = peeked.get_item_by_slot(ITEM_SLOT_ICLOTHING)
|
||||
if(!istype(worn_uniform))
|
||||
return
|
||||
var/obj/item/clothing/glasses/eye_blocker = peeker.get_item_by_slot(ITEM_SLOT_EYES)
|
||||
if(!(!peeked.client && (peeked.stat == CONSCIOUS) && !HAS_TRAIT(peeked, TRAIT_BLIND) && !is_blind(peeked) && \
|
||||
!peeker.is_eyes_covered(FALSE) && !(eye_blocker && eye_blocker.tint > 0) && \
|
||||
!(peeker.invisibility > peeked.invisibility) && !(peeker.alpha <= 30)))
|
||||
return
|
||||
to_chat(peeked, span_warning("You notice [peeker] looking under your [worn_uniform.name]!"))
|
||||
to_chat(peeker, span_warning("[peeked] notices you peeking under [peeked.p_their()] [worn_uniform.name]!"))
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
return TRUE
|
||||
|
||||
//Doing messages
|
||||
if(abs(get_size(user)/get_size(target) >= 2)) //if the initiator is twice the size of the micro
|
||||
if(COMPARE_SIZES(user, target) >= 2) //if the initiator is twice the size of the micro
|
||||
now_pushing = 0
|
||||
user.forceMove(target.loc)
|
||||
|
||||
//Smaller person being stepped on
|
||||
if(get_size(user) > get_size(target) && iscarbon(src))
|
||||
if(iscarbon(src))
|
||||
if(istype(user) && user.dna.features["taur"] == "Naga" || user.dna.features["taur"] == "Tentacle")
|
||||
target.visible_message(span_notice("[src] carefully slithers around [target]."), span_notice("[src]'s huge tail slithers besides you."))
|
||||
else
|
||||
@@ -32,7 +32,7 @@
|
||||
return TRUE
|
||||
|
||||
//Smaller person stepping under a larger person
|
||||
if(abs(get_size(target)/get_size(user)) >= 2)
|
||||
if(COMPARE_SIZES(target, user) >= 2)
|
||||
user.forceMove(target.loc)
|
||||
now_pushing = 0
|
||||
micro_step_under(target)
|
||||
@@ -59,7 +59,7 @@
|
||||
user.forceMove(target.loc)
|
||||
return TRUE
|
||||
|
||||
if(abs(get_size(user)/get_size(target)) >= 2)
|
||||
if(COMPARE_SIZES(user, target) >= 2)
|
||||
log_combat(user, target, "stepped on", addition="[user.a_intent] trample")
|
||||
if(user.a_intent == "disarm" && CHECK_MOBILITY(user, MOBILITY_MOVE) && !user.buckled)
|
||||
now_pushing = 0
|
||||
@@ -67,7 +67,7 @@
|
||||
user.sizediffStamLoss(target)
|
||||
user.add_movespeed_modifier(/datum/movespeed_modifier/stomp, TRUE) //Full stop
|
||||
addtimer(CALLBACK(user, /mob/.proc/remove_movespeed_modifier, MOVESPEED_ID_STOMP, TRUE), 3) //0.3 seconds
|
||||
if(get_size(user) > get_size(target) && iscarbon(user))
|
||||
if(iscarbon(user))
|
||||
if(istype(user) && user.dna.features["taur"] == "Naga" || user.dna.features["taur"] == "Tentacle")
|
||||
target.visible_message(span_danger("[src] carefully rolls their tail over [target]!"), span_danger("[src]'s huge tail rolls over you!"))
|
||||
else
|
||||
@@ -83,7 +83,7 @@
|
||||
user.add_movespeed_modifier(/datum/movespeed_modifier/stomp, TRUE)
|
||||
addtimer(CALLBACK(user, /mob/.proc/remove_movespeed_modifier, MOVESPEED_ID_STOMP, TRUE), 10) //1 second
|
||||
//user.Stun(20)
|
||||
if(get_size(user) > get_size(target) && iscarbon(user))
|
||||
if(iscarbon(user))
|
||||
if(istype(user) && (user.dna.features["taur"] == "Naga" || user.dna.features["taur"] == "Tentacle"))
|
||||
target.visible_message(span_danger("[src] mows down [target] under their tail!"), span_userdanger("[src] plows their tail over you mercilessly!"))
|
||||
else
|
||||
@@ -97,7 +97,7 @@
|
||||
user.sizediffStun(target)
|
||||
user.add_movespeed_modifier(/datum/movespeed_modifier/stomp, TRUE)
|
||||
addtimer(CALLBACK(user, /mob/.proc/remove_movespeed_modifier, MOVESPEED_ID_STOMP, TRUE), 7)//About 3/4th a second
|
||||
if(get_size(user) > get_size(target) && iscarbon(user))
|
||||
if(iscarbon(user))
|
||||
var/feetCover = (user.wear_suit && (user.wear_suit.body_parts_covered & FEET)) || (user.w_uniform && (user.w_uniform.body_parts_covered & FEET) || (user.shoes && (user.shoes.body_parts_covered & FEET)))
|
||||
if(feetCover)
|
||||
if(user?.dna?.features["taur"] == "Naga" || user?.dna?.features["taur"] == "Tentacle")
|
||||
@@ -116,7 +116,7 @@
|
||||
SEND_SIGNAL(target, COMSIG_MICRO_PICKUP_FEET, user)
|
||||
return TRUE
|
||||
|
||||
if(abs(get_size(target)/get_size(user)) >= 2)
|
||||
if(COMPARE_SIZES(target, user) >= 2)
|
||||
user.forceMove(target.loc)
|
||||
now_pushing = 0
|
||||
micro_step_under(target)
|
||||
@@ -141,17 +141,17 @@
|
||||
|
||||
//Proc for scaling stamina damage on size difference
|
||||
/mob/living/carbon/proc/sizediffStamLoss(mob/living/carbon/target)
|
||||
var/S = (get_size(src)/get_size(target)*25) //macro divided by micro, times 25
|
||||
var/S = COMPARE_SIZES(src, target) * 25 //macro divided by micro, times 25
|
||||
target.Knockdown(S) //final result in stamina knockdown
|
||||
|
||||
//Proc for scaling stuns on size difference (for grab intent)
|
||||
/mob/living/carbon/proc/sizediffStun(mob/living/carbon/target)
|
||||
var/T = (get_size(src)/get_size(target)*2) //Macro divided by micro, times 2
|
||||
var/T = COMPARE_SIZES(src, target) * 2 //Macro divided by micro, times 2
|
||||
target.Stun(T)
|
||||
|
||||
//Proc for scaling brute damage on size difference
|
||||
/mob/living/carbon/proc/sizediffBruteloss(mob/living/carbon/target)
|
||||
var/B = (get_size(src)/get_size(target)*3) //macro divided by micro, times 3
|
||||
var/B = COMPARE_SIZES(src, target) * 3 //macro divided by micro, times 3
|
||||
target.adjustBruteLoss(B) //final result in brute loss
|
||||
|
||||
//Proc for instantly grabbing valid size difference. Code optimizations soon(TM)
|
||||
|
||||
@@ -3694,6 +3694,7 @@
|
||||
#include "code\modules\tgui\states\human_adjacent.dm"
|
||||
#include "code\modules\tgui\states\inventory.dm"
|
||||
#include "code\modules\tgui\states\language_menu.dm"
|
||||
#include "code\modules\tgui\states\never.dm"
|
||||
#include "code\modules\tgui\states\new_player.dm"
|
||||
#include "code\modules\tgui\states\not_incapacitated.dm"
|
||||
#include "code\modules\tgui\states\notcontained.dm"
|
||||
|
||||
Reference in New Issue
Block a user