This commit is contained in:
SoundScopes
2014-11-06 12:46:38 +00:00
537 changed files with 29868 additions and 17588 deletions
+6 -7
View File
@@ -34,7 +34,7 @@
var/blue = mixOneColor(weight,bluecolor)
//assemble all the pieces
var/finalcolor = "#[red][green][blue]"
var/finalcolor = rgb(red, green, blue)
return finalcolor
/proc/mixOneColor(var/list/weight, var/list/color)
@@ -58,10 +58,9 @@
mixedcolor = round(mixedcolor)
//until someone writes a formal proof for this algorithm, let's keep this in
if(mixedcolor<0x00 || mixedcolor>0xFF)
return 0
// if(mixedcolor<0x00 || mixedcolor>0xFF)
// return 0
//that's not the kind of operation we are running here, nerd
mixedcolor=min(max(mixedcolor,0),255)
var/finalcolor = num2hex(mixedcolor)
while(length(finalcolor)<2)
finalcolor = text("0[]",finalcolor) //Takes care of leading zeroes
return finalcolor
return mixedcolor
+15 -100
View File
@@ -14,16 +14,13 @@
var/energy = 100
var/max_energy = 100
var/amount = 30
var/accept_glass = 0
var/beaker = null
var/accept_glass = 0 //At 0 ONLY accepts glass containers. Kinda misleading varname.
var/atom/beaker = null
var/recharged = 0
var/hackedcheck = 0
var/list/dispensable_reagents = list("hydrogen","lithium","carbon","nitrogen","oxygen","fluorine",
"sodium","aluminum","silicon","phosphorus","sulfur","chlorine","potassium","iron",
"copper","mercury","radium","water","ethanol","sugar","sacid","tungsten")
var/list/broken_requirements = list()
var/broken_on_spawn = 0
moveable = 1
/obj/machinery/chem_dispenser/proc/recharge()
if(stat & (BROKEN|NOPOWER)) return
@@ -35,15 +32,10 @@
nanomanager.update_uis(src) // update all UIs attached to src
/obj/machinery/chem_dispenser/power_change()
if(powered())
stat &= ~NOPOWER
else
spawn(rand(0, 15))
stat |= NOPOWER
..()
nanomanager.update_uis(src) // update all UIs attached to src
/obj/machinery/chem_dispenser/process()
if(recharged <= 0)
recharge()
recharged = 15
@@ -55,27 +47,6 @@
recharge()
dispensable_reagents = sortList(dispensable_reagents)
if(broken_on_spawn)
var/amount = pick(1,2,2,3,4)
var/list/options = list()
options[/obj/item/weapon/stock_parts/capacitor/adv] = "Add an advanced capacitor to fix it."
options[/obj/item/weapon/stock_parts/console_screen] = "Replace the console screen to fix it."
options[/obj/item/weapon/stock_parts/manipulator/pico] = "Upgrade to a pico manipulator to fix it."
options[/obj/item/weapon/stock_parts/matter_bin/adv] = "Give it an advanced matter bin to fix it."
options[/obj/item/stack/sheet/mineral/diamond] = "Line up a cut diamond with the nozzle to fix it."
options[/obj/item/stack/sheet/mineral/uranium] = "Position a uranium sheet inside to fix it."
options[/obj/item/stack/sheet/mineral/plasma] = "Enter a block of plasma to fix it."
options[/obj/item/stack/sheet/mineral/silver] = "Cover the internals with a silver lining to fix it."
options[/obj/item/stack/sheet/mineral/gold] = "Wire a golden filament to fix it."
options[/obj/item/stack/sheet/plasteel] = "Surround the outside with a plasteel cover to fix it."
options[/obj/item/stack/sheet/rglass] = "Insert a pane of reinforced glass to fix it."
stat |= BROKEN
while(amount > 0)
amount -= 1
var/index = pick(options)
broken_requirements[index] = options[index]
options -= index
/obj/machinery/chem_dispenser/ex_act(severity)
switch(severity)
@@ -105,18 +76,15 @@
*
* @return nothing
*/
/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main",var/datum/nanoui/ui = null)
if(broken_requirements.len)
user << "<span class='warning'>[src] is broken. [broken_requirements[broken_requirements[1]]]</span>"
return
/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main",var/datum/nanoui/ui = null, var/force_open = 1)
if(stat & (BROKEN|NOPOWER)) return
if(user.stat || user.restrained()) return
// this is the data which will be sent to the ui
var/data[0]
data["amount"] = amount
data["energy"] = energy
data["maxEnergy"] = max_energy
data["energy"] = round(energy)
data["maxEnergy"] = round(max_energy)
data["isBeakerLoaded"] = beaker ? 1 : 0
data["glass"] = accept_glass
var beakerContents[0]
@@ -142,11 +110,11 @@
data["chemicals"] = chemicals
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 380, 650)
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 390, 655)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
@@ -164,7 +132,7 @@
amount = 100
if(href_list["dispense"])
if (dispensable_reagents.Find(href_list["dispense"]) && beaker != null)
if (dispensable_reagents.Find(href_list["dispense"]) && beaker != null && beaker.is_open_container())
var/obj/item/weapon/reagent_containers/B = src.beaker
var/datum/reagents/R = B.reagents
var/space = R.maximum_volume - R.total_volume
@@ -184,19 +152,6 @@
/obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob)
if(isrobot(user))
return
if(broken_requirements.len && B.type == broken_requirements[1])
broken_requirements -= broken_requirements[1]
user << "<span class='notice'>You fix [src].</span>"
if(istype(B,/obj/item/stack))
var/obj/item/stack/S = B
S.use(1)
else
user.drop_item()
del(B)
if(broken_requirements.len==0)
stat ^= BROKEN
return
if(src.beaker)
user << "Something is already loaded into the machine."
return
@@ -210,21 +165,6 @@
nanomanager.update_uis(src) // update all UIs attached to src
return
if(istype(B, /obj/item/weapon/wrench))
if(moveable == 1)
switch(anchored)
if(0)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
spawn(10)
user.visible_message("[user.name] secures [src.name] to the floor.", "You secure [src.name] to the floor.", "You hear a ratchet")
anchored = 1
if(1)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
spawn(10)
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", "You unsecure [src.name] from the floor.", "You hear a ratchet")
anchored = 0
return
/obj/machinery/chem_dispenser/attack_ai(mob/user as mob)
return src.attack_hand(user)
@@ -261,6 +201,7 @@
dispensable_reagents -= list("thirteenloko")
hackedcheck = 0
return
/obj/machinery/chem_dispenser/beer
icon_state = "booze_dispenser"
name = "booze dispenser"
@@ -297,7 +238,6 @@
icon_state = "mixer0"
use_power = 1
idle_power_usage = 20
moveable = 1
var/beaker = null
var/obj/item/weapon/storage/pill_bottle/loaded_pill_bottle = null
var/mode = 0
@@ -333,30 +273,8 @@
del(src)
return
/obj/machinery/chem_master/power_change()
if(powered())
stat &= ~NOPOWER
else
spawn(rand(0, 15))
stat |= NOPOWER
/obj/machinery/chem_master/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob)
if(istype(B, /obj/item/weapon/wrench))
if(moveable == 1)
switch(anchored)
if(0)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
spawn(10)
user.visible_message("[user.name] secures [src.name] to the floor.", "You secure [src.name] to the floor.", "You hear a ratchet")
anchored = 1
if(1)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
spawn(10)
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", "You unsecure [src.name] from the floor.", "You hear a ratchet")
anchored = 0
return
if(istype(B, /obj/item/weapon/reagent_containers/glass))
if(src.beaker)
@@ -369,7 +287,7 @@
src.updateUsrDialog()
icon_state = "mixer1"
if(istype(B, /obj/item/weapon/storage/pill_bottle))
else if(istype(B, /obj/item/weapon/storage/pill_bottle))
if(src.loaded_pill_bottle)
user << "A pill bottle is already loaded into the machine."
@@ -646,18 +564,16 @@
/obj/machinery/computer/pandemic/power_change()
..()
if(stat & BROKEN)
icon_state = (src.beaker?"mixer1_b":"mixer0_b")
else if(powered())
else if(!(stat & NOPOWER))
icon_state = (src.beaker?"mixer1":"mixer0")
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = (src.beaker?"mixer1_nopower":"mixer0_nopower")
stat |= NOPOWER
/obj/machinery/computer/pandemic/Topic(href, href_list)
@@ -887,12 +803,11 @@
icon = 'icons/obj/kitchen.dmi'
icon_state = "juicer1"
layer = 2.9
density = 1
anchored = 1
density = 0
anchored = 0
use_power = 1
idle_power_usage = 5
active_power_usage = 100
moveable = 1
var/inuse = 0
var/obj/item/weapon/reagent_containers/beaker = null
var/limit = 10
+26 -30
View File
@@ -5,10 +5,6 @@
#define REAGENTS_OVERDOSE 30
#define REM REAGENTS_EFFECT_MULTIPLIER
//Some on_mob_life() procs check for alien races.
#define IS_DIONA 1
#define IS_VOX 2
//The reaction procs must ALWAYS set src = null, this detaches the proc from the object (the reagent)
//so that it can continue working when the reagent is deleted while the proc is still active.
@@ -26,6 +22,7 @@ datum
var/custom_metabolism = REAGENTS_METABOLISM
var/overdose = 0
var/overdose_dam = 1
var/scannable = 0 //shows up on health analyzers
//var/list/viruses = list()
var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!)
@@ -241,7 +238,7 @@ datum
var/hotspot = (locate(/obj/fire) in T)
if(hotspot && !istype(T, /turf/space))
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
lowertemp.react()
T.assume_air(lowertemp)
@@ -252,7 +249,7 @@ datum
var/turf/T = get_turf(O)
var/hotspot = (locate(/obj/fire) in T)
if(hotspot && !istype(T, /turf/space))
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
lowertemp.react()
T.assume_air(lowertemp)
@@ -278,7 +275,7 @@ datum
description = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality."
color = "#E0E8EF" // rgb: 224, 232, 239
on_mob_life(var/mob/living/carbon/human/M as mob)
on_mob_life(var/mob/living/M as mob)
if(ishuman(M))
if((M.mind in ticker.mode.cult) && prob(10))
M << "\blue A cooling sensation from inside you brings you an untold calmness."
@@ -297,7 +294,6 @@ datum
holder.remove_reagent(src.id, 10 * REAGENTS_METABOLISM) //high metabolism to prevent extended uncult rolls.
return
lube
name = "Space Lube"
id = "lube"
@@ -431,6 +427,7 @@ datum
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
overdose = REAGENTS_OVERDOSE*2
scannable = 1
on_mob_life(var/mob/living/M as mob, var/alien)
if(!M) M = holder.my_atom
@@ -808,6 +805,8 @@ datum
reagent_state = LIQUID
color = "#C855DC"
overdose = 60
scannable = 1
custom_metabolism = 0.025 // Lasts 10 minutes for 15 units
on_mob_life(var/mob/living/M as mob)
if (volume > overdose)
@@ -823,6 +822,8 @@ datum
reagent_state = LIQUID
color = "#C8A5DC"
overdose = 30
scannable = 1
custom_metabolism = 0.025 // Lasts 10 minutes for 15 units
on_mob_life(var/mob/living/M as mob)
if (volume > overdose)
@@ -838,6 +839,7 @@ datum
reagent_state = LIQUID
color = "#C805DC"
overdose = 20
custom_metabolism = 0.25 // Lasts 10 minutes for 15 units
on_mob_life(var/mob/living/M as mob)
if (volume > overdose)
@@ -868,6 +870,18 @@ datum
description = "Sterilizes wounds in preparation for surgery."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
//makes you squeaky clean
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
if (method == TOUCH)
M.germ_level -= min(volume*20, M.germ_level)
reaction_obj(var/obj/O, var/volume)
O.germ_level -= min(volume*20, O.germ_level)
reaction_turf(var/turf/T, var/volume)
T.germ_level -= min(volume*20, T.germ_level)
/* reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
src = null
if (method==TOUCH)
@@ -1692,11 +1706,7 @@ datum
on_mob_life(var/mob/living/M as mob, var/alien)
if(!M) M = holder.my_atom
if(alien && alien == IS_VOX)
custom_metabolism = 10 //Inhaling O2 constantly puts plasma into voxblood which poisons them to hell. +Metab so one huff isn't death.
toxpwr = 12 //This is a hacky way of doing it. They take 6 points of toxloss every four ticks (Breath tick). Still less than now.
if(holder.has_reagent("inaprovaline"))
holder.remove_reagent("inaprovaline", 2*REM)
holder.remove_reagent("inaprovaline", 2*REM)
..()
return
reaction_obj(var/obj/O, var/volume)
@@ -1707,24 +1717,10 @@ datum
egg.Hatch()*/
if((!O) || (!volume)) return 0
var/turf/the_turf = get_turf(O)
var/datum/gas_mixture/napalm = new
var/datum/gas/volatile_fuel/fuel = new
fuel.moles = volume
napalm.trace_gases += fuel
the_turf.assume_air(napalm)
the_turf.assume_gas("volatile_fuel", volume, T20C)
reaction_turf(var/turf/T, var/volume)
src = null
var/datum/gas_mixture/napalm = new
var/datum/gas/volatile_fuel/fuel = new
fuel.moles = volume
napalm.trace_gases += fuel
T.assume_air(napalm)
return
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)//Splashing people with plasma is stronger than fuel!
if(!istype(M, /mob/living))
return
if(method == TOUCH)
M.adjust_fire_stacks(volume / 5)
T.assume_gas("volatile_fuel", volume, T20C)
return
toxin/lexorin
@@ -2553,7 +2549,7 @@ datum
T.wet_overlay = null
var/hotspot = (locate(/obj/fire) in T)
if(hotspot)
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
lowertemp.react()
T.assume_air(lowertemp)
+39 -55
View File
@@ -413,16 +413,7 @@ datum
on_reaction(var/datum/reagents/holder, var/created_volume)
var/turf/location = get_turf(holder.my_atom.loc)
for(var/turf/simulated/floor/target_tile in range(0,location))
var/datum/gas_mixture/napalm = new
var/datum/gas/volatile_fuel/fuel = new
fuel.moles = created_volume
napalm.trace_gases += fuel
napalm.temperature = 400+T0C
napalm.update_values()
target_tile.assume_air(napalm)
target_tile.assume_gas("volatile_fuel", created_volume, 400+T0C)
spawn (0) target_tile.hotspot_expose(700, 400)
holder.del_reagent("napalm")
return
@@ -854,8 +845,8 @@ datum
if(chosen)
// Calculate previous position for transition
var/turf/FROM = get_turf_loc(holder.my_atom) // the turf of origin we're travelling FROM
var/turf/TO = get_turf_loc(chosen) // the turf of origin we're travelling TO
var/turf/FROM = get_turf(holder.my_atom) // the turf of origin we're travelling FROM
var/turf/TO = get_turf(chosen) // the turf of origin we're travelling TO
playsound(TO, 'sound/effects/phasein.ogg', 100, 1)
@@ -916,16 +907,16 @@ datum
)//exclusion list for things you don't want the reaction to create.
var/list/critters = typesof(/mob/living/simple_animal/hostile) - blocked // list of possible hostile mobs
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
if(M:eyecheck() <= 0)
flick("e_flash", M.flash)
for(var/i = 1, i <= created_volume, i++)
var/chosen = pick(critters)
var/mob/living/simple_animal/hostile/C = new chosen
C.loc = get_turf_loc(holder.my_atom)
C.loc = get_turf(holder.my_atom)
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(C, pick(NORTH,SOUTH,EAST,WEST))
@@ -942,9 +933,9 @@ datum
var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/snacks) - /obj/item/weapon/reagent_containers/food/snacks
// BORK BORK BORK
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
if(M:eyecheck() <= 0)
flick("e_flash", M.flash)
@@ -952,7 +943,7 @@ datum
var/chosen = pick(borks)
var/obj/B = new chosen
if(B)
B.loc = get_turf_loc(holder.my_atom)
B.loc = get_turf(holder.my_atom)
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(B, pick(NORTH,SOUTH,EAST,WEST))
@@ -1022,10 +1013,10 @@ datum
required_container = /obj/item/slime_extract/grey
required_other = 1
on_reaction(var/datum/reagents/holder)
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!"), 1)
var/mob/living/carbon/slime/S = new /mob/living/carbon/slime
S.loc = get_turf_loc(holder.my_atom)
S.loc = get_turf(holder.my_atom)
slimemonkey
@@ -1039,7 +1030,7 @@ datum
on_reaction(var/datum/reagents/holder)
for(var/i = 1, i <= 3, i++)
var /obj/item/weapon/reagent_containers/food/snacks/monkeycube/M = new /obj/item/weapon/reagent_containers/food/snacks/monkeycube
M.loc = get_turf_loc(holder.my_atom)
M.loc = get_turf(holder.my_atom)
//Green
slimemutate
@@ -1063,10 +1054,10 @@ datum
on_reaction(var/datum/reagents/holder)
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal
M.amount = 15
M.loc = get_turf_loc(holder.my_atom)
M.loc = get_turf(holder.my_atom)
var/obj/item/stack/sheet/plasteel/P = new /obj/item/stack/sheet/plasteel
P.amount = 5
P.loc = get_turf_loc(holder.my_atom)
P.loc = get_turf(holder.my_atom)
//Gold
slimecrit
@@ -1097,20 +1088,20 @@ datum
)//exclusion list for things you don't want the reaction to create.
var/list/critters = typesof(/mob/living/simple_animal/hostile) - blocked // list of possible hostile mobs
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
if(M:eyecheck() <= 0)
flick("e_flash", M.flash)
for(var/i = 1, i <= 5, i++)
var/chosen = pick(critters)
var/mob/living/simple_animal/hostile/C = new chosen
C.faction = "slimesummon"
C.loc = get_turf_loc(holder.my_atom)
C.loc = get_turf(holder.my_atom)
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(C, pick(NORTH,SOUTH,EAST,WEST))
// for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
// for(var/mob/O in viewers(get_turf(holder.my_atom), null))
// O.show_message(text("\red The slime core fizzles disappointingly,"), 1)
slimecatalyst
@@ -1123,7 +1114,7 @@ datum
required_other = 1
on_reaction(var/datum/reagents/holder)
var/obj/item/weapon/slimecatalyst/P = new /obj/item/weapon/slimecatalyst
P.loc = get_turf_loc(holder.my_atom)
P.loc = get_turf(holder.my_atom)
/*
slimecritlesser
name = "Slime Crit Lesser"
@@ -1190,9 +1181,9 @@ datum
var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/snacks) - /obj/item/weapon/reagent_containers/food/snacks
// BORK BORK BORK
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
if(M:eyecheck() <= 0)
flick("e_flash", M.flash)
@@ -1200,7 +1191,7 @@ datum
var/chosen = pick(borks)
var/obj/B = new chosen
if(B)
B.loc = get_turf_loc(holder.my_atom)
B.loc = get_turf(holder.my_atom)
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(B, pick(NORTH,SOUTH,EAST,WEST))
@@ -1225,11 +1216,11 @@ datum
required_container = /obj/item/slime_extract/darkblue
required_other = 1
on_reaction(var/datum/reagents/holder)
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
sleep(50)
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/M in range (get_turf_loc(holder.my_atom), 7))
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/M in range (get_turf(holder.my_atom), 7))
M.bodytemperature -= 140
M << "\blue You feel a chill!"
@@ -1252,18 +1243,12 @@ datum
required_container = /obj/item/slime_extract/orange
required_other = 1
on_reaction(var/datum/reagents/holder)
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
sleep(50)
var/turf/location = get_turf(holder.my_atom.loc)
for(var/turf/simulated/floor/target_tile in range(0,location))
var/datum/gas_mixture/napalm = new
napalm.toxins = 25
napalm.temperature = 1400
target_tile.assume_air(napalm)
target_tile.assume_gas("toxins", 25, 1400)
spawn (0) target_tile.hotspot_expose(700, 400)
//Yellow
@@ -1276,7 +1261,7 @@ datum
required_container = /obj/item/slime_extract/yellow
required_other = 1
on_reaction(var/datum/reagents/holder, var/created_volume)
empulse(get_turf_loc(holder.my_atom), 3, 7)
empulse(get_turf(holder.my_atom), 3, 7)
slimecell
@@ -1289,7 +1274,7 @@ datum
required_other = 1
on_reaction(var/datum/reagents/holder, var/created_volume)
var/obj/item/weapon/cell/slime/P = new /obj/item/weapon/cell/slime
P.loc = get_turf_loc(holder.my_atom)
P.loc = get_turf(holder.my_atom)
slimeglow
name = "Slime Glow"
@@ -1300,7 +1285,7 @@ datum
required_container = /obj/item/slime_extract/yellow
required_other = 1
on_reaction(var/datum/reagents/holder)
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red The contents of the slime core harden and begin to emit a warm, bright light."), 1)
var/obj/item/device/flashlight/slime/F = new /obj/item/device/flashlight/slime
F.loc = get_turf(holder.my_atom)
@@ -1317,7 +1302,7 @@ datum
required_other = 1
on_reaction(var/datum/reagents/holder)
var/obj/item/weapon/slimesteroid/P = new /obj/item/weapon/slimesteroid
P.loc = get_turf_loc(holder.my_atom)
P.loc = get_turf(holder.my_atom)
@@ -1343,7 +1328,7 @@ datum
on_reaction(var/datum/reagents/holder)
var/obj/item/stack/sheet/mineral/plasma/P = new /obj/item/stack/sheet/mineral/plasma
P.amount = 10
P.loc = get_turf_loc(holder.my_atom)
P.loc = get_turf(holder.my_atom)
//Red
slimeglycerol
@@ -1365,10 +1350,9 @@ datum
required_container = /obj/item/slime_extract/red
required_other = 1
on_reaction(var/datum/reagents/holder)
for(var/mob/living/carbon/slime/slime in viewers(get_turf_loc(holder.my_atom), null))
slime.tame = 0
for(var/mob/living/carbon/slime/slime in viewers(get_turf(holder.my_atom), null))
slime.rabid = 1
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red The [slime] is driven into a frenzy!."), 1)
//Pink
@@ -1382,7 +1366,7 @@ datum
required_other = 1
on_reaction(var/datum/reagents/holder)
var/obj/item/weapon/slimepotion/P = new /obj/item/weapon/slimepotion
P.loc = get_turf_loc(holder.my_atom)
P.loc = get_turf(holder.my_atom)
//Black
@@ -1405,10 +1389,10 @@ datum
required_container = /obj/item/slime_extract/oil
required_other = 1
on_reaction(var/datum/reagents/holder)
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
sleep(50)
explosion(get_turf_loc(holder.my_atom), 1 ,3, 6)
explosion(get_turf(holder.my_atom), 1 ,3, 6)
//Light Pink
slimepotion2
name = "Slime Potion 2"
@@ -1420,7 +1404,7 @@ datum
required_other = 1
on_reaction(var/datum/reagents/holder)
var/obj/item/weapon/slimepotion2/P = new /obj/item/weapon/slimepotion2
P.loc = get_turf_loc(holder.my_atom)
P.loc = get_turf(holder.my_atom)
//Adamantine
slimegolem
name = "Slime Golem"
@@ -1432,7 +1416,7 @@ datum
required_other = 1
on_reaction(var/datum/reagents/holder)
var/obj/effect/golemrune/Z = new /obj/effect/golemrune
Z.loc = get_turf_loc(holder.my_atom)
Z.loc = get_turf(holder.my_atom)
Z.announce_to_ghosts()
//////////////////////////////////////////FOOD MIXTURES////////////////////////////////////
+2 -2
View File
@@ -11,7 +11,7 @@
force = 5.0
var/list/grenades = new/list()
var/max_grenades = 3
m_amt = 2000
matter = list("metal" = 2000)
examine()
set src in view()
@@ -56,7 +56,7 @@
var/obj/item/weapon/grenade/chem_grenade/F = grenades[1] //Now with less copypasta!
grenades -= F
F.loc = user.loc
F.throw_at(target, 30, 2)
F.throw_at(target, 30, 2, user)
message_admins("[key_name_admin(user)] fired a grenade ([F.name]) from a grenade launcher ([src.name]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
message_mods("[key_name_admin(user)] fired a grenade ([F.name]) from a grenade launcher ([src.name]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
log_game("[key_name_admin(user)] used a grenade ([src.name]).")
+3 -1
View File
@@ -28,7 +28,9 @@
return
/obj/item/weapon/reagent_containers/attack(mob/M as mob, mob/user as mob, def_zone)
return
if (can_operate(M)) //Checks if mob is lying down on table for surgery
if (do_surgery(M,user,src))
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.
@@ -18,25 +18,11 @@
update_icon()
update_icon()
/*
if(blood_type != "K")
var/percent = round((reagents.total_volume / volume) * 100)
switch(percent)
if(0 to 9) icon_state = "empty"
if(10 to 50) icon_state = "half"
if(51 to INFINITY) icon_state = "full"
else
var/percent2 = round((reagents.total_volume / volume) * 100)
switch(percent2)
if(0 to 9) icon_state = "empty"
if(10 to 50) icon_state = "kocas_half"
if(51 to INFINITY) icon_state = "kocas_full"
*/
var/percent = round((reagents.total_volume / volume) * 100)
switch(percent)
if(0 to 9) icon_state = "empty"
if(10 to 50) icon_state = "half"
if(51 to INFINITY) icon_state = "full"
/obj/item/weapon/reagent_containers/blood/APlus
blood_type = "A+"
@@ -18,6 +18,12 @@
var/list/reagent_ids = list("tricordrazine", "inaprovaline", "spaceacillin")
//var/list/reagent_ids = list("dexalin", "kelotane", "bicaridine", "anti_toxin", "inaprovaline", "spaceacillin")
/obj/item/weapon/reagent_containers/borghypo/surgeon
reagent_ids = list("bicaridine", "inaprovaline", "dexalin")
/obj/item/weapon/reagent_containers/borghypo/crisis
reagent_ids = list("tricordrazine", "inaprovaline", "tramadol")
/obj/item/weapon/reagent_containers/borghypo/New()
..()
for(var/R in reagent_ids)
@@ -6,7 +6,29 @@
volume = 50 //Sets the default container amount for all food items.
var/filling_color = "#FFFFFF" //Used by sandwiches.
var/list/center_of_mass = newlist() //Center of mass
/obj/item/weapon/reagent_containers/food/New()
..()
src.pixel_x = rand(-10.0, 10) //Randomizes postion
src.pixel_y = rand(-10.0, 10)
..()
if (!pixel_x && !pixel_y)
src.pixel_x = rand(-6.0, 6) //Randomizes postion
src.pixel_y = rand(-6.0, 6)
/obj/item/weapon/reagent_containers/food/afterattack(atom/A, mob/user, proximity, params)
if(proximity && params && istype(A, /obj/structure/table) && center_of_mass.len)
//Places the item on a grid
var/list/mouse_control = params2list(params)
var/cellnumber = 4
var/mouse_x = text2num(mouse_control["icon-x"])
var/mouse_y = text2num(mouse_control["icon-y"])
var/grid_x = round(mouse_x, 32/cellnumber)
var/grid_y = round(mouse_y, 32/cellnumber)
if(mouse_control["icon-x"])
var/sign = mouse_x - grid_x != 0 ? sign(mouse_x - grid_x) : -1 //positive if rounded down, else negative
pixel_x = grid_x - center_of_mass["x"] + sign*16/cellnumber //center of the cell
if(mouse_control["icon-y"])
var/sign = mouse_y - grid_y != 0 ? sign(mouse_y - grid_y) : -1
pixel_y = grid_y - center_of_mass["y"] + sign*16/cellnumber
@@ -5,7 +5,7 @@
desc = "Your standard drinking glass."
icon_state = "glass_empty"
amount_per_transfer_from_this = 10
g_amt = 500
matter = list("glass" = 500)
volume = 50
on_reagent_change()
@@ -95,6 +95,7 @@
spawn(5) src.reagents.clear_reagents()
return
else if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
target.add_fingerprint(user)
if(!target.reagents.total_volume && target.reagents)
user << "\red [target] is empty."
@@ -108,6 +109,7 @@
user << "\blue You fill [src] with [trans] units of the contents of [target]."
else if(target.is_open_container() && target.reagents) //Something like a glass. Player probably wants to transfer TO it.
if(!reagents.total_volume)
user << "\red [src] is empty."
return
@@ -160,8 +162,7 @@
icon = 'icons/obj/chemical.dmi'
icon_state = "beaker"
item_state = "beaker"
m_amt = 0
g_amt = 500
matter = list("glass" = 500)
on_reagent_change()
update_icon()
@@ -205,7 +206,7 @@
name = "large beaker"
desc = "A large beaker. Can hold up to 100 units."
icon_state = "beakerlarge"
g_amt = 5000
matter = list("glass" = 5000)
volume = 100
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,50,100)
@@ -215,7 +216,7 @@
name = "cryostasis beaker"
desc = "A cryostasis beaker that allows for chemical storage without reactions. Can hold up to 50 units."
icon_state = "beakernoreact"
g_amt = 500
matter = list("glass" = 500)
volume = 50
amount_per_transfer_from_this = 10
flags = FPRINT | TABLEPASS | OPENCONTAINER | NOREACT
@@ -224,7 +225,7 @@
name = "bluespace beaker"
desc = "A bluespace beaker, powered by experimental bluespace technology. Can hold up to 300 units."
icon_state = "beakerbluespace"
g_amt = 5000
matter = list("glass" = 5000)
volume = 300
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,50,100,300)
@@ -235,7 +236,7 @@
name = "vial"
desc = "A small glass vial. Can hold up to 25 units."
icon_state = "vial"
g_amt = 250
matter = list("glass" = 250)
volume = 25
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25)
@@ -265,8 +266,7 @@
icon = 'icons/obj/janitor.dmi'
icon_state = "bucket"
item_state = "bucket"
m_amt = 200
g_amt = 0
matter = list("metal" = 200)
w_class = 3.0
amount_per_transfer_from_this = 20
possible_transfer_amounts = list(10,20,30,50,70)
@@ -11,7 +11,7 @@
icon = 'icons/obj/syringe.dmi'
item_state = "syringe_0"
icon_state = "0"
g_amt = 150
matter = list("glass" = 150)
amount_per_transfer_from_this = 5
possible_transfer_amounts = null //list(5,10,15)
volume = 15
@@ -236,7 +236,7 @@
if(istype(target, /mob/living/carbon/human))
var/target_zone = check_zone(user.zone_sel.selecting, target)
var/target_zone = ran_zone(check_zone(user.zone_sel.selecting, target))
var/datum/organ/external/affecting = target:get_organ(target_zone)
if (!affecting)
@@ -436,6 +436,17 @@
mode = SYRINGE_INJECT
update_icon()
/obj/item/weapon/reagent_containers/syringe/drugs
name = "Syringe (drugs)"
desc = "Contains aggressive drugs meant for torture."
New()
..()
reagents.add_reagent("space_drugs", 5)
reagents.add_reagent("mindbreaker", 5)
reagents.add_reagent("cryptobiolin", 5)
mode = SYRINGE_INJECT
update_icon()
/obj/item/weapon/reagent_containers/ld50_syringe/choral
New()
..()
+6 -1
View File
@@ -116,6 +116,7 @@
overlays = new/list()
/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/weapon/W as obj, mob/user as mob)
src.add_fingerprint(user)
if (istype(W,/obj/item/weapon/wrench))
user.visible_message("[user] wrenches [src]'s faucet [modded ? "closed" : "open"].", \
"You wrench [src]'s faucet [modded ? "closed" : "open"]")
@@ -166,6 +167,10 @@
/obj/structure/reagent_dispensers/fueltank/bullet_act(var/obj/item/projectile/Proj)
if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet))
if(istype(Proj.firer))
message_admins("[key_name_admin(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>).")
log_game("[key_name(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]).")
if(!istype(Proj ,/obj/item/projectile/beam/lastertag) && !istype(Proj ,/obj/item/projectile/beam/practice) )
explode()
@@ -202,7 +207,7 @@
amount = min(amount, reagents.total_volume)
reagents.remove_reagent("fuel",amount)
new /obj/effect/decal/cleanable/liquid_fuel(src.loc, amount)
new /obj/effect/decal/cleanable/liquid_fuel(src.loc, amount,1)
/obj/structure/reagent_dispensers/peppertank
name = "Pepper Spray Refiller"
+1 -1
View File
@@ -13,7 +13,7 @@
force = 4.0
var/list/syringes = new/list()
var/max_syringes = 1
m_amt = 2000
matter = list("metal" = 2000)
/obj/item/weapon/gun/syringe/examine()
set src in view()