mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
[MIRROR] Added the subtype vendor and it and omnitools to runtime station (#28710)
* Added the subtype vendor and it and omnitools to runtime station (#84540) ## About The Pull Request Added the subtype vendor which lets admins and coders vend subtypes of a path Added the vendor and both varieties of omnitool to runtime station ## Why It's Good For The Game Better and faster testing environment. Runtimestation is horribly inefficient rn but this will help a bit ## Changelog 🆑 code: Added the subtype vendor which lets admins and coders vend subtypes of a path code: Added the vendor and both varieties of omnitool to runtime station /🆑 * Added the subtype vendor and it and omnitools to runtime station --------- Co-authored-by: carlarctg <53100513+carlarctg@users.noreply.github.com>
This commit is contained in:
@@ -924,7 +924,7 @@
|
||||
/turf/open/floor/iron,
|
||||
/area/station/construction)
|
||||
"dN" = (
|
||||
/obj/structure/table,
|
||||
/obj/machinery/vending/subtype_vendor,
|
||||
/turf/open/floor/iron,
|
||||
/area/station/commons/storage/primary)
|
||||
"dO" = (
|
||||
@@ -932,6 +932,7 @@
|
||||
/obj/machinery/light/directional/south,
|
||||
/obj/item/storage/medkit/regular,
|
||||
/obj/item/healthanalyzer/advanced,
|
||||
/obj/item/debug/omnitool/item_spawner,
|
||||
/turf/open/floor/iron,
|
||||
/area/station/commons/storage/primary)
|
||||
"dP" = (
|
||||
@@ -1775,6 +1776,7 @@
|
||||
/area/station/construction)
|
||||
"is" = (
|
||||
/obj/structure/sign/warning/vacuum/external/directional/east,
|
||||
/obj/machinery/vending/subtype_vendor,
|
||||
/turf/open/floor/iron,
|
||||
/area/station/medical/medbay)
|
||||
"jb" = (
|
||||
@@ -1862,6 +1864,7 @@
|
||||
"ny" = (
|
||||
/obj/structure/table,
|
||||
/obj/item/storage/toolbox/syndicate,
|
||||
/obj/item/debug/omnitool,
|
||||
/turf/open/floor/iron,
|
||||
/area/station/commons/storage/primary)
|
||||
"nI" = (
|
||||
@@ -2217,6 +2220,24 @@
|
||||
/obj/effect/turf_decal/tile/blue/half/contrasted,
|
||||
/turf/open/floor/iron,
|
||||
/area/station/command/bridge)
|
||||
"IB" = (
|
||||
/obj/structure/cable,
|
||||
/obj/effect/turf_decal/tile/blue{
|
||||
dir = 8
|
||||
},
|
||||
/obj/structure/table,
|
||||
/obj/item/debug/omnitool{
|
||||
pixel_x = -4;
|
||||
pixel_y = 6
|
||||
},
|
||||
/obj/item/debug/omnitool/item_spawner{
|
||||
pixel_x = 4;
|
||||
pixel_y = -6
|
||||
},
|
||||
/turf/open/floor/iron/white/corner{
|
||||
dir = 1
|
||||
},
|
||||
/area/station/medical/medbay)
|
||||
"IF" = (
|
||||
/obj/machinery/power/apc/auto_name/directional/north,
|
||||
/obj/structure/cable,
|
||||
@@ -7989,7 +8010,7 @@ av
|
||||
by
|
||||
Ot
|
||||
cl
|
||||
cl
|
||||
IB
|
||||
cl
|
||||
cH
|
||||
cu
|
||||
|
||||
@@ -143,6 +143,10 @@
|
||||
if("Wire Brush")
|
||||
tool_behaviour = TOOL_RUSTSCRAPER
|
||||
|
||||
/obj/item/debug/omnitool/item_spawner
|
||||
name = "spawntool"
|
||||
color = COLOR_ADMIN_PINK
|
||||
|
||||
/obj/item/debug/omnitool/item_spawner/attack_self(mob/user)
|
||||
if(!user || !user.client)
|
||||
return
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
|
||||
/obj/machinery/vending/subtype_vendor
|
||||
name = "\improper subtype vendor"
|
||||
desc = "A vending machine that vends all subtypes of a specific type."
|
||||
color = COLOR_ADMIN_PINK
|
||||
verb_say = "codes"
|
||||
verb_ask = "queries"
|
||||
verb_exclaim = "compiles"
|
||||
armor_type = /datum/armor/machinery_vending
|
||||
circuit = null
|
||||
product_slogans = "Spawn \" too annoying? Too lazy to open game panel? This one's for you!;Subtype vendor, for all your debugging woes!"
|
||||
default_price = 0
|
||||
/// Spawns coders by default
|
||||
var/type_to_vend = /obj/item/food/grown/citrus
|
||||
|
||||
/obj/machinery/vending/subtype_vendor/Initialize(mapload, type_to_vend)
|
||||
. = ..()
|
||||
if(type_to_vend)
|
||||
src.type_to_vend = type_to_vend
|
||||
load_subtypes()
|
||||
|
||||
/obj/machinery/vending/subtype_vendor/proc/load_subtypes()
|
||||
products = list()
|
||||
product_records = list()
|
||||
|
||||
for(var/type in typesof(type_to_vend))
|
||||
LAZYADDASSOC(products, type, 50)
|
||||
|
||||
build_inventories()
|
||||
|
||||
/obj/machinery/vending/subtype_vendor/attack_hand_secondary(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(. == SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN)
|
||||
return
|
||||
|
||||
if(!can_interact(user) || !user.can_perform_action(src, ALLOW_SILICON_REACH|FORBID_TELEKINESIS_REACH))
|
||||
return
|
||||
|
||||
if(!user.client?.holder?.check_for_rights(R_SERVER|R_DEBUG))
|
||||
speak("Hey! You can't use this! Get outta here!")
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
|
||||
var/type_to_vend_now = tgui_input_text(user, "What type to set it to?", "Set type to vend", "/obj/item/toy/plush")
|
||||
type_to_vend_now = text2path(type_to_vend_now)
|
||||
if(!ispath(type_to_vend_now))
|
||||
speak("That's not a real path, dumbass! Try again!")
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
|
||||
type_to_vend = type_to_vend_now
|
||||
load_subtypes()
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
@@ -6245,6 +6245,7 @@
|
||||
#include "code\modules\vending\security.dm"
|
||||
#include "code\modules\vending\snack.dm"
|
||||
#include "code\modules\vending\sovietsoda.dm"
|
||||
#include "code\modules\vending\subtype.dm"
|
||||
#include "code\modules\vending\sustenance.dm"
|
||||
#include "code\modules\vending\toys.dm"
|
||||
#include "code\modules\vending\wardrobes.dm"
|
||||
|
||||
Reference in New Issue
Block a user