mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Grep for space indentation (#54850)
#54604 atomizing Since a lot of the space indents are in lists ill atomize those later
This commit is contained in:
@@ -424,13 +424,13 @@
|
||||
owner = M
|
||||
|
||||
/**
|
||||
* Generates a list of all laws on this datum, including rendered HTML tags if required
|
||||
*
|
||||
* Arguments:
|
||||
* * include_zeroth - Operator that controls if law 0 or law 666 is returned in the set
|
||||
* * show_numbers - Operator that controls if law numbers are prepended to the returned laws
|
||||
* * render_html - Operator controlling if HTML tags are rendered on the returned laws
|
||||
*/
|
||||
* Generates a list of all laws on this datum, including rendered HTML tags if required
|
||||
*
|
||||
* Arguments:
|
||||
* * include_zeroth - Operator that controls if law 0 or law 666 is returned in the set
|
||||
* * show_numbers - Operator that controls if law numbers are prepended to the returned laws
|
||||
* * render_html - Operator controlling if HTML tags are rendered on the returned laws
|
||||
*/
|
||||
/datum/ai_laws/proc/get_law_list(include_zeroth = FALSE, show_numbers = TRUE, render_html = TRUE)
|
||||
var/list/data = list()
|
||||
|
||||
|
||||
+48
-48
@@ -1,73 +1,73 @@
|
||||
#define ARMORID "armor-[melee]-[bullet]-[laser]-[energy]-[bomb]-[bio]-[rad]-[fire]-[acid]-[magic]-[wound]"
|
||||
|
||||
/proc/getArmor(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, wound = 0)
|
||||
. = locate(ARMORID)
|
||||
if (!.)
|
||||
. = new /datum/armor(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic, wound)
|
||||
. = locate(ARMORID)
|
||||
if (!.)
|
||||
. = new /datum/armor(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic, wound)
|
||||
|
||||
/datum/armor
|
||||
datum_flags = DF_USE_TAG
|
||||
var/melee
|
||||
var/bullet
|
||||
var/laser
|
||||
var/energy
|
||||
var/bomb
|
||||
var/bio
|
||||
var/rad
|
||||
var/fire
|
||||
var/acid
|
||||
var/magic
|
||||
var/wound
|
||||
datum_flags = DF_USE_TAG
|
||||
var/melee
|
||||
var/bullet
|
||||
var/laser
|
||||
var/energy
|
||||
var/bomb
|
||||
var/bio
|
||||
var/rad
|
||||
var/fire
|
||||
var/acid
|
||||
var/magic
|
||||
var/wound
|
||||
|
||||
/datum/armor/New(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, wound = 0)
|
||||
src.melee = melee
|
||||
src.bullet = bullet
|
||||
src.laser = laser
|
||||
src.energy = energy
|
||||
src.bomb = bomb
|
||||
src.bio = bio
|
||||
src.rad = rad
|
||||
src.fire = fire
|
||||
src.acid = acid
|
||||
src.magic = magic
|
||||
src.wound = wound
|
||||
tag = ARMORID
|
||||
src.melee = melee
|
||||
src.bullet = bullet
|
||||
src.laser = laser
|
||||
src.energy = energy
|
||||
src.bomb = bomb
|
||||
src.bio = bio
|
||||
src.rad = rad
|
||||
src.fire = fire
|
||||
src.acid = acid
|
||||
src.magic = magic
|
||||
src.wound = wound
|
||||
tag = ARMORID
|
||||
|
||||
/datum/armor/proc/modifyRating(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, wound = 0)
|
||||
return getArmor(src.melee+melee, src.bullet+bullet, src.laser+laser, src.energy+energy, src.bomb+bomb, src.bio+bio, src.rad+rad, src.fire+fire, src.acid+acid, src.magic+magic, src.wound+wound)
|
||||
return getArmor(src.melee+melee, src.bullet+bullet, src.laser+laser, src.energy+energy, src.bomb+bomb, src.bio+bio, src.rad+rad, src.fire+fire, src.acid+acid, src.magic+magic, src.wound+wound)
|
||||
|
||||
/datum/armor/proc/modifyAllRatings(modifier = 0)
|
||||
return getArmor(melee+modifier, bullet+modifier, laser+modifier, energy+modifier, bomb+modifier, bio+modifier, rad+modifier, fire+modifier, acid+modifier, magic+modifier, wound+modifier)
|
||||
return getArmor(melee+modifier, bullet+modifier, laser+modifier, energy+modifier, bomb+modifier, bio+modifier, rad+modifier, fire+modifier, acid+modifier, magic+modifier, wound+modifier)
|
||||
|
||||
/datum/armor/proc/setRating(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic, wound)
|
||||
return getArmor((isnull(melee) ? src.melee : melee),\
|
||||
(isnull(bullet) ? src.bullet : bullet),\
|
||||
(isnull(laser) ? src.laser : laser),\
|
||||
(isnull(energy) ? src.energy : energy),\
|
||||
(isnull(bomb) ? src.bomb : bomb),\
|
||||
(isnull(bio) ? src.bio : bio),\
|
||||
(isnull(rad) ? src.rad : rad),\
|
||||
(isnull(fire) ? src.fire : fire),\
|
||||
(isnull(acid) ? src.acid : acid),\
|
||||
(isnull(magic) ? src.magic : magic),\
|
||||
(isnull(wound) ? src.wound : wound))
|
||||
return getArmor((isnull(melee) ? src.melee : melee),\
|
||||
(isnull(bullet) ? src.bullet : bullet),\
|
||||
(isnull(laser) ? src.laser : laser),\
|
||||
(isnull(energy) ? src.energy : energy),\
|
||||
(isnull(bomb) ? src.bomb : bomb),\
|
||||
(isnull(bio) ? src.bio : bio),\
|
||||
(isnull(rad) ? src.rad : rad),\
|
||||
(isnull(fire) ? src.fire : fire),\
|
||||
(isnull(acid) ? src.acid : acid),\
|
||||
(isnull(magic) ? src.magic : magic),\
|
||||
(isnull(wound) ? src.wound : wound))
|
||||
|
||||
/datum/armor/proc/getRating(rating)
|
||||
return vars[rating]
|
||||
return vars[rating]
|
||||
|
||||
/datum/armor/proc/getList()
|
||||
return list(MELEE = melee, BULLET = bullet, LASER = laser, ENERGY = energy, BOMB = bomb, BIO = bio, RAD = rad, FIRE = fire, ACID = acid, MAGIC = magic, WOUND = wound)
|
||||
return list(MELEE = melee, BULLET = bullet, LASER = laser, ENERGY = energy, BOMB = bomb, BIO = bio, RAD = rad, FIRE = fire, ACID = acid, MAGIC = magic, WOUND = wound)
|
||||
|
||||
/datum/armor/proc/attachArmor(datum/armor/AA)
|
||||
return getArmor(melee+AA.melee, bullet+AA.bullet, laser+AA.laser, energy+AA.energy, bomb+AA.bomb, bio+AA.bio, rad+AA.rad, fire+AA.fire, acid+AA.acid, magic+AA.magic, wound+AA.wound)
|
||||
return getArmor(melee+AA.melee, bullet+AA.bullet, laser+AA.laser, energy+AA.energy, bomb+AA.bomb, bio+AA.bio, rad+AA.rad, fire+AA.fire, acid+AA.acid, magic+AA.magic, wound+AA.wound)
|
||||
|
||||
/datum/armor/proc/detachArmor(datum/armor/AA)
|
||||
return getArmor(melee-AA.melee, bullet-AA.bullet, laser-AA.laser, energy-AA.energy, bomb-AA.bomb, bio-AA.bio, rad-AA.rad, fire-AA.fire, acid-AA.acid, magic-AA.magic, wound-AA.wound)
|
||||
return getArmor(melee-AA.melee, bullet-AA.bullet, laser-AA.laser, energy-AA.energy, bomb-AA.bomb, bio-AA.bio, rad-AA.rad, fire-AA.fire, acid-AA.acid, magic-AA.magic, wound-AA.wound)
|
||||
|
||||
/datum/armor/vv_edit_var(var_name, var_value)
|
||||
if (var_name == NAMEOF(src, tag))
|
||||
return FALSE
|
||||
. = ..()
|
||||
tag = ARMORID // update tag in case armor values were edited
|
||||
if (var_name == NAMEOF(src, tag))
|
||||
return FALSE
|
||||
. = ..()
|
||||
tag = ARMORID // update tag in case armor values were edited
|
||||
|
||||
#undef ARMORID
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
lose_text = ""
|
||||
var/paralysis_type
|
||||
var/list/paralysis_traits = list()
|
||||
//for descriptions
|
||||
//for descriptions
|
||||
|
||||
/datum/brain_trauma/severe/paralysis/New(specific_type)
|
||||
if(specific_type)
|
||||
|
||||
+88
-88
@@ -1,53 +1,53 @@
|
||||
/**
|
||||
*# Callback Datums
|
||||
*A datum that holds a proc to be called on another object, used to track proccalls to other objects
|
||||
*
|
||||
* ## USAGE
|
||||
*
|
||||
* ```
|
||||
* var/datum/callback/C = new(object|null, /proc/type/path|"procstring", arg1, arg2, ... argn)
|
||||
* var/timerid = addtimer(C, time, timertype)
|
||||
* you can also use the compiler define shorthand
|
||||
* var/timerid = addtimer(CALLBACK(object|null, /proc/type/path|procstring, arg1, arg2, ... argn), time, timertype)
|
||||
* ```
|
||||
*
|
||||
* Note: proc strings can only be given for datum proc calls, global procs must be proc paths
|
||||
*
|
||||
* Also proc strings are strongly advised against because they don't compile error if the proc stops existing
|
||||
*
|
||||
* In some cases you can provide a shortform of the procname, see the proc typepath shortcuts documentation below
|
||||
*
|
||||
* ## INVOKING THE CALLBACK
|
||||
*`var/result = C.Invoke(args, to, add)` additional args are added after the ones given when the callback was created
|
||||
*
|
||||
* `var/result = C.InvokeAsync(args, to, add)` Asyncronous - returns . on the first sleep then continues on in the background
|
||||
* after the sleep/block ends, otherwise operates normally.
|
||||
*
|
||||
* ## PROC TYPEPATH SHORTCUTS
|
||||
* (these operate on paths, not types, so to these shortcuts, datum is NOT a parent of atom, etc...)
|
||||
*
|
||||
* ### global proc while in another global proc:
|
||||
* .procname
|
||||
*
|
||||
* `CALLBACK(GLOBAL_PROC, .some_proc_here)`
|
||||
*
|
||||
* ### proc defined on current(src) object (when in a /proc/ and not an override) OR overridden at src or any of it's parents:
|
||||
* .procname
|
||||
*
|
||||
* `CALLBACK(src, .some_proc_here)`
|
||||
*
|
||||
* ### when the above doesn't apply:
|
||||
*.proc/procname
|
||||
*
|
||||
* `CALLBACK(src, .proc/some_proc_here)`
|
||||
*
|
||||
*
|
||||
* proc defined on a parent of a some type
|
||||
*
|
||||
* `/some/type/.proc/some_proc_here`
|
||||
*
|
||||
* Otherwise you must always provide the full typepath of the proc (/type/of/thing/proc/procname)
|
||||
*/
|
||||
*# Callback Datums
|
||||
*A datum that holds a proc to be called on another object, used to track proccalls to other objects
|
||||
*
|
||||
* ## USAGE
|
||||
*
|
||||
* ```
|
||||
* var/datum/callback/C = new(object|null, /proc/type/path|"procstring", arg1, arg2, ... argn)
|
||||
* var/timerid = addtimer(C, time, timertype)
|
||||
* you can also use the compiler define shorthand
|
||||
* var/timerid = addtimer(CALLBACK(object|null, /proc/type/path|procstring, arg1, arg2, ... argn), time, timertype)
|
||||
* ```
|
||||
*
|
||||
* Note: proc strings can only be given for datum proc calls, global procs must be proc paths
|
||||
*
|
||||
* Also proc strings are strongly advised against because they don't compile error if the proc stops existing
|
||||
*
|
||||
* In some cases you can provide a shortform of the procname, see the proc typepath shortcuts documentation below
|
||||
*
|
||||
* ## INVOKING THE CALLBACK
|
||||
*`var/result = C.Invoke(args, to, add)` additional args are added after the ones given when the callback was created
|
||||
*
|
||||
* `var/result = C.InvokeAsync(args, to, add)` Asyncronous - returns . on the first sleep then continues on in the background
|
||||
* after the sleep/block ends, otherwise operates normally.
|
||||
*
|
||||
* ## PROC TYPEPATH SHORTCUTS
|
||||
* (these operate on paths, not types, so to these shortcuts, datum is NOT a parent of atom, etc...)
|
||||
*
|
||||
* ### global proc while in another global proc:
|
||||
* .procname
|
||||
*
|
||||
* `CALLBACK(GLOBAL_PROC, .some_proc_here)`
|
||||
*
|
||||
* ### proc defined on current(src) object (when in a /proc/ and not an override) OR overridden at src or any of it's parents:
|
||||
* .procname
|
||||
*
|
||||
* `CALLBACK(src, .some_proc_here)`
|
||||
*
|
||||
* ### when the above doesn't apply:
|
||||
*.proc/procname
|
||||
*
|
||||
* `CALLBACK(src, .proc/some_proc_here)`
|
||||
*
|
||||
*
|
||||
* proc defined on a parent of a some type
|
||||
*
|
||||
* `/some/type/.proc/some_proc_here`
|
||||
*
|
||||
* Otherwise you must always provide the full typepath of the proc (/type/of/thing/proc/procname)
|
||||
*/
|
||||
/datum/callback
|
||||
|
||||
///The object we will be calling the proc on
|
||||
@@ -60,13 +60,13 @@
|
||||
var/datum/weakref/user
|
||||
|
||||
/**
|
||||
* Create a new callback datum
|
||||
*
|
||||
* Arguments
|
||||
* * thingtocall the object to call the proc on
|
||||
* * proctocall the proc to call on the target object
|
||||
* * ... an optional list of extra arguments to pass to the proc
|
||||
*/
|
||||
* Create a new callback datum
|
||||
*
|
||||
* Arguments
|
||||
* * thingtocall the object to call the proc on
|
||||
* * proctocall the proc to call on the target object
|
||||
* * ... an optional list of extra arguments to pass to the proc
|
||||
*/
|
||||
/datum/callback/New(thingtocall, proctocall, ...)
|
||||
if (thingtocall)
|
||||
object = thingtocall
|
||||
@@ -76,13 +76,13 @@
|
||||
if(usr)
|
||||
user = WEAKREF(usr)
|
||||
/**
|
||||
* Immediately Invoke proctocall on thingtocall, with waitfor set to false
|
||||
*
|
||||
* Arguments:
|
||||
* * thingtocall Object to call on
|
||||
* * proctocall Proc to call on that object
|
||||
* * ... optional list of arguments to pass as arguments to the proc being called
|
||||
*/
|
||||
* Immediately Invoke proctocall on thingtocall, with waitfor set to false
|
||||
*
|
||||
* Arguments:
|
||||
* * thingtocall Object to call on
|
||||
* * proctocall Proc to call on that object
|
||||
* * ... optional list of arguments to pass as arguments to the proc being called
|
||||
*/
|
||||
/world/proc/ImmediateInvokeAsync(thingtocall, proctocall, ...)
|
||||
set waitfor = FALSE
|
||||
|
||||
@@ -97,13 +97,13 @@
|
||||
call(thingtocall, proctocall)(arglist(calling_arguments))
|
||||
|
||||
/**
|
||||
* Invoke this callback
|
||||
*
|
||||
* Calls the registered proc on the registered object, if the user ref
|
||||
* can be resolved it also inclues that as an arg
|
||||
*
|
||||
* If the datum being called on is varedited, the call is wrapped via [WrapAdminProcCall][/proc/WrapAdminProcCall]
|
||||
*/
|
||||
* Invoke this callback
|
||||
*
|
||||
* Calls the registered proc on the registered object, if the user ref
|
||||
* can be resolved it also inclues that as an arg
|
||||
*
|
||||
* If the datum being called on is varedited, the call is wrapped via [WrapAdminProcCall][/proc/WrapAdminProcCall]
|
||||
*/
|
||||
/datum/callback/proc/Invoke(...)
|
||||
if(!usr)
|
||||
var/datum/weakref/W = user
|
||||
@@ -130,13 +130,13 @@
|
||||
return call(object, delegate)(arglist(calling_arguments))
|
||||
|
||||
/**
|
||||
* Invoke this callback async (waitfor=false)
|
||||
*
|
||||
* Calls the registered proc on the registered object, if the user ref
|
||||
* can be resolved it also inclues that as an arg
|
||||
*
|
||||
* If the datum being called on is varedited, the call is wrapped via WrapAdminProcCall
|
||||
*/
|
||||
* Invoke this callback async (waitfor=false)
|
||||
*
|
||||
* Calls the registered proc on the registered object, if the user ref
|
||||
* can be resolved it also inclues that as an arg
|
||||
*
|
||||
* If the datum being called on is varedited, the call is wrapped via WrapAdminProcCall
|
||||
*/
|
||||
/datum/callback/proc/InvokeAsync(...)
|
||||
set waitfor = FALSE
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
/**
|
||||
Helper datum for the select callbacks proc
|
||||
*/
|
||||
*/
|
||||
/datum/callback_select
|
||||
var/list/finished
|
||||
var/pendingcount
|
||||
@@ -192,16 +192,16 @@
|
||||
finished[index] = rtn
|
||||
|
||||
/**
|
||||
* Runs a list of callbacks asyncronously, returning only when all have finished
|
||||
*
|
||||
* Callbacks can be repeated, to call it multiple times
|
||||
*
|
||||
* Arguments:
|
||||
* * list/callbacks the list of callbacks to be called
|
||||
* * list/callback_args the list of lists of arguments to pass into each callback
|
||||
* * savereturns Optionally save and return the list of returned values from each of the callbacks
|
||||
* * resolution The number of byond ticks between each time you check if all callbacks are complete
|
||||
*/
|
||||
* Runs a list of callbacks asyncronously, returning only when all have finished
|
||||
*
|
||||
* Callbacks can be repeated, to call it multiple times
|
||||
*
|
||||
* Arguments:
|
||||
* * list/callbacks the list of callbacks to be called
|
||||
* * list/callback_args the list of lists of arguments to pass into each callback
|
||||
* * savereturns Optionally save and return the list of returned values from each of the callbacks
|
||||
* * resolution The number of byond ticks between each time you check if all callbacks are complete
|
||||
*/
|
||||
/proc/callback_select(list/callbacks, list/callback_args, savereturns = TRUE, resolution = 1)
|
||||
if (!callbacks)
|
||||
return
|
||||
|
||||
+49
-49
@@ -24,10 +24,10 @@
|
||||
#define WXH_TO_HEIGHT(x) text2num(copytext(x, findtextEx(x, "x") + 1))
|
||||
|
||||
/**
|
||||
* # Chat Message Overlay
|
||||
*
|
||||
* Datum for generating a message overlay on the map
|
||||
*/
|
||||
* # Chat Message Overlay
|
||||
*
|
||||
* Datum for generating a message overlay on the map
|
||||
*/
|
||||
/datum/chatmessage
|
||||
/// The visual element of the chat messsage
|
||||
var/image/message
|
||||
@@ -49,16 +49,16 @@
|
||||
var/static/current_z_idx = 0
|
||||
|
||||
/**
|
||||
* Constructs a chat message overlay
|
||||
*
|
||||
* Arguments:
|
||||
* * text - The text content of the overlay
|
||||
* * target - The target atom to display the overlay at
|
||||
* * owner - The mob that owns this overlay, only this mob will be able to view it
|
||||
* * language - The language this message was spoken in
|
||||
* * extra_classes - Extra classes to apply to the span that holds the text
|
||||
* * lifespan - The lifespan of the message in deciseconds
|
||||
*/
|
||||
* Constructs a chat message overlay
|
||||
*
|
||||
* Arguments:
|
||||
* * text - The text content of the overlay
|
||||
* * target - The target atom to display the overlay at
|
||||
* * owner - The mob that owns this overlay, only this mob will be able to view it
|
||||
* * language - The language this message was spoken in
|
||||
* * extra_classes - Extra classes to apply to the span that holds the text
|
||||
* * lifespan - The lifespan of the message in deciseconds
|
||||
*/
|
||||
/datum/chatmessage/New(text, atom/target, mob/owner, datum/language/language, list/extra_classes = list(), lifespan = CHAT_MESSAGE_LIFESPAN)
|
||||
. = ..()
|
||||
if (!istype(target))
|
||||
@@ -81,24 +81,24 @@
|
||||
return ..()
|
||||
|
||||
/**
|
||||
* Calls qdel on the chatmessage when its parent is deleted, used to register qdel signal
|
||||
*/
|
||||
* Calls qdel on the chatmessage when its parent is deleted, used to register qdel signal
|
||||
*/
|
||||
/datum/chatmessage/proc/on_parent_qdel()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
qdel(src)
|
||||
|
||||
/**
|
||||
* Generates a chat message image representation
|
||||
*
|
||||
* Arguments:
|
||||
* * text - The text content of the overlay
|
||||
* * target - The target atom to display the overlay at
|
||||
* * owner - The mob that owns this overlay, only this mob will be able to view it
|
||||
* * language - The language this message was spoken in
|
||||
* * extra_classes - Extra classes to apply to the span that holds the text
|
||||
* * lifespan - The lifespan of the message in deciseconds
|
||||
*/
|
||||
* Generates a chat message image representation
|
||||
*
|
||||
* Arguments:
|
||||
* * text - The text content of the overlay
|
||||
* * target - The target atom to display the overlay at
|
||||
* * owner - The mob that owns this overlay, only this mob will be able to view it
|
||||
* * language - The language this message was spoken in
|
||||
* * extra_classes - Extra classes to apply to the span that holds the text
|
||||
* * lifespan - The lifespan of the message in deciseconds
|
||||
*/
|
||||
/datum/chatmessage/proc/generate_image(text, atom/target, mob/owner, datum/language/language, list/extra_classes, lifespan)
|
||||
/// Cached icons to show what language the user is speaking
|
||||
var/static/list/language_icons
|
||||
@@ -208,26 +208,26 @@
|
||||
enter_subsystem()
|
||||
|
||||
/**
|
||||
* Applies final animations to overlay CHAT_MESSAGE_EOL_FADE deciseconds prior to message deletion,
|
||||
* sets time for scheduling deletion and re-enters the runechat SS for qdeling
|
||||
*
|
||||
* Arguments:
|
||||
* * fadetime - The amount of time to animate the message's fadeout for
|
||||
*/
|
||||
* Applies final animations to overlay CHAT_MESSAGE_EOL_FADE deciseconds prior to message deletion,
|
||||
* sets time for scheduling deletion and re-enters the runechat SS for qdeling
|
||||
*
|
||||
* Arguments:
|
||||
* * fadetime - The amount of time to animate the message's fadeout for
|
||||
*/
|
||||
/datum/chatmessage/proc/end_of_life(fadetime = CHAT_MESSAGE_EOL_FADE)
|
||||
eol_complete = scheduled_destruction + fadetime
|
||||
animate(message, alpha = 0, time = fadetime, flags = ANIMATION_PARALLEL)
|
||||
enter_subsystem(eol_complete) // re-enter the runechat SS with the EOL completion time to QDEL self
|
||||
|
||||
/**
|
||||
* Creates a message overlay at a defined location for a given speaker
|
||||
*
|
||||
* Arguments:
|
||||
* * speaker - The atom who is saying this message
|
||||
* * message_language - The language that the message is said in
|
||||
* * raw_message - The text content of the message
|
||||
* * spans - Additional classes to be added to the message
|
||||
*/
|
||||
* Creates a message overlay at a defined location for a given speaker
|
||||
*
|
||||
* Arguments:
|
||||
* * speaker - The atom who is saying this message
|
||||
* * message_language - The language that the message is said in
|
||||
* * raw_message - The text content of the message
|
||||
* * spans - Additional classes to be added to the message
|
||||
*/
|
||||
/mob/proc/create_chat_message(atom/movable/speaker, datum/language/message_language, raw_message, list/spans, runechat_flags = NONE)
|
||||
// Ensure the list we are using, if present, is a copy so we don't modify the list provided to us
|
||||
spans = spans ? spans.Copy() : list()
|
||||
@@ -257,15 +257,15 @@
|
||||
#define CM_COLOR_LUM_MAX 0.75
|
||||
|
||||
/**
|
||||
* Gets a color for a name, will return the same color for a given string consistently within a round.atom
|
||||
*
|
||||
* Note that this proc aims to produce pastel-ish colors using the HSL colorspace. These seem to be favorable for displaying on the map.
|
||||
*
|
||||
* Arguments:
|
||||
* * name - The name to generate a color for
|
||||
* * sat_shift - A value between 0 and 1 that will be multiplied against the saturation
|
||||
* * lum_shift - A value between 0 and 1 that will be multiplied against the luminescence
|
||||
*/
|
||||
* Gets a color for a name, will return the same color for a given string consistently within a round.atom
|
||||
*
|
||||
* Note that this proc aims to produce pastel-ish colors using the HSL colorspace. These seem to be favorable for displaying on the map.
|
||||
*
|
||||
* Arguments:
|
||||
* * name - The name to generate a color for
|
||||
* * sat_shift - A value between 0 and 1 that will be multiplied against the saturation
|
||||
* * lum_shift - A value between 0 and 1 that will be multiplied against the luminescence
|
||||
*/
|
||||
/datum/chatmessage/proc/colorize_string(name, sat_shift = 1, lum_shift = 1)
|
||||
// seed to help randomness
|
||||
var/static/rseed = rand(1,26)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/**
|
||||
* # 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
|
||||
@@ -39,13 +39,13 @@
|
||||
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)
|
||||
@@ -57,20 +57,20 @@
|
||||
_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
|
||||
*
|
||||
* Arguments:
|
||||
* * force - makes it not check for and remove the component from the parent
|
||||
* * silent - deletes the component without sending a [COMSIG_COMPONENT_REMOVING] signal
|
||||
*/
|
||||
* Properly removes the component from `parent` and cleans up references
|
||||
*
|
||||
* Arguments:
|
||||
* * force - makes it not check for and remove the component from the parent
|
||||
* * silent - deletes the component without sending a [COMSIG_COMPONENT_REMOVING] signal
|
||||
*/
|
||||
/datum/component/Destroy(force=FALSE, silent=FALSE)
|
||||
if(!force && parent)
|
||||
_RemoveFromParent()
|
||||
@@ -80,8 +80,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
|
||||
@@ -118,8 +118,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
|
||||
@@ -139,39 +139,39 @@
|
||||
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 receive 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 receive 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
|
||||
@@ -205,16 +205,16 @@
|
||||
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)
|
||||
@@ -247,50 +247,50 @@
|
||||
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
|
||||
@@ -301,12 +301,12 @@
|
||||
. += 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))
|
||||
@@ -325,13 +325,13 @@
|
||||
|
||||
// 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 || initial(c_type.dupe_mode) == COMPONENT_DUPE_SELECTIVE)
|
||||
@@ -345,13 +345,13 @@
|
||||
|
||||
// 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 || initial(c_type.dupe_mode) == COMPONENT_DUPE_SELECTIVE)
|
||||
@@ -368,11 +368,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)
|
||||
@@ -382,16 +382,16 @@
|
||||
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 a 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 a 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
|
||||
@@ -459,22 +459,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
|
||||
@@ -485,13 +485,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
|
||||
@@ -509,13 +509,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)
|
||||
@@ -531,7 +531,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,9 +1,9 @@
|
||||
/** Component representing acid applied to an object.
|
||||
*
|
||||
* Must be attached to an atom.
|
||||
* Processes, repeatedly damaging whatever it is attached to.
|
||||
* If the parent atom is a turf it applies acid to the contents of the turf.
|
||||
*/
|
||||
*
|
||||
* Must be attached to an atom.
|
||||
* Processes, repeatedly damaging whatever it is attached to.
|
||||
* If the parent atom is a turf it applies acid to the contents of the turf.
|
||||
*/
|
||||
/datum/component/acid
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
/// The strength of the acid on the parent [/atom].
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/**
|
||||
* Beauty component, makes the indoor area the parent is in prettier or uglier depending on the beauty var.
|
||||
* Clean and well decorated areas lead to positive moodlets for passerbies, while shabbier, dirtier ones
|
||||
* lead to negative moodlets exclusive to characters with the snob quirk.
|
||||
*
|
||||
* Keep in mind AddComponent is used for BOTH adding and removing beauty value here,
|
||||
* so please don't use qdel/RemoveComponent unless necessary.
|
||||
*/
|
||||
* Beauty component, makes the indoor area the parent is in prettier or uglier depending on the beauty var.
|
||||
* Clean and well decorated areas lead to positive moodlets for passerbies, while shabbier, dirtier ones
|
||||
* lead to negative moodlets exclusive to characters with the snob quirk.
|
||||
*
|
||||
* Keep in mind AddComponent is used for BOTH adding and removing beauty value here,
|
||||
* so please don't use qdel/RemoveComponent unless necessary.
|
||||
*/
|
||||
/datum/component/beauty
|
||||
var/beauty = 0
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/**
|
||||
* Component for clothing items that can pick up blood from decals and spread it around everywhere when walking, such as shoes or suits with integrated shoes.
|
||||
*/
|
||||
* Component for clothing items that can pick up blood from decals and spread it around everywhere when walking, such as shoes or suits with integrated shoes.
|
||||
*/
|
||||
/datum/component/bloodysoles
|
||||
/// The type of the last grub pool we stepped in, used to decide the type of footprints to make
|
||||
var/last_blood_state = BLOOD_STATE_NOT_BLOODY
|
||||
@@ -31,8 +31,8 @@
|
||||
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/on_clean)
|
||||
|
||||
/**
|
||||
* Unregisters from the wielder if necessary
|
||||
*/
|
||||
* Unregisters from the wielder if necessary
|
||||
*/
|
||||
/datum/component/bloodysoles/proc/unregister()
|
||||
if(!QDELETED(wielder))
|
||||
UnregisterSignal(wielder, COMSIG_MOVABLE_MOVED)
|
||||
@@ -41,21 +41,21 @@
|
||||
equipped_slot = null
|
||||
|
||||
/**
|
||||
* Returns true if the parent item is obscured by something else that the wielder is wearing
|
||||
*/
|
||||
* Returns true if the parent item is obscured by something else that the wielder is wearing
|
||||
*/
|
||||
/datum/component/bloodysoles/proc/is_obscured()
|
||||
return wielder.check_obscured_slots(TRUE) & equipped_slot
|
||||
|
||||
/**
|
||||
* Run to update the icon of the parent
|
||||
*/
|
||||
* Run to update the icon of the parent
|
||||
*/
|
||||
/datum/component/bloodysoles/proc/update_icon()
|
||||
var/obj/item/parent_item = parent
|
||||
parent_item.update_slot_icon()
|
||||
|
||||
/**
|
||||
* Run to equally share the blood between us and a decal
|
||||
*/
|
||||
* Run to equally share the blood between us and a decal
|
||||
*/
|
||||
/datum/component/bloodysoles/proc/share_blood(obj/effect/decal/cleanable/pool)
|
||||
last_blood_state = pool.blood_state
|
||||
|
||||
@@ -72,24 +72,24 @@
|
||||
update_icon()
|
||||
|
||||
/**
|
||||
* Find a blood decal on a turf that matches our last_blood_state
|
||||
*/
|
||||
* Find a blood decal on a turf that matches our last_blood_state
|
||||
*/
|
||||
/datum/component/bloodysoles/proc/find_pool_by_blood_state(turf/turfLoc, typeFilter = null)
|
||||
for(var/obj/effect/decal/cleanable/blood/pool in turfLoc)
|
||||
if(pool.blood_state == last_blood_state && (!typeFilter || istype(pool, typeFilter)))
|
||||
return pool
|
||||
|
||||
/**
|
||||
* Adds the parent type to the footprint's shoe_types var
|
||||
*/
|
||||
* Adds the parent type to the footprint's shoe_types var
|
||||
*/
|
||||
/datum/component/bloodysoles/proc/add_parent_to_footprint(obj/effect/decal/cleanable/blood/footprints/FP)
|
||||
FP.shoe_types |= parent.type
|
||||
|
||||
/**
|
||||
* Called when the parent item is equipped by someone
|
||||
*
|
||||
* Used to register our wielder
|
||||
*/
|
||||
* Called when the parent item is equipped by someone
|
||||
*
|
||||
* Used to register our wielder
|
||||
*/
|
||||
/datum/component/bloodysoles/proc/on_equip(datum/source, mob/equipper, slot)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -106,20 +106,20 @@
|
||||
RegisterSignal(wielder, COMSIG_STEP_ON_BLOOD, .proc/on_step_blood)
|
||||
|
||||
/**
|
||||
* Called when the parent item has been dropped
|
||||
*
|
||||
* Used to deregister our wielder
|
||||
*/
|
||||
* Called when the parent item has been dropped
|
||||
*
|
||||
* Used to deregister our wielder
|
||||
*/
|
||||
/datum/component/bloodysoles/proc/on_drop(datum/source, mob/dropper)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
unregister()
|
||||
|
||||
/**
|
||||
* Called when the wielder has moved
|
||||
*
|
||||
* Used to make bloody footprints on the ground
|
||||
*/
|
||||
* Called when the wielder has moved
|
||||
*
|
||||
* Used to make bloody footprints on the ground
|
||||
*/
|
||||
/datum/component/bloodysoles/proc/on_moved(datum/source, OldLoc, Dir, Forced)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -176,10 +176,10 @@
|
||||
|
||||
|
||||
/**
|
||||
* Called when the wielder steps in a pool of blood
|
||||
*
|
||||
* Used to make the parent item bloody
|
||||
*/
|
||||
* Called when the wielder steps in a pool of blood
|
||||
*
|
||||
* Used to make the parent item bloody
|
||||
*/
|
||||
/datum/component/bloodysoles/proc/on_step_blood(datum/source, obj/effect/decal/cleanable/pool)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -200,8 +200,8 @@
|
||||
last_pickup = world.time
|
||||
|
||||
/**
|
||||
* Called when the parent item is being washed
|
||||
*/
|
||||
* Called when the parent item is being washed
|
||||
*/
|
||||
/datum/component/bloodysoles/proc/on_clean(datum/source, clean_types)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -215,8 +215,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* Like its parent but can be applied to carbon mobs instead of clothing items
|
||||
*/
|
||||
* Like its parent but can be applied to carbon mobs instead of clothing items
|
||||
*/
|
||||
/datum/component/bloodysoles/feet
|
||||
var/static/mutable_appearance/bloody_feet
|
||||
|
||||
|
||||
@@ -60,12 +60,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Check that the contents of the recipe meet the requirements.
|
||||
*
|
||||
* user: The /mob that initated the crafting.
|
||||
* R: The /datum/crafting_recipe being attempted.
|
||||
* contents: List of items to search for R's reqs.
|
||||
*/
|
||||
* Check that the contents of the recipe meet the requirements.
|
||||
*
|
||||
* user: The /mob that initated the crafting.
|
||||
* R: The /datum/crafting_recipe being attempted.
|
||||
* contents: List of items to search for R's reqs.
|
||||
*/
|
||||
/datum/component/personal_crafting/proc/check_contents(atom/a, datum/crafting_recipe/R, list/contents)
|
||||
var/list/item_instances = contents["instances"]
|
||||
contents = contents["other"]
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
blacklist += result
|
||||
|
||||
/**
|
||||
* Run custom pre-craft checks for this recipe
|
||||
*
|
||||
* user: The /mob that initiated the crafting
|
||||
* collected_requirements: A list of lists of /obj/item instances that satisfy reqs. Top level list is keyed by requirement path.
|
||||
*/
|
||||
* Run custom pre-craft checks for this recipe
|
||||
*
|
||||
* user: The /mob that initiated the crafting
|
||||
* collected_requirements: A list of lists of /obj/item instances that satisfy reqs. Top level list is keyed by requirement path.
|
||||
*/
|
||||
/datum/crafting_recipe/proc/check_requirements(mob/user, list/collected_requirements)
|
||||
return TRUE
|
||||
|
||||
@@ -820,8 +820,9 @@
|
||||
name = "Collosal Rib"
|
||||
always_available = FALSE
|
||||
reqs = list(
|
||||
/obj/item/stack/sheet/bone = 10,
|
||||
/datum/reagent/fuel/oil = 5)
|
||||
/obj/item/stack/sheet/bone = 10,
|
||||
/datum/reagent/fuel/oil = 5,
|
||||
)
|
||||
result = /obj/structure/statue/bone/rib
|
||||
subcategory = CAT_PRIMAL
|
||||
|
||||
@@ -829,8 +830,9 @@
|
||||
name = "Skull Carving"
|
||||
always_available = FALSE
|
||||
reqs = list(
|
||||
/obj/item/stack/sheet/bone = 6,
|
||||
/datum/reagent/fuel/oil = 5)
|
||||
/obj/item/stack/sheet/bone = 6,
|
||||
/datum/reagent/fuel/oil = 5,
|
||||
)
|
||||
result = /obj/structure/statue/bone/skull
|
||||
category = CAT_PRIMAL
|
||||
|
||||
@@ -838,8 +840,9 @@
|
||||
name = "Cracked Skull Carving"
|
||||
always_available = FALSE
|
||||
reqs = list(
|
||||
/obj/item/stack/sheet/bone = 3,
|
||||
/datum/reagent/fuel/oil = 5)
|
||||
/obj/item/stack/sheet/bone = 3,
|
||||
/datum/reagent/fuel/oil = 5,
|
||||
)
|
||||
result = /obj/structure/statue/bone/skull/half
|
||||
category = CAT_PRIMAL
|
||||
|
||||
@@ -847,42 +850,47 @@
|
||||
name = "Serrated Bone Shovel"
|
||||
always_available = FALSE
|
||||
reqs = list(
|
||||
/obj/item/stack/sheet/bone = 4,
|
||||
/datum/reagent/fuel/oil = 5,
|
||||
/obj/item/shovel/spade = 1)
|
||||
/obj/item/stack/sheet/bone = 4,
|
||||
/datum/reagent/fuel/oil = 5,
|
||||
/obj/item/shovel/spade = 1,
|
||||
)
|
||||
result = /obj/item/shovel/serrated
|
||||
category = CAT_PRIMAL
|
||||
|
||||
/datum/crafting_recipe/lasso
|
||||
name = "Bone Lasso"
|
||||
reqs = list(
|
||||
/obj/item/stack/sheet/bone = 1,
|
||||
/obj/item/stack/sheet/sinew = 5)
|
||||
/obj/item/stack/sheet/bone = 1,
|
||||
/obj/item/stack/sheet/sinew = 5,
|
||||
)
|
||||
result = /obj/item/key/lasso
|
||||
category = CAT_PRIMAL
|
||||
|
||||
/datum/crafting_recipe/gripperoffbrand
|
||||
name = "Improvised Gripper Gloves"
|
||||
reqs = list(
|
||||
/obj/item/clothing/gloves/fingerless = 1,
|
||||
/obj/item/stack/sticky_tape = 1)
|
||||
/obj/item/clothing/gloves/fingerless = 1,
|
||||
/obj/item/stack/sticky_tape = 1,
|
||||
)
|
||||
result = /obj/item/clothing/gloves/tackler/offbrand
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/boh
|
||||
name = "Bag of Holding"
|
||||
reqs = list(
|
||||
/obj/item/bag_of_holding_inert = 1,
|
||||
/obj/item/assembly/signaler/anomaly/bluespace = 1)
|
||||
/obj/item/bag_of_holding_inert = 1,
|
||||
/obj/item/assembly/signaler/anomaly/bluespace = 1,
|
||||
)
|
||||
result = /obj/item/storage/backpack/holding
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/ipickaxe
|
||||
name = "Improvised Pickaxe"
|
||||
reqs = list(
|
||||
/obj/item/crowbar = 1,
|
||||
/obj/item/kitchen/knife = 1,
|
||||
/obj/item/stack/sticky_tape = 1)
|
||||
/obj/item/crowbar = 1,
|
||||
/obj/item/kitchen/knife = 1,
|
||||
/obj/item/stack/sticky_tape = 1,
|
||||
)
|
||||
result = /obj/item/pickaxe/improvised
|
||||
category = CAT_MISC
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ GLOBAL_LIST_INIT(creamable, typecacheof(list(
|
||||
/mob/living/silicon/ai)))
|
||||
|
||||
/**
|
||||
* Creamed component
|
||||
*
|
||||
* For when you have pie on your face
|
||||
*/
|
||||
* Creamed component
|
||||
*
|
||||
* For when you have pie on your face
|
||||
*/
|
||||
/datum/component/creamed
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* A component to reset the parent to its previous state after some time passes
|
||||
*/
|
||||
* A component to reset the parent to its previous state after some time passes
|
||||
*/
|
||||
/datum/component/dejavu
|
||||
/// The turf the parent was on when this components was applied, they get moved back here after the duration
|
||||
var/turf/starting_turf
|
||||
@@ -35,7 +35,7 @@
|
||||
starting_turf = get_turf(parent)
|
||||
rewinds_remaining = rewinds
|
||||
rewind_interval = interval
|
||||
|
||||
|
||||
if(isliving(parent))
|
||||
var/mob/living/L = parent
|
||||
clone_loss = L.getCloneLoss()
|
||||
@@ -43,22 +43,22 @@
|
||||
oxy_loss = L.getOxyLoss()
|
||||
brain_loss = L.getOrganLoss(ORGAN_SLOT_BRAIN)
|
||||
rewind_type = .proc/rewind_living
|
||||
|
||||
|
||||
if(iscarbon(parent))
|
||||
var/mob/living/carbon/C = parent
|
||||
saved_bodyparts = C.save_bodyparts()
|
||||
rewind_type = .proc/rewind_carbon
|
||||
|
||||
|
||||
else if(isanimal(parent))
|
||||
var/mob/living/simple_animal/M = parent
|
||||
brute_loss = M.bruteloss
|
||||
rewind_type = .proc/rewind_animal
|
||||
|
||||
|
||||
else if(isobj(parent))
|
||||
var/obj/O = parent
|
||||
integrity = O.obj_integrity
|
||||
rewind_type = .proc/rewind_obj
|
||||
|
||||
|
||||
addtimer(CALLBACK(src, rewind_type), rewind_interval)
|
||||
|
||||
/datum/component/dejavu/Destroy()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_act)
|
||||
|
||||
/datum/component/forensics/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_COMPONENT_CLEAN_ACT))
|
||||
UnregisterSignal(parent, list(COMSIG_COMPONENT_CLEAN_ACT))
|
||||
|
||||
/datum/component/forensics/PostTransfer()
|
||||
if(!isatom(parent))
|
||||
|
||||
@@ -47,13 +47,13 @@
|
||||
|
||||
|
||||
/**
|
||||
* Throw a target in a direction
|
||||
*
|
||||
* Arguments:
|
||||
* * target - Target atom to throw
|
||||
* * thrower - Thing that caused this atom to be thrown
|
||||
* * throw_dir - Direction to throw the atom
|
||||
*/
|
||||
* Throw a target in a direction
|
||||
*
|
||||
* Arguments:
|
||||
* * target - Target atom to throw
|
||||
* * thrower - Thing that caused this atom to be thrown
|
||||
* * throw_dir - Direction to throw the atom
|
||||
*/
|
||||
/datum/component/knockback/proc/do_knockback(atom/target, mob/thrower, throw_dir)
|
||||
if(!ismovable(target) || throw_dir == null)
|
||||
return
|
||||
|
||||
@@ -196,14 +196,14 @@
|
||||
qdel(src)
|
||||
|
||||
/**
|
||||
* Handles how nanites leave the host's body if they find out that they're currently exceeding the maximum supported amount
|
||||
*
|
||||
* IC explanation:
|
||||
* Normally nanites simply discard excess volume by slowing replication or 'sweating' it out in imperceptible amounts,
|
||||
* but if there is a large excess volume, likely due to a programming change that leaves them unable to support their current volume,
|
||||
* the nanites attempt to leave the host as fast as necessary to prevent nanite poisoning. This can range from minor oozing to nanites
|
||||
* rapidly bursting out from every possible pathway, causing temporary inconvenience to the host.
|
||||
*/
|
||||
* Handles how nanites leave the host's body if they find out that they're currently exceeding the maximum supported amount
|
||||
*
|
||||
* IC explanation:
|
||||
* Normally nanites simply discard excess volume by slowing replication or 'sweating' it out in imperceptible amounts,
|
||||
* but if there is a large excess volume, likely due to a programming change that leaves them unable to support their current volume,
|
||||
* the nanites attempt to leave the host as fast as necessary to prevent nanite poisoning. This can range from minor oozing to nanites
|
||||
* rapidly bursting out from every possible pathway, causing temporary inconvenience to the host.
|
||||
*/
|
||||
/datum/component/nanites/proc/reject_excess_nanites()
|
||||
var/excess = nanite_volume - max_nanites
|
||||
nanite_volume = max_nanites
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/**
|
||||
* omen.dm: For when you want someone to have a really bad day
|
||||
*
|
||||
* When you attach an omen component to someone, they start running the risk of all sorts of bad environmental injuries, like nearby vending machines randomly falling on you,
|
||||
* or hitting your head really hard when you slip and fall, or... well, for now those two are all I have. More will come.
|
||||
*
|
||||
* Omens are removed once the victim is either maimed by one of the possible injuries, or if they receive a blessing (read: bashing with a bible) from the chaplain.
|
||||
*/
|
||||
* omen.dm: For when you want someone to have a really bad day
|
||||
*
|
||||
* When you attach an omen component to someone, they start running the risk of all sorts of bad environmental injuries, like nearby vending machines randomly falling on you,
|
||||
* or hitting your head really hard when you slip and fall, or... well, for now those two are all I have. More will come.
|
||||
*
|
||||
* Omens are removed once the victim is either maimed by one of the possible injuries, or if they receive a blessing (read: bashing with a bible) from the chaplain.
|
||||
*/
|
||||
/datum/component/omen
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
|
||||
@@ -45,11 +45,11 @@
|
||||
UnregisterSignal(parent, list(COMSIG_LIVING_STATUS_KNOCKDOWN, COMSIG_MOVABLE_MOVED, COMSIG_ADD_MOOD_EVENT))
|
||||
|
||||
/**
|
||||
* check_accident() is called each step we take
|
||||
*
|
||||
* While we're walking around, roll to see if there's any environmental hazards (currently only vending machines) on one of the adjacent tiles we can trigger.
|
||||
* We do the prob() at the beginning to A. add some tension for /when/ it will strike, and B. (more importantly) ameliorate the fact that we're checking up to 5 turfs's contents each time
|
||||
*/
|
||||
* check_accident() is called each step we take
|
||||
*
|
||||
* While we're walking around, roll to see if there's any environmental hazards (currently only vending machines) on one of the adjacent tiles we can trigger.
|
||||
* We do the prob() at the beginning to A. add some tension for /when/ it will strike, and B. (more importantly) ameliorate the fact that we're checking up to 5 turfs's contents each time
|
||||
*/
|
||||
/datum/component/omen/proc/check_accident(atom/movable/our_guy)
|
||||
SIGNAL_HANDLER_DOES_SLEEP
|
||||
|
||||
|
||||
@@ -10,20 +10,20 @@
|
||||
#define SHORT_CAST 2
|
||||
|
||||
/**
|
||||
* Movable atom overlay-based lighting component.
|
||||
*
|
||||
* * Component works by applying a visual object to the parent target.
|
||||
*
|
||||
* * The component tracks the parent's loc to determine the current_holder.
|
||||
* * The current_holder is either the parent or its loc, whichever is on a turf. If none, then the current_holder is null and the light is not visible.
|
||||
*
|
||||
* * Lighting works at its base by applying a dark overlay and "cutting" said darkness with light, adding (possibly colored) transparency.
|
||||
* * This component uses the visible_mask visual object to apply said light mask on the darkness.
|
||||
*
|
||||
* * The main limitation of this system is that it uses a limited number of pre-baked geometrical shapes, but for most uses it does the job.
|
||||
*
|
||||
* * Another limitation is for big lights: you only see the light if you see the object emiting it.
|
||||
* * For small objects this is good (you can't see them behind a wall), but for big ones this quickly becomes prety clumsy.
|
||||
* Movable atom overlay-based lighting component.
|
||||
*
|
||||
* * Component works by applying a visual object to the parent target.
|
||||
*
|
||||
* * The component tracks the parent's loc to determine the current_holder.
|
||||
* * The current_holder is either the parent or its loc, whichever is on a turf. If none, then the current_holder is null and the light is not visible.
|
||||
*
|
||||
* * Lighting works at its base by applying a dark overlay and "cutting" said darkness with light, adding (possibly colored) transparency.
|
||||
* * This component uses the visible_mask visual object to apply said light mask on the darkness.
|
||||
*
|
||||
* * The main limitation of this system is that it uses a limited number of pre-baked geometrical shapes, but for most uses it does the job.
|
||||
*
|
||||
* * Another limitation is for big lights: you only see the light if you see the object emiting it.
|
||||
* * For small objects this is good (you can't see them behind a wall), but for big ones this quickly becomes prety clumsy.
|
||||
*/
|
||||
/datum/component/overlay_lighting
|
||||
///How far the light reaches, float.
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
|
||||
/**
|
||||
* Handles simple payment operations where the cost of the object in question doesn't change.
|
||||
*
|
||||
* What this is useful for:
|
||||
* Basic forms of vending.
|
||||
* Objects that can drain the owner's money linearly.
|
||||
* What this is not useful for:
|
||||
* Things where the seller may want to fluxuate the price of the object.
|
||||
* Improving standardizing every form of payment handing, as some custom handling is specific to that object.
|
||||
**/
|
||||
* Handles simple payment operations where the cost of the object in question doesn't change.
|
||||
*
|
||||
* What this is useful for:
|
||||
* Basic forms of vending.
|
||||
* Objects that can drain the owner's money linearly.
|
||||
* What this is not useful for:
|
||||
* Things where the seller may want to fluxuate the price of the object.
|
||||
* Improving standardizing every form of payment handing, as some custom handling is specific to that object.
|
||||
**/
|
||||
/datum/component/payment
|
||||
///Standardized of operation.
|
||||
var/cost = 10
|
||||
|
||||
@@ -92,11 +92,11 @@
|
||||
UnregisterSignal(parent, list(COMSIG_PARENT_PREQDELETED, COMSIG_PELLET_CLOUD_INIT, COMSIG_GRENADE_DETONATE, COMSIG_GRENADE_ARMED, COMSIG_MOVABLE_MOVED, COMSIG_MOVABLE_UNCROSSED, COMSIG_MINE_TRIGGERED, COMSIG_ITEM_DROPPED))
|
||||
|
||||
/**
|
||||
* create_casing_pellets() is for directed pellet clouds for ammo casings that have multiple pellets (buckshot and scatter lasers for instance)
|
||||
*
|
||||
* Honestly this is mostly just a rehash of [/obj/item/ammo_casing/proc/fire_casing] for pellet counts > 1, except this lets us tamper with the pellets and hook onto them for tracking purposes.
|
||||
* The arguments really don't matter, this proc is triggered by COMSIG_PELLET_CLOUD_INIT which is only for this really, it's just a big mess of the state vars we need for doing the stuff over here.
|
||||
*/
|
||||
* create_casing_pellets() is for directed pellet clouds for ammo casings that have multiple pellets (buckshot and scatter lasers for instance)
|
||||
*
|
||||
* Honestly this is mostly just a rehash of [/obj/item/ammo_casing/proc/fire_casing] for pellet counts > 1, except this lets us tamper with the pellets and hook onto them for tracking purposes.
|
||||
* The arguments really don't matter, this proc is triggered by COMSIG_PELLET_CLOUD_INIT which is only for this really, it's just a big mess of the state vars we need for doing the stuff over here.
|
||||
*/
|
||||
/datum/component/pellet_cloud/proc/create_casing_pellets(obj/item/ammo_casing/shell, atom/target, mob/living/user, fired_from, randomspread, spread, zone_override, params, distro)
|
||||
SIGNAL_HANDLER_DOES_SLEEP
|
||||
|
||||
@@ -130,15 +130,15 @@
|
||||
shell.newshot()
|
||||
|
||||
/**
|
||||
* create_blast_pellets() is for when we have a central point we want to shred the surroundings of with a ring of shrapnel, namely frag grenades and landmines.
|
||||
*
|
||||
* Note that grenades have extra handling for someone throwing themselves/being thrown on top of it, see [/datum/component/pellet_cloud/proc/handle_martyrs]
|
||||
* Landmines just have a small check for [/obj/effect/mine/shrapnel/var/shred_triggerer], and spawn extra shrapnel for them if so
|
||||
*
|
||||
* Arguments:
|
||||
* * O- Our parent, the thing making the shrapnel obviously (grenade or landmine)
|
||||
* * punishable_triggerer- For grenade lances or people who step on the landmines (if we shred the triggerer), we spawn extra shrapnel for them in addition to the normal spread
|
||||
*/
|
||||
* create_blast_pellets() is for when we have a central point we want to shred the surroundings of with a ring of shrapnel, namely frag grenades and landmines.
|
||||
*
|
||||
* Note that grenades have extra handling for someone throwing themselves/being thrown on top of it, see [/datum/component/pellet_cloud/proc/handle_martyrs]
|
||||
* Landmines just have a small check for [/obj/effect/mine/shrapnel/var/shred_triggerer], and spawn extra shrapnel for them if so
|
||||
*
|
||||
* Arguments:
|
||||
* * O- Our parent, the thing making the shrapnel obviously (grenade or landmine)
|
||||
* * punishable_triggerer- For grenade lances or people who step on the landmines (if we shred the triggerer), we spawn extra shrapnel for them in addition to the normal spread
|
||||
*/
|
||||
/datum/component/pellet_cloud/proc/create_blast_pellets(obj/O, mob/living/punishable_triggerer)
|
||||
SIGNAL_HANDLER_DOES_SLEEP
|
||||
|
||||
@@ -164,14 +164,14 @@
|
||||
pew(shootat_turf)
|
||||
|
||||
/**
|
||||
* handle_martyrs() is used for grenades that shoot shrapnel to check if anyone threw themselves/were thrown on top of the grenade, thus absorbing a good chunk of the shrapnel
|
||||
*
|
||||
* Between the time the grenade is armed and the actual detonation, we set var/list/bodies to the list of mobs currently on the new tile, as if the grenade landed on top of them, tracking if any of them move off the tile and removing them from the "under" list
|
||||
* Once the grenade detonates, handle_martyrs() is called and gets all the new mobs on the tile, and add the ones not in var/list/bodies to var/list/martyrs
|
||||
* We then iterate through the martyrs and reduce the shrapnel magnitude for each mob on top of it, shredding each of them with some of the shrapnel they helped absorb. This can snuff out all of the shrapnel if there's enough bodies
|
||||
*
|
||||
* Note we track anyone who's alive and client'd when they get shredded in var/list/purple_hearts, for achievement checking later
|
||||
*/
|
||||
* handle_martyrs() is used for grenades that shoot shrapnel to check if anyone threw themselves/were thrown on top of the grenade, thus absorbing a good chunk of the shrapnel
|
||||
*
|
||||
* Between the time the grenade is armed and the actual detonation, we set var/list/bodies to the list of mobs currently on the new tile, as if the grenade landed on top of them, tracking if any of them move off the tile and removing them from the "under" list
|
||||
* Once the grenade detonates, handle_martyrs() is called and gets all the new mobs on the tile, and add the ones not in var/list/bodies to var/list/martyrs
|
||||
* We then iterate through the martyrs and reduce the shrapnel magnitude for each mob on top of it, shredding each of them with some of the shrapnel they helped absorb. This can snuff out all of the shrapnel if there's enough bodies
|
||||
*
|
||||
* Note we track anyone who's alive and client'd when they get shredded in var/list/purple_hearts, for achievement checking later
|
||||
*/
|
||||
/datum/component/pellet_cloud/proc/handle_martyrs(mob/living/punishable_triggerer)
|
||||
var/magnitude_absorbed
|
||||
var/list/martyrs = list()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
*
|
||||
* Allows the parent to act similarly to the Altar of Gods with modularity. Invoke and Sect Selection is done via attacking with a bible. This means you cannot sacrifice Bibles (you shouldn't want to do this anyways although now that I mentioned it you probably will want to).
|
||||
*
|
||||
*/
|
||||
*
|
||||
* Allows the parent to act similarly to the Altar of Gods with modularity. Invoke and Sect Selection is done via attacking with a bible. This means you cannot sacrifice Bibles (you shouldn't want to do this anyways although now that I mentioned it you probably will want to).
|
||||
*
|
||||
*/
|
||||
/datum/component/religious_tool
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
/// Enables access to the global sect directly
|
||||
@@ -34,8 +34,8 @@
|
||||
UnregisterSignal(parent, list(COMSIG_PARENT_ATTACKBY, COMSIG_PARENT_EXAMINE))
|
||||
|
||||
/**
|
||||
* Sets the easy access variable to the global if it exists.
|
||||
*/
|
||||
* Sets the easy access variable to the global if it exists.
|
||||
*/
|
||||
/datum/component/religious_tool/proc/SetGlobalToLocal()
|
||||
if(easy_access_sect)
|
||||
return TRUE
|
||||
@@ -48,8 +48,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* Since all of these involve attackby, we require mega proc. Handles Invocation, Sacrificing, And Selection of Sects.
|
||||
*/
|
||||
* Since all of these involve attackby, we require mega proc. Handles Invocation, Sacrificing, And Selection of Sects.
|
||||
*/
|
||||
/datum/component/religious_tool/proc/AttemptActions(datum/source, obj/item/the_item, mob/living/user)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if(!SetGlobalToLocal())
|
||||
if(!(operation_flags & RELIGION_TOOL_SECTSELECT))
|
||||
return
|
||||
//At this point you're intentionally trying to select a sect.
|
||||
//At this point you're intentionally trying to select a sect.
|
||||
INVOKE_ASYNC(src, .proc/select_sect, user)
|
||||
return COMPONENT_NO_AFTERATTACK
|
||||
|
||||
@@ -122,8 +122,8 @@
|
||||
QDEL_NULL(performing_rite)
|
||||
|
||||
/**
|
||||
* Generates a list of available sects to the user. Intended to support custom-availability sects. Because these are not instanced, we cannot put the availability on said sect beyond variables.
|
||||
*/
|
||||
* Generates a list of available sects to the user. Intended to support custom-availability sects. Because these are not instanced, we cannot put the availability on said sect beyond variables.
|
||||
*/
|
||||
/datum/component/religious_tool/proc/generate_available_sects(mob/user)
|
||||
. = list()
|
||||
for(var/i in subtypesof(/datum/religion_sect))
|
||||
@@ -132,8 +132,8 @@
|
||||
. += list(initial(not_a_real_instance_rs.name) = i)
|
||||
|
||||
/**
|
||||
* Appends to examine so the user knows it can be used for religious purposes.
|
||||
*/
|
||||
* Appends to examine so the user knows it can be used for religious purposes.
|
||||
*/
|
||||
/datum/component/religious_tool/proc/on_examine(datum/source, mob/user, list/examine_list)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
|
||||
@@ -35,14 +35,14 @@ It has a punishment variable that is what happens to the parent when they leave
|
||||
message = _message
|
||||
|
||||
/**
|
||||
* Called when parent leaves the zlevel this is set to (aka whichever zlevel it was on when it was added)
|
||||
* Sends a message, then does an effect depending on what the punishment was.
|
||||
*
|
||||
* Punishments:
|
||||
* * PUNISHMENT_MURDER: kills parent
|
||||
* * PUNISHMENT_GIB: gibs parent
|
||||
* * PUNISHMENT_TELEPORT: finds a safe turf if possible, or a completely random one if not.
|
||||
*/
|
||||
* Called when parent leaves the zlevel this is set to (aka whichever zlevel it was on when it was added)
|
||||
* Sends a message, then does an effect depending on what the punishment was.
|
||||
*
|
||||
* Punishments:
|
||||
* * PUNISHMENT_MURDER: kills parent
|
||||
* * PUNISHMENT_GIB: gibs parent
|
||||
* * PUNISHMENT_TELEPORT: finds a safe turf if possible, or a completely random one if not.
|
||||
*/
|
||||
/datum/component/stationstuck/proc/punish()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
*A storage component to be used on card piles, for use as hands/decks/discard piles. Don't use on something that's not a card pile!
|
||||
*/
|
||||
*A storage component to be used on card piles, for use as hands/decks/discard piles. Don't use on something that's not a card pile!
|
||||
*/
|
||||
/datum/component/storage/concrete/tcg
|
||||
display_numerical_stacking = FALSE
|
||||
max_w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
@@ -37,13 +37,13 @@
|
||||
. = ..()
|
||||
|
||||
/** Begins the process of inserted an item.
|
||||
*
|
||||
* Clicking on the food storage with an item will begin a do_after, which if successful inserts the item.
|
||||
*
|
||||
* Arguments
|
||||
* inserted_item - the item being placed into the food
|
||||
* user - the person inserting the item
|
||||
*/
|
||||
*
|
||||
* Clicking on the food storage with an item will begin a do_after, which if successful inserts the item.
|
||||
*
|
||||
* Arguments
|
||||
* inserted_item - the item being placed into the food
|
||||
* user - the person inserting the item
|
||||
*/
|
||||
/datum/component/food_storage/proc/try_inserting_item(datum/source, obj/item/inserted_item, mob/user, params)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -74,12 +74,12 @@
|
||||
return COMPONENT_CANCEL_ATTACK_CHAIN
|
||||
|
||||
/** Begins the process of attempting to remove the stored item.
|
||||
*
|
||||
* Clicking on food storage on grab intent will begin a do_after, which if successful removes the stored_item.
|
||||
*
|
||||
* Arguments
|
||||
* user - the person removing the item.
|
||||
*/
|
||||
*
|
||||
* Clicking on food storage on grab intent will begin a do_after, which if successful removes the stored_item.
|
||||
*
|
||||
* Arguments
|
||||
* user - the person removing the item.
|
||||
*/
|
||||
/datum/component/food_storage/proc/try_removing_item(datum/source, mob/user)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -96,11 +96,11 @@
|
||||
return COMPONENT_CANCEL_ATTACK_CHAIN
|
||||
|
||||
/** Inserts the item into the food, after a do_after.
|
||||
*
|
||||
* Arguments
|
||||
* inserted_item - The item being inserted.
|
||||
* user - the person inserting the item.
|
||||
*/
|
||||
*
|
||||
* Arguments
|
||||
* inserted_item - The item being inserted.
|
||||
* user - the person inserting the item.
|
||||
*/
|
||||
/datum/component/food_storage/proc/insert_item(obj/item/inserted_item, mob/user)
|
||||
if(do_after(user, 1.5 SECONDS, target = parent))
|
||||
var/atom/food = parent
|
||||
@@ -113,17 +113,17 @@
|
||||
stored_item = inserted_item
|
||||
|
||||
/** Removes the item from the food, after a do_after.
|
||||
*
|
||||
* Arguments
|
||||
* user - person removing the item.
|
||||
*/
|
||||
*
|
||||
* Arguments
|
||||
* user - person removing the item.
|
||||
*/
|
||||
/datum/component/food_storage/proc/begin_remove_item(mob/user)
|
||||
if(do_after(user, 10 SECONDS, target = parent))
|
||||
remove_item(user)
|
||||
|
||||
/**
|
||||
* Removes the stored item, putting it in user's hands or on the ground, then updates the reference.
|
||||
*/
|
||||
* Removes the stored item, putting it in user's hands or on the ground, then updates the reference.
|
||||
*/
|
||||
/datum/component/food_storage/proc/remove_item(mob/user)
|
||||
if(user.put_in_hands(stored_item))
|
||||
user.visible_message("<span class='warning'>[user.name] slowly pulls [stored_item.name] out of \the [parent].</span>", \
|
||||
@@ -135,18 +135,18 @@
|
||||
update_stored_item()
|
||||
|
||||
/** Checks for stored items when the food is eaten.
|
||||
*
|
||||
* If the food is eaten while an item is stored in it, calculates the odds that the item will be found.
|
||||
* Then, if the item is found before being bitten, the item is removed.
|
||||
* If the item is found by biting into it, calls on_accidental_consumption on the stored item.
|
||||
* Afterwards, removes the item from the food if it was discovered.
|
||||
*
|
||||
* Arguments
|
||||
* target - person doing the eating (can be the same as user)
|
||||
* user - person causing the eating to happen
|
||||
* bitecount - how many times the current food has been bitten
|
||||
* bitesize - how large bties are for this food
|
||||
*/
|
||||
*
|
||||
* If the food is eaten while an item is stored in it, calculates the odds that the item will be found.
|
||||
* Then, if the item is found before being bitten, the item is removed.
|
||||
* If the item is found by biting into it, calls on_accidental_consumption on the stored item.
|
||||
* Afterwards, removes the item from the food if it was discovered.
|
||||
*
|
||||
* Arguments
|
||||
* target - person doing the eating (can be the same as user)
|
||||
* user - person causing the eating to happen
|
||||
* bitecount - how many times the current food has been bitten
|
||||
* bitesize - how large bties are for this food
|
||||
*/
|
||||
/datum/component/food_storage/proc/consume_food_storage(datum/source, mob/living/target, mob/living/user, bitecount, bitesize)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -172,13 +172,13 @@
|
||||
INVOKE_ASYNC(src, .proc/remove_item, user)
|
||||
|
||||
/** Updates the reference of the stored item.
|
||||
*
|
||||
* Checks the food's contents for if an alternate item was placed into the food.
|
||||
* If there is an alternate item, updates the reference to the new item.
|
||||
* If there isn't, updates the reference to null.
|
||||
*
|
||||
* Returns FALSE if the ref is nulled, or TRUE is another item replaced it.
|
||||
*/
|
||||
*
|
||||
* Checks the food's contents for if an alternate item was placed into the food.
|
||||
* If there is an alternate item, updates the reference to the new item.
|
||||
* If there isn't, updates the reference to null.
|
||||
*
|
||||
* Returns FALSE if the ref is nulled, or TRUE is another item replaced it.
|
||||
*/
|
||||
/datum/component/food_storage/proc/update_stored_item()
|
||||
var/atom/food = parent
|
||||
if(!food?.contents.len) //if there's no items in the food or food is deleted somehow
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
*
|
||||
* Allows parent (obj) to initiate surgeries.
|
||||
*
|
||||
*/
|
||||
*
|
||||
* Allows parent (obj) to initiate surgeries.
|
||||
*
|
||||
*/
|
||||
/datum/component/surgery_initiator
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
///allows for post-selection manipulation of parent
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
#define MAX_TABLE_MESSES 12
|
||||
|
||||
/**
|
||||
* For when you want to throw a person at something and have fun stuff happen
|
||||
*
|
||||
* This component is made for carbon mobs (really, humans), and allows its parent to throw themselves and perform tackles. This is done by enabling throw mode, then clicking on your
|
||||
* intended target with an empty hand. You will then launch toward your target. If you hit a carbon, you'll roll to see how hard you hit them. If you hit a solid non-mob, you'll
|
||||
* roll to see how badly you just messed yourself up. If, along your journey, you hit a table, you'll slam onto it and send up to MAX_TABLE_MESSES (8) /obj/items on the table flying,
|
||||
* and take a bit of extra damage and stun for each thing launched.
|
||||
*
|
||||
* There are 2 separate """skill rolls""" involved here, which are handled and explained in [rollTackle()][/datum/component/tackler/proc/rollTackle] (for roll 1, carbons), and [splat()][/datum/component/tackler/proc/splat] (for roll 2, walls and solid objects)
|
||||
* For when you want to throw a person at something and have fun stuff happen
|
||||
*
|
||||
* This component is made for carbon mobs (really, humans), and allows its parent to throw themselves and perform tackles. This is done by enabling throw mode, then clicking on your
|
||||
* intended target with an empty hand. You will then launch toward your target. If you hit a carbon, you'll roll to see how hard you hit them. If you hit a solid non-mob, you'll
|
||||
* roll to see how badly you just messed yourself up. If, along your journey, you hit a table, you'll slam onto it and send up to MAX_TABLE_MESSES (8) /obj/items on the table flying,
|
||||
* and take a bit of extra damage and stun for each thing launched.
|
||||
*
|
||||
* There are 2 separate """skill rolls""" involved here, which are handled and explained in [rollTackle()][/datum/component/tackler/proc/rollTackle] (for roll 1, carbons), and [splat()][/datum/component/tackler/proc/splat] (for roll 2, walls and solid objects)
|
||||
*/
|
||||
/datum/component/tackler
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
@@ -231,14 +231,14 @@
|
||||
return COMPONENT_MOVABLE_IMPACT_FLIP_HITPUSH
|
||||
|
||||
/**
|
||||
* This handles all of the modifiers for the actual carbon-on-carbon tackling, and gets its own proc because of how many there are (with plenty more in mind!)
|
||||
*
|
||||
* The base roll is between (-3, 3), with negative numbers favoring the target, and positive numbers favoring the tackler. The target and the tackler are both assessed for
|
||||
* how easy they are to knock over, with clumsiness and dwarfiness being strong maluses for each, and gigantism giving a bonus for each. These numbers and ideas
|
||||
* are absolutely subject to change.
|
||||
* This handles all of the modifiers for the actual carbon-on-carbon tackling, and gets its own proc because of how many there are (with plenty more in mind!)
|
||||
*
|
||||
* The base roll is between (-3, 3), with negative numbers favoring the target, and positive numbers favoring the tackler. The target and the tackler are both assessed for
|
||||
* how easy they are to knock over, with clumsiness and dwarfiness being strong maluses for each, and gigantism giving a bonus for each. These numbers and ideas
|
||||
* are absolutely subject to change.
|
||||
|
||||
* In addition, after subtracting the defender's mod and adding the attacker's mod to the roll, the component's base (skill) mod is added as well. Some sources of tackles
|
||||
* are better at taking people down, like the bruiser and rocket gloves, while the dolphin gloves have a malus in exchange for better mobility.
|
||||
* In addition, after subtracting the defender's mod and adding the attacker's mod to the roll, the component's base (skill) mod is added as well. Some sources of tackles
|
||||
* are better at taking people down, like the bruiser and rocket gloves, while the dolphin gloves have a malus in exchange for better mobility.
|
||||
*/
|
||||
/datum/component/tackler/proc/rollTackle(mob/living/carbon/target)
|
||||
var/defense_mod = 0
|
||||
@@ -315,28 +315,28 @@
|
||||
|
||||
|
||||
/**
|
||||
* This is where we handle diving into dense atoms, generally with effects ranging from bad to REALLY bad. This works as a percentile roll that is modified in two steps as detailed below. The higher
|
||||
* the roll, the more severe the result.
|
||||
*
|
||||
* Mod 1: Speed-
|
||||
* * Base tackle speed is 1, which is what normal gripper gloves use. For other sources with higher speed tackles, like dolphin and ESPECIALLY rocket gloves, we obey Newton's laws and hit things harder.
|
||||
* * For every unit of speed above 1, move the lower bound of the roll up by 15. Unlike Mod 2, this only serves to raise the lower bound, so it can't be directly counteracted by anything you can control.
|
||||
*
|
||||
* Mod 2: Misc-
|
||||
* -Flat modifiers, these take whatever you rolled and add/subtract to it, with the end result capped between the minimum from Mod 1 and 100. Note that since we can't roll higher than 100 to start with,
|
||||
* wearing a helmet should be enough to remove any chance of permanently paralyzing yourself and dramatically lessen knocking yourself unconscious, even with rocket gloves. Will expand on maybe
|
||||
* * Wearing a helmet: -6
|
||||
* * Wearing riot armor: -6
|
||||
* * Clumsy: +6
|
||||
*
|
||||
* Effects: Below are the outcomes based off your roll, in order of increasing severity
|
||||
*
|
||||
* * 1-67: Knocked down for a few seconds and a bit of brute and stamina damage
|
||||
* * 68-85: Knocked silly, gain some confusion as well as the above
|
||||
* * 86-92: Cranial trauma, get a concussion and more confusion, plus more damage
|
||||
* * 93-96: Knocked unconscious, get a random mild brain trauma, as well as a fair amount of damage
|
||||
* * 97-98: Massive head damage, probably crack your skull open, random mild brain trauma
|
||||
* * 99-Infinity: Break your spinal cord, get paralyzed, take a bunch of damage too. Very unlucky!
|
||||
* This is where we handle diving into dense atoms, generally with effects ranging from bad to REALLY bad. This works as a percentile roll that is modified in two steps as detailed below. The higher
|
||||
* the roll, the more severe the result.
|
||||
*
|
||||
* Mod 1: Speed-
|
||||
* * Base tackle speed is 1, which is what normal gripper gloves use. For other sources with higher speed tackles, like dolphin and ESPECIALLY rocket gloves, we obey Newton's laws and hit things harder.
|
||||
* * For every unit of speed above 1, move the lower bound of the roll up by 15. Unlike Mod 2, this only serves to raise the lower bound, so it can't be directly counteracted by anything you can control.
|
||||
*
|
||||
* Mod 2: Misc-
|
||||
* -Flat modifiers, these take whatever you rolled and add/subtract to it, with the end result capped between the minimum from Mod 1 and 100. Note that since we can't roll higher than 100 to start with,
|
||||
* wearing a helmet should be enough to remove any chance of permanently paralyzing yourself and dramatically lessen knocking yourself unconscious, even with rocket gloves. Will expand on maybe
|
||||
* * Wearing a helmet: -6
|
||||
* * Wearing riot armor: -6
|
||||
* * Clumsy: +6
|
||||
*
|
||||
* Effects: Below are the outcomes based off your roll, in order of increasing severity
|
||||
*
|
||||
* * 1-67: Knocked down for a few seconds and a bit of brute and stamina damage
|
||||
* * 68-85: Knocked silly, gain some confusion as well as the above
|
||||
* * 86-92: Cranial trauma, get a concussion and more confusion, plus more damage
|
||||
* * 93-96: Knocked unconscious, get a random mild brain trauma, as well as a fair amount of damage
|
||||
* * 97-98: Massive head damage, probably crack your skull open, random mild brain trauma
|
||||
* * 99-Infinity: Break your spinal cord, get paralyzed, take a bunch of damage too. Very unlucky!
|
||||
*/
|
||||
/datum/component/tackler/proc/splat(mob/living/carbon/user, atom/hit)
|
||||
if(istype(hit, /obj/machinery/vending)) // before we do anything else-
|
||||
|
||||
+22
-22
@@ -76,13 +76,13 @@
|
||||
return
|
||||
|
||||
/**
|
||||
* Adds crime to security record.
|
||||
*
|
||||
* Is used to add single crime to someone's security record.
|
||||
* Arguments:
|
||||
* * id - record id.
|
||||
* * datum/data/crime/crime - premade array containing every variable, usually created by createCrimeEntry.
|
||||
*/
|
||||
* Adds crime to security record.
|
||||
*
|
||||
* Is used to add single crime to someone's security record.
|
||||
* Arguments:
|
||||
* * id - record id.
|
||||
* * datum/data/crime/crime - premade array containing every variable, usually created by createCrimeEntry.
|
||||
*/
|
||||
/datum/datacore/proc/addCrime(id = "", datum/data/crime/crime)
|
||||
for(var/datum/data/record/R in security)
|
||||
if(R.fields["id"] == id)
|
||||
@@ -91,13 +91,13 @@
|
||||
return
|
||||
|
||||
/**
|
||||
* Deletes crime from security record.
|
||||
*
|
||||
* Is used to delete single crime to someone's security record.
|
||||
* Arguments:
|
||||
* * id - record id.
|
||||
* * cDataId - id of already existing crime.
|
||||
*/
|
||||
* Deletes crime from security record.
|
||||
*
|
||||
* Is used to delete single crime to someone's security record.
|
||||
* Arguments:
|
||||
* * id - record id.
|
||||
* * cDataId - id of already existing crime.
|
||||
*/
|
||||
/datum/datacore/proc/removeCrime(id, cDataId)
|
||||
for(var/datum/data/record/R in security)
|
||||
if(R.fields["id"] == id)
|
||||
@@ -108,14 +108,14 @@
|
||||
return
|
||||
|
||||
/**
|
||||
* Adds details to a crime.
|
||||
*
|
||||
* Is used to add or replace details to already existing crime.
|
||||
* Arguments:
|
||||
* * id - record id.
|
||||
* * cDataId - id of already existing crime.
|
||||
* * details - data you want to add.
|
||||
*/
|
||||
* Adds details to a crime.
|
||||
*
|
||||
* Is used to add or replace details to already existing crime.
|
||||
* Arguments:
|
||||
* * id - record id.
|
||||
* * cDataId - id of already existing crime.
|
||||
* * details - data you want to add.
|
||||
*/
|
||||
/datum/datacore/proc/addCrimeDetails(id, cDataId, details)
|
||||
for(var/datum/data/record/R in security)
|
||||
if(R.fields["id"] == id)
|
||||
|
||||
+44
-44
@@ -1,13 +1,13 @@
|
||||
/**
|
||||
* The absolute base class for everything
|
||||
*
|
||||
* A datum instantiated has no physical world prescence, use an atom if you want something
|
||||
* that actually lives in the world
|
||||
*
|
||||
* Be very mindful about adding variables to this class, they are inherited by every single
|
||||
* thing in the entire game, and so you can easily cause memory usage to rise a lot with careless
|
||||
* use of variables at this level
|
||||
*/
|
||||
* The absolute base class for everything
|
||||
*
|
||||
* A datum instantiated has no physical world prescence, use an atom if you want something
|
||||
* that actually lives in the world
|
||||
*
|
||||
* Be very mindful about adding variables to this class, they are inherited by every single
|
||||
* thing in the entire game, and so you can easily cause memory usage to rise a lot with careless
|
||||
* use of variables at this level
|
||||
*/
|
||||
/datum
|
||||
/**
|
||||
* Tick count time when this object was destroyed.
|
||||
@@ -67,30 +67,30 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Called when a href for this datum is clicked
|
||||
*
|
||||
* Sends a [COMSIG_TOPIC] signal
|
||||
*/
|
||||
* Called when a href for this datum is clicked
|
||||
*
|
||||
* Sends a [COMSIG_TOPIC] signal
|
||||
*/
|
||||
/datum/Topic(href, href_list[])
|
||||
..()
|
||||
SEND_SIGNAL(src, COMSIG_TOPIC, usr, href_list)
|
||||
|
||||
/**
|
||||
* Default implementation of clean-up code.
|
||||
*
|
||||
* This should be overridden to remove all references pointing to the object being destroyed, if
|
||||
* you do override it, make sure to call the parent and return it's return value by default
|
||||
*
|
||||
* Return an appropriate [QDEL_HINT][QDEL_HINT_QUEUE] to modify handling of your deletion;
|
||||
* in most cases this is [QDEL_HINT_QUEUE].
|
||||
*
|
||||
* The base case is responsible for doing the following
|
||||
* * Erasing timers pointing to this datum
|
||||
* * Erasing compenents on this datum
|
||||
* * Notifying datums listening to signals from this datum that we are going away
|
||||
*
|
||||
* Returns [QDEL_HINT_QUEUE]
|
||||
*/
|
||||
* Default implementation of clean-up code.
|
||||
*
|
||||
* This should be overridden to remove all references pointing to the object being destroyed, if
|
||||
* you do override it, make sure to call the parent and return it's return value by default
|
||||
*
|
||||
* Return an appropriate [QDEL_HINT][QDEL_HINT_QUEUE] to modify handling of your deletion;
|
||||
* in most cases this is [QDEL_HINT_QUEUE].
|
||||
*
|
||||
* The base case is responsible for doing the following
|
||||
* * Erasing timers pointing to this datum
|
||||
* * Erasing compenents on this datum
|
||||
* * Notifying datums listening to signals from this datum that we are going away
|
||||
*
|
||||
* Returns [QDEL_HINT_QUEUE]
|
||||
*/
|
||||
/datum/proc/Destroy(force=FALSE, ...)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
tag = null
|
||||
@@ -231,14 +231,14 @@
|
||||
return returned
|
||||
|
||||
/**
|
||||
* Callback called by a timer to end an associative-list-indexed cooldown.
|
||||
*
|
||||
* Arguments:
|
||||
* * source - datum storing the cooldown
|
||||
* * index - string index storing the cooldown on the cooldowns associative list
|
||||
*
|
||||
* This sends a signal reporting the cooldown end.
|
||||
*/
|
||||
* Callback called by a timer to end an associative-list-indexed cooldown.
|
||||
*
|
||||
* Arguments:
|
||||
* * source - datum storing the cooldown
|
||||
* * index - string index storing the cooldown on the cooldowns associative list
|
||||
*
|
||||
* This sends a signal reporting the cooldown end.
|
||||
*/
|
||||
/proc/end_cooldown(datum/source, index)
|
||||
if(QDELETED(source))
|
||||
return
|
||||
@@ -247,14 +247,14 @@
|
||||
|
||||
|
||||
/**
|
||||
* Proc used by stoppable timers to end a cooldown before the time has ran out.
|
||||
*
|
||||
* Arguments:
|
||||
* * source - datum storing the cooldown
|
||||
* * index - string index storing the cooldown on the cooldowns associative list
|
||||
*
|
||||
* This sends a signal reporting the cooldown end, passing the time left as an argument.
|
||||
*/
|
||||
* Proc used by stoppable timers to end a cooldown before the time has ran out.
|
||||
*
|
||||
* Arguments:
|
||||
* * source - datum storing the cooldown
|
||||
* * index - string index storing the cooldown on the cooldowns associative list
|
||||
*
|
||||
* This sends a signal reporting the cooldown end, passing the time left as an argument.
|
||||
*/
|
||||
/proc/reset_cooldown(datum/source, index)
|
||||
if(QDELETED(source))
|
||||
return
|
||||
|
||||
@@ -421,7 +421,7 @@
|
||||
var/datum/disease/advance/D2 = pick(diseases)
|
||||
D2.Mix(D1)
|
||||
|
||||
// Should be only 1 entry left, but if not let's only return a single entry
|
||||
// Should be only 1 entry left, but if not let's only return a single entry
|
||||
var/datum/disease/advance/to_return = pick(diseases)
|
||||
to_return.Refresh(TRUE)
|
||||
return to_return
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
var/triple_metabolism = FALSE
|
||||
var/reduced_hunger = FALSE
|
||||
desc = "The virus causes the host's metabolism to accelerate rapidly, making them process chemicals twice as fast,\
|
||||
but also causing increased hunger."
|
||||
but also causing increased hunger."
|
||||
threshold_descs = list(
|
||||
"Stealth 3" = "Reduces hunger rate.",
|
||||
"Stage Speed 10" = "Chemical metabolization is tripled instead of doubled.",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/**
|
||||
* 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
|
||||
@@ -49,9 +49,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)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
msg = "Wow, [source.p_they()] sucks."
|
||||
|
||||
user.visible_message("<span class='notice'>[user] stops and looks intently at [source].</span>", \
|
||||
"<span class='notice'>You appraise [source]... [msg]</span>")
|
||||
"<span class='notice'>You appraise [source]... [msg]</span>")
|
||||
|
||||
/datum/element/art/proc/on_examine(atom/source, mob/user, list/examine_texts)
|
||||
SIGNAL_HANDLER
|
||||
@@ -63,4 +63,4 @@
|
||||
msg = "Wow, [source.p_they()] sucks."
|
||||
|
||||
user.visible_message("<span class='notice'>[user] stops to inspect [source].</span>", \
|
||||
"<span class='notice'>You appraise [source], inspecting the fine craftsmanship of the proletariat... [msg]</span>")
|
||||
"<span class='notice'>You appraise [source], inspecting the fine craftsmanship of the proletariat... [msg]</span>")
|
||||
|
||||
@@ -131,11 +131,11 @@
|
||||
examine_list += "[I] has a fine point, and could probably embed in someone if thrown properly!"
|
||||
|
||||
/**
|
||||
* checkEmbedProjectile() is what we get when a projectile with a defined shrapnel_type impacts a target.
|
||||
*
|
||||
* If we hit a valid target, we create the shrapnel_type object and immediately call tryEmbed() on it, targeting what we impacted. That will lead
|
||||
* it to call tryForceEmbed() on its own embed element (it's out of our hands here, our projectile is done), where it will run through all the checks it needs to.
|
||||
*/
|
||||
* checkEmbedProjectile() is what we get when a projectile with a defined shrapnel_type impacts a target.
|
||||
*
|
||||
* If we hit a valid target, we create the shrapnel_type object and immediately call tryEmbed() on it, targeting what we impacted. That will lead
|
||||
* it to call tryForceEmbed() on its own embed element (it's out of our hands here, our projectile is done), where it will run through all the checks it needs to.
|
||||
*/
|
||||
/datum/element/embed/proc/checkEmbedProjectile(obj/projectile/P, atom/movable/firer, atom/hit, angle, hit_zone)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -157,17 +157,17 @@
|
||||
Detach(P)
|
||||
|
||||
/**
|
||||
* tryForceEmbed() is called here when we fire COMSIG_EMBED_TRY_FORCE from [/obj/item/proc/tryEmbed]. Mostly, this means we're a piece of shrapnel from a projectile that just impacted something, and we're trying to embed in it.
|
||||
*
|
||||
* The reason for this extra mucking about is avoiding having to do an extra hitby(), and annoying the target by impacting them once with the projectile, then again with the shrapnel, and possibly
|
||||
* AGAIN if we actually embed. This way, we save on at least one message.
|
||||
*
|
||||
* Arguments:
|
||||
* * I- the item we're trying to insert into the target
|
||||
* * target- what we're trying to shish-kabob, either a bodypart or a carbon
|
||||
* * hit_zone- if our target is a carbon, try to hit them in this zone, if we don't have one, pick a random one. If our target is a bodypart, we already know where we're hitting.
|
||||
* * forced- if we want this to succeed 100%
|
||||
*/
|
||||
* tryForceEmbed() is called here when we fire COMSIG_EMBED_TRY_FORCE from [/obj/item/proc/tryEmbed]. Mostly, this means we're a piece of shrapnel from a projectile that just impacted something, and we're trying to embed in it.
|
||||
*
|
||||
* The reason for this extra mucking about is avoiding having to do an extra hitby(), and annoying the target by impacting them once with the projectile, then again with the shrapnel, and possibly
|
||||
* AGAIN if we actually embed. This way, we save on at least one message.
|
||||
*
|
||||
* Arguments:
|
||||
* * I- the item we're trying to insert into the target
|
||||
* * target- what we're trying to shish-kabob, either a bodypart or a carbon
|
||||
* * hit_zone- if our target is a carbon, try to hit them in this zone, if we don't have one, pick a random one. If our target is a bodypart, we already know where we're hitting.
|
||||
* * forced- if we want this to succeed 100%
|
||||
*/
|
||||
/datum/element/embed/proc/tryForceEmbed(obj/item/I, atom/target, hit_zone, forced=FALSE)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Can be applied to /atom/movable subtypes to make them apply fire stacks to things they hit
|
||||
*/
|
||||
* Can be applied to /atom/movable subtypes to make them apply fire stacks to things they hit
|
||||
*/
|
||||
/datum/element/firestacker
|
||||
element_flags = ELEMENT_BESPOKE
|
||||
id_arg_index = 2
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
/datum/element/firestacker/Attach(datum/target, amount)
|
||||
. = ..()
|
||||
|
||||
|
||||
if(!ismovable(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
|
||||
|
||||
src.amount = amount
|
||||
|
||||
|
||||
RegisterSignal(target, COMSIG_MOVABLE_IMPACT, .proc/impact, override = TRUE)
|
||||
if(isitem(target))
|
||||
RegisterSignal(target, COMSIG_ITEM_ATTACK, .proc/item_attack, override = TRUE)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Attached to movable atoms with opacity. Listens to them move and updates their old and new turf loc's opacity accordingly.
|
||||
*/
|
||||
* Attached to movable atoms with opacity. Listens to them move and updates their old and new turf loc's opacity accordingly.
|
||||
*/
|
||||
/datum/element/light_blocking
|
||||
element_flags = ELEMENT_DETACH
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Object integrity regeneration element added by alien alloy.
|
||||
*/
|
||||
*/
|
||||
/datum/element/obj_regen
|
||||
element_flags = ELEMENT_BESPOKE | ELEMENT_DETACH
|
||||
id_arg_index = 2
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
#define TALL 7/5
|
||||
|
||||
/**
|
||||
# squish.dm
|
||||
*
|
||||
* It's an element that squishes things. After the duration passes, it reverses the transformation it squished with, taking into account if they are a different orientation than they started (read: rotationally-fluid)
|
||||
*
|
||||
* Normal squishes apply vertically, as if the target is being squished from above, but you can set reverse to TRUE if you want to squish them from the sides, like if they pancake into a wall from the East or West
|
||||
* squish.dm
|
||||
*
|
||||
* It's an element that squishes things. After the duration passes, it reverses the transformation it squished with, taking into account if they are a different orientation than they started (read: rotationally-fluid)
|
||||
*
|
||||
* Normal squishes apply vertically, as if the target is being squished from above, but you can set reverse to TRUE if you want to squish them from the sides, like if they pancake into a wall from the East or West
|
||||
*/
|
||||
/datum/element/squish
|
||||
element_flags = ELEMENT_DETACH
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Tool flash bespoke element
|
||||
*
|
||||
* Flashes the user when using this tool
|
||||
*/
|
||||
* Tool flash bespoke element
|
||||
*
|
||||
* Flashes the user when using this tool
|
||||
*/
|
||||
/datum/element/tool_flash
|
||||
element_flags = ELEMENT_BESPOKE
|
||||
id_arg_index = 2
|
||||
|
||||
+39
-39
@@ -425,42 +425,42 @@
|
||||
"}
|
||||
|
||||
/obj/item/disk/holodisk/ruin/snowengieruin
|
||||
name = "Blackbox Print-out #EB412"
|
||||
desc = "A holodisk containing the last moments of EB412. There's a bloody fingerprint on it."
|
||||
preset_image_type = /datum/preset_holoimage/engineer
|
||||
preset_record_text = {"
|
||||
NAME Dave Tundrale
|
||||
SAY Maria, how's Build?
|
||||
DELAY 10
|
||||
NAME Maria Dell
|
||||
PRESET /datum/preset_holoimage/engineer/atmos
|
||||
SAY It's fine, don't worry. I've got Plastic on it. And frankly, i'm kinda busy with, the, uhhm, incinerator.
|
||||
DELAY 30
|
||||
NAME Dave Tundrale
|
||||
PRESET /datum/preset_holoimage/engineer
|
||||
SAY Aight, wonderful. The science mans been kinda shit though. No RCDs-
|
||||
DELAY 20
|
||||
NAME Maria Dell
|
||||
PRESET /datum/preset_holoimage/engineer/atmos
|
||||
SAY Enough about your RCDs. They're not even that important, just bui-
|
||||
DELAY 15
|
||||
SOUND explosion
|
||||
DELAY 10
|
||||
SAY Oh, shit!
|
||||
DELAY 10
|
||||
PRESET /datum/preset_holoimage/engineer/atmos/rig
|
||||
LANGUAGE /datum/language/narsie
|
||||
NAME Unknown
|
||||
SAY RISE, MY LORD!!
|
||||
DELAY 10
|
||||
LANGUAGE /datum/language/common
|
||||
NAME Plastic
|
||||
PRESET /datum/preset_holoimage/engineer/rig
|
||||
SAY Fuck, fuck, fuck!
|
||||
DELAY 20
|
||||
SAY It's loose! CALL THE FUCKING SHUTT-
|
||||
DELAY 10
|
||||
PRESET /datum/preset_holoimage/corgi
|
||||
NAME Blackbox Automated Message
|
||||
SAY Connection lost. Dumping audio logs to disk.
|
||||
DELAY 50"}
|
||||
name = "Blackbox Print-out #EB412"
|
||||
desc = "A holodisk containing the last moments of EB412. There's a bloody fingerprint on it."
|
||||
preset_image_type = /datum/preset_holoimage/engineer
|
||||
preset_record_text = {"
|
||||
NAME Dave Tundrale
|
||||
SAY Maria, how's Build?
|
||||
DELAY 10
|
||||
NAME Maria Dell
|
||||
PRESET /datum/preset_holoimage/engineer/atmos
|
||||
SAY It's fine, don't worry. I've got Plastic on it. And frankly, i'm kinda busy with, the, uhhm, incinerator.
|
||||
DELAY 30
|
||||
NAME Dave Tundrale
|
||||
PRESET /datum/preset_holoimage/engineer
|
||||
SAY Aight, wonderful. The science mans been kinda shit though. No RCDs-
|
||||
DELAY 20
|
||||
NAME Maria Dell
|
||||
PRESET /datum/preset_holoimage/engineer/atmos
|
||||
SAY Enough about your RCDs. They're not even that important, just bui-
|
||||
DELAY 15
|
||||
SOUND explosion
|
||||
DELAY 10
|
||||
SAY Oh, shit!
|
||||
DELAY 10
|
||||
PRESET /datum/preset_holoimage/engineer/atmos/rig
|
||||
LANGUAGE /datum/language/narsie
|
||||
NAME Unknown
|
||||
SAY RISE, MY LORD!!
|
||||
DELAY 10
|
||||
LANGUAGE /datum/language/common
|
||||
NAME Plastic
|
||||
PRESET /datum/preset_holoimage/engineer/rig
|
||||
SAY Fuck, fuck, fuck!
|
||||
DELAY 20
|
||||
SAY It's loose! CALL THE FUCKING SHUTT-
|
||||
DELAY 10
|
||||
PRESET /datum/preset_holoimage/corgi
|
||||
NAME Blackbox Automated Message
|
||||
SAY Connection lost. Dumping audio logs to disk.
|
||||
DELAY 50"}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/keybinding/movement
|
||||
category = CATEGORY_MOVEMENT
|
||||
weight = WEIGHT_HIGHEST
|
||||
category = CATEGORY_MOVEMENT
|
||||
weight = WEIGHT_HIGHEST
|
||||
|
||||
/datum/keybinding/movement/north
|
||||
hotkey_keys = list("W", "North")
|
||||
|
||||
@@ -154,21 +154,21 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
RemoveElement(/datum/element/turf_z_transparency, FALSE)
|
||||
|
||||
/**
|
||||
* This proc is called when the mat is found in an item that's consumed by accident. see /obj/item/proc/on_accidental_consumption.
|
||||
* Arguments
|
||||
* * M - person consuming the mat
|
||||
* * S - (optional) item the mat is contained in (NOT the item with the mat itself)
|
||||
*/
|
||||
* This proc is called when the mat is found in an item that's consumed by accident. see /obj/item/proc/on_accidental_consumption.
|
||||
* Arguments
|
||||
* * M - person consuming the mat
|
||||
* * S - (optional) item the mat is contained in (NOT the item with the mat itself)
|
||||
*/
|
||||
/datum/material/proc/on_accidental_mat_consumption(mob/living/carbon/M, obj/item/S)
|
||||
return FALSE
|
||||
|
||||
/** Returns the composition of this material.
|
||||
*
|
||||
* Mostly used for alloys when breaking down materials.
|
||||
*
|
||||
* Arguments:
|
||||
* - amount: The amount of the material to break down.
|
||||
* - breakdown_flags: Some flags dictating how exactly this material is being broken down.
|
||||
*/
|
||||
*
|
||||
* Mostly used for alloys when breaking down materials.
|
||||
*
|
||||
* Arguments:
|
||||
* - amount: The amount of the material to break down.
|
||||
* - breakdown_flags: Some flags dictating how exactly this material is being broken down.
|
||||
*/
|
||||
/datum/material/proc/return_composition(amount=1, breakdown_flags=NONE)
|
||||
return list((src) = amount) // Yes we need the parenthesis, without them BYOND stringifies src into "src" and things break.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Materials made from other materials.
|
||||
*/
|
||||
*/
|
||||
/datum/material/alloy
|
||||
name = "alloy"
|
||||
desc = "A material composed of two or more other materials."
|
||||
@@ -23,10 +23,10 @@
|
||||
|
||||
|
||||
/** Plasteel
|
||||
*
|
||||
* An alloy of iron and plasma.
|
||||
* Applies a significant slowdown effect to any and all items that contain it.
|
||||
*/
|
||||
*
|
||||
* An alloy of iron and plasma.
|
||||
* Applies a significant slowdown effect to any and all items that contain it.
|
||||
*/
|
||||
/datum/material/alloy/plasteel
|
||||
name = "plasteel"
|
||||
desc = "The heavy duty result of infusing iron with plasma."
|
||||
@@ -56,9 +56,9 @@
|
||||
target_item.slowdown -= MATERIAL_SLOWDOWN_PLASTEEL * amount / MINERAL_MATERIAL_AMOUNT
|
||||
|
||||
/** Plastitanium
|
||||
*
|
||||
* An alloy of titanium and plasma.
|
||||
*/
|
||||
*
|
||||
* An alloy of titanium and plasma.
|
||||
*/
|
||||
/datum/material/alloy/plastitanium
|
||||
name = "plastitanium"
|
||||
desc = "The extremely heat resistant result of infusing titanium with plasma."
|
||||
@@ -73,9 +73,9 @@
|
||||
composition = list(/datum/material/titanium=1, /datum/material/plasma=1)
|
||||
|
||||
/** Plasmaglass
|
||||
*
|
||||
* An alloy of silicate and plasma.
|
||||
*/
|
||||
*
|
||||
* An alloy of silicate and plasma.
|
||||
*/
|
||||
/datum/material/alloy/plasmaglass
|
||||
name = "plasmaglass"
|
||||
desc = "Plasma-infused silicate. It is much more durable and heat resistant than either of its component materials."
|
||||
@@ -91,9 +91,9 @@
|
||||
composition = list(/datum/material/glass=1, /datum/material/plasma=0.5)
|
||||
|
||||
/** Titaniumglass
|
||||
*
|
||||
* An alloy of glass and titanium.
|
||||
*/
|
||||
*
|
||||
* An alloy of glass and titanium.
|
||||
*/
|
||||
/datum/material/alloy/titaniumglass
|
||||
name = "titanium glass"
|
||||
desc = "A specialized silicate-titanium alloy that is commonly used in shuttle windows."
|
||||
@@ -108,9 +108,9 @@
|
||||
composition = list(/datum/material/glass=1, /datum/material/titanium=0.5)
|
||||
|
||||
/** Plastitanium Glass
|
||||
*
|
||||
* An alloy of plastitanium and glass.
|
||||
*/
|
||||
*
|
||||
* An alloy of plastitanium and glass.
|
||||
*/
|
||||
/datum/material/alloy/plastitaniumglass
|
||||
name = "plastitanium glass"
|
||||
desc = "A specialized silicate-plastitanium alloy."
|
||||
@@ -126,11 +126,11 @@
|
||||
composition = list(/datum/material/glass=1, /datum/material/alloy/plastitanium=0.5)
|
||||
|
||||
/** Alien Alloy
|
||||
*
|
||||
* Densified plasteel.
|
||||
* Applies a significant slowdown effect to anything that contains it.
|
||||
* Anything constructed from it can slowly regenerate.
|
||||
*/
|
||||
*
|
||||
* Densified plasteel.
|
||||
* Applies a significant slowdown effect to anything that contains it.
|
||||
* Anything constructed from it can slowly regenerate.
|
||||
*/
|
||||
/datum/material/alloy/alien
|
||||
name = "alien alloy"
|
||||
desc = "An extremely dense alloy similar to plasteel in composition. It requires exotic metallurgical processes to create."
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
mood_change = -1
|
||||
|
||||
/datum/mood_event/broken_vow //Used for when mimes break their vow of silence
|
||||
description = "<span class='boldwarning'>I have brought shame upon my name, and betrayed my fellow mimes by breaking our sacred vow...</span>\n"
|
||||
mood_change = -8
|
||||
description = "<span class='boldwarning'>I have brought shame upon my name, and betrayed my fellow mimes by breaking our sacred vow...</span>\n"
|
||||
mood_change = -8
|
||||
|
||||
/datum/mood_event/on_fire
|
||||
description = "<span class='boldwarning'>I'M ON FIRE!!!</span>\n"
|
||||
@@ -68,14 +68,14 @@
|
||||
timeout = 2 MINUTES
|
||||
|
||||
/datum/mood_event/shameful_suicide //suicide_acts that return SHAME, like sord
|
||||
description = "<span class='boldwarning'>I can't even end it all!</span>\n"
|
||||
mood_change = -15
|
||||
timeout = 60 SECONDS
|
||||
description = "<span class='boldwarning'>I can't even end it all!</span>\n"
|
||||
mood_change = -15
|
||||
timeout = 60 SECONDS
|
||||
|
||||
/datum/mood_event/dismembered
|
||||
description = "<span class='boldwarning'>AHH! I WAS USING THAT LIMB!</span>\n"
|
||||
mood_change = -10
|
||||
timeout = 8 MINUTES
|
||||
description = "<span class='boldwarning'>AHH! I WAS USING THAT LIMB!</span>\n"
|
||||
mood_change = -10
|
||||
timeout = 8 MINUTES
|
||||
|
||||
/datum/mood_event/tased
|
||||
description = "<span class='warning'>There's no \"z\" in \"taser\". It's in the zap.</span>\n"
|
||||
@@ -109,20 +109,20 @@
|
||||
description = "<span class='warning'>My fucking [banged_limb.name], man that hurts...</span>\n"
|
||||
|
||||
/datum/mood_event/brain_damage
|
||||
mood_change = -3
|
||||
mood_change = -3
|
||||
|
||||
/datum/mood_event/brain_damage/add_effects()
|
||||
var/damage_message = pick_list_replacements(BRAIN_DAMAGE_FILE, "brain_damage")
|
||||
description = "<span class='warning'>Hurr durr... [damage_message]</span>\n"
|
||||
var/damage_message = pick_list_replacements(BRAIN_DAMAGE_FILE, "brain_damage")
|
||||
description = "<span class='warning'>Hurr durr... [damage_message]</span>\n"
|
||||
|
||||
/datum/mood_event/hulk //Entire duration of having the hulk mutation
|
||||
description = "<span class='warning'>HULK SMASH!</span>\n"
|
||||
mood_change = -4
|
||||
description = "<span class='warning'>HULK SMASH!</span>\n"
|
||||
mood_change = -4
|
||||
|
||||
/datum/mood_event/epilepsy //Only when the mutation causes a seizure
|
||||
description = "<span class='warning'>I should have paid attention to the epilepsy warning.</span>\n"
|
||||
mood_change = -3
|
||||
timeout = 5 MINUTES
|
||||
description = "<span class='warning'>I should have paid attention to the epilepsy warning.</span>\n"
|
||||
mood_change = -3
|
||||
timeout = 5 MINUTES
|
||||
|
||||
/datum/mood_event/nyctophobia
|
||||
description = "<span class='warning'>It sure is dark around here...</span>\n"
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
target = target.loc
|
||||
|
||||
/**
|
||||
* Reacts to any movement that would cause a change in coordinates of the tracked movable atom
|
||||
* This works by detecting movement of either the tracked object, or anything it is inside, recursively
|
||||
*/
|
||||
* Reacts to any movement that would cause a change in coordinates of the tracked movable atom
|
||||
* This works by detecting movement of either the tracked object, or anything it is inside, recursively
|
||||
*/
|
||||
/datum/movement_detector/proc/move_react(atom/movable/mover, atom/oldloc, direction)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
|
||||
@@ -47,14 +47,14 @@
|
||||
source.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced="hulk")
|
||||
|
||||
/**
|
||||
*Checks damage of a hulk's arm and applies bone wounds as necessary.
|
||||
*
|
||||
*Called by specific atoms being attacked, such as walls. If an atom
|
||||
*does not call this proc, than punching that atom will not cause
|
||||
*arm breaking (even if the atom deals recoil damage to hulks).
|
||||
*Arguments:
|
||||
*arg1 is the arm to evaluate damage of and possibly break.
|
||||
*/
|
||||
*Checks damage of a hulk's arm and applies bone wounds as necessary.
|
||||
*
|
||||
*Called by specific atoms being attacked, such as walls. If an atom
|
||||
*does not call this proc, than punching that atom will not cause
|
||||
*arm breaking (even if the atom deals recoil damage to hulks).
|
||||
*Arguments:
|
||||
*arg1 is the arm to evaluate damage of and possibly break.
|
||||
*/
|
||||
/datum/mutation/human/hulk/proc/break_an_arm(obj/item/bodypart/arm)
|
||||
switch(arm.brute_dam)
|
||||
if(45 to 50)
|
||||
|
||||
+49
-49
@@ -1,18 +1,18 @@
|
||||
/**
|
||||
* # Outfit datums
|
||||
*
|
||||
* This is a clean system of applying outfits to mobs, if you need to equip someone in a uniform
|
||||
* this is the way to do it cleanly and properly.
|
||||
*
|
||||
* You can also specify an outfit datum on a job to have it auto equipped to the mob on join
|
||||
*
|
||||
* /mob/living/carbon/human/proc/equipOutfit(outfit) is the mob level proc to equip an outfit
|
||||
* and you pass it the relevant datum outfit
|
||||
*
|
||||
* outfits can also be saved as json blobs downloadable by a client and then can be uploaded
|
||||
* by that user to recreate the outfit, this is used by admins to allow for custom event outfits
|
||||
* that can be restored at a later date
|
||||
*/
|
||||
* # Outfit datums
|
||||
*
|
||||
* This is a clean system of applying outfits to mobs, if you need to equip someone in a uniform
|
||||
* this is the way to do it cleanly and properly.
|
||||
*
|
||||
* You can also specify an outfit datum on a job to have it auto equipped to the mob on join
|
||||
*
|
||||
* /mob/living/carbon/human/proc/equipOutfit(outfit) is the mob level proc to equip an outfit
|
||||
* and you pass it the relevant datum outfit
|
||||
*
|
||||
* outfits can also be saved as json blobs downloadable by a client and then can be uploaded
|
||||
* by that user to recreate the outfit, this is used by admins to allow for custom event outfits
|
||||
* that can be restored at a later date
|
||||
*/
|
||||
/datum/outfit
|
||||
///Name of the outfit (shows up in the equip admin verb)
|
||||
var/name = "Naked"
|
||||
@@ -88,14 +88,14 @@
|
||||
/// Internals box. Will be inserted at the start of backpack_contents
|
||||
var/box
|
||||
|
||||
/**
|
||||
/**
|
||||
* Any implants the mob should start implanted with
|
||||
*
|
||||
* Format of this list is (typepath, typepath, typepath)
|
||||
*/
|
||||
var/list/implants = null
|
||||
|
||||
/// Any undershirt. While on humans it is a string, here we use paths to stay consistent with the rest of the equips.
|
||||
/// Any undershirt. While on humans it is a string, here we use paths to stay consistent with the rest of the equips.
|
||||
var/datum/sprite_accessory/undershirt = null
|
||||
|
||||
/// Any clothing accessory item
|
||||
@@ -114,43 +114,43 @@
|
||||
var/list/chameleon_extras
|
||||
|
||||
/**
|
||||
* Called at the start of the equip proc
|
||||
*
|
||||
* Override to change the value of the slots depending on client prefs, species and
|
||||
* other such sources of change
|
||||
*
|
||||
* Extra Arguments
|
||||
* * visualsOnly true if this is only for display (in the character setup screen)
|
||||
*
|
||||
* If visualsOnly is true, you can omit any work that doesn't visually appear on the character sprite
|
||||
*/
|
||||
* Called at the start of the equip proc
|
||||
*
|
||||
* Override to change the value of the slots depending on client prefs, species and
|
||||
* other such sources of change
|
||||
*
|
||||
* Extra Arguments
|
||||
* * visualsOnly true if this is only for display (in the character setup screen)
|
||||
*
|
||||
* If visualsOnly is true, you can omit any work that doesn't visually appear on the character sprite
|
||||
*/
|
||||
/datum/outfit/proc/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
//to be overridden for customization depending on client prefs,species etc
|
||||
return
|
||||
|
||||
/**
|
||||
* Called after the equip proc has finished
|
||||
*
|
||||
* All items are on the mob at this point, use this proc to toggle internals
|
||||
* fiddle with id bindings and accesses etc
|
||||
*
|
||||
* Extra Arguments
|
||||
* * visualsOnly true if this is only for display (in the character setup screen)
|
||||
*
|
||||
* If visualsOnly is true, you can omit any work that doesn't visually appear on the character sprite
|
||||
*/
|
||||
* Called after the equip proc has finished
|
||||
*
|
||||
* All items are on the mob at this point, use this proc to toggle internals
|
||||
* fiddle with id bindings and accesses etc
|
||||
*
|
||||
* Extra Arguments
|
||||
* * visualsOnly true if this is only for display (in the character setup screen)
|
||||
*
|
||||
* If visualsOnly is true, you can omit any work that doesn't visually appear on the character sprite
|
||||
*/
|
||||
/datum/outfit/proc/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
//to be overridden for toggling internals, id binding, access etc
|
||||
return
|
||||
|
||||
/**
|
||||
* Equips all defined types and paths to the mob passed in
|
||||
*
|
||||
* Extra Arguments
|
||||
* * visualsOnly true if this is only for display (in the character setup screen)
|
||||
*
|
||||
* If visualsOnly is true, you can omit any work that doesn't visually appear on the character sprite
|
||||
*/
|
||||
* Equips all defined types and paths to the mob passed in
|
||||
*
|
||||
* Extra Arguments
|
||||
* * visualsOnly true if this is only for display (in the character setup screen)
|
||||
*
|
||||
* If visualsOnly is true, you can omit any work that doesn't visually appear on the character sprite
|
||||
*/
|
||||
/datum/outfit/proc/equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
pre_equip(H, visualsOnly)
|
||||
|
||||
@@ -237,12 +237,12 @@
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Apply a fingerprint from the passed in human to all items in the outfit
|
||||
*
|
||||
* Used for forensics setup when the mob is first equipped at roundstart
|
||||
* essentially calls add_fingerprint to every defined item on the human
|
||||
*
|
||||
*/
|
||||
* Apply a fingerprint from the passed in human to all items in the outfit
|
||||
*
|
||||
* Used for forensics setup when the mob is first equipped at roundstart
|
||||
* essentially calls add_fingerprint to every defined item on the human
|
||||
*
|
||||
*/
|
||||
/datum/outfit/proc/apply_fingerprints(mob/living/carbon/human/H)
|
||||
if(!istype(H))
|
||||
return
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* * items are objects. Fruits, tools, circuit boards.
|
||||
* * result is type to create as new object
|
||||
* * time is optional parameter, you shall use in in your machine,
|
||||
default /datum/recipe/ procs does not rely on this parameter.
|
||||
* default /datum/recipe/ procs does not rely on this parameter.
|
||||
*
|
||||
* Functions you need:
|
||||
* /datum/recipe/proc/make(obj/container as obj)
|
||||
|
||||
@@ -16,10 +16,10 @@ GLOBAL_LIST_INIT(skill_types, subtypesof(/datum/skill))
|
||||
/datum/skill/proc/get_skill_modifier(modifier, level)
|
||||
return modifiers[modifier][level] //Levels range from 1 (None) to 7 (Legendary)
|
||||
/**
|
||||
* new: sets up some lists.
|
||||
*
|
||||
*Can't happen in the datum's definition because these lists are not constant expressions
|
||||
*/
|
||||
* new: sets up some lists.
|
||||
*
|
||||
*Can't happen in the datum's definition because these lists are not constant expressions
|
||||
*/
|
||||
/datum/skill/New()
|
||||
. = ..()
|
||||
levelUpMessages = list("<span class='nicegreen'>What the hell is [name]? Tell an admin if you see this message.</span>", //This first index shouldn't ever really be used
|
||||
@@ -28,7 +28,7 @@ GLOBAL_LIST_INIT(skill_types, subtypesof(/datum/skill))
|
||||
"<span class='nicegreen'>I'm getting much better at [name]!</span>",
|
||||
"<span class='nicegreen'>I feel like I've become quite proficient at [name]!</span>",
|
||||
"<span class='nicegreen'>After lots of practice, I've begun to truly understand the intricacies \
|
||||
and surprising depth behind [name]. I now consider myself a master [title].</span>",
|
||||
and surprising depth behind [name]. I now consider myself a master [title].</span>",
|
||||
"<span class='nicegreen'>Through incredible determination and effort, I've reached the peak of my [name] abiltities. I'm finally able to consider myself a legendary [title]!</span>" )
|
||||
levelDownMessages = list("<span class='nicegreen'>I have somehow completely lost all understanding of [name]. Please tell an admin if you see this.</span>",
|
||||
"<span class='nicegreen'>I'm starting to forget what [name] really even is. I need more practice...</span>",
|
||||
@@ -39,30 +39,30 @@ GLOBAL_LIST_INIT(skill_types, subtypesof(/datum/skill))
|
||||
"<span class='nicegreen'>I feel as though my legendary [name] skills have deteriorated. I'll need more intense training to recover my lost skills.</span>" )
|
||||
|
||||
/**
|
||||
* level_gained: Gives skill levelup messages to the user
|
||||
*
|
||||
* Only fires if the xp gain isn't silent, so only really useful for messages.
|
||||
* Arguments:
|
||||
* * mind - The mind that you'll want to send messages
|
||||
* * new_level - The newly gained level. Can check the actual level to give different messages at different levels, see defines in skills.dm
|
||||
* * old_level - Similar to the above, but the level you had before levelling up.
|
||||
*/
|
||||
* level_gained: Gives skill levelup messages to the user
|
||||
*
|
||||
* Only fires if the xp gain isn't silent, so only really useful for messages.
|
||||
* Arguments:
|
||||
* * mind - The mind that you'll want to send messages
|
||||
* * new_level - The newly gained level. Can check the actual level to give different messages at different levels, see defines in skills.dm
|
||||
* * old_level - Similar to the above, but the level you had before levelling up.
|
||||
*/
|
||||
/datum/skill/proc/level_gained(datum/mind/mind, new_level, old_level)//just for announcements (doesn't go off if the xp gain is silent)
|
||||
to_chat(mind.current, levelUpMessages[new_level]) //new_level will be a value from 1 to 6, so we get appropriate message from the 6-element levelUpMessages list
|
||||
/**
|
||||
* level_lost: See level_gained, same idea but fires on skill level-down
|
||||
*/
|
||||
* level_lost: See level_gained, same idea but fires on skill level-down
|
||||
*/
|
||||
/datum/skill/proc/level_lost(datum/mind/mind, new_level, old_level)
|
||||
to_chat(mind.current, levelDownMessages[old_level]) //old_level will be a value from 1 to 6, so we get appropriate message from the 6-element levelUpMessages list
|
||||
|
||||
/**
|
||||
* try_skill_reward: Checks to see if a user is eligable for a tangible reward for reaching a certain skill level
|
||||
*
|
||||
* Currently gives the user a special cloak when they reach a legendary level at any given skill
|
||||
* Arguments:
|
||||
* * mind - The mind that you'll want to send messages and rewards to
|
||||
* * new_level - The current level of the user. Used to check if it meets the requirements for a reward
|
||||
*/
|
||||
* try_skill_reward: Checks to see if a user is eligable for a tangible reward for reaching a certain skill level
|
||||
*
|
||||
* Currently gives the user a special cloak when they reach a legendary level at any given skill
|
||||
* Arguments:
|
||||
* * mind - The mind that you'll want to send messages and rewards to
|
||||
* * new_level - The current level of the user. Used to check if it meets the requirements for a reward
|
||||
*/
|
||||
/datum/skill/proc/try_skill_reward(datum/mind/mind, new_level)
|
||||
if (new_level != SKILL_LEVEL_LEGENDARY)
|
||||
return
|
||||
|
||||
@@ -400,10 +400,10 @@
|
||||
return ..()
|
||||
|
||||
/**
|
||||
* What happens when this mark gets poppedd
|
||||
*
|
||||
* Adds actual functionality to each mark
|
||||
*/
|
||||
* What happens when this mark gets poppedd
|
||||
*
|
||||
* Adds actual functionality to each mark
|
||||
*/
|
||||
/datum/status_effect/eldritch/proc/on_effect()
|
||||
playsound(owner, 'sound/magic/repulse.ogg', 75, TRUE)
|
||||
qdel(src) //what happens when this is procced.
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
|
||||
|
||||
/**
|
||||
* On client connection set quirk preferences.
|
||||
*
|
||||
* Run post_add to set the client preferences for the quirk.
|
||||
* Clear the attached signal for login.
|
||||
* Used when the quirk has been gained and no client is attached to the mob.
|
||||
*/
|
||||
* On client connection set quirk preferences.
|
||||
*
|
||||
* Run post_add to set the client preferences for the quirk.
|
||||
* Clear the attached signal for login.
|
||||
* Used when the quirk has been gained and no client is attached to the mob.
|
||||
*/
|
||||
/datum/quirk/proc/on_quirk_holder_first_login(mob/living/source)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -85,12 +85,12 @@
|
||||
on_process(delta_time)
|
||||
|
||||
/**
|
||||
* get_quirk_string() is used to get a printable string of all the quirk traits someone has for certain criteria
|
||||
*
|
||||
* Arguments:
|
||||
* * Medical- If we want the long, fancy descriptions that show up in medical records, or if not, just the name
|
||||
* * Category- Which types of quirks we want to print out. Defaults to everything
|
||||
*/
|
||||
* get_quirk_string() is used to get a printable string of all the quirk traits someone has for certain criteria
|
||||
*
|
||||
* Arguments:
|
||||
* * Medical- If we want the long, fancy descriptions that show up in medical records, or if not, just the name
|
||||
* * Category- Which types of quirks we want to print out. Defaults to everything
|
||||
*/
|
||||
/mob/living/proc/get_quirk_string(medical, category = CAT_QUIRK_ALL) //helper string. gets a string of all the quirks the mob has
|
||||
var/list/dat = list()
|
||||
switch(category)
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/**
|
||||
* Causes weather to occur on a z level in certain area types
|
||||
*
|
||||
* The effects of weather occur across an entire z-level. For instance, lavaland has periodic ash storms that scorch most unprotected creatures.
|
||||
* Weather always occurs on different z levels at different times, regardless of weather type.
|
||||
* Can have custom durations, targets, and can automatically protect indoor areas.
|
||||
*
|
||||
*/
|
||||
* Causes weather to occur on a z level in certain area types
|
||||
*
|
||||
* The effects of weather occur across an entire z-level. For instance, lavaland has periodic ash storms that scorch most unprotected creatures.
|
||||
* Weather always occurs on different z levels at different times, regardless of weather type.
|
||||
* Can have custom durations, targets, and can automatically protect indoor areas.
|
||||
*
|
||||
*/
|
||||
|
||||
/datum/weather
|
||||
/// name of weather
|
||||
var/name = "space wind"
|
||||
/// description of weather
|
||||
var/desc = "Heavy gusts of wind blanket the area, periodically knocking down anyone caught in the open."
|
||||
/// The message displayed in chat to foreshadow the weather's beginning
|
||||
/// The message displayed in chat to foreshadow the weather's beginning
|
||||
var/telegraph_message = "<span class='warning'>The wind begins to pick up.</span>"
|
||||
/// In deciseconds, how long from the beginning of the telegraph until the weather begins
|
||||
var/telegraph_duration = 300
|
||||
@@ -56,7 +56,7 @@
|
||||
/// The list of z-levels that this weather is actively affecting
|
||||
var/impacted_z_levels
|
||||
|
||||
/// Since it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that.
|
||||
/// Since it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that.
|
||||
var/overlay_layer = AREA_LAYER
|
||||
/// Plane for the overlay
|
||||
var/overlay_plane = BLACKNESS_PLANE
|
||||
@@ -65,7 +65,7 @@
|
||||
/// Used by mobs to prevent them from being affected by the weather
|
||||
var/immunity_type = "storm"
|
||||
|
||||
/// The stage of the weather, from 1-4
|
||||
/// The stage of the weather, from 1-4
|
||||
var/stage = END_STAGE
|
||||
|
||||
/// Weight amongst other eligible weather. If zero, will never happen randomly.
|
||||
@@ -85,12 +85,12 @@
|
||||
impacted_z_levels = z_levels
|
||||
|
||||
/**
|
||||
* Telegraphs the beginning of the weather on the impacted z levels
|
||||
*
|
||||
* Sends sounds and details to mobs in the area
|
||||
* Calculates duration and hit areas, and makes a callback for the actual weather to start
|
||||
*
|
||||
*/
|
||||
* Telegraphs the beginning of the weather on the impacted z levels
|
||||
*
|
||||
* Sends sounds and details to mobs in the area
|
||||
* Calculates duration and hit areas, and makes a callback for the actual weather to start
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/telegraph()
|
||||
if(stage == STARTUP_STAGE)
|
||||
return
|
||||
@@ -119,12 +119,12 @@
|
||||
addtimer(CALLBACK(src, .proc/start), telegraph_duration)
|
||||
|
||||
/**
|
||||
* Starts the actual weather and effects from it
|
||||
*
|
||||
* Updates area overlays and sends sounds and messages to mobs to notify them
|
||||
* Begins dealing effects from weather to mobs in the area
|
||||
*
|
||||
*/
|
||||
* Starts the actual weather and effects from it
|
||||
*
|
||||
* Updates area overlays and sends sounds and messages to mobs to notify them
|
||||
* Begins dealing effects from weather to mobs in the area
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/start()
|
||||
if(stage >= MAIN_STAGE)
|
||||
return
|
||||
@@ -141,12 +141,12 @@
|
||||
addtimer(CALLBACK(src, .proc/wind_down), weather_duration)
|
||||
|
||||
/**
|
||||
* Weather enters the winding down phase, stops effects
|
||||
*
|
||||
* Updates areas to be in the winding down phase
|
||||
* Sends sounds and messages to mobs to notify them
|
||||
*
|
||||
*/
|
||||
* Weather enters the winding down phase, stops effects
|
||||
*
|
||||
* Updates areas to be in the winding down phase
|
||||
* Sends sounds and messages to mobs to notify them
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/wind_down()
|
||||
if(stage >= WIND_DOWN_STAGE)
|
||||
return
|
||||
@@ -162,12 +162,12 @@
|
||||
addtimer(CALLBACK(src, .proc/end), end_duration)
|
||||
|
||||
/**
|
||||
* Fully ends the weather
|
||||
*
|
||||
* Effects no longer occur and area overlays are removed
|
||||
* Removes weather from processing completely
|
||||
*
|
||||
*/
|
||||
* Fully ends the weather
|
||||
*
|
||||
* Effects no longer occur and area overlays are removed
|
||||
* Removes weather from processing completely
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/end()
|
||||
if(stage == END_STAGE)
|
||||
return 1
|
||||
@@ -176,9 +176,9 @@
|
||||
update_areas()
|
||||
|
||||
/**
|
||||
* Returns TRUE if the living mob can be affected by the weather
|
||||
*
|
||||
*/
|
||||
* Returns TRUE if the living mob can be affected by the weather
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/can_weather_act(mob/living/L)
|
||||
var/turf/mob_turf = get_turf(L)
|
||||
if(mob_turf && !(mob_turf.z in impacted_z_levels))
|
||||
@@ -190,16 +190,16 @@
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Affects the mob with whatever the weather does
|
||||
*
|
||||
*/
|
||||
* Affects the mob with whatever the weather does
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/weather_act(mob/living/L)
|
||||
return
|
||||
|
||||
/**
|
||||
* Updates the overlays on impacted areas
|
||||
*
|
||||
*/
|
||||
* Updates the overlays on impacted areas
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/update_areas()
|
||||
for(var/V in impacted_areas)
|
||||
var/area/N = V
|
||||
|
||||
+14
-14
@@ -229,13 +229,13 @@
|
||||
return
|
||||
|
||||
/**
|
||||
* Checks whether wire assignments should be revealed.
|
||||
*
|
||||
* Returns TRUE if the wires should be revealed, FALSE otherwise.
|
||||
* Currently checks for admin ghost AI, abductor multitool and blueprints.
|
||||
* Arguments:
|
||||
* * user - The mob to check when deciding whether to reveal wires.
|
||||
*/
|
||||
* Checks whether wire assignments should be revealed.
|
||||
*
|
||||
* Returns TRUE if the wires should be revealed, FALSE otherwise.
|
||||
* Currently checks for admin ghost AI, abductor multitool and blueprints.
|
||||
* Arguments:
|
||||
* * user - The mob to check when deciding whether to reveal wires.
|
||||
*/
|
||||
/datum/wires/proc/can_reveal_wires(mob/user)
|
||||
// Admin ghost can see a purpose of each wire.
|
||||
if(isAdminGhostAI(user))
|
||||
@@ -252,13 +252,13 @@
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* Whether the given wire should always be revealed.
|
||||
*
|
||||
* Intended to be overridden. Allows for forcing a wire's assignmenmt to always be revealed
|
||||
* in the hacking interface.
|
||||
* Arguments:
|
||||
* * color - Color string of the wire to check.
|
||||
*/
|
||||
* Whether the given wire should always be revealed.
|
||||
*
|
||||
* Intended to be overridden. Allows for forcing a wire's assignmenmt to always be revealed
|
||||
* in the hacking interface.
|
||||
* Arguments:
|
||||
* * color - Color string of the wire to check.
|
||||
*/
|
||||
/datum/wires/proc/always_reveal_wire(color)
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -100,15 +100,15 @@
|
||||
return ..()
|
||||
|
||||
/**
|
||||
* apply_wound() is used once a wound type is instantiated to assign it to a bodypart, and actually come into play.
|
||||
*
|
||||
*
|
||||
* Arguments:
|
||||
* * L: The bodypart we're wounding, we don't care about the person, we can get them through the limb
|
||||
* * silent: Not actually necessary I don't think, was originally used for demoting wounds so they wouldn't make new messages, but I believe old_wound took over that, I may remove this shortly
|
||||
* * old_wound: If our new wound is a replacement for one of the same time (promotion or demotion), we can reference the old one just before it's removed to copy over necessary vars
|
||||
* * smited- If this is a smite, we don't care about this wound for stat tracking purposes (not yet implemented)
|
||||
*/
|
||||
* apply_wound() is used once a wound type is instantiated to assign it to a bodypart, and actually come into play.
|
||||
*
|
||||
*
|
||||
* Arguments:
|
||||
* * L: The bodypart we're wounding, we don't care about the person, we can get them through the limb
|
||||
* * silent: Not actually necessary I don't think, was originally used for demoting wounds so they wouldn't make new messages, but I believe old_wound took over that, I may remove this shortly
|
||||
* * old_wound: If our new wound is a replacement for one of the same time (promotion or demotion), we can reference the old one just before it's removed to copy over necessary vars
|
||||
* * smited- If this is a smite, we don't care about this wound for stat tracking purposes (not yet implemented)
|
||||
*/
|
||||
/datum/wound/proc/apply_wound(obj/item/bodypart/L, silent = FALSE, datum/wound/old_wound = null, smited = FALSE)
|
||||
if(!istype(L) || !L.owner || !(L.body_zone in viable_zones) || isalien(L.owner) || !L.is_organic_limb())
|
||||
qdel(src)
|
||||
@@ -180,14 +180,14 @@
|
||||
limb.update_wounds(replaced)
|
||||
|
||||
/**
|
||||
* replace_wound() is used when you want to replace the current wound with a new wound, presumably of the same category, just of a different severity (either up or down counts)
|
||||
*
|
||||
* This proc actually instantiates the new wound based off the specific type path passed, then returns the new instantiated wound datum.
|
||||
*
|
||||
* Arguments:
|
||||
* * new_type- The TYPE PATH of the wound you want to replace this, like /datum/wound/slash/severe
|
||||
* * smited- If this is a smite, we don't care about this wound for stat tracking purposes (not yet implemented)
|
||||
*/
|
||||
* replace_wound() is used when you want to replace the current wound with a new wound, presumably of the same category, just of a different severity (either up or down counts)
|
||||
*
|
||||
* This proc actually instantiates the new wound based off the specific type path passed, then returns the new instantiated wound datum.
|
||||
*
|
||||
* Arguments:
|
||||
* * new_type- The TYPE PATH of the wound you want to replace this, like /datum/wound/slash/severe
|
||||
* * smited- If this is a smite, we don't care about this wound for stat tracking purposes (not yet implemented)
|
||||
*/
|
||||
/datum/wound/proc/replace_wound(new_type, smited = FALSE)
|
||||
var/datum/wound/new_wound = new new_type
|
||||
already_scarred = TRUE
|
||||
@@ -247,15 +247,15 @@
|
||||
victim.reagents.add_reagent(/datum/reagent/determination, WOUND_DETERMINATION_LOSS)
|
||||
|
||||
/**
|
||||
* try_treating() is an intercept run from [/mob/living/carbon/proc/attackby] right after surgeries but before anything else. Return TRUE here if the item is something that is relevant to treatment to take over the interaction.
|
||||
*
|
||||
* This proc leads into [/datum/wound/proc/treat] and probably shouldn't be added onto in children types. You can specify what items or tools you want to be intercepted
|
||||
* with var/list/treatable_by and var/treatable_tool, then if an item fulfills one of those requirements and our wound claims it first, it goes over to treat() and treat_self().
|
||||
*
|
||||
* Arguments:
|
||||
* * I: The item we're trying to use
|
||||
* * user: The mob trying to use it on us
|
||||
*/
|
||||
* try_treating() is an intercept run from [/mob/living/carbon/proc/attackby] right after surgeries but before anything else. Return TRUE here if the item is something that is relevant to treatment to take over the interaction.
|
||||
*
|
||||
* This proc leads into [/datum/wound/proc/treat] and probably shouldn't be added onto in children types. You can specify what items or tools you want to be intercepted
|
||||
* with var/list/treatable_by and var/treatable_tool, then if an item fulfills one of those requirements and our wound claims it first, it goes over to treat() and treat_self().
|
||||
*
|
||||
* Arguments:
|
||||
* * I: The item we're trying to use
|
||||
* * user: The mob trying to use it on us
|
||||
*/
|
||||
/datum/wound/proc/try_treating(obj/item/I, mob/user)
|
||||
// first we weed out if we're not dealing with our wound's bodypart, or if it might be an attack
|
||||
if(QDELETED(I) || limb.body_zone != user.zone_selected || (I.force && user.a_intent != INTENT_HELP))
|
||||
@@ -341,13 +341,13 @@
|
||||
return
|
||||
|
||||
/**
|
||||
* get_examine_description() is used in carbon/examine and human/examine to show the status of this wound. Useful if you need to show some status like the wound being splinted or bandaged.
|
||||
*
|
||||
* Return the full string line you want to show, note that we're already dealing with the 'warning' span at this point, and that \n is already appended for you in the place this is called from
|
||||
*
|
||||
* Arguments:
|
||||
* * mob/user: The user examining the wound's owner, if that matters
|
||||
*/
|
||||
* get_examine_description() is used in carbon/examine and human/examine to show the status of this wound. Useful if you need to show some status like the wound being splinted or bandaged.
|
||||
*
|
||||
* Return the full string line you want to show, note that we're already dealing with the 'warning' span at this point, and that \n is already appended for you in the place this is called from
|
||||
*
|
||||
* Arguments:
|
||||
* * mob/user: The user examining the wound's owner, if that matters
|
||||
*/
|
||||
/datum/wound/proc/get_examine_description(mob/user)
|
||||
. = "[victim.p_their(TRUE)] [limb.name] [examine_desc]"
|
||||
. = severity <= WOUND_SEVERITY_MODERATE ? "[.]." : "<B>[.]!</B>"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/**
|
||||
* scars are cosmetic datums that are assigned to bodyparts once they recover from wounds. Each wound type and severity have their own descriptions for what the scars
|
||||
* look like, and then each body part has a list of "specific locations" like your elbow or wrist or wherever the scar can appear, to make it more interesting than "right arm"
|
||||
*
|
||||
*
|
||||
* Arguments:
|
||||
* *
|
||||
*/
|
||||
* scars are cosmetic datums that are assigned to bodyparts once they recover from wounds. Each wound type and severity have their own descriptions for what the scars
|
||||
* look like, and then each body part has a list of "specific locations" like your elbow or wrist or wherever the scar can appear, to make it more interesting than "right arm"
|
||||
*
|
||||
*
|
||||
* Arguments:
|
||||
* *
|
||||
*/
|
||||
/datum/scar
|
||||
var/obj/item/bodypart/limb
|
||||
var/mob/living/carbon/victim
|
||||
@@ -35,15 +35,15 @@
|
||||
. = ..()
|
||||
|
||||
/**
|
||||
* generate() is used to actually fill out the info for a scar, according to the limb and wound it is provided.
|
||||
*
|
||||
* After creating a scar, call this on it while targeting the scarred bodypart with a given wound to apply the scar.
|
||||
*
|
||||
* Arguments:
|
||||
* * BP- The bodypart being targeted
|
||||
* * W- The wound being used to generate the severity and description info
|
||||
* * add_to_scars- Should always be TRUE unless you're just storing a scar for later usage, like how cuts want to store a scar for the highest severity of cut, rather than the severity when the wound is fully healed (probably demoted to moderate)
|
||||
*/
|
||||
* generate() is used to actually fill out the info for a scar, according to the limb and wound it is provided.
|
||||
*
|
||||
* After creating a scar, call this on it while targeting the scarred bodypart with a given wound to apply the scar.
|
||||
*
|
||||
* Arguments:
|
||||
* * BP- The bodypart being targeted
|
||||
* * W- The wound being used to generate the severity and description info
|
||||
* * add_to_scars- Should always be TRUE unless you're just storing a scar for later usage, like how cuts want to store a scar for the highest severity of cut, rather than the severity when the wound is fully healed (probably demoted to moderate)
|
||||
*/
|
||||
/datum/scar/proc/generate(obj/item/bodypart/BP, datum/wound/W, add_to_scars=TRUE)
|
||||
limb = BP
|
||||
severity = W.severity
|
||||
|
||||
Reference in New Issue
Block a user