Master to dev merge.

This commit is contained in:
Zuhayr
2014-08-27 20:24:07 +09:30
21 changed files with 3475 additions and 3518 deletions
+2 -42
View File
@@ -14,15 +14,13 @@
var/energy = 100
var/max_energy = 100
var/amount = 30
var/accept_glass = 0
var/accept_glass = 0 //At 0 ONLY accepts glass containers. Kinda misleading varname.
var/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
/obj/machinery/chem_dispenser/proc/recharge()
if(stat & (BROKEN|NOPOWER)) return
@@ -38,7 +36,6 @@
nanomanager.update_uis(src) // update all UIs attached to src
/obj/machinery/chem_dispenser/process()
if(recharged <= 0)
recharge()
recharged = 15
@@ -50,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/phoron] = "Enter a block of phoron 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)
@@ -101,9 +77,6 @@
* @return nothing
*/
/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main",var/datum/nanoui/ui = null, var/force_open = 1)
if(broken_requirements.len)
user << "<span class='warning'>[src] is broken. [broken_requirements[broken_requirements[1]]]</span>"
return
if(stat & (BROKEN|NOPOWER)) return
if(user.stat || user.restrained()) return
@@ -179,19 +152,6 @@
/obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/reagent_containers/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
@@ -214,7 +174,6 @@
/obj/machinery/chem_dispenser/attack_hand(mob/user as mob)
if(stat & BROKEN)
return
ui_interact(user)
/obj/machinery/chem_dispenser/soda
@@ -241,6 +200,7 @@
dispensable_reagents -= list("thirteenloko")
hackedcheck = 0
return
/obj/machinery/chem_dispenser/beer
icon_state = "booze_dispenser"
name = "booze dispenser"
+5 -5
View File
@@ -2043,7 +2043,7 @@ datum
description = "This is what makes chilis hot."
reagent_state = LIQUID
color = "#B31008" // rgb: 179, 16, 8
on_mob_life(var/mob/living/M as mob)
if(!M)
M = holder.my_atom
@@ -2057,7 +2057,7 @@ datum
H << "\red <b>Your insides feel uncomfortably hot !</b>"
if(2 to 20)
if(prob(5))
H << "\red <b>Your insides feel uncomfortably hot !</b>"
H << "\red <b>Your insides feel uncomfortably hot !</b>"
if(20 to INFINITY)
H.apply_effect(2,AGONY,0)
if(prob(5))
@@ -2165,10 +2165,10 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M)
M = holder.my_atom
M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0)
M = holder.my_atom
M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0)
if(prob(1))
M.emote("shiver")
M.emote("shiver")
if(istype(M, /mob/living/carbon/slime))
M.bodytemperature = max(M.bodytemperature - rand(10,20), 0)
holder.remove_reagent("capsaicin", 5)
+1 -1
View File
@@ -130,7 +130,7 @@ datum
water //I can't believe we never had this.
name = "Water"
id = "water"
result = null
result = "water"
required_reagents = list("oxygen" = 2, "hydrogen" = 1)
result_amount = 1
@@ -85,7 +85,7 @@
//Display an attack message.
for(var/mob/O in viewers(user, null))
if(target != user) O.show_message(text("\red <B>[target] has been hit over the head with a bottle of [src.name], by [user]!</B>"), 1)
else O.show_message(text("\red <B>[target] hit himself with a bottle of [src.name] on the head!</B>"), 1)
else O.show_message(text("\red <B>[target] hit \himself with a bottle of [src.name] on the head!</B>"), 1)
//Weaken the target for the duration that we calculated and divide it by 5.
if(armor_duration)
target.apply_effect(min(armor_duration, 10) , WEAKEN) // Never weaken more than a flash!
@@ -94,7 +94,7 @@
//Default attack message and don't weaken the target.
for(var/mob/O in viewers(user, null))
if(target != user) O.show_message(text("\red <B>[target] has been attacked with a bottle of [src.name], by [user]!</B>"), 1)
else O.show_message(text("\red <B>[target] has attacked himself with a bottle of [src.name]!</B>"), 1)
else O.show_message(text("\red <B>[target] has attacked \himself with a bottle of [src.name]!</B>"), 1)
//Attack logs
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has attacked [target.name] ([target.ckey]) with a bottle!</font>")