Mail sorter/flatpack naming fix (#2792)

## About The Pull Request

Removes Bubber modular edits since they've been upstreamed in
https://github.com/tgstation/tgstation/pull/88687

Also moves export gate to the new flatpacks.dm

## Changelog

🆑 LT3
add: Mail sorter is now available in the CargoDrobe instead of sitting
on the office floor
add: Bounty cube export gate is now available in the CargoDrobe instead
of sitting on the warehouse floor
/🆑

---------

Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>
This commit is contained in:
LT3
2024-12-27 17:29:40 -08:00
committed by GitHub
parent db670af09c
commit ad0934b261
12 changed files with 197 additions and 203 deletions

View File

@@ -325,160 +325,3 @@
return CLICK_ACTION_SUCCESS
#undef CREATE_AND_INCREMENT
/obj/item/flatpack
name = "flatpack"
desc = "A box containing a compactly packed machine. Use multitool to deploy."
icon = 'icons/obj/devices/circuitry_n_data.dmi'
icon_state = "flatpack"
density = TRUE
w_class = WEIGHT_CLASS_HUGE //cart time
throw_range = 2
item_flags = SLOWS_WHILE_IN_HAND | IMMUTABLE_SLOW
slowdown = 2.5
drag_slowdown = 3.5 //use the cart stupid
/// The board we deploy
var/obj/item/circuitboard/machine/board
/obj/item/flatpack/Initialize(mapload, obj/item/circuitboard/machine/new_board)
if(isnull(board) && isnull(new_board))
return INITIALIZE_HINT_QDEL //how
. = ..()
var/static/list/tool_behaviors = list(
TOOL_MULTITOOL = list(
SCREENTIP_CONTEXT_LMB = "Deploy",
),
)
AddElement(/datum/element/contextual_screentip_tools, tool_behaviors)
board = !isnull(new_board) ? new_board : new board(src) // i got board
if(board.loc != src)
board.forceMove(src)
var/obj/machinery/build = initial(board.build_path)
name += " ([initial(build.name)])"
/obj/item/flatpack/Destroy()
QDEL_NULL(board)
. = ..()
/obj/item/flatpack/examine(mob/user)
. = ..()
if(!in_range(user, src) && !isobserver(user))
return
if(loc == user)
. += span_warning("You can't deploy while holding it in your hand.")
else if(isturf(loc))
var/turf/location = loc
if(!isopenturf(location))
. += span_warning("Can't deploy in this location")
else if(location.is_blocked_turf(source_atom = src))
. += span_warning("No space for deployment")
/obj/item/flatpack/multitool_act(mob/living/user, obj/item/tool)
. = NONE
if(isnull(board))
return ITEM_INTERACT_BLOCKING
if(loc == user)
balloon_alert(user, "can't deploy in hand")
return ITEM_INTERACT_BLOCKING
else if(isturf(loc))
var/turf/location = loc
if(!isopenturf(location))
balloon_alert(user, "can't deploy here")
return ITEM_INTERACT_BLOCKING
else if(location.is_blocked_turf(source_atom = src))
balloon_alert(user, "no space for deployment")
return ITEM_INTERACT_BLOCKING
balloon_alert_to_viewers("deploying!")
if(!do_after(user, 1 SECONDS, target = src))
return ITEM_INTERACT_BLOCKING
new /obj/effect/temp_visual/mook_dust(loc)
var/obj/machinery/new_machine = new board.build_path(loc)
loc.visible_message(span_warning("[src] deploys!"))
playsound(src, 'sound/machines/terminal/terminal_eject.ogg', 70, TRUE)
new_machine.on_construction(user)
qdel(src)
return ITEM_INTERACT_SUCCESS
///Maximum number of flatpacks in a cart
#define MAX_FLAT_PACKS 3
/obj/structure/flatpack_cart
name = "flatpack cart"
desc = "A cart specifically made to hold flatpacks from a flatpacker, evenly distributing weight. Convenient!"
icon = 'icons/obj/structures.dmi'
icon_state = "flatcart"
density = TRUE
opacity = FALSE
/obj/structure/flatpack_cart/Initialize(mapload)
. = ..()
register_context()
AddElement(/datum/element/noisy_movement, volume = 45) // i hate noise
/obj/structure/flatpack_cart/atom_deconstruct(disassembled)
for(var/atom/movable/content as anything in contents)
content.forceMove(drop_location())
/obj/structure/flatpack_cart/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = NONE
if(isnull(held_item))
return
if(istype(held_item, /obj/item/flatpack))
context[SCREENTIP_CONTEXT_LMB] = "Load pack"
return CONTEXTUAL_SCREENTIP_SET
/obj/structure/flatpack_cart/examine(mob/user)
. = ..()
if(!in_range(user, src) && !isobserver(user))
return
. += "From bottom to top, this cart contains:"
for(var/obj/item/flatpack as anything in contents)
. += flatpack.name
/obj/structure/flatpack_cart/update_overlays()
. = ..()
var/offset = 0
for(var/item in contents)
var/mutable_appearance/flatpack_overlay = mutable_appearance(icon, "flatcart_flat", layer = layer + (offset * 0.01))
flatpack_overlay.pixel_y = offset
offset += 4
. += flatpack_overlay
/obj/structure/flatpack_cart/attack_hand(mob/user, list/modifiers)
. = ..()
if(.)
return
user.put_in_hands(contents[length(contents)]) //topmost box
update_appearance(UPDATE_OVERLAYS)
/obj/structure/flatpack_cart/item_interaction(mob/living/user, obj/item/attacking_item, params)
if(!istype(attacking_item, /obj/item/flatpack) || user.combat_mode || attacking_item.flags_1 & HOLOGRAM_1 || attacking_item.item_flags & ABSTRACT)
return ITEM_INTERACT_SKIP_TO_ATTACK
if (length(contents) >= MAX_FLAT_PACKS)
balloon_alert(user, "full!")
return ITEM_INTERACT_BLOCKING
if (!user.transferItemToLoc(attacking_item, src))
return ITEM_INTERACT_BLOCKING
update_appearance(UPDATE_OVERLAYS)
return ITEM_INTERACT_SUCCESS
#undef MAX_FLAT_PACKS
/obj/item/flatpack/flatpacker // a roundstart flatpacker is NICE you can gahdamn tell the time and everythin'
board = /obj/item/circuitboard/machine/flatpacker
/obj/item/flatpack/mailsorter // to have a roundstart mail sorter at cargo
board = /obj/item/circuitboard/machine/mailsorter

View File

@@ -0,0 +1,165 @@
/obj/item/flatpack
name = "flatpack"
desc = "A box containing a compactly packed machine. Use multitool to deploy."
icon = 'icons/obj/devices/circuitry_n_data.dmi'
icon_state = "flatpack"
density = TRUE
w_class = WEIGHT_CLASS_HUGE //cart time
throw_range = 2
item_flags = SLOWS_WHILE_IN_HAND | IMMUTABLE_SLOW
slowdown = 2.5
drag_slowdown = 3.5 //use the cart stupid
custom_premium_price = PAYCHECK_COMMAND * 1.5
/// The board we deploy
var/obj/item/circuitboard/machine/board
/obj/item/flatpack/Initialize(mapload, obj/item/circuitboard/machine/new_board)
if(isnull(board) && isnull(new_board))
return INITIALIZE_HINT_QDEL //how
. = ..()
var/static/list/tool_behaviors = list(
TOOL_MULTITOOL = list(
SCREENTIP_CONTEXT_LMB = "Deploy",
),
)
AddElement(/datum/element/contextual_screentip_tools, tool_behaviors)
board = !isnull(new_board) ? new_board : new board(src) // i got board
if(board.loc != src)
board.forceMove(src)
var/obj/machinery/build = initial(board.build_path)
name = "flatpack ([initial(build.name)])"
/obj/item/flatpack/Destroy()
QDEL_NULL(board)
. = ..()
/obj/item/flatpack/examine(mob/user)
. = ..()
if(!in_range(user, src) && !isobserver(user))
return
if(loc == user)
. += span_warning("You can't deploy while holding it in your hand.")
else if(isturf(loc))
var/turf/location = loc
if(!isopenturf(location))
. += span_warning("Can't deploy in this location")
else if(location.is_blocked_turf(source_atom = src))
. += span_warning("No space for deployment")
/obj/item/flatpack/multitool_act(mob/living/user, obj/item/tool)
. = NONE
if(isnull(board))
return ITEM_INTERACT_BLOCKING
if(loc == user)
balloon_alert(user, "can't deploy in hand")
return ITEM_INTERACT_BLOCKING
else if(isturf(loc))
var/turf/location = loc
if(!isopenturf(location))
balloon_alert(user, "can't deploy here")
return ITEM_INTERACT_BLOCKING
else if(location.is_blocked_turf(source_atom = src))
balloon_alert(user, "no space for deployment")
return ITEM_INTERACT_BLOCKING
balloon_alert_to_viewers("deploying!")
if(!do_after(user, 1 SECONDS, target = src))
return ITEM_INTERACT_BLOCKING
new /obj/effect/temp_visual/mook_dust(loc)
var/obj/machinery/new_machine = new board.build_path(loc)
loc.visible_message(span_warning("[src] deploys!"))
playsound(src, 'sound/machines/terminal/terminal_eject.ogg', 70, TRUE)
new_machine.on_construction(user)
qdel(src)
return ITEM_INTERACT_SUCCESS
///Maximum number of flatpacks in a cart
#define MAX_FLAT_PACKS 3
/obj/structure/flatpack_cart
name = "flatpack cart"
desc = "A cart specifically made to hold flatpacks from a flatpacker, evenly distributing weight. Convenient!"
icon = 'icons/obj/structures.dmi'
icon_state = "flatcart"
density = TRUE
opacity = FALSE
/obj/structure/flatpack_cart/Initialize(mapload)
. = ..()
register_context()
AddElement(/datum/element/noisy_movement, volume = 45) // i hate noise
/obj/structure/flatpack_cart/atom_deconstruct(disassembled)
for(var/atom/movable/content as anything in contents)
content.forceMove(drop_location())
/obj/structure/flatpack_cart/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = NONE
if(isnull(held_item))
return
if(istype(held_item, /obj/item/flatpack))
context[SCREENTIP_CONTEXT_LMB] = "Load pack"
return CONTEXTUAL_SCREENTIP_SET
/obj/structure/flatpack_cart/examine(mob/user)
. = ..()
if(!in_range(user, src) && !isobserver(user))
return
. += "From bottom to top, this cart contains:"
for(var/obj/item/flatpack as anything in contents)
. += flatpack.name
/obj/structure/flatpack_cart/update_overlays()
. = ..()
var/offset = 0
for(var/item in contents)
var/mutable_appearance/flatpack_overlay = mutable_appearance(icon, "flatcart_flat", layer = layer + (offset * 0.01))
flatpack_overlay.pixel_y = offset
offset += 4
. += flatpack_overlay
/obj/structure/flatpack_cart/attack_hand(mob/user, list/modifiers)
. = ..()
if(.)
return
user.put_in_hands(contents[length(contents)]) //topmost box
update_appearance(UPDATE_OVERLAYS)
/obj/structure/flatpack_cart/item_interaction(mob/living/user, obj/item/attacking_item, params)
if(!istype(attacking_item, /obj/item/flatpack) || user.combat_mode || attacking_item.flags_1 & HOLOGRAM_1 || attacking_item.item_flags & ABSTRACT)
return ITEM_INTERACT_SKIP_TO_ATTACK
if (length(contents) >= MAX_FLAT_PACKS)
balloon_alert(user, "full!")
return ITEM_INTERACT_BLOCKING
if (!user.transferItemToLoc(attacking_item, src))
return ITEM_INTERACT_BLOCKING
update_appearance(UPDATE_OVERLAYS)
return ITEM_INTERACT_SUCCESS
#undef MAX_FLAT_PACKS
// Engineering flatpacks
/obj/item/flatpack/flatpacker // a roundstart flatpacker is NICE you can gahdamn tell the time and everythin'
name = "flatpacker"
board = /obj/item/circuitboard/machine/flatpacker
custom_premium_price = PAYCHECK_COMMAND
// Cargo flatpacks
/obj/item/flatpack/mailsorter // to have a roundstart mail sorter at cargo
name = "mail sorter"
board = /obj/item/circuitboard/machine/mailsorter
custom_premium_price = PAYCHECK_CREW * 1.5

View File

@@ -344,6 +344,7 @@
icon_state = "mailbag"
worn_icon_state = "mailbag"
resistance_flags = FLAMMABLE
custom_premium_price = PAYCHECK_LOWER
/obj/item/storage/bag/mail/Initialize(mapload)
. = ..()

View File

@@ -50,6 +50,7 @@
icon_state = "mailman"
desc = "<i>'Right-on-time'</i> mail service head wear."
clothing_traits = list(TRAIT_HATED_BY_DOGS)
custom_premium_price = PAYCHECK_CREW
/obj/item/clothing/head/bio_hood/plague
name = "plague doctor's hat"

View File

@@ -27,6 +27,7 @@
icon_state = "mailman"
inhand_icon_state = "b_suit"
clothing_traits = list(TRAIT_HATED_BY_DOGS)
custom_premium_price = PAYCHECK_CREW
/obj/item/clothing/under/misc/psyche
name = "psychedelic jumpsuit"

View File

@@ -201,14 +201,14 @@ GLOBAL_VAR_INIT(roaches_deployed, FALSE)
/obj/item/storage/backpack/satchel/leather = 3,
/obj/item/storage/backpack/duffelbag = 3,
/obj/item/storage/backpack/messenger = 3,
/obj/item/storage/bag/mail = 3,
/obj/item/radio/headset/headset_cargo = 3,
/obj/item/clothing/accessory/pocketprotector = 3,
/obj/item/flatpack/mailsorter = 1,
)
premium = list(
/obj/item/storage/bag/mail = 3,
/obj/item/clothing/head/costume/mailman = 1,
/obj/item/clothing/under/misc/mailman = 1,
/obj/item/flatpack/mailsorter = 1,
/obj/item/clothing/under/rank/cargo/miner = 3,
/obj/item/clothing/under/rank/cargo/miner/lavaland = 3,
/obj/item/clothing/under/rank/cargo/bitrunner = 3,

View File

@@ -0,0 +1,4 @@
author: "LT3"
delete-after: True
changes:
- bugfix: "Premade/vending machine flatpacks now display what board is inside"

View File

@@ -17,23 +17,6 @@
/datum/stock_part/card_reader = 1,
)
/obj/item/flatpack/export_gate
board = /obj/item/circuitboard/machine/export_gate
/obj/item/flatpack/export_gate/Initialize(mapload)
. = ..()
var/turf/our_turf = get_turf(src)
new /obj/item/paper/fluff/export_gate(our_turf)
/obj/item/flatpack/export_gate/multitool_act(mob/living/user, obj/item/tool)
if(isturf(loc))
var/turf/location = loc
if(!locate(/obj/machinery/conveyor) in location)
balloon_alert(user, "needs conveyor belt!")
return ITEM_INTERACT_BLOCKING
return ..()
/datum/supply_pack/service/export_gate
name = "Bounty Cube Export Gate"
desc = "Automatically registers bounty cube exports, for the logistics automation nerd in you."

View File

@@ -1,26 +0,0 @@
/obj/item/flatpack/mailsorter
name = "mail sorter flatpack"
/datum/area_spawn/mailsorter
target_areas = list(/area/station/cargo/office)
desired_atom = /obj/item/flatpack/mailsorter
/datum/area_spawn/mailsorter/try_spawn()
// Turfs that are available
var/list/available_turfs
for(var/area_type in target_areas)
var/area/found_area = GLOB.areas_by_type[area_type]
if(!found_area)
continue
available_turfs = SSarea_spawn.get_turf_candidates(found_area, mode)
if(LAZYLEN(available_turfs))
break
if(!LAZYLEN(available_turfs))
return
for(var/i in 1 to amount_to_spawn)
var/turf/candidate_turf = SSarea_spawn.pick_turf_candidate(available_turfs)
var/final_desired_atom = desired_atom
new final_desired_atom(candidate_turf)

View File

@@ -0,0 +1,18 @@
/obj/item/flatpack/export_gate
name = "bounty cube export gate"
board = /obj/item/circuitboard/machine/export_gate
custom_premium_price = PAYCHECK_CREW * 1.5
/obj/item/flatpack/export_gate/Initialize(mapload)
. = ..()
var/turf/our_turf = get_turf(src)
new /obj/item/paper/fluff/export_gate(our_turf)
/obj/item/flatpack/export_gate/multitool_act(mob/living/user, obj/item/tool)
if(isturf(loc))
var/turf/location = loc
if(!locate(/obj/machinery/conveyor) in location)
balloon_alert(user, "needs conveyor belt!")
return ITEM_INTERACT_BLOCKING
return ..()

View File

@@ -178,6 +178,9 @@
/obj/item/clothing/neck/tie/bunnytie/bitrunner = 3,
/obj/item/clothing/suit/jacket/tailcoat/bitrunner = 3,
)
zubbers_premium = list(
/obj/item/flatpack/export_gate = 1,
)
/obj/machinery/vending/wardrobe/chap_wardrobe
zubbers_products = list(

View File

@@ -2500,6 +2500,7 @@
#include "code\game\objects\items\extinguisher.dm"
#include "code\game\objects\items\fireaxe.dm"
#include "code\game\objects\items\flamethrower.dm"
#include "code\game\objects\items\flatpacks.dm"
#include "code\game\objects\items\frog_statue.dm"
#include "code\game\objects\items\gift.dm"
#include "code\game\objects\items\gun_maintenance.dm"
@@ -8766,7 +8767,6 @@
#include "modular_zubbers\code\game\Items\storage\medkit.dm"
#include "modular_zubbers\code\game\machinery\crew_monitor.dm"
#include "modular_zubbers\code\game\machinery\department_balance.dm"
#include "modular_zubbers\code\game\machinery\flatpacker.dm"
#include "modular_zubbers\code\game\machinery\medipen_refiller.dm"
#include "modular_zubbers\code\game\machinery\morgue.dm"
#include "modular_zubbers\code\game\machinery\syndiepad.dm"
@@ -8804,6 +8804,7 @@
#include "modular_zubbers\code\game\objects\items\cards_ids.dm"
#include "modular_zubbers\code\game\objects\items\cigarettes.dm"
#include "modular_zubbers\code\game\objects\items\cigs_lighters.dm"
#include "modular_zubbers\code\game\objects\items\flatpacks.dm"
#include "modular_zubbers\code\game\objects\items\holy_weapons.dm"
#include "modular_zubbers\code\game\objects\items\kiss.dm"
#include "modular_zubbers\code\game\objects\items\more_pkas.dm"