mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 09:08:30 +01:00
Merge branch 'master' of https://github.com/tgstation/-tg-station into explosive
Conflicts: code/modules/reagents/Chemistry-Recipes.dm
This commit is contained in:
@@ -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("<span class='danger'>[src] injects [patient] with the syringe!</span>", \
|
||||
|
||||
@@ -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 << "<span class='notice'>You start to weld [src].</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
WT.eyecheck(user)
|
||||
busy = 1
|
||||
if(do_after(user, 100))
|
||||
busy = 0
|
||||
|
||||
@@ -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 << "<span class='notice'>You start to weld \the [src]..</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
WT.eyecheck(user)
|
||||
busy = 1
|
||||
if(do_after(user, 20))
|
||||
busy = 0
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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("<span class='disarm'>[user] blinds [M] with the flash!</span>")
|
||||
return 1
|
||||
else
|
||||
if(user && targeted)
|
||||
else
|
||||
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
|
||||
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("<span class='disarm'>[user] overloads [M]'s sensors with the flash!</span>")
|
||||
if(M.flash_eyes())
|
||||
M.Weaken(rand(5,10))
|
||||
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with the flash!</span>")
|
||||
return 1
|
||||
|
||||
user.visible_message("<span class='notice'>[user] fails to blind [M] with the flash!</span>")
|
||||
|
||||
@@ -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 = "<span class='notice'>You blind [C] by shining [src] in their eyes.</span>"
|
||||
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 << "<span class='info'>A small, bright dot appears in your vision.</span>"
|
||||
if(1)
|
||||
//industrial grade eye protection
|
||||
C.eye_stat += rand(0, 2)
|
||||
C << "<span class='notice'>Something bright flashes in the corner of your vision!</span>"
|
||||
if(2)
|
||||
//basic eye protection (sunglasses)
|
||||
flick("flash", C.flash)
|
||||
C.eye_stat += rand(1, 6)
|
||||
C << "<span class='danger'>Your eyes were blinded!</span>"
|
||||
if(3)
|
||||
//no eye protection
|
||||
if(prob(2))
|
||||
C.Weaken(1)
|
||||
flick("e_flash", C.flash)
|
||||
C.eye_stat += rand(3, 7)
|
||||
C << "<span class='danger'>Your eyes were blinded!</span>"
|
||||
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 << "<span class='danger'>Your eyes were blinded!</span>"
|
||||
else
|
||||
outmsg = "<span class='notice'>You fail to blind [C] by shining [src] at their eyes.</span>"
|
||||
|
||||
@@ -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 << "<span class='warning'>Your sensors were overloaded by a laser!</span>"
|
||||
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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("<span class='warning'>BANG</span>", 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 << "<span class='warning'>Your eyes start to burn badly!</span>"
|
||||
M.disabilities |= NEARSIGHT
|
||||
if(!banglet)
|
||||
if (prob(M.eye_stat - 20 + 1))
|
||||
M << "<span class='warning'>You can't see anything!</span>"
|
||||
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 << "<span class='warning'>Your ears start to ring badly!</span>"
|
||||
if(!banglet)
|
||||
if(prob(M.ear_damage - 10 + 5))
|
||||
M << "<span class='warning'>You can't hear anything!</span>"
|
||||
M.disabilities |= DEAF
|
||||
if(prob(M.ear_damage - 10 + 5))
|
||||
M << "<span class='warning'>You can't hear anything!</span>"
|
||||
M.disabilities |= DEAF
|
||||
else
|
||||
if (M.ear_damage >= 5)
|
||||
M << "<span class='warning'>Your ears start to ring!</span>"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 << "<span class='warning'>Your eyes sting a little.</span>"
|
||||
user.eye_stat += rand(1, 2)
|
||||
if(user.eye_stat > 12)
|
||||
user.eye_blurry += rand(3, 6)
|
||||
if(0)
|
||||
usr << "<span class='warning'>Your eyes burn.</span>"
|
||||
user.eye_stat += rand(2, 4)
|
||||
if(user.eye_stat > 10)
|
||||
user.eye_blurry += rand(4, 10)
|
||||
if(-1)
|
||||
usr << "<span class='warning'>Your thermals intensify the welder's glow. Your eyes itch and burn severely!</span>"
|
||||
user.eye_blurry += rand(12, 20)
|
||||
user.eye_stat += rand(12, 16)
|
||||
if(user.eye_stat > 10 && safety < 2)
|
||||
user << "<span class='warning'>Your eyes are really starting to hurt. This can't be good for you!</span>"
|
||||
if (prob(user.eye_stat - 25 + 1))
|
||||
user << "<span class='warning'>You go blind!</span>"
|
||||
user.disabilities |= BLIND
|
||||
else if(prob(user.eye_stat - 15 + 1))
|
||||
user << "<span class='warning'>You go blind!</span>"
|
||||
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 << "<span class='notice'>Turn it off first.</span>"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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("<span class='notice'>You make planks out of \the [src]!</span>", 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("<span class='notice'>You make [plank_name] out of \the [src]!</span>", 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 << "<span class ='warning'> You must dry this first.</span>"
|
||||
|
||||
/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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 << "<span class='notice'>You use the sand to make sandstone.</span>"
|
||||
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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 << "<span class='warning'>Your eyes sting a little.</span>"
|
||||
if(prob(40))
|
||||
eye_stat += 1
|
||||
|
||||
/mob/living/carbon/proc/eyecheck()
|
||||
return 0
|
||||
if(2)
|
||||
src << "<span class='warning'>Your eyes burn.</span>"
|
||||
eye_stat += rand(2, 4)
|
||||
|
||||
else
|
||||
src << "Your eyes itch and burn severely!</span>"
|
||||
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 << "<span class='warning'>Your eyes start to burn badly!</span>"
|
||||
disabilities |= NEARSIGHT
|
||||
else if(prob(eye_stat - 25))
|
||||
src << "<span class='warning'>You can't see anything!</span>"
|
||||
disabilities |= BLIND
|
||||
else
|
||||
src << "<span class='warning'>Your eyes are really starting to hurt. This can't be good for you!</span>"
|
||||
return 1
|
||||
|
||||
else if(damage == 0) // just enough protection
|
||||
if(prob(20))
|
||||
src << "<span class='notice'>Something bright flashes in the corner of your vision!</span>"
|
||||
|
||||
/mob/living/carbon/proc/tintcheck()
|
||||
return 0
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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<spray_currentrange, i++)
|
||||
for(var/i=0, i<range, i++)
|
||||
step_towards(D,A)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/T in get_turf(D))
|
||||
D.reagents.reaction(T)
|
||||
sleep(3)
|
||||
qdel(D)
|
||||
sleep(wait_step)
|
||||
|
||||
for(var/atom/T in get_turf(D))
|
||||
if(T == D || T.invisibility) //we ignore the puff itself and stuff below the floor
|
||||
continue
|
||||
if(puff_reagent_left <= 0)
|
||||
break
|
||||
D.reagents.reaction(T)
|
||||
if(ismob(T)) //mobs are obstacles that consume part of the puff, shortening its range.
|
||||
puff_reagent_left -= 1
|
||||
|
||||
if(puff_reagent_left > 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)
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 42 KiB |
Reference in New Issue
Block a user