Potted Plants Content pack (#1533)

Ports 11 new potted plant sprites from paradise
The pack includes one sprite thats a bit unusual, its a plant that has an animated blinking eyeball for a flower. It looks pretty neat though, so i ported that too but added a reroll to make it much rarer

Also removes the dead plant sprite from the potted plant list, and instead makes it an actual death sprite. Adds some simple death mechanics for potted plants, allowing them to be killed by edged weapons, fire, explosions and projectiles.
This commit is contained in:
NanakoAC
2017-01-20 22:00:23 +02:00
committed by skull132
parent 755d2df181
commit 240eadbb6a
3 changed files with 73 additions and 1 deletions
+36 -1
View File
@@ -77,12 +77,47 @@
name = "potted plant"
icon = 'icons/obj/plants.dmi'
icon_state = "plant-26"
var/dead = 0
/obj/structure/flora/pottedplant/proc/death()
if (!dead)
icon_state = "plant-dead"
name = "dead [name]"
desc = "It looks dead."
dead = 1
//No complex interactions, just make them fragile
/obj/structure/flora/pottedplant/ex_act()
death()
return ..()
/obj/structure/flora/pottedplant/fire_act()
death()
return ..()
/obj/structure/flora/pottedplant/attackby(obj/item/weapon/W, mob/user)
if (W.edge)
user.visible_message(span("warning", "[user] cuts down the [src]"))
death()
return 1
return ..()
/obj/structure/flora/pottedplant/bullet_act(var/obj/item/projectile/Proj)
if (prob(Proj.damage*2))
death()
return 1
return ..()
//Added random icon selection for potted plants.
//It was silly they always used the same sprite when we have 26 sprites of them in the icon file
/obj/structure/flora/pottedplant/random/New()
..()
var/number = rand(1,26)
var/number = rand(1,36)
if (number == 36)
if (prob(90))//Make the wierd one rarer
number = rand(1,35)
else
desc = "It stares into your soul."
if (number < 10)
number = "0[number]"
icon_state = "plant-[number]"