diff --git a/code/__DEFINES/__game.dm b/code/__DEFINES/__game.dm index 142ec4f887..51d2641b2f 100644 --- a/code/__DEFINES/__game.dm +++ b/code/__DEFINES/__game.dm @@ -25,6 +25,19 @@ block( \ #define MAP_MAXSIZE 300 +#define MAP_FAKE_Z_ALMAYER_UPPER_DECK 1 +#define MAP_FAKE_Z_ALMAYER_LOWER_DECK 2 +#define MAP_FAKE_Z_ALMAYER_ELEVATOR 3 +#define MAP_FAKE_Z_BLACKSTONE_GROUND 7 +#define MAP_FAKE_Z_BLACKSTONE_BASEMENT 8 +#define MAP_FAKE_Z_BLACKSTONE_BUNKER 9 + +/* +It took me a minute to realize that all sanity needed is for the map object reference to return something. +If it does not, that means there is no reference map to begin with and we don't need to continue checking. +*/ +#define PATH_TO_GROUND_MAP_OBJ GLOB.map_type_list[SSmapping.configs[GROUND_MAP].map_name] + #define MAP_ICE_COLONY "Ice Colony" // Highpop only #define MAP_LV_624 "LV-624" #define MAP_LV_624_REPAIRED "LV-624 Repaired" @@ -32,6 +45,7 @@ block( \ #define MAP_PRISON_STATION "Fiorina Cellblocks" #define MAP_PRISON_STATION_V3 "Fiorina Science Annex" #define MAP_WHISKEY_OUTPOST "Whiskey Outpost" // Unused +#define MAP_BLACKSTONE_BRIDGE "Blackstone Bridge" //Whiskey Outpost re-imagined. #define MAP_DESERT_DAM "Trijent Dam" // Highpop only #define MAP_SOROKYNE_STRATA "Sorokyne Strata" #define MAP_CORSAT "CORSAT" // Highpop only @@ -46,6 +60,7 @@ block( \ #define MAP_CHINOOK "Chinook 91 GSO" //admin level #define MAP_DERELICT_ALMAYER "Derelict Almayer" +#define GAMEMODE_REMOTE_OUTPOST "Remote Outpost" #define GAMEMODE_WHISKEY_OUTPOST "Whiskey Outpost" #define GAMEMODE_HIVE_WARS "Hive Wars" diff --git a/code/__DEFINES/access.dm b/code/__DEFINES/access.dm index 0947ec5e8a..5b52a79881 100644 --- a/code/__DEFINES/access.dm +++ b/code/__DEFINES/access.dm @@ -48,6 +48,38 @@ most of them are tied into map-placed objects. This should be reworked in the fu #define ACCESS_SQUAD_ONE 39 #define ACCESS_SQUAD_TWO 40 +//================================================= + +/* +Access codes for USCM ground operations, unique from their ship codes. +May be necessary to make these unique, but for now they are only used in +Blackstone Bridge. +*/ +#define ACCESS_USCM_GROUND_GENERAL 50 //Mostly for armory and barracks access. +#define ACCESS_USCM_GROUND_MAINT 51 //Maintenance and engineering. +#define ACCESS_USCM_GROUND_SYNTH 52 //Synth storage. +#define ACCESS_USCM_GROUND_MEDICAL 53 //Access to the medical bay. +#define ACCESS_USCM_GROUND_ARMORY 54 //Who can unlock the armory shutters. +#define ACCESS_USCM_GROUND_GUEST 55 //Civilian access to unlock the guest bedrooms, only officers and guests have this access. +#define ACCESS_USCM_GROUND_LOCKDOWN 56 //Who can lockdown the base, only officers have this access. +#define ACCESS_USCM_GROUND_SMARTPREP 57 //Smartgun lockers. +#define ACCESS_USCM_GROUND_MEDPREP 58 //Corpseman vendor. +#define ACCESS_USCM_GROUND_SPECPREP 59 //Specialist vendor. +#define ACCESS_USCM_GROUND_TLPREP 60 //Squad/team leader prep. +#define ACCESS_USCM_GROUND_PLATOONL 61 //Platoon leader office(s). + +#define ACCESS_USCM_GROUND_COMMAND 63 //CIC and other stuff. +#define ACCESS_USCM_GROUND_CO_OFFICE 64 //Commander's office. +#define ACCESS_USCM_GROUND_CO_QUARTERS 65 //Commander's personal quarters. +#define ACCESS_USCM_GROUND_LT 66 //Lieutenant's personal quarters. +#define ACCESS_USCM_GROUND_WAREHOUSE 67 //Warehouse access. +#define ACCESS_USCM_GROUND_CHECKPOINT 68 //Checkpoint access. + +#define ACCESS_USCM_GROUND_PLATOON_ONE 71 //Two platoons. +#define ACCESS_USCM_GROUND_PLATOON_TWO 72 + +//================================================= + // AI Core Accesses /// Used in temporary passes #define ACCESS_MARINE_AI_TEMP 90 @@ -174,6 +206,16 @@ most of them are tied into map-placed objects. This should be reworked in the fu #define ACCESS_LIST_MARINE_MAIN "Almayer (Main)" ///All USCM Access levels used on the USS Almayer #define ACCESS_LIST_MARINE_ALL "Almayer (ALL)" +///Pulls up a list of mapped Almayer access regions for the ID changer. A few similar defines in here as well. Works with the faction datums. +#define ACCESS_LIST_MARINE_REGIONS "Almayer Access Regions" + +///Most access outside of certain officer access. +#define ACCESS_LIST_USCM_GROUND_MAIN "USCM Ground (Main)" +///All of the ground access for USCM. +#define ACCESS_LIST_USCM_GROUND_ALL "USCM Ground (ALL)" +///Regions for the outpost. +#define ACCESS_LIST_USCM_GROUND_REGIONS "USCM Ground Access Regions" + ///Used by the Wey-Yu - USCM Liaison #define ACCESS_LIST_MARINE_LIAISON "Wey-Yu (Liaison)" @@ -192,9 +234,13 @@ most of them are tied into map-placed objects. This should be reworked in the fu #define ACCESS_LIST_WY_SENIOR "Wey-Yu (Senior Lead)" ///All access levels associated with Weyland Yutani #define ACCESS_LIST_WY_ALL "Wey-Yu (ALL)" +#define ACCESS_LIST_PMC_REGIONS "PMC Access Regions" +#define ACCESS_LIST_WY_REGIONS "Weyland-Yutani Access Regions" ///All the access levels in the civillian category, excluding Press. #define ACCESS_LIST_COLONIAL_ALL "Colonial (ALL)" +///Colony access. +#define ACCESS_LIST_COLONIAL_REGIONS "Colonial Access Regions" ///Used by the Wey-Yu - Civil Authority Liaison #define ACCESS_LIST_CIVIL_LIAISON "Colonial (Liaison)" ///The access used by delivery ERT (Pizza/Souto) @@ -203,8 +249,14 @@ most of them are tied into map-placed objects. This should be reworked in the fu ///All access levels associated with UPP #define ACCESS_LIST_UPP_ALL "UPP (ALL)" #define ACCESS_LIST_UPP_PLATOON "UPP (Platoon)" +#define ACCESS_LIST_UPP_REGIONS "UPP Access Regions" ///Generic/basic access to CLF stuff #define ACCESS_LIST_CLF_BASE "CLF (Basic)" ///All access levels associated with CLF #define ACCESS_LIST_CLF_ALL "CLF (ALL)" +#define ACCESS_LIST_CLF_REGIONS "CLF Access Regions" + +//For the Brits. +#define ACCESS_LIST_TWE_ALL "TWE (ALL)" +#define ACCESS_LIST_TWE_REGIONS "TWE Access Regions" diff --git a/code/__DEFINES/camera.dm b/code/__DEFINES/camera.dm index a95112341a..1a6a602500 100644 --- a/code/__DEFINES/camera.dm +++ b/code/__DEFINES/camera.dm @@ -9,6 +9,12 @@ #define CAMERA_NET_MIDWAY "Midway" #define CAMERA_NET_COLONY "Colony" #define CAMERA_NET_ARES "ARES" +#define CAMERA_NET_USCM_GROUND "USCM Outpost" +#define CAMERA_NET_USCM_GROUND_WEST "Outpost Warehouse Checkpoint" +#define CAMERA_NET_USCM_GROUND_EAST "Outpost Bridge Checkpoint" +#define CAMERA_NET_WY_BUNKER "WY Site #16" +#define CAMERA_NET_WY_BUNKER_CONTAINMENT "Site #16 Containment" +#define CAMERA_NET_UPP_BUNKER "UPP Detention Facility #31" #define CAMERA_NET_MILITARY "Military" #define CAMERA_NET_OVERWATCH "Overwatch" diff --git a/code/__DEFINES/conflict.dm b/code/__DEFINES/conflict.dm index d69f0891ff..efd17ff3cf 100644 --- a/code/__DEFINES/conflict.dm +++ b/code/__DEFINES/conflict.dm @@ -241,6 +241,8 @@ //Health of various items #define HEALTH_WALL 3000 #define HEALTH_WALL_REINFORCED 9000 +#define HEALTH_WALL_JUNGLE 2500 +#define HEALTH_WALL_ROCK 6500 #define HEALTH_WALL_XENO 900 #define HEALTH_WALL_XENO_WEAK 100 #define HEALTH_WALL_XENO_THICK 1350 @@ -249,6 +251,7 @@ #define HEALTH_WALL_XENO_MEMBRANE_THICK 600 #define HEALTH_DOOR 1200 +#define HEALTH_DOUBLE_DOOR 1650 #define HEALTH_DOOR_XENO 600 #define HEALTH_DOOR_XENO_THICK 900 diff --git a/code/__DEFINES/equipment.dm b/code/__DEFINES/equipment.dm index 77638ed568..c2e2858dbd 100644 --- a/code/__DEFINES/equipment.dm +++ b/code/__DEFINES/equipment.dm @@ -194,11 +194,11 @@ //=========================================================================================== //Marine armor only, use for flags_marine_armor. -#define ARMOR_SQUAD_OVERLAY 1 -#define ARMOR_LAMP_OVERLAY 2 -#define ARMOR_LAMP_ON 4 -#define ARMOR_IS_REINFORCED 8 -#define SYNTH_ALLOWED 16 +#define ARMOR_SQUAD_OVERLAY (1<<0) +#define ARMOR_LAMP_OVERLAY (1<<1) +#define ARMOR_LAMP_ON (1<<2) +#define ARMOR_IS_REINFORCED (1<<3) +#define SYNTH_ALLOWED (1<<4) //=========================================================================================== //=========================================================================================== diff --git a/code/__DEFINES/job.dm b/code/__DEFINES/job.dm index 18afc56b7c..8f16a640e4 100644 --- a/code/__DEFINES/job.dm +++ b/code/__DEFINES/job.dm @@ -1,6 +1,6 @@ #define get_job_playtime(client, job) (client.player_data? LAZYACCESS(client.player_data.playtimes, job)? client.player_data.playtimes[job].total_minutes MINUTES_TO_DECISECOND : 0 : 0) -#define GET_MAPPED_ROLE(title) (RoleAuthority?.role_mappings[title] ? RoleAuthority.role_mappings[title] : RoleAuthority.roles_by_name[title]) -#define GET_DEFAULT_ROLE(title) (RoleAuthority?.default_roles[title] ? RoleAuthority.default_roles[title] : title) +#define GET_SQUAD_ROLE_MAP(title) (RoleAuthority?.roles_for_squad[title] || title) +#define GET_MANIFEST_ROLES (RoleAuthority? RoleAuthority.manifest_roles | RoleAuthority.manifest_append : list()) // Squad name defines #define SQUAD_MARINE_1 "Sun Riders" @@ -10,6 +10,8 @@ #define SQUAD_MARINE_5 "Echo" #define SQUAD_MARINE_CRYO "Foxtrot" #define SQUAD_MARINE_INTEL "Intel" +#define SQUAD_USCM_GROUND_1 "Copperheads" +#define SQUAD_USCM_GROUND_2 "Rattlesnakes" #define SQUAD_SOF "SOF" #define SQUAD_CBRN "CBRN" #define SQUAD_UPP "Red Dawn" @@ -24,21 +26,7 @@ #define JOB_SQUAD_TEAM_LEADER "Squad Sergeant" #define JOB_SQUAD_SMARTGUN "Smartgunner" #define JOB_SQUAD_ROLES /datum/timelock/squad -#define JOB_SQUAD_ROLES_LIST list(JOB_SQUAD_MARINE, JOB_SQUAD_LEADER, JOB_SQUAD_ENGI, JOB_SQUAD_MEDIC, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_TEAM_LEADER) - -#define JOB_SQUAD_MARINE_UPP "UPP Rifleman" -#define JOB_SQUAD_LEADER_UPP "UPP Platoon Sergeant" -#define JOB_SQUAD_MEDIC_UPP "UPP Sanitar" -#define JOB_SQUAD_TEAM_LEADER_UPP "UPP Squad Sergeant" -#define JOB_SQUAD_SMARTGUN_UPP "UPP Machinegunner" -#define JOB_SO_UPP "UPP Platoon Commander" - -#define JOB_SQUAD_TEAM_LEADER_FORECON "FORECON Assistant Squad Leader" -#define JOB_SQUAD_LEADER_FORECON "FORECON Squad Leader" -#define JOB_SQUAD_MEDIC_FORECON "FORECON Squad Corpsman" -#define JOB_SQUAD_RTO "Radio Telephone Operator" -#define JOB_SQUAD_MARINE_FORECON "FORECON Rifleman" -#define JOB_SQUAD_SMARTGUN_FORECON "FORECON Smartgunner" +#define JOB_SQUAD_ROLES_LIST list(JOB_SQUAD_LEADER, JOB_SQUAD_TEAM_LEADER, JOB_SQUAD_ENGI, JOB_SQUAD_MEDIC, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_MARINE) var/global/list/job_squad_roles = JOB_SQUAD_ROLES_LIST @@ -152,6 +140,32 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST . = ..(L);\ } +//-------------USCM Outpost roles--------------- + +#define JOB_USCM_GROUND_CO "Outpost Commanding Officer" +#define JOB_USCM_GROUND_AO "Outpost Adjunct Officer" +#define JOB_USCM_GROUND_SYNTH "Outpost Maint. Synthetic" + +#define JOB_USCM_GROUND_SQUAD_LEADER "Outpost Plt. Sergeant" +#define JOB_USCM_GROUND_SQUAD_TEAM_LEADER "Outpost Sqd. Sergeant" +#define JOB_USCM_GROUND_SQUAD_MEDIC "Outpost Corpsman" +#define JOB_USCM_GROUND_SQUAD_SPECIALIST "Outpost Specialist" +#define JOB_USCM_GROUND_SQUAD_SMARTGUNNER "Outpost Smartgunner" +#define JOB_USCM_GROUND_SQUAD_MARINE "Outpost Rifleman" + +#define JOB_USCM_GROUND_CIVILIAN "Civilian Researcher" + +#define DEPARTMENT_USCM_GROUND_COMMAND +#define DEPARTMENT_USCM_GROUND_SUPPORT +#define DEPARTMENT_USCM_GROUND_MARINE +#define DEPARTMENT_USCM_GROUND_ALL list(\ + "Outpost Command" = list(JOB_USCM_GROUND_CO, JOB_USCM_GROUND_AO),\ + "Outpost Support" = list(JOB_USCM_GROUND_SYNTH),\ + "Outpost Marine" = list(JOB_USCM_GROUND_SQUAD_LEADER, JOB_USCM_GROUND_SQUAD_TEAM_LEADER, JOB_USCM_GROUND_SQUAD_MEDIC, JOB_USCM_GROUND_SQUAD_SPECIALIST, JOB_USCM_GROUND_SQUAD_SMARTGUNNER, JOB_USCM_GROUND_SQUAD_MARINE),\ + ) + +//------------------------------------ + //-------------WO roles--------------- #define JOB_WO_CO "Ground Commander" @@ -182,7 +196,6 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST #define JOB_WO_SQUAD_SMARTGUNNER "Dust Raider Squad Smartgunner" #define JOB_WO_SQUAD_SPECIALIST "Dust Raider Squad Weapons Specialist" #define JOB_WO_SQUAD_LEADER "Dust Raider Squad Leader" - //------------------------------------ //-------- PMC --------// @@ -193,7 +206,7 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST #define JOB_PMC_INVESTIGATOR "PMC Medical Investigator" #define JOB_PMC_DETAINER "Weyland-Yutani PMC (Detainer)" #define JOB_PMC_ELITE "PMC Elite" -#define JOB_PMC_GUNNER "PMC Support Weapons Specialist" //Renamed from Specialist to Support Specialist as it only has SG skills. +#define JOB_PMC_GUNNER "PMC Smartgunner" //Renamed to Smartgunner. #define JOB_PMC_SNIPER "PMC Weapons Specialist" //Renamed from Sharpshooter to specialist as it uses specialist skills. #define JOB_PMC_CREWMAN "Weyland-Yutani PMC (Crewman)" #define JOB_PMC_NINJA "PMC Ninja" @@ -206,6 +219,13 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST #define JOB_PMC_GRUNT_LIST list(JOB_PMC_STANDARD, JOB_PMC_ENGINEER, JOB_PMC_MEDIC, JOB_PMC_INVESTIGATOR, JOB_PMC_DETAINER, JOB_PMC_ELITE, JOB_PMC_GUNNER, JOB_PMC_SNIPER, JOB_PMC_CREWMAN, JOB_PMC_NINJA, JOB_PMC_XENO_HANDLER, JOB_PMC_COMMANDO, JOB_PMC_LEADER, JOB_PMC_LEAD_INVEST) +#define DEPARTMENT_PMC_ALL list(\ + "PMC Command" = list(JOB_PMC_DIRECTOR, JOB_PMC_LEAD_INVEST, JOB_PMC_LEADER),\ + "PMC Elite" = list(JOB_PMC_COMMANDO, JOB_PMC_ELITE),\ + "PMC Support" = list(JOB_PMC_DOCTOR, JOB_PMC_MEDIC, JOB_PMC_ENGINEER, JOB_PMC_INVESTIGATOR, JOB_PMC_CREWMAN, JOB_PMC_XENO_HANDLER, JOB_PMC_SYNTH),\ + "PMC Combat" = list(JOB_PMC_STANDARD, JOB_PMC_GUNNER, JOB_PMC_SNIPER, JOB_PMC_NINJA),\ + ) + //-------- WY --------// #define JOB_TRAINEE "Corporate Trainee" @@ -223,9 +243,17 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST #define JOB_WY_GOON "WY Corporate Security" #define JOB_WY_GOON_LEAD "WY Corporate Security Lead" #define JOB_WY_GOON_RESEARCHER "WY Research Consultant" - #define JOB_WY_GOON_LIST list(JOB_WY_GOON, JOB_WY_GOON_LEAD) +#define DEPARTMENT_WY_ALL list(\ + "WY Senior Management" = list(JOB_DIRECTOR, JOB_CHIEF_EXECUTIVE, JOB_DIVISION_MANAGER),\ + "WY Middle Management" = list(JOB_ASSISTANT_MANAGER, JOB_EXECUTIVE_SUPERVISOR, JOB_EXECUTIVE_SPECIALIST, JOB_SENIOR_EXECUTIVE),\ + "WY Junior Management" = list(JOB_EXECUTIVE, JOB_JUNIOR_EXECUTIVE, JOB_TRAINEE),\ + "WY Security Team" = JOB_WY_GOON_LIST,\ + ) + +#define DEPARTMENT_WY_PMC_ALL (DEPARTMENT_WY_ALL + DEPARTMENT_PMC_ALL) + //---- Contractors ----// #define JOB_CONTRACTOR "VAIPO Mercenary" #define JOB_CONTRACTOR_ST "VAIPO Mercenary" @@ -255,6 +283,15 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST //-------- FORECON --------// +//Platoon version +#define JOB_SQUAD_TEAM_LEADER_FORECON "FORECON Assistant Squad Leader" +#define JOB_SQUAD_LEADER_FORECON "FORECON Squad Leader" +#define JOB_SQUAD_MEDIC_FORECON "FORECON Squad Corpsman" +#define JOB_SQUAD_RTO "Radio Telephone Operator" +#define JOB_SQUAD_MARINE_FORECON "FORECON Rifleman" +#define JOB_SQUAD_SMARTGUN_FORECON "FORECON Smartgunner" + +//Regular faction #define JOB_FORECON_CO "Reconnaissance Commander" #define JOB_FORECON_SL "Reconnaissance Squad Leader" #define JOB_FORECON_SYN "Reconnaissance Synthetic" @@ -265,6 +302,16 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST #define JOB_FORECON_SMARTGUNNER "Reconnaissance Smartgunner" //-------- UPP --------// + +//Platoon version +#define JOB_SQUAD_MARINE_UPP "UPP Rifleman" +#define JOB_SQUAD_LEADER_UPP "UPP Platoon Sergeant" +#define JOB_SQUAD_MEDIC_UPP "UPP Sanitar" +#define JOB_SQUAD_TEAM_LEADER_UPP "UPP Squad Sergeant" +#define JOB_SQUAD_SMARTGUN_UPP "UPP Machinegunner" +#define JOB_SO_UPP "UPP Platoon Commander" + +//Regular faction version #define JOB_UPP "UPP Private" #define JOB_UPP_CONSCRIPT "UPP Conscript" #define JOB_UPP_ENGI "UPP Korporal Sapper" @@ -299,6 +346,17 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST #define JOB_UPP_CREWMAN "UPP Tank Crewman" + +#define DEPARTMENT_UPP_ALL list(\ + "UPP Senior Kommand" = list(JOB_UPP_GENERAL, JOB_UPP_LT_GENERAL, JOB_UPP_MAY_GENERAL, JOB_UPP_KOL_OFFICER, JOB_UPP_LTKOL_OFFICER, JOB_UPP_MAY_OFFICER),\ + "UPP Kommand" = list(JOB_UPP_KPT_OFFICER, JOB_UPP_SRLT_OFFICER, JOB_UPP_LT_OFFICER),\ + "UPP Elite" = (UPP_COMMANDO_JOB_LIST + JOB_UPP_COMBAT_SYNTH),\ + "UPP Support" = list(JOB_UPP_CREWMAN, JOB_UPP_SUPPORT_SYNTH, JOB_UPP_POLICE, JOB_UPP_LT_DOKTOR),\ + "UPP Kombat" = list(JOB_UPP_LEADER, JOB_UPP_SPECIALIST, JOB_UPP_MEDIC, JOB_UPP_ENGI, JOB_UPP),\ + "UPP Platoon" = list(JOB_SQUAD_MARINE_UPP, JOB_SQUAD_LEADER_UPP, JOB_SQUAD_MEDIC_UPP, JOB_SQUAD_TEAM_LEADER_UPP, JOB_SQUAD_SMARTGUN_UPP, JOB_SO_UPP),\ + "UPP Diplomatic" = list(JOB_UPP_REPRESENTATIVE),\ + ) + //-------- CLF --------// #define JOB_CLF "CLF Guerilla" #define JOB_CLF_ENGI "CLF Field Technician" @@ -385,16 +443,17 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST #define JOB_OBSERVER "Observer" #define TIMELOCK_JOB(role_id, hours) new/datum/timelock(role_id, hours, role_id) -//For displaying groups of jobs. Used by new player's latejoin menu and by crew manifest. -#define FLAG_SHOW_CIC 1 -#define FLAG_SHOW_AUXIL_SUPPORT 2 -#define FLAG_SHOW_MISC 4 -#define FLAG_SHOW_POLICE 8 -#define FLAG_SHOW_ENGINEERING 16 -#define FLAG_SHOW_REQUISITION 32 -#define FLAG_SHOW_MEDICAL 64 -#define FLAG_SHOW_MARINES 128 -#define FLAG_SHOW_ALL_JOBS FLAG_SHOW_CIC|FLAG_SHOW_AUXIL_SUPPORT|FLAG_SHOW_MISC|FLAG_SHOW_POLICE|FLAG_SHOW_ENGINEERING|FLAG_SHOW_REQUISITION|FLAG_SHOW_MEDICAL|FLAG_SHOW_MARINES +/// Job categories, for the crew manifest and late joining. Replaces the flags that were previously used. +#define JOB_CATEGORY_OTHER "Other / RP" +#define JOB_CATEGORY_CIC "Command" +#define JOB_CATEGORY_SUPPORT "Auxiliary Support" +#define JOB_CATEGORY_POLICE "Law Enforcement" +#define JOB_CATEGORY_ENGINEERING "Engineering" +#define JOB_CATEGORY_REQUISITION "Requisitions" +#define JOB_CATEGORY_MEDICAL "Medical" +#define JOB_CATEGORY_COMBAT "Combat" +//This list allows us to keep all manifest categories in the same order every time, regardless of who spawned when/first/second/third. +#define JOB_CATEGORY_ALL list(JOB_CATEGORY_CIC, JOB_CATEGORY_SUPPORT, JOB_CATEGORY_POLICE, JOB_CATEGORY_ENGINEERING, JOB_CATEGORY_REQUISITION, JOB_CATEGORY_MEDICAL, JOB_CATEGORY_COMBAT, JOB_CATEGORY_OTHER) ///For denying certain traits being applied to people. ie. bad leg ///'Grunt' lists are for people who wouldn't logically get the bad leg trait, ie. UPP marine counterparts. diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 598cfcdfec..7faf813fdd 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -130,18 +130,31 @@ #define ABOVE_XENO_LAYER 4.12 /// For facehuggers #define FACEHUGGER_LAYER 4.13 -/// For WEATHER -#define WEATHER_LAYER 4.14 + +#define INTERIOR_DOOR_INSIDE_LAYER 4.15 +#define INTERIOR_WALL_SOUTH_LAYER 4.16 +#define INTERIOR_DOOR_LAYER 4.17 +#define INTERIOR_WALLMOUNT_LAYER 4.18 + +/// For certain platform facings, so that they properly display when a mob walks near them. +#define PLATFORM_LAYER 4.2 +/// For decorators, so they show up just above the regular platforms. +#define PLATFORM_DECORATION_LAYER 4.21 +/// Where the mob is placed when climbing over structures of all kinds. +#define STRUCTURE_CLIMB_LAYER 4.22 //#define FLY_LAYER 5 +/// Fly layer is used for throwing, explosions, projectiles, and so on. To do: Move more items away from this layer and onto more proper layering. -#define RIPPLE_LAYER 5.1 -#define INTERIOR_DOOR_INSIDE_LAYER 5.19 -#define INTERIOR_WALL_SOUTH_LAYER 5.2 -#define INTERIOR_DOOR_LAYER 5.21 -#define INTERIOR_WALLMOUNT_LAYER 5.3 -#define INTERIOR_ROOF_LAYER 5.5 +/// For objects like cameras and light bulbs that should be placed pretty high, above most things. +#define CEILING_FIXTURE_LAYER 5.01 +///Above other stuff, below weather effects. +#define BELOW_WEATHER_LAYER 5.1 +/// For weather, but hardly matters as weather effects are drawn on their plane. To do: Remove. +#define WEATHER_LAYER 5.2 + +/// Meant to be visible above just about everything else. #define ABOVE_FLY_LAYER 6 /// blip from motion detector @@ -220,10 +233,27 @@ /// Floor plane, self explanatory. Used for Ambient Occlusion filter #define FLOOR_PLANE -7 + +/// The ordering of these planes should generally not change. +///========================================================== /// Game Plane, where most of the game objects reside +#define RENDER_TARGET_GAME_WORLD "*TARGET_GAME_WORLD" #define GAME_PLANE -6 -/// Roof plane, disappearing when entering buildings -#define ROOF_PLANE -4 +/// This one is the roof plane where visible roofs are drawn; we need this so ghosts can see through roofs, otherwise it would be layered in GAME_PLANE. +#define RENDER_TARGET_ROOF_VISIBLE "*TARGET_ROOF_VISIBLE_MASK" +#define ROOF_VISIBLE_PLANE -5 +/// Above the game plane, so it can mask it properly. +#define RENDER_TARGET_BUILDING_MASK "*TARGET_BUILDING_MASK" +#define BUILDING_MASK_PLANE - 4 +/// The other roof plane, disappears when entering buildings through relay use, outputted to individual players so usually hidden. +#define RENDER_TARGET_ROOF_HIDDEN "*TARGET_ROOF_HIDDEN_MASK" +#define ROOF_HIDDEN_PLANE -3 +/// Weather effects are on this plane, above visible roofs and their effects. They are rendered alongside roofs for better appearance. +#define RENDER_TARGET_WEATHER "*TARGET_WEATHER_PLANE" +#define WEATHER_PLANE - 2 +/// Renders the above planes onto this plane to apply a shadow filter, then tranfers them to RENDER_PLANE_GAME to keep proper layering. +#define RENDER_PLANE_FOREGROUND -1 +///========================================================== /// To keep from conflicts with SEE_BLACKNESS internals #define BLACKNESS_PLANE 0 diff --git a/code/__DEFINES/math_physics.dm b/code/__DEFINES/math_physics.dm index 47bb80a618..66c2733ec9 100644 --- a/code/__DEFINES/math_physics.dm +++ b/code/__DEFINES/math_physics.dm @@ -25,11 +25,29 @@ #define SPEED_OF_LIGHT 3e8 //not exact but hey! #define SPEED_OF_LIGHT_SQ 9e+16 +#define MELTPOINT_SNOW 304.15 //about 30°C +#define MELTPOINT_ICE T0C + +#define MELTPOINT_BIOLOGICAL 573 //~300°C +#define MELTPOINT_ROCK 1300 +#define MELTPOINT_SILVER 1234 +#define MELTPOINT_GOLD 1336 +#define MELTPOINT_IRON 1450 +#define MELTPOINT_WOOD 1473 //Wood doesn't really melt, but you get the idea. #define MELTPOINT_GLASS (1500+T0C) -#define MELTPOINT_STEEL (1510+T0C) -#define MELTPOINT_SILICON 1687 // KELVIN +#define MELTPOINT_STEEL 1714 +#define MELTPOINT_SILICON 1684 // KELVIN #define MELTPOINT_PLASTIC (180+T0C) -#define MELTPOINT_SNOW 304.15 //about 30°C +#define MELTPOINT_BONE 1943 //Wow! +#define MELTPOINT_TITANIUM 1944 +#define MELTPOINT_TUNGSTEN 3672 + +//Most of these are just guesses in terms of temperature. +#define MELTPOINT_NAPALM_G 630 //Green flame. 30 damage. Enough to burn biological but not much beyond that. +#define MELTPOINT_NAPALM 1273 //Standard flame. 60 damage. Enough to burn possibly gold and silver. +#define MELTPOINT_NAPALM_B 1684 //Blue flame. 80 damage. Could possible burn steel. +#define MELTPOINT_NAPALM_U 2050 //UPP flamer. 100 damage. Enough to damage most things, including titanium. +#define MELTPOINT_NAPALM_W 3336 //OB White flame. 160 damage. Could damage even very reinforced walls. // The highest number supported is a signed 32-bit floating point number. // Integers beyond the 24 bit range are represented as single-precision floating points, and thus will lose accuracy beyond the range of +/- 16777216 diff --git a/code/__DEFINES/minimap.dm b/code/__DEFINES/minimap.dm index 9ab037abc0..88084ea625 100644 --- a/code/__DEFINES/minimap.dm +++ b/code/__DEFINES/minimap.dm @@ -61,6 +61,8 @@ GLOBAL_LIST_INIT(all_minimap_flags, bitfield2list(MINIMAP_FLAG_ALL)) #define MINIMAP_SQUAD_DELTA "#0c0cae" #define MINIMAP_SQUAD_ECHO "#00b043" #define MINIMAP_SQUAD_FOXTROT "#fe7b2e" +#define MINIMAP_SQUAD_USCM_GROUND_ONE "#D99281" +#define MINIMAP_SQUAD_USCM_GROUND_TWO "#9FCD61" #define MINIMAP_SQUAD_SOF "#400000" #define MINIMAP_SQUAD_INTEL "#053818" #define MINIMAP_SQUAD_UPP "#B22222" diff --git a/code/__DEFINES/mob_hud.dm b/code/__DEFINES/mob_hud.dm index cd1ad4af7c..dbd0d034d4 100644 --- a/code/__DEFINES/mob_hud.dm +++ b/code/__DEFINES/mob_hud.dm @@ -50,7 +50,9 @@ #define TRACKER_FTL "track_ftl" #define TRACKER_LZ "track_lz" #define TRACKER_CO "track_co" +#define TRACKER_OCO "track_oco" #define TRACKER_XO "track_xo" +#define TRACKER_AO "track_ao" #define TRACKER_CL "track_cl" #define TRACKER_PLTCO "track_pltco" @@ -60,6 +62,8 @@ #define TRACKER_DSL "_dsl" // Delta Squad Leader #define TRACKER_ESL "_esl" // Echo Squad Leader #define TRACKER_FSL "_fsl" // Cryo Squad Leader +#define TRACKER_GFSL "_gfsl" // Ground Squad One Leader +#define TRACKER_GSSL "_gssl" // Ground Squad Two Leader //for tracking the queen/hivecore on xeno locator huds #define TRACKER_QUEEN "Queen" diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 67c52379e8..3af854e14a 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -183,6 +183,7 @@ #define GIVING (1<<5) // Is currently trying to give an item to someone #define NOBIOSCAN (1<<6) #define AI_CONTROLLED (1<<7) +#define MOB_COVERED_FROM_WEATHER (1<<8) //================================================= @@ -195,22 +196,22 @@ //================================================= //Species flags. -#define NO_BLOOD (1<<0) -#define NO_BREATHE (1<<1) +#define NO_BLOOD (1<<0) +#define NO_BREATHE (1<<1) #define NO_CLONE_LOSS (1<<2) -#define NO_SLIP (1<<3) +#define NO_SLIP (1<<3) #define NO_POISON (1<<4) -#define NO_CHEM_METABOLIZATION (1<<5) //Prevents reagents from acting on_mob_life(). +#define NO_CHEM_METABOLIZATION (1<<5) //Prevents reagents from acting on_mob_life(). #define HAS_SKIN_TONE (1<<6) -#define HAS_SKIN_COLOR (1<<7) -#define HAS_LIPS (1<<8) +#define HAS_SKIN_COLOR (1<<7) +#define HAS_LIPS (1<<8) #define HAS_UNDERWEAR (1<<9) -#define IS_WHITELISTED (1<<10) -#define IS_SYNTHETIC (1<<11) -#define NO_NEURO (1<<12) +#define IS_WHITELISTED (1<<10) +#define IS_SYNTHETIC (1<<11) +#define NO_NEURO (1<<12) #define SPECIAL_BONEBREAK (1<<13) //species do not get their bonebreak chance modified by endurance -#define NO_SHRAPNEL (1<<14) -#define HAS_HARDCRIT (1<<15) +#define NO_SHRAPNEL (1<<14) +#define HAS_HARDCRIT (1<<15) //================================================= diff --git a/code/__DEFINES/mode.dm b/code/__DEFINES/mode.dm index af2bfe3994..cf96e06304 100644 --- a/code/__DEFINES/mode.dm +++ b/code/__DEFINES/mode.dm @@ -41,6 +41,10 @@ #define MODE_HAS_FLAG(flag) (SSticker.mode.flags_round_type & flag) #define MODE_HAS_TOGGLEABLE_FLAG(flag) (SSticker.mode.toggleable_flags & flag) +/// Once the round is starting, we want to reference the ticker. Otherwise the cache. +#define GET_CURRENT_MODE (SSticker.current_state >= GAME_STATE_SETTING_UP ? SSticker.mode : config.mode_cache) +/// Could also reference RoleAuthority, but this is meant for the actual mode roles, in case role mapping is revived (I hope not). +#define GET_CURRENT_MODE_ROLES (SSticker.current_state >= GAME_STATE_SETTING_UP ? SSticker.mode.get_roles_list() : config.mode_cache.get_roles_list()) // Gamemode Flags #define MODE_INFESTATION (1<<0) @@ -59,6 +63,8 @@ #define MODE_THUNDERSTORM (1<<13)// Enables thunderstorm effects on maps that are compatible with it. (Lit exterior tiles, rain effects) #define MODE_FACTION_CLASH (1<<14)// Disables scopes, sniper sentries, OBs, shooting corpses, dragging enemy corpses, stripping enemy corpses #define MODE_NO_XENO_EVOLVE (1<<15) // Stops all xenos from evolving or straining +#define MODE_GROUND_ONLY (1<<16) ///No ship map, ground map only. +#define MODE_XENO_AI (1<<17) ///Allows for alien AI to be used in the game mode. // Gamemode Toggleable Flags #define MODE_NO_SNIPER_SENTRY (1<<0) /// Upgrade kits will no longer allow you to select long-range upgrades @@ -123,20 +129,21 @@ var/global/list/ROLES_ENGINEERING = list(JOB_CHIEF_ENGINEER, JOB_ORDNANCE_TECH, var/global/list/ROLES_REQUISITION = list(JOB_CHIEF_REQUISITION, JOB_CARGO_TECH, JOB_WO_CHIEF_REQUISITION, JOB_WO_REQUISITION) var/global/list/ROLES_MEDICAL = list(JOB_CMO, JOB_RESEARCHER, JOB_DOCTOR, JOB_NURSE, JOB_WO_CMO, JOB_WO_RESEARCHER, JOB_WO_DOCTOR) var/global/list/ROLES_MARINES = list(JOB_SQUAD_LEADER, JOB_SQUAD_TEAM_LEADER, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_MEDIC, JOB_SQUAD_ENGI, JOB_SQUAD_MARINE, JOB_SQUAD_RTO) -var/global/list/ROLES_SQUAD_ALL = list(SQUAD_MARINE_1, SQUAD_MARINE_2, SQUAD_MARINE_3, SQUAD_MARINE_4, SQUAD_MARINE_5, SQUAD_MARINE_CRYO, SQUAD_MARINE_INTEL, SQUAD_UPP, SQUAD_LRRP) +var/global/list/ROLES_SQUAD_ALL = list(SQUAD_MARINE_1, SQUAD_MARINE_2, SQUAD_MARINE_3, SQUAD_MARINE_4, SQUAD_MARINE_5, SQUAD_MARINE_CRYO, SQUAD_MARINE_INTEL, SQUAD_UPP, SQUAD_LRRP, SQUAD_USCM_GROUND_1, SQUAD_USCM_GROUND_2) +var/global/list/ROLES_SQUAD_USCM_GROUND = list(SQUAD_USCM_GROUND_1, SQUAD_USCM_GROUND_2) ///Referenced in marines_consoles.dm for crew tracking individual squads+members in the Remote Outpost mode. //Groundside roles var/global/list/ROLES_XENO = list(JOB_XENOMORPH_QUEEN, JOB_XENOMORPH) var/global/list/ROLES_WHITELISTED = list(JOB_SYNTH_SURVIVOR, JOB_CO_SURVIVOR, JOB_PREDATOR) var/global/list/ROLES_SPECIAL = list(JOB_SURVIVOR) -var/global/list/ROLES_USCM = ROLES_CIC + ROLES_POLICE + ROLES_AUXIL_SUPPORT + ROLES_MISC + ROLES_ENGINEERING + ROLES_REQUISITION + ROLES_MEDICAL + ROLES_MARINES - ROLES_WO +var/global/list/ROLES_USCM = ROLES_CIC + ROLES_POLICE + ROLES_AUXIL_SUPPORT + ROLES_MISC + ROLES_ENGINEERING + ROLES_REQUISITION + ROLES_MEDICAL + ROLES_MARINES - ROLES_WO - ROLES_USCM_GROUND +var/global/list/ROLES_USCM_GROUND = list(JOB_USCM_GROUND_CO, JOB_USCM_GROUND_AO, JOB_USCM_GROUND_SYNTH, JOB_USCM_GROUND_SQUAD_LEADER, JOB_USCM_GROUND_SQUAD_TEAM_LEADER, JOB_USCM_GROUND_SQUAD_MEDIC, JOB_USCM_GROUND_SQUAD_SPECIALIST, JOB_USCM_GROUND_SQUAD_SMARTGUNNER, JOB_USCM_GROUND_SQUAD_MARINE, JOB_USCM_GROUND_CIVILIAN) var/global/list/ROLES_GROUND = ROLES_XENO + ROLES_SPECIAL + ROLES_WHITELISTED var/global/list/ROLES_DISTRESS_SIGNAL = ROLES_USCM + ROLES_GROUND var/global/list/ROLES_FACTION_CLASH = ROLES_USCM + JOB_PREDATOR - var/global/list/ROLES_UNASSIGNED = list(JOB_SQUAD_MARINE) var/global/list/ROLES_AI = list(JOB_SO, JOB_SQUAD_LEADER, JOB_SQUAD_MEDIC, JOB_SQUAD_TEAM_LEADER, JOB_SQUAD_SMARTGUN, JOB_SQUAD_MARINE) var/global/list/ROLES_AI_UPP = list(JOB_SO_UPP, JOB_SQUAD_LEADER_UPP, JOB_SQUAD_MEDIC_UPP, JOB_SQUAD_TEAM_LEADER_UPP, JOB_SQUAD_SMARTGUN_UPP, JOB_SQUAD_MARINE_UPP) @@ -144,7 +151,8 @@ var/global/list/ROLES_AI_FORECON = list(JOB_SQUAD_LEADER_FORECON, JOB_SQUAD_MEDI var/global/list/ROLES_WO = list(JOB_WO_CO, JOB_WO_XO, JOB_WO_CORPORATE_LIAISON, JOB_WO_SYNTH, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_WO_PILOT, JOB_WO_CHIEF_ENGINEER, JOB_WO_ORDNANCE_TECH, JOB_WO_CHIEF_REQUISITION, JOB_WO_REQUISITION, JOB_WO_CMO, JOB_WO_DOCTOR, JOB_WO_RESEARCHER, JOB_WO_SQUAD_MARINE, JOB_WO_SQUAD_MEDIC, JOB_WO_SQUAD_ENGINEER, JOB_WO_SQUAD_SMARTGUNNER, JOB_WO_SQUAD_SPECIALIST, JOB_WO_SQUAD_LEADER) //Role lists used for switch() checks in show_blurb_uscm(). Cosmetic, determines ex. "Engineering, USS Almayer", "2nd Bat. 'Falling Falcons'" etc. #define BLURB_USCM_COMBAT JOB_CO, JOB_XO, JOB_SO, JOB_WO_CO, JOB_WO_XO, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_SEA,\ - JOB_SQUAD_LEADER, JOB_SQUAD_TEAM_LEADER, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_MEDIC, JOB_SQUAD_ENGI, JOB_SQUAD_MARINE + JOB_SQUAD_LEADER, JOB_SQUAD_TEAM_LEADER, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_MEDIC, JOB_SQUAD_ENGI, JOB_SQUAD_MARINE,\ + JOB_USCM_GROUND_CO, JOB_USCM_GROUND_AO, JOB_USCM_GROUND_SQUAD_LEADER, JOB_USCM_GROUND_SQUAD_TEAM_LEADER, JOB_USCM_GROUND_SQUAD_MEDIC, JOB_USCM_GROUND_SQUAD_SPECIALIST, JOB_USCM_GROUND_SQUAD_SMARTGUNNER, JOB_USCM_GROUND_SQUAD_MARINE #define BLURB_USCM_FLIGHT JOB_PILOT, JOB_DROPSHIP_CREW_CHIEF #define BLURB_USCM_MP JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE #define BLURB_USCM_ENGI JOB_CHIEF_ENGINEER, JOB_ORDNANCE_TECH, JOB_MAINT_TECH, JOB_WO_CHIEF_ENGINEER, JOB_WO_ORDNANCE_TECH, JOB_WO_PILOT @@ -222,6 +230,7 @@ var/global/list/whitelist_hierarchy = list(WHITELIST_NORMAL, WHITELIST_COUNCIL, // Faction names #define FACTION_NEUTRAL "Neutral" #define FACTION_MARINE "USCM" +#define FACTION_USCM_GROUND "USCM Outpost" #define FACTION_SURVIVOR "Survivor" #define FACTION_UPP "UPP" #define FACTION_TWE "TWE" @@ -244,13 +253,28 @@ var/global/list/whitelist_hierarchy = list(WHITELIST_NORMAL, WHITELIST_COUNCIL, #define FACTION_ZOMBIE "Zombie" #define FACTION_MONKEY "Monkey" // Nanu -#define FACTION_LIST_MARINE list(FACTION_MARINE) -#define FACTION_LIST_HUMANOID list(FACTION_MARINE, FACTION_PMC, FACTION_WY, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_MARSHAL, FACTION_UPP, FACTION_FREELANCER, FACTION_SURVIVOR, FACTION_NEUTRAL, FACTION_COLONIST, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_YAUTJA, FACTION_ZOMBIE, FACTION_TWE) +//All of the factions that use the marine hud icons procs instead of their own. +#define FACTION_LIST_MARINE_HUD list(FACTION_MARINE, FACTION_USCM_GROUND, FACTION_MARSHAL) + +/// Faction families are there for switch() statements and ease of reference in case more sub-factions are added. +/// "FAMILY" is used to make a distinction from "group", so as not to confuse with mob.faction_group, which is a mutable list. +#define FACTION_FAMILY_MARINE FACTION_MARINE, FACTION_USCM_GROUND +#define FACTION_FAMILY_WY FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY +#define FACTION_FAMILY_UPP FACTION_UPP +#define FACTION_FAMILY_CLF FACTION_CLF +#define FACTION_FAMILY_TWE FACTION_TWE + +#define FACTION_LIST_MARINE list(FACTION_FAMILY_MARINE) +#define FACTION_LIST_WY list(FACTION_FAMILY_WY) +#define FACTION_LIST_TWE list(FACTION_FAMILY_TWE) + +#define FACTION_LIST_MARSHAL list(FACTION_MARSHAL, FACTION_FAMILY_MARINE) +#define FACTION_LIST_MARINE_WY list(FACTION_FAMILY_MARINE, FACTION_FAMILY_WY) +#define FACTION_LIST_MARINE_UPP list(FACTION_FAMILY_MARINE, FACTION_FAMILY_UPP) +#define FACTION_LIST_MARINE_TWE list(FACTION_FAMILY_MARINE, FACTION_FAMILY_TWE) + +#define FACTION_LIST_HUMANOID list(FACTION_FAMILY_MARINE, FACTION_FAMILY_WY, FACTION_FAMILY_UPP, FACTION_FAMILY_CLF, FACTION_FAMILY_TWE, FACTION_CONTRACTOR, FACTION_MARSHAL, FACTION_FREELANCER, FACTION_SURVIVOR, FACTION_NEUTRAL, FACTION_COLONIST, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_YAUTJA, FACTION_ZOMBIE) #define FACTION_LIST_ERT list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_UPP, FACTION_FREELANCER, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_MARSHAL, FACTION_TWE) -#define FACTION_LIST_WY list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY) -#define FACTION_LIST_MARINE_WY list(FACTION_MARINE, FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY) -#define FACTION_LIST_MARINE_UPP list(FACTION_MARINE, FACTION_UPP) -#define FACTION_LIST_MARINE_TWE list(FACTION_MARINE, FACTION_TWE) // Xenomorphs #define FACTION_PREDALIEN "Predalien" diff --git a/code/__DEFINES/movement.dm b/code/__DEFINES/movement.dm index 473fed1619..0f1ac2975a 100644 --- a/code/__DEFINES/movement.dm +++ b/code/__DEFINES/movement.dm @@ -58,3 +58,9 @@ #define PASS_FLAGS_FLAME (PASS_AROUND|PASS_UNDER|PASS_MOB_THRU|PASS_THROUGH|PASS_OVER_FIRE) #define PASS_FLAGS_SMOKE (PASS_HIGH_OVER|PASS_AROUND|PASS_UNDER|PASS_MOB_THRU|PASS_THROUGH) #define PASS_FLAGS_CRAWLER (PASS_TYPE_CRAWLER|PASS_UNDER) +/// These flags are normally set for a barricade. +#define PASS_BARRICADE_FRONT (PASS_HIGH_OVER_ONLY) +#define PASS_BARRICADE_BEHIND (PASS_OVER_THROW_ITEM|PASS_OVER_FIRE|PASS_HIGH_OVER_ONLY) +/// These are temporary flags that can get toggled. When not wired, they are added to the above group. +#define PASS_BARRICADE_FRONT_NOT_WIRED (PASS_OVER_THROW_ITEM|PASS_OVER_THROW_MOB) +#define PASS_BARRICADE_BEHIND_NOT_WIRED (PASS_OVER_THROW_MOB) diff --git a/code/__DEFINES/radio.dm b/code/__DEFINES/radio.dm index e2bd155fcb..242f1e8ffb 100644 --- a/code/__DEFINES/radio.dm +++ b/code/__DEFINES/radio.dm @@ -37,6 +37,12 @@ #define RADIO_CHANNEL_SENTRY "Sentry Network" #define RADIO_CHANNEL_SPECIAL "special" +//USCM Outpost Comms +#define RADIO_CHANNEL_USCM_GROUND "Outpost" +#define RADIO_CHANNEL_USCM_GROUND_CMD "OutCmd" +#define RADIO_CHANNEL_USCM_GROUND_MED "OutMed" +#define RADIO_CHANNEL_USCM_GROUND_ENGI "OutEngi" + //CLF Comms #define RADIO_CHANNEL_CLF_GEN "CLF" #define RADIO_CHANNEL_CLF_CMD "CLF Command" diff --git a/code/__DEFINES/skills.dm b/code/__DEFINES/skills.dm index 57c19d02f8..90fe319d10 100644 --- a/code/__DEFINES/skills.dm +++ b/code/__DEFINES/skills.dm @@ -30,6 +30,8 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------- */ +#define SKILL_UNSKILLED 0 + //firearms skill (general knowledge of guns) (hidden skill) //increase or decrase accuracy, recoil, and firing delay of rifles and smgs. #define SKILL_FIREARMS_CIVILIAN 0 //civilian diff --git a/code/__DEFINES/sounds.dm b/code/__DEFINES/sounds.dm index 6c5d2879f3..5679fcd875 100644 --- a/code/__DEFINES/sounds.dm +++ b/code/__DEFINES/sounds.dm @@ -63,6 +63,7 @@ #define AMBIENCE_SHIP 'sound/ambience/shipambience.ogg' #define AMBIENCE_JUNGLE 'sound/ambience/ambienceLV624.ogg' +#define AMBIENCE_DENSE_JUNGLE 'sound/ambience/jungle_amb1.ogg' #define AMBIENCE_RIVER 'sound/ambience/ambienceriver.ogg' #define AMBIENCE_MALL 'sound/ambience/medbay1.ogg' #define AMBIENCE_CAVE 'sound/ambience/desert.ogg' diff --git a/code/__DEFINES/turf_flags.dm b/code/__DEFINES/turf_flags.dm index d7b3e90811..7cb6bedcb4 100644 --- a/code/__DEFINES/turf_flags.dm +++ b/code/__DEFINES/turf_flags.dm @@ -7,9 +7,9 @@ #define IS_OPAQUE_TURF(turf) (turf.directional_opacity == ALL_CARDINALS) -/// Marks a turf as organic. Used for alien wall and membranes. -#define TURF_ORGANIC (1<<0) - +/// Marks a turf as organic. Used for alien walls and membranes. +#define TURF_ORGANIC (1<<0) //Living things, resin for example. Is it really living? +#define TURF_NATURAL (1<<1) //Rocks, ice, jungle, etc. #define REMOVE_CROWBAR (1<<0) #define BREAK_CROWBAR (1<<1) diff --git a/code/__DEFINES/typecheck/humanoids.dm b/code/__DEFINES/typecheck/humanoids.dm index 7076cf67c9..8df908776f 100644 --- a/code/__DEFINES/typecheck/humanoids.dm +++ b/code/__DEFINES/typecheck/humanoids.dm @@ -1,21 +1,28 @@ //Typechecks should be AVOIDED whenever possible. Instead of using them, try properties of what you're checking, such as the flags of clothing. + +/* +* I don't know why these were checking for A?: since if ishuman(A) is TRUE, then A MUST exist, unless it's just a path. +* And I do wish more of these procs would read the above the comment. Avoid type checking, especially +* if procs calling the define already checks for type before calling. Cleaned these up just a bit. +* TODO: Get rid of ishuman(A) checks from all applicable. Clean this up even more. +*/ #define ishuman(A) (istype(A, /mob/living/carbon/human) ) //Check if the mob is an actual human (and not Yautja or Synth) -#define ishuman_strict(A) (ishuman(A) && istype(A?:species, /datum/species/human)) +#define ishuman_strict(A) (ishuman(A) && istype(A:species, /datum/species/human)) //Check if the mob is an actual human or Synth -#define ishumansynth_strict(A) (ishuman(A) && (istype(A?:species, /datum/species/human) || istype(A?:species, /datum/species/synthetic))) +#define ishumansynth_strict(A) (ishuman(A) && (istype(A:species, /datum/species/human) || A:species:flags & IS_SYNTHETIC)) -#define iszombie(A) (ishuman(A) && istype(A?:species, /datum/species/zombie)) -#define ismonkey(A) (ishuman(A) && istype(A?:species, /datum/species/monkey)) -#define isyautja(A) (ishuman(A) && istype(A?:species, /datum/species/yautja)) +#define iszombie(A) (ishuman(A) && istype(A:species, /datum/species/zombie)) +#define ismonkey(A) (ishuman(A) && istype(A:species, /datum/species/monkey)) +#define isyautja(A) (ishuman(A) && istype(A:species, /datum/species/yautja)) #define isresearcher(A) (ishuman(A) && A.job == "Researcher") #define isSEA(A) (ishuman(A) && A.job == "Senior Enlisted Advisor") -#define issynth(A) (ishuman(A) && istype(A?:species, /datum/species/synthetic)) -#define iscolonysynthetic(A) (ishuman(A) && istype(A?:species, /datum/species/synthetic/colonial)) +#define issynth(A) (ishuman(A) && A:species:flags & IS_SYNTHETIC) +#define iscolonysynthetic(A) (ishuman(A) && istype(A:species, /datum/species/synthetic/colonial)) #define isworkingjoe(A) (iscolonysynthetic(A) && A.job == JOB_WORKING_JOE) -#define isinfiltratorsynthetic(A) (ishuman(A) && istype(A?:species, /datum/species/synthetic/infiltrator)) +#define isinfiltratorsynthetic(A) (ishuman(A) && HAS_TRAIT(A, TRAIT_INFILTRATOR_SYNTH)) //Specic group checks, use instead of typechecks (but use traits instead) #define issamespecies(A, B) (A.species?.group == B.species?.group) diff --git a/code/__DEFINES/vehicle.dm b/code/__DEFINES/vehicle.dm index 8a16172299..3c114c2e94 100644 --- a/code/__DEFINES/vehicle.dm +++ b/code/__DEFINES/vehicle.dm @@ -56,3 +56,5 @@ // Other vehicle flags /// Vehicle can bypass vehicle blockers, typically going further into maps than intended #define VEHICLE_BYPASS_BLOCKERS (1<<5) +#define VEHICLE_BYPASS_STAIRS (1<<6) //Multi-tile vehicles need this toggled to bypass stairs, otherwise they won't be able to move through them. +#define VEHICLE_BYPASS_DEEP_WATER (1<<7) //Similar to above. Vehicles should use bridges to get across deep water. Tanks get this for free. diff --git a/code/__DEFINES/vendors.dm b/code/__DEFINES/vendors.dm index 04ee5ffef2..6c455b7db0 100644 --- a/code/__DEFINES/vendors.dm +++ b/code/__DEFINES/vendors.dm @@ -67,3 +67,5 @@ //Whether or not to load ammo boxes depending on ammo loaded into the vendor //Only relevant in big vendors, like Requisitions or Squad Prep #define VEND_LOAD_AMMO_BOXES (1<<9) +//If the vendor has some specialized behavior that needs to override other behavior. Crutch, best to refactor appropriate code. +#define VEND_SPECIALIZED_STOCK (1<<10) diff --git a/code/__DEFINES/xeno.dm b/code/__DEFINES/xeno.dm index 878a591357..f8d3f2a4d3 100644 --- a/code/__DEFINES/xeno.dm +++ b/code/__DEFINES/xeno.dm @@ -32,12 +32,12 @@ #define CLAW_TYPE_SHARP 2 #define CLAW_TYPE_VERY_SHARP 3 -#define XENO_HITS_TO_DESTROY_WALL 20 +#define XENO_HITS_TO_DESTROY_WALL 30 #define XENO_HITS_TO_DESTROY_WINDOW_FRAME 3 #define XENO_HITS_TO_DESTROY_R_WINDOW_FRAME 5 -#define XENO_HITS_TO_DESTROY_BOLTED_DOOR 10 -#define XENO_HITS_TO_DESTROY_DOOR 10 -#define XENO_HITS_TO_DESTROY_WELDED_DOOR 15 +#define XENO_HITS_TO_DESTROY_BOLTED_DOOR 20 +#define XENO_HITS_TO_DESTROY_DOOR 20 +#define XENO_HITS_TO_DESTROY_WELDED_DOOR 20 #define XENO_HITS_TO_EXPOSE_WIRES_MIN 3 #define XENO_HITS_TO_EXPOSE_WIRES_MAX 4 #define XENO_HITS_TO_CUT_WIRES 10 diff --git a/code/__HELPERS/job.dm b/code/__HELPERS/job.dm index 220236c6f7..91aef786ea 100644 --- a/code/__HELPERS/job.dm +++ b/code/__HELPERS/job.dm @@ -1,3 +1,5 @@ +#define GET_HUMAN_DEFAULT_ASSIGNMENT(H) (H.assigned_equipment_preset?.assignment || H.wear_id?.assignment || H.job || "Unassigned") + /proc/get_all_jobs_titles() var/all_jobs_titles[] = new var/all_datums[] = typesof(/datum/job) - list(/datum/job) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 38d84c2922..6b803e93a1 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -69,9 +69,13 @@ return TRUE -// We change real name, so we change the voice too if we are humans -// It also ensures our mind's name gets changed -/mob/proc/change_real_name(mob/M, new_name) +/** + * Changes the mob's real name, mind name, and voice. + * + * We change real name, so we change the voice too if we are humans. + * It also ensures our mind's name gets changed. + */ +/mob/proc/change_real_name(mob/M, new_name) // To do: Clean up all the references to this proc to run from source instead of using mob/M as an argument. if(!new_name) return FALSE @@ -86,22 +90,38 @@ return TRUE -/mob/proc/change_mind_name(new_mind_name) - if(!mind) - return FALSE - if(!new_mind_name) - new_mind_name = "Unknown" - mind.name = new_mind_name - return TRUE - -/mob/proc/change_mob_voice(new_voice_name) - if(!ishuman(src)) - return FALSE - if(!new_voice_name) - new_voice_name = "Unknown" - var/mob/living/carbon/human/H = src - H.voice = new_voice_name - return TRUE +/mob/proc/change_mind_name(new_name) + if(new_name && mind) + mind.name = new_name + return TRUE + +/mob/proc/change_mob_voice(new_name) + return FALSE + +/mob/living/carbon/human/change_mob_voice(new_name) + if(new_name) + voice = new_name + return TRUE + +/// More general proc caller to change a mob's name, ususally called through an admin renaming someone. +/mob/proc/modify_name_and_record(new_name) + SHOULD_CALL_PARENT(TRUE) /// Call back to parent required. + + // Sets them up with all of the name changing done. + return change_real_name(src, new_name) + +/mob/living/carbon/human/modify_name_and_record(new_name) + var/previous_name = real_name + . = ..() + + // For ease of use, whenever you modify the name it will check for their ID too. + if(.) + // Modifies their datacore entry based on real name, should they have one. Mostly for humans, but not strictly limited to them. Move to the parent proc if the behavior changes. + GLOB.data_core.manifest_modify(new_name, WEAKREF(src)) + if(wear_id?.registered_name == previous_name) /// They are wearing their own ID. + // The following can be done with splicetext and knowing the length of the string, since the position is known. But it's best to search if the position ever changes. + wear_id.registered_name = new_name /// Update their name first, so that it's all matched up. + wear_id.name = replacetext(wear_id.name, previous_name, new_name) /// Not case sensitive, probably desirable. /*Changing/updating a mob's client color matrices. These render over the map window and affect most things the player sees, except things like inventory, text popups, HUD, and some fullscreens. Code based on atom filter code, since these have similar issues with application order - for ex. if you have diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 541d1a0536..777a30b39e 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -52,6 +52,17 @@ DEFINE_BITFIELD(appearance_flags, list( "TILE_MOVER" = TILE_MOVER, )) +DEFINE_BITFIELD(vis_flags, list( + "VIS_INHERIT_ICON" = VIS_INHERIT_ICON, + "VIS_INHERIT_ICON_STATE" = VIS_INHERIT_ICON_STATE, + "VIS_INHERIT_DIR" = VIS_INHERIT_DIR, + "VIS_INHERIT_LAYER" = VIS_INHERIT_LAYER, + "VIS_INHERIT_PLANE" = VIS_INHERIT_PLANE, + "VIS_INHERIT_ID" = VIS_INHERIT_ID, + "VIS_UNDERLAY" = VIS_UNDERLAY, + "VIS_HIDE" = VIS_HIDE, +)) + DEFINE_BITFIELD(blood_flags, list( "BLOOD_BODY" = BLOOD_BODY, "BLOOD_HANDS" = BLOOD_HANDS, @@ -87,6 +98,7 @@ DEFINE_BITFIELD(flags_ammo_behaviour, list( "AMMO_IGNORE_RESIST" = AMMO_IGNORE_RESIST, "AMMO_BALLISTIC" = AMMO_BALLISTIC, "AMMO_IGNORE_COVER" = AMMO_IGNORE_COVER, + "AMMO_ANTIVEHICLE" = AMMO_ANTIVEHICLE, "AMMO_STOPPED_BY_COVER" = AMMO_STOPPED_BY_COVER, "AMMO_SPECIAL_EMBED" = AMMO_SPECIAL_EMBED, "AMMO_STRIKES_SURFACE" = AMMO_STRIKES_SURFACE, @@ -120,6 +132,7 @@ DEFINE_BITFIELD(flags_gun_features, list( "GUN_ANTIQUE" = GUN_ANTIQUE, "GUN_RECOIL_BUILDUP" = GUN_RECOIL_BUILDUP, "GUN_SUPPORT_PLATFORM" = GUN_SUPPORT_PLATFORM, + "GUN_NO_DESCRIPTION" = GUN_NO_DESCRIPTION, )) DEFINE_BITFIELD(flags_magazine, list( @@ -150,6 +163,12 @@ DEFINE_BITFIELD(flags_atom, list( "INITIALIZED" = INITIALIZED, "ATOM_DECORATED" = ATOM_DECORATED, "USES_HEARING" = USES_HEARING, + "HTML_USE_INITAL_ICON" = HTML_USE_INITAL_ICON, +)) + +DEFINE_BITFIELD(flags_turf, list( + "TURF_ORGANIC" = TURF_ORGANIC, + "TURF_NATURAL" = TURF_NATURAL, )) DEFINE_BITFIELD(flags_item, list( @@ -181,7 +200,7 @@ DEFINE_BITFIELD(flags_inv_hide, list( "HIDETOPHAIR" = HIDETOPHAIR, "HIDEALLHAIR" = HIDEALLHAIR, "HIDETAIL" = HIDETAIL, - "HIDEFACE" = HIDEFACE + "HIDEFACE" = HIDEFACE, )) DEFINE_BITFIELD(flags_inventory, list( @@ -367,6 +386,8 @@ DEFINE_BITFIELD(mob_flags, list( "MUTINEER" = MUTINEER, "GIVING" = GIVING, "NOBIOSCAN" = NOBIOSCAN, + "AI_CONTROLLED" = AI_CONTROLLED, + "MOB_COVERED_FROM_WEATHER" = MOB_COVERED_FROM_WEATHER, )) DEFINE_BITFIELD(mobility_flags, list( @@ -411,6 +432,9 @@ DEFINE_BITFIELD(flags_round_type, list( "MODE_RANDOM_HIVE" = MODE_RANDOM_HIVE, "MODE_THUNDERSTORM" = MODE_THUNDERSTORM, "MODE_FACTION_CLASH" = MODE_FACTION_CLASH, + "MODE_NO_XENO_EVOLVE" = MODE_NO_XENO_EVOLVE, + "MODE_GROUND_ONLY" = MODE_GROUND_ONLY, + "MODE_XENO_AI" = MODE_XENO_AI, )) DEFINE_BITFIELD(toggleable_flags, list( @@ -423,6 +447,7 @@ DEFINE_BITFIELD(toggleable_flags, list( "MODE_NO_COMBAT_CAS" = MODE_NO_COMBAT_CAS, "MODE_LZ_PROTECTION" = MODE_LZ_PROTECTION, "MODE_SHIPSIDE_SD" = MODE_SHIPSIDE_SD, + "MODE_HARDCORE_PERMA" = MODE_HARDCORE_PERMA, "MODE_DISPOSABLE_MOBS" = MODE_DISPOSABLE_MOBS, "MODE_BYPASS_JOE" = MODE_BYPASS_JOE, )) @@ -457,6 +482,7 @@ DEFINE_BITFIELD(fire_immunity, list( "FIRE_IMMUNITY_NO_IGNITE" = FIRE_IMMUNITY_NO_IGNITE, "FIRE_IMMUNITY_XENO_FRENZY" = FIRE_IMMUNITY_XENO_FRENZY, )) + DEFINE_BITFIELD(vend_flags, list( "VEND_TO_HAND" = VEND_TO_HAND, "VEND_UNIFORM_RANKS" = VEND_UNIFORM_RANKS, @@ -467,6 +493,8 @@ DEFINE_BITFIELD(vend_flags, list( "VEND_INSTANCED_CATEGORY" = VEND_INSTANCED_CATEGORY, "VEND_FACTION_THEMES" = VEND_FACTION_THEMES, "VEND_USE_VENDOR_FLAGS" = VEND_USE_VENDOR_FLAGS, + "VEND_LOAD_AMMO_BOXES" = VEND_LOAD_AMMO_BOXES, + "VEND_SPECIALIZED_STOCK" = VEND_SPECIALIZED_STOCK, )) DEFINE_BITFIELD(vehicle_flags, list( @@ -475,4 +503,115 @@ DEFINE_BITFIELD(vehicle_flags, list( "VEHICLE_CLASS_MEDIUM" = VEHICLE_CLASS_MEDIUM, "VEHICLE_CLASS_HEAVY" = VEHICLE_CLASS_HEAVY, "VEHICLE_BYPASS_BLOCKERS" = VEHICLE_BYPASS_BLOCKERS, + "VEHICLE_BYPASS_STAIRS" = VEHICLE_BYPASS_STAIRS, + "VEHICLE_BYPASS_DEEP_WATER" = VEHICLE_BYPASS_DEEP_WATER, +)) + + +DEFINE_BITFIELD(flags_pass, list( + "PASS_THROUGH" = PASS_THROUGH, + "PASS_AROUND" = PASS_AROUND, + "PASS_OVER_THROW_ITEM" = PASS_OVER_THROW_ITEM, + "PASS_OVER_THROW_MOB" = PASS_OVER_THROW_MOB, + "PASS_OVER_FIRE" = PASS_OVER_FIRE, + "PASS_OVER_ACID_SPRAY" = PASS_OVER_ACID_SPRAY, + "PASS_UNDER" = PASS_UNDER, + "PASS_GLASS" = PASS_GLASS, + "PASS_MOB_IS_XENO" = PASS_MOB_IS_XENO, + "PASS_MOB_IS_HUMAN" = PASS_MOB_IS_HUMAN, + "PASS_MOB_IS_OTHER" = PASS_MOB_IS_OTHER, + "PASS_MOB_THRU_XENO" = PASS_MOB_THRU_XENO, + "PASS_MOB_THRU_HUMAN" = PASS_MOB_THRU_HUMAN, + "PASS_MOB_THRU_OTHER" = PASS_MOB_THRU_OTHER, + "PASS_TYPE_CRAWLER" = PASS_TYPE_CRAWLER, + "PASS_HIGH_OVER_ONLY" = PASS_HIGH_OVER_ONLY, + "PASS_BUILDING_ONLY" = PASS_BUILDING_ONLY, + "PASS_CRUSHER_CHARGE" = PASS_CRUSHER_CHARGE, +)) + +DEFINE_BITFIELD(flags_can_pass_all, list( + "PASS_THROUGH" = PASS_THROUGH, + "PASS_AROUND" = PASS_AROUND, + "PASS_OVER_THROW_ITEM" = PASS_OVER_THROW_ITEM, + "PASS_OVER_THROW_MOB" = PASS_OVER_THROW_MOB, + "PASS_OVER_FIRE" = PASS_OVER_FIRE, + "PASS_OVER_ACID_SPRAY" = PASS_OVER_ACID_SPRAY, + "PASS_UNDER" = PASS_UNDER, + "PASS_GLASS" = PASS_GLASS, + "PASS_MOB_IS_XENO" = PASS_MOB_IS_XENO, + "PASS_MOB_IS_HUMAN" = PASS_MOB_IS_HUMAN, + "PASS_MOB_IS_OTHER" = PASS_MOB_IS_OTHER, + "PASS_MOB_THRU_XENO" = PASS_MOB_THRU_XENO, + "PASS_MOB_THRU_HUMAN" = PASS_MOB_THRU_HUMAN, + "PASS_MOB_THRU_OTHER" = PASS_MOB_THRU_OTHER, + "PASS_TYPE_CRAWLER" = PASS_TYPE_CRAWLER, + "PASS_HIGH_OVER_ONLY" = PASS_HIGH_OVER_ONLY, + "PASS_BUILDING_ONLY" = PASS_BUILDING_ONLY, + "PASS_CRUSHER_CHARGE" = PASS_CRUSHER_CHARGE, +)) + +DEFINE_BITFIELD(flags_can_pass_front, list( + "PASS_THROUGH" = PASS_THROUGH, + "PASS_AROUND" = PASS_AROUND, + "PASS_OVER_THROW_ITEM" = PASS_OVER_THROW_ITEM, + "PASS_OVER_THROW_MOB" = PASS_OVER_THROW_MOB, + "PASS_OVER_FIRE" = PASS_OVER_FIRE, + "PASS_OVER_ACID_SPRAY" = PASS_OVER_ACID_SPRAY, + "PASS_UNDER" = PASS_UNDER, + "PASS_GLASS" = PASS_GLASS, + "PASS_MOB_IS_XENO" = PASS_MOB_IS_XENO, + "PASS_MOB_IS_HUMAN" = PASS_MOB_IS_HUMAN, + "PASS_MOB_IS_OTHER" = PASS_MOB_IS_OTHER, + "PASS_MOB_THRU_XENO" = PASS_MOB_THRU_XENO, + "PASS_MOB_THRU_HUMAN" = PASS_MOB_THRU_HUMAN, + "PASS_MOB_THRU_OTHER" = PASS_MOB_THRU_OTHER, + "PASS_TYPE_CRAWLER" = PASS_TYPE_CRAWLER, + "PASS_HIGH_OVER_ONLY" = PASS_HIGH_OVER_ONLY, + "PASS_BUILDING_ONLY" = PASS_BUILDING_ONLY, + "PASS_CRUSHER_CHARGE" = PASS_CRUSHER_CHARGE, +)) + +DEFINE_BITFIELD(flags_can_pass_behind, list( + "PASS_THROUGH" = PASS_THROUGH, + "PASS_AROUND" = PASS_AROUND, + "PASS_OVER_THROW_ITEM" = PASS_OVER_THROW_ITEM, + "PASS_OVER_THROW_MOB" = PASS_OVER_THROW_MOB, + "PASS_OVER_FIRE" = PASS_OVER_FIRE, + "PASS_OVER_ACID_SPRAY" = PASS_OVER_ACID_SPRAY, + "PASS_UNDER" = PASS_UNDER, + "PASS_GLASS" = PASS_GLASS, + "PASS_MOB_IS_XENO" = PASS_MOB_IS_XENO, + "PASS_MOB_IS_HUMAN" = PASS_MOB_IS_HUMAN, + "PASS_MOB_IS_OTHER" = PASS_MOB_IS_OTHER, + "PASS_MOB_THRU_XENO" = PASS_MOB_THRU_XENO, + "PASS_MOB_THRU_HUMAN" = PASS_MOB_THRU_HUMAN, + "PASS_MOB_THRU_OTHER" = PASS_MOB_THRU_OTHER, + "PASS_TYPE_CRAWLER" = PASS_TYPE_CRAWLER, + "PASS_HIGH_OVER_ONLY" = PASS_HIGH_OVER_ONLY, + "PASS_BUILDING_ONLY" = PASS_BUILDING_ONLY, + "PASS_CRUSHER_CHARGE" = PASS_CRUSHER_CHARGE, +)) + +DEFINE_BITFIELD(sight, list( + "BLIND" = BLIND, + "SEE_BLACKNESS" = SEE_BLACKNESS, + "SEE_INFRA" = SEE_INFRA, + "SEE_MOBS" = SEE_MOBS, + "SEE_OBJS" = SEE_OBJS, + "SEE_PIXELS" = SEE_PIXELS, + "SEE_SELF" = SEE_SELF, + "SEE_THRU" = SEE_THRU, + "SEE_TURFS" = SEE_TURFS, +)) + +DEFINE_BITFIELD(vision_flags, list( + "BLIND" = BLIND, + "SEE_BLACKNESS" = SEE_BLACKNESS, + "SEE_INFRA" = SEE_INFRA, + "SEE_MOBS" = SEE_MOBS, + "SEE_OBJS" = SEE_OBJS, + "SEE_PIXELS" = SEE_PIXELS, + "SEE_SELF" = SEE_SELF, + "SEE_THRU" = SEE_THRU, + "SEE_TURFS" = SEE_TURFS, )) diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index f84bac20b1..c835af61ce 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -30,9 +30,6 @@ GLOBAL_VAR(xeno_unannounced_map) GLOBAL_DATUM_INIT(uscm_tacmap_status, /datum/tacmap/drawing/status_tab_view, new) GLOBAL_DATUM_INIT(xeno_tacmap_status, /datum/tacmap/drawing/status_tab_view/xeno, new) -/// List of roles that can be setup for each gamemode -GLOBAL_LIST_INIT(gamemode_roles, list()) - GLOBAL_VAR_INIT(minimum_exterior_lighting_alpha, 255) GLOBAL_DATUM_INIT(item_to_box_mapping, /datum/item_to_box_mapping, init_item_to_box_mapping()) diff --git a/code/_onclick/hud/rendering/plane_master.dm b/code/_onclick/hud/rendering/plane_master.dm index c337ee198e..c7d5eeec2c 100644 --- a/code/_onclick/hud/rendering/plane_master.dm +++ b/code/_onclick/hud/rendering/plane_master.dm @@ -12,6 +12,10 @@ var/render_relay_plane = RENDER_PLANE_GAME ///bool: Whether this plane should get a render target automatically generated var/generate_render_target = TRUE + /// A string to manually set the relay render target. By default it's not generated. + var/set_relay_target + /// A string to manually set the relay render source. Can be set to a dummy string to ignore render source. By default it links to the render target of the plane master. + var/set_relay_source ///integer: blend mode to apply to the render relay in case you dont want to use the plane_masters blend_mode var/blend_mode_override ///reference: current relay this plane is utilizing to render @@ -41,28 +45,88 @@ name = "game world plane master" plane = GAME_PLANE appearance_flags = PLANE_MASTER //should use client color - blend_mode = BLEND_OVERLAY + render_relay_plane = RENDER_PLANE_FOREGROUND + render_target = RENDER_TARGET_GAME_WORLD -/atom/movable/screen/plane_master/game_world/backdrop(mob/mymob) +/atom/movable/screen/plane_master/game_world/relay_render_to_plane(mob/mymob, relay_plane) . = ..() - remove_filter("AO") - if(istype(mymob) && mymob?.client?.prefs?.toggle_prefs & TOGGLE_AMBIENT_OCCLUSION) - add_filter("AO", 1, drop_shadow_filter(x = 0, y = -2, size = 4, color = "#04080FAA")) + if(.) + /// This creates a regular mask on this plane when the FOV knockout is active in buildings (shown to the player). + relay.add_filter("building_mask", 1, alpha_mask_filter(render_source = RENDER_TARGET_BUILDING_MASK)) + +/// This layer mimics regular layering so that we get a similar effect for visible roofs, but also allow them to be manipulated via plane master. +/atom/movable/screen/plane_master/roof_visible + name = "visible roof plane master" + plane = ROOF_VISIBLE_PLANE + appearance_flags = PLANE_MASTER + render_relay_plane = GAME_PLANE /// We render this on to the game world, so as to layer it on top. + render_target = RENDER_TARGET_ROOF_VISIBLE + +/atom/movable/screen/plane_master/roof_visible/relay_render_to_plane(mob/mymob, relay_plane) + . = ..() + if(. && isobserver(mymob)) /// Simple check for observers here, as that cuts down on a lot of logic that needs to be done otherwise. + relay.alpha = 40 /// Makes it less opaque. + relay.mouse_opacity = MOUSE_OPACITY_TRANSPARENT /// Allows it to be completely click-through. + +/atom/movable/screen/plane_master/building + name = "building mask plane master" + plane = BUILDING_MASK_PLANE + appearance_flags = PLANE_MASTER + render_relay_plane = RENDER_PLANE_FOREGROUND + render_target = RENDER_TARGET_BUILDING_MASK + set_relay_source = RENDER_TARGET_GAME_WORLD + +/// FOV blocker/mask for tents. Works with the relay system for their effects to create a cool visual. The relay is the object we manipualate in-game. +/atom/movable/screen/plane_master/building/relay_render_to_plane(mob/mymob, relay_plane) + . = ..() + if(.) + /// This creates an inverse mask when FOV knockout is active, getting a single image with the knockout. + relay.add_filter("fov_color", 1, color_matrix_filter(list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1, 0,0,0,0))) + relay.add_filter("motion_blur", 2, motion_blur_filter(0,0)) + relay.add_filter("building_mask", 3, alpha_mask_filter(render_source = RENDER_TARGET_BUILDING_MASK, flags = MASK_INVERSE)) + +/// Plane master handling display of building roofs that are normally only shown when entering a building. This entire plane is rendered off-screen and should not be manipulated directly. +/atom/movable/screen/plane_master/roof_hidden + name = "hidden roof plane master" + plane = ROOF_HIDDEN_PLANE + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + appearance_flags = PLANE_MASTER + render_relay_plane = RENDER_PLANE_FOREGROUND + render_target = RENDER_TARGET_ROOF_HIDDEN + +/* +* We need to create a custom relay that will do all of the heavy lifting for us. +* This is required because otherwise we cannot re-use the offscreen effects properly. +* This is not the same as a plane master; but it gets the desired effect. +*/ +/atom/movable/screen/plane_master/roof_hidden/relay_render_to_plane(mob/mymob, relay_plane) + . = ..() + if(.) + relay.add_filter("weather_overlay", 1, layering_filter(render_source = RENDER_TARGET_WEATHER)) /// This sets the weather overlay on top of it. + relay.add_filter("hidden_roof_mask", 2, alpha_mask_filter(render_source = RENDER_TARGET_ROOF_HIDDEN)) /// The mask keeps it on the roof. + +/// Plane for weather effects. +/atom/movable/screen/plane_master/weather + name = "weather plane master" + plane = WEATHER_PLANE + appearance_flags = PLANE_MASTER + render_relay_plane = RENDER_PLANE_FOREGROUND + render_target = RENDER_TARGET_WEATHER + +/atom/movable/screen/plane_master/weather/relay_render_to_plane(mob/mymob, relay_plane) + . = ..() + if(.) + if(isobserver(mymob)) /// Observers get the basic masking effect for all roofs. + relay.add_filter("visisble_roof_mask", 1, alpha_mask_filter(render_source = RENDER_TARGET_ROOF_VISIBLE, flags = MASK_INVERSE)) + else + relay.add_filter("hidden_roof_mask", 1, alpha_mask_filter(render_source = RENDER_TARGET_ROOF_HIDDEN, flags = MASK_INVERSE)) /atom/movable/screen/plane_master/ghost name = "ghost plane master" plane = GHOST_PLANE appearance_flags = PLANE_MASTER //should use client color - blend_mode = BLEND_OVERLAY render_relay_plane = RENDER_PLANE_NON_GAME -/// Plane master handling display of building roofs. They're meant to become invisible when inside a building. -/atom/movable/screen/plane_master/roof - name = "roof plane master" - plane = ROOF_PLANE - appearance_flags = PLANE_MASTER - blend_mode = BLEND_OVERLAY - /** * Plane master handling byond internal blackness * vars are set as to replicate behavior when rendering to other planes @@ -126,14 +190,12 @@ name = "above lighting plane master" plane = ABOVE_LIGHTING_PLANE appearance_flags = PLANE_MASTER //should use client color - blend_mode = BLEND_OVERLAY render_relay_plane = RENDER_PLANE_GAME /atom/movable/screen/plane_master/runechat name = "runechat plane master" plane = RUNECHAT_PLANE appearance_flags = PLANE_MASTER - blend_mode = BLEND_OVERLAY render_relay_plane = RENDER_PLANE_NON_GAME /atom/movable/screen/plane_master/o_light_visual diff --git a/code/_onclick/hud/rendering/plane_master_controller.dm b/code/_onclick/hud/rendering/plane_master_controller.dm index 3548f22497..9028cf481e 100644 --- a/code/_onclick/hud/rendering/plane_master_controller.dm +++ b/code/_onclick/hud/rendering/plane_master_controller.dm @@ -1,7 +1,7 @@ ///Atom that manages and controls multiple planes. It's an atom so we can hook into add_filter etc. Multiple controllers can control one plane. /atom/movable/plane_master_controller ///List of planes in this controllers control. Initially this is a normal list, but becomes an assoc list of plane numbers as strings | plane instance - var/list/controlled_planes = list() + var/list/controlled_planes ///hud that owns this controller var/datum/hud/owner_hud @@ -57,21 +57,31 @@ INITIALIZE_IMMEDIATE(/atom/movable/plane_master_controller) var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i] pm_iterator.transition_filter(name, time, new_params, easing, loop) - /atom/movable/plane_master_controller/game name = PLANE_MASTERS_GAME + +/atom/movable/plane_master_controller/game/Initialize(mapload, datum/hud/hud) controlled_planes = list( - GAME_PLANE, FLOOR_PLANE, + GAME_PLANE, + ROOF_VISIBLE_PLANE, + BUILDING_MASK_PLANE, + ROOF_HIDDEN_PLANE, + WEATHER_PLANE, LIGHTING_PLANE, EXTERIOR_LIGHTING_PLANE, ) + . = ..() /// Exists for convienience when referencing all non-master render plates. /// This is the whole game and the UI, but not the escape menu. /atom/movable/plane_master_controller/non_master name = PLANE_MASTERS_NON_MASTER + +/atom/movable/plane_master_controller/non_master/Initialize(mapload, datum/hud/hud) controlled_planes = list( + RENDER_PLANE_FOREGROUND, RENDER_PLANE_GAME, RENDER_PLANE_NON_GAME, ) + . = ..() diff --git a/code/_onclick/hud/rendering/render_plate.dm b/code/_onclick/hud/rendering/render_plate.dm index cb579eb4ff..cb56f7886b 100644 --- a/code/_onclick/hud/rendering/render_plate.dm +++ b/code/_onclick/hud/rendering/render_plate.dm @@ -33,6 +33,19 @@ render_relay_plane = null generate_render_target = FALSE +///Specific render plate for foreground objects. Previously a regular plane master. +/atom/movable/screen/plane_master/rendering_plate/foreground + name = "foreground rendering plate" + plane = RENDER_PLANE_FOREGROUND + render_relay_plane = RENDER_PLANE_GAME /// Layers it on the game plane. + +///This adds a shadow filter based on preferences. If it is not isolated and applied on top of collated foreground planes, it will cause masking graphical artifacts. +/atom/movable/screen/plane_master/rendering_plate/foreground/backdrop(mob/mymob) + . = ..() + remove_filter("AO") + if(istype(mymob) && mymob?.client?.prefs?.toggle_prefs & TOGGLE_AMBIENT_OCCLUSION) + add_filter("AO", 1, drop_shadow_filter(x = 0, y = -2, size = 4, color = "#04080FAA")) + ///renders general in charachter game objects /atom/movable/screen/plane_master/rendering_plate/game_world name = "game rendering plate" @@ -49,7 +62,6 @@ plane = RENDER_PLANE_NON_GAME render_relay_plane = RENDER_PLANE_MASTER - /** * Plane master proc called in backdrop() that creates a relay object, sets it as needed and then adds it to the clients screen * Sets: @@ -65,19 +77,18 @@ */ /atom/movable/screen/plane_master/proc/relay_render_to_plane(mob/mymob, relay_plane) if(relay in mymob.client.screen) //backdrop can be called multiple times - return + return FALSE if(!render_target && generate_render_target) render_target = "*[name]: AUTOGENERATED RENDER TGT" relay = new() - relay.render_source = render_target + relay.render_target = set_relay_target + relay.render_source = set_relay_source || render_target relay.plane = relay_plane relay.layer = (plane + abs(LOWEST_EVER_PLANE))*0.5 //layer must be positive but can be a decimal - if(blend_mode_override) - relay.blend_mode = blend_mode_override - else - relay.blend_mode = blend_mode + relay.blend_mode = blend_mode_override || blend_mode relay.mouse_opacity = mouse_opacity - relay.name = render_target + relay.name = "Render Relay: [render_target]" mymob.client.add_to_screen(relay) if(blend_mode != BLEND_MULTIPLY) blend_mode = BLEND_DEFAULT + return TRUE diff --git a/code/_onclick/ventcrawl.dm b/code/_onclick/ventcrawl.dm index 51afbc139f..46b103d93a 100644 --- a/code/_onclick/ventcrawl.dm +++ b/code/_onclick/ventcrawl.dm @@ -82,17 +82,17 @@ return visible_message(SPAN_NOTICE("[src] begins climbing into [vent_found]."), SPAN_NOTICE("You begin climbing into [vent_found].")) - vent_found.animate_ventcrawl() + vent_found.animate_crawl() if(!do_after(src, 45, INTERRUPT_NO_NEEDHAND, BUSY_ICON_GENERIC)) - vent_found.animate_ventcrawl_reset() + vent_found.animate_crawl_reset() return updatehealth() if(is_mob_incapacitated(src) || health < 0 || !client || !ventcrawl_carry()) - vent_found.animate_ventcrawl_reset() + vent_found.animate_crawl_reset() return - vent_found.animate_ventcrawl_reset() + vent_found.animate_crawl_reset() visible_message(SPAN_DANGER("[src] scrambles into [vent_found]!"), SPAN_WARNING("You climb into [vent_found].")) playsound(src, pick('sound/effects/alien_ventpass1.ogg', 'sound/effects/alien_ventpass2.ogg'), 35, 1) forceMove(vent_found) diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm index 147f57fcb1..579eb2e898 100644 --- a/code/controllers/configuration/configuration.dm +++ b/code/controllers/configuration/configuration.dm @@ -13,8 +13,9 @@ var/list/defaultmaps var/list/modes // allowed modes - var/list/gamemode_cache var/list/mode_names + var/list/mode_paths + var/datum/game_mode/mode_cache /// We cache the current game mode, so that we can run all of the relevant procs before round start. var/motd var/policy @@ -289,30 +290,31 @@ return PROC_BLOCKED return E.ValidateAndSet("[new_val]") - /datum/controller/configuration/proc/LoadModes() - gamemode_cache = typecacheof(/datum/game_mode, TRUE) + var/gamemode_types[] = typecacheof(/datum/game_mode, TRUE) modes = list() mode_names = list() - for(var/T in gamemode_cache) - // I wish I didn't have to instance the game modes in order to look up - // their information, but it is the only way (at least that I know of). - var/datum/game_mode/M = new T() - if(M.config_tag) - if(!(M.config_tag in modes)) //Ensure each mode is added only once - modes += M.config_tag - mode_names[M.config_tag] = M.name - GLOB.gamemode_roles[M.name] = M.get_roles_list() - qdel(M) - -/datum/controller/configuration/proc/pick_mode(mode_name) - for(var/T in gamemode_cache) - var/datum/game_mode/M = T - var/ct = initial(M.config_tag) - if(ct && ct == mode_name) - return new T - return new /datum/game_mode/extended() - + mode_paths = list() + var/datum/game_mode/mode + var/m_tag + var/m_name + for(var/i in gamemode_types) + /// Revised. You don't have to instance objects to get their information, unless it's computed at runtime, like with lists. + mode = i + m_tag = initial(mode.config_tag) + m_name = initial(mode.name) + if(m_tag && !(m_tag in modes)) /// Ensure each mode is added only once. + modes += m_tag + mode_names[m_tag] = m_name + mode_paths[m_tag] = i + +/// This does not safety check if the mode is running; right now only admins can change the game mode as far as I am aware, and that proc safety checks. +/datum/controller/configuration/proc/pick_mode(config_tag) + if(config_tag != mode_cache?.config_tag) + QDEL_NULL(mode_cache) + var/mode_path = mode_paths[config_tag] + if(mode_path) mode_cache = new mode_path() + return mode_cache || new /datum/game_mode/extended() /datum/controller/configuration/proc/LoadChatFilter() var/list/in_character_filter = list() diff --git a/code/controllers/subsystem/communications.dm b/code/controllers/subsystem/communications.dm index e214b29836..931647764b 100644 --- a/code/controllers/subsystem/communications.dm +++ b/code/controllers/subsystem/communications.dm @@ -99,6 +99,14 @@ var/const/CLF_ENGI_FREQ = 1273 var/const/CLF_MED_FREQ = 1274 var/const/CLF_CCT_FREQ = 1275 +//USCM GGround +var/const/USCM_GROUND_FREQ = 1440 +var/const/USCM_GROUND_ONE_FREQ = 1441 +var/const/USCM_GROUND_TWO_FREQ = 1442 +var/const/USCM_GROUND_MED_FREQ = 1444 +var/const/USCM_GROUND_ENGI_FREQ = 1445 +var/const/USCM_GROUND_CMD_FREQ = 1446 + var/const/MIN_FREQ = 1460 // ------------------------------------------------------ var/const/PUB_FREQ = 1461 var/const/MAX_FREQ = 1468 // ------------------------------------------------------ @@ -168,6 +176,13 @@ var/list/radiochannels = list( RADIO_CHANNEL_ALAMO = DS1_FREQ, RADIO_CHANNEL_NORMANDY = DS2_FREQ, + RADIO_CHANNEL_USCM_GROUND = USCM_GROUND_FREQ, + SQUAD_USCM_GROUND_1 = USCM_GROUND_ONE_FREQ, + SQUAD_USCM_GROUND_2 = USCM_GROUND_TWO_FREQ, + RADIO_CHANNEL_USCM_GROUND_MED = USCM_GROUND_MED_FREQ, + RADIO_CHANNEL_USCM_GROUND_ENGI = USCM_GROUND_ENGI_FREQ, + RADIO_CHANNEL_USCM_GROUND_CMD = USCM_GROUND_CMD_FREQ, + RADIO_CHANNEL_COLONY = COLONY_FREQ, @@ -193,6 +208,9 @@ var/list/radiochannels = list( RADIO_CHANNEL_CLF_CCT = CLF_CCT_FREQ, ) +//USCM Outpost +#define USCM_GROUND_FREQS list(USCM_GROUND_FREQ, USCM_GROUND_ONE_FREQ, USCM_GROUND_TWO_FREQ, USCM_GROUND_MED_FREQ, USCM_GROUND_ENGI_FREQ, USCM_GROUND_CMD_FREQ) + // Response Teams #define ERT_FREQS list(VAI_FREQ, DUT_FREQ, YAUT_FREQ, CMB_FREQ, RMC_FREQ) @@ -269,6 +287,11 @@ SUBSYSTEM_DEF(radio) "[HC_FREQ]" = "hcradio", "[PVST_FREQ]" = "pvstradio", "[COLONY_FREQ]" = "deptradio", + "[USCM_GROUND_CMD_FREQ]" = "comradio", //These are the same as their regular counterparts. + "[USCM_GROUND_MED_FREQ]" = "medradio", + "[USCM_GROUND_ENGI_FREQ]" = "engradio", + "[USCM_GROUND_ONE_FREQ]" = "grpltoneradio",//These are a little different. + "[USCM_GROUND_TWO_FREQ]" = "grplttworadio" ) /datum/controller/subsystem/radio/proc/add_object(obj/device as obj, new_frequency as num, filter = null as text|null) diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 2c69f373c6..4c422bc03c 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -139,7 +139,6 @@ SUBSYSTEM_DEF(mapping) /datum/controller/subsystem/mapping/proc/Loadship(list/errorList, name, path, files, list/traits, list/default_traits, silent = FALSE, override_map_path = "maps/") LoadGroup(errorList, name, path, files, traits, default_traits, silent, override_map_path = override_map_path) - GLOB.gamemode_roles["Distress Signal: Lowpop"] = GLOB.platoon_to_role_list[MAIN_SHIP_PLATOON] /datum/controller/subsystem/mapping/proc/Loadground(list/errorList, name, path, files, list/traits, list/default_traits, silent = FALSE, override_map_path = "maps/") LoadGroup(errorList, name, path, files, traits, default_traits, silent, override_map_path = override_map_path) diff --git a/code/controllers/subsystem/minimap.dm b/code/controllers/subsystem/minimap.dm index 1c2a6d3e24..475a2b40ff 100644 --- a/code/controllers/subsystem/minimap.dm +++ b/code/controllers/subsystem/minimap.dm @@ -493,14 +493,15 @@ SUBSYSTEM_DEF(minimaps) if(!client || !client.mob) continue var/mob/client_mob = client.mob - if(client_mob.faction in FACTION_LIST_HUMANOID ) - faction_clients += client - else if(client_mob.faction == FACTION_NEUTRAL && isobserver(client_mob)) - faction_clients += client - else if(isxeno(client_mob)) + + if(isxeno(client_mob)) // Aliens won't see the human faction maps, even if their faction is the same. var/mob/living/carbon/xenomorph/xeno = client_mob if(xeno.hivenumber == faction) faction_clients += client + else if(client_mob.faction == FACTION_NEUTRAL && isobserver(client_mob)) + faction_clients += client + else if(client_mob.faction == faction) + faction_clients += client // This may be unnecessary to do this way if the asset url is always the same as the lookup key var/flat_tacmap_key = icon2html(flat_map, faction_clients, keyonly = TRUE) @@ -510,9 +511,9 @@ SUBSYSTEM_DEF(minimaps) var/flat_tacmap_png = SSassets.transport.get_asset_url(flat_tacmap_key) var/datum/flattened_tacmap/new_flat = new(flat_tacmap_png, flat_tacmap_key) - if(faction in FACTION_LIST_HUMANOID ) + if(faction in FACTION_LIST_HUMANOID) GLOB.uscm_unannounced_map = new_flat - else //if(faction == XENO_HIVE_NORMAL) + else if(faction == XENO_HIVE_NORMAL) GLOB.xeno_unannounced_map = new_flat return TRUE @@ -528,7 +529,7 @@ SUBSYSTEM_DEF(minimaps) /datum/tacmap/drawing/proc/store_current_svg_coords(faction, svg_coords, ckey) var/datum/svg_overlay/svg_store_overlay = new(svg_coords, ckey) - if(faction in FACTION_LIST_HUMANOID ) + if(faction in FACTION_LIST_HUMANOID) GLOB.uscm_svg_tacmap_data += svg_store_overlay else if(faction == XENO_HIVE_NORMAL) GLOB.xeno_svg_tacmap_data += svg_store_overlay @@ -649,7 +650,8 @@ SUBSYSTEM_DEF(minimaps) /// by default the ground map - this picks the first level matching the trait. if it exists var/targeted_ztrait = ZTRAIT_GROUND var/atom/owner - + /// What faction this particular map belong to. This is set by the object creating the map, if applicable. + var/faction_default /// tacmap holder for holding the minimap var/datum/tacmap_holder/map_holder @@ -680,9 +682,10 @@ SUBSYSTEM_DEF(minimaps) /// A temporary lock out time before we can open the new canvas tab to allow the tacmap time to fire var/tacmap_ready_time = 0 -/datum/tacmap/New(atom/source, minimap_type) +/datum/tacmap/New(atom/source, minimap_type, faction) allowed_flags = minimap_type owner = source + faction_default = faction /datum/tacmap/drawing/status_tab_view/New() var/datum/tacmap/drawing/status_tab_view/uscm_tacmap @@ -721,15 +724,16 @@ SUBSYSTEM_DEF(minimaps) /datum/tacmap/drawing/tgui_interact(mob/user, datum/tgui/ui) var/mob/living/carbon/xenomorph/xeno = user var/is_xeno = istype(xeno) - var/faction = is_xeno ? xeno.hivenumber : user.faction - if(faction == FACTION_NEUTRAL && isobserver(user)) + var/faction = faction_default || (is_xeno ? xeno.hivenumber : user.faction) // Fallback is user.faction. + + if(user.faction == FACTION_NEUTRAL && isobserver(user)) faction = allowed_flags == MINIMAP_FLAG_XENO ? XENO_HIVE_NORMAL : FACTION_MARINE new_current_map = get_unannounced_tacmap_data_png(faction) old_map = get_tacmap_data_png(faction) current_svg = get_tacmap_data_svg(faction) - var/use_live_map = skillcheck(user, SKILL_LEADERSHIP, SKILL_LEAD_EXPERT) || is_xeno + var/use_live_map = is_xeno || skillcheck(user, SKILL_LEADERSHIP, SKILL_LEAD_EXPERT) // Either a xenomorph or skilled to view the live map. if(use_live_map && !map_holder) var/level = SSmapping.levels_by_trait(targeted_ztrait) @@ -740,13 +744,20 @@ SUBSYSTEM_DEF(minimaps) ui = SStgui.try_update_ui(user, src, ui) if(!ui) if(!wiki_map_fallback) - var/wiki_url = CONFIG_GET(string/wikiurl) - var/obj/item/map/current_map/new_map = new - if(wiki_url && new_map.html_link) - wiki_map_fallback ="[wiki_url]/[new_map.html_link]" - else - debug_log("Failed to determine fallback wiki map! Attempted '[wiki_url]/[new_map.html_link]'") - qdel(new_map) + //I had to refactor some other code to make this less atrocious. Spawning in a map item to reference one compile-time variable is very silly. Behold! + var/obj/item/map/ground_map = PATH_TO_GROUND_MAP_OBJ + if(ground_map) + var/html_override = initial(ground_map.html_override) //This is a hack, should not be relied on in the future. + var/html_link = initial(ground_map.html_link) + + if(html_override) //Hack, but a necessary one since there is no reliable wiki. + wiki_map_fallback = html_link //This should always work, as the address should point to functional image. + else + var/wiki_url = CONFIG_GET(string/wikiurl) + if(wiki_url && html_link) + wiki_map_fallback ="[wiki_url]/[html_link]" + else + debug_log("Failed to determine fallback wiki map! Attempted '[wiki_url]/[html_link]'") // Ensure we actually have the map image sent resend_current_map_png(user) @@ -795,24 +806,33 @@ SUBSYSTEM_DEF(minimaps) return data /datum/tacmap/drawing/ui_static_data(mob/user) + var/list/data = list() data["mapRef"] = map_holder?.map_ref - data["canDraw"] = FALSE data["mapFallback"] = wiki_map_fallback var/mob/living/carbon/xenomorph/xeno = user - var/is_xeno = istype(xeno) - var/faction = is_xeno ? xeno.hivenumber : user.faction - data["isXeno"] = is_xeno - data["canViewTacmap"] = is_xeno - data["canViewCanvas"] = (faction in FACTION_LIST_HUMANOID) || faction == XENO_HIVE_NORMAL - - if(skillcheck(user, SKILL_LEADERSHIP, SKILL_LEAD_EXPERT) || faction == XENO_HIVE_NORMAL && isqueen(user)) - data["canDraw"] = TRUE + if(istype(xeno)) + data["isXeno"] = TRUE data["canViewTacmap"] = TRUE - + if(xeno.hivenumber == XENO_HIVE_NORMAL) + data["canViewCanvas"] = TRUE // Only for the default hive. Should instead expand faction maps, I think. + data["canDraw"] = isqueen(xeno) // Only the queen. + else // Data has to be FALSE (0) for the tabs not to show up, thus the else case cannot be avoided. + data["canViewCanvas"] = FALSE + data["canDraw"] = FALSE + else + var/faction = faction_default || user.faction // User faction should not come into play, but you never now. + // Apparently you need the skills to view the tacmap feed. After thinging about it, it does promote actual leadership roles viewing the tacmap. + data["canViewTacmap"] = skillcheck(user, SKILL_LEADERSHIP, SKILL_LEAD_TRAINED) + if((user.job in GET_MANIFEST_ROLES) && user.faction == faction) // Only manifest roles should be able to draw and update the canvas. And only if the faction matches. + data["canViewCanvas"] = TRUE + data["canDraw"] = skillcheck(user, SKILL_LEADERSHIP, SKILL_LEAD_EXPERT) // Should not be able to draw without leadership. + else + data["canViewCanvas"] = FALSE + data["canDraw"] = FALSE return data /datum/tacmap/drawing/status_tab_view/ui_static_data(mob/user) @@ -849,8 +869,8 @@ SUBSYSTEM_DEF(minimaps) var/mob/user = ui.user var/mob/living/carbon/xenomorph/xeno = user - var/faction = istype(xeno) ? xeno.hivenumber : user.faction - if(faction == FACTION_NEUTRAL && isobserver(user)) + var/faction = faction_default || (istype(xeno) ? xeno.hivenumber : user.faction) + if(user.faction == FACTION_NEUTRAL && isobserver(user)) faction = allowed_flags == MINIMAP_FLAG_XENO ? XENO_HIVE_NORMAL : FACTION_MARINE switch (action) @@ -911,7 +931,8 @@ SUBSYSTEM_DEF(minimaps) COOLDOWN_START(GLOB, uscm_canvas_cooldown, canvas_cooldown_time) var/mob/living/carbon/human/human_leader = user for(var/datum/squad/current_squad in RoleAuthority.squads) - current_squad.send_maptext("Tactical map update in progress...", "Tactical Map:") + if(current_squad.faction == faction) + current_squad.send_maptext("Tactical map update in progress...", "Tactical Map:") human_leader.visible_message(SPAN_BOLDNOTICE("Tactical map update in progress...")) playsound_client(human_leader.client, "sound/effects/sos-morse-code.ogg") notify_ghosts(header = "Tactical Map", message = "The [faction] tactical map has been updated.", ghost_sound = "sound/effects/sos-morse-code.ogg", notify_volume = 80, action = NOTIFY_USCM_TACMAP, enter_link = "uscm_tacmap=1", enter_text = "View", source = owner) @@ -932,13 +953,13 @@ SUBSYSTEM_DEF(minimaps) if(!(isatom(owner))) return UI_INTERACTIVE - var/dist = get_dist(owner, user) - if(dist <= 1) - return UI_INTERACTIVE - else if(dist <= 2) - return UI_UPDATE - else - return UI_CLOSE + switch(get_dist(owner, user)) + if(-1 to 1) + return UI_INTERACTIVE + if(2) + return UI_UPDATE + else + return UI_CLOSE /datum/tacmap/drawing/xeno/ui_status(mob/user) if(!isxeno(user)) @@ -996,7 +1017,7 @@ SUBSYSTEM_DEF(minimaps) switch(faction) if(XENO_HIVE_NORMAL) return MINIMAP_FLAG_XENO - if(FACTION_MARINE) + if(FACTION_MARINE, FACTION_USCM_GROUND) return MINIMAP_FLAG_USCM if(FACTION_UPP) return MINIMAP_FLAG_UPP diff --git a/code/controllers/subsystem/nightmare.dm b/code/controllers/subsystem/nightmare.dm index e963653b54..e3d8d61f74 100644 --- a/code/controllers/subsystem/nightmare.dm +++ b/code/controllers/subsystem/nightmare.dm @@ -45,18 +45,20 @@ SUBSYSTEM_DEF(nightmare) if(!initialized) message_admins("Nightmare subsystem is performing prepare_game prior to initialization! No nightmare inserts will be loaded.") - if(stat == NIGHTMARE_STATUS_DONE) - return TRUE - if(stat == NIGHTMARE_STATUS_RUNNING) - return FALSE - if(stat == NIGHTMARE_STATUS_STANDBY) - start_time = world.time - stat = NIGHTMARE_STATUS_RUNNING + switch(stat) + if(NIGHTMARE_STATUS_DONE) + return TRUE + if(NIGHTMARE_STATUS_RUNNING) + return FALSE + if(NIGHTMARE_STATUS_STANDBY) + start_time = world.time + stat = NIGHTMARE_STATUS_RUNNING + . = FALSE for(var/context_name in contexts) if(stat != NIGHTMARE_STATUS_RUNNING) return TRUE // Panic Abort - set_scenario_value("gamemode", GLOB.master_mode) // Architectural pitfall - Hope it doesn't change during setup :( + set_scenario_value("gamemode", GLOB.master_mode, NIGHTMARE_CTX_GLOBAL) // Architectural pitfall - Hope it doesn't change during setup :( var/datum/nmcontext/context = contexts[context_name] var/datum/nmnode/root = roots["[context_name]-[NIGHTMARE_ACT_BASE]"] if(root) @@ -83,14 +85,24 @@ SUBSYSTEM_DEF(nightmare) load_file("[MC.nightmare_path]/[NIGHTMARE_FILE_BASE]", "[context_name]-[NIGHTMARE_ACT_BASE]") log_debug("Nightmare: Loaded map environment {[context_name],[map_type]}") -/// Returns a value from the global scenario -/datum/controller/subsystem/nightmare/proc/get_scenario_value(name) - var/datum/nmcontext/context = contexts[NIGHTMARE_CTX_GLOBAL] +/// Returns a value from stype scenario. Possible scenario types are defined in nightmare.dm in __DEFINES. NIGHTMARE_CTX_GLOBAL would be global scenario. +/datum/controller/subsystem/nightmare/proc/get_scenario_value(name, stype) + var/datum/nmcontext/context = contexts[stype] return context.get_scenario_value(name) -/// Override a value from the global scenario. -/datum/controller/subsystem/nightmare/proc/set_scenario_value(name, value) - var/datum/nmcontext/context = contexts[NIGHTMARE_CTX_GLOBAL] +/// Returns a list of all currently set values for the scenario. +/datum/controller/subsystem/nightmare/proc/get_scenario_list(stype) + var/datum/nmcontext/context = contexts[stype] + return context.scenario + +/// Returns all scenario keys and their possible values for that stype as an associated list of lists. +/datum/controller/subsystem/nightmare/proc/get_directory(stype) + var/datum/nmcontext/context = contexts[stype] + return context.directory + +/// Override a value from stype scenario. +/datum/controller/subsystem/nightmare/proc/set_scenario_value(name, value, stype) + var/datum/nmcontext/context = contexts[stype] return context.set_scenario_value(name, value) /// Reads a JSON file, returns a branch nmnode representing contents of file diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index e06e1ac458..038a4fbd4b 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -180,13 +180,13 @@ SUBSYSTEM_DEF(ticker) CHECK_TICK if(!mode.can_start(bypass_checks)) to_chat(world, "Reverting to pre-game lobby.") - QDEL_NULL(mode) + mode = null RoleAuthority.reset_roles() return FALSE CHECK_TICK if(!mode.pre_setup() && !bypass_checks) - QDEL_NULL(mode) + mode = null to_chat(world, "Error in pre-setup for [GLOB.master_mode]. Reverting to pre-game lobby.") RoleAuthority.reset_roles() return FALSE @@ -335,15 +335,11 @@ SUBSYSTEM_DEF(ticker) else time_left = newtime - /datum/controller/subsystem/ticker/proc/load_mode() - var/mode = trim(file2text("data/mode.txt")) - if(mode) - GLOB.master_mode = SSmapping.configs[GROUND_MAP].force_mode ? SSmapping.configs[GROUND_MAP].force_mode : mode - else - GLOB.master_mode = "Distress Signal: Lowpop" + /// This fires pretty late, pretty much at the very end of the pre-game setup stack. Which means you won't see the mode change until then, if it has been changed from the previous round. + GLOB.master_mode = SSmapping.configs[GROUND_MAP].force_mode || trim(file2text("data/mode.txt")) || "Distress Signal: Lowpop" log_game("Saved mode is '[GLOB.master_mode]'") - + config.pick_mode(GLOB.master_mode) /// This will initialize a cached mode to reference for procs and whatnot, which is then transferred to the ticker. /datum/controller/subsystem/ticker/proc/save_mode(the_mode) fdel("data/mode.txt") diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index a56e10636a..c71c474807 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -272,12 +272,13 @@ SUBSYSTEM_DEF(vote) if("gamemode") question = "Gamemode vote" randomize_entries = TRUE - for(var/mode_type in config.gamemode_cache) - var/datum/game_mode/M = mode_type - if(initial(M.config_tag)) - var/vote_cycle_met = !initial(M.vote_cycle) || (text2num(SSperf_logging?.round?.id) % initial(M.vote_cycle) == 0) - if(initial(M.votable) && vote_cycle_met) - choices += initial(M.config_tag) + var/datum/game_mode/mode_type + var/vote_cycle + for(var/c_tag in config.mode_paths) + mode_type = config.mode_paths[c_tag] + vote_cycle = initial(mode_type.vote_cycle) + if(initial(mode_type.votable) && (!vote_cycle || (text2num(SSperf_logging?.round?.id) % vote_cycle == 0))) + choices += c_tag if("groundmap") question = "Ground map vote" vote_sound = 'sound/voice/start_your_voting.ogg' diff --git a/code/controllers/subsystem/weather.dm b/code/controllers/subsystem/weather.dm index 325c45fe23..476da77ded 100644 --- a/code/controllers/subsystem/weather.dm +++ b/code/controllers/subsystem/weather.dm @@ -197,7 +197,9 @@ SUBSYSTEM_DEF(weather) icon = 'icons/effects/weather.dmi' invisibility = 0 mouse_opacity = MOUSE_OPACITY_TRANSPARENT - layer = WEATHER_LAYER + appearance_flags = KEEP_TOGETHER + layer = WEATHER_LAYER /// The layer doesn't really matter as they will be drawn on another plane. + plane = WEATHER_PLANE /obj/effect/weather_vfx_holder/rain icon_state = "strata_storm" diff --git a/code/datums/beam.dm b/code/datums/beam.dm index e51dcafa02..b38c1afdf2 100644 --- a/code/datums/beam.dm +++ b/code/datums/beam.dm @@ -189,7 +189,7 @@ name="beam" icon='icons/effects/beam.dmi' icon_state="b_beam" - mouse_opacity = FALSE + mouse_opacity = MOUSE_OPACITY_TRANSPARENT var/tmp/atom/BeamSource diff --git a/code/datums/components/phone.dm b/code/datums/components/phone.dm index 3d0cfaf41f..a7d0736f80 100644 --- a/code/datums/components/phone.dm +++ b/code/datums/components/phone.dm @@ -178,12 +178,7 @@ GLOBAL_LIST_EMPTY_TYPED(phones, /datum/component/phone) return var/mob/living/carbon/human/human_user = user - if(human_user.comm_title) - phone_id = "[human_user.comm_title] [human_user]" - else if(human_user.job) - phone_id = "[human_user.job] [human_user]" - else - phone_id = "[human_user]" + phone_id = "[human_user.comm_title || GET_HUMAN_DEFAULT_ASSIGNMENT(human_user)] [human_user]" if(human_user.assigned_squad) phone_id += " ([human_user.assigned_squad.name])" diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 26ef0e5d0a..540f5ea8fc 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -20,61 +20,56 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new) cycled_data_record.fields["squad"] = new_name /datum/datacore/proc/get_manifest(monochrome, OOC, nonHTML) - var/list/cic = ROLES_CIC.Copy() - var/list/auxil = ROLES_AUXIL_SUPPORT.Copy() - var/list/misc = ROLES_MISC.Copy() - var/list/mp = ROLES_POLICE.Copy() - var/list/eng = ROLES_ENGINEERING.Copy() - var/list/req = ROLES_REQUISITION.Copy() - var/list/med = ROLES_MEDICAL.Copy() - var/list/marines_by_squad = ROLES_SQUAD_ALL.Copy() - for(var/squad_name in marines_by_squad) - marines_by_squad[squad_name] = ROLES_MARINES.Copy() - var/list/isactive = new() - -// If we need not the HTML table, but list + var/list/manifest_out = list() //This will be our final compiled list. + var/name //Iterator for the person's name. + var/rank //Iterator for the person's rank. + var/real_rank //What their real rank is. + var/squad_name //What their squad is called. + var/datum/job/current_job //Referenced through their mob job to pull up where their role is sorted. + var/datum/data/record/current_record + + //Returns a list and not HTML itself. Used by the id card computer. if(nonHTML) - var/list/departments = list( - "Command" = cic, - "Auxiliary" = auxil, - "Security" = mp, - "Engineering" = eng, - "Requisition" = req, - "Medical" = med - ) - departments += marines_by_squad - var/list/manifest_out = list() - for(var/datum/data/record/t in GLOB.data_core.general) - var/name = t.fields["name"] - var/rank = t.fields["rank"] - var/squad = t.fields["squad"] - if(isnull(name) || isnull(rank)) + var/category + for(current_record as anything in GLOB.data_core.general) + name = current_record.fields["name"] + rank = current_record.fields["rank"] + real_rank = current_record.fields["real_rank"] + squad_name = current_record.fields["squad"] + if(!name || !rank) continue - var/has_department = FALSE - for(var/department in departments) - // STOP SIGNING ALL MARINES IN ALPHA! - if(department in ROLES_SQUAD_ALL) - if(squad != department) - continue - var/list/jobs = departments[department] - if(rank in jobs) - if(!manifest_out[department]) - manifest_out[department] = list() - manifest_out[department] += list(list( - "name" = name, - "rank" = rank - )) - has_department = TRUE - break - if(!has_department) - if(!manifest_out["Miscellaneous"]) - manifest_out["Miscellaneous"] = list() - manifest_out["Miscellaneous"] += list(list( - "name" = name, - "rank" = rank - )) + + /* + * Structural pitfall here. roles_by_name expects a real rank, so if the individual has a different rank, if they were re-assigned, + * it will still list them under the real rank's job category, which isn't always desired. + * This also means that anything that doesn't have a job datum will be listed as JOB_CATEGORY_OTHER. + * Ideally records would keep a running tally of job category, so that it can be listed appropriately if a job change takes place. + * Something to look into if properly refactoring records in the future. Not really worth a workaround for right now. + */ + current_job = RoleAuthority.roles_by_name[real_rank] + if(!current_job) + if(current_record.fields["ref"]) + category = JOB_CATEGORY_OTHER // Probably a real person. + else + continue + else + category = squad_name || current_job.category + + if(!manifest_out[category]) + manifest_out[category] = list() + manifest_out[category] += list(list( + "name" = name, + "rank" = rank + )) + return manifest_out + //Returns an HTML table with the manifest. + var/list/isactive = list() + var/even = 0 //For prettier lines. + var/category_list[] //To simplify lookup. + var/category + var/dat = {"