mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
Merge pull request #4639 from RemieRichards/AtomPool
/tg/station Atom/Movable Pool + Pooling of Emitter beams and Say() Virtualspeakers
This commit is contained in:
@@ -50,10 +50,13 @@
|
||||
var/forcedodge = 0
|
||||
|
||||
|
||||
|
||||
/obj/item/projectile/proc/delete()
|
||||
// Garbage collect the projectiles
|
||||
loc = null
|
||||
|
||||
|
||||
|
||||
/obj/item/projectile/proc/on_hit(var/atom/target, var/blocked = 0, var/hit_zone)
|
||||
if(!isliving(target)) return 0
|
||||
if(isanimal(target)) return 0
|
||||
@@ -67,8 +70,8 @@
|
||||
else
|
||||
return 50 //if the projectile doesn't do damage, play its hitsound at 50% volume
|
||||
|
||||
/obj/item/projectile/Bump(atom/A as mob|obj|turf|area)
|
||||
|
||||
/obj/item/projectile/Bump(atom/A as mob|obj|turf|area)
|
||||
if(A == firer)
|
||||
loc = A.loc
|
||||
return 0 //cannot shoot yourself
|
||||
@@ -120,8 +123,7 @@
|
||||
permutated.Add(A)
|
||||
return 0
|
||||
|
||||
density = 0
|
||||
invisibility = 101
|
||||
|
||||
delete()
|
||||
return 0
|
||||
return 1
|
||||
@@ -141,9 +143,9 @@
|
||||
delete()
|
||||
return
|
||||
kill_count--
|
||||
spawn while(src && src.loc)
|
||||
spawn while(loc)
|
||||
if((!( current ) || loc == current))
|
||||
current = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z)
|
||||
current = locate(Clamp(x+xo,1,world.maxx),Clamp(y+yo,1,world.maxy),z)
|
||||
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
|
||||
delete()
|
||||
return
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
icon_state = "emitter"
|
||||
damage = 30
|
||||
|
||||
/obj/item/projectile/beam/emitter/delete() //what projectiles use to set loc = null
|
||||
PlaceInPool(src)
|
||||
|
||||
/obj/item/projectile/lasertag
|
||||
name = "laser tag beam"
|
||||
|
||||
Reference in New Issue
Block a user