mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
more options for matter decompiler (#20874)
This commit is contained in:
@@ -57,6 +57,11 @@
|
||||
/obj/item/grown/bananapeel/proc/choose_icon_state()
|
||||
icon_state = "[icon_state]_[rand(1, 3)]"
|
||||
|
||||
/obj/item/grown/bananapeel/decompile_act(obj/item/matter_decompiler/C, mob/user)
|
||||
C.stored_comms["wood"] += 1
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/item/grown/bananapeel/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is deliberately slipping on [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
playsound(loc, 'sound/misc/slip.ogg', 50, 1, -1)
|
||||
|
||||
@@ -138,15 +138,12 @@
|
||||
user.visible_message("<span class='warning'>[user] removes the power cell from [A]!</span>", "You remove the power cell.")
|
||||
return TRUE
|
||||
|
||||
//TODO: Matter decompiler.
|
||||
/obj/item/matter_decompiler
|
||||
|
||||
name = "matter decompiler"
|
||||
desc = "Eating trash, bits of glass, or other debris will replenish your stores."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "minigibber"
|
||||
|
||||
//Metal, glass, wood, plastic.
|
||||
/// Metal, glass, wood, plastic.
|
||||
var/list/stored_comms = list(
|
||||
"metal" = 0,
|
||||
"glass" = 0,
|
||||
@@ -157,14 +154,15 @@
|
||||
return
|
||||
|
||||
/obj/item/matter_decompiler/afterattack(atom/target, mob/living/user, proximity, params)
|
||||
if(!proximity) return //Not adjacent.
|
||||
if(!proximity)
|
||||
return // Not adjacent.
|
||||
|
||||
//We only want to deal with using this on turfs. Specific items aren't important.
|
||||
// We only want to deal with using this on turfs. Specific items aren't important.
|
||||
var/turf/T = get_turf(target)
|
||||
if(!istype(T))
|
||||
return
|
||||
|
||||
//Used to give the right message.
|
||||
// Used to give the right message.
|
||||
var/grabbed_something = FALSE
|
||||
|
||||
for(var/atom/movable/A in T)
|
||||
@@ -177,14 +175,13 @@
|
||||
to_chat(user, "<span class='warning'>Nothing on \the [T] is useful to you.</span>")
|
||||
return
|
||||
|
||||
//Putting the decompiler here to avoid doing list checks every tick.
|
||||
// Putting the decompiler here to avoid doing list checks every tick.
|
||||
/mob/living/silicon/robot/drone/use_power()
|
||||
|
||||
..()
|
||||
if(low_power_mode || !decompiler)
|
||||
return
|
||||
|
||||
//The decompiler replenishes drone stores from hoovered-up junk each tick.
|
||||
// The decompiler replenishes drone stores from hoovered-up junk each tick.
|
||||
for(var/type in decompiler.stored_comms)
|
||||
if(decompiler.stored_comms[type] > 0)
|
||||
var/obj/item/stack/sheet/stack
|
||||
|
||||
@@ -555,6 +555,11 @@
|
||||
if(info)
|
||||
icon_state = "scrap_words"
|
||||
|
||||
/obj/item/paper/crumpled/decompile_act(obj/item/matter_decompiler/C, mob/user)
|
||||
C.stored_comms["wood"] += 1
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/item/paper/crumpled/bloody
|
||||
icon_state = "scrap_bloodied"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user