Moves some files around and adds interactions to mob holders

woo
This commit is contained in:
Dahlular
2020-04-19 21:34:21 -06:00
parent 55e9c69df0
commit ffc31b6fae
7 changed files with 212 additions and 64 deletions
+50 -47
View File
@@ -22,6 +22,7 @@ var/const/RESIZE_A_TINYMICRO = (RESIZE_TINY + RESIZE_MICRO) / 2
M.Scale(size_multiplier)
M.Translate(0, 16*(size_multiplier-1)) //translate by 16 * size_multiplier - 1 on Y axis
src.transform = M //the source of transform is M
src.update_mobsize() //Doesn't work yet
/mob/proc/get_effective_size()
return 100000
@@ -38,34 +39,36 @@ mob/living/get_effective_size()
//handle the big steppy, except nice
/mob/living/proc/handle_micro_bump_helping(var/mob/living/tmob)
if(ishuman(src))
var/mob/living/carbon/human/H = src
//Both small.
if(src.get_effective_size() <= RESIZE_A_SMALLTINY && tmob.get_effective_size() <= RESIZE_A_SMALLTINY)
now_pushing = 0
src.forceMove(tmob.loc)
return 1
//Doing messages
if(abs(get_effective_size()/tmob.get_effective_size()) >= 2) //if the initiator is twice the size of the micro
now_pushing = 0
src.forceMove(tmob.loc)
//Smaller person being stepped on
if(get_effective_size() > tmob.get_effective_size() && iscarbon(src))
if(istype(tmob) && istype(tmob, /datum/sprite_accessory/taur/naga))
to_chat(src,"<span class='notice'>You carefully slither around [tmob].</span>")
to_chat(tmob,"<span class='notice'>[src]'s huge tail slithers beside you!</span>")
else
to_chat(src,"<span class='notice'>You carefully step over [tmob].</span>")
to_chat(tmob,"<span class='notice'>[src] steps over you carefully!</span>")
//Both small.
if(H.get_effective_size() <= RESIZE_A_SMALLTINY && tmob.get_effective_size() <= RESIZE_A_SMALLTINY)
now_pushing = 0
H.forceMove(tmob.loc)
return 1
//Smaller person stepping under a larger person
if(tmob.get_effective_size() > get_effective_size())
micro_step_under(tmob)
src.forceMove(tmob.loc)
now_pushing = 0
return 1
//Doing messages
if(abs(get_effective_size()/tmob.get_effective_size()) >= 2) //if the initiator is twice the size of the micro
now_pushing = 0
H.forceMove(tmob.loc)
//Smaller person being stepped on
if(get_effective_size() > tmob.get_effective_size() && iscarbon(src))
if(istype(H) && H.dna.features["taur"] == "Naga" || H.dna.features["taur"] == "Tentacle")
to_chat(H,"<span class='notice'>You carefully slither around [tmob].</span>")
to_chat(tmob,"<span class='notice'>[H]'s huge tail slithers beside you!</span>")
else
to_chat(H,"<span class='notice'>You carefully step over [tmob].</span>")
to_chat(tmob,"<span class='notice'>[H] steps over you carefully!</span>")
return 1
//Smaller person stepping under a larger person
if(tmob.get_effective_size() > get_effective_size())
H.forceMove(tmob.loc)
now_pushing = 0
micro_step_under(tmob)
return 1
//Stepping on disarm intent -- TO DO, OPTIMIZE ALL OF THIS SHIT
/mob/living/proc/handle_micro_bump_other(var/mob/living/tmob)
@@ -83,72 +86,63 @@ mob/living/get_effective_size()
if(H.a_intent == "disarm" && H.canmove && !H.buckled)
now_pushing = 0
H.forceMove(tmob.loc)
sizediffStamLoss(tmob)
if(get_effective_size() > tmob.get_effective_size() && iscarbon(H))
if(istype(tmob) && istype(tmob, /datum/sprite_accessory/taur/naga))
if(istype(H) && H.dna.features["taur"] == "Naga" || H.dna.features["taur"] == "Tentacle")
to_chat(H,"<span class='danger'>You carefully roll over [tmob] with your tail!</span>")
to_chat(tmob,"<span class='danger'>[H]'s huge tail rolls over you!</span>")
sizediffStamLoss(tmob)
else
to_chat(H,"<span class='danger'>You painfully but harmlessly step on [tmob]!<span>")
to_chat(tmob,"<span class='danger'>[H] steps onto you with force!</span>")
sizediffStamLoss(tmob)
return 1
if(H.a_intent == "harm" && H.canmove && !H.buckled)
now_pushing = 0
H.forceMove(tmob.loc)
sizediffStamLoss(tmob)
sizediffBruteloss(tmob)
if(get_effective_size() > tmob.get_effective_size() && iscarbon(H))
if(istype(tmob) && istype(tmob, /datum/sprite_accessory/taur/naga))
if(istype(H) && H.dna.features["taur"] == "Naga" || H.dna.features["taur"] == "Tentacle")
to_chat(H,"<span class='danger'>You grind [tmob] into the floor with your tail!</span>")
to_chat(tmob,"<span class='danger'>[H]'s massive tail plows you into the floor!</span>")
sizediffStamLoss(tmob)
sizediffBruteloss(tmob)
else
to_chat(H,"<span class='danger'>You pound [tmob] into the floor underfoot!</span>")
to_chat(tmob,"<span class='danger'>[H] slams you into the ground, crushing you!</span>")
sizediffStamLoss(tmob)
sizediffBruteloss(tmob)
return 1
if(H.a_intent == "grab" && H.canmove && !H.buckled)
now_pushing = 0
H.forceMove(tmob.loc)
sizediffStamLoss(tmob)
sizediffStun(tmob)
if(get_effective_size() > tmob.get_effective_size() && iscarbon(H))
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET) || (H.shoes && (H.shoes.body_parts_covered & FEET)))
if(feetCover)
if(istype(tmob) && istype(tmob, /datum/sprite_accessory/taur/naga))
if(istype(H) && H.dna.features["taur"] == "Naga" || H.dna.features["taur"] == "Tentacle")
to_chat(H,"<span class='danger'>You pin [tmob] underneath your tail!</span>")
to_chat(tmob,"<span class='danger'>[H]'s plows you into the ground, pinning you helplessly!</span>")
sizediffStamLoss(tmob)
sizediffStun(tmob)
else
to_chat(H,"<span class='danger'>You pin [tmob] helplessly to the floor with your foot!</span>")
to_chat(tmob,"<span class='danger'>[H] weightfully pins you to the ground!</span>")
sizediffStamLoss(tmob)
sizediffStun(tmob)
return 1
else
if(istype(tmob) && istype(tmob, /datum/sprite_accessory/taur/naga))
if(istype(H) && H.dna.features["taur"] == "Naga" || H.dna.features["taur"] == "Tentacle")
to_chat(H,"<span class='danger'>You curl [tmob] up in the coils of your tail!</span>")
to_chat(tmob,"<span class='danger'>[H]'s tail winds around you and snatches you in its coils!</span>")
sizediffStamLoss(tmob)
sizediffStun(tmob)
tmob.mob_pickupfeet(H)
tmob.mob_pickup_micro_feet(H)
else
to_chat(H,"<span class='danger'>You stomp your foot into [tmob], curling your toes and picking them up!</span>")
to_chat(tmob,"<span class='danger'>[H]'s toes pin you down and curl around you, picking you up!</span>'")
sizediffStamLoss(tmob)
sizediffStun(tmob)
tmob.mob_pickupfeet(H)
tmob.mob_pickup_micro_feet(H)
return 1
if(tmob.get_effective_size() > get_effective_size())
micro_step_under(tmob)
H.forceMove(tmob.loc)
now_pushing = 0
micro_step_under(tmob)
return 1
//smaller person stepping under another person
//smaller person stepping under another person... TO DO, fix and allow special interactions with naga legs to be seen
/mob/living/proc/micro_step_under(var/mob/living/tmob)
if(istype(tmob) && istype(tmob, /datum/sprite_accessory/taur/naga))
to_chat(src,"<span class='notice'>You jump over [tmob]'s thick tail.</span>")
@@ -172,6 +166,15 @@ mob/living/get_effective_size()
var/B = (get_effective_size()/tmob.get_effective_size()*2) //macro divided by micro, times 2
tmob.adjustBruteLoss(B) //final result in brute loss
//Proc for changing mob_size to be grabbed for item weight classes
/mob/living/proc/update_mobsize()
if(size_multiplier <= 0.50)
mob_size = MOB_SIZE_TINY
if(size_multiplier <= 1)
mob_size = MOB_SIZE_SMALL
if(size_multiplier >= 2)
mob_size = MOB_SIZE_LARGE
//Proc for instantly grabbing valid size difference. Code optimizations soon(TM)
/*
/mob/living/proc/sizeinteractioncheck(var/mob/living/tmob)