mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Revert "Emitters and subtype use dumbfire, refactor again the process."
This commit is contained in:
@@ -77,54 +77,6 @@
|
||||
returnToPool(in_chamber)
|
||||
return output //Send it back to the gun!
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
return prob(95)
|
||||
else
|
||||
return 1
|
||||
|
||||
process()
|
||||
if(kill_count < 1)
|
||||
//del(src)
|
||||
returnToPool(src)
|
||||
return
|
||||
kill_count--
|
||||
spawn while(loc)
|
||||
if((!( current ) || loc == current))
|
||||
current = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z)
|
||||
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
|
||||
//del(src)
|
||||
returnToPool(src)
|
||||
return
|
||||
step_towards(src, current)
|
||||
if(!bumped && !isturf(original))
|
||||
if(loc == get_turf(original))
|
||||
if(!(original in permutated))
|
||||
Bump(original)
|
||||
sleep(1)
|
||||
sleep(1)
|
||||
return
|
||||
proc/dumbfire(var/dir) // for spacepods, go snowflake go
|
||||
if(!dir)
|
||||
//del(src)
|
||||
returnToPool(src)
|
||||
if(kill_count < 1)
|
||||
//del(src)
|
||||
returnToPool(src)
|
||||
kill_count--
|
||||
spawn while(loc)
|
||||
var/turf/T = get_step(src, dir)
|
||||
step_towards(src, T)
|
||||
if(!bumped && !isturf(original))
|
||||
if(loc == get_turf(original))
|
||||
if(!(original in permutated))
|
||||
Bump(original)
|
||||
sleep(1)
|
||||
sleep(1)
|
||||
return
|
||||
|
||||
Bump(atom/A as mob|obj|turf|area)
|
||||
if(A == firer)
|
||||
loc = A.loc
|
||||
@@ -213,8 +165,63 @@
|
||||
O.bullet_act(src)
|
||||
for(var/mob/M in A)
|
||||
M.bullet_act(src, def_zone)
|
||||
spawn()//if(!istype(src, /obj/item/projectile/beam/lightning))
|
||||
density = 0
|
||||
invisibility = 101
|
||||
//del(src)
|
||||
returnToPool(src)
|
||||
return 1
|
||||
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
return prob(95)
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
process()
|
||||
if(kill_count < 1)
|
||||
//del(src)
|
||||
returnToPool(src)
|
||||
return
|
||||
kill_count--
|
||||
spawn while(loc)
|
||||
if((!( current ) || loc == current))
|
||||
current = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z)
|
||||
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
|
||||
//del(src)
|
||||
returnToPool(src)
|
||||
return
|
||||
step_towards(src, current)
|
||||
if(!bumped && !isturf(original))
|
||||
if(loc == get_turf(original))
|
||||
if(!(original in permutated))
|
||||
Bump(original)
|
||||
sleep(1)
|
||||
sleep(1)
|
||||
return
|
||||
proc/dumbfire(var/dir) // for spacepods, go snowflake go
|
||||
if(!dir)
|
||||
//del(src)
|
||||
returnToPool(src)
|
||||
if(kill_count < 1)
|
||||
//del(src)
|
||||
returnToPool(src)
|
||||
kill_count--
|
||||
spawn while(loc)
|
||||
var/turf/T = get_step(src, dir)
|
||||
step_towards(src, T)
|
||||
if(!bumped && !isturf(original))
|
||||
if(loc == get_turf(original))
|
||||
if(!(original in permutated))
|
||||
Bump(original)
|
||||
sleep(1)
|
||||
sleep(1)
|
||||
return
|
||||
|
||||
/obj/item/projectile/test //Used to see if you can hit them.
|
||||
invisibility = 101 //Nope! Can't see me!
|
||||
yo = null
|
||||
|
||||
@@ -180,8 +180,6 @@ var/list/beam_master = list()
|
||||
/obj/item/projectile/beam
|
||||
name = "laser"
|
||||
icon_state = "laser"
|
||||
invisibility = 101
|
||||
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
damage = 30
|
||||
damage_type = BURN
|
||||
@@ -193,25 +191,18 @@ var/list/beam_master = list()
|
||||
var/reference = "\ref[src]"
|
||||
|
||||
spawn(0)
|
||||
var/nextLoc = locate(Clamp(x + xo, 1, world.maxx), Clamp(y + yo, 1, world.maxy), z)
|
||||
var/target_dir
|
||||
var/nextLoc
|
||||
|
||||
while(src && --kill_count >= 0)
|
||||
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
|
||||
break
|
||||
returnToPool(src)
|
||||
return
|
||||
|
||||
nextLoc = locate(Clamp(x + xo, 1, world.maxx), Clamp(y + yo, 1, world.maxy), z)
|
||||
if(loc == nextLoc)
|
||||
nextLoc = locate(Clamp(x + xo, 1, world.maxx), Clamp(y + yo, 1, world.maxy), z)
|
||||
|
||||
step_towards(src, nextLoc, 0)
|
||||
|
||||
if(bumped)
|
||||
break
|
||||
|
||||
if(get_turf(original) == loc)
|
||||
if(!isturf(original) && !(original in permutated))
|
||||
Bump(original)
|
||||
break
|
||||
|
||||
target_dir = get_dir(src, nextLoc)
|
||||
|
||||
if(!("[icon_state][target_dir]" in beam_master))
|
||||
@@ -232,24 +223,28 @@ var/list/beam_master = list()
|
||||
turfs["[icon_state][target_dir]"] = list(loc)
|
||||
beam_master[reference] = turfs
|
||||
|
||||
returnToPool(src)
|
||||
|
||||
cleanup(reference)
|
||||
|
||||
/obj/item/projectile/beam/dumbfire()
|
||||
/obj/item/projectile/beam/dumbfire(const/dir)
|
||||
if(!(dir in alldirs))
|
||||
returnToPool(src)
|
||||
return
|
||||
|
||||
var/reference = "\ref[src]"
|
||||
|
||||
spawn(0)
|
||||
var/nextLoc = locate(Clamp(x + xo, 1, world.maxx), Clamp(y + yo, 1, world.maxy), z)
|
||||
var/target_dir = dir
|
||||
|
||||
while(src && --kill_count >= 0)
|
||||
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
|
||||
break
|
||||
returnToPool(src)
|
||||
return
|
||||
|
||||
step(src, target_dir)
|
||||
if(loc == nextLoc)
|
||||
nextLoc = locate(Clamp(x + xo, 1, world.maxx), Clamp(y + yo, 1, world.maxy), z)
|
||||
|
||||
if(bumped)
|
||||
break
|
||||
step_towards(src, nextLoc, 0)
|
||||
|
||||
if(!("[icon_state][target_dir]" in beam_master))
|
||||
beam_master["[icon_state][target_dir]"] = image(icon, icon_state, 10, target_dir)
|
||||
@@ -269,8 +264,6 @@ var/list/beam_master = list()
|
||||
turfs["[icon_state][target_dir]"] = list(loc)
|
||||
beam_master[reference] = turfs
|
||||
|
||||
returnToPool(src)
|
||||
|
||||
cleanup(reference)
|
||||
|
||||
/obj/item/projectile/beam/Destroy()
|
||||
@@ -288,6 +281,8 @@ var/list/beam_master = list()
|
||||
A.overlays -= beam_master[laser_state]
|
||||
turfs -= A
|
||||
|
||||
returnToPool(src)
|
||||
|
||||
/obj/item/projectile/beam/practice
|
||||
name = "laser"
|
||||
icon_state = "laser"
|
||||
|
||||
Reference in New Issue
Block a user