Icon smoothing and icon update refactor (#17569)

* Atomization

* asdfsadf

* sdfas

---------

Co-authored-by: FluffyGhost <FluffyGhost>
This commit is contained in:
Fluffy
2023-10-12 21:23:28 +00:00
committed by GitHub
co-authored by FluffyGhost <FluffyGhost>
parent bb4d89a498
commit 8bb0ecfcd3
7 changed files with 223 additions and 48 deletions
+19 -3
View File
@@ -13,9 +13,15 @@
desc = "A small wrapped package."
w_class = ITEMSIZE_NORMAL
var/power = 1 /*Size of the explosion.*/
///Size of the explosion
var/power = 1
///Used for the icon
var/size = "small" /*Used for the icon, this one will make c-4small_0 for the off state.*/
///The detonator that makes this C4 charge explode
var/obj/item/syndie/c4detonator/detonator = null
/obj/item/syndie/c4explosive/heavy
icon_state = "c-4large_0"
item_state = "c-4large"
@@ -23,15 +29,21 @@
power = 2
size = "large"
/obj/item/syndie/c4explosive/New()
/obj/item/syndie/c4explosive/Initialize()
. = ..()
var/K = rand(1,2000)
K = md5(num2text(K)+name)
K = copytext(K,1,7)
src.desc += "\n You see [K] engraved on \the [src]."
var/obj/item/syndie/c4detonator/detonator = new(src.loc)
detonator = new(src.loc)
detonator.desc += "\n You see [K] engraved on the lighter."
detonator.bomb = src
/obj/item/syndie/c4explosive/Destroy()
. = ..()
QDEL_NULL(detonator)
/obj/item/syndie/c4explosive/proc/detonate()
icon_state = "c-4[size]_1"
spawn(50)
@@ -60,6 +72,10 @@
var/obj/item/syndie/c4explosive/bomb
var/pr_open = 0 /*Is the "What do you want to do?" prompt open?*/
/obj/item/syndie/c4detonator/Destroy()
bomb = null
. = ..()
/obj/item/syndie/c4detonator/attack_self(mob/user as mob)
switch(src.icon_state)
if("c-4detonator_0")