From f5a2ff1bcd7e3230637a556c0569bda6e650d9b2 Mon Sep 17 00:00:00 2001 From: Matt Atlas Date: Sun, 22 Dec 2019 16:51:24 +0100 Subject: [PATCH] Langserver Fixes (#7740) --- code/__defines/dna.dm | 2 +- code/__defines/machinery.dm | 5 +++++ code/__defines/subsystem-defines.dm | 4 ++++ .../subsystems/processing/nanoui.dm | 4 ---- code/datums/looping_sounds/_looping_sound.dm | 21 ------------------- code/datums/wires/vending.dm | 2 -- code/game/dna/genes/disabilities.dm | 2 +- code/game/machinery/vending.dm | 4 ---- code/modules/alarm/alarm.dm | 2 +- .../preference_setup/general/01_basic.dm | 2 +- .../preference_setup/occupation/occupation.dm | 4 ---- code/modules/economy/Events.dm | 6 +++--- code/modules/economy/economy_misc.dm | 11 +--------- code/modules/martial_arts/skrell.dm | 8 +++---- .../abstract/new_player/character_traits.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 2 +- 16 files changed, 23 insertions(+), 58 deletions(-) diff --git a/code/__defines/dna.dm b/code/__defines/dna.dm index 1be4cd0e1fa..bf9e98380bb 100644 --- a/code/__defines/dna.dm +++ b/code/__defines/dna.dm @@ -35,7 +35,7 @@ #define EPILEPSY 2 #define COUGHING 4 #define TOURETTES 8 -#define STUTTER 16 +#define STUTTERING 16 #define DUMB 32 #define MONKEYLIKE 64 //sets IsAdvancedToolUser to FALSE #define PACIFIST 128 diff --git a/code/__defines/machinery.dm b/code/__defines/machinery.dm index c6005bf7dcd..7fc1aaad4b0 100644 --- a/code/__defines/machinery.dm +++ b/code/__defines/machinery.dm @@ -28,6 +28,11 @@ #define AI_CAMERA_LUMINOSITY 6 +//Vending machines. +#define CAT_NORMAL 1 +#define CAT_HIDDEN 2 // also used in corresponding wires/vending.dm +#define CAT_COIN 4 + // Camera networks #define NETWORK_CRESCENT "Crescent" #define NETWORK_CIVILIAN_EAST "Civilian East" diff --git a/code/__defines/subsystem-defines.dm b/code/__defines/subsystem-defines.dm index 955bb54e305..9aa9ef710bb 100644 --- a/code/__defines/subsystem-defines.dm +++ b/code/__defines/subsystem-defines.dm @@ -22,6 +22,10 @@ //prevents distinguishing identical timers with the wait variable #define TIMER_NO_HASH_WAIT 0x10 +//Loops the timer repeatedly until qdeleted +//In most cases you want a subsystem instead +#define TIMER_LOOP 0x20 + //number of byond ticks that are allowed to pass before the timer subsystem thinks it hung on something #define TIMER_NO_INVOKE_WARNING 600 diff --git a/code/controllers/subsystems/processing/nanoui.dm b/code/controllers/subsystems/processing/nanoui.dm index 25dee0675af..4ab4d74fe24 100644 --- a/code/controllers/subsystems/processing/nanoui.dm +++ b/code/controllers/subsystems/processing/nanoui.dm @@ -1,7 +1,5 @@ var/datum/controller/subsystem/processing/nanoui/SSnanoui -#define NULL_OR_EQUAL(self,other) (!(self) || (self) == (other)) - /datum/controller/subsystem/processing/nanoui // Subsystem stuff. name = "NanoUI" @@ -252,5 +250,3 @@ var/datum/controller/subsystem/processing/nanoui/SSnanoui "layout_default.css" = 'nano/css/layout_default.css', "shared.css" = 'nano/css/shared.css' ) - -#undef NULL_OR_EQUAL diff --git a/code/datums/looping_sounds/_looping_sound.dm b/code/datums/looping_sounds/_looping_sound.dm index a9439b1e4ed..473ff1ebd9d 100644 --- a/code/datums/looping_sounds/_looping_sound.dm +++ b/code/datums/looping_sounds/_looping_sound.dm @@ -15,27 +15,6 @@ direct (bool) If true plays directly to provided atoms instead of from them */ -//Timing subsystem -//Don't run if there is an identical unique timer active -//if the arguments to addtimer are the same as an existing timer, it doesn't create a new timer, and returns the id of the existing timer -#define TIMER_UNIQUE (1<<0) -//For unique timers: Replace the old timer rather then not start this one -#define TIMER_OVERRIDE (1<<1) -//Timing should be based on how timing progresses on clients, not the sever. -// tracking this is more expensive, -// should only be used in conjuction with things that have to progress client side, such as animate() or sound() -#define TIMER_CLIENT_TIME (1<<2) -//Timer can be stopped using deltimer() -#define TIMER_STOPPABLE (1<<3) -//To be used with TIMER_UNIQUE -//prevents distinguishing identical timers with the wait variable -#define TIMER_NO_HASH_WAIT (1<<4) -//Loops the timer repeatedly until qdeleted -//In most cases you want a subsystem instead -#define TIMER_LOOP (1<<5) - -#define TIMER_ID_NULL -1 - /datum/looping_sound var/list/atom/output_atoms var/mid_sounds diff --git a/code/datums/wires/vending.dm b/code/datums/wires/vending.dm index 204defb5b70..ea086ea5056 100644 --- a/code/datums/wires/vending.dm +++ b/code/datums/wires/vending.dm @@ -1,5 +1,3 @@ -#define CAT_HIDDEN 2 // Also in code/game/machinery/vending.dm - /datum/wires/vending holder_type = /obj/machinery/vending wire_count = 6 diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index 980e045710d..cedb29adb01 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -95,7 +95,7 @@ /datum/dna/gene/disability/stutter name="Stuttering" activation_message="You feel like forming words becomes increasingly difficult." - disability=STUTTER + disability=STUTTERING New() block=STUTTERBLOCK diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index fbd4a63a781..d7ee51846ad 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -1,7 +1,3 @@ -#define CAT_NORMAL 1 -#define CAT_HIDDEN 2 // also used in corresponding wires/vending.dm -#define CAT_COIN 4 - /** * Datum used to hold information about a product in a vending machine */ diff --git a/code/modules/alarm/alarm.dm b/code/modules/alarm/alarm.dm index ce7900da25a..5fa97c1cbe4 100644 --- a/code/modules/alarm/alarm.dm +++ b/code/modules/alarm/alarm.dm @@ -139,4 +139,4 @@ /mob/living/silicon/robot/syndicate/get_alarm_cameras() return list() -#undef ALARM_LOSS_DELAY +#undef ALARM_RESET_DELAY diff --git a/code/modules/client/preference_setup/general/01_basic.dm b/code/modules/client/preference_setup/general/01_basic.dm index b45f8d6c663..df0ecf2af93 100644 --- a/code/modules/client/preference_setup/general/01_basic.dm +++ b/code/modules/client/preference_setup/general/01_basic.dm @@ -162,7 +162,7 @@ return TOPIC_REFRESH else if(href_list["metadata"]) - var/new_metadata = sanitize(input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , pref.metadata)) as message|null + var/new_metadata = sanitize(input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , pref.metadata) as message|null) if(new_metadata && CanUseTopic(user)) pref.metadata = sanitize(new_metadata) return TOPIC_REFRESH diff --git a/code/modules/client/preference_setup/occupation/occupation.dm b/code/modules/client/preference_setup/occupation/occupation.dm index 3a79ccb38dd..9854b4b6202 100644 --- a/code/modules/client/preference_setup/occupation/occupation.dm +++ b/code/modules/client/preference_setup/occupation/occupation.dm @@ -1,7 +1,3 @@ -//used for pref.alternate_option -#define BE_ASSISTANT 0 -#define RETURN_TO_LOBBY 1 - /datum/category_item/player_setup_item/occupation name = "Occupation" sort_order = 1 diff --git a/code/modules/economy/Events.dm b/code/modules/economy/Events.dm index 4c0556cec1a..8f6bb244c77 100644 --- a/code/modules/economy/Events.dm +++ b/code/modules/economy/Events.dm @@ -26,16 +26,16 @@ if(INDUSTRIAL_ACCIDENT) dearer_goods = list(EMERGENCY, BIOMEDICAL, ROBOTICS) if(BIOHAZARD_OUTBREAK) - dearer_goods = list(BIOMEDICAL, GAS) + dearer_goods = list(BIOMEDICAL, GAS_EVENT) if(PIRATES) dearer_goods = list(SECURITY, MINERALS) if(CORPORATE_ATTACK) dearer_goods = list(SECURITY, MAINTENANCE) if(ALIEN_RAIDERS) dearer_goods = list(BIOMEDICAL, ANIMALS) - cheaper_goods = list(GAS, MINERALS) + cheaper_goods = list(GAS_EVENT, MINERALS) if(AI_LIBERATION) - dearer_goods = list(EMERGENCY, GAS, MAINTENANCE) + dearer_goods = list(EMERGENCY, GAS_EVENT, MAINTENANCE) if(MOURNING) cheaper_goods = list(MINERALS, MAINTENANCE) if(CULT_CELL_REVEALED) diff --git a/code/modules/economy/economy_misc.dm b/code/modules/economy/economy_misc.dm index 494307e3f98..ef6696f0731 100644 --- a/code/modules/economy/economy_misc.dm +++ b/code/modules/economy/economy_misc.dm @@ -38,7 +38,7 @@ #define MINERALS 8 #define EMERGENCY 9 -#define GAS 10 +#define GAS_EVENT 10 #define MAINTENANCE 11 #define ELECTRICAL 12 #define ROBOTICS 13 @@ -46,15 +46,6 @@ #define GEAR_EVA 15 -//---- The following corporations are friendly with NanoTrasen and loosely enable trade and travel: -//Corporation NanoTrasen - Generalised / high tech research and phoron exploitation. -//Corporation Vessel Contracting - Ship and station construction, materials research. -//Corporation Osiris Atmospherics - Atmospherics machinery construction and chemical research. -//Corporation Second Red Cross Society - 26th century Red Cross reborn as a dominating economic force in biomedical science (research and materials). -//Corporation Blue Industries - High tech and high energy research, in particular into the mysteries of bluespace manipulation and power generation. -//Corporation Kusanagi Robotics - Founded by robotics legend Kaito Kusanagi in the 2070s, they have been on the forefront of mechanical augmentation and robotics development ever since. -//Corporation Free traders - Not so much a corporation as a loose coalition of spacers, Free Traders are a roving band of smugglers, traders and fringe elements following a rigid (if informal) code of loyalty and honour. Mistrusted by most corporations, they are tolerated because of their uncanny ability to smell out a profit. - //---- Descriptions of destination types //Space stations can be purpose built for a number of different things, but generally require regular shipments of essential supplies. //Corvettes are small, fast warships generally assigned to border patrol or chasing down smugglers. diff --git a/code/modules/martial_arts/skrell.dm b/code/modules/martial_arts/skrell.dm index 6b26ed8ed40..36c4091d83d 100644 --- a/code/modules/martial_arts/skrell.dm +++ b/code/modules/martial_arts/skrell.dm @@ -1,5 +1,5 @@ #define PAINFUL_PALM "DDH" -#define LEG_SWEEP "DHD" +#define SKRELL_LEG_SWEEP "DHD" #define DISLOCATING_STRIKE "HDDD" /datum/martial_art/karak_virul @@ -7,15 +7,15 @@ help_verb = /datum/martial_art/karak_virul/proc/karak_virul_help /datum/martial_art/karak_virul/proc/check_streak(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D) - if(findtext(streak,PAINFUL_PALM)) + if(findtext(streak, PAINFUL_PALM)) streak = "" painful_palm(A,D) return 1 - if(findtext(streak,LEG_SWEEP)) + if(findtext(streak, SKRELL_LEG_SWEEP)) streak = "" leg_sweep(A,D) return 1 - if(findtext(streak,DISLOCATING_STRIKE)) + if(findtext(streak, DISLOCATING_STRIKE)) streak = "" dislocating_strike(A,D) return 1 diff --git a/code/modules/mob/abstract/new_player/character_traits.dm b/code/modules/mob/abstract/new_player/character_traits.dm index e7d2cc5a755..c2f30f1695f 100644 --- a/code/modules/mob/abstract/new_player/character_traits.dm +++ b/code/modules/mob/abstract/new_player/character_traits.dm @@ -19,7 +19,7 @@ desc = "You have a chronic case of stuttering, repeating sounds involuntarily." /datum/character_disabilities/stutter/apply_self(var/mob/living/carbon/human/H) - H.disabilities |= STUTTER + H.disabilities |= STUTTERING /datum/character_disabilities/deuteranomaly name = "Deuteranopia" diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 660c8394a1c..dfe1b44bfca 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -218,7 +218,7 @@ pixel_x = old_x pixel_y = old_y return - if (disabilities & STUTTER) + if (disabilities & STUTTERING) speech_problem_flag = 1 if (prob(10)) stuttering = max(10, stuttering)