|
|
|
|
@@ -14,26 +14,27 @@
|
|
|
|
|
var/pass_flags = 0
|
|
|
|
|
var/throwpass = 0
|
|
|
|
|
var/germ_level = GERM_LEVEL_AMBIENT // The higher the germ level, the more germ on the atom.
|
|
|
|
|
var/simulated = 1 //filter for actions - used by lighting overlays
|
|
|
|
|
var/simulated = 1 // Filter for actions. Used by lighting overlays.
|
|
|
|
|
var/fluorescent // Shows up under a UV light.
|
|
|
|
|
|
|
|
|
|
///Chemistry.
|
|
|
|
|
/// Chemistry.
|
|
|
|
|
var/datum/reagents/reagents = null
|
|
|
|
|
var/list/reagents_to_add
|
|
|
|
|
var/list/reagent_data
|
|
|
|
|
|
|
|
|
|
var/list/atom_colours //used to store the different colors on an atom
|
|
|
|
|
//its inherent color, the colored paint applied on it, special color effect etc...
|
|
|
|
|
var/list/atom_colours // Used to store the different colors on an atom, such as its inherent color, the colored paint applied on it, special color effect, and so on.
|
|
|
|
|
|
|
|
|
|
//var/chem_is_open_container = 0
|
|
|
|
|
// replaced by OPENCONTAINER flags and atom/proc/is_open_container()
|
|
|
|
|
///Chemistry.
|
|
|
|
|
|
|
|
|
|
//Detective Work, used for the duplicate data points kept in the scanners
|
|
|
|
|
// Detective work, used for the duplicate data points kept in the scanners.
|
|
|
|
|
var/list/original_atom
|
|
|
|
|
|
|
|
|
|
var/gfi_layer_rotation = GFI_ROTATION_DEFAULT
|
|
|
|
|
|
|
|
|
|
// Extra descriptions.
|
|
|
|
|
var/desc_fluff = null // Text about the atom's fluff description, if any exists.
|
|
|
|
|
var/desc_info = null // Blue text (SPAN_NOTICE()), informing the user about how to use the item or about game controls.
|
|
|
|
|
var/desc_antag = null // Red text (SPAN_ALERT()), informing the user about how they can use an object to antagonize.
|
|
|
|
|
var/desc_cult = null // Purple text (SPAN_CULT()), telling the user, if they're a cultist, how they can use certain items related to being a cultist.
|
|
|
|
|
|
|
|
|
|
/atom/proc/reveal_blood()
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
@@ -49,17 +50,17 @@
|
|
|
|
|
else
|
|
|
|
|
return null
|
|
|
|
|
|
|
|
|
|
//Will return the contents of an atom recursively to a depth of 'searchDepth'
|
|
|
|
|
// Will return the contents of an atom recursively to a depth of "searchDepth".
|
|
|
|
|
/atom/proc/GetAllContents(searchDepth = 5, checkClient = 1, checkSight = 1, includeMobs = 1, includeObjects = 1)
|
|
|
|
|
var/list/L = list()
|
|
|
|
|
recursive_content_check(src, L, searchDepth, checkClient, checkSight, includeMobs, includeObjects)
|
|
|
|
|
|
|
|
|
|
return L
|
|
|
|
|
|
|
|
|
|
//return flags that should be added to the viewer's sight var.
|
|
|
|
|
//Otherwise return a negative number to indicate that the view should be cancelled.
|
|
|
|
|
// Return flags that should be added to the viewer's sight variable.
|
|
|
|
|
// Otherwise return a negative number to indicate that the view should be cancelled.
|
|
|
|
|
/atom/proc/check_eye(user as mob)
|
|
|
|
|
if (istype(user, /mob/living/silicon/ai)) // WHYYYY
|
|
|
|
|
if (istype(user, /mob/living/silicon/ai))
|
|
|
|
|
return 0
|
|
|
|
|
return -1
|
|
|
|
|
|
|
|
|
|
@@ -77,38 +78,26 @@
|
|
|
|
|
set waitfor = FALSE
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
// Convenience proc to see if a container is open for chemistry handling
|
|
|
|
|
// returns true if open
|
|
|
|
|
// false if closed
|
|
|
|
|
// Convenience proc to see if a container is open for chemistry handling.
|
|
|
|
|
// Returns true if open, false if closed.
|
|
|
|
|
/atom/proc/is_open_container()
|
|
|
|
|
return flags & OPENCONTAINER
|
|
|
|
|
|
|
|
|
|
/*//Convenience proc to see whether a container can be accessed in a certain way.
|
|
|
|
|
|
|
|
|
|
proc/can_subract_container()
|
|
|
|
|
return flags & EXTRACT_CONTAINER
|
|
|
|
|
|
|
|
|
|
proc/can_add_container()
|
|
|
|
|
return flags & INSERT_CONTAINER
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/atom/proc/CheckExit()
|
|
|
|
|
return 1
|
|
|
|
|
|
|
|
|
|
// If you want to use this, the atom must have the PROXMOVE flag, and the moving
|
|
|
|
|
// atom must also have the PROXMOVE flag currently to help with lag. ~ ComicIronic
|
|
|
|
|
// If you want to use this, the atom must have the PROXMOVE flag and the moving atom must also have the PROXMOVE flag currently to help with lag. -ComicIronic
|
|
|
|
|
/atom/proc/HasProximity(atom/movable/AM as mob|obj)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
/atom/proc/emp_act(var/severity)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/atom/proc/bullet_act(obj/item/projectile/P, def_zone)
|
|
|
|
|
P.on_hit(src, 0, def_zone)
|
|
|
|
|
. = 0
|
|
|
|
|
|
|
|
|
|
/atom/proc/in_contents_of(container)//can take class or object instance as argument
|
|
|
|
|
/atom/proc/in_contents_of(container) // Can take class or object instance as argument.
|
|
|
|
|
if(ispath(container))
|
|
|
|
|
if(istype(src.loc, container))
|
|
|
|
|
return 1
|
|
|
|
|
@@ -128,46 +117,45 @@
|
|
|
|
|
|
|
|
|
|
// Checks if user can use this object. Set use_flags to customize what checks are done.
|
|
|
|
|
// Returns 0 if they can use it, a value representing why they can't if not.
|
|
|
|
|
// Flags are in `code/__defines/misc.dm`
|
|
|
|
|
// Flags are in "code/__defines/misc.dm".
|
|
|
|
|
/atom/proc/use_check(mob/user, use_flags = 0, show_messages = FALSE)
|
|
|
|
|
. = USE_SUCCESS
|
|
|
|
|
if (NOT_FLAG(USE_ALLOW_NONLIVING) && !isliving(user))
|
|
|
|
|
// No message for ghosts.
|
|
|
|
|
if(NOT_FLAG(USE_ALLOW_NONLIVING) && !isliving(user)) // No message for ghosts.
|
|
|
|
|
return USE_FAIL_NONLIVING
|
|
|
|
|
|
|
|
|
|
if (NOT_FLAG(USE_ALLOW_NON_ADJACENT) && !Adjacent(user))
|
|
|
|
|
if(NOT_FLAG(USE_ALLOW_NON_ADJACENT) && !Adjacent(user))
|
|
|
|
|
if (show_messages)
|
|
|
|
|
to_chat(user, "<span class='notice'>You're too far away from [src] to do that.</span>")
|
|
|
|
|
to_chat(user, SPAN_NOTICE("You're too far away from [src] to do that."))
|
|
|
|
|
return USE_FAIL_NON_ADJACENT
|
|
|
|
|
|
|
|
|
|
if (NOT_FLAG(USE_ALLOW_DEAD) && user.stat == DEAD)
|
|
|
|
|
if(NOT_FLAG(USE_ALLOW_DEAD) && user.stat == DEAD)
|
|
|
|
|
if (show_messages)
|
|
|
|
|
to_chat(user, "<span class='notice'>How do you expect to do that when you're dead?</span>")
|
|
|
|
|
to_chat(user, SPAN_NOTICE("How do you expect to do that when you're dead?"))
|
|
|
|
|
return USE_FAIL_DEAD
|
|
|
|
|
|
|
|
|
|
if (NOT_FLAG(USE_ALLOW_INCAPACITATED) && (user.incapacitated()))
|
|
|
|
|
if(NOT_FLAG(USE_ALLOW_INCAPACITATED) && (user.incapacitated()))
|
|
|
|
|
if (show_messages)
|
|
|
|
|
to_chat(user, "<span class='notice'>You cannot do that in your current state.</span>")
|
|
|
|
|
to_chat(user, SPAN_NOTICE("You cannot do that in your current state."))
|
|
|
|
|
return USE_FAIL_INCAPACITATED
|
|
|
|
|
|
|
|
|
|
if (NOT_FLAG(USE_ALLOW_NON_ADV_TOOL_USR) && !user.IsAdvancedToolUser())
|
|
|
|
|
if(NOT_FLAG(USE_ALLOW_NON_ADV_TOOL_USR) && !user.IsAdvancedToolUser())
|
|
|
|
|
if (show_messages)
|
|
|
|
|
to_chat(user, "<span class='notice'>You don't know how to operate [src].</span>")
|
|
|
|
|
to_chat(user, SPAN_NOTICE("You don't know how to operate [src]."))
|
|
|
|
|
return USE_FAIL_NON_ADV_TOOL_USR
|
|
|
|
|
|
|
|
|
|
if (HAS_FLAG(USE_DISALLOW_SILICONS) && issilicon(user))
|
|
|
|
|
if(HAS_FLAG(USE_DISALLOW_SILICONS) && issilicon(user))
|
|
|
|
|
if (show_messages)
|
|
|
|
|
to_chat(user, "<span class='notice'>How do you propose doing that without hands?</span>")
|
|
|
|
|
to_chat(user, SPAN_NOTICE("How do you propose doing that without hands?"))
|
|
|
|
|
return USE_FAIL_IS_SILICON
|
|
|
|
|
|
|
|
|
|
if (HAS_FLAG(USE_DISALLOW_SPECIALS) && is_mob_special(user))
|
|
|
|
|
if(HAS_FLAG(USE_DISALLOW_SPECIALS) && is_mob_special(user))
|
|
|
|
|
if (show_messages)
|
|
|
|
|
to_chat(user, "<span class='notice'>Your current mob type prevents you from doing this.</span>")
|
|
|
|
|
to_chat(user, SPAN_NOTICE("Your current mob type prevents you from doing this."))
|
|
|
|
|
return USE_FAIL_IS_MOB_SPECIAL
|
|
|
|
|
|
|
|
|
|
if (HAS_FLAG(USE_FORCE_SRC_IN_USER) && !(src in user))
|
|
|
|
|
if(HAS_FLAG(USE_FORCE_SRC_IN_USER) && !(src in user))
|
|
|
|
|
if (show_messages)
|
|
|
|
|
to_chat(user, "<span class='notice'>You need to be holding [src] to do that.</span>")
|
|
|
|
|
to_chat(user, SPAN_NOTICE("You need to be holding [src] to do that."))
|
|
|
|
|
return USE_FAIL_NOT_IN_USER
|
|
|
|
|
|
|
|
|
|
/atom/proc/use_check_and_message(mob/user, use_flags = 0)
|
|
|
|
|
@@ -181,36 +169,31 @@
|
|
|
|
|
color = origin.color
|
|
|
|
|
set_light(origin.light_range, origin.light_power, origin.light_color)
|
|
|
|
|
|
|
|
|
|
// This function will recurse up the hierarchy containing src, in search of the target. It will stop when it reaches an area, as areas have no loc.
|
|
|
|
|
/atom/proc/find_up_hierarchy(var/atom/target)
|
|
|
|
|
//This function will recurse up the hierarchy containing src, in search of the target
|
|
|
|
|
//It will stop when it reaches an area, as areas have no loc
|
|
|
|
|
var/x = 0//As a safety, we'll crawl up a maximum of ten layers
|
|
|
|
|
var/x = 0 // As a safety, we'll crawl up a maximum of ten layers.
|
|
|
|
|
var/atom/a = src
|
|
|
|
|
while (x < 10)
|
|
|
|
|
x++
|
|
|
|
|
if (isnull(a))
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
if (a == target)//we found it!
|
|
|
|
|
if (a == target) // We found it!
|
|
|
|
|
return 1
|
|
|
|
|
|
|
|
|
|
if (istype(a, /area))
|
|
|
|
|
return 0//Can't recurse any higher than this.
|
|
|
|
|
return 0 // Can't recurse any higher than this.
|
|
|
|
|
|
|
|
|
|
a = a.loc
|
|
|
|
|
|
|
|
|
|
return 0//If we get here, we must be buried many layers deep in nested containers. Shouldn't happen
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* atom/proc/search_contents_for(path,list/filter_path=null)
|
|
|
|
|
* Recursevly searches all atom contens (including contents contents and so on).
|
|
|
|
|
*
|
|
|
|
|
* ARGS: path - search atom contents for atoms of this type
|
|
|
|
|
* list/filter_path - if set, contents of atoms not of types in this list are excluded from search.
|
|
|
|
|
*
|
|
|
|
|
* RETURNS: list of found atoms
|
|
|
|
|
*/
|
|
|
|
|
return 0 // If we get here, we must be buried many layers deep in nested containers, which shouldn't happen.
|
|
|
|
|
|
|
|
|
|
// Recursively searches all atom contents (including the contents' contents and so on).
|
|
|
|
|
//
|
|
|
|
|
// ARGS: path - Search atom contents for atoms of this type.
|
|
|
|
|
// filter_path - If set, contents of atoms not of types in this list are excluded from search.
|
|
|
|
|
//
|
|
|
|
|
// RETURNS: list of found atoms
|
|
|
|
|
/atom/proc/search_contents_for(path,list/filter_path=null)
|
|
|
|
|
var/list/found = list()
|
|
|
|
|
for(var/atom/A in src)
|
|
|
|
|
@@ -226,10 +209,8 @@
|
|
|
|
|
found += A.search_contents_for(path,filter_path)
|
|
|
|
|
return found
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//All atoms
|
|
|
|
|
// Examination code for all atoms.
|
|
|
|
|
/atom/proc/examine(mob/user, var/distance = -1, var/infix = "", var/suffix = "")
|
|
|
|
|
//This reformat names to get a/an properly working on item descriptions when they are bloody
|
|
|
|
|
var/f_name = "\a [src][infix]."
|
|
|
|
|
if(src.blood_DNA && !istype(src, /obj/effect/decal))
|
|
|
|
|
if(gender == PLURAL)
|
|
|
|
|
@@ -241,43 +222,79 @@
|
|
|
|
|
else
|
|
|
|
|
f_name += "oil-stained [name][infix]."
|
|
|
|
|
|
|
|
|
|
to_chat(user, "[icon2html(src, user)] That's [f_name] [suffix]")
|
|
|
|
|
to_chat(user, desc)
|
|
|
|
|
to_chat(user, "[icon2html(src, user)] That's [f_name] [suffix]") // Object name. I.e. "This is an Object. It is a normal-sized item."
|
|
|
|
|
to_chat(user, desc) // Object description.
|
|
|
|
|
|
|
|
|
|
// Extra object descriptions examination code.
|
|
|
|
|
if(desc_fluff || desc_info || (desc_antag && player_is_antag(user.mind)) || (desc_cult && user.mind?.special_role == "Cultist")) // Checks if the object has a fluff description, a mechanics description, an antagonist description (and if the user is an antagonist), and/or a cultist description (and if the user is a cultist).
|
|
|
|
|
to_chat(user, FONT_SMALL(SPAN_NOTICE("\[?\] This object has additional examine info. <a href=?src=\ref[src];examine_fluff=1>\[Show In Chat\]</a>"))) // If any of the above are true, show that the object has more information available.
|
|
|
|
|
if(desc_fluff) // If the item has a fluff description, show that it is available.
|
|
|
|
|
to_chat(user, FONT_SMALL("- This object has additional fluff info."))
|
|
|
|
|
if(desc_info) // If the item has a mechanics description, show that it is available.
|
|
|
|
|
to_chat(user, FONT_SMALL(SPAN_NOTICE("- This object has additional info about mechanics.")))
|
|
|
|
|
if(desc_antag && player_is_antag(user.mind)) // If the item has an antagonist description and the user is an antagonist, show that it is available.
|
|
|
|
|
to_chat(user, FONT_SMALL(SPAN_ALERT("- This object has additional info for antagonists.")))
|
|
|
|
|
if(desc_cult && user.mind?.special_role == "Cultist") // If the item has a cultist description and the user is a cultist, show that it is available.
|
|
|
|
|
to_chat(user, FONT_SMALL(SPAN_CULT("- This object has additional information for those within the veil...")))
|
|
|
|
|
|
|
|
|
|
if(ishuman(user))
|
|
|
|
|
var/mob/living/carbon/human/H = user
|
|
|
|
|
if(H.glasses)
|
|
|
|
|
H.glasses.glasses_examine_atom(src, H)
|
|
|
|
|
|
|
|
|
|
if(description_cult && (user.mind?.special_role == "Cultist" || isobserver(src)))
|
|
|
|
|
to_chat(user, FONT_SMALL(SPAN_CULT(description_cult)))
|
|
|
|
|
if(desc_info || desc_fluff)
|
|
|
|
|
to_chat(user, SPAN_NOTICE("This item has additional examine info. <a href=?src=\ref[src];examine=fluff>\[View\]</a>"))
|
|
|
|
|
if(desc_antag && player_is_antag(user.mind))
|
|
|
|
|
to_chat(user, SPAN_NOTICE("This item has additional antag info. <a href=?src=\ref[src];examine=fluff>\[View\]</a>"))
|
|
|
|
|
return distance == -1 || (get_dist(src, user) <= distance)
|
|
|
|
|
|
|
|
|
|
// Same as examine(), but without the "this object has more info" thing and with the extra information instead.
|
|
|
|
|
/atom/proc/examine_fluff(mob/user, var/distance = -1, var/infix = "", var/suffix = "")
|
|
|
|
|
var/f_name = "\a [src][infix]."
|
|
|
|
|
if(src.blood_DNA && !istype(src, /obj/effect/decal))
|
|
|
|
|
if(gender == PLURAL)
|
|
|
|
|
f_name = "some "
|
|
|
|
|
else
|
|
|
|
|
f_name = "a "
|
|
|
|
|
if(blood_color != "#030303")
|
|
|
|
|
f_name += "<span class='danger'>blood-stained</span> [name][infix]!"
|
|
|
|
|
else
|
|
|
|
|
f_name += "oil-stained [name][infix]."
|
|
|
|
|
|
|
|
|
|
to_chat(user, "[icon2html(src, user)] That's [f_name] [suffix]") // Object name. I.e. "This is an Object."
|
|
|
|
|
to_chat(user, desc) // Object description.
|
|
|
|
|
if(desc_fluff) // If the item has a fluff description, show it.
|
|
|
|
|
to_chat(user, desc_fluff)
|
|
|
|
|
if(desc_info) // If the item has a mechanics description, show it.
|
|
|
|
|
to_chat(user, FONT_SMALL(SPAN_NOTICE("- [desc_info]")))
|
|
|
|
|
if(desc_antag && player_is_antag(user.mind)) // If the item has an antagonist description and the user is an antagonist, show it.
|
|
|
|
|
to_chat(user, FONT_SMALL(SPAN_ALERT("- [desc_antag]")))
|
|
|
|
|
if(desc_cult && user.mind?.special_role == "Cultist") // If the item has a cultist description and the user is a cultist, show it.
|
|
|
|
|
to_chat(user, FONT_SMALL(SPAN_CULT("- [desc_cult]")))
|
|
|
|
|
|
|
|
|
|
if(ishuman(user))
|
|
|
|
|
var/mob/living/carbon/human/H = user
|
|
|
|
|
if(H.glasses)
|
|
|
|
|
H.glasses.glasses_examine_atom(src, H)
|
|
|
|
|
|
|
|
|
|
return distance == -1 || (get_dist(src, user) <= distance)
|
|
|
|
|
|
|
|
|
|
/atom/Topic(href,href_list[])
|
|
|
|
|
// Used to check if "examine_fluff" from the HTML link in examine() is true, i.e. if it was clicked.
|
|
|
|
|
/atom/Topic(href, href_list)
|
|
|
|
|
. = ..()
|
|
|
|
|
if (.)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
switch(href_list["examine"])
|
|
|
|
|
if("fluff")
|
|
|
|
|
usr.client.statpanel = "Examine"
|
|
|
|
|
if(href_list["examine_fluff"])
|
|
|
|
|
examine_fluff(usr)
|
|
|
|
|
|
|
|
|
|
// called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled_to var set.
|
|
|
|
|
// see code/modules/mob/mob_movement.dm for more.
|
|
|
|
|
// Called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled_to var set.
|
|
|
|
|
// See code/modules/mob/mob_movement.dm for more.
|
|
|
|
|
/atom/proc/relaymove()
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
//called to set the atom's dir and used to add behaviour to dir-changes
|
|
|
|
|
// Called to set the atom's dir and used to add behaviour to dir-changes.
|
|
|
|
|
/atom/proc/set_dir(new_dir)
|
|
|
|
|
. = new_dir != dir
|
|
|
|
|
dir = new_dir
|
|
|
|
|
|
|
|
|
|
// Lighting
|
|
|
|
|
// Lighting.
|
|
|
|
|
if (.)
|
|
|
|
|
var/datum/light_source/L
|
|
|
|
|
for (var/thing in light_sources)
|
|
|
|
|
@@ -333,20 +350,20 @@
|
|
|
|
|
if(issilicon(M)) return
|
|
|
|
|
if(isnull(M.key)) return
|
|
|
|
|
if (ishuman(M))
|
|
|
|
|
//Add the list if it does not exist.
|
|
|
|
|
// Add the list if it does not exist.
|
|
|
|
|
if(!fingerprintshidden)
|
|
|
|
|
fingerprintshidden = list()
|
|
|
|
|
|
|
|
|
|
//Fibers~
|
|
|
|
|
// Fibers.
|
|
|
|
|
add_fibers(M)
|
|
|
|
|
|
|
|
|
|
//He has no prints!
|
|
|
|
|
// They have no prints.
|
|
|
|
|
if (mFingerprints in M.mutations)
|
|
|
|
|
if(fingerprintslast != M.key)
|
|
|
|
|
fingerprintshidden += "(Has no fingerprints) Real name: [M.real_name], Key: [M.key]"
|
|
|
|
|
fingerprintslast = M.key
|
|
|
|
|
return 0 //Now, lets get to the dirty work.
|
|
|
|
|
//First, make sure their DNA makes sense.
|
|
|
|
|
return 0 //Now, lets get to the dirty work.
|
|
|
|
|
// First, make sure their DNA makes sense.
|
|
|
|
|
var/mob/living/carbon/human/H = M
|
|
|
|
|
if (!istype(H.dna, /datum/dna) || !H.dna.uni_identity || (length(H.dna.uni_identity) != 32))
|
|
|
|
|
if(!istype(H.dna, /datum/dna))
|
|
|
|
|
@@ -354,86 +371,84 @@
|
|
|
|
|
H.dna.real_name = H.real_name
|
|
|
|
|
H.check_dna()
|
|
|
|
|
|
|
|
|
|
//Now, deal with gloves.
|
|
|
|
|
// Now, deal with gloves.
|
|
|
|
|
if (H.gloves && H.gloves != src)
|
|
|
|
|
if(fingerprintslast != H.key)
|
|
|
|
|
fingerprintshidden += text("\[[]\](Wearing gloves). Real name: [], Key: []",time_stamp(), H.real_name, H.key)
|
|
|
|
|
fingerprintslast = H.key
|
|
|
|
|
H.gloves.add_fingerprint(M)
|
|
|
|
|
|
|
|
|
|
//Deal with gloves the pass finger/palm prints.
|
|
|
|
|
// Deal with gloves that pass finger/palm prints.
|
|
|
|
|
if(!ignoregloves)
|
|
|
|
|
if(istype(H.gloves, /obj/item/clothing/gloves) && H.gloves != src)
|
|
|
|
|
var/obj/item/clothing/gloves/G = H.gloves
|
|
|
|
|
if(!prob(G.fingerprint_chance))
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
//More adminstuffz
|
|
|
|
|
// Admin related.
|
|
|
|
|
if(fingerprintslast != H.key)
|
|
|
|
|
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), H.real_name, H.key)
|
|
|
|
|
fingerprintslast = H.key
|
|
|
|
|
|
|
|
|
|
//Make the list if it does not exist.
|
|
|
|
|
// Make the list if it does not exist.
|
|
|
|
|
if(!fingerprints)
|
|
|
|
|
fingerprints = list()
|
|
|
|
|
|
|
|
|
|
//Hash this shit.
|
|
|
|
|
// Hash it.
|
|
|
|
|
var/full_print = H.get_full_print()
|
|
|
|
|
|
|
|
|
|
// Add the fingerprints
|
|
|
|
|
//
|
|
|
|
|
// Add the fingerprints.
|
|
|
|
|
if(fingerprints[full_print])
|
|
|
|
|
switch(stringpercent(fingerprints[full_print])) //tells us how many stars are in the current prints.
|
|
|
|
|
switch(stringpercent(fingerprints[full_print])) // Tells us how many stars are in the current prints.
|
|
|
|
|
|
|
|
|
|
if(28 to 32)
|
|
|
|
|
if(prob(1))
|
|
|
|
|
fingerprints[full_print] = full_print // You rolled a one buddy.
|
|
|
|
|
fingerprints[full_print] = full_print // You rolled a one buddy.
|
|
|
|
|
else
|
|
|
|
|
fingerprints[full_print] = stars(full_print, rand(0,40)) // 24 to 32
|
|
|
|
|
fingerprints[full_print] = stars(full_print, rand(0,40)) // 24 to 32.
|
|
|
|
|
|
|
|
|
|
if(24 to 27)
|
|
|
|
|
if(prob(3))
|
|
|
|
|
fingerprints[full_print] = full_print //Sucks to be you.
|
|
|
|
|
fingerprints[full_print] = full_print // Sucks to be you.
|
|
|
|
|
else
|
|
|
|
|
fingerprints[full_print] = stars(full_print, rand(15, 55)) // 20 to 29
|
|
|
|
|
fingerprints[full_print] = stars(full_print, rand(15, 55)) // 20 to 29.
|
|
|
|
|
|
|
|
|
|
if(20 to 23)
|
|
|
|
|
if(prob(5))
|
|
|
|
|
fingerprints[full_print] = full_print //Had a good run didn't ya.
|
|
|
|
|
fingerprints[full_print] = full_print // Had a good run didn't ya.
|
|
|
|
|
else
|
|
|
|
|
fingerprints[full_print] = stars(full_print, rand(30, 70)) // 15 to 25
|
|
|
|
|
fingerprints[full_print] = stars(full_print, rand(30, 70)) // 15 to 25.
|
|
|
|
|
|
|
|
|
|
if(16 to 19)
|
|
|
|
|
if(prob(5))
|
|
|
|
|
fingerprints[full_print] = full_print //Welp.
|
|
|
|
|
fingerprints[full_print] = full_print // Welp.
|
|
|
|
|
else
|
|
|
|
|
fingerprints[full_print] = stars(full_print, rand(40, 100)) // 0 to 21
|
|
|
|
|
fingerprints[full_print] = stars(full_print, rand(40, 100)) // 0 to 21.
|
|
|
|
|
|
|
|
|
|
if(0 to 15)
|
|
|
|
|
if(prob(5))
|
|
|
|
|
fingerprints[full_print] = stars(full_print, rand(0,50)) // small chance you can smudge.
|
|
|
|
|
fingerprints[full_print] = stars(full_print, rand(0,50)) // Small chance you can smudge.
|
|
|
|
|
else
|
|
|
|
|
fingerprints[full_print] = full_print
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
fingerprints[full_print] = stars(full_print, rand(0, 20)) //Initial touch, not leaving much evidence the first time.
|
|
|
|
|
fingerprints[full_print] = stars(full_print, rand(0, 20)) // Initial touch, not leaving much evidence the first time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 1
|
|
|
|
|
else
|
|
|
|
|
//Smudge up dem prints some
|
|
|
|
|
// Smudge up the prints a bit.
|
|
|
|
|
if(fingerprintslast != M.key)
|
|
|
|
|
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), M.real_name, M.key)
|
|
|
|
|
fingerprintslast = M.key
|
|
|
|
|
|
|
|
|
|
//Cleaning up shit.
|
|
|
|
|
// Cleaning up.
|
|
|
|
|
if(fingerprints && !fingerprints.len)
|
|
|
|
|
qdel(fingerprints)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/atom/proc/transfer_fingerprints_to(var/atom/A)
|
|
|
|
|
|
|
|
|
|
if(!istype(A.fingerprints,/list))
|
|
|
|
|
A.fingerprints = list()
|
|
|
|
|
|
|
|
|
|
@@ -443,22 +458,20 @@
|
|
|
|
|
if(!istype(fingerprintshidden, /list))
|
|
|
|
|
fingerprintshidden = list()
|
|
|
|
|
|
|
|
|
|
//skytodo
|
|
|
|
|
//A.fingerprints |= fingerprints //detective
|
|
|
|
|
//A.fingerprintshidden |= fingerprintshidden //admin
|
|
|
|
|
if(A.fingerprints && fingerprints)
|
|
|
|
|
A.fingerprints |= fingerprints.Copy() //detective
|
|
|
|
|
A.fingerprints |= fingerprints.Copy() // Detective.
|
|
|
|
|
|
|
|
|
|
if(A.fingerprintshidden && fingerprintshidden)
|
|
|
|
|
A.fingerprintshidden |= fingerprintshidden.Copy() //admin A.fingerprintslast = fingerprintslast
|
|
|
|
|
A.fingerprintshidden |= fingerprintshidden.Copy() // Admin. (A.fingerprintslast = fingerprintslast)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//returns 1 if made bloody, returns 0 otherwise
|
|
|
|
|
// Returns 1 if made bloody, returns 0 otherwise.
|
|
|
|
|
/atom/proc/add_blood(mob/living/carbon/human/M)
|
|
|
|
|
|
|
|
|
|
if(flags & NOBLOODY)
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
if(!blood_DNA || !istype(blood_DNA, /list)) //if our list of DNA doesn't exist yet (or isn't a list) initialise it.
|
|
|
|
|
if(!blood_DNA || !istype(blood_DNA, /list)) // If our list of DNA doesn't exist yet (or isn't a list), initialise it.
|
|
|
|
|
blood_DNA = list()
|
|
|
|
|
|
|
|
|
|
was_bloodied = 1
|
|
|
|
|
@@ -473,8 +486,8 @@
|
|
|
|
|
. = 1
|
|
|
|
|
return 1
|
|
|
|
|
|
|
|
|
|
//For any objects that may require additional handling when swabbed, e.g. a beaker may need to provide information about its contents, not just itself
|
|
|
|
|
//Children must return additional_evidence list
|
|
|
|
|
// For any objects that may require additional handling when swabbed, e.g. a beaker may need to provide information about its contents, not just itself.
|
|
|
|
|
// Children must return additional_evidence list.
|
|
|
|
|
/atom/proc/get_additional_forensics_swab_info()
|
|
|
|
|
SHOULD_CALL_PARENT(TRUE)
|
|
|
|
|
var/list/additional_evidence = list(
|
|
|
|
|
@@ -494,7 +507,7 @@
|
|
|
|
|
inject_reagents.trans_to_obj(this, min(15, inject_reagents.total_volume))
|
|
|
|
|
this.reagents.add_reagent(/decl/reagent/acid/stomach, 5)
|
|
|
|
|
|
|
|
|
|
// Make toxins vomit look different
|
|
|
|
|
// Make toxins related vomit look different.
|
|
|
|
|
if(toxvomit)
|
|
|
|
|
this.icon_state = "vomittox_[pick(1,4)]"
|
|
|
|
|
|
|
|
|
|
@@ -539,10 +552,10 @@
|
|
|
|
|
else
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
// Show a message to all mobs and objects in sight of this atom
|
|
|
|
|
// Use for objects performing visible actions
|
|
|
|
|
// message is output to anyone who can see, e.g. "The [src] does something!"
|
|
|
|
|
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
|
|
|
|
|
// Show a message to all mobs and objects in sight of this atom.
|
|
|
|
|
// Use for objects performing visible actions.
|
|
|
|
|
// The message is output to anyone who can see, e.g. "The [src] does something!"
|
|
|
|
|
// "blind_message" (optional) is what blind people will hear e.g. "You hear something!"
|
|
|
|
|
/atom/proc/visible_message(var/message, var/blind_message, var/range = world.view, var/intent_message = null, var/intent_range = 7)
|
|
|
|
|
var/turf/T = get_turf(src)
|
|
|
|
|
var/list/mobs = list()
|
|
|
|
|
@@ -563,13 +576,12 @@
|
|
|
|
|
if(intent_message)
|
|
|
|
|
intent_message(intent_message, intent_range)
|
|
|
|
|
|
|
|
|
|
// Show a message to all mobs and objects in earshot of this atom
|
|
|
|
|
// Use for objects performing audible actions
|
|
|
|
|
// message is the message output to anyone who can hear.
|
|
|
|
|
// deaf_message (optional) is what deaf people will see.
|
|
|
|
|
// hearing_distance (optional) is the range, how many tiles away the message can be heard.
|
|
|
|
|
// Show a message to all mobs and objects in earshot of this atom.
|
|
|
|
|
// Use for objects performing audible actions.
|
|
|
|
|
// "message" is the message output to anyone who can hear.
|
|
|
|
|
// "deaf_message" (optional) is what deaf people will see.
|
|
|
|
|
// "hearing_distance" (optional) is the range, how many tiles away the message can be heard.
|
|
|
|
|
/atom/proc/audible_message(var/message, var/deaf_message, var/hearing_distance, var/intent_message = null, var/intent_range = 7)
|
|
|
|
|
|
|
|
|
|
var/range = world.view
|
|
|
|
|
if(hearing_distance)
|
|
|
|
|
range = hearing_distance
|
|
|
|
|
@@ -619,8 +631,8 @@
|
|
|
|
|
/atom/movable/onDropInto(var/atom/movable/AM)
|
|
|
|
|
return loc // If onDropInto returns something, then dropInto will attempt to drop AM there.
|
|
|
|
|
|
|
|
|
|
// This proc is used by ghost spawners to assign a player to a specific atom
|
|
|
|
|
// It receives the curent mob of the player s argument and MUST return the mob the player has been assigned.
|
|
|
|
|
// This proc is used by ghost spawners to assign a player to a specific atom.
|
|
|
|
|
// It receives the current mob of the player's argument and MUST return the mob the player has been assigned.
|
|
|
|
|
/atom/proc/assign_player(var/mob/user)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
@@ -649,10 +661,10 @@
|
|
|
|
|
/atom/proc/set_angle(degrees)
|
|
|
|
|
var/matrix/M = matrix()
|
|
|
|
|
M.Turn(degrees)
|
|
|
|
|
// If we aint 0, make it NN transform
|
|
|
|
|
// If we aren't 0, make it NN transform.
|
|
|
|
|
if(degrees)
|
|
|
|
|
appearance_flags |= PIXEL_SCALE
|
|
|
|
|
transform = M
|
|
|
|
|
|
|
|
|
|
/atom/proc/handle_middle_mouse_click(var/mob/user)
|
|
|
|
|
return FALSE
|
|
|
|
|
return FALSE
|