Fix indentations (#17481)

* cbt

* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* fsadffsda sad

* sadfasd

* jhn

* dsfa

* saf

* safsad

* sda
This commit is contained in:
Fluffy
2023-10-05 12:15:58 +02:00
committed by GitHub
parent 032853824d
commit 4538e2a7cc
471 changed files with 2670 additions and 2597 deletions
+1 -1
View File
@@ -1 +1 @@
#define DEFAULT_MAP "sccv_horizon"
#define DEFAULT_MAP "sccv_horizon"
+1 -1
View File
@@ -15,7 +15,7 @@ Class Vars:
zoneB - The archived zone of B. May be null in case of unsimulated connections.
edge - Stores the edge this connection is in. Can reference an edge that is no longer processed
after this connection is removed, so make sure to check edge.coefficient > 0 before re-adding it.
after this connection is removed, so make sure to check edge.coefficient > 0 before re-adding it.
Class Procs:
+1 -1
View File
@@ -20,7 +20,7 @@ Class Vars:
B - This holds the second zone with which the first zone equalizes.
direct - This counts the number of direct (i.e. with no doors) connections on this edge.
Any value of this is sufficient to make the zones mergeable.
Any value of this is sufficient to make the zones mergeable.
connection_edge/unsimulated
+1 -1
View File
@@ -8,4 +8,4 @@
#define ACCESSORY_SLOT_ARM_GUARDS "arm guards"
#define ACCESSORY_SLOT_ARMOR_PIN "armor pin"
#define ACCESSORY_SLOT_ARMOR_POCKETS "armor pockets"
#define ACCESSORY_SLOT_HEAD "head"
#define ACCESSORY_SLOT_HEAD "head"
+1 -1
View File
@@ -2,4 +2,4 @@
#define VAMPIRE_MAX_USABLE_BLOOD 950
// Zombie
#define ZOMBIE_MAX_TRIOXIN 30
#define ZOMBIE_MAX_TRIOXIN 30
+1 -1
View File
@@ -80,4 +80,4 @@
#define BATTLE_MONSTERS_POWER_GREATER 1200
#define BATTLE_MONSTERS_POWER_GRAND 1400
#define BATTLE_MONSTERS_POWER_UPGRADE 200
#define BATTLE_MONSTERS_POWER_UPGRADE 200
+4 -3
View File
@@ -11,10 +11,11 @@
// /datum/element flags
/// Causes the detach proc to be called when the host object is being deleted
#define ELEMENT_DETACH (1 << 0)
/**
* Only elements created with the same arguments given after `id_arg_index` share an element instance
* The arguments are the same when the text and number values are the same and all other values have the same ref
*/
* Only elements created with the same arguments given after `id_arg_index` share an element instance
* The arguments are the same when the text and number values are the same and all other values have the same ref
*/
#define ELEMENT_BESPOKE (1 << 1)
// How multiple components of the exact same type are handled in the same datum
+11 -4
View File
@@ -1,4 +1,11 @@
#define NO_EMPTY_ICON 1 //does NOT have an iconstate_empty icon. If adding empty icons for a drink, make sure it does not have this flag
#define UNIQUE_EMPTY_ICON 2 //Uses the empty_icon_state listed. Should really only be used when one trash state applies to multiple drinks. Remove if one is added
#define UNIQUE_EMPTY_ICON_FILE 4 //Uses the empty_icon_state listed. also doesn't change its icon file, giving it a pseudo contained sprite status
#define IS_GLASS 8 //Container is glass. Affects shattering, unacidable, etc.
///Does NOT have an iconstate_empty icon. If adding empty icons for a drink, make sure it does not have this flag
#define NO_EMPTY_ICON 1
///Uses the empty_icon_state listed. Should really only be used when one trash state applies to multiple drinks. Remove if one is added
#define UNIQUE_EMPTY_ICON 2
///Uses the empty_icon_state listed. also doesn't change its icon file, giving it a pseudo contained sprite status
#define UNIQUE_EMPTY_ICON_FILE 4
///Container is glass. Affects shattering, unacidable, etc.
#define IS_GLASS 8
+1 -1
View File
@@ -11,4 +11,4 @@
dview_mob.loc = center; \
dview_mob.see_invisible = invis_flags; \
output = view(range, dview_mob); \
dview_mob.loc = null;
dview_mob.loc = null;
+1 -1
View File
@@ -18,4 +18,4 @@
#define RFD_FLOORS_AND_WALL 1
#define RFD_WINDOW_AND_FRAME 2
#define RFD_AIRLOCK 3
#define RFD_DECONSTRUCT 4
#define RFD_DECONSTRUCT 4
+1 -1
View File
@@ -66,4 +66,4 @@
#define TRAIT_IMMUTABLE 38
#define TRAIT_FLESH_COLOUR 39
#define TRAIT_SPOROUS 40
#define TRAIT_BIOLUM_PWR 41
#define TRAIT_BIOLUM_PWR 41
+1 -1
View File
@@ -38,4 +38,4 @@
#define WRISTS_LAYER 37
#define FIRE_LAYER_UPPER 38
#define TOTAL_LAYERS 38
////////////////////////////
////////////////////////////
+1 -1
View File
@@ -38,4 +38,4 @@
#define ZENG_ROLES list(SCIENCE_ROLES, MEDICAL_ROLES, CIVILIAN_ROLES, REPRESENTATIVE_ROLE)
#define HEPH_ROLES list(OPERATIONS_ROLES, ENGINEERING_ROLES, CIVILIAN_ROLES, REPRESENTATIVE_ROLE)
#define ORION_ROLES list(OPERATIONS_ROLES, CIVILIAN_ROLES, REPRESENTATIVE_ROLE)
#define INDEP_ROLES list(NON_CREW_CIVILIAN_ROLES, CONSULAR_ROLE, JOURNALIST_ROLE, CHAPLAIN_ROLE, OFF_DUTY_CREW_MEMBER_ROLE)
#define INDEP_ROLES list(NON_CREW_CIVILIAN_ROLES, CONSULAR_ROLE, JOURNALIST_ROLE, CHAPLAIN_ROLE, OFF_DUTY_CREW_MEMBER_ROLE)
+6 -2
View File
@@ -2,8 +2,12 @@
#define MEGAWATTS *1000000
#define GIGAWATTS *1000000000
#define CELLRATE 0.002 // Multiplier for watts per tick <> cell storage (e.g., 0.02 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
// It's a conversion constant. power_used*CELLRATE = charge_provided, or charge_used/CELLRATE = power_provided
/**
* Multiplier for watts per tick <> cell storage (e.g., 0.02 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
*
* It's a conversion constant. power_used*CELLRATE = charge_provided, or charge_used/CELLRATE = power_provided
*/
#define CELLRATE 0.002
// Doors!
#define DOOR_CRUSH_DAMAGE 20
+8 -8
View File
@@ -281,10 +281,10 @@
//supposedly the fastest way to do this according to https://gist.github.com/Giacom/be635398926bb463b42a
#define RANGE_TURFS(RADIUS, CENTER) \
block( \
locate(max(CENTER.x-(RADIUS),1), max(CENTER.y-(RADIUS),1), CENTER.z), \
locate(min(CENTER.x+(RADIUS),world.maxx), min(CENTER.y+(RADIUS),world.maxy), CENTER.z) \
)
block( \
locate(max(CENTER.x-(RADIUS),1), max(CENTER.y-(RADIUS),1), CENTER.z), \
locate(min(CENTER.x+(RADIUS),world.maxx), min(CENTER.y+(RADIUS),world.maxy), CENTER.z) \
)
#define get_turf(A) (get_step(A, 0))
#define NORTH_OF_TURF(T) locate(T.x, T.y + 1, T.z)
@@ -391,10 +391,10 @@
/*
Define for getting a bitfield of adjacent turfs that meet a condition.
ORIGIN is the object to step from, VAR is the var to write the bitfield to
TVAR is the temporary turf variable to use, FUNC is the condition to check.
FUNC generally should reference TVAR.
example:
ORIGIN is the object to step from, VAR is the var to write the bitfield to
TVAR is the temporary turf variable to use, FUNC is the condition to check.
FUNC generally should reference TVAR.
example:
var/turf/T
var/result = 0
CALCULATE_NEIGHBORS(src, result, T, isopenturf(T))
+1 -1
View File
@@ -8,4 +8,4 @@
#define islasercapacitor(A) istype(A, /obj/item/laser_components/capacitor)
#define ismodifier(A) istype(A, /obj/item/laser_components/modifier)
#define ismodulator(A) istype(A, /obj/item/laser_components/modulator)
#define isfocusinglens(A) istype(A, /obj/item/laser_components/focusing_lens)
#define isfocusinglens(A) istype(A, /obj/item/laser_components/focusing_lens)
+1 -1
View File
@@ -31,6 +31,6 @@
#define ROF_INTERMEDIATE 4
#define ROF_RIFLE 5
#define ROF_HEAVY 8
#define ROF_SUPERHEAVY 12
#define ROF_SUPERHEAVY 12
#define ROF_UNWIELDY 16
#define ROF_SPECIAL 40
+1 -1
View File
@@ -17,4 +17,4 @@
#define MECHFAB 0x4 //Mechfab
#define CHASSIS 0x8 //For protolathe, but differently
#define MAX_TECH_LEVEL 15
#define MAX_TECH_LEVEL 15
+1 -1
View File
@@ -1,4 +1,4 @@
#define TARGET_CAN_MOVE 1
#define TARGET_CAN_RUN 2
#define TARGET_CAN_CLICK 4
#define TARGET_CAN_RADIO 8
#define TARGET_CAN_RADIO 8
+14 -14
View File
@@ -122,22 +122,22 @@
//REQUIRED HOOKS
/**
* Call this somewhere in [/world/proc/New] that is always run. This function may sleep!
*
* * event_handler - Optional user defined [/datum/tgs_event_handler].
* * minimum_required_security_level: The minimum required security level to run the game in which the DMAPI is integrated. Can be one of [TGS_SECURITY_ULTRASAFE], [TGS_SECURITY_SAFE], or [TGS_SECURITY_TRUSTED].
*/
* Call this somewhere in [/world/proc/New] that is always run. This function may sleep!
*
* * event_handler - Optional user defined [/datum/tgs_event_handler].
* * minimum_required_security_level: The minimum required security level to run the game in which the DMAPI is integrated. Can be one of [TGS_SECURITY_ULTRASAFE], [TGS_SECURITY_SAFE], or [TGS_SECURITY_TRUSTED].
*/
/world/proc/TgsNew(datum/tgs_event_handler/event_handler, minimum_required_security_level = TGS_SECURITY_ULTRASAFE)
return
/**
* Call this when your initializations are complete and your game is ready to play before any player interactions happen.
*
* This may use [/world/var/sleep_offline] to make this happen so ensure no changes are made to it while this call is running.
* Afterwards, consider explicitly setting it to what you want to avoid this BYOND bug: http://www.byond.com/forum/post/2575184
* Before this point, note that any static files or directories may be in use by another server. Your code should account for this.
* This function should not be called before ..() in [/world/proc/New].
*/
* Call this when your initializations are complete and your game is ready to play before any player interactions happen.
*
* This may use [/world/var/sleep_offline] to make this happen so ensure no changes are made to it while this call is running.
* Afterwards, consider explicitly setting it to what you want to avoid this BYOND bug: http://www.byond.com/forum/post/2575184
* Before this point, note that any static files or directories may be in use by another server. Your code should account for this.
* This function should not be called before ..() in [/world/proc/New].
*/
/world/proc/TgsInitializationComplete()
return
@@ -145,8 +145,8 @@
#define TGS_TOPIC var/tgs_topic_return = TgsTopic(args[1]); if(tgs_topic_return) return tgs_topic_return
/**
* Call this at the beginning of [world/proc/Reboot].
*/
* Call this at the beginning of [world/proc/Reboot].
*/
/world/proc/TgsReboot()
return
+1 -1
View File
@@ -16,7 +16,7 @@
#ifndef PRELOAD_RSC //set to:
#define PRELOAD_RSC 2 // 0 to allow using external resources or on-demand behaviour;
#endif // 1 to use the default behaviour;
// 2 for preloading absolutely everything;
// 2 for preloading absolutely everything;
//#define TESTING // Creates debug feedback messages and enables many optional testing procs/checks
#ifdef TESTING
+1 -1
View File
@@ -38,4 +38,4 @@ var/string_filename_current_key
if(fexists("strings/[filename]"))
string_cache[filename] = json_load("strings/[filename]")
else
CRASH("file not found: strings/[filename]")
CRASH("file not found: strings/[filename]")
+1 -1
View File
@@ -25,4 +25,4 @@
return contents.len
/Queue/proc/as_list()
return contents
return contents
+1 -1
View File
@@ -114,7 +114,7 @@
var/dest_y
/datum/projectile_data/New(var/src_x, var/src_y, var/time, var/distance, \
var/power_x, var/power_y, var/dest_x, var/dest_y)
var/power_x, var/power_y, var/dest_x, var/dest_y)
src.src_x = src_x
src.src_y = src_y
src.time = time
+58 -58
View File
@@ -18,57 +18,57 @@ remember you first need to setup an /icon var like so:
var/icon/my_icon = new('iconfile.dmi')
icon/ChangeOpacity(amount = 1)
A very common operation in DM is to try to make an icon more or less transparent. Making an icon more
transparent is usually much easier than making it less so, however. This proc basically is a frontend
for MapColors() which can change opacity any way you like, in much the same way that SetIntensity()
can make an icon lighter or darker. If amount is 0.5, the opacity of the icon will be cut in half.
If amount is 2, opacity is doubled and anything more than half-opaque will become fully opaque.
A very common operation in DM is to try to make an icon more or less transparent. Making an icon more
transparent is usually much easier than making it less so, however. This proc basically is a frontend
for MapColors() which can change opacity any way you like, in much the same way that SetIntensity()
can make an icon lighter or darker. If amount is 0.5, the opacity of the icon will be cut in half.
If amount is 2, opacity is doubled and anything more than half-opaque will become fully opaque.
icon/GrayScale()
Converts the icon to grayscale instead of a fully colored icon. Alpha values are left intact.
Converts the icon to grayscale instead of a fully colored icon. Alpha values are left intact.
icon/ColorTone(tone)
Similar to GrayScale(), this proc converts the icon to a range of black -> tone -> white, where tone is an
RGB color (its alpha is ignored). This can be used to create a sepia tone or similar effect.
See also the global ColorTone() proc.
Similar to GrayScale(), this proc converts the icon to a range of black -> tone -> white, where tone is an
RGB color (its alpha is ignored). This can be used to create a sepia tone or similar effect.
See also the global ColorTone() proc.
icon/MinColors(icon)
The icon is blended with a second icon where the minimum of each RGB pixel is the result.
Transparency may increase, as if the icons were blended with ICON_ADD. You may supply a color in place of an icon.
The icon is blended with a second icon where the minimum of each RGB pixel is the result.
Transparency may increase, as if the icons were blended with ICON_ADD. You may supply a color in place of an icon.
icon/MaxColors(icon)
The icon is blended with a second icon where the maximum of each RGB pixel is the result.
Opacity may increase, as if the icons were blended with ICON_OR. You may supply a color in place of an icon.
The icon is blended with a second icon where the maximum of each RGB pixel is the result.
Opacity may increase, as if the icons were blended with ICON_OR. You may supply a color in place of an icon.
icon/Opaque(background = "#000000")
All alpha values are set to 255 throughout the icon. Transparent pixels become black, or whatever background color you specify.
All alpha values are set to 255 throughout the icon. Transparent pixels become black, or whatever background color you specify.
icon/BecomeAlphaMask()
You can convert a simple grayscale icon into an alpha mask to use with other icons very easily with this proc.
The black parts become transparent, the white parts stay white, and anything in between becomes a translucent shade of white.
You can convert a simple grayscale icon into an alpha mask to use with other icons very easily with this proc.
The black parts become transparent, the white parts stay white, and anything in between becomes a translucent shade of white.
icon/AddAlphaMask(mask)
The alpha values of the mask icon will be blended with the current icon. Anywhere the mask is opaque,
the current icon is untouched. Anywhere the mask is transparent, the current icon becomes transparent.
Where the mask is translucent, the current icon becomes more transparent.
The alpha values of the mask icon will be blended with the current icon. Anywhere the mask is opaque,
the current icon is untouched. Anywhere the mask is transparent, the current icon becomes transparent.
Where the mask is translucent, the current icon becomes more transparent.
icon/UseAlphaMask(mask, mode)
Sometimes you may want to take the alpha values from one icon and use them on a different icon.
This proc will do that. Just supply the icon whose alpha mask you want to use, and src will change
so it has the same colors as before but uses the mask for opacity.
Sometimes you may want to take the alpha values from one icon and use them on a different icon.
This proc will do that. Just supply the icon whose alpha mask you want to use, and src will change
so it has the same colors as before but uses the mask for opacity.
COLOR MANAGEMENT AND HSV
RGB isn't the only way to represent color. Sometimes it's more useful to work with a model called HSV, which stands for hue, saturation, and value.
* The hue of a color describes where it is along the color wheel. It goes from red to yellow to green to
cyan to blue to magenta and back to red.
* The saturation of a color is how much color is in it. A color with low saturation will be more gray,
and with no saturation at all it is a shade of gray.
* The value of a color determines how bright it is. A high-value color is vivid, moderate value is dark,
and no value at all is black.
* The hue of a color describes where it is along the color wheel. It goes from red to yellow to green to
cyan to blue to magenta and back to red.
* The saturation of a color is how much color is in it. A color with low saturation will be more gray,
and with no saturation at all it is a shade of gray.
* The value of a color determines how bright it is. A high-value color is vivid, moderate value is dark,
and no value at all is black.
Just as BYOND uses "#rrggbb" to represent RGB values, a similar format is used for HSV: "#hhhssvv". The hue is three
hex digits because it ranges from 0 to 0x5FF.
* 0 to 0xFF - red to yellow
* 0x100 to 0x1FF - yellow to green
* 0x200 to 0x2FF - green to cyan
* 0x300 to 0x3FF - cyan to blue
* 0x400 to 0x4FF - blue to magenta
* 0x500 to 0x5FF - magenta to red
* 0 to 0xFF - red to yellow
* 0x100 to 0x1FF - yellow to green
* 0x200 to 0x2FF - green to cyan
* 0x300 to 0x3FF - cyan to blue
* 0x400 to 0x4FF - blue to magenta
* 0x500 to 0x5FF - magenta to red
Knowing this, you can figure out that red is "#000ffff" in HSV format, which is hue 0 (red), saturation 255 (as colorful as possible),
value 255 (as bright as possible). Green is "#200ffff" and blue is "#400ffff".
@@ -78,42 +78,42 @@ More than one HSV color can match the same RGB color.
Here are some procs you can use for color management:
ReadRGB(rgb)
Takes an RGB string like "#ffaa55" and converts it to a list such as list(255,170,85). If an RGBA format is used
that includes alpha, the list will have a fourth item for the alpha value.
Takes an RGB string like "#ffaa55" and converts it to a list such as list(255,170,85). If an RGBA format is used
that includes alpha, the list will have a fourth item for the alpha value.
hsv(hue, sat, val, apha)
Counterpart to rgb(), this takes the values you input and converts them to a string in "#hhhssvv" or "#hhhssvvaa"
format. Alpha is not included in the result if null.
Counterpart to rgb(), this takes the values you input and converts them to a string in "#hhhssvv" or "#hhhssvvaa"
format. Alpha is not included in the result if null.
ReadHSV(rgb)
Takes an HSV string like "#100FF80" and converts it to a list such as list(256,255,128). If an HSVA format is used that
includes alpha, the list will have a fourth item for the alpha value.
Takes an HSV string like "#100FF80" and converts it to a list such as list(256,255,128). If an HSVA format is used that
includes alpha, the list will have a fourth item for the alpha value.
RGBtoHSV(rgb)
Takes an RGB or RGBA string like "#ffaa55" and converts it into an HSV or HSVA color such as "#080aaff".
Takes an RGB or RGBA string like "#ffaa55" and converts it into an HSV or HSVA color such as "#080aaff".
HSVtoRGB(hsv)
Takes an HSV or HSVA string like "#080aaff" and converts it into an RGB or RGBA color such as "#ff55aa".
Takes an HSV or HSVA string like "#080aaff" and converts it into an RGB or RGBA color such as "#ff55aa".
BlendRGB(rgb1, rgb2, amount)
Blends between two RGB or RGBA colors using regular RGB blending. If amount is 0, the first color is the result;
if 1, the second color is the result. 0.5 produces an average of the two. Values outside the 0 to 1 range are allowed as well.
The returned value is an RGB or RGBA color.
Blends between two RGB or RGBA colors using regular RGB blending. If amount is 0, the first color is the result;
if 1, the second color is the result. 0.5 produces an average of the two. Values outside the 0 to 1 range are allowed as well.
The returned value is an RGB or RGBA color.
BlendHSV(hsv1, hsv2, amount)
Blends between two HSV or HSVA colors using HSV blending, which tends to produce nicer results than regular RGB
blending because the brightness of the color is left intact. If amount is 0, the first color is the result; if 1,
the second color is the result. 0.5 produces an average of the two. Values outside the 0 to 1 range are allowed as well.
The returned value is an HSV or HSVA color.
Blends between two HSV or HSVA colors using HSV blending, which tends to produce nicer results than regular RGB
blending because the brightness of the color is left intact. If amount is 0, the first color is the result; if 1,
the second color is the result. 0.5 produces an average of the two. Values outside the 0 to 1 range are allowed as well.
The returned value is an HSV or HSVA color.
BlendRGBasHSV(rgb1, rgb2, amount)
Like BlendHSV(), but the colors used and the return value are RGB or RGBA colors. The blending is done in HSV form.
Like BlendHSV(), but the colors used and the return value are RGB or RGBA colors. The blending is done in HSV form.
HueToAngle(hue)
Converts a hue to an angle range of 0 to 360. Angle 0 is red, 120 is green, and 240 is blue.
Converts a hue to an angle range of 0 to 360. Angle 0 is red, 120 is green, and 240 is blue.
AngleToHue(hue)
Converts an angle to a hue in the valid range.
Converts an angle to a hue in the valid range.
RotateHue(hsv, angle)
Takes an HSV or HSVA value and rotates the hue forward through red, green, and blue by an angle from 0 to 360.
(Rotating red by 60 produces yellow.) The result is another HSV or HSVA color with the same saturation and value
as the original, but a different hue.
Takes an HSV or HSVA value and rotates the hue forward through red, green, and blue by an angle from 0 to 360.
(Rotating red by 60 produces yellow.) The result is another HSV or HSVA color with the same saturation and value
as the original, but a different hue.
GrayScale(rgb)
Takes an RGB or RGBA color and converts it to grayscale. Returns an RGB or RGBA string.
Takes an RGB or RGBA color and converts it to grayscale. Returns an RGB or RGBA string.
ColorTone(rgb, tone)
Similar to GrayScale(), this proc converts an RGB or RGBA color to a range of black -> tone -> white instead of
using strict shades of gray. The tone value is an RGB color; any alpha value is ignored.
Similar to GrayScale(), this proc converts an RGB or RGBA color to a range of black -> tone -> white instead of
using strict shades of gray. The tone value is an RGB color; any alpha value is ignored.
*/
/*
+1 -1
View File
@@ -13,4 +13,4 @@
testing("X: [.["icon-x"]], Y: [.["icon-y"]]")
#endif
return list("icon-x" = Clamp(text2num(.["icon-x"]), 0, lim_x),
"icon-y" = Clamp(text2num(.["icon-y"]), 0, lim_y))
"icon-y" = Clamp(text2num(.["icon-y"]), 0, lim_y))
+4 -5
View File
@@ -85,11 +85,10 @@
#define SYMBOLS_DETECTED_NEW_WORD 5 // symbols that we will interpret as the start of a new word
/**
* Filters out undesirable characters from names.
*
* * allow_numbers - allows numbers and common special characters - used for silicon/other weird things names
*/
* Filters out undesirable characters from names.
*
* * allow_numbers - allows numbers and common special characters - used for silicon/other weird things names
*/
/proc/sanitizeName(input, max_length = MAX_NAME_LEN, allow_numbers = TRUE)
if(!input)
return //Rejects the input if it is null
+31 -27
View File
@@ -263,7 +263,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
#undef LOCATE_COORDS
//Returns whether or not a player is a guest using their ckey as an input
///Returns whether or not a player is a guest using their ckey as an input
/proc/IsGuestKey(key)
if (findtext(key, "Guest-", 1, 7) != 1) //was findtextEx
return 0
@@ -279,7 +279,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
return 0
return 1
//Ensure the frequency is within bounds of what it should be sending/recieving at
///Ensure the frequency is within bounds of what it should be sending/recieving at
/proc/sanitize_frequency(var/f, var/low = PUBLIC_LOW_FREQ, var/high = PUBLIC_HIGH_FREQ)
f = round(f)
f = max(low, f)
@@ -288,15 +288,15 @@ Turf and target are seperate in case you want to teleport some distance from a t
f += 1
return f
//Turns 1479 into 147.9
///Turns 1479 into 147.9
/proc/format_frequency(var/f)
return "[round(f / 10)].[f % 10]"
//Picks a string of symbols to display as the law number for hacked or ion laws
///Picks a string of symbols to display as the law number for hacked or ion laws
/proc/ionnum()
return "[pick("1","2","3","4","5","6","7","8","9","0")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")]"
//When an AI is activated, it can choose from a list of non-slaved borgs to have as a slave.
///When an AI is activated, it can choose from a list of non-slaved borgs to have as a slave.
/proc/freeborg()
var/select = null
var/list/borgs = list()
@@ -310,7 +310,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
select = input("Unshackled borg signals detected:", "Borg selection", null, null) as null|anything in borgs
return borgs[select]
//When a borg is activated, it can choose which AI it wants to be slaved to
///When a borg is activated, it can choose which AI it wants to be slaved to
/proc/active_ais()
. = list()
for(var/mob/living/silicon/ai/A in living_mob_list)
@@ -321,7 +321,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
. += A
return .
//Find an active ai with the least borgs. VERBOSE PROCNAME HUH!
///Find an active ai with the least borgs. VERBOSE PROCNAME HUH!
/proc/select_active_ai_with_fewest_borgs()
var/mob/living/silicon/ai/selected
var/list/active = active_ais()
@@ -366,7 +366,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
new_list += Dead_list
return new_list
//Returns a list of all mobs with their name
///Returns a list of all mobs with their name
/proc/getmobs()
var/list/mobs = sortmobs()
@@ -392,7 +392,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
return creatures
//Orders mobs by type then by name
///Orders mobs by type then by name
/proc/sortmobs()
var/list/moblist = list()
var/list/sortmob = sortAtom(mob_list)
@@ -424,15 +424,17 @@ Turf and target are seperate in case you want to teleport some distance from a t
// mob_list.Add(M)
return moblist
//Forces a variable to be posative
///Forces a variable to be posative
/proc/modulus(var/M)
if(M >= 0)
return M
if(M < 0)
return -M
// returns the turf located at the map edge in the specified direction relative to A
// used for mass driver
/**
* Returns the turf located at the map edge in the specified direction relative to A
* used for mass driver
*/
/proc/get_edge_target_turf(var/atom/A, var/direction)
var/turf/target = locate(A.x, A.y, A.z)
@@ -453,10 +455,12 @@ Turf and target are seperate in case you want to teleport some distance from a t
return target
// returns turf relative to A in given direction at set range
// result is bounded to map size
// note range is non-pythagorean
// used for disposal system
/**
* returns turf relative to A in given direction at set range
* result is bounded to map size
* note range is non-pythagorean
* used for disposal system
*/
/proc/get_ranged_target_turf(var/atom/A, var/direction, var/range)
var/x = A.x
@@ -480,25 +484,25 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/y = min(world.maxy, max(1, A.y + dy))
return locate(x,y,A.z)
//Makes sure MIDDLE is between LOW and HIGH. If not, it adjusts it. Returns the adjusted value.
///Makes sure MIDDLE is between LOW and HIGH. If not, it adjusts it. Returns the adjusted value.
/proc/between(var/low, var/middle, var/high)
return max(min(middle, high), low)
//returns random gauss number
///Returns random gauss number
/proc/GaussRand(var/sigma)
var/x,y,rsq
do
x=2*rand()-1
y=2*rand()-1
rsq=x*x+y*y
while(rsq>1 || !rsq)
return sigma*y*sqrt(-2*log(rsq)/rsq)
var/x,y,rsq
do
x=2*rand()-1
y=2*rand()-1
rsq=x*x+y*y
while(rsq>1 || !rsq)
return sigma*y*sqrt(-2*log(rsq)/rsq)
//returns random gauss number, rounded to 'roundto'
///Returns random gauss number, rounded to 'roundto'
/proc/GaussRandRound(var/sigma,var/roundto)
return round(GaussRand(sigma),roundto)
//Step-towards method of determining whether one atom can see another. Similar to viewers()
///Step-towards method of determining whether one atom can see another. Similar to viewers()
/proc/can_see(var/atom/source, var/atom/target, var/length=5) // I couldn't be arsed to do actual raycasting :I This is horribly inaccurate.
var/turf/current = get_turf(source)
var/turf/target_turf = get_turf(target)
+2 -2
View File
@@ -13,6 +13,6 @@
INVOKE_ASYNC(over, TYPE_PROC_REF(/atom, MouseDrop_T), src, usr, src_location, over_location, src_control, over_control, params)
// receive a mousedrop
///Receive a mousedrop
/atom/proc/MouseDrop_T(atom/dropping, mob/user, src_location, over_location, src_control, over_control, params)
return
return
+1 -1
View File
@@ -10,4 +10,4 @@
var/mob/living/simple_animal/borer/B = mymob
B.chem_hud = C
mymob.client.screen += src.adding
mymob.client.screen += src.adding
+1 -1
View File
@@ -12,4 +12,4 @@
resist.layer = SCREEN_LAYER
adding += resist
mymob.client.screen += src.adding
mymob.client.screen += src.adding
+1 -1
View File
@@ -27,4 +27,4 @@
hotkeybuttons += resist
mymob.client.screen = null
mymob.client.screen += list(mov_intent, mymob.healths, mymob.zone_sel, resist)
mymob.client.screen += list(mov_intent, mymob.healths, mymob.zone_sel, resist)
@@ -11,4 +11,4 @@
/obj/screen/borer/chemicals/Click(var/location, var/control, var/params)
if(istype(usr, /mob/living/simple_animal/borer))
var/mob/living/simple_animal/borer/B = usr
to_chat(usr, SPAN_NOTICE("You have [B.chemicals]u of chemicals to use for your abilities."))
to_chat(usr, SPAN_NOTICE("You have [B.chemicals]u of chemicals to use for your abilities."))
@@ -33,4 +33,4 @@
/obj/screen/vampire/suck/Click(var/location, var/control, var/params)
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
H.vampire_drain_blood()
H.vampire_drain_blood()
+12 -12
View File
@@ -1,17 +1,17 @@
// Generic damage proc (slimes and monkeys).
///Generic damage proc (slimes and monkeys).
/atom/proc/attack_generic(mob/user as mob)
return 0
// generic click on for pai
///Generic click on for pai
/atom/proc/attack_pai(mob/user)
return
/*
Humans:
Adds an exception for gloves, to allow special glove types like the ninja ones.
Otherwise pretty standard.
*/
/**
* Humans:
* Adds an exception for gloves, to allow special glove types like the ninja ones.
*
* Otherwise pretty standard.
*/
/mob/living/carbon/human/UnarmedAttack(var/atom/A, var/proximity)
if(!..())
@@ -24,7 +24,7 @@
var/obj/item/clothing/glasses/GS = glasses
if(istype(G) && G.Touch(A,src,1))
return
else if(istype(GS) && GS.Look(A,src,1)) // for goggles
return
@@ -45,10 +45,10 @@
/mob/living/carbon/human/RangedAttack(var/atom/A)
var/obj/item/clothing/gloves/GV = gloves
var/obj/item/clothing/glasses/GS = glasses
if(istype(GS) && GS.Look(A,src,0)) // for goggles
return
if(istype(GV) && GV.Touch(A,src,0)) // for magic gloves
return
@@ -175,4 +175,4 @@
/mob/living/CtrlClickOn(var/atom/A)
. = ..()
if(!. && a_intent == I_GRAB && length(available_maneuvers))
. = perform_maneuver(prepared_maneuver || available_maneuvers[1], A)
. = perform_maneuver(prepared_maneuver || available_maneuvers[1], A)
+5 -6
View File
@@ -1,13 +1,12 @@
/**
* Failsafe
*
* Pretty much pokes the MC to make sure it's still alive.
**/
#define FAILSAFE_MSG(msg) admin_notice("<big><em><span class='warning'>FAILSAFE: </span><font color='#ff8800'>[msg]</font></em></big>", R_DEBUG|R_ADMIN|R_DEV)
var/datum/controller/failsafe/Failsafe
/**
* #Failsafe Controller
*
* Pretty much pokes the MC to make sure it's still alive.
*/
/datum/controller/failsafe // This thing pretty much just keeps poking the master controller
name = "Failsafe"
+7 -8
View File
@@ -1,17 +1,16 @@
/**
* StonedMC
*
* Designed to properly split up a given tick among subsystems
* Note: if you read parts of this code and think "why is it doing it that way"
* Odds are, there is a reason
*
**/
var/datum/controller/master/Master = new()
//current tick limit, assigned by the queue controller before running a subsystem.
//used by check_tick as well so that the procs subsystems call can obey that SS's tick limits
var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
/**
* StonedMC
*
* Designed to properly split up a given tick among subsystems
* Note: if you read parts of this code and think "why is it doing it that way"
* Odds are, there is a reason
*/
/datum/controller/master
name = "Master"
+2 -1
View File
@@ -35,7 +35,8 @@ SUBSYSTEM_DEF(economy)
/**
* Account Creation
*/
//Create the station Account
///Create the station Account
/datum/controller/subsystem/economy/proc/create_station_account()
if(station_account)
return FALSE
@@ -7,4 +7,4 @@
var/abandon_ship = FALSE
/datum/evacuation_option/proc/execute(var/mob/user)
return
return
@@ -181,4 +181,4 @@
#undef EVAC_OPT_ABANDON_SHIP
#undef EVAC_OPT_BLUESPACE_JUMP
#undef EVAC_OPT_CANCEL_ABANDON_SHIP
#undef EVAC_OPT_CANCEL_BLUESPACE_JUMP
#undef EVAC_OPT_CANCEL_BLUESPACE_JUMP
@@ -155,4 +155,4 @@
cancel_call_proc(user)
#undef EVAC_OPT_CALL_SHUTTLE
#undef EVAC_OPT_RECALL_SHUTTLE
#undef EVAC_OPT_RECALL_SHUTTLE
@@ -8,18 +8,20 @@ PROCESSING_SUBSYSTEM_DEF(nanoui)
// NanoUI stuff.
var/list/open_uis = list()
/**
* Get an open /nanoui ui for the current user, src_object and ui_key and try to update it with data
*
* @param user /mob The mob who opened/owns the ui
* @param src_object /obj|/mob The obj or mob which the ui belongs to
* @param ui_key string A string key used for the ui
* @param ui /datum/nanoui An existing instance of the ui (can be null)
* @param data list The data to be passed to the ui, if it exists
* @param force_open boolean The ui is being forced to (re)open, so close ui if it exists (instead of updating)
*
* @return /nanoui Returns the found ui, for null if none exists
*/
/datum/controller/subsystem/processing/nanoui/New()
NEW_SS_GLOBAL(SSnanoui)
/**
* Get an open /nanoui ui for the current user, src_object and ui_key and try to update it with data
*
* * user - /mob The mob who opened/owns the ui
* * src_object - /obj|/mob The obj or mob which the ui belongs to
* * ui_key - A string key used for the ui
* * data - List, the data to be passed to the ui, if it exists
* * force_open - Boolean, the ui is being forced to (re)open, so close ui if it exists (instead of updating)
*
* Returns the `/nanoui` found ui, for null if none exists
*/
/datum/controller/subsystem/processing/nanoui/proc/try_update_ui(mob/user, src_object, ui_key, datum/nanoui/ui, data, force_open = FALSE)
if (!ui) // no ui has been passed, so we'll search for one
ui = get_open_ui(user, src_object, ui_key)
@@ -35,15 +37,13 @@ PROCESSING_SUBSYSTEM_DEF(nanoui)
return null
/**
* Get an open /nanoui ui for the current user, src_object and ui_key
*
* @param user /mob The mob who opened/owns the ui
* @param src_object /obj|/mob The obj or mob which the ui belongs to
* @param ui_key string A string key used for the ui
*
* @return /nanoui Returns the found ui, or null if none exists
*/
/**
* Get an open /nanoui ui for the current user, src_object and ui_key
*
* * user - The `/mob` who opened/owns the ui
* * src_object - The `/obj` or `/mob` which the ui belongs to
* * ui_key - A string key used for the ui
*/
/datum/controller/subsystem/processing/nanoui/proc/get_open_ui(mob/user, src_object, ui_key)
var/src_object_key = SOFTREF(src_object)
if (!LAZYLEN(open_uis[src_object_key]) || !LAZYLEN(open_uis[src_object_key][ui_key]))
@@ -56,13 +56,13 @@ PROCESSING_SUBSYSTEM_DEF(nanoui)
//testing("nanomanager/get_open_ui mob [user.name] [src_object:name] [ui_key] - ui not found")
return null
/**
* Update all /nanoui uis attached to src_object
*
* @param src_object /obj|/mob The obj or mob which the uis are attached to
*
* @return int The number of uis updated
*/
/**
* Update all `/nanoui` uis attached to src_object
*
* * src_object - The `/obj` or `/mob` which the uis are attached to
*
* Returns the number of UIs updated
*/
/datum/controller/subsystem/processing/nanoui/proc/update_uis(src_object)
var/src_object_key = SOFTREF(src_object)
if (!LAZYLEN(open_uis[src_object_key]))
@@ -77,13 +77,13 @@ PROCESSING_SUBSYSTEM_DEF(nanoui)
ui.process(1)
.++
/**
* Close all /nanoui uis attached to src_object
*
* @param src_object /obj|/mob The obj or mob which the uis are attached to
*
* @return int The number of uis close
*/
/**
* Close all `/nanoui` uis attached to src_object
*
* * src_object - The `/obj` or `/mob` which the uis are attached to
*
* Returns the number of UIs closed
*/
/datum/controller/subsystem/processing/nanoui/proc/close_uis(src_object)
var/src_object_key = SOFTREF(src_object)
if (!open_uis[src_object_key] || !islist(open_uis[src_object_key]))
@@ -98,15 +98,15 @@ PROCESSING_SUBSYSTEM_DEF(nanoui)
ui.close()
.++
/**
* Update /nanoui uis belonging to user
*
* @param user /mob The mob who owns the uis
* @param src_object /obj|/mob If src_object is provided, only update uis which are attached to src_object (optional)
* @param ui_key string If ui_key is provided, only update uis with a matching ui_key (optional)
*
* @return int The number of uis updated
*/
/**
* Update /nanoui uis belonging to user
*
* * user - The `/mob` who owns the uis
* * src_object - An `/obj` or `/mob` that, if is provided, only update uis which are attached to it (optional)
* * ui_key - A string, if ui_key is provided, only update uis with a matching ui_key (optional)
*
* Returns the number of UIs updated
*/
/datum/controller/subsystem/processing/nanoui/proc/update_user_uis(mob/user, src_object, ui_key)
if (!LAZYLEN(user.open_uis))
return 0 // has no open uis
@@ -130,14 +130,12 @@ PROCESSING_SUBSYSTEM_DEF(nanoui)
//testing("nanomanager/close_user_uis mob [user.name] closed [open_uis.len] of [.] uis")
/**
* Add a /nanoui ui to the list of open uis
* This is called by the /nanoui open() proc
*
* @param ui /nanoui The ui to add
*
* @return nothing
*/
/**
* Add a /nanoui ui to the list of open uis
* This is called by the /nanoui open() proc
*
* * ui - The `/nanoui` ui to add
*/
/datum/controller/subsystem/processing/nanoui/proc/ui_opened(datum/nanoui/ui)
var/src_object_key = SOFTREF(ui.src_object)
LAZYINITLIST(open_uis[src_object_key])
@@ -147,14 +145,14 @@ PROCESSING_SUBSYSTEM_DEF(nanoui)
START_PROCESSING(SSnanoui, ui)
//testing("nanomanager/ui_opened mob [ui.user.name] [ui.src_object:name] [ui.ui_key] - user.open_uis [ui.user.open_uis.len] | uis [uis.len] | processing_uis [processing_uis.len]")
/**
* Remove a /nanoui ui from the list of open uis
* This is called by the /nanoui close() proc
*
* @param ui /nanoui The ui to remove
*
* @return int 0 if no ui was removed, 1 if removed successfully
*/
/**
* Remove a /nanoui ui from the list of open uis
* This is called by the /nanoui close() proc
*
* * ui - A `/nanoui` to remove
*
* Returns FALSE if no ui was removed, TRUE if removed successfully
*/
/datum/controller/subsystem/processing/nanoui/proc/ui_closed(datum/nanoui/ui)
var/src_object_key = SOFTREF(ui.src_object)
var/ui_key = ui.ui_key
@@ -179,26 +177,22 @@ PROCESSING_SUBSYSTEM_DEF(nanoui)
return 1
/**
* This is called on user logout
* Closes/clears all uis attached to the user's /mob
*
* @param user /mob The user's mob
*
* @return nothing
*/
/**
* This is called on user logout
* Closes/clears all uis attached to the user's `/mob`
*
* * user - The user's `/mob`
*/
/datum/controller/subsystem/processing/nanoui/proc/user_logout(mob/user)
return close_user_uis(user)
/**
* This is called when a player transfers from one mob to another
* Transfers all open UIs to the new mob
*
* @param oldMob /mob The user's old mob
* @param newMob /mob The user's new mob
*
* @return nothing
*/
/**
* This is called when a player transfers from one mob to another
* Transfers all open UIs to the new mob
*
* * oldMob - The user's old `/mob`
* * newMob - The user's new `/mob`
*/
/datum/controller/subsystem/processing/nanoui/proc/user_transferred(mob/oldMob, mob/newMob)
//testing("nanomanager/user_transferred from mob [oldMob.name] to mob [newMob.name]")
if (!oldMob || !LAZYLEN(oldMob.open_uis) || !LAZYLEN(open_uis))
+43 -42
View File
@@ -1,63 +1,64 @@
/*
HOW IT WORKS
HOW IT WORKS
SSradio is a subsystem responsible for maintaining all radio transmissions, think about it as about "ether".
Note that walkie-talkie, intercoms and headsets handle transmission using nonstandard way.
procs:
Note that walkie-talkie, intercoms and headsets handle transmission using nonstandard way.
procs:
add_object(obj/device as obj, var/new_frequency as num, var/filter as text|null = null)
Adds listening object.
parameters:
Adds listening object.
parameters:
device - device receiving signals, must have proc receive_signal (see description below).
one device may listen several frequencies, but not same frequency twice.
one device may listen several frequencies, but not same frequency twice.
new_frequency - see possibly frequencies below;
filter - thing for optimization. Optional, but recommended.
All filters should be consolidated in this file, see defines later.
Device without listening filter will receive all signals (on specified frequency).
Device with filter will receive any signals sent without filter.
Device with filter will not receive any signals sent with different filter.
returns:
Reference to frequency object.
All filters should be consolidated in this file, see defines later.
Device without listening filter will receive all signals (on specified frequency).
Device with filter will receive any signals sent without filter.
Device with filter will not receive any signals sent with different filter.
returns:
Reference to frequency object.
remove_object (obj/device, old_frequency)
Obliviously, after calling this proc, device will not receive any signals on old_frequency.
Other frequencies will left unaffected.
Obliviously, after calling this proc, device will not receive any signals on old_frequency.
Other frequencies will left unaffected.
return_frequency(var/frequency as num)
returns:
Reference to frequency object. Use it if you need to send and do not need to listen.
return_frequency(var/frequency as num)
returns:
Reference to frequency object. Use it if you need to send and do not need to listen.
radio_frequency is a global object maintaining list of devices that listening specific frequency.
procs:
radio_frequency is a global object maintaining list of devices that listening specific frequency.
procs:
post_signal(obj/source as obj|null, datum/signal/signal, var/filter as text|null = null, var/range as num|null = null)
Sends signal to all devices that wants such signal.
parameters:
source - object, emitted signal. Usually, devices will not receive their own signals.
signal - see description below.
filter - described above.
range - radius of regular byond's square circle on that z-level. null means everywhere, on all z-levels.
Sends signal to all devices that wants such signal.
parameters:
source - object, emitted signal. Usually, devices will not receive their own signals.
signal - see description below.
filter - described above.
range - radius of regular byond's square circle on that z-level. null means everywhere, on all z-levels.
obj/proc/receive_signal(datum/signal/signal, var/receive_method as num, var/receive_param)
Handler from received signals. By default does nothing. Define your own for your object.
Avoid of sending signals directly from this proc, use spawn(-1). DO NOT use sleep() here or call procs that sleep please. If you must, use spawn()
parameters:
signal - see description below. Extract all needed data from the signal before doing sleep(), spawn() or return!
receive_method - may be TRANSMISSION_WIRE or TRANSMISSION_RADIO.
TRANSMISSION_WIRE is currently unused.
receive_param - for TRANSMISSION_RADIO here comes frequency.
obj/proc/receive_signal(datum/signal/signal, var/receive_method as num, var/receive_param)
Handler from received signals. By default does nothing. Define your own for your object.
Avoid of sending signals directly from this proc, use spawn(-1). DO NOT use sleep() here or call procs that sleep please. If you must, use spawn()
parameters:
signal - see description below. Extract all needed data from the signal before doing sleep(), spawn() or return!
receive_method - may be TRANSMISSION_WIRE or TRANSMISSION_RADIO.
TRANSMISSION_WIRE is currently unused.
receive_param - for TRANSMISSION_RADIO here comes frequency.
datum/signal
vars:
source
an object that emitted signal. Used for debug and bearing.
data
list with transmitting data. Usual use pattern:
datum/signal
vars:
source
an object that emitted signal. Used for debug and bearing.
data
list with transmitting data. Usual use pattern:
data["msg"] = "hello world"
encryption
Some number symbolizing "encryption key".
Note that game actually do not use any cryptography here.
If receiving object don't know right key, it must ignore encrypted signal in its receive_signal.
Some number symbolizing "encryption key".
Note that game actually do not use any cryptography here.
If receiving object don't know right key, it must ignore encrypted signal in its receive_signal.
*/
+29 -29
View File
@@ -8,14 +8,14 @@
#define TIMER_ID_MAX (2**24)
/**
* # Timer Subsystem
*
* Handles creation, callbacks, and destruction of timed events.
*
* It is important to understand the buckets used in the timer subsystem are just a series of circular doubly-linked
* lists. The object at a given index in bucket_list is a /datum/timedevent, the head of a circular list, which has prev
* and next references for the respective elements in that bucket's circular list.
*/
* # Timer Subsystem
*
* Handles creation, callbacks, and destruction of timed events.
*
* It is important to understand the buckets used in the timer subsystem are just a series of circular doubly-linked
* lists. The object at a given index in bucket_list is a /datum/timedevent, the head of a circular list, which has prev
* and next references for the respective elements in that bucket's circular list.
*/
SUBSYSTEM_DEF(timer)
name = "Timer"
wait = 1 //SS_TICKER subsystem, so wait is in ticks
@@ -228,8 +228,8 @@ SUBSYSTEM_DEF(timer)
. += ", NO CALLBACK"
/**
* Destroys the existing buckets and creates new buckets from the existing timed events
*/
* Destroys the existing buckets and creates new buckets from the existing timed events
*/
/datum/controller/subsystem/timer/proc/reset_buckets()
LOG_DEBUG("Timer buckets have been reset, this may cause timers to lag")
bucket_reset_count++
@@ -337,14 +337,14 @@ SUBSYSTEM_DEF(timer)
bucket_list |= SStimer.bucket_list
/**
* # Timed Event
*
* This is the actual timer, it contains the callback and necessary data to maintain
* the timer.
*
* See the documentation for the timer subsystem for an explanation of the buckets referenced
* below in next and prev
*/
* # Timed Event
*
* This is the actual timer, it contains the callback and necessary data to maintain
* the timer.
*
* See the documentation for the timer subsystem for an explanation of the buckets referenced
* below in next and prev
*/
/datum/timedevent
/// ID used for timers when the TIMER_STOPPABLE flag is present
var/id
@@ -439,8 +439,8 @@ SUBSYSTEM_DEF(timer)
return QDEL_HINT_IWILLGC
/**
* Removes this timed event from any relevant buckets, or the secondary queue
*/
* Removes this timed event from any relevant buckets, or the secondary queue
*/
/datum/timedevent/proc/bucketEject()
// Store local references for the bucket list and secondary queue
// This is faster than referencing them from the datum itself
@@ -477,13 +477,13 @@ SUBSYSTEM_DEF(timer)
bucket_joined = FALSE
/**
* Attempts to add this timed event to a bucket, will enter the secondary queue
* if there are no appropriate buckets at this time.
*
* Secondary queueing of timed events will occur when the timespan covered by the existing
* buckets is exceeded by the time at which this timed event is scheduled to be invoked.
* If the timed event is tracking client time, it will be added to a special bucket.
*/
* Attempts to add this timed event to a bucket, will enter the secondary queue
* if there are no appropriate buckets at this time.
*
* Secondary queueing of timed events will occur when the timespan covered by the existing
* buckets is exceeded by the time at which this timed event is scheduled to be invoked.
* If the timed event is tracking client time, it will be added to a special bucket.
*/
/datum/timedevent/proc/bucketJoin()
// Generate debug-friendly name for timer
var/static/list/bitfield_flags = list("TIMER_UNIQUE", "TIMER_OVERRIDE", "TIMER_CLIENT_TIME", "TIMER_STOPPABLE", "TIMER_NO_HASH_WAIT", "TIMER_LOOP")
@@ -534,8 +534,8 @@ SUBSYSTEM_DEF(timer)
bucket_list[bucket_pos] = src
/**
* Returns a string of the type of the callback for this timer
*/
* Returns a string of the type of the callback for this timer
*/
/datum/timedevent/proc/getcallingtype()
. = "ERROR"
if (callBack.object == GLOBAL_PROC)
+1 -1
View File
@@ -23,5 +23,5 @@
available_controllers["Evacuation Main Controller"] = evacuation_controller
var/css = input("What controller would you like to debug?", "Controllers") as null|anything in available_controllers
debug_variables(available_controllers[css])
message_admins("Admin [key_name_admin(usr)] is debugging the [css] controller.")
+141 -141
View File
@@ -1,40 +1,40 @@
/**
* # Component
*
* The component datum
*
* A component should be a single standalone unit
* of functionality, that works by receiving signals from it's parent
* object to provide some single functionality (i.e a slippery component)
* that makes the object it's attached to cause people to slip over.
* Useful when you want shared behaviour independent of type inheritance
*/
* # Component
*
* The component datum
*
* A component should be a single standalone unit
* of functionality, that works by receiving signals from it's parent
* object to provide some single functionality (i.e a slippery component)
* that makes the object it's attached to cause people to slip over.
* Useful when you want shared behaviour independent of type inheritance
*/
/datum/component
/// Defines how duplicate existing components are handled when added to a datum
/// See `COMPONENT_DUPE_*` definitions for available options
var/dupe_mode = COMPONENT_DUPE_HIGHLANDER
/// The type to check for duplication
/// `null` means exact match on `type` (default)
/// Any other type means that and all subtypes
var/dupe_type
/// The datum this components belongs to
var/datum/parent
/// Only set to true if you are able to properly transfer this component
/// At a minimum RegisterWithParent and UnregisterFromParent should be used
/// Make sure you also implement PostTransfer for any post transfer handling
var/can_transfer = FALSE
/**
* Create a new component.
*
* Additional arguments are passed to [Initialize()][/datum/component/proc/Initialize]
*
* Arguments:
* * datum/P the parent datum this component reacts to signals from
*/
* Create a new component.
*
* Additional arguments are passed to [Initialize()][/datum/component/proc/Initialize]
*
* Arguments:
* * datum/P the parent datum this component reacts to signals from
*/
/datum/component/New(list/raw_args)
parent = raw_args[1]
var/list/arguments = raw_args.Copy(2)
@@ -46,17 +46,17 @@
_JoinParent(parent)
/**
* Called during component creation with the same arguments as in new excluding parent.
* Do not call `qdel(src)` from this function, `return COMPONENT_INCOMPATIBLE` instead
*/
* Called during component creation with the same arguments as in new excluding parent.
* Do not call `qdel(src)` from this function, `return COMPONENT_INCOMPATIBLE` instead
*/
/datum/component/proc/Initialize(...)
return
/**
* Properly removes the component from `parent` and cleans up references
* Setting `force` makes it not check for and remove the component from the parent
* Setting `silent` deletes the component without sending a `COMSIG_COMPONENT_REMOVING` signal
*/
* Properly removes the component from `parent` and cleans up references
* Setting `force` makes it not check for and remove the component from the parent
* Setting `silent` deletes the component without sending a `COMSIG_COMPONENT_REMOVING` signal
*/
/datum/component/Destroy(force=FALSE, silent=FALSE)
if(!force && parent)
_RemoveFromParent()
@@ -66,8 +66,8 @@
return ..()
/**
* Internal proc to handle behaviour of components when joining a parent
*/
* Internal proc to handle behaviour of components when joining a parent
*/
/datum/component/proc/_JoinParent()
var/datum/P = parent
//lazy init the parent's dc list
@@ -104,8 +104,8 @@
RegisterWithParent()
/**
* Internal proc to handle behaviour when being removed from a parent
*/
* Internal proc to handle behaviour when being removed from a parent
*/
/datum/component/proc/_RemoveFromParent()
var/datum/P = parent
var/list/dc = P.datum_components
@@ -125,37 +125,37 @@
UnregisterFromParent()
/**
* Register the component with the parent object
*
* Use this proc to register with your parent object
* Overridable proc that's called when added to a new parent
*/
* Register the component with the parent object
*
* Use this proc to register with your parent object
* Overridable proc that's called when added to a new parent
*/
/datum/component/proc/RegisterWithParent()
return
/**
* Unregister from our parent object
*
* Use this proc to unregister from your parent object
* Overridable proc that's called when removed from a parent
* *
*/
* Unregister from our parent object
*
* Use this proc to unregister from your parent object
* Overridable proc that's called when removed from a parent
*
*/
/datum/component/proc/UnregisterFromParent()
return
/**
* Register to listen for a signal from the passed in target
*
* This sets up a listening relationship such that when the target object emits a signal
* the source datum this proc is called upon, will recieve a callback to the given proctype
* Return values from procs registered must be a bitfield
*
* Arguments:
* * datum/target The target to listen for signals from
* * sig_type_or_types Either a string signal name, or a list of signal names (strings)
* * proctype The proc to call back when the signal is emitted
* * override If a previous registration exists you must explicitly set this
*/
* Register to listen for a signal from the passed in target
*
* This sets up a listening relationship such that when the target object emits a signal
* the source datum this proc is called upon, will recieve a callback to the given proctype
* Return values from procs registered must be a bitfield
*
* Arguments:
* * datum/target The target to listen for signals from
* * sig_type_or_types Either a string signal name, or a list of signal names (strings)
* * proctype The proc to call back when the signal is emitted
* * override If a previous registration exists you must explicitly set this
*/
/datum/proc/RegisterSignal(datum/target, sig_type_or_types, proctype, override = FALSE)
if(QDELETED(src) || QDELETED(target))
return
@@ -189,15 +189,15 @@
signal_enabled = TRUE
/**
* Stop listening to a given signal from target
*
* Breaks the relationship between target and source datum, removing the callback when the signal fires
* Doesn't care if a registration exists or not
*
* Arguments:
* * datum/target Datum to stop listening to signals from
* * sig_typeor_types Signal string key or list of signal keys to stop listening to specifically
*/
* Stop listening to a given signal from target
*
* Breaks the relationship between target and source datum, removing the callback when the signal fires
* Doesn't care if a registration exists or not
*
* Arguments:
* * datum/target Datum to stop listening to signals from
* * sig_typeor_types Signal string key or list of signal keys to stop listening to specifically
*/
/datum/proc/UnregisterSignal(datum/target, sig_type_or_types)
var/list/lookup = target.comp_lookup
if(!signal_procs || !signal_procs[target] || !lookup)
@@ -228,47 +228,47 @@
signal_procs -= target
/**
* Called on a component when a component of the same type was added to the same parent
* See `/datum/component/var/dupe_mode`
* `C`'s type will always be the same of the called component
*/
* Called on a component when a component of the same type was added to the same parent
* See `/datum/component/var/dupe_mode`
* `C`'s type will always be the same of the called component
*/
/datum/component/proc/InheritComponent(datum/component/C, i_am_original)
return
/**
* Called on a component when a component of the same type was added to the same parent with [COMPONENT_DUPE_SELECTIVE]
*
* See [/datum/component/var/dupe_mode]
*
* `C`'s type will always be the same of the called component
*
* return TRUE if you are absorbing the component, otherwise FALSE if you are fine having it exist as a duplicate component
*/
* Called on a component when a component of the same type was added to the same parent with [COMPONENT_DUPE_SELECTIVE]
*
* See [/datum/component/var/dupe_mode]
*
* `C`'s type will always be the same of the called component
*
* return TRUE if you are absorbing the component, otherwise FALSE if you are fine having it exist as a duplicate component
*/
/datum/component/proc/CheckDupeComponent(datum/component/C, ...)
return
/**
* Callback Just before this component is transferred
*
* Use this to do any special cleanup you might need to do before being deregged from an object
*
*/
* Callback Just before this component is transferred
*
* Use this to do any special cleanup you might need to do before being deregged from an object
*
*/
/datum/component/proc/PreTransfer()
return
/**
* Callback Just after a component is transferred
*
* Use this to do any special setup you need to do after being moved to a new object
* Do not call `qdel(src)` from this function, `return COMPONENT_INCOMPATIBLE` instead
*
*/
* Callback Just after a component is transferred
*
* Use this to do any special setup you need to do after being moved to a new object
* Do not call `qdel(src)` from this function, `return COMPONENT_INCOMPATIBLE` instead
*
*/
/datum/component/proc/PostTransfer()
return COMPONENT_INCOMPATIBLE //Do not support transfer by default as you must properly support it
/**
* Internal proc to create a list of our type and all parent types
*/
* Internal proc to create a list of our type and all parent types
*/
/datum/component/proc/_GetInverseTypeList(our_type = type)
//we can do this one simple trick
var/current_type = parent_type
@@ -279,10 +279,10 @@
. += current_type
/**
* Internal proc to handle most all of the signaling procedure
* Will runtime if used on datums with an empty component list
* Use the `SEND_SIGNAL` define instead
*/
* Internal proc to handle most all of the signaling procedure
* Will runtime if used on datums with an empty component list
* Use the `SEND_SIGNAL` define instead
*/
/datum/proc/_SendSignal(sigtype, list/arguments)
var/target = comp_lookup[sigtype]
if(!length(target))
@@ -303,12 +303,12 @@
// The type arg is casted so initial works, you shouldn't be passing a real instance into this
/**
* Return any component assigned to this datum of the given type
* This will throw an error if it's possible to have more than one component of that type on the parent
*
* Arguments:
* * datum/component/c_type The typepath of the component you want to get a reference to
*/
* Return any component assigned to this datum of the given type
* This will throw an error if it's possible to have more than one component of that type on the parent
*
* Arguments:
* * datum/component/c_type The typepath of the component you want to get a reference to
*/
/datum/proc/GetComponent(datum/component/c_type)
RETURN_TYPE(c_type)
if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED)
@@ -322,12 +322,12 @@
// The type arg is casted so initial works, you shouldn't be passing a real instance into this
/**
* Return any component assigned to this datum of the exact given type
* This will throw an error if it's possible to have more than one component of that type on the parent
*
* Arguments:
* * datum/component/c_type The typepath of the component you want to get a reference to
*/
* Return any component assigned to this datum of the exact given type
* This will throw an error if it's possible to have more than one component of that type on the parent
*
* Arguments:
* * datum/component/c_type The typepath of the component you want to get a reference to
*/
/datum/proc/GetExactComponent(datum/component/c_type)
RETURN_TYPE(c_type)
if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED)
@@ -344,11 +344,11 @@
return null
/**
* Get all components of a given type that are attached to this datum
*
* Arguments:
* * c_type The component type path
*/
* Get all components of a given type that are attached to this datum
*
* Arguments:
* * c_type The component type path
*/
/datum/proc/GetComponents(c_type)
var/list/dc = datum_components
if(!dc)
@@ -358,12 +358,12 @@
return list(.)
/**
* Creates an instance of `new_type` in the datum and attaches to it as parent
* Sends the `COMSIG_COMPONENT_ADDED` signal to the datum
* Returns the component that was created. Or the old component in a dupe situation where `COMPONENT_DUPE_UNIQUE` was set
* If this tries to add an component to an incompatible type, the component will be deleted and the result will be `null`. This is very unperformant, try not to do it
* Properly handles duplicate situations based on the `dupe_mode` var
*/
* Creates an instance of `new_type` in the datum and attaches to it as parent
* Sends the `COMSIG_COMPONENT_ADDED` signal to the datum
* Returns the component that was created. Or the old component in a dupe situation where `COMPONENT_DUPE_UNIQUE` was set
* If this tries to add an component to an incompatible type, the component will be deleted and the result will be `null`. This is very unperformant, try not to do it
* Properly handles duplicate situations based on the `dupe_mode` var
*/
/datum/proc/_AddComponent(list/raw_args)
var/new_type = raw_args[1]
var/datum/component/nt = new_type
@@ -431,22 +431,22 @@
return old_comp
/**
* Get existing component of type, or create it and return a reference to it
*
* Use this if the item needs to exist at the time of this call, but may not have been created before now
*
* Arguments:
* * component_type The typepath of the component to create or return
* * ... additional arguments to be passed when creating the component if it does not exist
*/
* Get existing component of type, or create it and return a reference to it
*
* Use this if the item needs to exist at the time of this call, but may not have been created before now
*
* Arguments:
* * component_type The typepath of the component to create or return
* * ... additional arguments to be passed when creating the component if it does not exist
*/
/datum/proc/LoadComponent(component_type, ...)
. = GetComponent(component_type)
if(!.)
return _AddComponent(args)
/**
* Removes the component from parent, ends up with a null parent
*/
* Removes the component from parent, ends up with a null parent
*/
/datum/component/proc/RemoveComponent()
if(!parent)
return
@@ -457,13 +457,13 @@
SEND_SIGNAL(old_parent, COMSIG_COMPONENT_REMOVING, src)
/**
* Transfer this component to another parent
*
* Component is taken from source datum
*
* Arguments:
* * datum/component/target Target datum to transfer to
*/
* Transfer this component to another parent
*
* Component is taken from source datum
*
* Arguments:
* * datum/component/target Target datum to transfer to
*/
/datum/proc/TakeComponent(datum/component/target)
if(!target || target.parent == src)
return
@@ -481,13 +481,13 @@
target._JoinParent()
/**
* Transfer all components to target
*
* All components from source datum are taken
*
* Arguments:
* * /datum/target the target to move the components to
*/
* Transfer all components to target
*
* All components from source datum are taken
*
* Arguments:
* * /datum/target the target to move the components to
*/
/datum/proc/TransferComponents(datum/target)
var/list/dc = datum_components
if(!dc)
@@ -503,7 +503,7 @@
target.TakeComponent(comps)
/**
* Return the object that is the host of any UI's that this component has
*/
* Return the object that is the host of any UI's that this component has
*/
/datum/component/ui_host()
return parent
+1 -1
View File
@@ -116,4 +116,4 @@
active = new_state
/datum/component/armor/toggle/get_value(key)
return active ? ..() : 0
return active ? ..() : 0
@@ -16,4 +16,4 @@
src.priority = priority
/datum/component/turf_hand/proc/OnHandInterception(var/mob/user)
return our_owner.attack_hand(user)
return our_owner.attack_hand(user)
+14 -14
View File
@@ -1,19 +1,19 @@
/**
* A holder for simple behaviour that can be attached to many different types
*
* Only one element of each type is instanced during game init.
* Otherwise acts basically like a lightweight component.
*/
* A holder for simple behaviour that can be attached to many different types
*
* Only one element of each type is instanced during game init.
* Otherwise acts basically like a lightweight component.
*/
/datum/element
/// Option flags for element behaviour
var/element_flags = NONE
/**
* The index of the first attach argument to consider for duplicate elements
*
* Is only used when flags contains [ELEMENT_BESPOKE]
*
* This is infinity so you must explicitly set this
*/
* The index of the first attach argument to consider for duplicate elements
*
* Is only used when flags contains [ELEMENT_BESPOKE]
*
* This is infinity so you must explicitly set this
*/
var/id_arg_index = INFINITY
/// Activates the functionality defined by the element on the given target datum
@@ -47,9 +47,9 @@
CRASH("Incompatible [arguments[1]] assigned to a [type]! args: [json_encode(args)]")
/**
* Finds the singleton for the element type given and detaches it from src
* You only need additional arguments beyond the type if you're using [ELEMENT_BESPOKE]
*/
* Finds the singleton for the element type given and detaches it from src
* You only need additional arguments beyond the type if you're using [ELEMENT_BESPOKE]
*/
/datum/proc/_RemoveElement(list/arguments)
var/datum/element/ele = SSdcs.GetElement(arguments)
ele.Detach(src)
+1 -1
View File
@@ -46,4 +46,4 @@
name = "Elyran Navy"
chance = 15
spawner = /datum/ghostspawner/human/ert/elyra
possible_space_sector = list(SECTOR_BADLANDS, SECTOR_NEW_ANKARA, SECTOR_VALLEY_HALE, SECTOR_AEMAQ)
possible_space_sector = list(SECTOR_BADLANDS, SECTOR_NEW_ANKARA, SECTOR_VALLEY_HALE, SECTOR_AEMAQ)
+1 -1
View File
@@ -2,4 +2,4 @@
name = "Tau Ceti Foreign Legion"
chance = 20
spawner = /datum/ghostspawner/human/ert/tcfl
possible_space_sector = list(SECTOR_ROMANOVICH, SECTOR_TAU_CETI, SECTOR_CORP_ZONE)
possible_space_sector = list(SECTOR_ROMANOVICH, SECTOR_TAU_CETI, SECTOR_CORP_ZONE)
+2 -2
View File
@@ -72,8 +72,8 @@ var/global/datum/getrev/revdata = new()
/datum/getrev/proc/generate_greeting_info()
if (!test_merges.len)
greeting_info = {"<div class="alert alert-info">
There are currently no test merges loaded onto the server.
</div>"}
There are currently no test merges loaded onto the server.
</div>"}
return
var/list/out = list("<p>There are currently [test_merges.len] PRs being tested live.</p>",
+1 -1
View File
@@ -4,4 +4,4 @@
mid_sounds = list('sound/ambience/tension/horror.ogg' = 1)
mid_length = 260
end_sound = list('sound/effects/psi/power_feedback.ogg' = 1)
volume = 80
volume = 80
+1 -1
View File
@@ -1,4 +1,4 @@
/datum/looping_sound/thermal_drill
mid_sounds = list('sound/items/thermal_drill.ogg' = 1)
mid_length = 19
volume = 30
volume = 30
+1 -1
View File
@@ -1,4 +1,4 @@
/****************
* Debug Support *
****************/
var/list/all_observable_events = list()
var/list/all_observable_events = list()
+1 -1
View File
@@ -21,4 +21,4 @@ var/singleton/observ/entered/entered_event = new()
/atom/Entered(atom/movable/enterer, atom/old_loc)
..()
entered_event.raise_event(src, enterer, old_loc)
entered_event.raise_event(src, enterer, old_loc)
+1 -1
View File
@@ -21,4 +21,4 @@ var/singleton/observ/exited/exited_event = new()
/atom/Exited(atom/movable/exitee, atom/new_loc)
. = ..()
exited_event.raise_event(src, exitee, new_loc)
exited_event.raise_event(src, exitee, new_loc)
+1 -1
View File
@@ -18,4 +18,4 @@
// Sometimes you just want to end yourself
/datum/proc/qdel_self()
qdel(src)
qdel(src)
+1 -1
View File
@@ -9,4 +9,4 @@ var/singleton/observ/instrument_synchronizer/instrument_synchronizer = new()
/singleton/observ/instrument_synchronizer
name = "Instrument synchronizer"
expected_type = /datum
expected_type = /datum
+1 -1
View File
@@ -22,4 +22,4 @@ var/singleton/observ/see_in_dark_set/see_in_dark_set_event = new()
var/old_see_in_dark = sight
if(old_see_in_dark != new_see_in_dark)
see_in_dark = new_see_in_dark
see_in_dark_set_event.raise_event(src, old_see_in_dark, new_see_in_dark)
see_in_dark_set_event.raise_event(src, old_see_in_dark, new_see_in_dark)
+1 -1
View File
@@ -22,4 +22,4 @@ var/singleton/observ/see_invisible_set/see_invisible_set_event = new()
var/old_see_invisible = see_invisible
if(old_see_invisible != new_see_invisible)
see_invisible = new_see_invisible
see_invisible_set_event.raise_event(src, old_see_invisible, new_see_invisible)
see_invisible_set_event.raise_event(src, old_see_invisible, new_see_invisible)
+1 -1
View File
@@ -35,4 +35,4 @@ var/singleton/observ/shuttle_pre_move/shuttle_pre_move_event = new()
*****************/
// Located in modules/shuttle/shuttle.dm
// Proc: /datum/shuttle/proc/attempt_move()
// Proc: /datum/shuttle/proc/attempt_move()
+1 -1
View File
@@ -22,4 +22,4 @@ var/singleton/observ/sight_set/sight_set_event = new()
var/old_sight = sight
if(old_sight != new_sight)
sight = new_sight
sight_set_event.raise_event(src, old_sight, new_sight)
sight_set_event.raise_event(src, old_sight, new_sight)
+12 -12
View File
@@ -117,12 +117,12 @@
belt_contents = list(
/obj/item/reagent_containers/hypospray/combat/empty = 1,
/obj/item/reagent_containers/glass/bottle/inaprovaline = 1,
/obj/item/reagent_containers/glass/bottle/antitoxin = 1,
/obj/item/reagent_containers/glass/bottle/dexalin_plus = 1,
/obj/item/reagent_containers/glass/bottle/butazoline = 1,
/obj/item/reagent_containers/glass/bottle/dermaline = 1,
/obj/item/reagent_containers/glass/bottle/perconol = 1,
/obj/item/reagent_containers/glass/bottle/inaprovaline = 1,
/obj/item/reagent_containers/glass/bottle/antitoxin = 1,
/obj/item/reagent_containers/glass/bottle/dexalin_plus = 1,
/obj/item/reagent_containers/glass/bottle/butazoline = 1,
/obj/item/reagent_containers/glass/bottle/dermaline = 1,
/obj/item/reagent_containers/glass/bottle/perconol = 1,
/obj/item/storage/pill_bottle/mortaphenyl = 1
)
@@ -156,11 +156,11 @@
belt_contents = list(
/obj/item/reagent_containers/hypospray/combat/empty = 1,
/obj/item/reagent_containers/glass/bottle/inaprovaline = 1,
/obj/item/reagent_containers/glass/bottle/antitoxin = 1,
/obj/item/reagent_containers/glass/bottle/dexalin_plus = 1,
/obj/item/reagent_containers/glass/bottle/butazoline = 1,
/obj/item/reagent_containers/glass/bottle/dermaline = 1,
/obj/item/reagent_containers/glass/bottle/perconol = 1,
/obj/item/reagent_containers/glass/bottle/inaprovaline = 1,
/obj/item/reagent_containers/glass/bottle/antitoxin = 1,
/obj/item/reagent_containers/glass/bottle/dexalin_plus = 1,
/obj/item/reagent_containers/glass/bottle/butazoline = 1,
/obj/item/reagent_containers/glass/bottle/dermaline = 1,
/obj/item/reagent_containers/glass/bottle/perconol = 1,
/obj/item/melee/baton/stunrod = 1
)
+1 -1
View File
@@ -67,4 +67,4 @@
if(mercrig)
H.put_in_hands(mercrig)
H.equip_to_slot_or_del(mercrig, slot_back)
addtimer(CALLBACK(mercrig, TYPE_PROC_REF(/obj/item/rig, toggle_seals), H, TRUE), 2 SECONDS)
addtimer(CALLBACK(mercrig, TYPE_PROC_REF(/obj/item/rig, toggle_seals), H, TRUE), 2 SECONDS)
+2 -2
View File
@@ -16,14 +16,14 @@
backpack_contents = list(
/obj/item/melee/energy/sword/knife/sol = 1
)
)
belt_contents = list(
/obj/item/ammo_magazine/c762/sol = 1,
/obj/item/ammo_magazine/mc9mm = 2,
/obj/item/handcuffs/ziptie = 2,
/obj/item/grenade/frag = 1
)
)
accessory = /obj/item/clothing/accessory/holster/hip/brown
accessory_contents = list(/obj/item/gun/projectile/pistol/sol = 1)
+1 -1
View File
@@ -27,4 +27,4 @@
/datum/outfit/admin/deathsquad/syndicate/leader
name = "Syndicate Commando Lead"
l_pocket = /obj/item/pinpointer
l_pocket = /obj/item/pinpointer
+1 -1
View File
@@ -47,4 +47,4 @@ var/repository/sound_channels/sound_channels = new()
/repository/sound_channels/proc/ReleaseChannels(list/channels)
for(var/channel in channels)
LAZYREMOVE(keys_by_channel, "[channel]")
available_channels.Push(channel)
available_channels.Push(channel)
+1 -1
View File
@@ -16,4 +16,4 @@
#define TRADER_NO_BLACKLISTED "trade_blacklist"
#define TRADER_FOUND_UNWANTED "trade_found_unwanted"
#define TRADER_DEFAULT_NAME "Default" //Whether to just generate a name from the premade lists.
#define TRADER_DEFAULT_NAME "Default" //Whether to just generate a name from the premade lists.
+1 -1
View File
@@ -355,4 +355,4 @@
/obj/item/stack/material/phoron = TRADER_THIS_TYPE
)
mob_transfer_message = "You are transported to the ORIGIN. When the transportation dizziness wears off, you find you are surrounded by Golden Deep agents..."
mob_transfer_message = "You are transported to the ORIGIN. When the transportation dizziness wears off, you find you are surrounded by Golden Deep agents..."
+1 -1
View File
@@ -21,4 +21,4 @@
var/length = round(amt/100)
duration_of_stay += length
. = get_response("bribe_accept", "Sure, I'll stay for TIME more minutes.")
. = replacetext(., "TIME", length)
. = replacetext(., "TIME", length)
+1 -1
View File
@@ -192,4 +192,4 @@
/datum/category_item/underwear/socks/fishnet_nosock
name = "Fishnet Tights, Short"
icon_state = "fishnet_nosock"
has_color = TRUE
has_color = TRUE
+1 -1
View File
@@ -78,7 +78,7 @@
/datum/uplink_item/item/tools/personal_shield
name = "Personal Shield"
desc = "A personal shield that, when kept in your hand and activated, will protect its user from five projectile shots. \
This can only be bought once."
This can only be bought once."
telecrystal_cost = 1
item_limit = 1
path = /obj/item/device/personal_shield
+1 -1
View File
@@ -34,4 +34,4 @@ var/const/DISPOSAL_WIRE_FLUSH = 1
var/obj/machinery/disposal/D = holder
if(D.mode <= 0)
return TRUE
return FALSE
return FALSE
+1 -1
View File
@@ -89,4 +89,4 @@ var/const/VENDING_WIRE_HEATING = 32
if(16)
return "Cooling"
if(32)
return "Heating"
return "Heating"
+1 -1
View File
@@ -159,7 +159,7 @@ var/list/wireColours = list("red", "blue", "green", "darkred", "orange", "brown"
holder.add_hiddenprint(L)
else
to_chat(L, SPAN_WARNING("You need a multitool!"))
// Update Window
Interact(usr)
+1 -1
View File
@@ -93,4 +93,4 @@
overlay_limit = 0.5
specific_heat = 5 // J/(mol*K)
molar_mass = 0.017 // kg/mol
flags = XGM_GAS_CONTAMINANT
flags = XGM_GAS_CONTAMINANT
+10 -13
View File
@@ -1,17 +1,14 @@
/*
MODULAR ANTAGONIST SYSTEM
Attempts to move all the bullshit snowflake antag tracking code into its own system, which
has the added bonus of making the display procs consistent. Still needs work/adjustment/cleanup
but should be fairly self-explanatory with a review of the procs. Will supply a few examples
of common tasks that the system will be expected to perform below. ~Z
To use:
- Get the appropriate datum via get_antag_data("antagonist id")
using the id var of the desired /datum/antagonist ie. var/datum/antagonist/A = get_antag_data("traitor")
- Call add_antagonist() on the desired target mind ie. A.add_antagonist(mob.mind)
- To ignore protected roles, supply a positive second argument.
- To skip equipping with appropriate gear, supply a positive third argument.
MODULAR ANTAGONIST SYSTEM
Attempts to move all the bullshit snowflake antag tracking code into its own system, which
has the added bonus of making the display procs consistent. Still needs work/adjustment/cleanup
but should be fairly self-explanatory with a review of the procs. Will supply a few examples
of common tasks that the system will be expected to perform below. ~Z
To use:
- Get the appropriate datum via get_antag_data("antagonist id") using the id var of the desired /datum/antagonist ie. var/datum/antagonist/A = get_antag_data("traitor")
- Call add_antagonist() on the desired target mind ie. A.add_antagonist(mob.mind)
- To ignore protected roles, supply a positive second argument.
- To skip equipping with appropriate gear, supply a positive third argument.
*/
// Globals.
+1 -1
View File
@@ -68,4 +68,4 @@ var/datum/antagonist/xenos/borer/borers
..()
/datum/antagonist/xenos/borer/is_obvious_antag(datum/mind/player)
return TRUE
return TRUE
+1 -1
View File
@@ -55,4 +55,4 @@ var/datum/antagonist/burglar/burglars
return TRUE
/datum/antagonist/burglar/get_antag_radio()
return "Burglar"
return "Burglar"
+1 -1
View File
@@ -28,4 +28,4 @@ var/datum/antagonist/deathsquad/deathsquad
/datum/antagonist/deathsquad/attempt_spawn()
if(..())
deployed = TRUE
deployed = TRUE
+1 -1
View File
@@ -53,4 +53,4 @@ var/datum/antagonist/mercenary/mercs
return TRUE
/datum/antagonist/mercenary/get_antag_radio()
return "Mercenary"
return "Mercenary"
+1 -1
View File
@@ -163,4 +163,4 @@ var/datum/antagonist/ninja/ninjas
return directive
/datum/antagonist/ninja/get_antag_radio()
return "Ninja"
return "Ninja"
@@ -88,7 +88,7 @@
if(player.current.client.prefs.organ_data["torso"] == "cyborg") // Full synthetic.
return 0
return 1
return 0
return 0
/datum/antagonist/changeling/remove_antagonist(var/datum/mind/player, var/show_message = TRUE, var/implanted)
. = ..()
@@ -20,4 +20,4 @@ var/datum/antagonist/morph/morphs = null
to_chat(player.current, SPAN_DANGER("You can eat people and items by clicking on them, but only if they're dead."))
/datum/antagonist/morph/is_obvious_antag(datum/mind/player)
return TRUE
return TRUE
+1 -1
View File
@@ -42,4 +42,4 @@ var/datum/antagonist/thrall/thralls = null
var/datum/vampire/vampire = player.antag_datums[MODE_VAMPIRE]
vampire.lose_master(player.current)
player.antag_datums -= MODE_VAMPIRE
return ..()
return ..()
+19 -10
View File
@@ -7,11 +7,15 @@
var/anchored = 0
var/movable_flags
var/icon_scale_x = 1 // Used to scale icons up or down horizonally in update_transform().
var/icon_scale_y = 1 // Used to scale icons up or down vertically in update_transform().
var/icon_rotation = 0 // Used to rotate icons in update_transform()
///Used to scale icons up or down horizonally in update_transform().
var/icon_scale_x = 1
///Used to scale icons up or down vertically in update_transform().
var/icon_scale_y = 1
///Used to rotate icons in update_transform()
var/icon_rotation = 0
// var/elevation = 2 - not used anywhere
var/move_speed = 10
var/l_move_time = 1
var/throwing = 0
@@ -21,9 +25,14 @@
var/throw_range = 7
var/moved_recently = 0
var/atom/movable/pulledby = null
var/item_state = null // Base name of the image used for when the item is in someone's hand. Suffixes are added to this. Doubles as legacy overlay_state.
var/overlay_state = null // Base name of the image used for when the item is worn. Suffixes are added to this. Important for icon flipping as _flip is added at the end of the value.
//Also used on holdable mobs for the same info related to their held version
///Base name of the image used for when the item is in someone's hand. Suffixes are added to this. Doubles as legacy overlay_state.
var/item_state = null
///Base name of the image used for when the item is worn. Suffixes are added to this. Important for icon flipping as _flip is added at the end of the value.
var/overlay_state = null
///Also used on holdable mobs for the same info related to their held version
var/does_spin = TRUE // Does the atom spin when thrown (of course it does :P)
var/can_hold_mob = FALSE
@@ -184,9 +193,9 @@
minor_dist = dist_x
while(src && target && src.throwing && istype(src.loc, /turf) \
&& ((abs(target.x - src.x)+abs(target.y - src.y) > 0 && dist_travelled < range) \
|| (a && a.has_gravity == 0) \
|| istype(src.loc, /turf/space)))
&& ((abs(target.x - src.x)+abs(target.y - src.y) > 0 && dist_travelled < range) \
|| (a && a.has_gravity == 0) \
|| istype(src.loc, /turf/space)))
// only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up
var/atom/step
if(error >= 0)
+1 -1
View File
@@ -10,7 +10,7 @@
var/mob/living/carbon/human/H = M
if(H.species && H.species.flags & NO_SCAN)
return
for(var/datum/dna/gene/gene in dna_genes)
if(!M || !M.dna)
return
+11 -11
View File
@@ -295,17 +295,17 @@
if(!..())
ui_interact(user)
/**
* The ui_interact proc is used to open and update Nano UIs
* If ui_interact is not used then the UI will not update correctly
* ui_interact is currently defined for /atom/movable (which is inherited by /obj and /mob)
*
* @param user /mob The mob who is interacting with this ui
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
* @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui
*
* @return nothing
*/
/**
* The ui_interact proc is used to open and update Nano UIs
* If ui_interact is not used then the UI will not update correctly
* ui_interact is currently defined for /atom/movable (which is inherited by /obj and /mob)
*
* @param user /mob The mob who is interacting with this ui
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
* @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui
*
* @return nothing
*/
/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if (!connected)
return
+1 -1
View File
@@ -30,4 +30,4 @@
if(!H.dna.real_name)
var/randomname = H.species.get_random_name()
H.real_name = randomname
H.dna.real_name = randomname
H.dna.real_name = randomname
@@ -19,4 +19,4 @@
CHECK_STING(src, A)
. = ..()
#undef CHECK_STING
#undef CHECK_STING
@@ -69,4 +69,4 @@
var/datum/changeling/changeling = changeling_mob.mind.antag_datums[MODE_CHANGELING]
changeling.hivemind_members -= src
qdel(src)
qdel(src)
+6 -6
View File
@@ -5,7 +5,7 @@
/datum/rune/armor/do_rune_action(mob/living/user, atom/movable/A)
user.say("N'ath reth sh'yro eth d'raggathnor!")
user.visible_message(SPAN_DANGER("A flash of red light appears around [user], as a set of armor envelops their body!"),
SPAN_CULT("A refreshing feeling envelops you; the armor of the Dark One is once again protecting you."))
SPAN_CULT("A refreshing feeling envelops you; the armor of the Dark One is once again protecting you."))
if(istype(user, /mob/living/simple_animal/construct))
var/mob/living/simple_animal/construct/C = user
@@ -16,10 +16,10 @@
construct_class = alert(C, "Please choose which type of construct you wish to become.", "Construct Selection", "Juggernaut", "Wraith", "Artificer")
var/list/static/construct_types = list("Juggernaut" = /mob/living/simple_animal/construct/armored,
"Wraith" = /mob/living/simple_animal/construct/wraith,
"Artificer" = /mob/living/simple_animal/construct/builder,
"Harvester" = /mob/living/simple_animal/construct/harvester)
"Wraith" = /mob/living/simple_animal/construct/wraith,
"Artificer" = /mob/living/simple_animal/construct/builder,
"Harvester" = /mob/living/simple_animal/construct/harvester)
var/construct_path = construct_types[construct_class]
var/mob/living/simple_animal/construct/Z = new construct_path(get_turf(C))
Z.health = Z.health * (C.health / C.maxHealth)
@@ -29,7 +29,7 @@
C.death()
construct_msg(Z, construct_class)
Z.cancel_camera()
else if(ishuman(user))
user.equip_to_slot_or_del(new /obj/item/clothing/head/culthood/alt(user), slot_head)
user.equip_to_slot_or_del(new /obj/item/clothing/suit/cultrobes/alt(user), slot_wear_suit)
+1 -1
View File
@@ -28,4 +28,4 @@
qdel(A)
return TRUE
else
return fizzle(user, A)
return fizzle(user, A)
+1 -1
View File
@@ -103,4 +103,4 @@
var/mob/living/simple_animal/shade/shade = locate() in stone
announce_ghost_joinleave(shade)
shade.ghostize(FALSE)
target.dust()
target.dust()
@@ -37,4 +37,4 @@
qdel(new_talisman)
playsound(A, 'sound/magic/enter_blood.ogg', 50)
else
return fizzle(user, A)
return fizzle(user, A)
@@ -27,4 +27,4 @@
admin_attacker_log_many_victims(user, affected, "Used a deafen rune.", "Was victim of a deafen rune.", "used a deafen rune on")
qdel(A)
else
return fizzle(user, A)
return fizzle(user, A)
@@ -20,7 +20,7 @@
return fizzle(user, A)
if(cultist == user) //just to be sure.
return
var/cultist_free = TRUE
if(cultist.buckled_to)
cultist_free = FALSE
@@ -52,7 +52,7 @@
cultist_free = FALSE
door.unlock()
door.open()
if(!cultist_free)
to_chat(cultist, SPAN_CULT("Your fellow cultists have freed you!"))
@@ -62,4 +62,4 @@
else
C.say("Khari'd! Gual'te nikka!")
qdel(A)
return fizzle(user, A)
return fizzle(user, A)
+1 -1
View File
@@ -15,4 +15,4 @@
for(var/mob/V in viewers(get_turf(A)))
to_chat(V, SPAN_WARNING("\The [A] dissipates into a bloody cloud, veiling the surrounding runes."))
qdel(A)
return TRUE
return TRUE
+3 -3
View File
@@ -23,7 +23,7 @@
else if(istype(I,/obj/item/aicard))
for(var/mob/living/silicon/ai/AI in I)
victims += AI
for(var/mob/living/carbon/C in orange(1, A))
if(iscultist(C) && !C.stat)
cultists_in_range += C
@@ -52,7 +52,7 @@
do_sacrifice(cultists_in_range, H, H.stat, 80, worthy)
else
fizzle(user)
if(output)
for(var/mob/C in cultists_in_range)
to_chat(C, output)
@@ -85,4 +85,4 @@
if(isrobot(victim))
victim.dust() // To prevent the MMI from remaining
else
victim.gib()
victim.gib()

Some files were not shown because too many files have changed in this diff Show More