diff --git a/aurorastation.dme b/aurorastation.dme index b4b484558d5..dbea183f1a1 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -878,6 +878,7 @@ #include "code\game\objects\items\eightball.dm" #include "code\game\objects\items\glassjar.dm" #include "code\game\objects\items\holomenu.dm" +#include "code\game\objects\items\knitting.dm" #include "code\game\objects\items\paintkit.dm" #include "code\game\objects\items\shooting_range.dm" #include "code\game\objects\items\skrell.dm" diff --git a/code/game/objects/items/knitting.dm b/code/game/objects/items/knitting.dm new file mode 100644 index 00000000000..0658bf4cc4e --- /dev/null +++ b/code/game/objects/items/knitting.dm @@ -0,0 +1,121 @@ +/obj/item/knittingneedles + name = "knitting needles" + desc = "Silver knitting needles used for stitching yarn." + icon = 'icons/obj/contained_items/tools/knitting.dmi' + icon_state = "knittingneedles" + item_state = "knittingneedles" + w_class = ITEMSIZE_SMALL + contained_sprite = TRUE + var/working = FALSE + var/obj/item/yarn/ball + +/obj/item/knittingneedles/Destroy() + if(ball) + QDEL_NULL(ball) + return ..() + +/obj/item/knittingneedles/examine(mob/user) + if(..(user, 1)) + if(ball) + to_chat(user, "There is \the [ball] between the needles.") + +/obj/item/knittingneedles/update_icon() + if(working) + icon_state = "knittingneedles_on" + item_state = "knittingneedles_on" + else + icon_state = initial(icon_state) + item_state = initial(item_state) + + if(ball) + add_overlay("[ball.icon_state]") + else + cut_overlays() + +/obj/item/knittingneedles/attackby(obj/item/O, mob/user) + if(istype(O, /obj/item/yarn)) + if(!ball) + user.unEquip(O) + O.forceMove(src) + ball = O + to_chat(user, "You place \the [O] in \the [src]") + update_icon() + +/obj/item/knittingneedles/attack_self(mob/user as mob) + if(!ball) //if there is no yarn ball, nothing happens + to_chat(user, "You need a yarn ball to stitch.") + return + + if(working) + to_chat(user, "You are already sitching something.") + return + + user.visible_message("\The [user] is knitting something soft and cozy.") + working = TRUE + update_icon() + + if(!do_after(user,2 MINUTES)) + to_chat(user, "Your concentration is broken!") + working = FALSE + update_icon() + return + + var/obj/item/clothing/accessory/sweater/S = new(get_turf(user)) + S.color = ball.color + qdel(ball) + ball = null + working = FALSE + update_icon() + to_chat(user, "You finish \the [S]!") + +/obj/item/yarn + name = "ball of yarn" + desc = "A ball of yarn, this one is white." + icon = 'icons/obj/contained_items/tools/knitting.dmi' + icon_state = "white_ball" + w_class = ITEMSIZE_TINY + +/obj/item/yarn/red + desc = "A ball of yarn, this one is red." + color = "#ff0000" + +/obj/item/yarn/blue + desc = "A ball of yarn, this one is blue." + color = "#0000FF" + +/obj/item/yarn/green + desc = "A ball of yarn, this one is green." + color = "#00ff00" + +/obj/item/yarn/purple + desc = "A ball of yarn, this one is purple." + color = "#800080" + +/obj/item/yarn/yellow + desc = "A ball of yarn, this one is yellow." + color = "#FFFF00" + +/obj/item/storage/box/knitting //a bunch of things, so it goes into the box + name = "knitting supplies" + +/obj/item/storage/box/knitting/fill() + ..() + new /obj/item/knittingneedles(src) + new /obj/item/yarn(src) + new /obj/item/yarn/red(src) + new /obj/item/yarn/blue(src) + new /obj/item/yarn/green(src) + new /obj/item/yarn/purple(src) + new /obj/item/yarn/yellow(src) + +/obj/item/storage/box/yarn + name = "yarn box" + +/obj/item/storage/box/yarn/fill() + ..() + new /obj/item/yarn(src) + new /obj/item/yarn/red(src) + new /obj/item/yarn/blue(src) + new /obj/item/yarn/green(src) + new /obj/item/yarn/purple(src) + new /obj/item/yarn/yellow(src) \ No newline at end of file diff --git a/code/modules/client/preference_setup/loadout/loadout_general.dm b/code/modules/client/preference_setup/loadout/loadout_general.dm index d0fedcde966..326caae02ba 100644 --- a/code/modules/client/preference_setup/loadout/loadout_general.dm +++ b/code/modules/client/preference_setup/loadout/loadout_general.dm @@ -243,4 +243,16 @@ /datum/gear/photo_album display_name = "photo album" path = /obj/item/storage/photo_album - flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION \ No newline at end of file + flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION + +/datum/gear/knitting_set + display_name = "knitting set" + path = /obj/item/storage/box/knitting + description = "A box of knitting supplies." + flags = null + +/datum/gear/yarn_box + display_name = "knitting supplies" + path = /obj/item/storage/box/yarn + description = "A box containing yarn." + flags = null \ No newline at end of file diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 4849d3c9ff6..a1250f94183 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -655,118 +655,6 @@ All custom items with worn sprites must follow the contained sprite system: http /obj/item/clothing/gloves/fluff/lunea_gloves/isFlameSource() return lit - -/obj/item/fluff/fernando_knittingneedles //Kitting Needles - Fernando Gonzales - resilynn - name = "knitting needles" - desc = "Silver knitting needles used for stitching yarn." - icon = 'icons/obj/custom_items/fernando_knitting.dmi' - icon_state = "knittingneedles" - item_state = "knittingneedles" - w_class = ITEMSIZE_SMALL - contained_sprite = TRUE - var/working = FALSE - var/obj/item/fluff/yarn/ball - -/obj/item/fluff/fernando_knittingneedles/Destroy() - if(ball) - QDEL_NULL(ball) - return ..() - -/obj/item/fluff/fernando_knittingneedles/examine(mob/user) - if(..(user, 1)) - if(ball) - to_chat(user, "There is \the [ball] between the needles.") - -/obj/item/fluff/fernando_knittingneedles/update_icon() - if(working) - icon_state = "knittingneedles_on" - item_state = "knittingneedles_on" - else - icon_state = initial(icon_state) - item_state = initial(item_state) - - if(ball) - add_overlay("[ball.icon_state]") - else - cut_overlays() - -/obj/item/fluff/fernando_knittingneedles/attackby(obj/item/O, mob/user) - if(istype(O, /obj/item/fluff/yarn)) - if(!ball) - user.unEquip(O) - O.forceMove(src) - ball = O - to_chat(user, "You place \the [O] in \the [src]") - update_icon() - -/obj/item/fluff/fernando_knittingneedles/attack_self(mob/user as mob) - if(!ball) //if there is no yarn ball, nothing happens - to_chat(user, "You need a yarn ball to stitch.") - return - - if(working) - to_chat(user, "You are already sitching something.") - return - - user.visible_message("\The [user] is knitting something soft and cozy.") - working = TRUE - update_icon() - - if(!do_after(user,2 MINUTES)) - to_chat(user, "Your concentration is broken!") - working = FALSE - update_icon() - return - - var/obj/item/clothing/accessory/sweater/S = new(get_turf(user)) - S.color = ball.color - qdel(ball) - ball = null - working = FALSE - update_icon() - to_chat(user, "You finish \the [S]!") - -/obj/item/fluff/yarn - name = "ball of yarn" - desc = "A ball of yarn, this one is white." - icon = 'icons/obj/custom_items/fernando_knitting.dmi' - icon_state = "white_ball" - w_class = ITEMSIZE_TINY - -/obj/item/fluff/yarn/red - desc = "A ball of yarn, this one is red." - color = "#ff0000" - -/obj/item/fluff/yarn/blue - desc = "A ball of yarn, this one is blue." - color = "#0000FF" - -/obj/item/fluff/yarn/green - desc = "A ball of yarn, this one is green." - color = "#00ff00" - -/obj/item/fluff/yarn/purple - desc = "A ball of yarn, this one is purple." - color = "#800080" - -/obj/item/fluff/yarn/yellow - desc = "A ball of yarn, this one is yellow." - color = "#FFFF00" - -/obj/item/storage/box/fluff/knitting //a bunch of things, so it goes into the box - name = "knitting supplies" - -/obj/item/storage/box/fluff/knitting/fill() - ..() - new /obj/item/fluff/fernando_knittingneedles(src) - new /obj/item/fluff/yarn(src) - new /obj/item/fluff/yarn/red(src) - new /obj/item/fluff/yarn/blue(src) - new /obj/item/fluff/yarn/green(src) - new /obj/item/fluff/yarn/purple(src) - new /obj/item/fluff/yarn/yellow(src) - - /obj/item/clothing/suit/fluff/eri_robes //Senior Alchemist Robes - Eri Akhandi - snakebittenn name = "senior alchemist robes" desc = "A green set of robes, trimmed with what appears to be real gold. Looking at the necklace, you can see the alchemical symbol for the Philosopher's Stone, made of ruby." diff --git a/html/changelogs/PublicKnitting.yml b/html/changelogs/PublicKnitting.yml new file mode 100644 index 00000000000..5ff2f665ca7 --- /dev/null +++ b/html/changelogs/PublicKnitting.yml @@ -0,0 +1,6 @@ +author: TheGreyWolf + +delete-after: True + +changes: + - rscadd: "Knitting needles are now available in the loadout under the general tab." diff --git a/icons/obj/custom_items/fernando_knitting.dmi b/icons/obj/contained_items/tools/knitting.dmi similarity index 100% rename from icons/obj/custom_items/fernando_knitting.dmi rename to icons/obj/contained_items/tools/knitting.dmi