mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-25 17:51:17 +00:00
Guns:
The projectile code has been mostly reworked to provide better support for effects, dynamic damage, etc. This also makes adding new projectiles easier for other coders. This is a pretty big change! If you see any bugs, get on IRC and bug me about it before the change goes live on the server!
Miscellaneous:
I fixed some bugs with Metroids hopefully. Turrets now don't identify people laying down as a threat.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1884 316c924e-a436-60f5-8080-3fe189b3f50e
48 lines
1.2 KiB
Plaintext
48 lines
1.2 KiB
Plaintext
/obj/alien/egg/New()
|
|
if(aliens_allowed)
|
|
src.density = 0 // Aliens use resin walls to block paths now. I am lazy and didn't feel like going to the define. -- TLE
|
|
spawn(1800)
|
|
src.open()
|
|
else
|
|
del(src)
|
|
|
|
/obj/alien/egg/proc/open()
|
|
spawn(10)
|
|
src.density = 0
|
|
src.icon_state = "egg_hatched"
|
|
new /obj/alien/facehugger(src.loc)
|
|
|
|
/obj/alien/egg/bullet_act(var/obj/item/projectile/Proj)
|
|
health -= Proj.damage
|
|
healthcheck()
|
|
return
|
|
|
|
/obj/alien/egg/attackby(var/obj/item/weapon/W, var/mob/user)
|
|
if(health <= 0)
|
|
return
|
|
src.visible_message("\red <B>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
|
|
var/damage = W.force / 4.0
|
|
|
|
if(istype(W, /obj/item/weapon/weldingtool))
|
|
var/obj/item/weapon/weldingtool/WT = W
|
|
|
|
if(WT.welding)
|
|
damage = 15
|
|
playsound(src.loc, 'Welder.ogg', 100, 1)
|
|
|
|
src.health -= damage
|
|
src.healthcheck()
|
|
|
|
|
|
/obj/alien/egg/proc/healthcheck()
|
|
if(health <= 0)
|
|
if(prob(15))
|
|
open()
|
|
else
|
|
src.icon_state = "egg_hatched"
|
|
|
|
|
|
/obj/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
|
if(exposed_temperature > 500)
|
|
health -= 5
|
|
healthcheck() |