Files
Paradise/code/modules/reagents/reagent_containers.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

82 lines
3.0 KiB
Plaintext

/obj/item/weapon/reagent_containers
name = "Container"
desc = "..."
icon = 'icons/obj/chemical.dmi'
icon_state = null
w_class = WEIGHT_CLASS_TINY
var/amount_per_transfer_from_this = 5
var/possible_transfer_amounts = list(5,10,15,25,30)
var/volume = 30
var/list/list_reagents = null
var/spawned_disease = null
var/disease_amount = 20
/obj/item/weapon/reagent_containers/verb/set_APTFT() //set amount_per_transfer_from_this
set name = "Set transfer amount"
set category = "Object"
set src in range(0)
if(usr.stat || !usr.canmove || usr.restrained())
return
var/default = null
if(amount_per_transfer_from_this in possible_transfer_amounts)
default = amount_per_transfer_from_this
var/N = input("Amount per transfer from this:", "[src]", default) as null|anything in possible_transfer_amounts
if(N)
amount_per_transfer_from_this = N
/obj/item/weapon/reagent_containers/New()
..()
if(!possible_transfer_amounts)
verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT
create_reagents(volume)
if(spawned_disease)
var/datum/disease/F = new spawned_disease(0)
var/list/data = list("viruses" = list(F), "blood_color" = "#A10808")
reagents.add_reagent("blood", disease_amount, data)
if(list_reagents)
reagents.add_reagent_list(list_reagents)
/obj/item/weapon/reagent_containers/ex_act()
if(reagents)
for(var/datum/reagent/R in reagents.reagent_list)
R.on_ex_act()
..()
/obj/item/weapon/reagent_containers/fire_act()
reagents.chem_temp += 30
reagents.handle_reactions()
..()
/obj/item/weapon/reagent_containers/attack_self(mob/user)
return
// this prevented pills, food, and other things from being picked up by bags.
// possibly intentional, but removing it allows us to not duplicate functionality.
// -Sayu (storage conslidation)
/*
/obj/item/weapon/reagent_containers/attackby(obj/item/I as obj, mob/user as mob, params)
return
*/
/obj/item/weapon/reagent_containers/afterattack(obj/target, mob/user , flag)
return
/obj/item/weapon/reagent_containers/proc/reagentlist(obj/item/weapon/reagent_containers/snack) //Attack logs for regents in pills
var/data
if(snack && snack.reagents && snack.reagents.reagent_list && snack.reagents.reagent_list.len) //find a reagent list if there is and check if it has entries
for(var/datum/reagent/R in snack.reagents.reagent_list) //no reagents will be left behind
data += "[R.id]([R.volume] units); " //Using IDs because SOME chemicals(I'm looking at you, chlorhydrate-beer) have the same names as other chemicals.
return data
else return "No reagents"
/obj/item/weapon/reagent_containers/wash(mob/user, atom/source)
if(is_open_container())
if(reagents.total_volume >= volume)
to_chat(user, "<span class='warning'>[src] is full.</span>")
return
else
reagents.add_reagent("water", min(volume - reagents.total_volume, amount_per_transfer_from_this))
to_chat(user, "<span class='notice'>You fill [src] from [source].</span>")
return
..()