Files
Paradise/code/game/objects/structures/kitchen_spike.dm
Aurorablade 476cdc3e06 Blood Refactor (#6220)
* commit for branch swap

* branch swap again

* BLEED

* trying to clear up compile errors

* i killed everything when i tested this...

* restorealltheblood

* I REMOVED A THING

* well some progress

* stop bleeding

* got to swap branches again.

* grr

* damn bloodcolors

* Squash everything

* color....colourrrrrrr

* color....colourrrrrrr

* well now that updated the branch...

* Changes

* Some tweaks..before i upload something major

* COLOR NOT COLOUR...COLOR

YES I KNOW NOT EVERYONE SPELLS IT LIKE THAT BUT MY GOD

* Foot print shit..

blood coloring is going to be PAIN

* trying to handle some colors..maybe.

* blood colorsing sucks..di i mention this?

* commenting cod malfunctions.

* Changes

* lets try this

* Its too late at night.

* blargh

* woops

* almost works...

* progress..

* Branch swap

* figured out the overlay issue....

* BRANCH SWAP

* BLARGH

* fixed merged conflicts..expect something to be horribly wrong.

* bunch of changes

* Major Fixes

 - Moved blood_state and bloodiness var definitions to
 /obj/effect/decal/cleanable/blood as well as /cleanable/Crossed(), in
 order to make blood color work properly.
   - These were not used by any other decal, so it was pointless.
 - Tweaked human/add_blood so that hand_blood_color uses the correct
 value now.
 - Corrected gibs having the wrong basecolor.
 - Tracks of different blood colors will no longer combine weirdly, and
 will instead form seperate overlays.
   - This also fixes all of the issues with tracks in general and not
   updating correctly.
 - Fixed transfering blood in add_fingerprint; the old detective code
 didn't use the new format for add_blood().
 - Fixed xenomorphs causing runtimes in makeTrail(), and gave them their
 own trails. Sprites should probably be brightened later.
 - Fixed mobs occasionally randomly having their blood_DNA list reset.

* may have accidently removed shit.

* Mrowl

* stiff

water is not bleeding
lowered trail making threshold

* tweaks then conflcits

* weee

* indent

* some tweaks

* somefox tweaks.

* derp

* why won't they bleed!?

* BLEED DAMMIT

* Flattist comments and removes simple animale blood volume

Cause i cannot get it to work right.

* PRAISE FLATTIST

* Simple animals have a blood volume now

Bug with trail fixed.

* changes

* thanksmrowlmrowl

* exotice blood trails

* makesure is an exotic bleeder has a bleed rate first...

* FoxBoxTweakSox

* BoxVoxSoXFox

* ONE MORE THING

* animalsbleedreds

* Buh? BUGH!

* thisismescreaming

* removing note needed thing

* Color changes but the rabbit hole continues.

* This is not pretty....

* wot

* IT WORKS DAMMIT

* colors.

* germaphobic commit..

* we have to use the old system

* nothing to see here

* doubleprocarady

* try to fix mulebots

* mulebot fixed

* DONE
2017-07-11 16:49:11 -04:00

139 lines
4.5 KiB
Plaintext

//////Kitchen Spike
/obj/structure/kitchenspike_frame
name = "meatspike frame"
icon = 'icons/obj/kitchen.dmi'
icon_state = "spikeframe"
desc = "The frame of a meat spike."
density = 1
anchored = 0
/obj/structure/kitchenspike_frame/attackby(obj/item/I, mob/user, params)
add_fingerprint(user)
if(istype(I, /obj/item/weapon/wrench))
if(anchored)
to_chat(user, "<span class='notice'>You unwrench [src] from the floor.</span>")
anchored = 0
else
to_chat(user, "<span class='notice'>You wrench [src] into place.</span>")
anchored = 1
else if(istype(I, /obj/item/stack/rods))
var/obj/item/stack/rods/R = I
if(R.get_amount() >= 4)
R.use(4)
to_chat(user, "<span class='notice'>You add spikes to the frame.</span>")
new /obj/structure/kitchenspike(loc)
add_fingerprint(user)
qdel(src)
/obj/structure/kitchenspike
name = "a meat spike"
icon = 'icons/obj/kitchen.dmi'
icon_state = "spike"
desc = "A spike for collecting meat from animals."
density = 1
anchored = 1
buckle_lying = 0
can_buckle = 1
/obj/structure/kitchenspike/attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
if(istype(G, /obj/item/weapon/crowbar))
if(!buckled_mob)
playsound(loc, G.usesound, 100, 1)
if(do_after(user, 20 * G.toolspeed, target = src))
to_chat(user, "<span class='notice'>You pry the spikes out of the frame.</span>")
new /obj/item/stack/rods(loc, 4)
new /obj/structure/kitchenspike_frame(loc)
add_fingerprint(user)
qdel(src)
else
to_chat(user, "<span class='notice'>You can't do that while something's on the spike!</span>")
return
if(!istype(G, /obj/item/weapon/grab) || !G.affecting)
return
if(buckled_mob)
to_chat(user, "<span class = 'danger'>The spike already has something on it, finish collecting its meat first!</span>")
else
if(isliving(G.affecting))
if(!buckled_mob)
if(do_mob(user, src, 120))
if(spike(G.affecting))
G.affecting.visible_message("<span class='danger'>[user] slams [G.affecting] onto the meat spike!</span>", "<span class='userdanger'>[user] slams you onto the meat spike!</span>", "<span class='italics'>You hear a squishy wet noise.</span>")
qdel(G)
return
to_chat(user, "<span class='danger'>You can't use that on the spike!</span>")
return
/obj/structure/kitchenspike/proc/spike(var/mob/living/victim)
if(!istype(victim))
return
if(buckled_mob) //to prevent spam/queing up attacks
return 0
if(victim.buckled)
return 0
var/mob/living/H = victim
playsound(loc, 'sound/effects/splat.ogg', 25, 1)
H.forceMove(loc)
H.emote("scream")
if(ishuman(H))
H.add_splatter_floor()
H.adjustBruteLoss(30)
H.buckled = src
H.dir = 2
buckled_mob = H
var/matrix/m180 = matrix()
m180.Turn(180)
animate(H, transform = m180, time = 3)
H.pixel_y = H.get_standard_pixel_y_offset(180)
return 1
/obj/structure/kitchenspike/user_buckle_mob(mob/living/M, mob/living/user) //Don't want them getting put on the rack other than by spiking
return
/obj/structure/kitchenspike/user_unbuckle_mob(mob/living/carbon/human/user)
if(buckled_mob && buckled_mob.buckled == src)
var/mob/living/M = buckled_mob
if(M != user)
M.visible_message(\
"[user.name] tries to pull [M.name] free of the [src]!",\
"<span class='notice'>[user.name] is trying to pull you off of [src], opening up fresh wounds!</span>",\
"<span class='italics'>You hear a squishy wet noise.</span>")
if(!do_after(user, 300, target = src))
if(M && M.buckled)
M.visible_message(\
"[user.name] fails to free [M.name]!",\
"<span class='notice'>[user.name] fails to pull you off of [src].</span>")
return
else
M.visible_message(\
"<span class='warning'>[M.name] struggles to break free from the [src]!</span>",\
"<span class='notice'>You struggle to break free from the [src], exacerbating your wounds! (Stay still for two minutes.)</span>",\
"<span class='italics'>You hear a wet squishing noise..</span>")
M.adjustBruteLoss(30)
if(!do_after(M, 1200, target = src))
if(M && M.buckled)
to_chat(M, "<span class='warning'>You fail to free yourself!</span>")
return
if(!M.buckled)
return
var/matrix/m180 = matrix(M.transform)
m180.Turn(180)
animate(M, transform = m180, time = 3)
M.pixel_y = M.get_standard_pixel_y_offset(180)
M.adjustBruteLoss(30)
visible_message("<span class='danger'>[M] falls free of the [src]!</span>")
unbuckle_mob()
M.emote("scream")
M.AdjustWeakened(10)