diff --git a/code/__DEFINES/tgs.dm b/code/__DEFINES/tgs.dm index 9825cd118b68..d468d6044196 100644 --- a/code/__DEFINES/tgs.dm +++ b/code/__DEFINES/tgs.dm @@ -1,6 +1,6 @@ // tgstation-server DMAPI -#define TGS_DMAPI_VERSION "6.6.0" +#define TGS_DMAPI_VERSION "6.6.1" // All functions and datums outside this document are subject to change with any version and should not be relied on. diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm index f52350aa8db3..903cd06c3119 100644 --- a/code/game/machinery/kitchen/smartfridge.dm +++ b/code/game/machinery/kitchen/smartfridge.dm @@ -23,7 +23,7 @@ var/icon_on = "smartfridge" var/icon_off = "smartfridge-off" var/icon_panel = "smartfridge-panel" - var/item_quants = list() + var/list/item_quants = list() //! Assoc list of names -> list(items) var/ispowered = TRUE //starts powered var/is_secure_fridge = FALSE var/shoot_inventory = FALSE @@ -40,6 +40,24 @@ GLOB.vending_products[/obj/item/reagent_container/glass/bottle] = 1 GLOB.vending_products[/obj/item/storage/pill_bottle] = 1 +/obj/structure/machinery/smartfridge/Destroy(force) + if(is_in_network()) // Delete all contents from networked storage index + for(var/atom/movable/item as anything in contents) + delete_contents(item) + item_quants.Cut() + return ..() // parent will delete contents if we're not networked + +/// Deletes given object in contents of the smartfridge +/obj/structure/machinery/smartfridge/proc/delete_contents(obj/item/item) + if(item.loc != src) + return + contents -= item + if(item_quants[item.name]) + item_quants[item.name] -= item + if(is_in_network() && chemical_data.shared_item_storage[item.name]) + chemical_data.shared_item_storage[item.name] -= item + qdel(item) + /obj/structure/machinery/smartfridge/proc/accept_check(obj/item/O as obj) if(istype(O,/obj/item/reagent_container/food/snacks/grown/) || istype(O,/obj/item/seeds/)) return 1 diff --git a/code/game/machinery/vending/vendor_types/crew/commanding_officer.dm b/code/game/machinery/vending/vendor_types/crew/commanding_officer.dm index 830511ad4b19..d7d49a8ae044 100644 --- a/code/game/machinery/vending/vendor_types/crew/commanding_officer.dm +++ b/code/game/machinery/vending/vendor_types/crew/commanding_officer.dm @@ -1,9 +1,9 @@ //------------GEAR VENDOR--------------- GLOBAL_LIST_INIT(cm_vending_gear_commanding_officer, list( - list("COMMANDING OFFICER'S PRIMARY (CHOOSE 1)", 0, null, null, null), - list("M46C pulse rifle", 0, /obj/effect/essentials_set/co/riflepreset, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_MANDATORY), - list("M56C Smartgun", 0, /obj/item/storage/box/m56c_system, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_MANDATORY), + list("COMMANDER'S PRIMARY (CHOOSE 1)", 0, null, null, null), + list("M46C Pulse Rifle", 0, /obj/effect/essentials_set/co/riflepreset, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_MANDATORY), + list("M56C Smartgun", 0, /obj/item/storage/box/m56c_system, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_MANDATORY), list("PRIMARY AMMUNITION", 0, null, null, null), list("M41A MK1 Magazine", 30, /obj/item/ammo_magazine/rifle/m41aMK1, null, VENDOR_ITEM_RECOMMENDED), @@ -28,11 +28,19 @@ GLOBAL_LIST_INIT(cm_vending_gear_commanding_officer, list( list("M41A Rubber Shot Magazine", 10, /obj/item/ammo_magazine/rifle/rubber, null, VENDOR_ITEM_REGULAR), list("Beanbag Slugs", 10, /obj/item/ammo_magazine/shotgun/beanbag, null, VENDOR_ITEM_REGULAR), + list("EXPLOSIVES", 0, null, null, null), + list("HEDP Grenade Pack", 15, /obj/item/storage/box/packet/high_explosive, null, VENDOR_ITEM_REGULAR), + list("HEFA Grenade Pack", 15, /obj/item/storage/box/packet/hefa, null, VENDOR_ITEM_REGULAR), + list("WP Grenade Pack", 15, /obj/item/storage/box/packet/phosphorus, null, VENDOR_ITEM_REGULAR), + list("RAIL ATTACHMENTS", 0, null, null, null), list("Red-Dot Sight", 15, /obj/item/attachable/reddot, null, VENDOR_ITEM_REGULAR), list("Reflex Sight", 15, /obj/item/attachable/reflex, null, VENDOR_ITEM_REGULAR), list("S4 2x Telescopic Mini-Scope", 15, /obj/item/attachable/scope/mini, null, VENDOR_ITEM_REGULAR), + list("Helmet Visors", 0, null, null, null), + list("Welding Visor", 5, /obj/item/device/helmet_visor/welding_visor, null, VENDOR_ITEM_RECOMMENDED), + list("UNDERBARREL ATTACHMENTS", 0, null, null, null), list("Laser Sight", 15, /obj/item/attachable/lasersight, null, VENDOR_ITEM_REGULAR), list("Angled Grip", 15, /obj/item/attachable/angledgrip, null, VENDOR_ITEM_REGULAR), @@ -40,12 +48,13 @@ GLOBAL_LIST_INIT(cm_vending_gear_commanding_officer, list( list("Underbarrel Shotgun", 15, /obj/item/attachable/attached_gun/shotgun, null, VENDOR_ITEM_REGULAR), list("Underbarrel Extinguisher", 15, /obj/item/attachable/attached_gun/extinguisher, null, VENDOR_ITEM_REGULAR), list("Underbarrel Flamethrower", 15, /obj/item/attachable/attached_gun/flamer, null, VENDOR_ITEM_REGULAR), + list("Underbarrel Grenade Launcher", 5, /obj/item/attachable/attached_gun/grenade, null, VENDOR_ITEM_REGULAR), list("BARREL ATTACHMENTS", 0, null, null, null), - list("Suppressor", 15, /obj/item/attachable/suppressor, null, VENDOR_ITEM_REGULAR), list("Extended Barrel", 15, /obj/item/attachable/extended_barrel, null, VENDOR_ITEM_REGULAR), list("Recoil Compensator", 15, /obj/item/attachable/compensator, null, VENDOR_ITEM_REGULAR), - )) + list("Suppressor", 15, /obj/item/attachable/suppressor, null, VENDOR_ITEM_REGULAR), + )) /obj/structure/machinery/cm_vending/gear/commanding_officer name = "\improper ColMarTech Commanding Officer Weapon Rack" @@ -63,9 +72,15 @@ GLOBAL_LIST_INIT(cm_vending_gear_commanding_officer, list( GLOBAL_LIST_INIT(cm_vending_clothing_commanding_officer, list( list("STANDARD EQUIPMENT (TAKE ALL)", 0, null, null, null), list("Headset", 0, /obj/item/device/radio/headset/almayer/mcom/cdrcom, MARINE_CAN_BUY_EAR, VENDOR_ITEM_MANDATORY), - list("Satchel", 0, /obj/item/storage/backpack/satchel/lockable, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY), list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), + list("COMMANDING OFFICER ESSENTIALS KIT (TAKE ALL)", 0, null, null, null), + list("Commanding Officer Essentials Kit", 0, /obj/effect/essentials_set/commanding_officer, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_MANDATORY), + + list("BAGS (CHOOSE 1)", 0, null, null, null), + list("Commanding Officer Backpack", 0, /obj/item/storage/backpack/mcommander, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY), + list("Secure Satchel", 0, /obj/item/storage/backpack/satchel/lockable, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY), + list("COMBAT EQUIPMENT (TAKE ALL)", 0, null, null, null), list("Commanding Officer's M3 Armor", 0, /obj/item/clothing/suit/storage/marine/MP/CO, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), list("Commanding Officer's M10 Helmet", 0, /obj/item/clothing/head/helmet/marine/CO, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_MANDATORY), @@ -84,8 +99,13 @@ GLOBAL_LIST_INIT(cm_vending_clothing_commanding_officer, list( list("Medical HUD Glasses", 0, /obj/item/clothing/glasses/hud/health, MARINE_CAN_BUY_GLASSES, VENDOR_ITEM_RECOMMENDED), list("Security HUD Glasses", 0, /obj/item/clothing/glasses/sunglasses/sechud, MARINE_CAN_BUY_GLASSES, VENDOR_ITEM_REGULAR), - list("BELTS (TAKE ALL)", 0, null, null, null), + list("BELTS (CHOOSE 1)", 0, null, null, null), list("G8-A General Utility Pouch", 0, /obj/item/storage/backpack/general_belt, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), + list("Military Police Belt", 0, /obj/item/storage/belt/security/MP/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), + list("M276 Medical Storage Rig", 0, /obj/item/storage/belt/medical/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), + list("M276 Ammo Load Rig", 0, /obj/item/storage/belt/marine, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), + list("M276 Holster Toolrig", 0, /obj/item/storage/belt/gun/utility/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), + list("M276 M82F Holster Rig", 0, /obj/item/storage/belt/gun/flaregun, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), list("POUCHES (CHOOSE 2)", 0, null, null, null), list("First-Aid Pouch (Refillable Injectors)", 0, /obj/item/storage/pouch/firstaid/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), @@ -110,6 +130,15 @@ GLOBAL_LIST_INIT(cm_vending_clothing_commanding_officer, list( /obj/structure/machinery/cm_vending/clothing/commanding_officer/get_listed_products(mob/user) return GLOB.cm_vending_clothing_commanding_officer +/obj/effect/essentials_set/commanding_officer + spawned_gear_list = list( + /obj/item/device/binoculars/range/designator, + /obj/item/map/current_map, + /obj/item/device/whistle, + /obj/item/weapon/gun/energy/taser, + /obj/item/device/megaphone, + ) + // This gets around the COs' weapon not spawning without incendiary mag. /obj/effect/essentials_set/co/riflepreset spawned_gear_list = list( diff --git a/code/modules/gear_presets/uscm_ship.dm b/code/modules/gear_presets/uscm_ship.dm index 4c383cfed6d9..5ea860b05edb 100644 --- a/code/modules/gear_presets/uscm_ship.dm +++ b/code/modules/gear_presets/uscm_ship.dm @@ -417,7 +417,7 @@ dress_extra = list(/obj/item/storage/large_holster/ceremonial_sword/full) dress_hat = list(/obj/item/clothing/head/marine/peaked/captain/white, /obj/item/clothing/head/marine/peaked/captain/black, /obj/item/clothing/head/marine/peaked) dress_shoes = list(/obj/item/clothing/shoes/dress/commander) - dress_over = list(/obj/item/clothing/suit/storage/jacket/marine/dress/officer/white, /obj/item/clothing/suit/storage/jacket/marine/dress/officer/black, /obj/item/clothing/suit/storage/jacket/marine/dress/officer/suit, /obj/item/clothing/suit/storage/jacket/marine/dress) + dress_over = list(/obj/item/clothing/suit/storage/jacket/marine/dress/officer/white, /obj/item/clothing/suit/storage/jacket/marine/dress/officer/black, /obj/item/clothing/suit/storage/jacket/marine/dress/officer/suit, /obj/item/clothing/suit/storage/jacket/marine/dress, /obj/item/clothing/suit/storage/jacket/marine/dress/bridge_coat_grey, ) /datum/equipment_preset/uscm_ship/commander/New() . = ..() @@ -458,7 +458,6 @@ new_human.equip_to_slot_or_del(new back_item(new_human), WEAR_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/general/large(new_human), WEAR_R_STORE) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/pistol/command(new_human), WEAR_L_STORE) - new_human.equip_to_slot_or_del(new /obj/item/device/binoculars/range/designator(new_human), WEAR_L_HAND) if(kit) new_human.equip_to_slot_or_del(new kit(new_human), WEAR_IN_BACK) @@ -479,6 +478,8 @@ /obj/item/clothing/suit/storage/jacket/marine/dress/officer/black, /obj/item/clothing/suit/storage/jacket/marine/dress/officer/suit, /obj/item/clothing/suit/storage/jacket/marine/dress/officer/falcon, + /obj/item/clothing/suit/storage/jacket/marine/dress/bridge_coat_grey, + /obj/item/clothing/suit/storage/jacket/marine/dress/bridge_coat, ) /datum/equipment_preset/uscm_ship/commander/council/load_gear(mob/living/carbon/human/new_human) @@ -512,7 +513,7 @@ minimap_icon = list("cic" = MINIMAP_ICON_COLOR_HEAD) minimap_background = MINIMAP_ICON_BACKGROUND_CIC - dress_extra = list(/obj/item/storage/large_holster/ceremonial_sword/full) + dress_extra = list(/obj/item/storage/large_holster/ceremonial_sword/full, /obj/item/clothing/suit/storage/jacket/marine/dress/bridge_coat_grey,) /datum/equipment_preset/uscm_ship/xo/New() . = ..() diff --git a/code/modules/mob/new_player/sprite_accessories/hair.dm b/code/modules/mob/new_player/sprite_accessories/hair.dm index 3f624b8d3b15..3dfe8bebd5af 100644 --- a/code/modules/mob/new_player/sprite_accessories/hair.dm +++ b/code/modules/mob/new_player/sprite_accessories/hair.dm @@ -738,3 +738,20 @@ /datum/sprite_accessory/hair/aviator name = "Aviator" icon_state = "hair_aviator" + +/datum/sprite_accessory/hair/gantleponytail + name = "Gentle Ponytail" + icon_state = "hair_gantleponytail" + gender = FEMALE + +/datum/sprite_accessory/hair/edgar + name = "Edgar" + icon_state = "hair_edgar" + +/datum/sprite_accessory/hair/emobun + name = "Emo Little Bun" + icon_state = "hair_emobun" + +/datum/sprite_accessory/hair/taper + name = "Taper" + icon_state = "hair_taper" diff --git a/code/modules/reagents/chemistry_machinery/autodispenser.dm b/code/modules/reagents/chemistry_machinery/autodispenser.dm index a06042aac7a8..eed96564da71 100644 --- a/code/modules/reagents/chemistry_machinery/autodispenser.dm +++ b/code/modules/reagents/chemistry_machinery/autodispenser.dm @@ -346,8 +346,7 @@ C.reagents.trans_to(container, amount) //We don't care about keeping empty bottles stored if(C.reagents.total_volume <= 0 && istypestrict(C,/obj/item/reagent_container/glass/bottle)) - linked_storage.item_quants[C.name]-- - qdel(C) //Might want to connect it to a disposal system later instead + linked_storage.delete_contents(C) if(stage_missing) amount = stage_missing diff --git a/code/modules/tgs/core/datum.dm b/code/modules/tgs/core/datum.dm index 93377079aa73..de420a2a325a 100644 --- a/code/modules/tgs/core/datum.dm +++ b/code/modules/tgs/core/datum.dm @@ -11,6 +11,10 @@ TGS_DEFINE_AND_SET_GLOBAL(tgs, null) src.event_handler = event_handler src.version = version +/datum/tgs_api/proc/TerminateWorld() + del(world) + sleep(1) // https://www.byond.com/forum/post/2894866 + /datum/tgs_api/latest parent_type = /datum/tgs_api/v5 diff --git a/code/modules/tgs/v4/api.dm b/code/modules/tgs/v4/api.dm index b9a75c4abb48..945e2e411767 100644 --- a/code/modules/tgs/v4/api.dm +++ b/code/modules/tgs/v4/api.dm @@ -73,7 +73,7 @@ if(cached_json["apiValidateOnly"]) TGS_INFO_LOG("Validating API and exiting...") Export(TGS4_COMM_VALIDATE, list(TGS4_PARAMETER_DATA = "[minimum_required_security_level]")) - del(world) + TerminateWorld() security_level = cached_json["securityLevel"] chat_channels_json_path = cached_json["chatChannelsJson"] @@ -188,7 +188,7 @@ requesting_new_port = TRUE if(!world.OpenPort(0)) //open any port TGS_ERROR_LOG("Unable to open random port to retrieve new port![TGS4_PORT_CRITFAIL_MESSAGE]") - del(world) + TerminateWorld() //request a new port export_lock = FALSE @@ -196,16 +196,16 @@ if(!new_port_json) TGS_ERROR_LOG("No new port response from server![TGS4_PORT_CRITFAIL_MESSAGE]") - del(world) + TerminateWorld() var/new_port = new_port_json[TGS4_PARAMETER_DATA] if(!isnum(new_port) || new_port <= 0) TGS_ERROR_LOG("Malformed new port json ([json_encode(new_port_json)])![TGS4_PORT_CRITFAIL_MESSAGE]") - del(world) + TerminateWorld() if(new_port != world.port && !world.OpenPort(new_port)) TGS_ERROR_LOG("Unable to open port [new_port]![TGS4_PORT_CRITFAIL_MESSAGE]") - del(world) + TerminateWorld() requesting_new_port = FALSE while(export_lock) diff --git a/code/modules/tgs/v5/api.dm b/code/modules/tgs/v5/api.dm index 45250efc4627..7226f29bba60 100644 --- a/code/modules/tgs/v5/api.dm +++ b/code/modules/tgs/v5/api.dm @@ -51,7 +51,7 @@ if(runtime_information[DMAPI5_RUNTIME_INFORMATION_API_VALIDATE_ONLY]) TGS_INFO_LOG("DMAPI validation, exiting...") - del(world) + TerminateWorld() version = new /datum/tgs_version(runtime_information[DMAPI5_RUNTIME_INFORMATION_SERVER_VERSION]) security_level = runtime_information[DMAPI5_RUNTIME_INFORMATION_SECURITY_LEVEL] diff --git a/html/changelogs/AutoChangeLog-pr-4696.yml b/html/changelogs/AutoChangeLog-pr-4696.yml new file mode 100644 index 000000000000..3cec02591554 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-4696.yml @@ -0,0 +1,4 @@ +author: "fira" +delete-after: True +changes: + - bugfix: "Fixed various issues in the Networking between Turing machine and Smartfridges." \ No newline at end of file diff --git a/html/changelogs/archive/2023-10.yml b/html/changelogs/archive/2023-10.yml index 1cb7c4597dd0..fb4ed664fdfd 100644 --- a/html/changelogs/archive/2023-10.yml +++ b/html/changelogs/archive/2023-10.yml @@ -367,3 +367,16 @@ - bugfix: Fixed people talking in radios all the time. Finally some quiet. - bugfix: deadchat death messages should now display immediately rather than being delayed a couple seconds. +2023-10-26: + 4hands44: + - rscadd: Added more attachments, and belts to the CO arsenal. + - rscadd: CO now has an Essentials Kit like other roles, containing his Designator, + and other useful tools. + - rscadd: Re-Adds Bridgecoat to some Officer Dress vendors. (Limited to CO(+) and + XO currently.) + - rscdel: Removed Laser Designator from CO spawn Preset. + - balance: CO can now vend welding Helmet visors. + - balance: Adds grenade packets to CO Vendor. + XDinka: + - rscadd: 'Added four new haircuts: gentle ponytail, edgar haircut, emo bun, taper + haircut.' diff --git a/icons/mob/humans/human_hair.dmi b/icons/mob/humans/human_hair.dmi index ca4a20bcafbd..9634a2543aa4 100644 Binary files a/icons/mob/humans/human_hair.dmi and b/icons/mob/humans/human_hair.dmi differ