diff --git a/_maps/shuttles/independent/independent_corona.dmm b/_maps/shuttles/independent/independent_corona.dmm index 9ef5fecfd62c..eb1e917e6dfb 100644 --- a/_maps/shuttles/independent/independent_corona.dmm +++ b/_maps/shuttles/independent/independent_corona.dmm @@ -4374,7 +4374,6 @@ /obj/docking_port/stationary{ dheight = 1; dir = 8; - disable_on_owner_ship_dock = 1; dwidth = 15; height = 31; name = "Corona Stern Dock"; diff --git a/_maps/shuttles/independent/independent_dwayne.dmm b/_maps/shuttles/independent/independent_dwayne.dmm index 6621cfa03fc8..280928431188 100644 --- a/_maps/shuttles/independent/independent_dwayne.dmm +++ b/_maps/shuttles/independent/independent_dwayne.dmm @@ -994,13 +994,6 @@ /obj/machinery/door/airlock/external{ dir = 4 }, -/obj/docking_port/mobile{ - can_move_docking_ports = 1; - dir = 4; - name = "mining_ship_all"; - port_direction = 2; - preferred_direction = 4 - }, /turf/open/floor/plating, /area/ship/hallway/central) "ki" = ( @@ -5376,6 +5369,21 @@ }, /turf/open/floor/plasteel/tech/grid, /area/ship/crew/canteen) +"Wb" = ( +/obj/effect/turf_decal/industrial/warning/fulltile, +/obj/machinery/door/firedoor/heavy, +/obj/machinery/door/poddoor{ + id = "dwayne_port" + }, +/obj/docking_port/mobile{ + dir = 2; + name = "mining_ship_all"; + launch_status = 0; + port_direction = 8; + preferred_direction = 4 + }, +/turf/open/floor/plating, +/area/ship/cargo/port) "Wg" = ( /obj/structure/table/wood, /obj/structure/cable/cyan{ @@ -6210,7 +6218,7 @@ Dv "} (19,1,1) = {" wh -AB +Wb DT Ip px diff --git a/_maps/shuttles/independent/independent_firefly.dmm b/_maps/shuttles/independent/independent_firefly.dmm index 3ac2dbb723c2..6b68b1860993 100644 --- a/_maps/shuttles/independent/independent_firefly.dmm +++ b/_maps/shuttles/independent/independent_firefly.dmm @@ -1933,10 +1933,12 @@ /area/ship/hallway/aft) "vA" = ( /obj/docking_port/stationary{ - dwidth = 15; - height = 15; - width = 30; - dir = 2 + dwidth = 20; + height = 31; + width = 41; + dir = 2; + disable_on_owner_ship_dock = 1; + dheight = 1 }, /turf/template_noop, /area/template_noop) diff --git a/_maps/shuttles/independent/independent_scarab.dmm b/_maps/shuttles/independent/independent_scarab.dmm index 348052a75bd7..2d83e0c9a931 100644 --- a/_maps/shuttles/independent/independent_scarab.dmm +++ b/_maps/shuttles/independent/independent_scarab.dmm @@ -752,8 +752,9 @@ "jt" = ( /obj/docking_port/stationary{ dwidth = 7; - height = 15; - width = 14 + height = 30; + width = 14; + name = "Scarab Port Bow Dock" }, /turf/template_noop, /area/template_noop) @@ -2039,17 +2040,6 @@ /obj/machinery/light/small/directional/west, /turf/open/floor/plasteel/tech/grid, /area/ship/hallway/central) -"ye" = ( -/obj/structure/catwalk/over, -/obj/docking_port/mobile{ - dir = 2; - launch_status = 0; - name = "drilling ship"; - port_direction = 8; - preferred_direction = 4 - }, -/turf/open/floor/plating/airless, -/area/ship/external/dark) "yi" = ( /turf/closed/wall/mineral/plastitanium/nodiagonal, /area/ship/engineering) @@ -3063,11 +3053,19 @@ /obj/docking_port/stationary{ dir = 8; dwidth = 3; - height = 15; - width = 5 + height = 30; + width = 5; + name = "Scarab Stern Dock" }, -/turf/template_noop, -/area/template_noop) +/obj/docking_port/mobile{ + can_move_docking_ports = 1; + dir = 4; + port_direction = 2; + preferred_direction = 4 + }, +/obj/structure/catwalk/over, +/turf/open/floor/plating/airless, +/area/ship/external/dark) "JW" = ( /obj/effect/turf_decal/corner/transparent/bar/diagonal, /obj/structure/cable/green{ @@ -3479,6 +3477,16 @@ }, /turf/open/floor/plasteel/tech/grid, /area/ship/engineering) +"OM" = ( +/obj/docking_port/stationary{ + dwidth = 5; + height = 30; + width = 10; + name = "Scarab Forward Bow Dock"; + dir = 4 + }, +/turf/template_noop, +/area/template_noop) "OS" = ( /turf/closed/wall/mineral/plastitanium/nodiagonal, /area/ship/hallway/fore) @@ -3672,10 +3680,10 @@ /turf/open/floor/plasteel/dark, /area/ship/hallway/central) "RX" = ( -/obj/structure/catwalk/over, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{ dir = 5 }, +/obj/structure/catwalk/over, /turf/open/floor/plating/airless, /area/ship/external/dark) "Sa" = ( @@ -4181,11 +4189,11 @@ dY dY Ei LJ -wW -wW +IE +Ku JT -wW -wW +Ku +IE JB nn jZ @@ -4208,11 +4216,11 @@ jG jG kz yi -IE +Ku xI RX Ku -IE +Ku ee lG Bd @@ -4414,7 +4422,7 @@ wW Ku "} (10,1,1) = {" -ye +Ku yX yX pQ @@ -4750,7 +4758,7 @@ wW wW wW wW -wW +OM wW wW wW diff --git a/_maps/shuttles/independent/independent_venetia.dmm b/_maps/shuttles/independent/independent_venetia.dmm index 00852d4ab131..ff4eb6298965 100644 --- a/_maps/shuttles/independent/independent_venetia.dmm +++ b/_maps/shuttles/independent/independent_venetia.dmm @@ -1427,11 +1427,18 @@ /area/ship/crew/dorm/dormtwo) "od" = ( /obj/docking_port/stationary{ - dwidth = 15; - width = 30; - height = 15; + dwidth = 20; + width = 40; + height = 35; dir = 8 }, +/obj/docking_port/stationary{ + dwidth = 20; + width = 40; + height = 35; + dir = 8; + name = "Venetia Port Quarter Dock" + }, /turf/template_noop, /area/template_noop) "os" = ( diff --git a/_maps/shuttles/minutemen/minutemen_typhon.dmm b/_maps/shuttles/minutemen/minutemen_typhon.dmm index c14b6d026685..63a600616b2e 100644 --- a/_maps/shuttles/minutemen/minutemen_typhon.dmm +++ b/_maps/shuttles/minutemen/minutemen_typhon.dmm @@ -1436,10 +1436,11 @@ /obj/docking_port/stationary{ width = 40; height = 40; - dwidth = 7; + dwidth = 36; name = "Typhon Starboard Quarter Dock"; dir = 8; - disable_on_owner_ship_dock = 1 + disable_on_owner_ship_dock = 1; + dheight = 1 }, /turf/open/floor/pod/light/external, /area/ship/external/dark) @@ -4212,7 +4213,8 @@ height = 40; dwidth = 7; name = "Typhon Quarter Dock"; - dir = 8 + dir = 8; + dheight = 1 }, /turf/open/floor/pod/light/external, /area/ship/external/dark) diff --git a/_maps/shuttles/pgf/pgf_mercurial_quasar.dmm b/_maps/shuttles/pgf/pgf_mercurial_quasar.dmm index 21b31fc65e0a..a7b6864c185b 100644 --- a/_maps/shuttles/pgf/pgf_mercurial_quasar.dmm +++ b/_maps/shuttles/pgf/pgf_mercurial_quasar.dmm @@ -3306,10 +3306,8 @@ disable_on_owner_ship_dock = 1 }, /obj/docking_port/mobile{ - can_move_docking_ports = 1; - port_direction = 8; - preferred_direction = 4; - dir = 2 + port_direction = 4; + preferred_direction = 4 }, /turf/open/floor/engine/hull/reinforced, /area/ship/external/dark) diff --git a/_maps/shuttles/subshuttles/independent_june.dmm b/_maps/shuttles/subshuttles/independent_june.dmm index a81dcf8c9018..7bcb428a3344 100644 --- a/_maps/shuttles/subshuttles/independent_june.dmm +++ b/_maps/shuttles/subshuttles/independent_june.dmm @@ -161,6 +161,28 @@ }, /turf/open/floor/plating, /area/ship/bridge) +"k" = ( +/obj/effect/turf_decal/techfloor{ + dir = 1 + }, +/obj/effect/turf_decal/steeldecal/steel_decals_central4, +/obj/effect/turf_decal/techfloor/hole/right{ + dir = 1 + }, +/obj/effect/turf_decal/spline/fancy/opaque/black{ + dir = 8 + }, +/obj/effect/turf_decal/techfloor/corner{ + dir = 1 + }, +/obj/docking_port/mobile{ + dir = 4; + name = "June-class Dropship"; + preferred_direction = 4; + port_direction = 2 + }, +/turf/open/floor/plasteel/tech/grid, +/area/ship/bridge) "l" = ( /obj/effect/turf_decal/techfloor{ dir = 1 @@ -205,22 +227,12 @@ /obj/effect/turf_decal/techfloor{ dir = 1 }, -/obj/effect/turf_decal/steeldecal/steel_decals_central4, -/obj/effect/turf_decal/techfloor/hole/right{ - dir = 1 - }, /obj/effect/turf_decal/spline/fancy/opaque/black{ dir = 8 }, /obj/effect/turf_decal/techfloor/corner{ dir = 1 }, -/obj/docking_port/mobile{ - dir = 8; - name = "June-class Dropship"; - preferred_direction = 8; - port_direction = 2 - }, /turf/open/floor/plasteel/tech/grid, /area/ship/bridge) "q" = ( @@ -607,7 +619,7 @@ g W g -r +k r r r diff --git a/_maps/shuttles/syndicate/syndicate_ngr_kaliandhi.dmm b/_maps/shuttles/syndicate/syndicate_ngr_kaliandhi.dmm index cb9547b6ff29..23d7574b1d10 100644 --- a/_maps/shuttles/syndicate/syndicate_ngr_kaliandhi.dmm +++ b/_maps/shuttles/syndicate/syndicate_ngr_kaliandhi.dmm @@ -694,6 +694,17 @@ /obj/structure/grille, /turf/open/floor/plating, /area/ship/bridge) +"dF" = ( +/obj/docking_port/stationary{ + dir = 2; + dwidth = 22; + height = 31; + width = 40; + name = "Starboard Airlock"; + dheight = 1 + }, +/turf/template_noop, +/area/template_noop) "dG" = ( /obj/effect/turf_decal/corner/opaque/red/half, /obj/effect/turf_decal/techfloor{ @@ -6049,15 +6060,13 @@ /turf/open/floor/plasteel/tech, /area/ship/security/armory) "FI" = ( -/obj/docking_port/stationary{ - dir = 2; - dwidth = 15; - height = 15; - width = 30; - name = "Starboard Airlock" +/obj/docking_port/mobile{ + launch_status = 0; + preferred_direction = 4; + port_direction = 4 }, -/turf/template_noop, -/area/template_noop) +/turf/open/floor/engine/hull/reinforced, +/area/ship/external/dark) "FJ" = ( /obj/structure/cable{ icon_state = "4-8" @@ -7003,12 +7012,6 @@ /obj/effect/turf_decal/borderfloorblack{ dir = 1 }, -/obj/docking_port/mobile{ - dir = 4; - launch_status = 0; - port_direction = 2; - preferred_direction = 4 - }, /turf/open/floor/plasteel/dark, /area/ship/cargo) "KX" = ( @@ -9576,8 +9579,8 @@ /area/ship/engineering/atmospherics) "Xv" = ( /obj/docking_port/stationary{ - dwidth = 10; - height = 15; + dwidth = 11; + height = 30; width = 30; name = "Portside Airlock" }, @@ -10421,7 +10424,7 @@ Dp Dp Dp Dp -CN +Wo CN CN "} @@ -10453,7 +10456,7 @@ zS Qx CH FI -CN +dF CN "} (13,1,1) = {" @@ -10483,7 +10486,7 @@ Rx lj pb Lm -CN +Wo CN CN "} @@ -10543,7 +10546,7 @@ Dp WP Dp Dp -CN +Wo CN CN CN diff --git a/code/__DEFINES/atom_hud.dm b/code/__DEFINES/atom_hud.dm index 5056899d9b1e..5bdc5d77da2f 100644 --- a/code/__DEFINES/atom_hud.dm +++ b/code/__DEFINES/atom_hud.dm @@ -53,6 +53,8 @@ //data HUD (medhud, sechud) defines //Don't forget to update human/New() if you change these! +// [CELADON-EDIT-FIX] - ФИКС СЕК-ХАДОВ ВРЕМЕННЫЙ +/* #define DATA_HUD_SECURITY_BASIC "sec_basic" #define DATA_HUD_SECURITY_ADVANCED "sec_adv" #define DATA_HUD_MEDICAL_BASIC "med_basic" @@ -78,7 +80,35 @@ #define ANTAG_HUD_FUGITIVE "fugitive" #define ANTAG_HUD_GANGSTER "gangster" #define ANTAG_HUD_SPACECOP "spacecop" +*/ +//data HUD (medhud, sechud) defines +//Don't forget to update human/New() if you change these! +#define DATA_HUD_SECURITY_BASIC 1 +#define DATA_HUD_SECURITY_ADVANCED 2 +#define DATA_HUD_MEDICAL_BASIC 3 +#define DATA_HUD_MEDICAL_ADVANCED 4 +#define DATA_HUD_DIAGNOSTIC_BASIC 5 +#define DATA_HUD_DIAGNOSTIC_ADVANCED 6 +#define DATA_HUD_ABDUCTOR 7 +#define DATA_HUD_SENTIENT_DISEASE 8 +#define DATA_HUD_AI_DETECT 9 +#define DATA_HUD_FAN 10 +//antag HUD defines +#define ANTAG_HUD_REV 11 +#define ANTAG_HUD_OPS 12 +#define ANTAG_HUD_WIZ 13 +#define ANTAG_HUD_SHADOW 14 +#define ANTAG_HUD_TRAITOR 15 +#define ANTAG_HUD_NINJA 16 +#define ANTAG_HUD_CHANGELING 17 +#define ANTAG_HUD_ABDUCTOR 18 +#define ANTAG_HUD_BROTHER 19 +#define ANTAG_HUD_OBSESSED 20 +#define ANTAG_HUD_FUGITIVE 21 +#define ANTAG_HUD_GANGSTER 22 +#define ANTAG_HUD_SPACECOP 23 +// [/CELADON-EDIT-FIX] // Notification action types #define NOTIFY_JUMP "jump" diff --git a/code/__DEFINES/qdel.dm b/code/__DEFINES/qdel.dm index c9dbce5b9ee2..e62b08da66ca 100644 --- a/code/__DEFINES/qdel.dm +++ b/code/__DEFINES/qdel.dm @@ -39,7 +39,7 @@ // Defines for the time an item has to get its reference cleaned before it fails the queue and moves to the next. #define GC_FILTER_QUEUE 1 SECONDS -#define GC_CHECK_QUEUE 5 MINUTES +#define GC_CHECK_QUEUE 30 SECONDS // Reduced from 5 MINUTES for long-running rounds #define GC_DEL_QUEUE 10 SECONDS diff --git a/code/__DEFINES/shuttles.dm b/code/__DEFINES/shuttles.dm index 357f352f893d..885bcbe7215d 100644 --- a/code/__DEFINES/shuttles.dm +++ b/code/__DEFINES/shuttles.dm @@ -23,17 +23,19 @@ // Shuttle return values #define SHUTTLE_CAN_DOCK "can_dock" #define SHUTTLE_NOT_A_DOCKING_PORT "not a docking port" -#define SHUTTLE_DWIDTH_TOO_LARGE "docking width too large" -#define SHUTTLE_WIDTH_TOO_LARGE "width too large" -#define SHUTTLE_DHEIGHT_TOO_LARGE "docking height too large" -#define SHUTTLE_HEIGHT_TOO_LARGE "height too large" -#define SHUTTLE_ALREADY_DOCKED "we are already docked" -#define SHUTTLE_SOMEONE_ELSE_DOCKED "someone else docked" -#define SHUTTLE_PORT_DISABLED "port is disabled" -#define SHUTTLE_TOUCHES_EDGE "landing area overlaps with map border" -#define SHUTTLE_OUR_MOBILEDOCK_FORBIDS_DOCKING "our mobile docking port is docked, forbidding docking" -#define SHUTTLE_TARGET_MOBILEDOCK_FORBIDS_DOCKING "target's mobile docking port is docked forbidding docking" -#define SHUTTLE_PORT_IS_ADJUSTING "port is in the middle of adjusting another ship to land" +#define SHUTTLE_DWIDTH_TOO_LARGE "our vessel's width offset (dwidth) is too large for this port's bounds" +#define SHUTTLE_WIDTH_TOO_LARGE "our vessel's width is too large for this port's bounds" +#define SHUTTLE_DHEIGHT_TOO_LARGE "our vessel's height offset (dheight) is too large for this port's bounds" +#define SHUTTLE_HEIGHT_TOO_LARGE "our vessel's height is too large for this port's bounds" +#define SHUTTLE_ALREADY_DOCKED "vessel is already docked on this port" +#define SHUTTLE_SOMEONE_ELSE_DOCKED "another vessel is already docked on this port" +#define SHUTTLE_PORT_DISABLED "docking port is disabled" +#define SHUTTLE_TOUCHES_EDGE "the landing area overlaps with map border" +#define SHUTTLE_OUR_MOBILEDOCK_FORBIDS_DOCKING "our mobile docking port is docked with something; forbidding docking" +#define SHUTTLE_TARGET_MOBILEDOCK_FORBIDS_DOCKING "target's mobile docking port is docked with something; forbidding docking on this particular port" +#define SHUTTLE_PORT_IS_ADJUSTING "adjustable port is in the middle of adjusting itself for another vessel to land" +#define SHUTTLE_ADJUSTABLE_OUR_HEIGHT_TOO_LARGE "adjustable port's zone height is not large enough for our vessel" +#define SHUTTLE_ADJUSTABLE_OUR_WIDTH_TOO_LARGE "adjustable port's zone width is not large enough for our vessel" //Launching Shuttles to CentCom diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 4a139c2e5622..188e8b67e1b4 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -163,7 +163,7 @@ #define FIRE_PRIORITY_VIS 10 #define FIRE_PRIORITY_AMBIENCE 10 #define FIRE_PRIORITY_MISSIONS 10 -#define FIRE_PRIORITY_GARBAGE 15 +#define FIRE_PRIORITY_GARBAGE 10 // Increased from 15 for better performance in long rounds #define FIRE_PRIORITY_WET_FLOORS 20 #define FIRE_PRIORITY_AIR 20 #define FIRE_PRIORITY_NPC 20 diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index 081fc1a9308f..57e89a7cb789 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -24,7 +24,7 @@ By using these methods of finding references, you can make your life far, far ea SUBSYSTEM_DEF(garbage) name = "Garbage" priority = FIRE_PRIORITY_GARBAGE - wait = 2 SECONDS + wait = 1 SECONDS // Increased frequency from 2 SECONDS for better throughput flags = SS_POST_FIRE_TIMING|SS_BACKGROUND|SS_NO_INIT runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY init_order = INIT_ORDER_GARBAGE diff --git a/code/controllers/subsystem/idlenpcpool.dm b/code/controllers/subsystem/idlenpcpool.dm index 5c8bb49ab765..be05c8086594 100644 --- a/code/controllers/subsystem/idlenpcpool.dm +++ b/code/controllers/subsystem/idlenpcpool.dm @@ -2,7 +2,7 @@ SUBSYSTEM_DEF(idlenpcpool) name = "Idling NPC Pool" flags = SS_POST_FIRE_TIMING|SS_BACKGROUND|SS_NO_INIT priority = FIRE_PRIORITY_IDLE_NPC - wait = 60 + wait = 30 // Reduced from 60 to check more frequently for player presence runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME var/list/currentrun = list() @@ -23,7 +23,9 @@ SUBSYSTEM_DEF(idlenpcpool) if (!resumed) var/list/idlelist = GLOB.simple_animals[AI_IDLE] - src.currentrun = idlelist.Copy() + var/list/zlist = GLOB.simple_animals[AI_Z_OFF] + // Process both idle and z-off mobs + src.currentrun = idlelist.Copy() + zlist.Copy() //cache for sanic speed (lists are references anyways) var/list/currentrun = src.currentrun @@ -33,12 +35,19 @@ SUBSYSTEM_DEF(idlenpcpool) --currentrun.len if (!SA) GLOB.simple_animals[AI_IDLE] -= SA + GLOB.simple_animals[AI_Z_OFF] -= SA continue if(!SA.ckey) - if(SA.stat != DEAD) - SA.handle_automated_movement() - if(SA.stat != DEAD) - SA.check_should_sleep() + // For AI_Z_OFF mobs, only check if they should wake up, don't move them + if(SA.AIStatus == AI_Z_OFF) + if(SA.stat != DEAD) + SA.check_should_sleep() + else + // For AI_IDLE mobs, do normal processing + if(SA.stat != DEAD) + SA.handle_automated_movement() + if(SA.stat != DEAD) + SA.check_should_sleep() if (MC_TICK_CHECK) return diff --git a/code/controllers/subsystem/machines.dm b/code/controllers/subsystem/machines.dm index ee0f4c9b1f2b..ef607a5ae9bb 100644 --- a/code/controllers/subsystem/machines.dm +++ b/code/controllers/subsystem/machines.dm @@ -6,6 +6,8 @@ SUBSYSTEM_DEF(machines) var/list/processing = list() var/list/currentrun = list() var/list/powernets = list() + /// Track how many machines we skipped due to empty virtual z-levels + var/skipped_machines = 0 /datum/controller/subsystem/machines/Initialize() makepowernets() @@ -31,7 +33,7 @@ SUBSYSTEM_DEF(machines) propagate_network(PC,PC.powernet) /datum/controller/subsystem/machines/stat_entry(msg) - msg = "M:[length(processing)]|PN:[length(powernets)]" + msg = "M:[length(processing)]|PN:[length(powernets)]|S:[skipped_machines]" return ..() @@ -40,6 +42,7 @@ SUBSYSTEM_DEF(machines) for(var/datum/powernet/Powernet in powernets) Powernet.reset() //reset the power state. src.currentrun = processing.Copy() + skipped_machines = 0 //cache for sanic speed (lists are references anyways) var/list/currentrun = src.currentrun @@ -47,10 +50,37 @@ SUBSYSTEM_DEF(machines) while(currentrun.len) var/obj/machinery/thing = currentrun[currentrun.len] currentrun.len-- - if(QDELETED(thing) || thing.process(wait * 0.1) == PROCESS_KILL) + + if(QDELETED(thing)) + processing -= thing + if (MC_TICK_CHECK) + return + continue + + // Skip machines on virtual z-levels with no players present + // Exceptions: + // 1. Critical machines (SM, PA, telecomms) always process + // 2. Machines in outpost areas always process (player hubs) + // 3. Machines in ship areas always process (player-owned vessels) + if(!thing.critical_machine) + var/area/machine_area = get_area(thing) + // Check if it's an outpost or ship area - these always process + if(!istype(machine_area, /area/outpost) && !istype(machine_area, /area/ship)) + var/thing_vz = thing.virtual_z() + if(thing_vz) + var/players_on_vz = LAZYACCESS(SSmobs.players_by_virtual_z, "[thing_vz]") + if(!length(players_on_vz)) + skipped_machines++ + if (MC_TICK_CHECK) + return + continue + + // Process the machine + if(thing.process(wait * 0.1) == PROCESS_KILL) processing -= thing if (!QDELETED(thing)) thing.datum_flags &= ~DF_ISPROCESSING + if (MC_TICK_CHECK) return diff --git a/code/controllers/subsystem/npcpool.dm b/code/controllers/subsystem/npcpool.dm index 9ccc6bda58d5..de319433b9fe 100644 --- a/code/controllers/subsystem/npcpool.dm +++ b/code/controllers/subsystem/npcpool.dm @@ -36,6 +36,10 @@ SUBSYSTEM_DEF(npcpool) if(QDELETED(SA)) continue + // Skip AI_Z_OFF mobs - they're on virtual z-levels with no players + if(SA.AIStatus == AI_Z_OFF) + continue + if(!SA.ckey && !SA.notransform) if(SA.stat != DEAD) SA.handle_automated_movement() diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 2be41654fcb0..6cc4c55f95bf 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -127,17 +127,21 @@ SUBSYSTEM_DEF(shuttle) ///attempt at making transit levels bigger to allow for better ship to ship docking if(transit_width <= 32) ///32 x 3 = 96 - small sized ships shouldnt be bigger than this transit_width *= 3 - else if(transit_width <= 63) // 63 x 2 = 127 - 127 is the defialt size of planets, ideally we dont go higher than this + else if(transit_width <= 63) // 63 x 2 = 127 - 127 is the default size of planets, ideally we dont go higher than this transit_width *= 2 + else if(transit_width <= 127) // fuckhuge ships should prbobaly max out here, + transit_width = 127 // ditto else - transit_width = 127 // fuckhuge ships should prbobaly max out here + transit_width = 255 //...however, for the sake of edgecase handling, if a mapper decides to break all mapping conventions (map size larger than 127), we assume this is intentional, if(transit_height <= 32) ///32 x 3 = 96 - small sized ships shouldnt be bigger than this transit_height *= 3 - else if(transit_height <= 63) // 63 x 2 = 127 - 127 is the defialt size of planets, ideally we dont go higher than this + else if(transit_height <= 63) // 63 x 2 = 127 - 127 is the default size of planets, ideally we dont go higher than this transit_height *= 2 + else if(transit_height <= 127) // fuckhuge ships should prbobaly max out here, + transit_height = 127 // ditto else - transit_height = 127 // fuckhuge ships should prbobaly max out here + transit_height = 255 //...however, for the sake of edgecase handling, if a mapper decides to break all mapping conventions (map size larger than 127), we assume this is intentional, var/transit_path = /turf/open/space/transit switch(travel_dir) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index f99d582b9555..d25566c3d567 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -94,6 +94,7 @@ SUBSYSTEM_DEF(ticker) if(L[1] == "exclude") continue music += S + login_music_name = S var/old_login_music = trim(file2text("data/last_round_lobby_music.txt")) if(music.len > 1) @@ -110,14 +111,9 @@ SUBSYSTEM_DEF(ticker) if(!length(music)) music = world.file2list(ROUND_START_MUSIC_LIST, "\n") login_music = pick(music) - login_music_name = login_music // [CELADON-ADD] - MUSIC_CELADON else - // [CELADON-EDIT] - MUSIC_CELADON - // login_music = "[global.config.directory]/title_music/sounds/[pick(music)]" // ORIGINAL - var/selected_track = pick(music) - login_music = "[global.config.directory]/title_music/sounds/[selected_track]" - login_music_name = selected_track - // [/CELADON-EDIT] + login_music = "[global.config.directory]/title_music/sounds/[pick(music)]" + if(!GLOB.syndicate_code_phrase) GLOB.syndicate_code_phrase = generate_code_phrase(return_list=TRUE) diff --git a/code/datums/components/storage/ui.dm b/code/datums/components/storage/ui.dm index bc747b752e70..b2d533de52c8 100644 --- a/code/datums/components/storage/ui.dm +++ b/code/datums/components/storage/ui.dm @@ -150,8 +150,8 @@ I = i var/percent = percentage_by_item[I] var/atom/movable/screen/storage/volumetric_box/center/B = new /atom/movable/screen/storage/volumetric_box/center(null, src, I) - // SNOWFLAKE: force it to icon until we unfuck storage/click passing - I.mouse_opacity = MOUSE_OPACITY_ICON + // Make items non-clickable so clicks pass through to the box, preventing overlapping sprites from causing misclicks // [CELADON-EDIT] - VOLAMETRIC-STORAGE + I.mouse_opacity = MOUSE_OPACITY_TRANSPARENT // [/CELADON-EDIT] var/pixels_to_use = overrun? MINIMUM_PIXELS_PER_ITEM : max(using_horizontal_pixels * percent, MINIMUM_PIXELS_PER_ITEM) var/addrow = FALSE if(CEILING(pixels_to_use, 1) >= FLOOR(horizontal_pixels - current_pixel - VOLUMETRIC_STORAGE_EDGE_PADDING, 1)) diff --git a/code/datums/diseases/asthma_attack.dm b/code/datums/diseases/asthma_attack.dm index 9a7f12d34d88..1716e7710fcf 100644 --- a/code/datums/diseases/asthma_attack.dm +++ b/code/datums/diseases/asthma_attack.dm @@ -1,3 +1,4 @@ +/* /datum/disease/asthma_attack form = "Bronchitis" name = "Asthma attack" @@ -250,3 +251,4 @@ return to_chat(affected_mob, span_warning("You briefly choke on the mucus piling in your throat!")) affected_mob.losebreath++ +*/ diff --git a/code/datums/elements/directional_attack.dm b/code/datums/elements/directional_attack.dm index 65c14846a7dc..dbc94d585e99 100644 --- a/code/datums/elements/directional_attack.dm +++ b/code/datums/elements/directional_attack.dm @@ -54,12 +54,14 @@ if(QDELETED(clicked_atom)) return FALSE - var/turf/turf_to_check = get_step(source, angle_to_dir(Get_Angle(source, clicked_atom))) + var/turf/turf_to_check = get_step(source, angle_to_dir(Get_Angle(source,parse_caught_click_modifiers(modifiers, get_turf(source), source?.client)))) if(!turf_to_check || !source.Adjacent(turf_to_check)) return FALSE var/mob/living/target_mob for(target_mob in turf_to_check) + if(target_mob == source) + continue if(!target_mob || target_mob.stat == DEAD) continue return target_mob diff --git a/code/datums/status_effects/debuffs/lung_inflammation.dm b/code/datums/status_effects/debuffs/lung_inflammation.dm index 133a29ba6b8f..d8e1901cc126 100644 --- a/code/datums/status_effects/debuffs/lung_inflammation.dm +++ b/code/datums/status_effects/debuffs/lung_inflammation.dm @@ -1,3 +1,4 @@ +/* /datum/status_effect/lung_inflammation id = "lung_inflammation" tick_interval = 2 SECONDS @@ -140,3 +141,4 @@ var/obj/item/organ/lungs/holder_lungs = owner.getorganslot(ORGAN_SLOT_LUNGS) holder_lungs?.set_received_pressure_mult(holder_lungs::received_pressure_mult) qdel(src) +*/ diff --git a/code/datums/traits/negative/asthma.dm b/code/datums/traits/negative/asthma.dm index 7efc27df8d11..144fa3724389 100644 --- a/code/datums/traits/negative/asthma.dm +++ b/code/datums/traits/negative/asthma.dm @@ -1,3 +1,4 @@ +/* /datum/quirk/asthma name = "Asthma" desc = "You suffer from asthma, a inflammatory disorder that causes your airpipe to squeeze shut! Be careful around smoke and irritating gases!" @@ -136,3 +137,4 @@ current_attack = null COOLDOWN_START(src, next_attack_cooldown, rand(min_time_between_attacks, max_time_between_attacks)) +*/ diff --git a/code/game/machinery/aug_manipulator.dm b/code/game/machinery/aug_manipulator.dm index 596c22f933d1..5dfde94f8071 100644 --- a/code/game/machinery/aug_manipulator.dm +++ b/code/game/machinery/aug_manipulator.dm @@ -140,10 +140,8 @@ storedpart.static_icon = style_options[augstyle] if(augstyle == "digitigrade") storedpart.bodytype |= BODYTYPE_DIGITIGRADE - storedpart.limb_id = "digitigrade" else storedpart.bodytype &= ~(BODYTYPE_DIGITIGRADE) - storedpart.limb_id = "robotic" // [/CELADON-EDIT] storedpart.should_draw_greyscale = FALSE //Premptive fuck you to greyscale IPCs trying to break something storedpart.update_icon_dropped() diff --git a/code/game/objects/effects/contraband.dm b/code/game/objects/effects/contraband.dm index 0ce775a7766e..1f8967df9ce6 100644 --- a/code/game/objects/effects/contraband.dm +++ b/code/game/objects/effects/contraband.dm @@ -126,6 +126,7 @@ name = initial(selected.name) desc = initial(selected.desc) + icon = initial(selected.icon) icon_state = initial(selected.icon_state) poster_item_name = initial(selected.poster_item_name) poster_item_desc = initial(selected.poster_item_desc) diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 37da0a0c4b48..5fdba5e352d2 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -463,6 +463,8 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player) dock_x = template.height - template.port_y_offset dock_y = template.port_x_offset - 1 var/obj/docking_port/stationary/dock = new(locate(x + offset_x + dock_x, y + offset_y + dock_y, z), dock_holder) + if(name != "subship dock") //if you bothered to name it + dock.name = name dock.roundstart_template = subship_template dock.outpost_special_dock_perms = outpost_docker dock.load_template_on_initialize = load_on_init diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index f6f0a9fcb3da..02024dbe79a7 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -646,6 +646,10 @@ if(check_empty(user)) return + if(isbodypart(target)) + if(color_limb(target, user)) + return + if(istype(target, /obj/structure/railing/modern)) playsound(user.loc, 'sound/effects/spray.ogg', 25, TRUE, 5) return @@ -712,6 +716,51 @@ spray_overlay.color = paint_color . += spray_overlay +/obj/item/toy/crayon/spraycan/proc/color_limb(obj/item/bodypart/limb, mob/living/user) + if(!IS_ROBOTIC_LIMB(limb)) + return FALSE + + var/static/list/type_whitelist = list(/obj/item/bodypart/head/robot, /obj/item/bodypart/r_arm/robot, /obj/item/bodypart/l_arm/robot, /obj/item/bodypart/chest/robot, /obj/item/bodypart/leg/right/robot, /obj/item/bodypart/leg/left/robot) + if(!(limb.type in type_whitelist)) //Kepori won't break my system damn it + to_chat(user, span_warning("The machine doesn't accept that type of prosthetic!")) + return + + var/list/skins = list() + var/static/list/style_list_icons = list( + "standard" = 'icons/mob/augmentation/augments.dmi', + "engineer" = 'icons/mob/augmentation/augments_engineer.dmi', + "security" = 'icons/mob/augmentation/augments_security.dmi', + "mining" = 'icons/mob/augmentation/augments_mining.dmi', + "bishop" = 'mod_celadon/_storage_icons/icons/mobs/augmentation/augments_bishop.dmi', + "shellguard" = 'mod_celadon/_storage_icons/icons/mobs/augmentation/augments_shellguard.dmi', + "wardtakahashi" = 'mod_celadon/_storage_icons/icons/mobs/augmentation/augments_wardtakahashi.dmi', + "xion" = 'mod_celadon/_storage_icons/icons/mobs/augmentation/augments_xion.dmi', + "zenghu" = 'mod_celadon/_storage_icons/icons/mobs/augmentation/augments_zenghu.dmi', + ) + var/static/list/digitigrade_style_list = list( + "digitigrade" = 'mod_celadon/_storage_icons/icons/mobs/augmentation/digitigrade_legs.dmi', + "lizard" = 'icons/mob/augmentation/augments_lizard.dmi', + ) + var/static/list/style_options_list = style_list_icons + digitigrade_style_list + + + for(var/skin_option in style_options_list) + var/image/part_image = image(icon = style_options_list[skin_option], icon_state = "[limb.limb_id]_[limb.body_zone]") + if(limb.aux_zone) //Hands + part_image.overlays += image(icon = style_options_list[skin_option], icon_state = "[limb.limb_id]_[limb.aux_zone]") + skins += list("[skin_option]" = part_image) + var/choice = show_radial_menu(user, src, skins, require_near = TRUE) + if(choice && (use_charges(user, 5, requires_full = FALSE))) + playsound(user.loc, 'sound/effects/spray.ogg', 5, TRUE, 5) + limb.static_icon = style_options_list[choice] + if(choice in digitigrade_style_list) + limb.bodytype |= BODYTYPE_DIGITIGRADE + else + limb.bodytype &= ~(BODYTYPE_DIGITIGRADE) + limb.should_draw_greyscale = TRUE //Premptive fuck you to greyscale IPCs trying to break something + limb.update_icon_dropped() + return TRUE + /obj/item/toy/crayon/spraycan/borg name = "cyborg spraycan" desc = "A metallic container containing shiny synthesised paint." diff --git a/code/game/objects/items/food/soup.dm b/code/game/objects/items/food/soup.dm index fe04a95a3eeb..f2bc18714adf 100644 --- a/code/game/objects/items/food/soup.dm +++ b/code/game/objects/items/food/soup.dm @@ -302,6 +302,21 @@ tastes = list("beet" = 1) foodtypes = VEGETABLES +// [CELADON-ADD] +/obj/item/food/soup/traditionalredbeet + name = "tradition red beet soup" + desc = "A simplified form of borscht soup, notably lacking the meat broth." + icon = 'mod_celadon/_storage_icons/icons/items/misc/redbeetsoup.dmi' + icon_state = "redbeetsoup" + food_reagents = list( + /datum/reagent/consumable/nutriment = 18, + /datum/reagent/water = 5, + /datum/reagent/consumable/nutriment/vitamin = 6 + ) + tastes = list("nettles" = 1) + foodtypes = GRAIN | MEAT | VEGETABLES +// [/CELADON-ADD] + /obj/item/food/soup/onion name = "french onion soup" desc = "A soup consisting of fried onions that are cooked in a meat stock, then gratineed with bread and cheese at the top." diff --git a/code/modules/admin/verbs/map_template_loadverb.dm b/code/modules/admin/verbs/map_template_loadverb.dm index 4527241e5292..2a0154b7a0d4 100644 --- a/code/modules/admin/verbs/map_template_loadverb.dm +++ b/code/modules/admin/verbs/map_template_loadverb.dm @@ -73,6 +73,7 @@ SSmapping.map_templates[map] = new_map if(template_type == "Shuttle") var/datum/map_template/shuttle/shuttle_template = new_map + shuttle_template.faction = SSfactions.factions[/datum/faction/independent] //as factions were moved to map templates from datum/overmap/ship, uploading shuttle templates was broken for a while shuttle_template.file_name = "[map]" shuttle_template.category = "uploaded" SSmapping.shuttle_templates["[map]"] = shuttle_template diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_soup.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_soup.dm index fa771ec48dd3..2b562aaf7cf7 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_soup.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_soup.dm @@ -47,6 +47,18 @@ result = /obj/item/food/soup/nettle subcategory = CAT_SOUP +/datum/crafting_recipe/food/redbeetsoup + name = "Redbeet soup" + reqs = list( + /datum/reagent/water = 10, + /obj/item/reagent_containers/glass/bowl = 1, + /obj/item/food/meat/rawcutlet = 1, + /obj/item/food/grown/redbeet = 1, + /obj/item/food/grown/potato = 1, + ) + result = /obj/item/food/soup/nettle + subcategory = CAT_SOUP + /datum/crafting_recipe/food/wingfangchu name = "Wingfangchu" reqs = list( diff --git a/code/modules/mining/drill.dm b/code/modules/mining/drill.dm index f69feda2930b..b3e8eabbf5eb 100644 --- a/code/modules/mining/drill.dm +++ b/code/modules/mining/drill.dm @@ -19,7 +19,7 @@ density = TRUE anchored = FALSE use_power = NO_POWER_USE - layer = LYING_MOB_LAYER + layer = ABOVE_ALL_MOB_LAYER armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90) component_parts = list() diff --git a/code/modules/missions/outpost/acquire_mission.dm b/code/modules/missions/outpost/acquire_mission.dm index 5ab326a10ffa..7d3ab3c77580 100644 --- a/code/modules/missions/outpost/acquire_mission.dm +++ b/code/modules/missions/outpost/acquire_mission.dm @@ -17,11 +17,16 @@ /datum/mission/acquire/accept(datum/overmap/ship/controlled/acceptor, turf/accept_loc, obj/hangar_crate_spawner/cargo_belt) . = ..() +// [CELADON-EDIT] - SIMPLED SPAWN DRILL +/* if(isnull(cargo_belt)) container = spawn_bound(container_type, accept_loc, VARSET_CALLBACK(src, container, null)) stack_trace("[src] issued by [source_outpost] could not find cargo chute to send items down. Fell back to cargo console.") else container = spawn_bound(container_type, cargo_belt.loc, VARSET_CALLBACK(src, container, null)) + */ + container = spawn_bound(container_type, cargo_belt.loc, VARSET_CALLBACK(src, container, null)) +// [/CELADON-EDIT] container.name += " ([capitalize(objective_type.name)])" /datum/mission/acquire/Destroy() diff --git a/code/modules/missions/outpost/drill_mission.dm b/code/modules/missions/outpost/drill_mission.dm index abffda0af11a..4be62b0f50d8 100644 --- a/code/modules/missions/outpost/drill_mission.dm +++ b/code/modules/missions/outpost/drill_mission.dm @@ -52,11 +52,16 @@ /datum/mission/drill/accept(datum/overmap/ship/controlled/acceptor, turf/accept_loc, obj/hangar_crate_spawner/cargo_belt) . = ..() //you shouldn't be accepting this without an outpost but just in case +// [CELADON-EDIT] - SIMPLED SPAWN DRILL + /* if(isnull(cargo_belt)) sampler = spawn_bound(drill_type, accept_loc, VARSET_CALLBACK(src, sampler, null)) stack_trace("[src] issued by [source_outpost] could not find cargo chute to send items down. Fell back to cargo console.") else sampler = spawn_bound(drill_type, cargo_belt.loc, VARSET_CALLBACK(src, sampler, null)) + */ + sampler = spawn_bound(drill_type, accept_loc, VARSET_CALLBACK(src, sampler, null)) +// [/CELADON-EDIT] sampler.mission_class = class_wanted sampler.num_wanted = num_wanted sampler.orevein_wanted = available_planets[selected_planet] diff --git a/code/modules/missions/outpost/industrial_drill.dm b/code/modules/missions/outpost/industrial_drill.dm index ccd61391696e..243b78caa600 100644 --- a/code/modules/missions/outpost/industrial_drill.dm +++ b/code/modules/missions/outpost/industrial_drill.dm @@ -17,11 +17,16 @@ /datum/mission/acquire/industrial_drill/accept(datum/overmap/ship/controlled/acceptor, turf/accept_loc, obj/hangar_crate_spawner/cargo_belt) . = ..() +// [CELADON-EDIT] - SIMPLED SPAWN DRILL +/* if(isnull(cargo_belt)) mission_drill = spawn_bound(/obj/machinery/drill/sampler_mission, accept_loc, VARSET_CALLBACK(src, mission_drill, null)) stack_trace("[src] issued by [source_outpost] could not find cargo chute to send items down. Fell back to cargo console.") else mission_drill = spawn_bound(/obj/machinery/drill/sampler_mission, cargo_belt.loc, VARSET_CALLBACK(src, mission_drill, null)) +*/ + mission_drill = spawn_bound(/obj/machinery/drill/sampler_mission, cargo_belt.loc, VARSET_CALLBACK(src, mission_drill, null)) +// [/CELADON-EDIT] /datum/mission/acquire/industrial_drill/turn_in() //You guys gotta bring the expensive drill back. diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm index 0f131dbb7ee3..917874350ad5 100644 --- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm @@ -87,19 +87,19 @@ var/obj/item/lighter/liz/N = new(H) if(H.put_in_hands(N)) to_chat(H, span_notice("You ignite a small flame in your mouth.")) - // H.remove_reagent(/datum/reagent/fuel, 5) // [CELADON-ADD] - Вносилось Космо как фикс - var/obj/item/organ/stomach/belly = owner.getorganslot(ORGAN_SLOT_STOMACH) - belly.reagents.remove_reagent(/datum/reagent/fuel,4) + //var/obj/item/organ/stomach/belly = owner.getorganslot(ORGAN_SLOT_STOMACH) + //belly.reagents.remove_reagent(/datum/reagent/fuel,4) + H.reagents.remove_reagent(/datum/reagent/fuel, 5) else qdel(N) to_chat(H, span_warning("You don't have any free hands.")) /datum/action/innate/liz_lighter/IsAvailable() if(..()) - // var/mob/living/carbon/human/H = owner // [CELADON-ADD] - Вносилось Космо как фикс - // if(H.reagents && H.has_reagent(/datum/reagent/fuel, 5)) // [CELADON-ADD] - Вносилось Космо как фикс - var/obj/item/organ/stomach/belly = owner.getorganslot(ORGAN_SLOT_STOMACH) - if(belly && belly.reagents.has_reagent(/datum/reagent/fuel, 4)) + //var/obj/item/organ/stomach/belly = owner.getorganslot(ORGAN_SLOT_STOMACH) + //if(belly && belly.reagents.has_reagent(/datum/reagent/fuel, 4)) + var/mob/living/carbon/human/H = owner + if(H.reagents && H.has_reagent(/datum/reagent/fuel, 5)) return TRUE return FALSE diff --git a/code/modules/mob/living/living_movement.dm b/code/modules/mob/living/living_movement.dm index df1460bd4d7e..097406aa3253 100644 --- a/code/modules/mob/living/living_movement.dm +++ b/code/modules/mob/living/living_movement.dm @@ -13,6 +13,11 @@ return TRUE if(ismob(mover) && (mover in buckled_mobs)) return TRUE + //Allow squeezing by on grab intent + if(iscarbon(mover)) + var/mob/living/carbon/C = mover + if(C.a_intent == INTENT_GRAB) + return TRUE return !mover.density || body_position == LYING_DOWN /mob/living/toggle_move_intent() diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord_outfits.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord_outfits.dm index 6e6b5181abd9..6552fa7052bb 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord_outfits.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord_outfits.dm @@ -451,7 +451,7 @@ if(prob(75)) r_pocket = pick(/obj/item/flashlight/seclite, /obj/item/assembly/flash/handheld, /obj/item/restraints/handcuffs) if(prob(50)) - suit_store = pick(/obj/item/gun/energy/sharplite/x12, /obj/item/gun/energy/sharplite/l305) + suit_store = pick(/obj/item/gun/energy/e_gun/e_old, /obj/item/gun/energy/e_gun/e_old/smg) //suit_store = pick(/obj/item/gun/energy/sharplite/x12, /obj/item/gun/energy/sharplite/l305) // [CELADON-EDIT] for(var/i = 1 to 3) if(prob(75)) backpack_contents += pick_weight(list( diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 40ce78532ff8..d3f7ce45531e 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -248,6 +248,10 @@ /mob/living/simple_animal/proc/handle_automated_action() set waitfor = FALSE + // Periodically check if we should sleep (for non-hostile mobs) + // Hostile mobs override this and do their own checks + if(prob(10)) // 10% chance per action to check sleep state + check_should_sleep() return /mob/living/simple_animal/proc/handle_automated_movement() @@ -664,17 +668,39 @@ LAZYREMOVEASSOC(SSidlenpcpool.idle_mobs_by_virtual_level, "[virt_z]", src) /mob/living/simple_animal/proc/check_should_sleep() + // Don't sleep if being pulled or explicitly flagged to stay awake if (pulledby || shouldwakeup) toggle_ai(AI_ON) return + // Don't sleep if we're player-controlled + if(ckey) + return + var/virt_z = virtual_z() + if(!virt_z) + return + var/players_on_virtual_z = 0 - if(virt_z) - players_on_virtual_z = LAZYACCESS(SSmobs.players_by_virtual_z, "[virt_z]") - if(!length(players_on_virtual_z)) + players_on_virtual_z = LAZYACCESS(SSmobs.players_by_virtual_z, "[virt_z]") + + // If no players on this virtual z-level, sleep + if(!length(players_on_virtual_z)) + if(AIStatus != AI_Z_OFF) toggle_ai(AI_Z_OFF) - else if(AIStatus == AI_Z_OFF) + // If there are players and we're asleep, wake up + else if(AIStatus == AI_Z_OFF) + // Check if any players are actually close enough to matter + var/should_wake = FALSE + var/turf/our_turf = get_turf(src) + if(our_turf) + for(var/mob/living/player_mob in players_on_virtual_z) + // Wake up if a player is within reasonable distance + if(get_dist(our_turf, get_turf(player_mob)) <= MAX_SIMPLEMOB_WAKEUP_RANGE * 3) + should_wake = TRUE + break + + if(should_wake) toggle_ai(AI_ON) /mob/living/simple_animal/adjustHealth(amount, updating_health = TRUE, forced = FALSE) diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 379377f2b639..69b8d5f9fca2 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -661,6 +661,7 @@ return inebriation?.drunk_value return 0 +/* /mob/living/proc/adjust_lung_inflammation(amount) if(!isnum(amount)) CRASH("adjust_lung_inflammation: called with an invalid amount. (Got: [amount])") @@ -687,3 +688,4 @@ if(inflammation) return inflammation?.inflammation return 0 +*/ diff --git a/code/modules/overmap/_overmap_datum.dm b/code/modules/overmap/_overmap_datum.dm index 50bc2b331130..dc0fb9d6cebe 100644 --- a/code/modules/overmap/_overmap_datum.dm +++ b/code/modules/overmap/_overmap_datum.dm @@ -356,7 +356,7 @@ return if(INTERACTION_OVERMAP_DOCK) if(docked_to || docking) - return "ERROR: Unable to do this currently! Reduce speed or undock!" + return "ERROR: Unable to do this while docked! Undock first!" var/list/dockables = interact_target.get_dockable_locations(src) if(!dockables.len) @@ -367,15 +367,15 @@ return Dock(interact_target, choice) if(INTERACTION_OVERMAP_QUICKDOCK) if(docked_to || docking) - return "ERROR: Unable to do this currently! Undock first!" + return "ERROR: Unable to do this while docked! Undock first!" return Dock(interact_target) if(INTERACTION_OVERMAP_HAIL) return do_hail(user, interact_target) if(INTERACTION_OVERMAP_INTERDICTION) if(docked_to || docking) - return "ERROR: Unable to do this currently! Reduce speed or undock!" + return "ERROR: Unable to do this while docked! Undock first!" if(interact_target.docked_to || interact_target.docking) - return "ERROR: Unable to do this currently! Target is docked or docking!" + return "ERROR: Unable to do this while target is docked or docking!" var/list/dockables = get_dockable_locations(src) if(!dockables.len) diff --git a/code/modules/overmap/objects/dynamic_datum.dm b/code/modules/overmap/objects/dynamic_datum.dm index b0d76eaba22f..a5b5fe6e1d14 100644 --- a/code/modules/overmap/objects/dynamic_datum.dm +++ b/code/modules/overmap/objects/dynamic_datum.dm @@ -103,13 +103,21 @@ return new /datum/docking_ticket(_docking_error = "[src] cannot be docked to.") else var/dock_to_use = override_dock + //if true, we say that we do in fact have free docks, just you cant fit in any of them for whatever reason. hopefully this is less vauge than "X Cannot be docked to." + var/alt_message = FALSE if(!override_dock) for(var/obj/docking_port/stationary/dock as anything in reserve_docks) + //meant for quick dock, as such we check if we can actually dock here before checking all other docking ports. + //This means you can name a docking port with a leading ! like '!Ship Starboard Stern Docking Port' to have priority over other docking ports if(!dock.docked) + alt_message = TRUE + if(!dock.docked && dock_requester.shuttle_port.check_dock(dock, TRUE, FALSE)) dock_to_use = dock break if(!dock_to_use) + if(alt_message) + return new /datum/docking_ticket(_docking_error = "[src] has free docks, however vessel is unable to fit in any. Attempt manual docking for more information. Aborting docking.") return new /datum/docking_ticket(_docking_error = "[src] does not have any free docks. Aborting docking.") return new /datum/docking_ticket(dock_to_use, src, dock_requester) diff --git a/code/modules/overmap/objects/static_datum.dm b/code/modules/overmap/objects/static_datum.dm index 31be4dc6eb2e..d153845a4215 100644 --- a/code/modules/overmap/objects/static_datum.dm +++ b/code/modules/overmap/objects/static_datum.dm @@ -69,13 +69,21 @@ return new /datum/docking_ticket(_docking_error = "[src] cannot be docked to.") else var/dock_to_use = override_dock + //if true, we say that we do in fact have free docks, just you cant fit in any of them for whatever reason. hopefully this is less vauge than "X Cannot be docked to." + var/alt_message = FALSE if(!override_dock) for(var/obj/docking_port/stationary/dock as anything in reserve_docks) + //meant for quick dock, as such we check if we can actually dock here before checking all other docking ports. + //This means you can name a docking port with a leading ! like '!Ship Starboard Stern Docking Port' to have priority over other docking ports if(!dock.docked) + alt_message = TRUE + if(!dock.docked && dock_requester.shuttle_port.check_dock(dock, TRUE, FALSE)) dock_to_use = dock break if(!dock_to_use) + if(alt_message) + return new /datum/docking_ticket(_docking_error = "[src] has free docks, however vessel is unable to fit in any. Attempt manual docking for more information. Aborting docking.") return new /datum/docking_ticket(_docking_error = "[src] does not have any free docks. Aborting docking.") return new /datum/docking_ticket(dock_to_use, src, dock_requester) diff --git a/code/modules/overmap/ships/controlled_ship_datum.dm b/code/modules/overmap/ships/controlled_ship_datum.dm index afc11e4feb09..5b65fcb72d98 100644 --- a/code/modules/overmap/ships/controlled_ship_datum.dm +++ b/code/modules/overmap/ships/controlled_ship_datum.dm @@ -276,8 +276,10 @@ return new /datum/docking_ticket(override_dock, src, dock_requester) for(var/obj/docking_port/stationary/docking_port in shuttle_port.docking_points) - if(dock_requester.shuttle_port.check_dock(docking_port)) + if(dock_requester.shuttle_port.check_dock(docking_port, TRUE, FALSE)) return new /datum/docking_ticket(docking_port, src, dock_requester) + if(shuttle_port.docking_points.len) + return new /datum/docking_ticket(_docking_error = "ERROR: [src] has docking ports, however vessel is unable to dock to any. Attempt manual docking for more information. Aborting docking.") return ..() /datum/overmap/ship/controlled/get_dockable_locations(datum/overmap/requesting_interactor) diff --git a/code/modules/projectiles/guns/ballistic/assault.dm b/code/modules/projectiles/guns/ballistic/assault.dm index 2e8c4ffbae2e..0d66cff37454 100644 --- a/code/modules/projectiles/guns/ballistic/assault.dm +++ b/code/modules/projectiles/guns/ballistic/assault.dm @@ -121,6 +121,11 @@ item_state = "skm_inteq" manufacturer = MANUFACTURER_INTEQ +// [CELADON-ADD] - Рескинов нету - невидимая СКМ + unique_reskin = null + unique_reskin_changes_inhand = FALSE +// [/CELADON-ADD] + /obj/item/gun/ballistic/automatic/assault/cm82 name = "\improper CM-16" desc = "The standard-issue rifle of CLIP and an extensively modified reproduction of the P-16. Chambered in 5.56mm." diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 8814643b610a..72fd2e554262 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -259,8 +259,8 @@ var/transfer_log = list() var/r_to_send = list() // Validated list of reagents to be exposed var/reagents_to_remove = list() + var/part = amount / src.total_volume // [/CELADON-EDIT] if(!round_robin) - var/part = amount / src.total_volume for(var/datum/reagent/reagent as anything in cached_reagents) if(remove_blacklisted && !(reagent.can_synth)) continue @@ -301,9 +301,9 @@ to_transfer = max(to_transfer - transfer_amount , 0) if(methods) if(istype(target_atom, /obj/item/organ)) - R.expose_single(reagent, target, methods, transfer_amount, show_message) + R.expose_single(reagent, target, methods, part, show_message) // [CELADON-EDIT] else - R.expose_single(reagent, target_atom, methods, transfer_amount, show_message) + R.expose_single(reagent, target_atom, methods, part, show_message) // [CELADON-EDIT] reagent.on_transfer(target_atom, methods, transfer_amount * multiplier) remove_reagent(reagent.type, transfer_amount) var/list/reagent_qualities = list(REAGENT_TRANSFER_AMOUNT = transfer_amount) diff --git a/code/modules/reagents/chemistry/reagents/medical_reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medical_reagents/medicine_reagents.dm index 8a97ff092ff5..8567d7835d74 100644 --- a/code/modules/reagents/chemistry/reagents/medical_reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medical_reagents/medicine_reagents.dm @@ -532,11 +532,13 @@ /// We stop increasing stamina damage once we reach this number. var/maximum_od_stamina_damage = 80 +/* /datum/reagent/medicine/salbutamol/expose_mob(mob/living/M, method = TOUCH, reac_volume, show_message = TRUE, touch_protection = 0) var/datum/status_effect/lung_inflammation/asthma = M.has_status_effect(/datum/status_effect/lung_inflammation) if(asthma) asthma.adjust_salbutamol_levels(reac_volume) return ..() +*/ /datum/reagent/medicine/salbutamol/on_mob_metabolize(mob/living/affected_mob) . = ..() diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index dd880303efa7..f9d529133d50 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -467,10 +467,12 @@ return //Deliberately empty to make it a silent killer /datum/reagent/toxin/histamine/on_mob_life(mob/living/carbon/M) +/* if(!overdosed) if (SPT_PROB(5, SSMOBS_DT)) to_chat(M, span_warning("You find yourself wheezing a little harder as your neck swells...")) M.adjust_lung_inflammation(histamine_inflammation * SSMOBS_DT * REM) +*/ if(prob(10)) switch(rand(1,4)) @@ -491,7 +493,7 @@ /datum/reagent/toxin/histamine/overdose_process(mob/living/M) M.adjustOxyLoss(1*REM, 0) M.adjustToxLoss(1*REM, 0) - M.adjust_lung_inflammation(histamine_OD_inflammation * SSMOBS_DT * REM) + //M.adjust_lung_inflammation(histamine_OD_inflammation * SSMOBS_DT * REM) if (SPT_PROB(15, SSMOBS_DT)) to_chat(M, span_boldwarning("You feel your neck swelling, squeezing on your windpipe more and more!")) ..() diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm index e68acf32f96c..31232393a860 100644 --- a/code/modules/research/designs/machine_designs.dm +++ b/code/modules/research/designs/machine_designs.dm @@ -86,7 +86,7 @@ id = "space_heater" build_path = /obj/item/circuitboard/machine/space_heater build_type = AUTOLATHE | IMPRINTER - category = list ("Engineering Machinery", "initial", "Equipment") + category = list ("Engineering Machinery", "initial", "Machinery", "Equipment") departmental_flags = ALL /datum/design/board/teleport_station @@ -245,7 +245,7 @@ id = "rdserver" build_type = AUTOLATHE | IMPRINTER build_path = /obj/item/circuitboard/machine/rdserver - category = list("Research Machinery", "initial", "Equipment") + category = list("Research Machinery", "initial", "Machinery", "Equipment") /datum/design/board/mechfab name = "Machine Design (Exosuit Fabricator Board)" @@ -475,7 +475,7 @@ id = "ship_gravity" build_type = AUTOLATHE | IMPRINTER build_path = /obj/item/circuitboard/machine/ship_gravity - category = list("Misc. Machinery", "initial", "Equipment") + category = list("Misc. Machinery", "initial", "Machinery", "Equipment") /datum/design/board/ntnet_relay name = "Machine Design (NTNet Relay Board)" diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index 00064dbc5150..8d8a468a94df 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -405,13 +405,36 @@ All ShuttleMove procs go here . |= MOVE_CONTENTS /obj/docking_port/mobile/onShuttleMove(turf/newT, turf/oldT, list/movement_force, move_dir, obj/docking_port/stationary/old_dock, obj/docking_port/mobile/moving_dock, list/obj/docking_port/mobile/towed_shuttles) - if(!towed_shuttles[src] && !moving_dock.can_move_docking_ports) + //while im sure this thing has never ever been set to false, we check for it anyways + if(!moving_dock.can_move_docking_ports) + return FALSE + //are we not being towed by another ship or are we not the ship thats moving? if neither, ignore + if(!(towed_shuttles[src] || moving_dock == src)) return FALSE - . = ..() + + return ..() /obj/docking_port/stationary/onShuttleMove(turf/newT, turf/oldT, list/movement_force, move_dir, obj/docking_port/stationary/old_dock, obj/docking_port/mobile/moving_dock, list/obj/docking_port/mobile/towed_shuttles) - if(old_dock == src) //Never take our old port + //while im sure this thing has never ever been set to false, we check for it anyways + if(!moving_dock.can_move_docking_ports) return FALSE - if((!(src in moving_dock.docking_points) || !towed_shuttles[docked]) && !moving_dock.can_move_docking_ports) + //Never take our old port + if(old_dock == src) return FALSE - . = ..() + //Don't take the docking port from the ship we undocked from, either + if(old_dock && old_dock.owner_ship && old_dock.owner_ship.docked == src) + return FALSE + //are we a stationary docking port of the main docking port? if not, we get ignored + if(!(src in moving_dock.docking_points)) + return FALSE + //check if we are a docking port of a towed shuttle, if we are, we get towed along when the mainship moves, if not, we get ignored + for(var/obj/docking_port/mobile/checked_port as anything in towed_shuttles) + var/port_in_towed_ports = FALSE + if(src in checked_port.docking_points) + port_in_towed_ports = TRUE + break + //towed_shuttles[docked]: are we towing a docked ship? If so, let us load. The point of this appears to be to let pre-spawned subshuttles work. + //Basically, if we are not in the towed ports OR towing a ship, dont move us. + if(!port_in_towed_ports && !towed_shuttles[docked]) + return FALSE + return ..() diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 674ed536f6a4..d29377bbb5ca 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -635,25 +635,37 @@ // attempt to move us where we currently are, it will get weird. return SHUTTLE_ALREADY_DOCKED - if(S.adjust_dock_for_landing && intention_to_dock) + if(S.adjust_dock_for_landing) if(S.is_adjusting_now) return SHUTTLE_PORT_IS_ADJUSTING - S.adjust_dock_to_shuttle(src) + //since we width/height is more like a box where the ship can land IN, we can easily check if we can land here + if(height > S.height) + if (width > S.height && height > S.width) + return SHUTTLE_ADJUSTABLE_OUR_HEIGHT_TOO_LARGE + if(width > S.width) + if (height > S.width && width > S.height) + return SHUTTLE_ADJUSTABLE_OUR_WIDTH_TOO_LARGE + //hopefully that reduces the amount of procesing nesaary before running this proc's math + if(intention_to_dock) + S.adjust_dock_to_shuttle(src) + if(istype(S, /obj/docking_port/stationary/transit)) return SHUTTLE_CAN_DOCK - if(tow_dwidth > S.dwidth) - return SHUTTLE_DWIDTH_TOO_LARGE + //if we are trying to dock to an adjustable port, but we are only checking if we can even land, dont actually check since it hasn't adjusted yet + if(!S.adjust_dock_for_landing || S.adjust_dock_for_landing && intention_to_dock) + if(tow_dwidth > S.dwidth) + return SHUTTLE_DWIDTH_TOO_LARGE - if(tow_rwidth > S.width-S.dwidth) - return SHUTTLE_WIDTH_TOO_LARGE + if(tow_rwidth > S.width-S.dwidth) + return SHUTTLE_WIDTH_TOO_LARGE - if(tow_dheight > S.dheight) - return SHUTTLE_DHEIGHT_TOO_LARGE + if(tow_dheight > S.dheight) + return SHUTTLE_DHEIGHT_TOO_LARGE - if(tow_rheight > S.height-S.dheight) - return SHUTTLE_HEIGHT_TOO_LARGE + if(tow_rheight > S.height-S.dheight) + return SHUTTLE_HEIGHT_TOO_LARGE for(var/obj/docking_port/stationary/current_port as anything in docking_points) //if any of our docks has disable_on_owner_ship_dock set, has something docked to us, and we aren't going to a transit zone or an adjustable dock(usually planetary), don't land @@ -664,10 +676,12 @@ if(S.disable_on_owner_ship_dock && (!istype(S.owner_ship.docked, /obj/docking_port/stationary/transit))) return SHUTTLE_TARGET_MOBILEDOCK_FORBIDS_DOCKING - for(var/turf/closed/indestructible/edgeturf as anything in return_ordered_turfs(S.x, S.y, S.z, S.dir)) - if(!istype(edgeturf)) - continue - return SHUTTLE_TOUCHES_EDGE + //see above; adjustable port will not have adjusted and thus this reading will be wrong + if(!S.adjust_dock_for_landing || S.adjust_dock_for_landing && intention_to_dock) + for(var/turf/closed/indestructible/edgeturf as anything in return_ordered_turfs(S.x, S.y, S.z, S.dir)) + if(!istype(edgeturf)) + continue + return SHUTTLE_TOUCHES_EDGE return SHUTTLE_CAN_DOCK diff --git a/code/modules/surgery/asthmatic_bypass.dm b/code/modules/surgery/asthmatic_bypass.dm index d86ff942e5ee..1c7610f10dc0 100644 --- a/code/modules/surgery/asthmatic_bypass.dm +++ b/code/modules/surgery/asthmatic_bypass.dm @@ -1,3 +1,4 @@ +/* /datum/surgery/asthmatic_bypass name = "Asthmatic Bypass" //surgery_flags = SURGERY_REQUIRE_RESTING | SURGERY_REQUIRE_LIMB @@ -108,3 +109,4 @@ inflammation.adjust_inflammation(-inflammation_reduction) return TRUE +*/ diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index d2ccf21be224..64725bbed40a 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -239,8 +239,10 @@ breath_reagent.expose_mob(H, INHALE, breath_moles * 2) // 2 represents molarity of O2, we don't have citadel molarity mole_adjustments[gas] = (gas in mole_adjustments) ? mole_adjustments[gas] - breath_moles : -breath_moles +/* if(inflammatory_kpa) H.adjust_lung_inflammation(inflammatory_kpa * (HAS_TRAIT(H, TRAIT_ASTHMATIC) ? 10 : 2)) +*/ if(can_smell) handle_smell(breath, H) @@ -512,8 +514,10 @@ if(prob(sqrt(breath_effect_prob) * 6)) to_chat(breather, span_warning("You feel [chilly_message] in your [name].")) if(breath_temperature < chlly_threshold) +/* if(HAS_TRAIT(breather, TRAIT_ASTHMATIC)) // cold air typically causes problems in my experience breather.adjust_lung_inflammation(round(1 + (chlly_threshold - breath_temperature) / 30, 0.1)) +*/ if(breath_effect_prob) // Breathing into your mask, no particle. We can add fogged up glasses later if(breather.is_mouth_covered()) @@ -573,6 +577,7 @@ var/initial_value = initial(received_pressure_mult) + // you wont really notice if youre only breathing a bit more or a bit less var/dilated = (received_pressure_mult > (initial_value + LUNG_CAPACITY_ALERT_BUFFER)) var/constricted = (received_pressure_mult < (initial_value - LUNG_CAPACITY_ALERT_BUFFER)) diff --git a/code/modules/vending/security.dm b/code/modules/vending/security.dm index 4fa9a849c547..83fc328fd42d 100644 --- a/code/modules/vending/security.dm +++ b/code/modules/vending/security.dm @@ -26,9 +26,12 @@ extra_price = 700 var/voucher_items = list( - "NT-E-Rifle" = /obj/item/gun/energy/sharplite/x12, - "E-TAR SMG" = /obj/item/gun/energy/sharplite/l305, - "E-SG 500" = /obj/item/gun/energy/sharplite/x46) + "NT-E-Rifle" = /obj/item/gun/energy/e_gun/e_old, // [CELADON-ADD] - CELADON_RETURN_EGUN + "E-TAR SMG" = /obj/item/gun/energy/e_gun/e_old/smg, // [CELADON-ADD] - CELADON_RETURN_EGUN + "E-SG 500" = /obj/item/gun/energy/e_gun/e_old/iot) // [CELADON-ADD] - CELADON_RETURN_EGUN +// "NT-E-Rifle" = /obj/item/gun/energy/sharplite/x12, +// "E-TAR SMG" = /obj/item/gun/energy/sharplite/l305, +// "E-SG 500" = /obj/item/gun/energy/sharplite/x46) /obj/machinery/vending/security/pre_throw(obj/item/I) if(istype(I, /obj/item/grenade)) @@ -158,11 +161,11 @@ "SL AL-655 Energy Rifle" = /obj/item/gun/energy/e_gun/e_old/hades, // [CELADON-ADD] - CELADON_RETURN_EGUN "NT-E-Rifle" = /obj/item/gun/energy/e_gun/e_old, // [CELADON-ADD] - CELADON_RETURN_EGUN "E-TAR SMG" = /obj/item/gun/energy/e_gun/e_old/smg, // [CELADON-ADD] - CELADON_RETURN_EGUN - "E-SG 500" = /obj/item/gun/energy/e_gun/e_old/iot, // [CELADON-ADD] - CELADON_RETURN_EGUN - "SL AL-655 Energy Rifle" = /obj/item/gun/energy/sharplite/al655, - "NT-E-Rifle" = /obj/item/gun/energy/sharplite/x12, - "E-TAR SMG" = /obj/item/gun/energy/sharplite/l305, - "E-SG 500" = /obj/item/gun/energy/sharplite/x46) + "E-SG 500" = /obj/item/gun/energy/e_gun/e_old/iot) // [CELADON-ADD] - CELADON_RETURN_EGUN + //"SL AL-655 Energy Rifle" = /obj/item/gun/energy/sharplite/al655, + //"NT-E-Rifle" = /obj/item/gun/energy/sharplite/x12, + //"E-TAR SMG" = /obj/item/gun/energy/sharplite/l305, + //"E-SG 500" = /obj/item/gun/energy/sharplite/x46) /obj/item/gun_voucher name = "security weapon voucher" desc = "A token used to redeem guns from the SecTech vendor." diff --git a/mod_celadon/_storage_icons/icons/items/clothing/mask/overlay/hailer.dmi b/mod_celadon/_storage_icons/icons/items/clothing/mask/overlay/hailer.dmi index 69ae023aa684..266ce5ba87c1 100644 Binary files a/mod_celadon/_storage_icons/icons/items/clothing/mask/overlay/hailer.dmi and b/mod_celadon/_storage_icons/icons/items/clothing/mask/overlay/hailer.dmi differ diff --git a/mod_celadon/_storage_icons/icons/items/misc/redbeetsoup.dmi b/mod_celadon/_storage_icons/icons/items/misc/redbeetsoup.dmi new file mode 100644 index 000000000000..cc20ec6e23fb Binary files /dev/null and b/mod_celadon/_storage_icons/icons/items/misc/redbeetsoup.dmi differ diff --git a/mod_celadon/_storage_icons/icons/mobs/augmentation/digitigrade_legs.dmi b/mod_celadon/_storage_icons/icons/mobs/augmentation/digitigrade_legs.dmi index 847e5a6f5371..76920a664713 100644 Binary files a/mod_celadon/_storage_icons/icons/mobs/augmentation/digitigrade_legs.dmi and b/mod_celadon/_storage_icons/icons/mobs/augmentation/digitigrade_legs.dmi differ diff --git a/mod_celadon/items/_items.dme b/mod_celadon/items/_items.dme index 8b0f9c499b6d..c209e96aa2df 100644 --- a/mod_celadon/items/_items.dme +++ b/mod_celadon/items/_items.dme @@ -24,6 +24,7 @@ #include "code/clothing/suits.dm" #include "code/clothing/toggles.dm" #include "code/clothing/under.dm" +#include "code/changelog.dm" #include "code/ammunition.dm" #include "code/ashtray.dm" diff --git a/mod_celadon/items/code/changelog.dm b/mod_celadon/items/code/changelog.dm new file mode 100644 index 000000000000..ff6fb3aa0007 --- /dev/null +++ b/mod_celadon/items/code/changelog.dm @@ -0,0 +1,40 @@ +/datum/changelog/ui_static_data() + . = ..() + for(var/datum/tgs_revision_information/test_merge/testmerge in world.TgsTestMerges()) + if(!testmerge.body || findtext(testmerge.title, @"[s]")) + continue + var/list/changes = parse_github_changelog(testmerge.body) + if(!length(changes)) + changes = list("unknown" = list("Изменения не задокументированы. Попросите автора ([testmerge.author]) добавить список изменений в свой PR!")) + var/list/testmerge_data = list( + "title" = "[testmerge.title]", + "number" = testmerge.number, + "author" = testmerge.author, + "link" = testmerge.url, + "changes" = changes, + ) + LAZYADD(.["testmerges"], list(testmerge_data)) + +/proc/parse_github_changelog(body) as /list + var/static/regex/cl_pattern = new(@"(:cl:|🆑)([\S \t]*)$") + var/static/regex/entry_pattern = new(@"(\w+): (.+)") + var/static/regex/end_pattern = new(@"^/(:cl:|🆑)") + var/static/regex/newline_pattern = new(@"(\r\n|\r|\n)") + + var/started = FALSE + var/list/lines = splittext_char(trimtext(body), newline_pattern) + + for (var/line in lines) + line = trimtext(line) + if(findtext_char(line, end_pattern)) + break + if(started) + if (findtext_char(line, entry_pattern)) + var/change_type = trimtext(entry_pattern.group[1]) + var/change_desc = trimtext(entry_pattern.group[2]) + if(!change_type || !change_desc) + continue + LAZYADDASSOCLIST(., change_type, change_desc) + else + if(findtext_char(line, cl_pattern)) + started = TRUE diff --git a/tgui/packages/tgui/interfaces/Changelog.js b/tgui/packages/tgui/interfaces/Changelog.js deleted file mode 100644 index b3c4abb0f051..000000000000 --- a/tgui/packages/tgui/interfaces/Changelog.js +++ /dev/null @@ -1,359 +0,0 @@ -import { classes } from 'common/react'; -import { useBackend } from '../backend'; -import { Component, Fragment } from 'inferno'; -import { - Box, - Button, - Dropdown, - Icon, - Section, - Stack, - Table, -} from '../components'; -import { Window } from '../layouts'; -import { resolveAsset } from '../assets'; -import dateformat from 'dateformat'; -import yaml from 'js-yaml'; - -const icons = { - bugfix: { icon: 'bug', color: 'green' }, - wip: { icon: 'hammer', color: 'orange' }, - qol: { icon: 'hand-holding-heart', color: 'green' }, - soundadd: { icon: 'tg-sound-plus', color: 'green' }, - sounddel: { icon: 'tg-sound-minus', color: 'red' }, - add: { icon: 'check-circle', color: 'green' }, - expansion: { icon: 'check-circle', color: 'green' }, - rscadd: { icon: 'check-circle', color: 'green' }, - rscdel: { icon: 'times-circle', color: 'red' }, - imageadd: { icon: 'tg-image-plus', color: 'green' }, - imagedel: { icon: 'tg-image-minus', color: 'red' }, - spellcheck: { icon: 'spell-check', color: 'green' }, - experiment: { icon: 'radiation', color: 'yellow' }, - balance: { icon: 'balance-scale-right', color: 'yellow' }, - code_imp: { icon: 'code', color: 'green' }, - refactor: { icon: 'tools', color: 'green' }, - config: { icon: 'cogs', color: 'purple' }, - admin: { icon: 'user-shield', color: 'purple' }, - server: { icon: 'server', color: 'purple' }, - tgs: { icon: 'toolbox', color: 'purple' }, - tweak: { icon: 'wrench', color: 'green' }, - unknown: { icon: 'info-circle', color: 'label' }, -}; - -export class Changelog extends Component { - constructor() { - super(); - this.state = { - data: 'Loading changelog data...', - selectedDate: '', - selectedIndex: 0, - }; - this.dateChoices = []; - } - - setData(data) { - this.setState({ data }); - } - - setSelectedDate(selectedDate) { - this.setState({ selectedDate }); - } - - setSelectedIndex(selectedIndex) { - this.setState({ selectedIndex }); - } - - getData = (date, attemptNumber = 1) => { - const { act } = useBackend(this.context); - const self = this; - const maxAttempts = 6; - - if (attemptNumber > maxAttempts) { - return this.setData( - 'Failed to load data after ' + maxAttempts + ' attempts' - ); - } - - act('get_month', { date }); - - fetch(resolveAsset(date + '.yml')).then(async (changelogData) => { - const result = await changelogData.text(); - const errorRegex = /^Cannot find/; - - if (errorRegex.test(result)) { - const timeout = 50 + attemptNumber * 50; - - self.setData('Loading changelog data' + '.'.repeat(attemptNumber + 3)); - setTimeout(() => { - self.getData(date, attemptNumber + 1); - }, timeout); - } else { - self.setData(yaml.load(result, { schema: yaml.CORE_SCHEMA })); - } - }); - }; - - componentDidMount() { - const { - data: { dates = [] }, - } = useBackend(this.context); - - if (dates) { - dates.forEach((date) => - this.dateChoices.push(dateformat(date, 'mmmm yyyy', true)) - ); - this.setSelectedDate(this.dateChoices[0]); - this.getData(dates[0]); - } - } - - render() { - const { data, selectedDate, selectedIndex } = this.state; - const { - data: { dates }, - } = useBackend(this.context); - const { dateChoices } = this; - - const dateDropdown = dateChoices.length > 0 && ( - - -