mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
[MIRROR] Potted plant revival [MDB IGNORE] (#21500)
* Potted plant revival * Apply suggestions from code review --------- Co-authored-by: Andrew <mt.forspam@gmail.com> Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
This commit is contained in:
@@ -181,9 +181,7 @@
|
||||
/area/ruin/space/ancientstation/delta/ai)
|
||||
"aO" = (
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/item/kirbyplants{
|
||||
icon_state = "plant-25"
|
||||
},
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/effect/decal/cleanable/cobweb,
|
||||
/obj/effect/turf_decal/tile/blue/anticorner/contrasted{
|
||||
dir = 1
|
||||
@@ -444,9 +442,7 @@
|
||||
/area/ruin/space/ancientstation/charlie/hall)
|
||||
"bP" = (
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/item/kirbyplants{
|
||||
icon_state = "plant-25"
|
||||
},
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/effect/turf_decal/tile/blue/anticorner/contrasted{
|
||||
dir = 4
|
||||
},
|
||||
@@ -4108,9 +4104,7 @@
|
||||
/turf/open/floor/iron,
|
||||
/area/ruin/space/ancientstation/delta/hall)
|
||||
"od" = (
|
||||
/obj/item/kirbyplants{
|
||||
icon_state = "plant-25"
|
||||
},
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/structure/cable,
|
||||
@@ -4216,9 +4210,7 @@
|
||||
/turf/open/floor/iron,
|
||||
/area/ruin/space/ancientstation/delta/hall)
|
||||
"ow" = (
|
||||
/obj/item/kirbyplants{
|
||||
icon_state = "plant-25"
|
||||
},
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/effect/decal/cleanable/cobweb,
|
||||
/obj/machinery/light/small/broken/directional/west,
|
||||
/obj/effect/turf_decal/tile/blue/anticorner/contrasted{
|
||||
@@ -5107,9 +5099,7 @@
|
||||
/area/ruin/space/ancientstation/charlie/hydro)
|
||||
"vp" = (
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/item/kirbyplants{
|
||||
icon_state = "plant-25"
|
||||
},
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer4{
|
||||
dir = 8
|
||||
},
|
||||
@@ -5724,9 +5714,7 @@
|
||||
/turf/closed/mineral/plasma,
|
||||
/area/ruin/space/ancientstation/beta/hall)
|
||||
"Ay" = (
|
||||
/obj/item/kirbyplants{
|
||||
icon_state = "plant-25"
|
||||
},
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/effect/turf_decal/tile/purple/anticorner/contrasted,
|
||||
@@ -5754,9 +5742,7 @@
|
||||
/area/ruin/space/ancientstation/beta/medbay)
|
||||
"AM" = (
|
||||
/obj/machinery/light/small/directional/east,
|
||||
/obj/item/kirbyplants{
|
||||
icon_state = "plant-25"
|
||||
},
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/effect/turf_decal/tile/green/anticorner/contrasted{
|
||||
dir = 4
|
||||
},
|
||||
@@ -5954,9 +5940,7 @@
|
||||
/area/ruin/space/ancientstation/charlie/kitchen)
|
||||
"Cz" = (
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/item/kirbyplants{
|
||||
icon_state = "plant-25"
|
||||
},
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer4{
|
||||
dir = 4
|
||||
},
|
||||
@@ -7575,9 +7559,7 @@
|
||||
/turf/open/floor/plating,
|
||||
/area/ruin/space/ancientstation/beta/hall)
|
||||
"PZ" = (
|
||||
/obj/item/kirbyplants{
|
||||
icon_state = "plant-25"
|
||||
},
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
@@ -8321,9 +8303,7 @@
|
||||
/area/ruin/space/ancientstation/charlie/sec)
|
||||
"XU" = (
|
||||
/obj/machinery/light/small/directional/west,
|
||||
/obj/item/kirbyplants{
|
||||
icon_state = "plant-25"
|
||||
},
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/effect/turf_decal/tile/green/anticorner/contrasted{
|
||||
dir = 1
|
||||
},
|
||||
|
||||
@@ -71606,7 +71606,7 @@
|
||||
"ykY" = (
|
||||
/obj/effect/decal/cleanable/dirt/dust,
|
||||
/obj/machinery/light/small/directional/east,
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/item/kirbyplants/dead/research_director,
|
||||
/turf/open/floor/iron/dark/small,
|
||||
/area/station/command/heads_quarters/rd)
|
||||
"ykZ" = (
|
||||
|
||||
@@ -76669,7 +76669,7 @@
|
||||
/obj/effect/mapping_helpers/requests_console/ore_update,
|
||||
/obj/effect/mapping_helpers/requests_console/information,
|
||||
/obj/effect/mapping_helpers/requests_console/assistance,
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/item/kirbyplants/dead/research_director,
|
||||
/obj/machinery/light/directional/west,
|
||||
/obj/effect/turf_decal/tile/neutral/half/contrasted{
|
||||
dir = 1
|
||||
|
||||
@@ -14334,7 +14334,7 @@
|
||||
dir = 8
|
||||
},
|
||||
/obj/machinery/light/directional/west,
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/item/kirbyplants/dead/research_director,
|
||||
/obj/machinery/computer/security/telescreen/rd{
|
||||
dir = 4;
|
||||
pixel_x = -26
|
||||
|
||||
@@ -43049,7 +43049,7 @@
|
||||
/obj/effect/turf_decal/siding{
|
||||
dir = 4
|
||||
},
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/item/kirbyplants/dead/research_director,
|
||||
/obj/effect/turf_decal/tile/neutral/opposingcorners{
|
||||
dir = 1
|
||||
},
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
/turf/open/floor/carpet/blue,
|
||||
/area/station/command/meeting_room)
|
||||
"adj" = (
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/item/kirbyplants/dead/research_director,
|
||||
/obj/effect/turf_decal/tile/purple/opposingcorners,
|
||||
/turf/open/floor/iron/white,
|
||||
/area/station/command/heads_quarters/rd)
|
||||
@@ -60773,9 +60773,7 @@
|
||||
/obj/effect/turf_decal/siding/wood{
|
||||
dir = 1
|
||||
},
|
||||
/obj/item/kirbyplants{
|
||||
icon_state = "plant-25"
|
||||
},
|
||||
/obj/item/kirbyplants/dead,
|
||||
/turf/open/floor/wood,
|
||||
/area/station/security/detectives_office)
|
||||
"pPr" = (
|
||||
|
||||
@@ -32379,7 +32379,7 @@
|
||||
/turf/open/floor/iron,
|
||||
/area/station/maintenance/tram/mid)
|
||||
"kxF" = (
|
||||
/obj/item/kirbyplants/dead,
|
||||
/obj/item/kirbyplants/dead/research_director,
|
||||
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
|
||||
/obj/structure/disposalpipe/segment{
|
||||
dir = 4
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
//icon = 'icons/obj/flora/plants.dmi' // ORIGINAL
|
||||
icon = 'modular_skyrat/modules/aesthetics/plants/plants.dmi' // SKYRAT EDIT CHANGE
|
||||
icon_state = "plant-01"
|
||||
base_icon_state = "plant-01"
|
||||
desc = "A little bit of nature contained in a pot."
|
||||
layer = ABOVE_MOB_LAYER
|
||||
plane = GAME_PLANE_UPPER
|
||||
@@ -16,6 +17,8 @@
|
||||
|
||||
/// Can this plant be trimmed by someone with TRAIT_BONSAI
|
||||
var/trimmable = TRUE
|
||||
/// Whether this plant is dead and requires a seed to revive
|
||||
var/dead = FALSE
|
||||
var/list/static/random_plant_states
|
||||
/// Maximum icon state number - KEEP THIS UP TO DATE
|
||||
var/random_state_cap = 43 // SKYRAT EDIT ADDITION
|
||||
@@ -26,13 +29,23 @@
|
||||
AddComponent(/datum/component/two_handed, require_twohands=TRUE, force_unwielded=10, force_wielded=10)
|
||||
AddElement(/datum/element/beauty, 500)
|
||||
|
||||
/obj/item/kirbyplants/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = dead ? "plant-25" : base_icon_state
|
||||
|
||||
/obj/item/kirbyplants/attackby(obj/item/I, mob/living/user, params)
|
||||
. = ..()
|
||||
if(trimmable && HAS_TRAIT(user,TRAIT_BONSAI) && isturf(loc) && I.get_sharpness())
|
||||
if(!dead && trimmable && HAS_TRAIT(user,TRAIT_BONSAI) && isturf(loc) && I.get_sharpness())
|
||||
to_chat(user,span_notice("You start trimming [src]."))
|
||||
if(do_after(user,3 SECONDS,target=src))
|
||||
to_chat(user,span_notice("You finish trimming [src]."))
|
||||
change_visual()
|
||||
if(dead && istype(I, /obj/item/seeds))
|
||||
to_chat(user,span_notice("You start planting a new seed into the pot."))
|
||||
if(do_after(user,3 SECONDS,target=src))
|
||||
qdel(I)
|
||||
dead = FALSE
|
||||
update_appearance(UPDATE_ICON)
|
||||
|
||||
/// Cycle basic plant visuals
|
||||
/obj/item/kirbyplants/proc/change_visual()
|
||||
@@ -56,7 +69,7 @@
|
||||
|
||||
/obj/item/kirbyplants/proc/generate_states()
|
||||
random_plant_states = list()
|
||||
for(var/i in 1 to random_state_cap) //SKYRAT EDIT CHANGE - ORIGINAL: for(var/i in 1 to 25)
|
||||
for(var/i in 1 to random_state_cap) //SKYRAT EDIT CHANGE - ORIGINAL: for(var/i in 1 to 24)
|
||||
var/number
|
||||
if(i < 10)
|
||||
number = "0[i]"
|
||||
@@ -66,10 +79,13 @@
|
||||
random_plant_states += list("applebush", "monkeyplant") //SKYRAT EDIT CHANGE - ORIGINAL:random_plant_states += "applebush"
|
||||
|
||||
/obj/item/kirbyplants/dead
|
||||
name = "dead potted plant"
|
||||
desc = "The unidentifiable plant remnants make you feel like planting something new in the pot."
|
||||
dead = TRUE
|
||||
|
||||
/obj/item/kirbyplants/dead/research_director
|
||||
name = "RD's potted plant"
|
||||
desc = "A gift from the botanical staff, presented after the RD's reassignment. There's a tag on it that says \"Y'all come back now, y'hear?\"\nIt doesn't look very healthy..."
|
||||
icon_state = "plant-25"
|
||||
trimmable = FALSE
|
||||
|
||||
//SKYRAT EDIT ADDITION START
|
||||
/obj/item/kirbyplants/monkey
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/obj/item/kirbyplants{icon_state = "plant-25"} : /obj/item/kirbyplants/dead{@OLD;icon_state=@SKIP}
|
||||
Reference in New Issue
Block a user