Polaris sync

This commit is contained in:
Eearslya
2016-08-06 20:34:44 -07:00
566 changed files with 16223 additions and 7350 deletions
+13 -9
View File
@@ -97,30 +97,30 @@
return 0
if(my_atom.flags & NOREACT) // No reactions here
return 0
var/reaction_occured
var/list/effect_reactions = list()
var/list/eligible_reactions = list()
for(var/i in 1 to PROCESS_REACTION_ITER)
reaction_occured = 0
//need to rebuild this to account for chain reactions
for(var/datum/reagent/R in reagent_list)
eligible_reactions |= chemical_reactions_list[R.id]
for(var/datum/chemical_reaction/C in eligible_reactions)
if(C.can_happen(src) && C.process(src))
effect_reactions |= C
reaction_occured = 1
eligible_reactions.Cut()
if(!reaction_occured)
break
for(var/datum/chemical_reaction/C in effect_reactions)
C.post_reaction(src)
update_total()
return reaction_occured
@@ -300,7 +300,7 @@
amount -= spill
if(spill)
splash(target.loc, spill, multiplier, copy, min_spill, max_spill)
trans_to(target, amount, multiplier, copy)
/datum/reagents/proc/trans_id_to(var/atom/target, var/id, var/amount = 1)
@@ -366,6 +366,10 @@
var/perm = 1
if(isliving(target)) //will we ever even need to tranfer reagents to non-living mobs?
var/mob/living/L = target
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.check_shields(0, null, null, null, "the spray") == 1) //If they block the spray, it does nothing.
amount = 0
perm = L.reagent_permeability()
return trans_to_mob(target, amount, CHEM_TOUCH, perm, copy)
@@ -416,4 +420,4 @@
/* Atom reagent creation - use it all the time */
/atom/proc/create_reagents(var/max_vol)
reagents = new/datum/reagents(max_vol, src)
reagents = new/datum/reagents(max_vol, src)
@@ -127,12 +127,9 @@
if(istype(L))
var/needed = L.fire_stacks * 10
if(amount > needed)
L.fire_stacks = 0
L.ExtinguishMob()
remove_self(needed)
else
L.adjust_fire_stacks(-(amount / 10))
remove_self(amount)
L.adjust_fire_stacks(-(amount / 10))
remove_self(needed)
/datum/reagent/water/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
if(istype(M, /mob/living/carbon/slime))
@@ -636,25 +636,16 @@
if(alien == IS_DIONA)
return
..()
if(alien == IS_TAJARA)
M.adjustToxLoss(0.5 * removed)
M.make_jittery(4) //extra sensitive to caffine
if(adj_temp > 0)
holder.remove_reagent("frostoil", 10 * removed)
/datum/reagent/nutriment/coffee/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
..()
if(alien == IS_TAJARA)
M.adjustToxLoss(2 * removed)
M.make_jittery(4)
return
/datum/reagent/drink/coffee/overdose(var/mob/living/carbon/M, var/alien)
if(alien == IS_DIONA)
return
if(alien == IS_TAJARA)
M.adjustToxLoss(4 * REM)
M.apply_effect(3, STUTTER)
M.make_jittery(5)
/datum/reagent/drink/coffee/icecoffee
@@ -924,6 +915,50 @@
glass_desc = "A tangy substance made of 0.5% natural citrus!"
glass_special = list(DRINK_FIZZ)
/datum/reagent/drink/shirley_temple
name = "Shirley Temple"
description = "A sweet concotion hated even by its namesake."
id = "shirley_temple"
color = "#EF304F"
adj_temp = -8
glass_name = "shirley temple"
glass_desc = "A sweet concotion hated even by its namesake."
glass_special = list(DRINK_FIZZ)
/datum/reagent/drink/roy_rogers
name = "Roy Rogers"
description = "I'm a cowboy, on a steel horse I ride."
id = "roy_rogers"
color = "#4F1811"
adj_temp = -8
glass_name = "roy rogers"
glass_desc = "I'm a cowboy, on a steel horse I ride"
glass_special = list(DRINK_FIZZ)
/datum/reagent/drink/collins_mix
name = "Collins Mix"
description = "Best hope it isn't a hoax."
id = "collins_mix"
color = "#D7D0B3"
adj_temp = -8
glass_name = "collins mix"
glass_desc = "Best hope it isn't a hoax."
glass_special = list(DRINK_FIZZ)
/datum/reagent/drink/arnold_palmer
name = "Arnold Palmer"
description = "Tastes just like the old man."
id = "arnold_palmer"
color = "#AF5517"
adj_temp = -8
glass_name = "arnold palmer"
glass_desc = "Tastes just like the old man."
glass_special = list(DRINK_FIZZ)
/datum/reagent/drink/doctor_delight
name = "The Doctor's Delight"
id = "doctorsdelight"
@@ -112,9 +112,9 @@
/datum/reagent/tricordrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien != IS_DIONA)
M.adjustOxyLoss(-6 * removed)
M.heal_organ_damage(3 * removed, 3 * removed)
M.adjustToxLoss(-3 * removed)
M.adjustOxyLoss(-3 * removed)
M.heal_organ_damage(1.5 * removed, 1.5 * removed)
M.adjustToxLoss(-1.5 * removed)
/datum/reagent/cryoxadone
name = "Cryoxadone"
@@ -6,7 +6,7 @@
description = "A toxic chemical."
reagent_state = LIQUID
color = "#CF3600"
metabolism = REM * 0.05 // 0.01 by default. They last a while and slowly kill you.
metabolism = REM * 0.25 // 0.05 by default. Hopefully enough to get some help, or die horribly, whatever floats your boat
var/strength = 4 // How much damage it deals per unit
/datum/reagent/toxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
@@ -479,7 +479,7 @@
return
if(M.dna)
if(prob(removed * 0.1))
if(prob(removed * 0.1))
randmuti(M)
if(prob(98))
randmutb(M)
@@ -505,7 +505,7 @@
return
if(M.dna)
if(prob(removed * 0.1))
if(prob(removed * 0.1))
randmuti(M)
if(prob(98))
randmutb(M)
@@ -1748,3 +1748,30 @@
required_reagents = list("hydrogen" = 2, "carbon" = 2, "ammonia" = 2)
result_amount = 6
/datum/chemical_reaction/shirleytemple
name = "Shirley Temple"
id = "shirley_temple"
result = "shirley_temple"
required_reagents = list("lemon_lime" = 4, "grenadine" = 1)
result_amount = 5
/datum/chemical_reaction/royrogers
name = "Roy Rogers"
id = "roy_rogers"
result = "roy_rogers"
required_reagents = list("cola" = 4, "grenadine" = 1)
result_amount = 5
/datum/chemical_reaction/collinsmix
name = "Collins Mix"
id = "collins_mix"
result = "collins_mix"
required_reagents = list("lemon_lime" = 3, "sodawater" = 1)
result_amount = 4
/datum/chemical_reaction/arnoldpalmer
name = "Arnold Palmer"
id = "arnold_palmer"
result = "arnold_palmer"
required_reagents = list("icetea" = 1, "lemonade" = 1)
result_amount = 2
@@ -25,6 +25,8 @@
possible_transfer_amounts = list(5,10,15,30)
flags = OPENCONTAINER
matter = list("glass" = 60)
/obj/item/weapon/reagent_containers/food/drinks/glass2/examine(mob/M as mob)
..()
@@ -7,6 +7,7 @@
volume = 30
possible_transfer_amounts = list(5,10,15,30)
rim_pos = list(23,13,20) // y, x0, x1
matter = list("glass" = 60)
/obj/item/weapon/reagent_containers/food/drinks/glass2/rocks
name = "rocks glass"
@@ -16,6 +17,7 @@
volume = 20
possible_transfer_amounts = list(5,10,20)
rim_pos = list(21, 10, 23)
matter = list("glass" = 40)
/obj/item/weapon/reagent_containers/food/drinks/glass2/shake
name = "milkshake glass"
@@ -25,6 +27,7 @@
volume = 30
possible_transfer_amounts = list(5,10,15,30)
rim_pos = list(25, 13, 21)
matter = list("glass" = 30)
/obj/item/weapon/reagent_containers/food/drinks/glass2/cocktail
name = "cocktail glass"
@@ -34,6 +37,7 @@
volume = 15
possible_transfer_amounts = list(5,10,15)
rim_pos = list(22, 13, 21)
matter = list("glass" = 30)
/obj/item/weapon/reagent_containers/food/drinks/glass2/shot
name = "shot glass"
@@ -43,6 +47,7 @@
volume = 5
possible_transfer_amounts = list(1,2,5)
rim_pos = list(17, 13, 21)
matter = list("glass" = 10)
/obj/item/weapon/reagent_containers/food/drinks/glass2/pint
name = "pint glass"
@@ -52,6 +57,7 @@
volume = 60
possible_transfer_amounts = list(5,10,15,30,60)
rim_pos = list(25, 12, 21)
matter = list("glass" = 120)
/obj/item/weapon/reagent_containers/food/drinks/glass2/mug
name = "glass mug"
@@ -61,6 +67,7 @@
volume = 40
possible_transfer_amounts = list(5,10,20,40)
rim_pos = list(22, 12, 20)
matter = list("glass" = 80)
/obj/item/weapon/reagent_containers/food/drinks/glass2/wine
name = "wine glass"
@@ -70,3 +77,4 @@
volume = 25
possible_transfer_amounts = list(5, 10, 15, 25)
rim_pos = list(25, 12, 21)
matter = list("glass" = 50)
@@ -167,7 +167,6 @@
desc = "A big bag of flour. Good for baking!"
icon = 'icons/obj/food.dmi'
icon_state = "flour"
item_state = "flour"
/obj/item/weapon/reagent_containers/food/condiment/flour/on_reagent_change()
return
@@ -204,6 +204,7 @@
possible_transfer_amounts = null
volume = 10
center_of_mass = list("x"=16, "y"=12)
/obj/item/weapon/reagent_containers/food/drinks/sillycup/New()
..()
@@ -214,6 +215,17 @@
else
icon_state = "water_cup_e"
/obj/item/weapon/reagent_containers/food/drinks/sillycup/MouseDrop(obj/over_object as obj)
if(!reagents.total_volume && istype(over_object, /obj/structure/reagent_dispensers/water_cooler))
if(over_object.Adjacent(usr))
var/obj/structure/reagent_dispensers/water_cooler/W = over_object
if(W.cupholder && W.cups < 10)
W.cups++
usr << "<span class='notice'>You put the [src] in the cup dispenser.</span>"
qdel(src)
W.update_icon()
else
return ..()
//////////////////////////drinkingglass and shaker//
//Note by Darem: This code handles the mixing of drinks. New drinks go in three places: In Chemistry-Reagents.dm (for the drink
@@ -14,7 +14,7 @@
var/nutriment_amt = 0
center_of_mass = list("x"=16, "y"=16)
w_class = 2
/obj/item/weapon/reagent_containers/food/snacks/New()
..()
if(nutriment_amt)
@@ -3197,6 +3197,17 @@
else
..()
/obj/item/weapon/reagent_containers/food/snacks/bunbun
name = "\improper Bun Bun"
desc = "A small bread monkey fashioned from two burger buns."
icon_state = "bunbun"
bitesize = 2
center_of_mass = list("x"=16, "y"=8)
/obj/item/weapon/reagent_containers/food/snacks/bunbun/New()
..()
reagents.add_reagent("nutriment", 8)
/obj/item/weapon/reagent_containers/food/snacks/taco
name = "taco"
desc = "Take a bite!"
@@ -255,7 +255,7 @@
name = "water-cooler bottle"
icon = 'icons/obj/vending.dmi'
icon_state = "water_cooler_bottle"
matter = list(DEFAULT_WALL_MATERIAL = 200)
matter = list("glass" = 2000)
w_class = 3.0
amount_per_transfer_from_this = 20
possible_transfer_amounts = list(10,20,30,60,120)
@@ -19,10 +19,15 @@
if(!icon_state)
icon_state = "pill[rand(1, 20)]"
/obj/item/weapon/reagent_containers/pill/attack(mob/M as mob, mob/user as mob, def_zone)
/obj/item/weapon/reagent_containers/pill/do_surgery(mob/M, mob/user)
if(user.a_intent != I_HELP) //in case it is ever used as a surgery tool
return ..()
attack(M, user) //default surgery behaviour is just to scan as usual
return 1
/obj/item/weapon/reagent_containers/pill/attack(mob/M as mob, mob/user as mob)
if(M == user)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(!H.check_has_mouth())
@@ -38,8 +38,6 @@
Spray_at(A, user, proximity)
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
user.setClickCooldown(4)
if(reagents.has_reagent("sacid"))
@@ -54,6 +52,7 @@
return
/obj/item/weapon/reagent_containers/spray/proc/Spray_at(atom/A as mob|obj, mob/user as mob, proximity)
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
if (A.density && proximity)
A.visible_message("[usr] sprays [A] with [src].")
reagents.splash(A, amount_per_transfer_from_this)
+81 -19
View File
@@ -26,12 +26,12 @@
examine(mob/user)
if(!..(user, 2))
return
user << "\blue It contains:"
user << "<span class='notice'>It contains:</span>"
if(reagents && reagents.reagent_list.len)
for(var/datum/reagent/R in reagents.reagent_list)
user << "\blue [R.volume] units of [R.name]"
user << "<span class='notice'>[R.volume] units of [R.name]</span>"
else
user << "\blue Nothing."
user << "<span class='notice'>Nothing.</span>"
verb/set_APTFT() //set amount_per_transfer_from_this
set name = "Set transfer amount"
@@ -92,7 +92,7 @@
if(!..(user, 2))
return
if (modded)
user << "\red Fuel faucet is wrenched open, leaking the fuel!"
user << "<span class='warning'>Fuel faucet is wrenched open, leaking the fuel!</span>"
if(rig)
user << "<span class='notice'>There is some kind of device rigged to the tank.</span>"
@@ -100,7 +100,7 @@
if (rig)
usr.visible_message("[usr] begins to detach [rig] from \the [src].", "You begin to detach [rig] from \the [src]")
if(do_after(usr, 20))
usr.visible_message("\blue [usr] detaches [rig] from \the [src].", "\blue You detach [rig] from \the [src]")
usr.visible_message("<span class='notice'>[usr] detaches [rig] from \the [src].</span>", "<span class='notice'>You detach [rig] from \the [src]</span>")
rig.loc = get_turf(usr)
rig = null
overlays = new/list()
@@ -117,11 +117,11 @@
leak_fuel(amount_per_transfer_from_this)
if (istype(W,/obj/item/device/assembly_holder))
if (rig)
user << "\red There is another device in the way."
user << "<span class='warning'>There is another device in the way.</span>"
return ..()
user.visible_message("[user] begins rigging [W] to \the [src].", "You begin rigging [W] to \the [src]")
if(do_after(user, 20))
user.visible_message("\blue [user] rigs [W] to \the [src].", "\blue You rig [W] to \the [src]")
user.visible_message("<span class='notice'>[user] rigs [W] to \the [src].</span>", "<span class='notice'>You rig [W] to \the [src]</span>")
var/obj/item/device/assembly_holder/H = W
if (istype(H.a_left,/obj/item/device/assembly/igniter) || istype(H.a_right,/obj/item/device/assembly/igniter))
@@ -203,13 +203,24 @@
possible_transfer_amounts = null
anchored = 1
var/bottle = 0
var/cups = 0
var/cupholder = 0
/obj/structure/reagent_dispensers/water_cooler/full
bottle = 1
cupholder = 1
cups = 10
/obj/structure/reagent_dispensers/water_cooler/New()
if(bottle == 1)
if(bottle)
..()
reagents.add_reagent("water",120)
else
icon_state = "water_cooler_0"
update_icon()
/obj/structure/reagent_dispensers/water_cooler/examine(mob/user)
..()
if(cupholder)
user << "<span class='notice'>There are [cups] cups in the cup dispenser.</span>"
/obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/wrench))
@@ -224,7 +235,7 @@
G.reagents.add_reagent(R.id, total_reagent)
reagents.clear_reagents()
bottle = 0
icon_state = "water_cooler_0"
update_icon()
else
if(anchored)
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
@@ -237,11 +248,24 @@
return
if(istype(I, /obj/item/weapon/screwdriver))
if(!bottle)
if(cupholder)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>You take the water-cooler apart.</span>"
new /obj/item/stack/material/plastic( src.loc, 4 )
qdel(src)
user << "<span class='notice'>You take the cup dispenser off.</span>"
new /obj/item/stack/material/plastic( src.loc )
if(cups)
for(var/i = 0 to cups)
new /obj/item/weapon/reagent_containers/food/drinks/sillycup(src.loc)
cups = 0
cupholder = 0
update_icon()
return
if(!bottle && !cupholder)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>You start taking the water-cooler apart.</span>"
if(do_after(user, 20))
user << "<span class='notice'>You take the water-cooler apart.</span>"
new /obj/item/stack/material/plastic( src.loc, 4 )
qdel(src)
return
if(istype(I, /obj/item/weapon/reagent_containers/glass/cooler_bottle))
@@ -252,8 +276,8 @@
user << "<span class='notice'>You start to screw the bottle onto the water-cooler.</span>"
if(do_after(user, 20))
bottle = 1
icon_state = "water_cooler"
user << "<span class='notice'>You screw the bottle onto the water-cooler but accidently spill some!</span>" //you spill some because it for somereason transfers 5 units to the bottle after it gets attached but before it's deleted...
update_icon()
user << "<span class='notice'>You screw the bottle onto the water-cooler!</span>"
for(var/datum/reagent/R in G.reagents.reagent_list)
var/total_reagent = G.reagents.get_reagent_amount(R.id)
reagents.add_reagent(R.id, total_reagent)
@@ -263,8 +287,46 @@
else
user << "<span class='warning'>There is already a bottle there!</span>"
return
else
return ..()
if(istype(I, /obj/item/stack/material/plastic))
if(!cupholder)
if(anchored)
var/obj/item/stack/material/plastic/P = I
src.add_fingerprint(user)
user << "<span class='notice'>You start to attach a cup dispenser onto the water-cooler.</span>"
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
if (P.use(1))
user << "<span class='notice'>You attach a cup dispenser onto the water-cooler.</span>"
cupholder = 1
update_icon()
else
user << "<span class='warning'>You need to wrench down the cooler first.</span>"
else
user << "<span class='warning'>There is already a cup dispenser there!</span>"
return
/obj/structure/reagent_dispensers/water_cooler/attack_hand(mob/user)
if(cups)
new /obj/item/weapon/reagent_containers/food/drinks/sillycup(src.loc)
cups--
update_icon()
return
/obj/structure/reagent_dispensers/water_cooler/update_icon()
icon_state = "water_cooler"
overlays.Cut()
var/image/I
if(bottle)
I = image(icon, "water_cooler_bottle")
overlays += I
if(cupholder)
I = image(icon, "water_cooler_cupholder")
overlays += I
if(cups)
I = image(icon, "water_cooler_cups")
overlays += I
return
/obj/structure/reagent_dispensers/beerkeg
name = "beer keg"