diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm
index ff900f4d1cf..622e6b437f3 100644
--- a/code/game/machinery/bots/medbot.dm
+++ b/code/game/machinery/bots/medbot.dm
@@ -490,7 +490,7 @@
if(reagent_id == "internal_beaker")
if(use_beaker && reagent_glass && reagent_glass.reagents.total_volume)
reagent_glass.reagents.trans_to(patient,injection_amount) //Inject from beaker instead.
- reagent_glass.reagents.reaction(patient, 2)
+ reagent_glass.reagents.reaction(patient, INGEST)
else
patient.reagents.add_reagent(reagent_id,injection_amount)
C.visible_message("[src] injects [patient] with the syringe!", \
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 30b3f246671..7429e162871 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -314,17 +314,15 @@
return null
-/obj/machinery/camera/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/user)
+/obj/machinery/camera/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/living/user)
if(busy)
return 0
- if(!WT.isOn())
+ if(!WT.remove_fuel(0, user))
return 0
- // Do after stuff here
user << "You start to weld [src]."
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
- WT.eyecheck(user)
busy = 1
if(do_after(user, 100))
busy = 0
diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm
index 5e36e6ff1af..10d4c1716b6 100644
--- a/code/game/machinery/camera/camera_assembly.dm
+++ b/code/game/machinery/camera/camera_assembly.dm
@@ -149,16 +149,15 @@
if(!anchored)
..()
-/obj/item/weapon/camera_assembly/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/user)
+/obj/item/weapon/camera_assembly/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/living/user)
if(busy)
return 0
- if(!WT.isOn())
+ if(!WT.remove_fuel(0, user))
return 0
user << "You start to weld \the [src].."
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
- WT.eyecheck(user)
busy = 1
if(do_after(user, 20))
busy = 0
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index da34431eee6..3873123583f 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -78,26 +78,13 @@
last_flash = world.time
use_power(1000)
- for (var/mob/O in viewers(src, null))
- if (get_dist(src, O) > src.range)
+ for (var/mob/living/L in viewers(src, null))
+ if (get_dist(src, L) > range)
continue
- if (istype(O, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = O
- if(!H.eyecheck() <= 0)
- continue
+ if(L.flash_eyes())
+ L.Weaken(strength)
- if (istype(O, /mob/living/carbon/alien))//So aliens don't get flashed (they have no external eyes)/N
- continue
-
- O.Weaken(strength)
- if ((O.eye_stat > 15 && prob(O.eye_stat + 50)))
- flick("e_flash", O:flash)
- O.eye_stat += rand(1, 2)
- else
- if(!O.eye_blind)
- flick("flash", O:flash)
- O.eye_stat += rand(0, 2)
return 1
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index 5496413aff1..e680889e33d 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -59,19 +59,17 @@
/obj/item/device/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, targeted = 1)
add_logs(user, M, "flashed", object="[src.name]")
- var/safety = M.eyecheck()
- if(safety <= 0)
- M.confused += power
- flick("e_flash", M.flash)
- if(user && targeted)
+ if(user && targeted)
+ if(M.flash_eyes(1, 1))
+ M.confused += power
terrible_conversion_proc(M, user)
M.Stun(1)
user.visible_message("[user] blinds [M] with the flash!")
- return 1
- else
- if(user && targeted)
+ else
user.visible_message("[user] fails to blind [M] with the flash!")
- return 0
+ else
+ if(M.flash_eyes())
+ M.confused += power
/obj/item/device/flash/attack(mob/living/M, mob/user)
if(!try_use_flash(user))
@@ -82,9 +80,10 @@
return 1
else if(issilicon(M))
- M.Weaken(rand(5,10))
add_logs(user, M, "flashed", object="[src.name]")
- user.visible_message("[user] overloads [M]'s sensors with the flash!")
+ if(M.flash_eyes())
+ M.Weaken(rand(5,10))
+ user.visible_message("[user] overloads [M]'s sensors with the flash!")
return 1
user.visible_message("[user] fails to blind [M] with the flash!")
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index fc6892d28aa..4dc95ea12e3 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -96,52 +96,19 @@
//human/alien mobs
if(iscarbon(target))
+ var/mob/living/carbon/C = target
if(user.zone_sel.selecting == "eyes")
- var/mob/living/carbon/C = target
+ add_logs(user, C, "shone in the eyes", object="laser pointer")
+
+ var/severity = 1
+ if(prob(33))
+ severity = 2
+ else if(prob(50))
+ severity = 0
//20% chance to actually hit the eyes
- if(prob(effectchance * diode.rating))
- add_logs(user, C, "shone in the eyes", object="laser pointer")
-
- //eye target check
+ if(prob(effectchance * diode.rating) && C.flash_eyes(severity))
outmsg = "You blind [C] by shining [src] in their eyes."
- var/eye_prot = C.eyecheck()
- if(C.eye_blind || eye_prot >= 2)
- eye_prot = 4
- var/severity = 3 - eye_prot
- if(prob(33))
- severity += 1
- else if(prob(50))
- severity -= 1
- severity = min(max(severity, 0), 4)
-
- switch(severity)
- if(0)
- //no effect
- C << "A small, bright dot appears in your vision."
- if(1)
- //industrial grade eye protection
- C.eye_stat += rand(0, 2)
- C << "Something bright flashes in the corner of your vision!"
- if(2)
- //basic eye protection (sunglasses)
- flick("flash", C.flash)
- C.eye_stat += rand(1, 6)
- C << "Your eyes were blinded!"
- if(3)
- //no eye protection
- if(prob(2))
- C.Weaken(1)
- flick("e_flash", C.flash)
- C.eye_stat += rand(3, 7)
- C << "Your eyes were blinded!"
- if(4)
- //the effect has been worsened by something
- if(prob(5))
- C.Weaken(1)
- flick("e_flash", C.flash)
- C.eye_stat += rand(5, 10)
- C << "Your eyes were blinded!"
else
outmsg = "You fail to blind [C] by shining [src] at their eyes."
@@ -150,6 +117,7 @@
var/mob/living/silicon/S = target
//20% chance to actually hit the sensors
if(prob(effectchance * diode.rating))
+ S.flash_eyes()
S.Weaken(rand(5,10))
S << "Your sensors were overloaded by a laser!"
outmsg = "You overload [S] by shining [src] at their sensors."
diff --git a/code/game/objects/items/weapons/grenades/clusterbuster.dm b/code/game/objects/items/weapons/grenades/clusterbuster.dm
index 63d4c41aa1c..31576237a04 100644
--- a/code/game/objects/items/weapons/grenades/clusterbuster.dm
+++ b/code/game/objects/items/weapons/grenades/clusterbuster.dm
@@ -76,7 +76,6 @@
/////////////////////////////////
/obj/item/weapon/grenade/flashbang/cluster
icon_state = "flashbang_active"
- banglet = 1
/obj/item/weapon/grenade/clusterbuster/emp
name = "Electromagnetic Storm"
diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm
index 6db5b1f306d..8157a2208e7 100644
--- a/code/game/objects/items/weapons/grenades/flashbang.dm
+++ b/code/game/objects/items/weapons/grenades/flashbang.dm
@@ -3,7 +3,6 @@
icon_state = "flashbang"
item_state = "flashbang"
origin_tech = "materials=2;combat=1"
- var/banglet = 0
/obj/item/weapon/grenade/flashbang/prime()
update_mob()
@@ -23,33 +22,15 @@
M.show_message("BANG", 2)
playsound(loc, 'sound/effects/bang.ogg', 25, 1)
-//Checking for protections
- var/eye_safety = 0
- var/ear_safety = 0
+//Checking for protection
+ var/ear_safety = M.check_ear_prot()
var/distance = max(1,get_dist(src,T))
- var/takes_eye_damage = 0
- if(iscarbon(M))
- takes_eye_damage++
- var/mob/living/carbon/C = M
- eye_safety = C.eyecheck()
- if(ishuman(C))
- var/mob/living/carbon/human/H = C
- if((H.ears && (H.ears.flags & EARBANGPROTECT)) || (H.head && (H.head.flags & HEADBANGPROTECT)))
- ear_safety++
//Flash
- if(!eye_safety)
- flick("e_flash", M.flash)
+ if(M.flash_eyes())
M.eye_stat += rand(1, 3)
M.Stun(max(10/distance, 3))
M.Weaken(max(10/distance, 3))
- if (M.eye_stat >= 20 && takes_eye_damage)
- M << "Your eyes start to burn badly!"
- M.disabilities |= NEARSIGHT
- if(!banglet)
- if (prob(M.eye_stat - 20 + 1))
- M << "You can't see anything!"
- M.disabilities |= BLIND
//Bang
if((loc == M) || loc == M.loc)//Holding on person or being exactly where lies is significantly more dangerous and voids protection
@@ -61,10 +42,9 @@
M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,15))
if (M.ear_damage >= 15)
M << "Your ears start to ring badly!"
- if(!banglet)
- if(prob(M.ear_damage - 10 + 5))
- M << "You can't hear anything!"
- M.disabilities |= DEAF
+ if(prob(M.ear_damage - 10 + 5))
+ M << "You can't hear anything!"
+ M.disabilities |= DEAF
else
if (M.ear_damage >= 5)
M << "Your ears start to ring!"
diff --git a/code/game/objects/items/weapons/grenades/spawnergrenade.dm b/code/game/objects/items/weapons/grenades/spawnergrenade.dm
index c104bfd9c73..9edf321b7e8 100644
--- a/code/game/objects/items/weapons/grenades/spawnergrenade.dm
+++ b/code/game/objects/items/weapons/grenades/spawnergrenade.dm
@@ -5,7 +5,6 @@
icon_state = "delivery"
item_state = "flashbang"
origin_tech = "materials=3;magnets=4"
- var/banglet = 0
var/spawner_type = null // must be an object path
var/deliveryamt = 1 // amount of type to deliver
@@ -16,8 +15,7 @@
var/turf/T = get_turf(src)
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(T, null))
- if(M:eyecheck() <= 0)
- flick("e_flash", M.flash) // flash dose faggots
+ M.flash_eyes()
for(var/i=1, i<=deliveryamt, i++)
var/atom/movable/x = new spawner_type
diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm
index e4266c752f0..0f8a5a15230 100644
--- a/code/game/objects/items/weapons/tools.dm
+++ b/code/game/objects/items/weapons/tools.dm
@@ -269,15 +269,15 @@
return reagents.get_reagent_amount("fuel")
-//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use()
-/obj/item/weapon/weldingtool/proc/remove_fuel(amount = 1, mob/M = null)
+//Removes fuel from the welding tool. If a mob is passed, it will try to flash the mob's eyes. This should probably be renamed to use()
+/obj/item/weapon/weldingtool/proc/remove_fuel(amount = 1, mob/living/M = null)
if(!welding || !check_fuel())
return 0
if(get_fuel() >= amount)
reagents.remove_reagent("fuel", amount)
check_fuel()
if(M)
- eyecheck(M)
+ M.flash_eyes(2)
return 1
else
if(M)
@@ -332,44 +332,6 @@
hitsound = "swing_hit"
icon_state = "welder"
-
-
-//Decides whether or not to damage a player's eyes based on what they're wearing as protection
-//Note: This should probably be moved to mob
-/obj/item/weapon/weldingtool/proc/eyecheck(mob/user)
- if(!iscarbon(user))
- return 1
- var/mob/living/carbon/C = user
- var/safety = C.eyecheck()
-
- switch(safety)
- if(1)
- usr << "Your eyes sting a little."
- user.eye_stat += rand(1, 2)
- if(user.eye_stat > 12)
- user.eye_blurry += rand(3, 6)
- if(0)
- usr << "Your eyes burn."
- user.eye_stat += rand(2, 4)
- if(user.eye_stat > 10)
- user.eye_blurry += rand(4, 10)
- if(-1)
- usr << "Your thermals intensify the welder's glow. Your eyes itch and burn severely!"
- user.eye_blurry += rand(12, 20)
- user.eye_stat += rand(12, 16)
- if(user.eye_stat > 10 && safety < 2)
- user << "Your eyes are really starting to hurt. This can't be good for you!"
- if (prob(user.eye_stat - 25 + 1))
- user << "You go blind!"
- user.disabilities |= BLIND
- else if(prob(user.eye_stat - 15 + 1))
- user << "You go blind!"
- user.eye_blind = 5
- user.eye_blurry = 5
- user.disabilities |= NEARSIGHT
- spawn(100)
- user.disabilities &= ~NEARSIGHT
-
/obj/item/weapon/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
if(welding)
user << "Turn it off first."
diff --git a/code/modules/events/anomaly_bluespace.dm b/code/modules/events/anomaly_bluespace.dm
index 5171ca6a4b6..91f71dc1fe9 100644
--- a/code/modules/events/anomaly_bluespace.dm
+++ b/code/modules/events/anomaly_bluespace.dm
@@ -44,8 +44,7 @@
var/list/flashers = list()
for(var/mob/living/carbon/human/M in viewers(TO, null))
- if(M:eyecheck() <= 0)
- flick("e_flash", M.flash) // flash dose faggots
+ if(M.flash_eyes())
flashers += M
var/y_distance = TO.y - FROM.y
diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm
index 71154e737c3..09f25f0a582 100644
--- a/code/modules/hydroponics/grown.dm
+++ b/code/modules/hydroponics/grown.dm
@@ -969,6 +969,9 @@ obj/item/weapon/reagent_containers/food/snacks/grown/shell/eggy/add_juice()
GT.amount = GT.max_amount
else
GT.amount = grassAmt
+ for(var/obj/item/stack/tile/grass/GR in user.loc)
+ if(GR != GT && GR.amount < GR.max_amount)
+ GR.attackby(GT, user) //we try to transfer all old unfinished stacks to the new stack we created.
grassAmt -= GT.max_amount
qdel(src)
return
@@ -991,6 +994,9 @@ obj/item/weapon/reagent_containers/food/snacks/grown/shell/eggy/add_juice()
CT.amount = CT.max_amount
else
CT.amount = carpetAmt
+ for(var/obj/item/stack/tile/carpet/CA in user.loc)
+ if(CA != CT && CA.amount < CA.max_amount)
+ CA.attackby(CT, user) //we try to transfer all old unfinished stacks to the new stack we created.
carpetAmt -= CT.max_amount
qdel(src)
return
diff --git a/code/modules/hydroponics/growninedible.dm b/code/modules/hydroponics/growninedible.dm
index 27c3ff1d38e..0fe9d609cb7 100644
--- a/code/modules/hydroponics/growninedible.dm
+++ b/code/modules/hydroponics/growninedible.dm
@@ -4,7 +4,7 @@
/obj/item/weapon/grown // Grown weapons
name = "grown_weapon"
- icon = 'icons/obj/weapons.dmi'
+ icon = 'icons/obj/hydroponics/harvest.dmi'
var/seed = null
var/plantname = ""
var/product //a type path
@@ -45,7 +45,6 @@
seed = /obj/item/seeds/towermycelium
name = "tower-cap log"
desc = "It's better than bad, it's good!"
- icon = 'icons/obj/hydroponics/harvest.dmi'
icon_state = "logs"
force = 5
throwforce = 5
@@ -55,6 +54,8 @@
plant_type = 2
origin_tech = "materials=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
+ var/plank_type = /obj/item/stack/sheet/mineral/wood
+ var/plank_name = "wooden planks"
var/list/accepted = list(/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco,
/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco/space,
/obj/item/weapon/reagent_containers/food/snacks/grown/tea/aspera,
@@ -67,19 +68,16 @@
/obj/item/weapon/grown/log/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || (istype(W, /obj/item/weapon/twohanded/fireaxe) && W:wielded) || istype(W, /obj/item/weapon/melee/energy))
- user.show_message("You make planks out of \the [src]!", 1)
- for(var/i = 0,i < 2,i++)
- var/obj/item/stack/sheet/mineral/wood/NG = new (user.loc)
- for (var/obj/item/stack/sheet/mineral/wood/G in user.loc)
- if(G == NG)
- continue
- if(G.amount >= G.max_amount)
- continue
- G.amount += round(potency / 25)
- G.attackby(NG, user)
- usr << "You add the newly-formed wood to the stack. It now contains [NG.amount] planks."
+ user.show_message("You make [plank_name] out of \the [src]!", 1)
+ var/obj/item/stack/plank = new plank_type(user.loc, 1 + round(potency / 25))
+ var/old_plank_amount = plank.amount
+ for(var/obj/item/stack/ST in user.loc)
+ if(ST != plank && istype(ST, plank_type) && ST.amount < ST.max_amount)
+ ST.attackby(plank, user) //we try to transfer all old unfinished stacks to the new stack we created.
+ if(plank.amount > old_plank_amount)
+ user << "You add the newly-formed [plank_name] to the stack. It now contains [plank.amount] [plank_name]."
qdel(src)
- return
+
if(is_type_in_list(W,accepted))
var/obj/item/weapon/reagent_containers/food/snacks/grown/leaf = W
if(leaf.dry)
@@ -93,11 +91,19 @@
else
usr << " You must dry this first."
+/obj/item/weapon/grown/log/steel
+ seed = /obj/item/seeds/steelmycelium
+ name = "steel-cap log"
+ desc = "It's made of metal."
+ icon_state = "steellogs"
+ accepted = list()
+ plank_type = /obj/item/stack/rods
+ plank_name = "rods"
+
/obj/item/weapon/grown/sunflower // FLOWER POWER!
seed = /obj/item/seeds/sunflowerseed
name = "sunflower"
desc = "It's beautiful! A certain person might beat you to death if you trample these."
- icon = 'icons/obj/hydroponics/harvest.dmi'
icon_state = "sunflower"
damtype = "fire"
force = 0
@@ -116,7 +122,6 @@
seed = /obj/item/seeds/novaflowerseed
name = "novaflower"
desc = "These beautiful flowers have a crisp smokey scent, like a summer bonfire."
- icon = 'icons/obj/hydroponics/harvest.dmi'
icon_state = "novaflower"
damtype = "fire"
force = 0
@@ -288,7 +293,6 @@
/obj/item/weapon/grown/corncob
name = "corn cob"
desc = "A reminder of meals gone by."
- icon = 'icons/obj/hydroponics/harvest.dmi'
icon_state = "corncob"
item_state = "corncob"
w_class = 1.0
@@ -308,7 +312,6 @@
/obj/item/weapon/grown/snapcorn
name = "snap corn"
desc = "A cob with snap pops"
- icon = 'icons/obj/hydroponics/harvest.dmi'
icon_state = "snapcorn"
item_state = "corncob"
w_class = 1.0
diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm
index a7aa6c83db0..981cd85a6a3 100644
--- a/code/modules/hydroponics/seeds.dm
+++ b/code/modules/hydroponics/seeds.dm
@@ -721,11 +721,11 @@
/obj/item/seeds/steelmycelium
name = "pack of steel-cap mycelium"
- desc = "This mycelium grows into metal rods."
+ desc = "This mycelium grows into steel logs."
icon_state = "mycelium-steelcap"
species = "steelcap"
plantname = "Steel Caps"
- product = /obj/item/stack/rods
+ product = /obj/item/weapon/grown/log/steel
lifespan = 80
endurance = 50
maturation = 15
diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm
index 73374998632..50633e0c792 100644
--- a/code/modules/mining/ores_coins.dm
+++ b/code/modules/mining/ores_coins.dm
@@ -38,17 +38,22 @@
points = 1
refined_type = /obj/item/stack/sheet/glass
-/obj/item/weapon/ore/glass/attack_self(mob/living/user as mob) //It's magic I ain't gonna explain how instant conversion with no tool works. -- Urist
+/obj/item/weapon/ore/glass/attack_self(mob/living/user as mob)
user << "You use the sand to make sandstone."
- for(var/i = 0,i < 1,i++)
- var/obj/item/stack/sheet/mineral/sandstone/S = new (user.loc)
- for (var/obj/item/weapon/ore/glass/G in user.loc)
- if(S.amount < S.max_amount)
- S.amount++
- qdel(G)
- else
- i--
- break
+ var/sandAmt = 1
+ for(var/obj/item/weapon/ore/glass/G in user.loc) // The sand on the floor
+ sandAmt += 1
+ qdel(G)
+ while(sandAmt > 0)
+ var/obj/item/stack/sheet/mineral/sandstone/SS = new /obj/item/stack/sheet/mineral/sandstone(user.loc)
+ if(sandAmt >= SS.max_amount)
+ SS.amount = SS.max_amount
+ else
+ SS.amount = sandAmt
+ for(var/obj/item/stack/sheet/mineral/sandstone/SA in user.loc)
+ if(SA != SS && SA.amount < SA.max_amount)
+ SA.attackby(SS, user) //we try to transfer all old unfinished stacks to the new stack we created.
+ sandAmt -= SS.max_amount
qdel(src)
return
diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm
index cba4f274cf5..013051ca169 100644
--- a/code/modules/mob/living/carbon/alien/alien.dm
+++ b/code/modules/mob/living/carbon/alien/alien.dm
@@ -50,7 +50,7 @@
/mob/living/carbon/alien/proc/getPlasma()
return storedPlasma
-/mob/living/carbon/alien/eyecheck()
+/mob/living/carbon/alien/check_eye_prot()
return 2
/mob/living/carbon/alien/getToxLoss()
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 6733b7be1b2..d7654b8b583 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -135,8 +135,6 @@
else
mode() // Activate held item
-
-
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
if(health >= 0)
@@ -156,9 +154,41 @@
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
+/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0)
+ var/damage = intensity - check_eye_prot()
+ if(..()) // we've been flashed
+ switch(damage)
+ if(1)
+ src << "Your eyes sting a little."
+ if(prob(40))
+ eye_stat += 1
-/mob/living/carbon/proc/eyecheck()
- return 0
+ if(2)
+ src << "Your eyes burn."
+ eye_stat += rand(2, 4)
+
+ else
+ src << "Your eyes itch and burn severely!"
+ eye_stat += rand(12, 16)
+
+ if(eye_stat > 10)
+ eye_blind += damage
+ eye_blurry += damage * rand(3, 6)
+
+ if(eye_stat > 20)
+ if (prob(eye_stat - 20))
+ src << "Your eyes start to burn badly!"
+ disabilities |= NEARSIGHT
+ else if(prob(eye_stat - 25))
+ src << "You can't see anything!"
+ disabilities |= BLIND
+ else
+ src << "Your eyes are really starting to hurt. This can't be good for you!"
+ return 1
+
+ else if(damage == 0) // just enough protection
+ if(prob(20))
+ src << "Something bright flashes in the corner of your vision!"
/mob/living/carbon/proc/tintcheck()
return 0
diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm
index ccdc5aa956c..f622ed76642 100644
--- a/code/modules/mob/living/carbon/human/human_helpers.dm
+++ b/code/modules/mob/living/carbon/human/human_helpers.dm
@@ -75,9 +75,9 @@
if(wear_id)
return wear_id.GetID()
-///eyecheck()
+///checkeyeprot()
///Returns a number between -1 to 2
-/mob/living/carbon/human/eyecheck()
+/mob/living/carbon/human/check_eye_prot()
var/number = 0
if(istype(src.head, /obj/item/clothing/head)) //are they wearing something on their head
var/obj/item/clothing/head/HFP = src.head //if yes gets the flash protection value from that item
@@ -90,6 +90,10 @@
number += MFP.flash_protect
return number
+/mob/living/carbon/human/check_ear_prot()
+ if((ears && (ears.flags & EARBANGPROTECT)) || (head && (head.flags & HEADBANGPROTECT)))
+ return 1
+
///tintcheck()
///Checks eye covering items for visually impairing tinting, such as welding masks
///Checked in life.dm. 0 & 1 = no impairment, 2 = welding mask overlay, 3 = You can see jack, but you can't see shit.
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index 3a51992007d..5e8b695cd5b 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -452,12 +452,11 @@
/mob/living/carbon/proc/handle_disabilities()
//Eyes
- if(disabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own
- eye_blind = max(eye_blind, 1)
- else if(eye_blind) //blindness, heals slowly over time
- eye_blind = max(eye_blind-1,0)
- else if(eye_blurry) //blurry eyes heal slowly
- eye_blurry = max(eye_blurry-1, 0)
+ if(!(disabilities & BLIND) && !stat) //blindness from disability or unconsciousness doesn't get better on its own
+ if(eye_blind) //blindness, heals slowly over time
+ eye_blind = max(eye_blind-1,0)
+ else if(eye_blurry) //blurry eyes heal slowly
+ eye_blurry = max(eye_blurry-1, 0)
//Ears
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 3772bd681fa..782b47d5847 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -782,6 +782,20 @@ Sorry Giacom. Please don't be mad :(
animate(src, pixel_y = initial(pixel_y), time = 10)
floating = 0
+//called when the mob receives a bright flash
+/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0)
+ if(check_eye_prot() < intensity && (override_blindness_check || !(disabilities & BLIND)))
+ flick("e_flash", flash)
+ return 1
+
+//this returns the mob's protection against eye damage (number between -1 and 2)
+/mob/living/proc/check_eye_prot()
+ return 0
+
+//this returns the mob's protection against ear damage (0 or 1)
+/mob/living/proc/check_ear_prot()
+ return 0
+
// The src mob is trying to strip an item from someone
// Override if a certain type of mob should be behave differently when stripping items (can't, for example)
/mob/living/stripPanelUnequip(obj/item/what, mob/who, where)
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 461456ff887..68eeaf670d7 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -338,7 +338,7 @@
var/datum/atom_hud/medsensor = huds[med_hud]
medsensor.add_hud_to(src)
-/mob/living/silicon/verb/sensor_mode()
+/mob/living/silicon/proc/sensor_mode()
set name = "Set Sensor Augmentation"
var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security", "Medical","Disable")
remove_med_sec_hud()
diff --git a/code/modules/reagents/Chemistry-Goon-Medicine.dm b/code/modules/reagents/Chemistry-Goon-Medicine.dm
index e9961c019cc..3727321ce59 100644
--- a/code/modules/reagents/Chemistry-Goon-Medicine.dm
+++ b/code/modules/reagents/Chemistry-Goon-Medicine.dm
@@ -703,8 +703,7 @@ proc/chemical_mob_spawn(var/datum/reagents/holder, var/amount_to_spawn, var/reac
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/H in viewers(get_turf(holder.my_atom), null))
- if(H:eyecheck() <= 0)
- flick("e_flash", H.flash)
+ H.flash_eyes()
for(var/i = 1, i <= amount_to_spawn, i++)
var/chosen = pick(critters)
var/mob/living/simple_animal/hostile/C = new chosen
diff --git a/code/modules/reagents/Chemistry-Goon-Pyrotechnics.dm b/code/modules/reagents/Chemistry-Goon-Pyrotechnics.dm
index 58ea8bd1caf..88af547398e 100644
--- a/code/modules/reagents/Chemistry-Goon-Pyrotechnics.dm
+++ b/code/modules/reagents/Chemistry-Goon-Pyrotechnics.dm
@@ -213,7 +213,7 @@
s.set_up(2, 1, location)
s.start()
for(var/mob/living/carbon/C in get_hearers_in_view(5, location))
- if(C.eyecheck())
+ if(C.check_eye_prot())
continue
flick("e_flash", C.flash)
if(get_dist(C, location) < 4)
@@ -229,7 +229,7 @@
s.set_up(2, 1, location)
s.start()
for(var/mob/living/carbon/C in get_hearers_in_view(5, location))
- if(C.eyecheck())
+ if(C.check_eye_prot())
continue
flick("e_flash", C.flash)
if(get_dist(C, location) < 4)
diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm
index f5b4b6ed5fd..5e7dc18f0da 100644
--- a/code/modules/reagents/Chemistry-Recipes.dm
+++ b/code/modules/reagents/Chemistry-Recipes.dm
@@ -58,12 +58,6 @@ silicate
required_reagents = list("aluminium" = 1, "silicon" = 1, "oxygen" = 1)
result_amount = 3
*/
-/datum/chemical_reaction/stoxin
- name = "Sleep Toxin"
- id = "stoxin"
- result = "stoxin"
- required_reagents = list("chloralhydrate" = 1, "sugar" = 4)
- result_amount = 5
/datum/chemical_reaction/sterilizine
name = "Sterilizine"
@@ -549,8 +543,7 @@ datum/chemical_reaction/pestkiller
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
- if(M:eyecheck() <= 0)
- flick("e_flash", M.flash)
+ M.flash_eyes()
for(var/i = 1, i <= 4 + rand(1,2), i++)
var/chosen = pick(borks)
@@ -580,8 +573,7 @@ datum/chemical_reaction/pestkiller
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
- if(M:eyecheck() <= 0)
- flick("e_flash", M.flash)
+ M.flash_eyes()
for(var/i = 1, i <= 4 + rand(1,2), i++)
var/chosen = pick(borks)
diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm
index 6eae3e52b29..f1c55d5a383 100644
--- a/code/modules/reagents/reagent_containers/spray.dm
+++ b/code/modules/reagents/reagent_containers/spray.dm
@@ -62,19 +62,35 @@
/obj/item/weapon/reagent_containers/spray/proc/spray(var/atom/A)
+ var/range = max(min(spray_currentrange, get_dist(src, A)), 1)
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src))
D.create_reagents(amount_per_transfer_from_this)
- reagents.trans_to(D, amount_per_transfer_from_this, 1/spray_currentrange)
+ reagents.trans_to(D, amount_per_transfer_from_this, 1/range)
D.color = mix_color_from_reagents(D.reagents.reagent_list)
+ var/puff_reagent_left = range //how many turf, mob or dense objet we can react with before we consider the chem puff consumed
+ var/wait_step = max(round(9/range),2)
spawn(0)
- for(var/i=0, i 0)
+ D.reagents.reaction(get_turf(D))
+ puff_reagent_left -= 1
+
+ if(puff_reagent_left <= 0) // we used all the puff so we delete it.
+ qdel(D)
+ return
+ qdel(D)
/obj/item/weapon/reagent_containers/spray/attack_self(var/mob/user)
@@ -146,41 +162,16 @@
/obj/item/weapon/reagent_containers/spray/chemsprayer/spray(var/atom/A)
- var/Sprays[3]
- for(var/i=1, i<=3, i++) // intialize sprays
- if(src.reagents.total_volume < 1) break
- var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src))
- D.create_reagents(amount_per_transfer_from_this)
- src.reagents.trans_to(D, amount_per_transfer_from_this)
-
- D.color = mix_color_from_reagents(D.reagents.reagent_list)
-
- Sprays[i] = D
-
var/direction = get_dir(src, A)
var/turf/T = get_turf(A)
var/turf/T1 = get_step(T,turn(direction, 90))
var/turf/T2 = get_step(T,turn(direction, -90))
var/list/the_targets = list(T,T1,T2)
- for(var/i=1, i<=Sprays.len, i++)
- spawn()
- var/obj/effect/decal/chempuff/D = Sprays[i]
- if(!D) continue
-
- // Spreads the sprays a little bit
- var/turf/my_target = pick(the_targets)
- the_targets -= my_target
-
- for(var/j=0, j<=spray_currentrange, j++)
- step_towards(D, my_target)
- D.reagents.reaction(get_turf(D))
- for(var/atom/t in get_turf(D))
- D.reagents.reaction(t)
- sleep(2)
- qdel(D)
-
-
+ for(var/i=1, i<=3, i++) // intialize sprays
+ if(reagents.total_volume < 1)
+ return
+ ..(the_targets[i])
/obj/item/weapon/reagent_containers/spray/chemsprayer/attack_self(var/mob/user)
diff --git a/icons/obj/hydroponics/harvest.dmi b/icons/obj/hydroponics/harvest.dmi
index f841e089491..a6973c6bf1e 100644
Binary files a/icons/obj/hydroponics/harvest.dmi and b/icons/obj/hydroponics/harvest.dmi differ