Merge branch 'master' of https://github.com/tgstation/-tg-station into explosive

Conflicts:
	code/modules/reagents/Chemistry-Recipes.dm
This commit is contained in:
Iamgoofball
2015-03-14 21:32:13 -07:00
26 changed files with 177 additions and 245 deletions
+10 -11
View File
@@ -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>")
+10 -42
View File
@@ -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
+3 -41
View File
@@ -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>"