Adds a freeze ray gun (#11114)

This pr adds a freeze ray gun. It works by reducing the mob's temperature until they freeze and get stuck inside ice for a while. The gun also has an alt-fire mode that fires ice bolt.
This commit is contained in:
Alberyk
2021-02-06 17:45:46 +02:00
committed by GitHub
parent afeb4a0849
commit 1a98599edd
13 changed files with 119 additions and 17 deletions
@@ -44,19 +44,7 @@
health = L.health + 300 //stoning damaged mobs will result in easier to shatter statues
L.frozen = TRUE
appearance = L
dir = L.dir
color = list(
0.30, 0.3, 0.25,
0.30, 0.3, 0.25,
0.30, 0.3, 0.25
)
name = "statue of [L.name]"
desc = "An incredibly lifelike stone carving."
if(iscorgi(L))
name = "statue of a corgi"
desc = "If it takes forever, I will wait for you..."
create_icon(L)
var/mob/statue_mob/temporarymob = new (src)
temporarymob.forceMove(src)
@@ -85,6 +73,21 @@
/obj/structure/closet/statue/content_info()
return
/obj/structure/closet/statue/proc/create_icon(var/mob/living/L)
appearance = L
dir = L.dir
color = list(
0.30, 0.3, 0.25,
0.30, 0.3, 0.25,
0.30, 0.3, 0.25
)
name = "statue of [L.name]"
desc = "An incredibly lifelike stone carving."
if(iscorgi(L))
name = "statue of a corgi"
desc = "If it takes forever, I will wait for you..."
/obj/structure/closet/statue/dump_contents()
for(var/obj/O in src)
@@ -164,3 +167,28 @@
dump_contents()
visible_message("<span class='warning'>[src] shatters!.</span>")
qdel(src)
/obj/structure/closet/statue/ice
name = "ice cube"
desc = "A large ice cube."
anchored = FALSE
/obj/structure/closet/statue/ice/create_icon(var/mob/living/L)
appearance = L
dir = L.dir
var/image/I
I = image(icon = 'icons/obj/statue.dmi', icon_state = "icecube")
add_overlay(I)
/obj/structure/closet/statue/ice/shatter(mob/user as mob)
if (user)
user.frozen = FALSE
if(isliving(user))
var/mob/living/L = user
L.adjustBruteLoss(30)
L.bodytemperature -= 150
dump_contents()
visible_message("<span class='warning'>\The [src] shatters!</span>")
qdel(src)