Compiles, and guns work™

This commit is contained in:
TheDZD
2016-05-31 22:50:55 -04:00
parent 95d7a68a75
commit a4e950d21a
74 changed files with 288 additions and 550 deletions
+1 -55
View File
@@ -167,8 +167,6 @@
animals lunging, etc.
*/
/mob/proc/RangedAttack(var/atom/A, var/params)
if(ishuman(src) && (istype(src:gloves, /obj/item/clothing/gloves/color/yellow/power)) && a_intent == I_HARM)
PowerGlove(A)
if(!mutations.len) return
if((LASER in mutations) && a_intent == I_HARM)
LaserEyes(A) // moved into a proc below
@@ -322,58 +320,6 @@
spawn(1)
LE.process()
/mob/proc/PowerGlove(atom/A)
return
/mob/living/carbon/human/PowerGlove(atom/A)
var/obj/item/clothing/gloves/color/yellow/power/G = src:gloves
var/time = 100
var/turf/T = get_turf(src)
var/turf/U = get_turf(A)
var/obj/structure/cable/cable = locate() in T
if(!cable || !istype(cable))
to_chat(src, "<span class='warning'>There is no cable here to power the gloves.</span>")
return
if(world.time < G.next_shock)
to_chat(src, "<span class='warning'>[G] aren't ready to shock again!</span>")
return
src.visible_message("<span class='warning'>[name] fires an arc of electricity!</span>", \
"<span class='warning'>You fire an arc of electricity!</span>", \
"You hear the loud crackle of electricity!")
var/datum/powernet/PN = cable.get_powernet()
var/available = 0
var/obj/item/projectile/beam/lightning/L = new /obj/item/projectile/beam/lightning/(get_turf(src))
if(PN)
available = PN.avail
L.damage = PN.get_electrocute_damage()
if(available >= 5000000)
L.damage = 205
if(L.damage >= 200)
time = 200
else if(L.damage >= 100)
time = 150
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if(L.damage <= 0)
qdel(L)
if(L)
playsound(get_turf(src), 'sound/effects/eleczap.ogg', 75, 1)
L.tang = L.adjustAngle(get_angle(U,T))
L.icon = midicon
L.icon_state = "[L.tang]"
L.firer = usr
L.def_zone = get_organ_target()
L.original = src
L.current = U
L.starting = U
L.yo = U.y - T.y
L.xo = U.x - T.x
spawn( 1 )
L.process()
next_move = world.time + 12
G.next_shock = world.time + time
// Simple helper to face what you clicked on, in case it should be needed in more than one place
/mob/proc/face_atom(var/atom/A)
@@ -419,4 +365,4 @@
else
var/turf/T = screen_loc2turf(modifiers["screen-loc"], get_turf(usr))
T.Click(location, control, params)
return 1
return 1