mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
- Committing the updated recursive explosion code. It now takes into account objects too.
The following objects affect explosions: (Doors only when closed) Poddoor = 25 R-Wall = 25 Airlock = 15 Space = 10 Wall = 5 Window door = 5 Grille = 5 Plastic flaps = 5 Floor = 1 git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4585 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -12,9 +12,7 @@
|
||||
layer = 2.9
|
||||
var/health = 10
|
||||
var/destroyed = 0
|
||||
proc
|
||||
healthcheck()
|
||||
shock(mob/user, prb)
|
||||
explosion_resistance = 5
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -178,7 +176,7 @@
|
||||
return
|
||||
|
||||
|
||||
healthcheck()
|
||||
proc/healthcheck()
|
||||
if (src.health <= 0)
|
||||
if (!( src.destroyed ))
|
||||
src.icon_state = "brokengrille"
|
||||
@@ -197,7 +195,7 @@
|
||||
// shock user with probability prb (if all connections & power are working)
|
||||
// returns 1 if shocked, 0 otherwise
|
||||
|
||||
shock(mob/user, prb)
|
||||
proc/shock(mob/user, prb)
|
||||
if(!anchored || destroyed) // anchored/destroyed grilles are never connected
|
||||
return 0
|
||||
if(!prob(prb))
|
||||
|
||||
Reference in New Issue
Block a user