diff --git a/code/game/objects/items/devices/gold_star_printer.dm b/code/game/objects/items/devices/gold_star_printer.dm new file mode 100644 index 0000000000..f2de0454bb --- /dev/null +++ b/code/game/objects/items/devices/gold_star_printer.dm @@ -0,0 +1,91 @@ +// Base object works similar to ticket printers, but produces gold star accessories. + +/obj/item/gold_star_printer + name = "gold star dispenser" + desc = "It prints gold stickers to reward the crew for their excellent contributions!" + icon = 'icons/obj/device_vr.dmi' + icon_state = "gold_star_printer" + slot_flags = SLOT_BELT | SLOT_HOLSTER + var/print_cooldown = 1 MINUTE + var/last_print + pickup_sound = 'sound/items/pickup/device.ogg' + drop_sound = 'sound/items/drop/device.ogg' + +/obj/item/gold_star_printer/attack_self(mob/user) + . = ..() + if(last_print + print_cooldown <= world.time) + make_star(user) + else + to_chat(user, span_warning("\The [src] is not ready to print another star yet.")) + +/obj/item/gold_star_printer/proc/make_star(mob/user) + + var/star_title = tgui_input_text(user, "Choose a title for the star, this can be an action or name. The name of the star will read Gold Star for 'Title'.", "Title", max_length = 32) + if(length(star_title) > 32) + tgui_alert_async(user, "Entered title too long. 100 character limit.","Error") + return + if(!star_title) + return + var/star_desc = tgui_input_text(user, "Choose the description of the 'Gold Star for [star_title]', this is what it will read on examination. (Max length: 200)", "Ticket Details", max_length = 200) + if(length(star_desc) > 200) + tgui_alert_async(user, "Entered details too long. 200 character limit.","Error") + return + if(!star_desc) + return + + var/turf/our_turf = get_turf(user) + + var/obj/item/clothing/accessory/gold_sticker/p = new /obj/item/clothing/accessory/gold_sticker(our_turf) + + p.desc = "A gold star issued by [user] for [star_title], if you look closely, the fine print reads: [star_desc]" + p.name = "Gold Star for [star_title]" + playsound(user, 'sound/items/ticket_printer.ogg', 75, 1) + + log_admin("[key_name(user)] has printed a Gold Star for [star_title] with the description: \"[star_desc]\"") + last_print = world.time + +/obj/item/clothing/accessory/gold_sticker + name = "Gold Star" + desc = "A gold star!" + icon_state = "gold_sticker" + slot = ACCESSORY_SLOT_TIE + +/obj/item/clothing/accessory/gold_sticker/afterattack(atom/target, mob/user) + if(!user) + return + if(!user.Adjacent(target)) + return + if(isobj(target) && !istype(target,/obj/item/clothing/under)) + var/obj/O = target + apply_sticker(O,user) + return + if(isanimal(target) || issilicon(target)) + var/mob/living/M = target + if(M.client) + var/accepting = tgui_alert(M,"[user] is attempting to stick a [src] on you. Will you allow this?","Sticker!",list("No","Yes")) + if(!accepting || (accepting == "No")) + to_chat(user, span_warning("\The [M] does not allow you to stick the [src] on them.")) + return + else + apply_sticker(M,user) + to_chat(M, span_notice("\The [user] stuck \the [src] to you!")) + return + else + apply_sticker(M,user) + return + . = ..() + +/obj/item/clothing/accessory/gold_sticker/proc/apply_sticker(atom/target, mob/user) + if(!user) + return + if(!user.Adjacent(target)) + return + if(user.get_active_hand() != src) + to_chat(user, span_warning("You need to have \the [src] in your active hand to apply it to something.")) + return + target.desc = "[target.desc] It has a [src] stuck to it!" + target.description_fluff = "[target.description_fluff] Attached to it is [desc]" + to_chat(user, span_notice("You stick \the [src] to \the [target].")) + user.drop_item() + qdel(src) + return diff --git a/icons/inventory/accessory/item.dmi b/icons/inventory/accessory/item.dmi index 768e234e65..d173d5829c 100644 Binary files a/icons/inventory/accessory/item.dmi and b/icons/inventory/accessory/item.dmi differ diff --git a/icons/inventory/accessory/mob.dmi b/icons/inventory/accessory/mob.dmi index 0255ac23f8..3d8ca2b51e 100644 Binary files a/icons/inventory/accessory/mob.dmi and b/icons/inventory/accessory/mob.dmi differ diff --git a/icons/obj/device_vr.dmi b/icons/obj/device_vr.dmi index 726639b267..b63275fefe 100644 Binary files a/icons/obj/device_vr.dmi and b/icons/obj/device_vr.dmi differ diff --git a/maps/groundbase/gb-z2.dmm b/maps/groundbase/gb-z2.dmm index 88e644f88f..00cbe53142 100644 --- a/maps/groundbase/gb-z2.dmm +++ b/maps/groundbase/gb-z2.dmm @@ -6425,6 +6425,7 @@ /obj/machinery/atmospherics/unary/vent_scrubber/on{ dir = 1 }, +/obj/item/gold_star_printer, /turf/simulated/floor/carpet, /area/groundbase/command/hop) "rv" = ( diff --git a/maps/stellar_delight/stellar_delight3.dmm b/maps/stellar_delight/stellar_delight3.dmm index 02ba0e5dfb..ec8411659a 100644 --- a/maps/stellar_delight/stellar_delight3.dmm +++ b/maps/stellar_delight/stellar_delight3.dmm @@ -10664,6 +10664,7 @@ pixel_y = 18 }, /obj/item/book/manual/sd_guide, +/obj/item/gold_star_printer, /turf/simulated/floor/carpet, /area/crew_quarters/heads/hop) "Mu" = ( diff --git a/maps/tether/tether-03-surface3.dmm b/maps/tether/tether-03-surface3.dmm index dfd8094fad..511fe0f478 100644 --- a/maps/tether/tether-03-surface3.dmm +++ b/maps/tether/tether-03-surface3.dmm @@ -29588,6 +29588,7 @@ /obj/item/folder/blue, /obj/item/folder/red, /obj/item/pen/multi, +/obj/item/gold_star_printer, /turf/simulated/floor/carpet, /area/crew_quarters/heads/hop) "aZQ" = ( diff --git a/tools/StrongDMM/.StrongDMM.exe.old b/tools/StrongDMM/.StrongDMM.exe.old new file mode 100644 index 0000000000..b499c8d2f9 Binary files /dev/null and b/tools/StrongDMM/.StrongDMM.exe.old differ diff --git a/tools/StrongDMM/StrongDMM.exe b/tools/StrongDMM/StrongDMM.exe index b499c8d2f9..6dbb5b476d 100644 Binary files a/tools/StrongDMM/StrongDMM.exe and b/tools/StrongDMM/StrongDMM.exe differ diff --git a/vorestation.dme b/vorestation.dme index 4fd98f46aa..41de82b6ae 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1533,6 +1533,7 @@ #include "code\game\objects\items\devices\flashlight.dm" #include "code\game\objects\items\devices\floor_painter.dm" #include "code\game\objects\items\devices\geiger.dm" +#include "code\game\objects\items\devices\gold_star_printer.dm" #include "code\game\objects\items\devices\gps.dm" #include "code\game\objects\items\devices\hacktool.dm" #include "code\game\objects\items\devices\holowarrant.dm"