Skip to content

Commit

Permalink
Borg Plushies Have Selectable Modules, Adds Missing Species Plushies …
Browse files Browse the repository at this point in the history
…to Plush Spawner (#27843)

* Creation

* pluuushie

* Update toys.dm

* Apply suggestions from code review

Co-authored-by: PollardTheDragon <[email protected]>
Signed-off-by: CRUNCH <[email protected]>

* Update code/game/objects/items/toys.dm

Co-authored-by: Piesuu <[email protected]>
Signed-off-by: CRUNCH <[email protected]>

* Apply suggestions from code review

Co-authored-by: Luc <[email protected]>
Signed-off-by: CRUNCH <[email protected]>

* Update toys.dm

---------

Signed-off-by: CRUNCH <[email protected]>
Co-authored-by: PollardTheDragon <[email protected]>
Co-authored-by: Piesuu <[email protected]>
Co-authored-by: Luc <[email protected]>
  • Loading branch information
4 people authored Jan 10, 2025
1 parent 3db86c8 commit 5e6629c
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 8 deletions.
16 changes: 11 additions & 5 deletions code/game/objects/effects/spawners/random/plushie_spawners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,19 @@
/obj/item/toy/plushie/tuxedo_cat
),

list(// species plushie minus nian
/obj/item/toy/plushie/voxplushie,
/obj/item/toy/plushie/ipcplushie,
list(// Species plushies minus Nian.
/obj/item/toy/plushie/dionaplushie,
/obj/item/toy/plushie/draskplushie,
/obj/item/toy/plushie/greyplushie,
/obj/item/toy/plushie/nianplushie,
/obj/item/toy/plushie/humanplushie,
/obj/item/toy/plushie/kidanplushie,
/obj/item/toy/plushie/ipcplushie,
/obj/item/toy/plushie/plasmamanplushie,
/obj/item/toy/plushie/skrellplushie,
/obj/item/toy/plushie/voxplushie,
/obj/item/toy/plushie/abductor,
/obj/item/toy/plushie/abductor/agent
/obj/item/toy/plushie/abductor/agent,
/obj/item/toy/plushie/borgplushie/random
),

list (
Expand Down
74 changes: 71 additions & 3 deletions code/game/objects/items/toys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1054,16 +1054,75 @@

/obj/item/toy/plushie/borgplushie
name = "borg plushie"
desc = "The synthetic backbone of the station, rendered in plush form. Inbuilt flashlight included!"
desc = "The synthetic backbone of the station, rendered in plush form. Features a built-in flashlight and polychromic fabric."
icon_state = "plushie_borg"
var/borg_plushie_overlay
var/borg_plushie_overlay = "plushie_borgassist"
var/plushie_module_selected = FALSE
var/on = FALSE

/obj/item/toy/plushie/borgplushie/Initialize(mapload)
. = ..()
borg_plushie_overlay = (pick("plushie_borgjan", "plushie_borgsec", "plushie_borgmed", "plushie_borgmine", "plushie_borgserv", "plushie_borgassist", "plushie_borgengi"))
update_icon()

/obj/item/toy/plushie/borgplushie/examine(mob/user)
. = ..()
if(!plushie_module_selected)
. += "<span class='notice'><b>Alt-Click</b> [src] to select a module.</span>"
else
. += "<span class='notice'>You can use a cyborg module reset board to change [src] back into standard mode.</span>"

/obj/item/toy/plushie/borgplushie/AltClick(mob/user)
if(!istype(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
return

pick_borg_plush_module(user)

/obj/item/toy/plushie/borgplushie/proc/pick_borg_plush_module(mob/user)
if(plushie_module_selected)
return

var/static/list/menu_options = list(
"Security" = image('icons/mob/robots.dmi', "security-radial"),
"Engineering" = image('icons/mob/robots.dmi', "engi-radial"),
"Mining" = image('icons/mob/robots.dmi', "mining-radial"),
"Service" = image('icons/mob/robots.dmi', "serv-radial"),
"Medical" = image('icons/mob/robots.dmi', "med-radial"),
"Janitor" = image('icons/mob/robots.dmi', "jan-radial")
)
var/static/list/plushie_module_overlays = list(
"Security" = "plushie_borgsec",
"Engineering" = "plushie_borgengi",
"Mining" = "plushie_borgmine",
"Service" = "plushie_borgserv",
"Medical" = "plushie_borgmed",
"Janitor" = "plushie_borgjan"
)
playsound(src, 'sound/effects/pop.ogg', 50, TRUE)
var/user_selection = show_radial_menu(user, src, menu_options, require_near = TRUE, radius = 42)

if(!user_selection)
return

borg_plushie_overlay = plushie_module_overlays[user_selection]
to_chat(user, "<span class='notice'>The fabric on [src] changes color, transforming it into \a [lowertext(user_selection)] plush!</span>")
update_icon()
plushie_module_selected = TRUE

/obj/item/toy/plushie/borgplushie/item_interaction(mob/living/user, obj/item/used, list/modifiers)
if(!istype(used, /obj/item/borg/upgrade/reset))
return ..()

if(!plushie_module_selected)
to_chat(user, "<span class='warning'>[src] is already in standard mode!</span>")
return ITEM_INTERACT_COMPLETE

borg_plushie_overlay = "plushie_borgassist"
update_icon()
to_chat(user, "<span class='notice'>The fabric on [src] changes color, reverting it back to standard mode.</span>")
plushie_module_selected = FALSE
qdel(used)
return ITEM_INTERACT_COMPLETE

/obj/item/toy/plushie/borgplushie/activate_self(mob/user)
if(..())
return
Expand Down Expand Up @@ -1102,6 +1161,15 @@
if(!QDELETED(src))
qdel(src)

/obj/item/toy/plushie/borgplushie/random

/obj/item/toy/plushie/borgplushie/random/Initialize(mapload)
. = ..()
borg_plushie_overlay = pick("plushie_borgjan", "plushie_borgsec", "plushie_borgmed", "plushie_borgmine", "plushie_borgserv", "plushie_borgassist", "plushie_borgengi")
if(borg_plushie_overlay != "plushie_borgassist")
plushie_module_selected = TRUE
update_icon()

/obj/item/toy/plushie/dionaplushie
name = "diona plushie"
desc = "This plushy is seemingly comprised of other, smaller, nymph plushies. They really went all out on the realism! Keep away from plantkiller."
Expand Down

0 comments on commit 5e6629c

Please sign in to comment.