Merge branch 'master' into upstream-merge-30862
This commit is contained in:
@@ -1,191 +0,0 @@
|
||||
|
||||
//Ok so it's technically a double linked list, bite me.
|
||||
|
||||
/datum/linked_list
|
||||
var/datum/linked_node/head
|
||||
var/datum/linked_node/tail
|
||||
var/node_amt = 0
|
||||
|
||||
|
||||
/datum/linked_node
|
||||
var/value = null
|
||||
var/datum/linked_list/linked_list = null
|
||||
var/datum/linked_node/next_node = null
|
||||
var/datum/linked_node/previous_node = null
|
||||
|
||||
|
||||
/datum/linked_list/proc/IsEmpty()
|
||||
. = (node_amt <= 0)
|
||||
|
||||
|
||||
//Add a linked_node (or value, creating a linked_node) at position
|
||||
//the added node BECOMES the position-th element,
|
||||
//eg: add("Test",5), the 5th node is now "Test", the previous 5th moves up to become the 6th
|
||||
/datum/linked_list/proc/Add(node, position)
|
||||
var/datum/linked_node/adding
|
||||
if(istype(node, /datum/linked_node))
|
||||
adding = node
|
||||
else
|
||||
adding = new()
|
||||
adding.value = node
|
||||
|
||||
if(!adding.linked_list || (adding.linked_list && (adding.linked_list != src)))
|
||||
node_amt++
|
||||
|
||||
adding.linked_list = src
|
||||
|
||||
if(position && position < node_amt)
|
||||
//Replacing head
|
||||
if(position == 1)
|
||||
if(head)
|
||||
head.previous_node = adding
|
||||
adding.next_node = head
|
||||
head = adding
|
||||
|
||||
//Replacing any middle node
|
||||
else
|
||||
var/location = 0
|
||||
var/datum/linked_node/at
|
||||
while((location != position) && (location <= node_amt))
|
||||
if(at)
|
||||
if(at.next_node)
|
||||
at = at.next_node
|
||||
else
|
||||
break
|
||||
else
|
||||
at = head
|
||||
location++
|
||||
|
||||
//Push at up and assume it's place as the position-th element
|
||||
if(at && at.previous_node)
|
||||
at.previous_node.next_node = adding
|
||||
adding.previous_node = at.previous_node
|
||||
at.previous_node = adding
|
||||
adding.next_node = at
|
||||
return
|
||||
|
||||
//Replacing tail
|
||||
if(tail)
|
||||
tail.next_node = adding
|
||||
adding.previous_node = tail
|
||||
if(!tail.previous_node)
|
||||
head = tail
|
||||
tail = adding
|
||||
|
||||
|
||||
|
||||
//Remove a linked_node or the linked_node of a value
|
||||
//If you specify a value the FIRST ONE is removed
|
||||
/datum/linked_list/proc/Remove(node)
|
||||
var/datum/linked_node/removing
|
||||
if(istype(node, /datum/linked_node))
|
||||
removing = node
|
||||
else
|
||||
//optimise removing head and tail, no point looping for them, especially the tail
|
||||
if(removing == head)
|
||||
removing = head
|
||||
else if(removing == tail)
|
||||
removing = tail
|
||||
else
|
||||
var/location = 1
|
||||
var/current_value = null
|
||||
var/datum/linked_node/at = null
|
||||
while((current_value != node) && (location <= node_amt))
|
||||
if(at)
|
||||
if(at.next_node)
|
||||
at = at.next_node
|
||||
else
|
||||
at = head
|
||||
location++
|
||||
if(at)
|
||||
current_value = at.value
|
||||
if(current_value == node)
|
||||
removing = at
|
||||
break
|
||||
|
||||
//Adjust pointers of where removing -was- in the chain.
|
||||
if(removing)
|
||||
if(removing.previous_node)
|
||||
if(removing == tail)
|
||||
tail = removing.previous_node
|
||||
if(removing.next_node)
|
||||
if(removing == head)
|
||||
head = removing.next_node
|
||||
removing.next_node.previous_node = removing.previous_node
|
||||
removing.previous_node.next_node = removing.next_node
|
||||
else
|
||||
removing.previous_node.next_node = null
|
||||
else
|
||||
if(removing.next_node)
|
||||
if(removing == head)
|
||||
head = removing.next_node
|
||||
removing.next_node.previous_node = null
|
||||
|
||||
//if this is still true at this point, there's no more nodes to replace them with
|
||||
if(removing == head)
|
||||
head = null
|
||||
if(removing == tail)
|
||||
tail = null
|
||||
|
||||
removing.next_node = null
|
||||
removing.previous_node = null
|
||||
if(removing.linked_list == src)
|
||||
node_amt--
|
||||
removing.linked_list = null
|
||||
|
||||
return removing
|
||||
return 0
|
||||
|
||||
|
||||
//Removes and deletes a node or value
|
||||
/datum/linked_list/proc/RemoveDelete(node)
|
||||
var/datum/linked_node/dead = Remove(node)
|
||||
if(dead)
|
||||
qdel(dead)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
//Empty the linked_list, deleting all nodes
|
||||
/datum/linked_list/proc/Empty()
|
||||
var/datum/linked_node/n = head
|
||||
while(n)
|
||||
var/next = n.next_node
|
||||
Remove(n)
|
||||
qdel(n)
|
||||
n = next
|
||||
node_amt = 0
|
||||
|
||||
|
||||
//Some debugging tools
|
||||
/datum/linked_list/proc/CheckNodeLinks()
|
||||
var/datum/linked_node/n = head
|
||||
while(n)
|
||||
. = "|[n.value]|"
|
||||
if(n.previous_node)
|
||||
. = "[n.previous_node.value]<-" + .
|
||||
if(n.next_node)
|
||||
. += "->[n.next_node.value]"
|
||||
n = n.next_node
|
||||
. += "<BR>"
|
||||
|
||||
|
||||
/datum/linked_list/proc/DrawNodeLinks()
|
||||
. = "|<-"
|
||||
var/datum/linked_node/n = head
|
||||
while(n)
|
||||
if(n.previous_node)
|
||||
. += "<-"
|
||||
. += "[n.value]"
|
||||
if(n.next_node)
|
||||
. += "->"
|
||||
n = n.next_node
|
||||
. += "->|"
|
||||
|
||||
|
||||
/datum/linked_list/proc/ToList()
|
||||
. = list()
|
||||
var/datum/linked_node/n = head
|
||||
while(n)
|
||||
. += n
|
||||
n = n.next_node
|
||||
@@ -1,83 +0,0 @@
|
||||
|
||||
//////////////////////
|
||||
//PriorityQueue object
|
||||
//////////////////////
|
||||
|
||||
//an ordered list, using the cmp proc to weight the list elements
|
||||
/PriorityQueue
|
||||
var/list/L //the actual queue
|
||||
var/cmp //the weight function used to order the queue
|
||||
|
||||
/PriorityQueue/New(compare)
|
||||
L = new()
|
||||
cmp = compare
|
||||
|
||||
/PriorityQueue/proc/IsEmpty()
|
||||
return !L.len
|
||||
|
||||
//return the index the element should be in the priority queue using dichotomic search
|
||||
/PriorityQueue/proc/FindElementIndex(atom/A)
|
||||
var/i = 1
|
||||
var/j = L.len
|
||||
var/mid
|
||||
|
||||
while(i < j)
|
||||
mid = round((i+j)/2)
|
||||
|
||||
if(call(cmp)(L[mid],A) < 0)
|
||||
i = mid + 1
|
||||
else
|
||||
j = mid
|
||||
|
||||
if(i == 1 || i == L.len) //edge cases
|
||||
return (call(cmp)(L[i],A) > 0) ? i : i+1
|
||||
else
|
||||
return i
|
||||
|
||||
|
||||
//add an element in the list,
|
||||
//immediatly ordering it to its position using dichotomic search
|
||||
/PriorityQueue/proc/Enqueue(atom/A)
|
||||
if(!L.len)
|
||||
L.Add(A)
|
||||
return
|
||||
|
||||
L.Insert(FindElementIndex(A),A)
|
||||
|
||||
//removes and returns the first element in the queue
|
||||
/PriorityQueue/proc/Dequeue()
|
||||
if(!L.len)
|
||||
return 0
|
||||
. = L[1]
|
||||
|
||||
Remove(.)
|
||||
|
||||
//removes an element
|
||||
/PriorityQueue/proc/Remove(atom/A)
|
||||
return L.Remove(A)
|
||||
|
||||
//returns a copy of the elements list
|
||||
/PriorityQueue/proc/List()
|
||||
. = L.Copy()
|
||||
|
||||
//return the position of an element or 0 if not found
|
||||
/PriorityQueue/proc/Seek(atom/A)
|
||||
. = L.Find(A)
|
||||
|
||||
//return the element at the i_th position
|
||||
/PriorityQueue/proc/Get(i)
|
||||
if(i > L.len || i < 1)
|
||||
return 0
|
||||
return L[i]
|
||||
|
||||
//replace the passed element at it's right position using the cmp proc
|
||||
/PriorityQueue/proc/ReSort(atom/A)
|
||||
var/i = Seek(A)
|
||||
if(i == 0)
|
||||
return
|
||||
while(i < L.len && call(cmp)(L[i],L[i+1]) > 0)
|
||||
L.Swap(i,i+1)
|
||||
i++
|
||||
while(i > 1 && call(cmp)(L[i],L[i-1]) <= 0) //last inserted element being first in case of ties (optimization)
|
||||
L.Swap(i,i-1)
|
||||
i--
|
||||
@@ -1,56 +0,0 @@
|
||||
/datum/stack
|
||||
var/list/stack = list()
|
||||
var/max_elements = 0
|
||||
|
||||
/datum/stack/New(list/elements,max)
|
||||
..()
|
||||
if(elements)
|
||||
stack = elements.Copy()
|
||||
if(max)
|
||||
max_elements = max
|
||||
|
||||
/datum/stack/proc/Pop()
|
||||
if(is_empty())
|
||||
return null
|
||||
. = stack[stack.len]
|
||||
stack.Cut(stack.len,0)
|
||||
|
||||
/datum/stack/proc/Push(element)
|
||||
if(max_elements && (stack.len+1 > max_elements))
|
||||
return null
|
||||
stack += element
|
||||
|
||||
/datum/stack/proc/Top()
|
||||
if(is_empty())
|
||||
return null
|
||||
. = stack[stack.len]
|
||||
|
||||
/datum/stack/proc/is_empty()
|
||||
. = stack.len ? 0 : 1
|
||||
|
||||
//Rotate entire stack left with the leftmost looping around to the right
|
||||
/datum/stack/proc/RotateLeft()
|
||||
if(is_empty())
|
||||
return 0
|
||||
. = stack[1]
|
||||
stack.Cut(1,2)
|
||||
Push(.)
|
||||
|
||||
//Rotate entire stack to the right with the rightmost looping around to the left
|
||||
/datum/stack/proc/RotateRight()
|
||||
if(is_empty())
|
||||
return 0
|
||||
. = stack[stack.len]
|
||||
stack.Cut(stack.len,0)
|
||||
stack.Insert(1,.)
|
||||
|
||||
|
||||
/datum/stack/proc/Copy()
|
||||
var/datum/stack/S=new()
|
||||
S.stack = stack.Copy()
|
||||
S.max_elements = max_elements
|
||||
return S
|
||||
|
||||
|
||||
/datum/stack/proc/Clear()
|
||||
stack.Cut()
|
||||
+45
-67
@@ -24,7 +24,7 @@
|
||||
#define MUT_MUTE "Mute"
|
||||
#define SMILE "Smile"
|
||||
#define STONER "Stoner"
|
||||
#define UNINTELLIGABLE "Unintelligable"
|
||||
#define UNINTELLIGIBLE "Unintelligible"
|
||||
#define SWEDISH "Swedish"
|
||||
#define CHAV "Chav"
|
||||
#define ELVIS "Elvis"
|
||||
@@ -44,24 +44,10 @@
|
||||
//Mutations that cant be taken from genetics and are not in SE
|
||||
#define NON_SCANNABLE -1
|
||||
|
||||
// Extra powers:
|
||||
#define LASER 9 // harm intent - click anywhere to shoot lasers from eyes
|
||||
#define HEAL 10 // healing people with hands
|
||||
#define SHADOW 11 // shadow teleportation (create in/out portals anywhere) (25%)
|
||||
#define SCREAM 12 // supersonic screaming (25%)
|
||||
#define EXPLOSIVE 13 // exploding on-demand (15%)
|
||||
#define REGENERATION 14 // superhuman regeneration (30%)
|
||||
#define REPROCESSOR 15 // eat anything (50%)
|
||||
#define SHAPESHIFTING 16 // take on the appearance of anything (40%)
|
||||
#define PHASING 17 // ability to phase through walls (40%)
|
||||
#define SHIELD 18 // shielding from all projectile attacks (30%)
|
||||
#define SHOCKWAVE 19 // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%)
|
||||
#define ELECTRICITY 20 // ability to shoot electric attacks (15%)
|
||||
|
||||
//DNA - Because fuck you and your magic numbers being all over the codebase.
|
||||
#define DNA_BLOCK_SIZE 3
|
||||
|
||||
#define DNA_UNI_IDENTITY_BLOCKS 19
|
||||
#define DNA_UNI_IDENTITY_BLOCKS 19 //CIT CHANGE - adds more DNA blocks for cit's mutant bodyparts. Update citadel_defines.dm if this gets changed.
|
||||
#define DNA_HAIR_COLOR_BLOCK 1
|
||||
#define DNA_FACIAL_HAIR_COLOR_BLOCK 2
|
||||
#define DNA_SKIN_TONE_BLOCK 3
|
||||
@@ -69,32 +55,19 @@
|
||||
#define DNA_GENDER_BLOCK 5
|
||||
#define DNA_FACIAL_HAIR_STYLE_BLOCK 6
|
||||
#define DNA_HAIR_STYLE_BLOCK 7
|
||||
#define DNA_EYE_COLOR_TWO_BLOCK 8
|
||||
#define DNA_EYE_COLOR_SWITCH_BLOCK 9
|
||||
#define DNA_EYE_COLOR_BLOCK 10
|
||||
#define DNA_COLOR_ONE_BLOCK 11
|
||||
#define DNA_COLOR_TWO_BLOCK 12
|
||||
#define DNA_COLOR_THR_BLOCK 13
|
||||
#define DNA_COLOR_SWITCH_BLOCK 14
|
||||
#define DNA_COLOR_SWITCH_MAX 7 //must be (2^(n+1))-1
|
||||
#define DNA_COCK_BLOCK 15
|
||||
#define DNA_MUTANTRACE_BLOCK 16
|
||||
#define DNA_MUTANTTAIL_BLOCK 17
|
||||
#define DNA_MUTANTWING_BLOCK 18
|
||||
#define DNA_WINGCOLOR_BLOCK 19
|
||||
#define DNA_STRUC_ENZYMES_BLOCKS 19
|
||||
|
||||
#define DNA_STRUC_ENZYMES_BLOCKS 18
|
||||
#define DNA_UNIQUE_ENZYMES_LEN 32
|
||||
|
||||
//Transformation proc stuff
|
||||
#define TR_KEEPITEMS 1
|
||||
#define TR_KEEPVIRUS 2
|
||||
#define TR_KEEPDAMAGE 4
|
||||
#define TR_HASHNAME 8 // hashing names (e.g. monkey(e34f)) (only in monkeyize)
|
||||
#define TR_KEEPIMPLANTS 16
|
||||
#define TR_KEEPSE 32 // changelings shouldn't edit the DNA's SE when turning into a monkey
|
||||
#define TR_DEFAULTMSG 64
|
||||
#define TR_KEEPSRC 128
|
||||
#define TR_KEEPORGANS 256
|
||||
#define TR_KEEPITEMS (1<<0)
|
||||
#define TR_KEEPVIRUS (1<<1)
|
||||
#define TR_KEEPDAMAGE (1<<2)
|
||||
#define TR_HASHNAME (1<<3) // hashing names (e.g. monkey(e34f)) (only in monkeyize)
|
||||
#define TR_KEEPIMPLANTS (1<<4)
|
||||
#define TR_KEEPSE (1<<5) // changelings shouldn't edit the DNA's SE when turning into a monkey
|
||||
#define TR_DEFAULTMSG (1<<6)
|
||||
#define TR_KEEPORGANS (1<<8)
|
||||
|
||||
|
||||
#define CLONER_FRESH_CLONE "fresh"
|
||||
@@ -106,31 +79,36 @@
|
||||
#define FACEHAIR 3
|
||||
#define EYECOLOR 4
|
||||
#define LIPS 5
|
||||
#define RESISTHOT 6
|
||||
#define RESISTCOLD 7
|
||||
#define RESISTPRESSURE 8
|
||||
#define RADIMMUNE 9
|
||||
#define NOBREATH 10
|
||||
#define NOGUNS 11
|
||||
#define NOBLOOD 12
|
||||
#define NOFIRE 13
|
||||
#define VIRUSIMMUNE 14
|
||||
#define PIERCEIMMUNE 15
|
||||
#define NOTRANSSTING 16
|
||||
#define MUTCOLORS_PARTSONLY 17 //Used if we want the mutant colour to be only used by mutant bodyparts. Don't combine this with MUTCOLORS, or it will be useless.
|
||||
#define NODISMEMBER 18
|
||||
#define NOHUNGER 19
|
||||
#define NOCRITDAMAGE 20
|
||||
#define NOZOMBIE 21
|
||||
#define EASYDISMEMBER 22
|
||||
#define EASYLIMBATTACHMENT 23
|
||||
#define TOXINLOVER 24
|
||||
#define DIGITIGRADE 25 //Uses weird leg sprites. Optional for Lizards, required for ashwalkers. Don't give it to other races unless you make sprites for this (see human_parts_greyscale.dmi)
|
||||
#define NO_UNDERWEAR 26
|
||||
#define MUTCOLORS2 27
|
||||
#define MUTCOLORS3 28
|
||||
#define NOLIVER 29
|
||||
#define NOSTOMACH 30
|
||||
//citadel code
|
||||
#define NOAROUSAL 29//Stops all arousal effects
|
||||
#define NOGENITALS 30//Cannot create, use, or otherwise have genitals
|
||||
#define NOBLOOD 6
|
||||
#define NOTRANSSTING 7
|
||||
#define MUTCOLORS_PARTSONLY 8 //Used if we want the mutant colour to be only used by mutant bodyparts. Don't combine this with MUTCOLORS, or it will be useless.
|
||||
#define NOZOMBIE 9
|
||||
#define DIGITIGRADE 10 //Uses weird leg sprites. Optional for Lizards, required for ashwalkers. Don't give it to other races unless you make sprites for this (see human_parts_greyscale.dmi)
|
||||
#define NO_UNDERWEAR 11
|
||||
#define NOLIVER 12
|
||||
#define NOSTOMACH 13
|
||||
#define NO_DNA_COPY 14
|
||||
#define DRINKSBLOOD 15
|
||||
#define NOEYES 16
|
||||
|
||||
#define ORGAN_SLOT_BRAIN "brain"
|
||||
#define ORGAN_SLOT_APPENDIX "appendix"
|
||||
#define ORGAN_SLOT_RIGHT_ARM_AUG "r_arm_device"
|
||||
#define ORGAN_SLOT_LEFT_ARM_AUG "l_arm_device"
|
||||
#define ORGAN_SLOT_STOMACH "stomach"
|
||||
#define ORGAN_SLOT_BREATHING_TUBE "breathing_tube"
|
||||
#define ORGAN_SLOT_EARS "ears"
|
||||
#define ORGAN_SLOT_EYES "eye_sight"
|
||||
#define ORGAN_SLOT_LUNGS "lungs"
|
||||
#define ORGAN_SLOT_HEART "heart"
|
||||
#define ORGAN_SLOT_ZOMBIE "zombie_infection"
|
||||
#define ORGAN_SLOT_THRUSTERS "thrusters"
|
||||
#define ORGAN_SLOT_HUD "eye_hud"
|
||||
#define ORGAN_SLOT_LIVER "liver"
|
||||
#define ORGAN_SLOT_TONGUE "tongue"
|
||||
#define ORGAN_SLOT_VOICE "vocal_cords"
|
||||
#define ORGAN_SLOT_ADAMANTINE_RESONATOR "adamantine_resonator"
|
||||
#define ORGAN_SLOT_HEART_AID "heartdrive"
|
||||
#define ORGAN_SLOT_BRAIN_ANTIDROP "brain_antidrop"
|
||||
#define ORGAN_SLOT_BRAIN_ANTISTUN "brain_antistun"
|
||||
#define ORGAN_SLOT_TAIL "tail"
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
#define NEW_SS_GLOBAL(varname) if(varname != src){if(istype(varname)){Recover();qdel(varname);}varname = src;}
|
||||
|
||||
#define START_PROCESSING(Processor, Datum) if (!Datum.isprocessing) {Datum.isprocessing = TRUE;Processor.processing += Datum}
|
||||
#define STOP_PROCESSING(Processor, Datum) Datum.isprocessing = FALSE;Processor.processing -= Datum
|
||||
#define START_PROCESSING(Processor, Datum) if (!(Datum.datum_flags & DF_ISPROCESSING)) {Datum.datum_flags |= DF_ISPROCESSING;Processor.processing += Datum}
|
||||
#define STOP_PROCESSING(Processor, Datum) Datum.datum_flags &= ~DF_ISPROCESSING;Processor.processing -= Datum
|
||||
|
||||
//SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier)
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
##X = ##InitValue;\
|
||||
gvars_datum_init_order += #X;\
|
||||
}
|
||||
#define GLOBAL_UNMANAGED(X, InitValue) /datum/controller/global_vars/proc/InitGlobal##X()
|
||||
#define GLOBAL_UNMANAGED(X) /datum/controller/global_vars/proc/InitGlobal##X() { return; }
|
||||
|
||||
#ifndef TESTING
|
||||
#define GLOBAL_PROTECT(X)\
|
||||
/datum/controller/global_vars/InitGlobal##X(){\
|
||||
..();\
|
||||
gvars_datum_protected_varlist += #X;\
|
||||
gvars_datum_protected_varlist[#X] = TRUE;\
|
||||
}
|
||||
#else
|
||||
#define GLOBAL_PROTECT(X)
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#define GLOBAL_VAR_INIT(X, InitValue) GLOBAL_RAW(/##X); GLOBAL_MANAGED(X, InitValue)
|
||||
|
||||
#define GLOBAL_VAR_CONST(X, InitValue) GLOBAL_RAW(/const/##X) = InitValue; GLOBAL_UNMANAGED(X, InitValue)
|
||||
#define GLOBAL_VAR_CONST(X, InitValue) GLOBAL_RAW(/const/##X) = InitValue; GLOBAL_UNMANAGED(X)
|
||||
|
||||
#define GLOBAL_LIST_INIT(X, InitValue) GLOBAL_RAW(/list/##X); GLOBAL_MANAGED(X, InitValue)
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
#define GLOBAL_DATUM_INIT(X, Typepath, InitValue) GLOBAL_RAW(Typepath/##X); GLOBAL_MANAGED(X, InitValue)
|
||||
|
||||
#define GLOBAL_VAR(X) GLOBAL_RAW(/##X); GLOBAL_MANAGED(X, null)
|
||||
#define GLOBAL_VAR(X) GLOBAL_RAW(/##X); GLOBAL_UNMANAGED(X)
|
||||
|
||||
#define GLOBAL_LIST(X) GLOBAL_RAW(/list/##X); GLOBAL_MANAGED(X, null)
|
||||
#define GLOBAL_LIST(X) GLOBAL_RAW(/list/##X); GLOBAL_UNMANAGED(X)
|
||||
|
||||
#define GLOBAL_DATUM(X, Typepath) GLOBAL_RAW(Typepath/##X); GLOBAL_MANAGED(X, null)
|
||||
#define GLOBAL_DATUM(X, Typepath) GLOBAL_RAW(Typepath/##X); GLOBAL_UNMANAGED(X)
|
||||
@@ -1,5 +1,5 @@
|
||||
#define TICK_LIMIT_RUNNING 80
|
||||
#define TICK_LIMIT_TO_RUN 78
|
||||
#define TICK_LIMIT_TO_RUN 70
|
||||
#define TICK_LIMIT_MC 70
|
||||
#define TICK_LIMIT_MC_INIT_DEFAULT 98
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#define ACCESS_MAILSORTING 50
|
||||
#define ACCESS_MINT 51
|
||||
#define ACCESS_MINT_VAULT 52
|
||||
#define ACCESS_HEADS_VAULT 53
|
||||
#define ACCESS_VAULT 53
|
||||
#define ACCESS_MINING_STATION 54
|
||||
#define ACCESS_XENOBIOLOGY 55
|
||||
#define ACCESS_CE 56
|
||||
|
||||
+44
-111
@@ -1,86 +1,12 @@
|
||||
//A set of constants used to determine which type of mute an admin wishes to apply:
|
||||
//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1)
|
||||
//Therefore there needs to be a gap between the flags_1 for the automute flags_1
|
||||
#define MUTE_IC 1
|
||||
#define MUTE_OOC 2
|
||||
#define MUTE_PRAY 4
|
||||
#define MUTE_ADMINHELP 8
|
||||
#define MUTE_DEADCHAT 16
|
||||
#define MUTE_ALL 31
|
||||
|
||||
//Some constants for DB_Ban
|
||||
#define BANTYPE_PERMA 1
|
||||
#define BANTYPE_TEMP 2
|
||||
#define BANTYPE_JOB_PERMA 3
|
||||
#define BANTYPE_JOB_TEMP 4
|
||||
#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban.
|
||||
|
||||
#define BANTYPE_ADMIN_PERMA 7
|
||||
#define BANTYPE_ADMIN_TEMP 8
|
||||
#define BANTYPE_ANY_JOB 9 //used to remove jobbans
|
||||
|
||||
//Please don't edit these values without speaking to Errorage first ~Carn
|
||||
//Admin Permissions
|
||||
#define R_BUILDMODE 1
|
||||
#define R_ADMIN 2
|
||||
#define R_BAN 4
|
||||
#define R_FUN 8
|
||||
#define R_SERVER 16
|
||||
#define R_DEBUG 32
|
||||
#define R_POSSESS 64
|
||||
#define R_PERMISSIONS 128
|
||||
#define R_STEALTH 256
|
||||
#define R_POLL 512
|
||||
#define R_VAREDIT 1024
|
||||
#define R_SOUNDS 2048
|
||||
#define R_SPAWN 4096
|
||||
|
||||
#if DM_VERSION > 512
|
||||
#error Remove the flag below , its been long enough
|
||||
#endif
|
||||
//legacy , remove post 512, it was replaced by R_POLL
|
||||
#define R_REJUVINATE 2
|
||||
|
||||
#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated.
|
||||
|
||||
#define ADMIN_QUE(user) "(<a href='?_src_=holder;adminmoreinfo=\ref[user]'>?</a>)"
|
||||
#define ADMIN_FLW(user) "(<a href='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</a>)"
|
||||
#define ADMIN_PP(user) "(<a href='?_src_=holder;adminplayeropts=\ref[user]'>PP</a>)"
|
||||
#define ADMIN_VV(atom) "(<a href='?_src_=vars;Vars=\ref[atom]'>VV</a>)"
|
||||
#define ADMIN_SM(user) "(<a href='?_src_=holder;subtlemessage=\ref[user]'>SM</a>)"
|
||||
#define ADMIN_TP(user) "(<a href='?_src_=holder;traitor=\ref[user]'>TP</a>)"
|
||||
#define ADMIN_KICK(user) "(<a href='?_src_=holder;boot2=\ref[user]'>KICK</a>)"
|
||||
#define ADMIN_CENTCOM_REPLY(user) "(<a href='?_src_=holder;CentComReply=\ref[user]'>RPLY</a>)"
|
||||
#define ADMIN_SYNDICATE_REPLY(user) "(<a href='?_src_=holder;SyndicateReply=\ref[user]'>RPLY</a>)"
|
||||
#define ADMIN_SC(user) "(<a href='?_src_=holder;adminspawncookie=\ref[user]'>SC</a>)"
|
||||
#define ADMIN_SMITE(user) "(<a href='?_src_=holder;adminsmite=\ref[user]'>SMITE</a>)"
|
||||
#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]"
|
||||
#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]"
|
||||
#define ADMIN_SET_SD_CODE "(<a href='?_src_=holder;set_selfdestruct_code=1'>SETCODE</a>)"
|
||||
#define ADMIN_FULLMONTY_NONAME(user) "[ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)] [ADMIN_INDIVIDUALLOG(user)] [ADMIN_SMITE(user)]"
|
||||
#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_FULLMONTY_NONAME(user)]"
|
||||
#define ADMIN_JMP(src) "(<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
|
||||
#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]"
|
||||
#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
|
||||
#define ADMIN_INDIVIDUALLOG(user) "(<a href='?_src_=holder;individuallog=\ref[user]'>LOGS</a>)"
|
||||
|
||||
#define ADMIN_PUNISHMENT_LIGHTNING "Lightning bolt"
|
||||
#define ADMIN_PUNISHMENT_BRAINDAMAGE "Brain damage"
|
||||
#define ADMIN_PUNISHMENT_GIB "Gib"
|
||||
#define ADMIN_PUNISHMENT_BSA "Bluespace Artillery Device"
|
||||
|
||||
#define AHELP_ACTIVE 1
|
||||
#define AHELP_CLOSED 2
|
||||
#define AHELP_RESOLVED 3
|
||||
//A set of constants used to determine which type of mute an admin wishes to apply:
|
||||
//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1)
|
||||
//Therefore there needs to be a gap between the flags for the automute flags
|
||||
#define MUTE_IC 1
|
||||
#define MUTE_OOC 2
|
||||
#define MUTE_PRAY 4
|
||||
#define MUTE_ADMINHELP 8
|
||||
#define MUTE_DEADCHAT 16
|
||||
#define MUTE_ALL 31
|
||||
#define MUTE_IC (1<<0)
|
||||
#define MUTE_OOC (1<<1)
|
||||
#define MUTE_PRAY (1<<2)
|
||||
#define MUTE_ADMINHELP (1<<3)
|
||||
#define MUTE_DEADCHAT (1<<4)
|
||||
#define MUTE_ALL (~0)
|
||||
|
||||
//Some constants for DB_Ban
|
||||
#define BANTYPE_PERMA 1
|
||||
@@ -93,41 +19,38 @@
|
||||
#define BANTYPE_ADMIN_TEMP 8
|
||||
#define BANTYPE_ANY_JOB 9 //used to remove jobbans
|
||||
|
||||
//Please don't edit these values without speaking to Errorage first ~Carn
|
||||
//Admin Permissions
|
||||
#define R_BUILDMODE 1
|
||||
#define R_ADMIN 2
|
||||
#define R_BAN 4
|
||||
#define R_FUN 8
|
||||
#define R_SERVER 16
|
||||
#define R_DEBUG 32
|
||||
#define R_POSSESS 64
|
||||
#define R_PERMISSIONS 128
|
||||
#define R_STEALTH 256
|
||||
#define R_POLL 512
|
||||
#define R_VAREDIT 1024
|
||||
#define R_SOUNDS 2048
|
||||
#define R_SPAWN 4096
|
||||
#define R_BUILDMODE (1<<0)
|
||||
#define R_ADMIN (1<<1)
|
||||
#define R_BAN (1<<2)
|
||||
#define R_FUN (1<<3)
|
||||
#define R_SERVER (1<<4)
|
||||
#define R_DEBUG (1<<5)
|
||||
#define R_POSSESS (1<<6)
|
||||
#define R_PERMISSIONS (1<<7)
|
||||
#define R_STEALTH (1<<8)
|
||||
#define R_POLL (1<<9)
|
||||
#define R_VAREDIT (1<<10)
|
||||
#define R_SOUNDS (1<<11)
|
||||
#define R_SPAWN (1<<12)
|
||||
#define R_AUTOLOGIN (1<<13)
|
||||
#define R_DBRANKS (1<<14)
|
||||
|
||||
#if DM_VERSION > 512
|
||||
#error Remove the flag below , its been long enough
|
||||
#endif
|
||||
//legacy , remove post 512, it was replaced by R_POLL
|
||||
#define R_REJUVINATE 2
|
||||
#define R_DEFAULT R_AUTOLOGIN
|
||||
|
||||
#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated.
|
||||
|
||||
#define ADMIN_QUE(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminmoreinfo=\ref[user]'>?</a>)"
|
||||
#define ADMIN_FLW(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayerobservefollow=\ref[user]'>FLW</a>)"
|
||||
#define ADMIN_PP(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayeropts=\ref[user]'>PP</a>)"
|
||||
#define ADMIN_VV(atom) "(<a href='?_src_=vars;[HrefToken(TRUE)];Vars=\ref[atom]'>VV</a>)"
|
||||
#define ADMIN_SM(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];subtlemessage=\ref[user]'>SM</a>)"
|
||||
#define ADMIN_TP(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];traitor=\ref[user]'>TP</a>)"
|
||||
#define ADMIN_KICK(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];boot2=\ref[user]'>KICK</a>)"
|
||||
#define ADMIN_CENTCOM_REPLY(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];CentComReply=\ref[user]'>RPLY</a>)"
|
||||
#define ADMIN_SYNDICATE_REPLY(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];SyndicateReply=\ref[user]'>RPLY</a>)"
|
||||
#define ADMIN_SC(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminspawncookie=\ref[user]'>SC</a>)"
|
||||
#define ADMIN_SMITE(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminsmite=\ref[user]'>SMITE</a>)"
|
||||
#define ADMIN_QUE(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminmoreinfo=[REF(user)]'>?</a>)"
|
||||
#define ADMIN_FLW(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayerobservefollow=[REF(user)]'>FLW</a>)"
|
||||
#define ADMIN_PP(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayeropts=[REF(user)]'>PP</a>)"
|
||||
#define ADMIN_VV(atom) "(<a href='?_src_=vars;[HrefToken(TRUE)];Vars=[REF(atom)]'>VV</a>)"
|
||||
#define ADMIN_SM(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];subtlemessage=[REF(user)]'>SM</a>)"
|
||||
#define ADMIN_TP(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];traitor=[REF(user)]'>TP</a>)"
|
||||
#define ADMIN_KICK(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];boot2=[REF(user)]'>KICK</a>)"
|
||||
#define ADMIN_CENTCOM_REPLY(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];CentComReply=[REF(user)]'>RPLY</a>)"
|
||||
#define ADMIN_SYNDICATE_REPLY(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];SyndicateReply=[REF(user)]'>RPLY</a>)"
|
||||
#define ADMIN_SC(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminspawncookie=[REF(user)]'>SC</a>)"
|
||||
#define ADMIN_SMITE(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminsmite=[REF(user)]'>SMITE</a>)"
|
||||
#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]"
|
||||
#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]"
|
||||
#define ADMIN_SET_SD_CODE "(<a href='?_src_=holder;[HrefToken(TRUE)];set_selfdestruct_code=1'>SETCODE</a>)"
|
||||
@@ -135,14 +58,24 @@
|
||||
#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_FULLMONTY_NONAME(user)]"
|
||||
#define ADMIN_JMP(src) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
|
||||
#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]"
|
||||
#define AREACOORD(src) "[src ? "[get_area_name(src, TRUE)] ([src.x], [src.y], [src.z])" : "nonexistent location"]"
|
||||
#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
|
||||
#define ADMIN_INDIVIDUALLOG(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];individuallog=\ref[user]'>LOGS</a>)"
|
||||
#define ADMIN_VERBOSEJMP(src) "[src ? "[AREACOORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
|
||||
#define ADMIN_INDIVIDUALLOG(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];individuallog=[REF(user)]'>LOGS</a>)"
|
||||
|
||||
#define ADMIN_PUNISHMENT_LIGHTNING "Lightning bolt"
|
||||
#define ADMIN_PUNISHMENT_BRAINDAMAGE "Brain damage"
|
||||
#define ADMIN_PUNISHMENT_GIB "Gib"
|
||||
#define ADMIN_PUNISHMENT_BSA "Bluespace Artillery Device"
|
||||
#define ADMIN_PUNISHMENT_FIREBALL "Fireball"
|
||||
#define ADMIN_PUNISHMENT_ROD "Immovable Rod"
|
||||
#define ADMIN_PUNISHMENT_SUPPLYPOD "Supply Pod"
|
||||
|
||||
#define AHELP_ACTIVE 1
|
||||
#define AHELP_CLOSED 2
|
||||
#define AHELP_RESOLVED 3
|
||||
|
||||
#define ROUNDSTART_LOGOUT_REPORT_TIME 6000 //Amount of time (in deciseconds) after the rounds starts, that the player disconnect report is issued.
|
||||
|
||||
#define SPAM_TRIGGER_WARNING 5 //Number of identical messages required before the spam-prevention will warn you to stfu
|
||||
#define SPAM_TRIGGER_AUTOMUTE 10 //Number of identical messages required before the spam-prevention will automute you
|
||||
|
||||
@@ -1,21 +1,29 @@
|
||||
#define ANTAG_DATUM_CULT /datum/antagonist/cult
|
||||
#define ANTAG_DATUM_CULT_MASTER /datum/antagonist/cult/master
|
||||
#define ANTAG_DATUM_CLOCKCULT /datum/antagonist/clockcult
|
||||
#define ANTAG_DATUM_CLOCKCULT_SILENT /datum/antagonist/clockcult/silent
|
||||
#define ANTAG_DATUM_DEVIL /datum/antagonist/devil
|
||||
#define ANTAG_DATUM_NINJA /datum/antagonist/ninja
|
||||
#define ANTAG_DATUM_NINJA_FRIENDLY /datum/antagonist/ninja/friendly
|
||||
#define ANTAG_DATUM_NINJA_RANDOM /datum/antagonist/ninja/randomAllegiance/
|
||||
#define ANTAG_DATUM_TRAITOR /datum/antagonist/traitor
|
||||
#define ANTAG_DATUM_TRAITOR_CUSTOM /datum/antagonist/traitor/custom
|
||||
#define ANTAG_DATUM_TRAITOR_HUMAN /datum/antagonist/traitor/human
|
||||
#define ANTAG_DATUM_TRAITOR_HUMAN_CUSTOM /datum/antagonist/traitor/human/custom
|
||||
#define ANTAG_DATUM_TRAITOR_AI /datum/antagonist/traitor/AI
|
||||
#define ANTAG_DATUM_TRAITOR_AI_CUSTOM /datum/antagonist/traitor/AI/custom
|
||||
#define ANTAG_DATUM_IAA /datum/antagonist/traitor/internal_affairs
|
||||
#define ANTAG_DATUM_IAA_CUSTOM /datum/antagonist/traitor/internal_affairs/custom
|
||||
#define ANTAG_DATUM_IAA_HUMAN /datum/antagonist/traitor/human/internal_affairs
|
||||
#define ANTAG_DATUM_IAA_HUMAN_CUSTOM /datum/antagonist/traitor/human/internal_affairs/custom
|
||||
#define ANTAG_DATUM_IAA_AI_CUSTOM /datum/antagonist/traitor/AI/internal_affairs/custom
|
||||
#define ANTAG_DATUM_IAA_AI /datum/antagonist/traitor/AI/internal_affairs
|
||||
#define ANTAG_DATUM_BROTHER /datum/antagonist/brother
|
||||
#define NUKE_RESULT_FLUKE 0
|
||||
#define NUKE_RESULT_NUKE_WIN 1
|
||||
#define NUKE_RESULT_CREW_WIN 2
|
||||
#define NUKE_RESULT_CREW_WIN_SYNDIES_DEAD 3
|
||||
#define NUKE_RESULT_DISK_LOST 4
|
||||
#define NUKE_RESULT_DISK_STOLEN 5
|
||||
#define NUKE_RESULT_NOSURVIVORS 6
|
||||
#define NUKE_RESULT_WRONG_STATION 7
|
||||
#define NUKE_RESULT_WRONG_STATION_DEAD 8
|
||||
|
||||
#define APPRENTICE_DESTRUCTION "destruction"
|
||||
#define APPRENTICE_BLUESPACE "bluespace"
|
||||
#define APPRENTICE_ROBELESS "robeless"
|
||||
#define APPRENTICE_HEALING "healing"
|
||||
|
||||
|
||||
//ERT Types
|
||||
#define ERT_BLUE "Blue"
|
||||
#define ERT_RED "Red"
|
||||
#define ERT_AMBER "Amber"
|
||||
#define ERT_DEATHSQUAD "Deathsquad"
|
||||
|
||||
//ERT subroles
|
||||
#define ERT_SEC "sec"
|
||||
#define ERT_MED "med"
|
||||
#define ERT_ENG "eng"
|
||||
#define ERT_LEADER "leader"
|
||||
#define DEATHSQUAD "ds"
|
||||
#define DEATHSQUAD_LEADER "ds_leader"
|
||||
+191
-104
@@ -1,14 +1,5 @@
|
||||
#define FIRE_DAMAGE_MODIFIER 0.0215 //Higher values result in more external fire damage to the skin (default 0.0215)
|
||||
#define AIR_DAMAGE_MODIFIER 2.025 //More means less damage from hot air scalding lungs, less = more damage. (default 2.025)
|
||||
|
||||
#define MOLES_CELLSTANDARD (ONE_ATMOSPHERE*CELL_VOLUME/(T20C*R_IDEAL_GAS_EQUATION)) //moles in a 2.5 m^3 cell at 101.325 Pa and 20 degC
|
||||
#define M_CELL_WITH_RATIO (MOLES_CELLSTANDARD * 0.005)
|
||||
#define O2STANDARD 0.21
|
||||
#define N2STANDARD 0.79
|
||||
#define MOLES_O2STANDARD (MOLES_CELLSTANDARD*O2STANDARD) // O2 standard value (21%)
|
||||
#define MOLES_N2STANDARD (MOLES_CELLSTANDARD*N2STANDARD) // N2 standard value (79%)
|
||||
|
||||
//indices of values in gas lists. used by listmos.
|
||||
//LISTMOS
|
||||
//indices of values in gas lists.
|
||||
#define MOLES 1
|
||||
#define ARCHIVE 2
|
||||
#define GAS_META 3
|
||||
@@ -17,65 +8,68 @@
|
||||
#define META_GAS_MOLES_VISIBLE 3
|
||||
#define META_GAS_OVERLAY 4
|
||||
#define META_GAS_DANGER 5
|
||||
|
||||
//stuff you should probably leave well alone!
|
||||
#define META_GAS_ID 6
|
||||
#define META_GAS_FUSION_POWER 7
|
||||
//ATMOS
|
||||
#define CELL_VOLUME 2500 //liters in a cell
|
||||
#define BREATH_VOLUME 0.5 //liters in a normal breath
|
||||
#define BREATH_PERCENTAGE (BREATH_VOLUME/CELL_VOLUME) //Amount of air to take a from a tile
|
||||
#define HUMAN_NEEDED_OXYGEN (MOLES_CELLSTANDARD*BREATH_PERCENTAGE*0.16) //Amount of air needed before pass out/suffocation commences
|
||||
#define NORMPIPERATE 30 //pipe-insulation rate divisor
|
||||
#define HEATPIPERATE 8 //heat-exch pipe insulation
|
||||
#define FLOWFRAC 0.99 //fraction of gas transfered per process
|
||||
#define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) //Tank starts leaking
|
||||
#define TANK_RUPTURE_PRESSURE (35.*ONE_ATMOSPHERE) //Tank spills all contents into atmosphere
|
||||
#define TANK_FRAGMENT_PRESSURE (40.*ONE_ATMOSPHERE) //Boom 3x3 base explosion
|
||||
#define TANK_FRAGMENT_SCALE (6.*ONE_ATMOSPHERE) //+1 for each SCALE kPa aboe threshold
|
||||
#define MINIMUM_AIR_RATIO_TO_SUSPEND 0.1 //Ratio of air that must move to/from a tile to reset group processing
|
||||
#define MINIMUM_AIR_RATIO_TO_MOVE 0.001 //Minimum ratio of air that must move to/from a tile
|
||||
#define MINIMUM_AIR_TO_SUSPEND (MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND) //Minimum amount of air that has to move before a group processing can be suspended
|
||||
#define MINIMUM_MOLES_DELTA_TO_MOVE (MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_MOVE) //Either this must be active
|
||||
#define EXCITED_GROUP_BREAKDOWN_CYCLES 4
|
||||
#define EXCITED_GROUP_DISMANTLE_CYCLES 16
|
||||
#define MINIMUM_TEMPERATURE_TO_MOVE (T20C+100) //or this (or both, obviously)
|
||||
#define MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND 0.012
|
||||
//stuff you should probably leave well alone!
|
||||
#define R_IDEAL_GAS_EQUATION 8.31 //kPa*L/(K*mol)
|
||||
#define ONE_ATMOSPHERE 101.325 //kPa
|
||||
#define TCMB 2.7 // -270.3degC
|
||||
#define TCRYO 225 // -48.15degC
|
||||
#define T0C 273.15 // 0degC
|
||||
#define T20C 293.15 // 20degC
|
||||
|
||||
#define MOLES_CELLSTANDARD (ONE_ATMOSPHERE*CELL_VOLUME/(T20C*R_IDEAL_GAS_EQUATION)) //moles in a 2.5 m^3 cell at 101.325 Pa and 20 degC
|
||||
#define M_CELL_WITH_RATIO (MOLES_CELLSTANDARD * 0.005) //compared against for superconductivity
|
||||
#define O2STANDARD 0.21 //percentage of oxygen in a normal mixture of air
|
||||
#define N2STANDARD 0.79 //same but for nitrogen
|
||||
#define MOLES_O2STANDARD (MOLES_CELLSTANDARD*O2STANDARD) // O2 standard value (21%)
|
||||
#define MOLES_N2STANDARD (MOLES_CELLSTANDARD*N2STANDARD) // N2 standard value (79%)
|
||||
#define CELL_VOLUME 2500 //liters in a cell
|
||||
#define BREATH_VOLUME 0.5 //liters in a normal breath
|
||||
#define BREATH_PERCENTAGE (BREATH_VOLUME/CELL_VOLUME) //Amount of air to take a from a tile
|
||||
|
||||
//EXCITED GROUPS
|
||||
#define EXCITED_GROUP_BREAKDOWN_CYCLES 4 //number of FULL air controller ticks before an excited group breaks down (averages gas contents across turfs)
|
||||
#define EXCITED_GROUP_DISMANTLE_CYCLES 16 //number of FULL air controller ticks before an excited group dismantles and removes its turfs from active
|
||||
#define MINIMUM_AIR_RATIO_TO_SUSPEND 0.1 //Ratio of air that must move to/from a tile to reset group processing
|
||||
#define MINIMUM_AIR_RATIO_TO_MOVE 0.001 //Minimum ratio of air that must move to/from a tile
|
||||
#define MINIMUM_AIR_TO_SUSPEND (MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND) //Minimum amount of air that has to move before a group processing can be suspended
|
||||
#define MINIMUM_MOLES_DELTA_TO_MOVE (MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_MOVE) //Either this must be active
|
||||
#define MINIMUM_TEMPERATURE_TO_MOVE (T20C+100) //or this (or both, obviously)
|
||||
#define MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND 4 //Minimum temperature difference before group processing is suspended
|
||||
#define MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER 0.5 //Minimum temperature difference before the gas temperatures are just set to be equal
|
||||
#define MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION T20C+10
|
||||
#define MINIMUM_TEMPERATURE_START_SUPERCONDUCTION T20C+200
|
||||
#define FLOOR_HEAT_TRANSFER_COEFFICIENT 0.4
|
||||
#define MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION (T20C+10)
|
||||
#define MINIMUM_TEMPERATURE_START_SUPERCONDUCTION (T20C+200)
|
||||
|
||||
//HEAT TRANSFER COEFFICIENTS
|
||||
//Must be between 0 and 1. Values closer to 1 equalize temperature faster
|
||||
//Should not exceed 0.4 else strange heat flow occur
|
||||
#define WALL_HEAT_TRANSFER_COEFFICIENT 0.0
|
||||
#define DOOR_HEAT_TRANSFER_COEFFICIENT 0.0
|
||||
#define SPACE_HEAT_TRANSFER_COEFFICIENT 0.2 //a hack to partly simulate radiative heat
|
||||
#define OPEN_HEAT_TRANSFER_COEFFICIENT 0.4
|
||||
#define WINDOW_HEAT_TRANSFER_COEFFICIENT 0.1 //a hack for now
|
||||
//Must be between 0 and 1. Values closer to 1 equalize temperature faster
|
||||
//Should not exceed 0.4 else strange heat flow occur
|
||||
#define FIRE_MINIMUM_TEMPERATURE_TO_SPREAD 150+T0C
|
||||
#define FIRE_MINIMUM_TEMPERATURE_TO_EXIST 100+T0C
|
||||
#define HEAT_CAPACITY_VACUUM 7000 //a hack to help make vacuums "cold", sacrificing realism for gameplay
|
||||
|
||||
//FIRE
|
||||
#define FIRE_MINIMUM_TEMPERATURE_TO_SPREAD (150+T0C)
|
||||
#define FIRE_MINIMUM_TEMPERATURE_TO_EXIST (100+T0C)
|
||||
#define FIRE_SPREAD_RADIOSITY_SCALE 0.85
|
||||
#define FIRE_CARBON_ENERGY_RELEASED 500000 //Amount of heat released per mole of burnt carbon into the tile
|
||||
#define FIRE_PLASMA_ENERGY_RELEASED 3000000 //Amount of heat released per mole of burnt plasma into the tile
|
||||
#define FIRE_GROWTH_RATE 40000 //For small fires
|
||||
#define CARBON_LIFEFORM_FIRE_RESISTANCE 200+T0C //Resistance to fire damage
|
||||
#define CARBON_LIFEFORM_FIRE_DAMAGE 4 //Fire damage
|
||||
//Plasma fire properties
|
||||
#define OXYGEN_BURN_RATE_BASE 1.4
|
||||
#define PLASMA_BURN_RATE_DELTA 9
|
||||
#define PLASMA_MINIMUM_BURN_TEMPERATURE 100+T0C
|
||||
#define PLASMA_UPPER_TEMPERATURE 1370+T0C
|
||||
#define PLASMA_MINIMUM_OXYGEN_NEEDED 2
|
||||
#define PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO 30
|
||||
#define PLASMA_MINIMUM_BURN_TEMPERATURE (100+T0C)
|
||||
#define PLASMA_UPPER_TEMPERATURE (1370+T0C)
|
||||
#define PLASMA_OXYGEN_FULLBURN 10
|
||||
|
||||
//GASES
|
||||
#define MIN_TOXIC_GAS_DAMAGE 1
|
||||
#define MAX_TOXIC_GAS_DAMAGE 10
|
||||
#define MOLES_PLASMA_VISIBLE 0.5 //Moles in a standard cell after which plasma is visible
|
||||
//Plasma fusion properties
|
||||
#define PLASMA_BINDING_ENERGY 3000000
|
||||
#define MAX_CARBON_EFFICENCY 9
|
||||
#define PLASMA_FUSED_COEFFICENT 0.08
|
||||
#define CARBON_CATALYST_COEFFICENT 0.01
|
||||
#define FUSION_PURITY_THRESHOLD 0.9
|
||||
#define MOLES_GAS_VISIBLE 0.5 //Moles in a standard cell after which gases are visible
|
||||
|
||||
//REACTIONS
|
||||
//return values for reactions (bitflags)
|
||||
#define NO_REACTION 0
|
||||
#define REACTING 1
|
||||
#define STOP_REACTIONS 2
|
||||
|
||||
// Pressure limits.
|
||||
#define HAZARD_HIGH_PRESSURE 550 //This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant)
|
||||
#define WARNING_HIGH_PRESSURE 325 //This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE)
|
||||
@@ -83,15 +77,18 @@
|
||||
#define HAZARD_LOW_PRESSURE 20 //This is when the black ultra-low pressure icon is displayed. (This one is set as a constant)
|
||||
|
||||
#define TEMPERATURE_DAMAGE_COEFFICIENT 1.5 //This is used in handle_temperature_damage() for humans, and in reagents that affect body temperature. Temperature damage is multiplied by this amount.
|
||||
#define BODYTEMP_AUTORECOVERY_DIVISOR 12 //This is the divisor which handles how much of the temperature difference between the current body temperature and 310.15K (optimal temperature) humans auto-regenerate each tick. The higher the number, the slower the recovery. This is applied each tick, so long as the mob is alive.
|
||||
#define BODYTEMP_AUTORECOVERY_MINIMUM 10 //Minimum amount of kelvin moved toward 310.15K per tick. So long as abs(310.15 - bodytemp) is more than 50.
|
||||
#define BODYTEMP_COLD_DIVISOR 6 //Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is lower than their body temperature. Make it lower to lose bodytemp faster.
|
||||
#define BODYTEMP_HEAT_DIVISOR 6 //Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is higher than their body temperature. Make it lower to gain bodytemp faster.
|
||||
#define BODYTEMP_COOLING_MAX 30 //The maximum number of degrees that your body can cool in 1 tick, when in a cold area.
|
||||
#define BODYTEMP_HEATING_MAX 30 //The maximum number of degrees that your body can heat up in 1 tick, when in a hot area.
|
||||
|
||||
#define BODYTEMP_HEAT_DAMAGE_LIMIT 360.15 // The limit the human body can take before it starts taking damage from heat.
|
||||
#define BODYTEMP_COLD_DAMAGE_LIMIT 260.15 // The limit the human body can take before it starts taking damage from coldness.
|
||||
#define BODYTEMP_NORMAL 310.15 //The natural temperature for a body
|
||||
#define BODYTEMP_AUTORECOVERY_DIVISOR 11 //This is the divisor which handles how much of the temperature difference between the current body temperature and 310.15K (optimal temperature) humans auto-regenerate each tick. The higher the number, the slower the recovery. This is applied each tick, so long as the mob is alive.
|
||||
#define BODYTEMP_AUTORECOVERY_MINIMUM 12 //Minimum amount of kelvin moved toward 310K per tick. So long as abs(310.15 - bodytemp) is more than 50.
|
||||
#define BODYTEMP_COLD_DIVISOR 6 //Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is lower than their body temperature. Make it lower to lose bodytemp faster.
|
||||
#define BODYTEMP_HEAT_DIVISOR 15 //Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is higher than their body temperature. Make it lower to gain bodytemp faster.
|
||||
#define BODYTEMP_COOLING_MAX -100 //The maximum number of degrees that your body can cool in 1 tick, due to the environment, when in a cold area.
|
||||
#define BODYTEMP_HEATING_MAX 30 //The maximum number of degrees that your body can heat up in 1 tick, due to the environment, when in a hot area.
|
||||
|
||||
#define BODYTEMP_HEAT_DAMAGE_LIMIT (BODYTEMP_NORMAL + 20) // The limit the human body can take before it starts taking damage from heat. //CITADEL EDIT to 20
|
||||
#define BODYTEMP_COLD_DAMAGE_LIMIT (BODYTEMP_NORMAL - 50) // The limit the human body can take before it starts taking damage from coldness.
|
||||
|
||||
|
||||
#define SPACE_HELM_MIN_TEMP_PROTECT 2.0 //what min_cold_protection_temperature is set to for space-helmet quality headwear. MUST NOT BE 0.
|
||||
#define SPACE_HELM_MAX_TEMP_PROTECT 1500 //Thermal insulation works both ways /Malkevin
|
||||
@@ -116,61 +113,151 @@
|
||||
#define SHOES_MIN_TEMP_PROTECT 2.0 //For gloves
|
||||
#define SHOES_MAX_TEMP_PROTECT 1500 //For gloves
|
||||
|
||||
|
||||
#define PRESSURE_DAMAGE_COEFFICIENT 4 //The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE
|
||||
#define MAX_HIGH_PRESSURE_DAMAGE 4 //This used to be 20... I got this much random rage for some retarded decision by polymorph?! Polymorph now lies in a pool of blood with a katana jammed in his spleen. ~Errorage --PS: The katana did less than 20 damage to him :(
|
||||
#define LOW_PRESSURE_DAMAGE 2 //The amounb of damage someone takes when in a low pressure area (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value).
|
||||
#define MAX_HIGH_PRESSURE_DAMAGE 16 // CITADEL CHANGES Max to 16, low to 8.
|
||||
#define LOW_PRESSURE_DAMAGE 8 //The amount of damage someone takes when in a low pressure area (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value).
|
||||
|
||||
#define COLD_SLOWDOWN_FACTOR 20 //Humans are slowed by the difference between bodytemp and BODYTEMP_COLD_DAMAGE_LIMIT divided by this
|
||||
|
||||
// Atmos pipe limits
|
||||
//PIPES
|
||||
//Atmos pipe limits
|
||||
#define MAX_OUTPUT_PRESSURE 4500 // (kPa) What pressure pumps and powered equipment max out at.
|
||||
#define MAX_TRANSFER_RATE 200 // (L/s) Maximum speed powered equipment can work at.
|
||||
|
||||
//Atmos machinery pipenet stuff
|
||||
|
||||
// used for device_type vars; used by DEVICE_TYPE_LOOP
|
||||
//used for device_type vars
|
||||
#define UNARY 1
|
||||
#define BINARY 2
|
||||
#define TRINARY 3
|
||||
#define QUATERNARY 4
|
||||
|
||||
// this is the standard for loop used by all sorts of atmos machinery procs
|
||||
#define DEVICE_TYPE_LOOP var/I in 1 to device_type
|
||||
|
||||
// defines for the various machinery lists
|
||||
// NODE_I, AIR_I, PARENT_I are used within DEVICE_TYPE_LOOP
|
||||
|
||||
// nodes list - all atmos machinery
|
||||
#define NODE1 nodes[1]
|
||||
#define NODE2 nodes[2]
|
||||
#define NODE3 nodes[3]
|
||||
#define NODE4 nodes[4]
|
||||
#define NODE_I nodes[I]
|
||||
|
||||
// airs list - components only
|
||||
#define AIR1 airs[1]
|
||||
#define AIR2 airs[2]
|
||||
#define AIR3 airs[3]
|
||||
#define AIR_I airs[I]
|
||||
|
||||
// parents list - components only
|
||||
#define PARENT1 parents[1]
|
||||
#define PARENT2 parents[2]
|
||||
#define PARENT3 parents[3]
|
||||
#define PARENT_I parents[I]
|
||||
|
||||
//Tanks
|
||||
#define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3)
|
||||
#define TANK_MIN_RELEASE_PRESSURE 0
|
||||
#define TANK_DEFAULT_RELEASE_PRESSURE 16
|
||||
|
||||
//TANKS
|
||||
#define TANK_MELT_TEMPERATURE 1000000 //temperature in kelvins at which a tank will start to melt
|
||||
#define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) //Tank starts leaking
|
||||
#define TANK_RUPTURE_PRESSURE (35.*ONE_ATMOSPHERE) //Tank spills all contents into atmosphere
|
||||
#define TANK_FRAGMENT_PRESSURE (40.*ONE_ATMOSPHERE) //Boom 3x3 base explosion
|
||||
#define TANK_FRAGMENT_SCALE (6.*ONE_ATMOSPHERE) //+1 for each SCALE kPa aboe threshold
|
||||
#define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3)
|
||||
#define TANK_MIN_RELEASE_PRESSURE 0
|
||||
#define TANK_DEFAULT_RELEASE_PRESSURE 16
|
||||
|
||||
//CANATMOSPASS
|
||||
#define ATMOS_PASS_YES 1
|
||||
#define ATMOS_PASS_NO 0
|
||||
#define ATMOS_PASS_PROC -1 //ask CanAtmosPass()
|
||||
#define ATMOS_PASS_DENSITY -2 //just check density
|
||||
#define CANATMOSPASS(A, O) ( A.CanAtmosPass == ATMOS_PASS_PROC ? A.CanAtmosPass(O) : ( A.CanAtmosPass == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPass ) )
|
||||
|
||||
//LAVALAND
|
||||
#define LAVALAND_EQUIPMENT_EFFECT_PRESSURE 50 //what pressure you have to be under to increase the effect of equipment meant for lavaland
|
||||
#define LAVALAND_DEFAULT_ATMOS "o2=14;n2=23;TEMP=300"
|
||||
|
||||
//ATMOSIA GAS MONITOR TAGS
|
||||
#define ATMOS_GAS_MONITOR_INPUT_O2 "o2_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_O2 "o2_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_O2 "o2_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_TOX "tox_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_TOX "tox_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_TOX "tox_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_AIR "air_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_AIR "air_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_AIR "air_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_MIX "mix_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_MIX "mix_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_MIX "mix_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_N2O "n2o_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_N2O "n2o_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_N2O "n2o_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_N2 "n2_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_N2 "n2_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_N2 "n2_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_CO2 "co2_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_CO2 "co2_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_CO2 "co2_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_INCINERATOR "incinerator_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_INCINERATOR "incinerator_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_INCINERATOR "incinerator_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_TOXINS_LAB "toxinslab_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_TOXINS_LAB "toxinslab_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_TOXINS_LAB "toxinslab_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_LOOP_DISTRIBUTION "distro-loop_meter"
|
||||
#define ATMOS_GAS_MONITOR_LOOP_ATMOS_WASTE "atmos-waste_loop_meter"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_WASTE_ENGINE "engine-waste_out"
|
||||
#define ATMOS_GAS_MONITOR_WASTE_ATMOS "atmos-waste_out"
|
||||
|
||||
//AIRLOCK CONTROLLER TAGS
|
||||
|
||||
//RnD toxins burn chamber
|
||||
#define INCINERATOR_TOXMIX_IGNITER "toxmix_igniter"
|
||||
#define INCINERATOR_TOXMIX_VENT "toxmix_vent"
|
||||
#define INCINERATOR_TOXMIX_DP_VENTPUMP "toxmix_airlock_pump"
|
||||
#define INCINERATOR_TOXMIX_AIRLOCK_SENSOR "toxmix_airlock_sensor"
|
||||
#define INCINERATOR_TOXMIX_AIRLOCK_CONTROLLER "toxmix_airlock_controller"
|
||||
#define INCINERATOR_TOXMIX_AIRLOCK_INTERIOR "toxmix_airlock_interior"
|
||||
#define INCINERATOR_TOXMIX_AIRLOCK_EXTERIOR "toxmix_airlock_exterior"
|
||||
|
||||
//Atmospherics/maintenance incinerator
|
||||
#define INCINERATOR_ATMOS_IGNITER "atmos_incinerator_igniter"
|
||||
#define INCINERATOR_ATMOS_MAINVENT "atmos_incinerator_mainvent"
|
||||
#define INCINERATOR_ATMOS_AUXVENT "atmos_incinerator_auxvent"
|
||||
#define INCINERATOR_ATMOS_DP_VENTPUMP "atmos_incinerator_airlock_pump"
|
||||
#define INCINERATOR_ATMOS_AIRLOCK_SENSOR "atmos_incinerator_airlock_sensor"
|
||||
#define INCINERATOR_ATMOS_AIRLOCK_CONTROLLER "atmos_incinerator_airlock_controller"
|
||||
#define INCINERATOR_ATMOS_AIRLOCK_INTERIOR "atmos_incinerator_airlock_interior"
|
||||
#define INCINERATOR_ATMOS_AIRLOCK_EXTERIOR "atmos_incinerator_airlock_exterior"
|
||||
|
||||
//Syndicate lavaland base incinerator (lavaland_surface_syndicate_base1.dmm)
|
||||
#define INCINERATOR_SYNDICATELAVA_IGNITER "syndicatelava_igniter"
|
||||
#define INCINERATOR_SYNDICATELAVA_MAINVENT "syndicatelava_mainvent"
|
||||
#define INCINERATOR_SYNDICATELAVA_AUXVENT "syndicatelava_auxvent"
|
||||
#define INCINERATOR_SYNDICATELAVA_DP_VENTPUMP "syndicatelava_airlock_pump"
|
||||
#define INCINERATOR_SYNDICATELAVA_AIRLOCK_SENSOR "syndicatelava_airlock_sensor"
|
||||
#define INCINERATOR_SYNDICATELAVA_AIRLOCK_CONTROLLER "syndicatelava_airlock_controller"
|
||||
#define INCINERATOR_SYNDICATELAVA_AIRLOCK_INTERIOR "syndicatelava_airlock_interior"
|
||||
#define INCINERATOR_SYNDICATELAVA_AIRLOCK_EXTERIOR "syndicatelava_airlock_exterior"
|
||||
|
||||
//MULTIPIPES
|
||||
//IF YOU EVER CHANGE THESE CHANGE SPRITES TO MATCH.
|
||||
#define PIPING_LAYER_MIN 1
|
||||
#define PIPING_LAYER_MAX 3
|
||||
#define PIPING_LAYER_DEFAULT 2
|
||||
#define PIPING_LAYER_P_X 5
|
||||
#define PIPING_LAYER_P_Y 5
|
||||
#define PIPING_LAYER_LCHANGE 0.05
|
||||
|
||||
#define PIPING_ALL_LAYER (1<<0) //intended to connect with all layers, check for all instead of just one.
|
||||
#define PIPING_ONE_PER_TURF (1<<1) //can only be built if nothing else with this flag is on the tile already.
|
||||
#define PIPING_DEFAULT_LAYER_ONLY (1<<2) //can only exist at PIPING_LAYER_DEFAULT
|
||||
#define PIPING_CARDINAL_AUTONORMALIZE (1<<3) //north/south east/west doesn't matter, auto normalize on build.
|
||||
|
||||
//HELPERS
|
||||
#define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity())
|
||||
|
||||
#define ADD_GAS(gas_id, out_list)\
|
||||
var/list/tmp_gaslist = GLOB.gaslist_cache[gas_id]; out_list[gas_id] = tmp_gaslist.Copy();
|
||||
|
||||
#define ASSERT_GAS(gas_id, gas_mixture) if (!gas_mixture.gases[gas_id]) { ADD_GAS(gas_id, gas_mixture.gases) };
|
||||
|
||||
GLOBAL_LIST_INIT(pipe_paint_colors, list(
|
||||
"amethyst" = rgb(130,43,255), //supplymain
|
||||
"blue" = rgb(0,0,255),
|
||||
"brown" = rgb(178,100,56),
|
||||
"cyan" = rgb(0,255,249),
|
||||
"dark" = rgb(69,69,69),
|
||||
"green" = rgb(30,255,0),
|
||||
"grey" = rgb(255,255,255),
|
||||
"orange" = rgb(255,129,25),
|
||||
"purple" = rgb(128,0,182),
|
||||
"red" = rgb(255,0,0),
|
||||
"violet" = rgb(64,0,128),
|
||||
"yellow" = rgb(255,198,0)
|
||||
))
|
||||
|
||||
+38
-25
@@ -9,41 +9,54 @@
|
||||
#define IMPLOYAL_HUD "5" // loyality implant
|
||||
#define IMPCHEM_HUD "6" // chemical implant
|
||||
#define IMPTRACK_HUD "7" // tracking implant
|
||||
#define DIAG_STAT_HUD "8" // Silicon/Mech Status
|
||||
#define DIAG_STAT_HUD "8" // Silicon/Mech/Circuit Status
|
||||
#define DIAG_HUD "9" // Silicon health bar
|
||||
#define DIAG_BATT_HUD "10"// Borg/Mech power meter
|
||||
#define DIAG_BATT_HUD "10"// Borg/Mech/Circutry power meter
|
||||
#define DIAG_MECH_HUD "11"// Mech health bar
|
||||
#define DIAG_BOT_HUD "12"// Bot HUDs
|
||||
#define DIAG_TRACK_HUD "13"// Mech tracking beacon
|
||||
#define DIAG_AIRLOCK_HUD "14"//Airlock shock overlay
|
||||
#define DIAG_CIRCUIT_HUD "13"// Circuit assembly health bar
|
||||
#define DIAG_TRACK_HUD "14"// Mech/Silicon tracking beacon, Circutry long range icon
|
||||
#define DIAG_AIRLOCK_HUD "15"//Airlock shock overlay
|
||||
#define DIAG_PATH_HUD "16"//Bot path indicators
|
||||
#define GLAND_HUD "17"//Gland indicators for abductors
|
||||
#define SENTIENT_DISEASE_HUD "18"
|
||||
//for antag huds. these are used at the /mob level
|
||||
#define ANTAG_HUD "15"
|
||||
#define ANTAG_HUD "19"
|
||||
|
||||
//by default everything in the hud_list of an atom is an image
|
||||
//a value in hud_list with one of these will change that behavior
|
||||
#define HUD_LIST_LIST 1
|
||||
|
||||
//data HUD (medhud, sechud) defines
|
||||
//Don't forget to update human/New() if you change these!
|
||||
#define DATA_HUD_SECURITY_BASIC 1
|
||||
#define DATA_HUD_SECURITY_ADVANCED 2
|
||||
#define DATA_HUD_MEDICAL_BASIC 3
|
||||
#define DATA_HUD_MEDICAL_ADVANCED 4
|
||||
#define DATA_HUD_DIAGNOSTIC 5
|
||||
#define DATA_HUD_SECURITY_BASIC 1
|
||||
#define DATA_HUD_SECURITY_ADVANCED 2
|
||||
#define DATA_HUD_MEDICAL_BASIC 3
|
||||
#define DATA_HUD_MEDICAL_ADVANCED 4
|
||||
#define DATA_HUD_DIAGNOSTIC_BASIC 5
|
||||
#define DATA_HUD_DIAGNOSTIC_ADVANCED 6
|
||||
#define DATA_HUD_ABDUCTOR 7
|
||||
#define DATA_HUD_SENTIENT_DISEASE 8
|
||||
|
||||
//antag HUD defines
|
||||
#define ANTAG_HUD_CULT 6
|
||||
#define ANTAG_HUD_REV 7
|
||||
#define ANTAG_HUD_OPS 8
|
||||
#define ANTAG_HUD_WIZ 9
|
||||
#define ANTAG_HUD_SHADOW 10
|
||||
#define ANTAG_HUD_TRAITOR 11
|
||||
#define ANTAG_HUD_NINJA 12
|
||||
#define ANTAG_HUD_CHANGELING 13
|
||||
#define ANTAG_HUD_ABDUCTOR 14
|
||||
#define ANTAG_HUD_DEVIL 15
|
||||
#define ANTAG_HUD_SINTOUCHED 16
|
||||
#define ANTAG_HUD_SOULLESS 17
|
||||
#define ANTAG_HUD_CLOCKWORK 18
|
||||
#define ANTAG_HUD_BORER 19
|
||||
#define ANTAG_HUD_BROTHER 20
|
||||
#define ANTAG_HUD_CULT 9
|
||||
#define ANTAG_HUD_REV 10
|
||||
#define ANTAG_HUD_OPS 11
|
||||
#define ANTAG_HUD_WIZ 12
|
||||
#define ANTAG_HUD_SHADOW 13
|
||||
#define ANTAG_HUD_TRAITOR 14
|
||||
#define ANTAG_HUD_NINJA 15
|
||||
#define ANTAG_HUD_CHANGELING 16
|
||||
#define ANTAG_HUD_ABDUCTOR 17
|
||||
#define ANTAG_HUD_DEVIL 18
|
||||
#define ANTAG_HUD_SINTOUCHED 19
|
||||
#define ANTAG_HUD_SOULLESS 20
|
||||
#define ANTAG_HUD_CLOCKWORK 21
|
||||
#define ANTAG_HUD_BROTHER 22
|
||||
|
||||
// Notification action types
|
||||
#define NOTIFY_JUMP "jump"
|
||||
#define NOTIFY_ATTACK "attack"
|
||||
#define NOTIFY_ORBIT "orbit"
|
||||
|
||||
#define ADD_HUD_TO_COOLDOWN 20 //cooldown for being shown the images for any particular data hud
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define GLOBAL_PROC "some_magic_bullshit"
|
||||
|
||||
#define CALLBACK new /datum/callback
|
||||
#define INVOKE_ASYNC ImmediateInvokeAsync
|
||||
#define INVOKE_ASYNC world.ImmediateInvokeAsync
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#define CINEMATIC_DEFAULT 1
|
||||
#define CINEMATIC_SELFDESTRUCT 2
|
||||
#define CINEMATIC_SELFDESTRUCT_MISS 3
|
||||
#define CINEMATIC_NUKE_WIN 4
|
||||
#define CINEMATIC_NUKE_MISS 5
|
||||
#define CINEMATIC_ANNIHILATION 6
|
||||
#define CINEMATIC_MALF 7
|
||||
#define CINEMATIC_CULT 8
|
||||
#define CINEMATIC_NUKE_FAKE 9
|
||||
#define CINEMATIC_NUKE_NO_CORE 10
|
||||
#define CINEMATIC_NUKE_FAR 11
|
||||
#define CINEMATIC_NUKE_CLOWNOP 12
|
||||
#define CINEMATIC_CULT_NUKE 13
|
||||
@@ -2,9 +2,19 @@
|
||||
//Be sure to update the min/max of these if you do change them.
|
||||
//Measurements are in imperial units. Inches, feet, yards, miles. Tsp, tbsp, cups, quarts, gallons, etc
|
||||
|
||||
//arousal HUD location
|
||||
#define ui_arousal "EAST-1:28,CENTER-3:11"//Below the health doll
|
||||
//HUD stuff
|
||||
#define ui_arousal "EAST-1:28,CENTER-4:8"//Below the health doll
|
||||
#define ui_stamina "EAST-1:28,CENTER:17" // replacing internals button
|
||||
#define ui_overridden_resist "EAST-3:24,SOUTH+1:7"
|
||||
#define ui_combat_toggle "EAST-4:22,SOUTH:5"
|
||||
|
||||
//1:1 HUD layout stuff
|
||||
#define ui_boxcraft "EAST-4:22,SOUTH+1:6"
|
||||
#define ui_boxarea "EAST-4:6,SOUTH+1:6"
|
||||
#define ui_boxlang "EAST-5:22,SOUTH+1:6"
|
||||
|
||||
//Filters
|
||||
#define CIT_FILTER_STAMINACRIT filter(type="drop_shadow", x=0, y=0, size=-3, border=0, color="#04080F")
|
||||
|
||||
//organ defines
|
||||
#define COCK_SIZE_MIN 1
|
||||
@@ -70,4 +80,59 @@
|
||||
|
||||
#define ADMIN_MARKREAD(client) "(<a href='?_src_=holder;markedread=\ref[client]'>MARK READ</a>)"//marks an adminhelp as read and under investigation
|
||||
#define ADMIN_IC(client) "(<a href='?_src_=holder;icissue=\ref[client]'>IC</a>)"//marks and adminhelp as an IC issue
|
||||
#define ADMIN_REJECT(client) "(<a href='?_src_=holder;rejectadminhelp=\ref[client]'>REJT</a>)"//Rejects an adminhelp for being unclear or otherwise unhelpful. resets their adminhelp timer
|
||||
#define ADMIN_REJECT(client) "(<a href='?_src_=holder;rejectadminhelp=\ref[client]'>REJT</a>)"//Rejects an adminhelp for being unclear or otherwise unhelpful. resets their adminhelp timer
|
||||
|
||||
//Damage stuffs
|
||||
#define AROUSAL "arousal"
|
||||
|
||||
//DNA stuffs. Remember to change this if upstream adds more snowflake options
|
||||
#define DNA_EYE_COLOR_TWO_BLOCK 8
|
||||
#define DNA_EYE_COLOR_SWITCH_BLOCK 9
|
||||
#define DNA_EYE_COLOR_BLOCK 10
|
||||
#define DNA_COLOR_ONE_BLOCK 11
|
||||
#define DNA_COLOR_TWO_BLOCK 12
|
||||
#define DNA_COLOR_THR_BLOCK 13
|
||||
#define DNA_COLOR_SWITCH_BLOCK 14
|
||||
#define DNA_COLOR_SWITCH_MAX 7 //must be (2^(n+1))-1
|
||||
#define DNA_COCK_BLOCK 15
|
||||
#define DNA_MUTANTRACE_BLOCK 16
|
||||
#define DNA_MUTANTTAIL_BLOCK 17
|
||||
#define DNA_MUTANTWING_BLOCK 18
|
||||
#define DNA_WINGCOLOR_BLOCK 19
|
||||
|
||||
|
||||
//Species stuffs. Remember to change this if upstream updates species flags
|
||||
#define MUTCOLORS2 35
|
||||
#define MUTCOLORS3 36
|
||||
#define NOAROUSAL 37 //Stops all arousal effects
|
||||
#define NOGENITALS 38 //Cannot create, use, or otherwise have genitals
|
||||
|
||||
//Citadel istypes
|
||||
#define isborer(A) (istype(A, /mob/living/simple_animal/borer))
|
||||
#define isipcperson(A) (is_species(A, /datum/species/ipc))
|
||||
|
||||
#define CITADEL_MENTOR_OOC_COLOUR "#224724"
|
||||
|
||||
//xenobio console upgrade stuff
|
||||
#define XENOBIO_UPGRADE_MONKEYS 1
|
||||
#define XENOBIO_UPGRADE_SLIMEBASIC 2
|
||||
#define XENOBIO_UPGRADE_SLIMEADV 4
|
||||
|
||||
//stamina stuff
|
||||
#define STAMINA_SOFTCRIT 100 //softcrit for stamina damage. prevents standing up, prevents performing actions that cost stamina, etc, but doesn't force a rest or stop movement
|
||||
#define STAMINA_CRIT 140 //crit for stamina damage. forces a rest, and stops movement until stamina goes back to stamina softcrit
|
||||
#define STAMINA_SOFTCRIT_TRADITIONAL 0 //same as STAMINA_SOFTCRIT except for the more traditional health calculations
|
||||
#define STAMINA_CRIT_TRADITIONAL -40 //ditto, but for STAMINA_CRIT
|
||||
#define MIN_MELEE_STAMCOST 1.25 //Minimum cost for swinging items around. Will be extra useful when stats and skills are introduced.
|
||||
|
||||
#define CRAWLUNDER_DELAY 30 //Delay for crawling under a standing mob
|
||||
|
||||
//Citadel toggles because bitflag memes
|
||||
#define MEDIHOUND_SLEEPER 1
|
||||
#define EATING_NOISES 2
|
||||
#define DIGESTION_NOISES 4
|
||||
|
||||
#define TOGGLES_CITADEL (MEDIHOUND_SLEEPER|EATING_NOISES|DIGESTION_NOISES)
|
||||
|
||||
//component stuff
|
||||
#define COMSIG_COMBAT_TOGGLED "combatmode_toggled" //called by combat mode toggle on all equipped items. args: (mob/user, combatmode)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
//Cleaning tool strength
|
||||
// 1 is also a valid cleaning strength but completely unused so left undefined
|
||||
#define CLEAN_WEAK 2
|
||||
#define CLEAN_MEDIUM 3 // Acceptable tools
|
||||
#define CLEAN_STRONG 4 // Industrial strength
|
||||
#define CLEAN_IMPRESSIVE 5 // Cleaning strong enough your granny would be proud
|
||||
#define CLEAN_GOD 6 // Cleans things spotless down to the atomic structure
|
||||
|
||||
//How strong things have to be to wipe forensic evidence...
|
||||
#define CLEAN_STRENGTH_FINGERPRINTS CLEAN_IMPRESSIVE
|
||||
#define CLEAN_STRENGTH_BLOOD CLEAN_WEAK
|
||||
#define CLEAN_STRENGTH_FIBERS CLEAN_IMPRESSIVE
|
||||
+34
-42
@@ -1,50 +1,38 @@
|
||||
//component id defines
|
||||
#define BELLIGERENT_EYE "belligerent_eye"
|
||||
#define VANGUARD_COGWHEEL "vanguard_cogwheel"
|
||||
#define GEIS_CAPACITOR "geis_capacitor"
|
||||
//component id defines; sometimes these may not make sense in regards to their use in scripture but important ones are bright
|
||||
#define BELLIGERENT_EYE "belligerent_eye" //Use this for offensive and damaging scripture!
|
||||
#define VANGUARD_COGWHEEL "vanguard_cogwheel" //Use this for defensive and healing scripture!
|
||||
#define GEIS_CAPACITOR "geis_capacitor" //Use this for niche scripture!
|
||||
#define REPLICANT_ALLOY "replicant_alloy"
|
||||
#define HIEROPHANT_ANSIBLE "hierophant_ansible"
|
||||
#define HIEROPHANT_ANSIBLE "hierophant_ansible" //Use this for construction-related scripture!
|
||||
|
||||
GLOBAL_VAR_INIT(clockwork_construction_value, 0) //The total value of all structures built by the clockwork cult
|
||||
GLOBAL_VAR_INIT(clockwork_caches, 0) //How many clockwork caches exist in the world (not each individual)
|
||||
GLOBAL_VAR_INIT(clockwork_vitality, 0) //How much Vitality is stored, total
|
||||
GLOBAL_LIST_EMPTY(active_daemons) //A list of all active tinkerer's daemons
|
||||
GLOBAL_VAR_INIT(clockwork_power, 0) //How many watts of power are globally available to the clockwork cult
|
||||
|
||||
GLOBAL_LIST_EMPTY(all_clockwork_objects) //All clockwork items, structures, and effects in existence
|
||||
GLOBAL_LIST_EMPTY(all_clockwork_mobs) //All clockwork SERVANTS (not creatures) in existence
|
||||
GLOBAL_LIST_INIT(clockwork_component_cache, list(BELLIGERENT_EYE = 0, VANGUARD_COGWHEEL = 0, GEIS_CAPACITOR = 0, REPLICANT_ALLOY = 0, HIEROPHANT_ANSIBLE = 0)) //The pool of components that caches draw from
|
||||
|
||||
GLOBAL_VAR_INIT(ratvar_approaches, 0) //The servants can choose to "herald" Ratvar, permanently buffing them but announcing their presence to the crew.
|
||||
GLOBAL_VAR_INIT(ratvar_awakens, 0) //If Ratvar has been summoned; not a boolean, for proper handling of multiple Ratvars
|
||||
GLOBAL_VAR_INIT(ark_of_the_clockwork_justiciar, FALSE) //The Ark on the Reebe z-level
|
||||
|
||||
GLOBAL_VAR_INIT(clockwork_gateway_activated, FALSE) //if a gateway to the celestial derelict has ever been successfully activated
|
||||
GLOBAL_VAR_INIT(script_scripture_unlocked, FALSE) //If script scripture is available, through converting at least one crewmember
|
||||
GLOBAL_VAR_INIT(application_scripture_unlocked, FALSE) //If script scripture is available
|
||||
GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not used to track existing scripture
|
||||
|
||||
//Scripture tiers and requirements; peripherals should never be used
|
||||
#define SCRIPTURE_PERIPHERAL "Peripheral"
|
||||
#define SCRIPTURE_DRIVER "Driver"
|
||||
#define SCRIPTURE_SCRIPT "Script"
|
||||
#define SCRIPT_SERVANT_REQ 6
|
||||
#define SCRIPT_CACHE_REQ 1
|
||||
#define SCRIPTURE_APPLICATION "Application"
|
||||
#define APPLICATION_SERVANT_REQ 9
|
||||
#define APPLICATION_CACHE_REQ 3
|
||||
#define APPLICATION_CV_REQ 100
|
||||
#define SCRIPTURE_JUDGEMENT "Judgement"
|
||||
#define JUDGEMENT_SERVANT_REQ 12
|
||||
#define JUDGEMENT_CACHE_REQ 5
|
||||
#define JUDGEMENT_CV_REQ 300
|
||||
|
||||
//general component/cooldown things
|
||||
#define SLAB_PRODUCTION_TIME 450 //how long(deciseconds) slabs require to produce a single component; defaults to 45 seconds
|
||||
//Various costs related to power.
|
||||
#define MAX_CLOCKWORK_POWER 50000 //The max power in W that the cult can stockpile
|
||||
#define SCRIPT_UNLOCK_THRESHOLD 25000 //Scripts will unlock if the total power reaches this amount
|
||||
#define APPLICATION_UNLOCK_THRESHOLD 40000 //Applications will unlock if the total powre reaches this amount
|
||||
|
||||
#define SLAB_SERVANT_SLOWDOWN 150 //how much each servant above 5 slows down slab-based generation; defaults to 15 seconds per sevant
|
||||
|
||||
#define SLAB_SLOWDOWN_MAXIMUM 1350 //maximum slowdown from additional servants; defaults to 2 minutes 15 seconds
|
||||
|
||||
#define CACHE_PRODUCTION_TIME 300 //how long(deciseconds) caches require to produce a component; defaults to 30 seconds
|
||||
|
||||
#define ACTIVE_CACHE_SLOWDOWN 50 //how many additional deciseconds caches take to produce a component for each linked cache; defaults to 5 seconds
|
||||
|
||||
#define LOWER_PROB_PER_COMPONENT 10 //how much each component in the cache reduces the weight of getting another of that component type
|
||||
|
||||
#define MAX_COMPONENTS_BEFORE_RAND (10*LOWER_PROB_PER_COMPONENT) //the number of each component, times LOWER_PROB_PER_COMPONENT, you need to have before component generation will become random
|
||||
#define ABSCOND_ABDUCTION_COST 95
|
||||
|
||||
//clockcult power defines
|
||||
#define MIN_CLOCKCULT_POWER 25 //the minimum amount of power clockcult machines will handle gracefully
|
||||
@@ -67,26 +55,22 @@ GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not us
|
||||
|
||||
#define POWER_PLASTEEL (CLOCKCULT_POWER_UNIT*0.05) //how much power is in one sheet of plasteel
|
||||
|
||||
#define RATVAR_POWER_CHECK "ratvar?" //when passed into can_use_power(), converts it into a check for if ratvar has woken/the fabricator is debug
|
||||
|
||||
//Ark defines
|
||||
#define GATEWAY_SUMMON_RATE 1 //the time amount the Gateway to the Celestial Derelict gets each process tick; defaults to 1 per tick
|
||||
|
||||
#define GATEWAY_REEBE_FOUND 119 //when progress is at or above this, the gateway finds reebe and begins drawing power
|
||||
#define GATEWAY_REEBE_FOUND 240 //when progress is at or above this, the gateway finds reebe and begins drawing power
|
||||
|
||||
#define GATEWAY_RATVAR_COMING 239 //when progress is at or above this, ratvar has entered and is coming through the gateway
|
||||
#define GATEWAY_RATVAR_COMING 480 //when progress is at or above this, ratvar has entered and is coming through the gateway
|
||||
|
||||
#define GATEWAY_RATVAR_ARRIVAL 300 //when progress is at or above this, game over ratvar's here everybody go home
|
||||
|
||||
#define ARK_SUMMON_COST 5 //how many of each component an Ark costs to summon
|
||||
|
||||
#define ARK_CONSUME_COST 15 //how many of each component an Ark needs to consume to activate
|
||||
#define GATEWAY_RATVAR_ARRIVAL 600 //when progress is at or above this, game over ratvar's here everybody go home
|
||||
|
||||
//Objective text define
|
||||
#define CLOCKCULT_OBJECTIVE "Construct the Ark of the Clockwork Justicar and free Ratvar."
|
||||
|
||||
//Eminence defines
|
||||
#define SUPERHEATED_CLOCKWORK_WALL_LIMIT 20 //How many walls can be superheated at once
|
||||
|
||||
//misc clockcult stuff
|
||||
#define MARAUDER_EMERGE_THRESHOLD 65 //marauders cannot emerge unless host is at this% or less health
|
||||
|
||||
#define SIGIL_ACCESS_RANGE 2 //range at which transmission sigils can access power
|
||||
|
||||
@@ -94,6 +78,14 @@ GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not us
|
||||
|
||||
#define OCULAR_WARDEN_EXCLUSION_RANGE 3 //the range at which ocular wardens cannot be placed near other ocular wardens
|
||||
|
||||
#define RATVARIAN_SPEAR_DURATION 1800 //how long ratvarian spears last; defaults to 3 minutes
|
||||
#define CLOCKWORK_ARMOR_COOLDOWN 1800 //The cooldown period between summoning suits of clockwork armor
|
||||
|
||||
#define PRISM_DELAY_DURATION 1200 //how long prolonging prisms delay the shuttle for; defaults to 2 minutes
|
||||
#define RATVARIAN_SPEAR_COOLDOWN 300 //The cooldown period between summoning another Ratvarian spear
|
||||
|
||||
#define MARAUDER_SCRIPTURE_SCALING_THRESHOLD 600 //The amount of deciseconds that must pass before marauder scripture will not gain a recital penalty
|
||||
|
||||
#define MARAUDER_SCRIPTURE_SCALING_TIME 20 //The amount of extra deciseconds tacked on to the marauder scripture recital time per recent marauder
|
||||
|
||||
#define MARAUDER_SCRIPTURE_SCALING_MAX 300 //The maximum extra time applied to the marauder scripture
|
||||
|
||||
#define ARK_SCREAM_COOLDOWN 600 //This much time has to pass between instances of the Ark taking damage before it will "scream" again
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
// This is eventually for wjohn to add more color standardization stuff like I keep asking him >:(
|
||||
|
||||
#define COLOR_INPUT_DISABLED "#F0F0F0"
|
||||
#define COLOR_INPUT_ENABLED "#D3B5B5"
|
||||
|
||||
//#define COLOR_WHITE "#EEEEEE"
|
||||
//#define COLOR_SILVER "#C0C0C0"
|
||||
//#define COLOR_GRAY "#808080"
|
||||
#define COLOR_FLOORTILE_GRAY "#8D8B8B"
|
||||
#define COLOR_ALMOST_BLACK "#333333"
|
||||
//#define COLOR_BLACK "#000000"
|
||||
#define COLOR_RED "#FF0000"
|
||||
//#define COLOR_RED_LIGHT "#FF3333"
|
||||
//#define COLOR_MAROON "#800000"
|
||||
#define COLOR_YELLOW "#FFFF00"
|
||||
//#define COLOR_OLIVE "#808000"
|
||||
//#define COLOR_LIME "#32CD32"
|
||||
#define COLOR_GREEN "#008000"
|
||||
#define COLOR_CYAN "#00FFFF"
|
||||
//#define COLOR_TEAL "#008080"
|
||||
#define COLOR_BLUE "#0000FF"
|
||||
//#define COLOR_BLUE_LIGHT "#33CCFF"
|
||||
//#define COLOR_NAVY "#000080"
|
||||
#define COLOR_PINK "#FFC0CB"
|
||||
//#define COLOR_MAGENTA "#FF00FF"
|
||||
#define COLOR_PURPLE "#800080"
|
||||
#define COLOR_ORANGE "#FF9900"
|
||||
#define COLOR_BEIGE "#CEB689"
|
||||
#define COLOR_BLUE_GRAY "#75A2BB"
|
||||
#define COLOR_BROWN "#BA9F6D"
|
||||
#define COLOR_DARK_BROWN "#997C4F"
|
||||
#define COLOR_DARK_ORANGE "#C3630C"
|
||||
#define COLOR_GREEN_GRAY "#99BB76"
|
||||
#define COLOR_RED_GRAY "#B4696A"
|
||||
#define COLOR_PALE_BLUE_GRAY "#98C5DF"
|
||||
#define COLOR_PALE_GREEN_GRAY "#B7D993"
|
||||
#define COLOR_PALE_RED_GRAY "#D59998"
|
||||
#define COLOR_PALE_PURPLE_GRAY "#CBB1CA"
|
||||
#define COLOR_PURPLE_GRAY "#AE8CA8"
|
||||
|
||||
//Color defines used by the assembly detailer.
|
||||
#define COLOR_ASSEMBLY_BLACK "#545454"
|
||||
#define COLOR_ASSEMBLY_BGRAY "#9497AB"
|
||||
#define COLOR_ASSEMBLY_WHITE "#E2E2E2"
|
||||
#define COLOR_ASSEMBLY_RED "#CC4242"
|
||||
#define COLOR_ASSEMBLY_ORANGE "#E39751"
|
||||
#define COLOR_ASSEMBLY_BEIGE "#AF9366"
|
||||
#define COLOR_ASSEMBLY_BROWN "#97670E"
|
||||
#define COLOR_ASSEMBLY_GOLD "#AA9100"
|
||||
#define COLOR_ASSEMBLY_YELLOW "#CECA2B"
|
||||
#define COLOR_ASSEMBLY_GURKHA "#999875"
|
||||
#define COLOR_ASSEMBLY_LGREEN "#789876"
|
||||
#define COLOR_ASSEMBLY_GREEN "#44843C"
|
||||
#define COLOR_ASSEMBLY_LBLUE "#5D99BE"
|
||||
#define COLOR_ASSEMBLY_BLUE "#38559E"
|
||||
#define COLOR_ASSEMBLY_PURPLE "#6F6192"
|
||||
+39
-35
@@ -11,41 +11,30 @@
|
||||
#define STAMINA "stamina"
|
||||
#define BRAIN "brain"
|
||||
|
||||
//Citadel code
|
||||
#define AROUSAL "arousal"
|
||||
|
||||
//bitflag damage defines used for suicide_act
|
||||
#define BRUTELOSS 1
|
||||
#define FIRELOSS 2
|
||||
#define TOXLOSS 4
|
||||
#define OXYLOSS 8
|
||||
#define SHAME 16
|
||||
#define BRUTELOSS (1<<0)
|
||||
#define FIRELOSS (1<<1)
|
||||
#define TOXLOSS (1<<2)
|
||||
#define OXYLOSS (1<<3)
|
||||
#define SHAME (1<<4)
|
||||
#define MANUAL_SUICIDE (1<<5) //suicide_act will do the actual killing.
|
||||
|
||||
//Citadel code
|
||||
#define AROUSAL 32
|
||||
|
||||
#define STUN "stun"
|
||||
#define KNOCKDOWN "knockdown"
|
||||
#define UNCONSCIOUS "unconscious"
|
||||
#define IRRADIATE "irradiate"
|
||||
#define STUTTER "stutter"
|
||||
#define SLUR "slur"
|
||||
#define EYE_BLUR "eye_blur"
|
||||
#define DROWSY "drowsy"
|
||||
#define JITTER "jitter"
|
||||
#define EFFECT_STUN "stun"
|
||||
#define EFFECT_KNOCKDOWN "knockdown"
|
||||
#define EFFECT_UNCONSCIOUS "unconscious"
|
||||
#define EFFECT_IRRADIATE "irradiate"
|
||||
#define EFFECT_STUTTER "stutter"
|
||||
#define EFFECT_SLUR "slur"
|
||||
#define EFFECT_EYE_BLUR "eye_blur"
|
||||
#define EFFECT_DROWSY "drowsy"
|
||||
#define EFFECT_JITTER "jitter"
|
||||
|
||||
//Bitflags defining which status effects could be or are inflicted on a mob
|
||||
#define CANSTUN 1
|
||||
#define CANKNOCKDOWN 2
|
||||
#define CANUNCONSCIOUS 4
|
||||
#define CANPUSH 8
|
||||
#define IGNORESLOWDOWN 16
|
||||
#define GOTTAGOFAST 32
|
||||
#define GOTTAGOREALLYFAST 64
|
||||
#define GODMODE 4096
|
||||
#define FAKEDEATH 8192 //Replaces stuff like changeling.changeling_fakedeath
|
||||
#define DISFIGURED 16384 //I'll probably move this elsewhere if I ever get wround to writing a bitflag mob-damage system
|
||||
#define XENO_HOST 32768 //Tracks whether we're gonna be a baby alien's mummy.
|
||||
#define CANSTUN (1<<0)
|
||||
#define CANKNOCKDOWN (1<<1)
|
||||
#define CANUNCONSCIOUS (1<<2)
|
||||
#define CANPUSH (1<<3)
|
||||
#define GODMODE (1<<4)
|
||||
|
||||
//Health Defines
|
||||
#define HEALTH_THRESHOLD_CRIT 0
|
||||
@@ -121,11 +110,7 @@
|
||||
#define EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER 8 //Coefficient of multiplication for the damage the item does when removed without a surgery (this*item.w_class)
|
||||
#define EMBEDDED_UNSAFE_REMOVAL_TIME 30 //A Time in ticks, total removal time = (this*item.w_class)
|
||||
|
||||
//Gun Stuff
|
||||
#define SAWN_INTACT 0
|
||||
#define SAWN_OFF 1
|
||||
//Gun weapon weight
|
||||
#define WEAPON_DUAL_WIELD 0
|
||||
#define WEAPON_LIGHT 1
|
||||
#define WEAPON_MEDIUM 2
|
||||
#define WEAPON_HEAVY 3
|
||||
@@ -157,3 +142,22 @@
|
||||
|
||||
#define EMP_HEAVY 1
|
||||
#define EMP_LIGHT 2
|
||||
|
||||
#define GRENADE_CLUMSY_FUMBLE 1
|
||||
#define GRENADE_NONCLUMSY_FUMBLE 2
|
||||
#define GRENADE_NO_FUMBLE 3
|
||||
|
||||
#define BODY_ZONE_HEAD "head"
|
||||
#define BODY_ZONE_CHEST "chest"
|
||||
#define BODY_ZONE_L_ARM "l_arm"
|
||||
#define BODY_ZONE_R_ARM "r_arm"
|
||||
#define BODY_ZONE_L_LEG "l_leg"
|
||||
#define BODY_ZONE_R_LEG "r_leg"
|
||||
|
||||
#define BODY_ZONE_PRECISE_EYES "eyes"
|
||||
#define BODY_ZONE_PRECISE_MOUTH "mouth"
|
||||
#define BODY_ZONE_PRECISE_GROIN "groin"
|
||||
#define BODY_ZONE_PRECISE_L_HAND "l_hand"
|
||||
#define BODY_ZONE_PRECISE_R_HAND "r_hand"
|
||||
#define BODY_ZONE_PRECISE_L_FOOT "l_foot"
|
||||
#define BODY_ZONE_PRECISE_R_FOOT "r_foot"
|
||||
|
||||
+135
-20
@@ -2,43 +2,158 @@
|
||||
#define GET_COMPONENT_FROM(varname, path, target) var##path/##varname = ##target.GetComponent(##path)
|
||||
#define GET_COMPONENT(varname, path) GET_COMPONENT_FROM(varname, path, src)
|
||||
|
||||
#define COMPONENT_INCOMPATIBLE 1
|
||||
|
||||
// How multiple components of the exact same type are handled in the same datum
|
||||
|
||||
#define COMPONENT_DUPE_HIGHLANDER 0 //old component is deleted (default)
|
||||
#define COMPONENT_DUPE_ALLOWED 1 //duplicates allowed
|
||||
#define COMPONENT_DUPE_UNIQUE 2 //new component is deleted
|
||||
#define COMPONENT_DUPE_HIGHLANDER 0 //old component is deleted (default)
|
||||
#define COMPONENT_DUPE_ALLOWED 1 //duplicates allowed
|
||||
#define COMPONENT_DUPE_UNIQUE 2 //new component is deleted
|
||||
#define COMPONENT_DUPE_UNIQUE_PASSARGS 4 //old component is given the initialization args of the new
|
||||
|
||||
// All signals. Format:
|
||||
// When the signal is called: (signal arguments)
|
||||
|
||||
// /datum signals
|
||||
#define COMSIG_COMPONENT_ADDED "component_added" //when a component is added to a datum: (datum/component)
|
||||
#define COMSIG_COMPONENT_REMOVING "component_removing" //before a component is removed from a datum because of RemoveComponent: (datum/component)
|
||||
#define COMSIG_PARENT_QDELETED "parent_qdeleted" //before a datum's Destroy() is called: ()
|
||||
#define COMSIG_COMPONENT_ADDED "component_added" //when a component is added to a datum: (/datum/component)
|
||||
#define COMSIG_COMPONENT_REMOVING "component_removing" //before a component is removed from a datum because of RemoveComponent: (/datum/component)
|
||||
#define COMSIG_PARENT_PREQDELETED "parent_preqdeleted" //before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation
|
||||
#define COMSIG_PARENT_QDELETED "parent_qdeleted" //after a datum's Destroy() is called: (force, qdel_hint), at this point none of the other components chose to interrupt qdel and Destroy has been called
|
||||
|
||||
// /atom signals
|
||||
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (obj/item, mob/living, params)
|
||||
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" //from base of atom/attack_hulk(): (mob/living/carbon/human)
|
||||
#define COMSIG_PARENT_EXAMINE "atom_examine" //from base of atom/examine(): (mob)
|
||||
#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable, atom)
|
||||
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params)
|
||||
#define COMPONENT_NO_AFTERATTACK 1 //Return this in response if you don't want afterattack to be called
|
||||
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" //from base of atom/attack_hulk(): (/mob/living/carbon/human)
|
||||
#define COMSIG_PARENT_EXAMINE "atom_examine" //from base of atom/examine(): (/mob)
|
||||
#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name" //from base of atom/get_examine_name(): (/mob, list/overrides)
|
||||
//Positions for overrides list
|
||||
#define EXAMINE_POSITION_ARTICLE 1
|
||||
#define EXAMINE_POSITION_BEFORE 2
|
||||
//End positions
|
||||
#define COMPONENT_EXNAME_CHANGED 1
|
||||
#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable/entering, /atom)
|
||||
#define COMSIG_ATOM_EXITED "atom_exited" //from base of atom/Exited(): (atom/movable/exiting, atom/newloc)
|
||||
#define COMSIG_ATOM_EX_ACT "atom_ex_act" //from base of atom/ex_act(): (severity, target)
|
||||
#define COMSIG_ATOM_EMP_ACT "atom_emp_act" //from base of atom/emp_act(): (severity)
|
||||
#define COMSIG_ATOM_FIRE_ACT "atom_fire_act" //from base of atom/fire_act(): (exposed_temperature, exposed_volume)
|
||||
#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act" //from base of atom/bullet_act(): (obj/item/projectile, def_zone)
|
||||
#define COMSIG_ATOM_BLOB_ACT "atom_blob_act" //from base of atom/blob_act(): (obj/structure/blob)
|
||||
#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act" //from base of atom/bullet_act(): (/obj/item/projectile, def_zone)
|
||||
#define COMSIG_ATOM_BLOB_ACT "atom_blob_act" //from base of atom/blob_act(): (/obj/structure/blob)
|
||||
#define COMSIG_ATOM_ACID_ACT "atom_acid_act" //from base of atom/acid_act(): (acidpwr, acid_volume)
|
||||
#define COMSIG_ATOM_EMAG_ACT "atom_emag_act" //from base of atom/emag_act(): ()
|
||||
#define COMSIG_ATOM_RAD_ACT "atom_rad_act" //from base of atom/rad_act(intensity)
|
||||
#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act" //from base of atom/narsie_act(): ()
|
||||
#define COMSIG_ATOM_RATVAR_ACT "atom_ratvar_act" //from base of atom/ratvar_act(): ()
|
||||
#define COMSIG_ATOM_RCD_ACT "atom_rcd_act" //from base of atom/rcd_act(): (mob, obj/item/construction/rcd, passed_mode)
|
||||
#define COMSIG_ATOM_RCD_ACT "atom_rcd_act" //from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode)
|
||||
#define COMSIG_ATOM_SING_PULL "atom_sing_pull" //from base of atom/singularity_pull(): (S, current_size)
|
||||
#define COMSIG_ATOM_SET_LIGHT "atom_set_light" //from base of atom/set_light(): (l_range, l_power, l_color)
|
||||
#define COMSIG_ATOM_ROTATE "atom_rotate" //from base of atom/shuttleRotate(): (rotation, params)
|
||||
#define COMSIG_ATOM_DIR_CHANGE "atom_dir_change" //from base of atom/setDir(): (old_dir, new_dir)
|
||||
#define COMSIG_ATOM_CONTENTS_DEL "atom_contents_del" //from base of atom/handle_atom_del(): (atom/deleted)
|
||||
/////////////////
|
||||
#define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost" //from base of atom/attack_ghost(): (mob/dead/observer/ghost)
|
||||
#define COMSIG_ATOM_ATTACK_HAND "atom_attack_hand" //from base of atom/attack_hand(): (mob/user)
|
||||
#define COMSIG_ATOM_ATTACK_PAW "atom_attack_paw" //from base of atom/attack_paw(): (mob/user)
|
||||
#define COMPONENT_NO_ATTACK_HAND 1 //works on all 3.
|
||||
/////////////////
|
||||
|
||||
#define COMSIG_ENTER_AREA "enter_area" //from base of area/Entered(): (/area)
|
||||
#define COMSIG_EXIT_AREA "exit_area" //from base of area/Exited(): (/area)
|
||||
|
||||
#define COMSIG_CLICK "atom_click" //from base of atom/Click(): (location, control, params)
|
||||
#define COMSIG_CLICK_SHIFT "shift_click" //from base of atom/ShiftClick(): (/mob)
|
||||
#define COMSIG_CLICK_CTRL "ctrl_click" //from base of atom/CtrlClickOn(): (/mob)
|
||||
#define COMSIG_CLICK_ALT "alt_click" //from base of atom/AltClick(): (/mob)
|
||||
#define COMSIG_CLICK_CTRL_SHIFT "ctrl_shift_click" //from base of atom/CtrlShiftClick(/mob)
|
||||
#define COMSIG_MOUSEDROP_ONTO "mousedrop_onto" //from base of atom/MouseDrop(): (/atom/over, /mob/user)
|
||||
#define COMPONENT_NO_MOUSEDROP 1
|
||||
#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto" //from base of atom/MouseDrop_T: (/atom/from, /mob/user)
|
||||
|
||||
// /area signals
|
||||
#define COMSIG_AREA_ENTERED "area_entered" //from base of area/Entered(): (atom/movable/M)
|
||||
#define COMSIG_AREA_EXITED "area_exited" //from base of area/Exited(): (atom/movable/M)
|
||||
|
||||
// /turf signals
|
||||
#define COMSIG_TURF_CHANGE "turf_change" //from base of turf/ChangeTurf(): (path, list/new_baseturfs, flags, list/transferring_comps)
|
||||
|
||||
// /atom/movable signals
|
||||
#define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (atom, dir)
|
||||
#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (atom/movable)
|
||||
#define COMSIG_MOVABLE_COLLIDE "movable_collide" //from base of atom/movable/Collide(): (atom)
|
||||
#define COMSIG_MOVABLE_IMPACT "movable_impact" //from base of atom/movable/throw_impact(): (atom, throwingdatum)
|
||||
#define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (/atom, dir)
|
||||
#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (/atom/movable)
|
||||
#define COMSIG_MOVABLE_UNCROSSED "movable_uncrossed" //from base of atom/movable/Uncrossed(): (/atom/movable)
|
||||
#define COMSIG_MOVABLE_COLLIDE "movable_collide" //from base of atom/movable/Collide(): (/atom)
|
||||
#define COMSIG_MOVABLE_IMPACT "movable_impact" //from base of atom/movable/throw_impact(): (/atom/hit_atom, /datum/thrownthing/throwingdatum)
|
||||
#define COMSIG_MOVABLE_IMPACT_ZONE "item_impact_zone" //from base of mob/living/hitby(): (mob/living/target, hit_zone)
|
||||
#define COMSIG_MOVABLE_BUCKLE "buckle" //from base of atom/movable/buckle_mob(): (mob, force)
|
||||
#define COMSIG_MOVABLE_UNBUCKLE "unbuckle" //from base of atom/movable/unbuckle_mob(): (mob, force)
|
||||
#define COMSIG_MOVABLE_THROW "movable_throw" //from base of atom/movable/throw_at(): (datum/thrownthing, spin)
|
||||
#define COMSIG_MOVABLE_Z_CHANGED "movable_ztransit" //from base of atom/movable/onTransitZ(): (old_z, new_z)
|
||||
|
||||
// /obj/machinery signals
|
||||
#define COMSIG_MACHINE_PROCESS "machine_process" //from machinery subsystem fire(): ()
|
||||
#define COMSIG_MACHINE_PROCESS_ATMOS "machine_process_atmos" //from air subsystem process_atmos_machinery(): ()
|
||||
// /mob/living/carbon signals
|
||||
#define COMSIG_CARBON_SOUNDBANG "carbon_soundbang" //from base of mob/living/carbon/soundbang_act(): (list(intensity))
|
||||
|
||||
// /obj signals
|
||||
#define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct" //from base of obj/deconstruct(): (disassembled)
|
||||
|
||||
// /obj/item signals
|
||||
#define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (/mob/living/target, /mob/living/user)
|
||||
#define COMSIG_ITEM_ATTACK_SELF "item_attack_self" //from base of obj/item/attack_self(): (/mob)
|
||||
#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj" //from base of obj/item/attack_obj(): (/obj, /mob)
|
||||
#define COMPONENT_NO_ATTACK_OBJ 1
|
||||
#define COMSIG_ITEM_PRE_ATTACK "item_pre_attack" //from base of obj/item/pre_attack(): (atom/target, mob/user, params)
|
||||
#define COMPONENT_NO_ATTACK 1
|
||||
#define COMSIG_ITEM_EQUIPPED "item_equip" //from base of obj/item/equipped(): (/mob/equipper, slot)
|
||||
#define COMSIG_ITEM_DROPPED "item_drop"
|
||||
#define COMSIG_ITEM_PICKUP "item_pickup" //from base of obj/item/pickup(): (/mob/taker)
|
||||
#define COMSIG_ITEM_ATTACK_ZONE "item_attack_zone" //from base of mob/living/carbon/attacked_by(): (mob/living/carbon/target, mob/living/user, hit_zone)
|
||||
#define COMSIG_ITEM_IMBUE_SOUL "item_imbue_soul" //return a truthy value to prevent ensouling, checked in /obj/effect/proc_holder/spell/targeted/lichdom/cast(): (mob/user)
|
||||
|
||||
// /obj/item/clothing signals
|
||||
#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): ()
|
||||
|
||||
// /mob/living/carbon/human signals
|
||||
#define COMSIG_HUMAN_MELEE_UNARMED_ATTACK "human_melee_unarmed_attack" //from mob/living/carbon/human/UnarmedAttack(): (atom/target)
|
||||
#define COMSIG_HUMAN_MELEE_UNARMED_ATTACKBY "human_melee_unarmed_attackby" //from mob/living/carbon/human/UnarmedAttack(): (mob/living/carbon/human/attacker)
|
||||
#define COMSIG_HUMAN_DISARM_HIT "human_disarm_hit" //Hit by successful disarm attack (mob/living/carbon/human/attacker,zone_targeted)
|
||||
|
||||
/*******Component Specific Signals*******/
|
||||
//Janitor
|
||||
#define COMSIG_TURF_IS_WET "check_turf_wet" //(): Returns bitflags of wet values.
|
||||
#define COMSIG_TURF_MAKE_DRY "make_turf_try" //(max_strength, immediate, duration_decrease = INFINITY): Returns bool.
|
||||
#define COMSIG_COMPONENT_CLEAN_ACT "clean_act" //called on an object to clean it of cleanables. Usualy with soap: (num/strength)
|
||||
|
||||
//Food
|
||||
#define COMSIG_FOOD_EATEN "food_eaten" //from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder)
|
||||
|
||||
//Mood
|
||||
#define COMSIG_ADD_MOOD_EVENT "add_mood" //Called when you send a mood event from anywhere in the code.
|
||||
#define COMSIG_CLEAR_MOOD_EVENT "clear_mood" //Called when you clear a mood event from anywhere in the code.
|
||||
|
||||
//NTnet
|
||||
#define COMSIG_COMPONENT_NTNET_RECIEVE "ntnet_recieve" //called on an object by its NTNET connection component on recieve. (sending_id(number), sending_netname(text), data(datum/netdata))
|
||||
|
||||
// /datum/component/storage signals
|
||||
#define COMSIG_CONTAINS_STORAGE "is_storage" //() - returns bool.
|
||||
#define COMSIG_TRY_STORAGE_INSERT "storage_try_insert" //(obj/item/inserting, mob/user, silent, force) - returns bool
|
||||
#define COMSIG_TRY_STORAGE_SHOW "storage_show_to" //(mob/show_to, force) - returns bool.
|
||||
#define COMSIG_TRY_STORAGE_HIDE_FROM "storage_hide_from" //(mob/hide_from) - returns bool
|
||||
#define COMSIG_TRY_STORAGE_HIDE_ALL "storage_hide_all" //returns bool
|
||||
#define COMSIG_TRY_STORAGE_SET_LOCKSTATE "storage_lock_set_state" //(newstate)
|
||||
#define COMSIG_IS_STORAGE_LOCKED "storage_get_lockstate" //() - returns bool. MUST CHECK IF STORAGE IS THERE FIRST!
|
||||
#define COMSIG_TRY_STORAGE_TAKE_TYPE "storage_take_type" //(type, atom/destination, amount = INFINITY, check_adjacent, force, mob/user, list/inserted) - returns bool - type can be a list of types.
|
||||
#define COMSIG_TRY_STORAGE_FILL_TYPE "storage_fill_type" //(type, amount = INFINITY, force = FALSE) //don't fuck this up. Force will ignore max_items, and amount is normally clamped to max_items.
|
||||
#define COMSIG_TRY_STORAGE_TAKE "storage_take_obj" //(obj, new_loc, force = FALSE) - returns bool
|
||||
#define COMSIG_TRY_STORAGE_QUICK_EMPTY "storage_quick_empty" //(loc) - returns bool - if loc is null it will dump at parent location.
|
||||
#define COMSIG_TRY_STORAGE_RETURN_INVENTORY "storage_return_inventory" //(list/list_to_inject_results_into, recursively_search_inside_storages = TRUE)
|
||||
#define COMSIG_TRY_STORAGE_CAN_INSERT "storage_can_equip" //(obj/item/insertion_candidate, mob/user, silent) - returns bool
|
||||
|
||||
/*******Non-Signal Component Related Defines*******/
|
||||
|
||||
//Redirection component init flags
|
||||
#define REDIRECT_TRANSFER_WITH_TURF 1
|
||||
|
||||
//Arch
|
||||
#define ARCH_PROB "probability" //Probability for each item
|
||||
#define ARCH_MAXDROP "max_drop_amount" //each item's max drop amount
|
||||
|
||||
//Ouch my toes!
|
||||
#define CALTROP_BYPASS_SHOES 1
|
||||
#define CALTROP_IGNORE_WALKERS 2
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
//config files
|
||||
#define CONFIG_GET(X) global.config.Get(/datum/config_entry/##X)
|
||||
#define CONFIG_SET(X, Y) global.config.Set(/datum/config_entry/##X, ##Y)
|
||||
|
||||
#define CONFIG_MAPS_FILE "maps.txt"
|
||||
|
||||
//flags
|
||||
#define CONFIG_ENTRY_LOCKED 1 //can't edit
|
||||
#define CONFIG_ENTRY_HIDDEN 2 //can't see value
|
||||
@@ -14,7 +14,7 @@
|
||||
#define SUPPORT_LINES 1
|
||||
#define COVER 2
|
||||
#define CUT_COVER 3
|
||||
#define BOLTS 4
|
||||
#define ANCHOR_BOLTS 4
|
||||
#define SUPPORT_RODS 5
|
||||
#define SHEATH 6
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
#define WINDOW_IN_FRAME 1
|
||||
#define WINDOW_SCREWED_TO_FRAME 2
|
||||
|
||||
//airlock assembly construction states
|
||||
#define AIRLOCK_ASSEMBLY_NEEDS_WIRES 0
|
||||
#define AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS 1
|
||||
#define AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER 2
|
||||
|
||||
//plastic flaps construction states
|
||||
#define PLASTIC_FLAPS_NORMAL 0
|
||||
#define PLASTIC_FLAPS_DETACHED 1
|
||||
@@ -32,12 +37,6 @@
|
||||
#define FAILED_UNFASTEN 1
|
||||
#define SUCCESSFUL_UNFASTEN 2
|
||||
|
||||
//disposal unit mode defines, which do double time as the construction defines
|
||||
#define PRESSURE_OFF 0
|
||||
#define PRESSURE_ON 1
|
||||
#define PRESSURE_MAXED 2
|
||||
#define SCREWS_OUT -1
|
||||
|
||||
//ai core defines
|
||||
#define EMPTY_CORE 0
|
||||
#define CIRCUIT_CORE 1
|
||||
@@ -46,16 +45,6 @@
|
||||
#define GLASS_CORE 4
|
||||
#define AI_READY_CORE 5
|
||||
|
||||
//field generator construction defines
|
||||
#define FG_UNSECURED 0
|
||||
#define FG_SECURED 1
|
||||
#define FG_WELDED 2
|
||||
|
||||
//emitter construction defines
|
||||
#define EM_UNSECURED 0
|
||||
#define EM_SECURED 1
|
||||
#define EM_WELDED 2
|
||||
|
||||
//Construction defines for the pinion airlock
|
||||
#define GEAR_SECURE 1
|
||||
#define GEAR_LOOSE 2
|
||||
@@ -86,6 +75,7 @@
|
||||
#define MAT_BANANIUM "$bananium"
|
||||
#define MAT_TITANIUM "$titanium"
|
||||
#define MAT_BIOMASS "$biomass"
|
||||
#define MAT_PLASTIC "$plastic"
|
||||
//The amount of materials you get from a sheet of mineral like iron/diamond/glass etc
|
||||
#define MINERAL_MATERIAL_AMOUNT 2000
|
||||
//The maximum size of a stack object.
|
||||
@@ -120,4 +110,4 @@
|
||||
#define RCD_FLOORWALL 1
|
||||
#define RCD_AIRLOCK 2
|
||||
#define RCD_DECONSTRUCT 3
|
||||
#define RCD_WINDOWGRILLE 4
|
||||
#define RCD_WINDOWGRILLE 4
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#define BAN_CHAPEL "chapel"
|
||||
#define BAN_HURTPRIEST "hurtpriest"
|
||||
#define BAN_AVOIDWATER "avoidwater"
|
||||
#define BAN_STRIKEUNCONCIOUS "strikeunconcious"
|
||||
#define BAN_STRIKEUNCONSCIOUS "strikeunconscious"
|
||||
#define BAN_HURTLIZARD "hurtlizard"
|
||||
#define BAN_HURTANIMAL "hurtanimal"
|
||||
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
#define RUNE_COLOR_OFFER "#FFFFFF"
|
||||
#define RUNE_COLOR_DARKRED "#7D1717"
|
||||
#define RUNE_COLOR_MEDIUMRED "#C80000"
|
||||
#define RUNE_COLOR_BURNTORANGE "#CC5500"
|
||||
#define RUNE_COLOR_RED "#FF0000"
|
||||
#define RUNE_COLOR_EMP "#4D94FF"
|
||||
#define RUNE_COLOR_SUMMON "#00FF00"
|
||||
|
||||
//blood magic
|
||||
#define MAX_BLOODCHARGE 5
|
||||
#define RUNELESS_MAX_BLOODCHARGE 2
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
#define DISEASE_LIMIT 1
|
||||
#define VIRUS_SYMPTOM_LIMIT 6
|
||||
|
||||
//Visibility Flags
|
||||
#define HIDDEN_SCANNER (1<<0)
|
||||
#define HIDDEN_PANDEMIC (1<<1)
|
||||
|
||||
//Disease Flags
|
||||
#define CURABLE (1<<0)
|
||||
#define CAN_CARRY (1<<1)
|
||||
#define CAN_RESIST (1<<2)
|
||||
|
||||
//Spread Flags
|
||||
#define DISEASE_SPREAD_SPECIAL (1<<0)
|
||||
#define DISEASE_SPREAD_NON_CONTAGIOUS (1<<1)
|
||||
#define DISEASE_SPREAD_BLOOD (1<<2)
|
||||
#define DISEASE_SPREAD_CONTACT_FLUIDS (1<<3)
|
||||
#define DISEASE_SPREAD_CONTACT_SKIN (1<<4)
|
||||
#define DISEASE_SPREAD_AIRBORNE (1<<5)
|
||||
|
||||
//Severity Defines
|
||||
#define DISEASE_SEVERITY_POSITIVE "Positive" //Diseases that buff, heal, or at least do nothing at all
|
||||
#define DISEASE_SEVERITY_NONTHREAT "Harmless" //Diseases that may have annoying effects, but nothing disruptive (sneezing)
|
||||
#define DISEASE_SEVERITY_MINOR "Minor" //Diseases that can annoy in concrete ways (dizziness)
|
||||
#define DISEASE_SEVERITY_MEDIUM "Medium" //Diseases that can do minor harm, or severe annoyance (vomit)
|
||||
#define DISEASE_SEVERITY_HARMFUL "Harmful" //Diseases that can do significant harm, or severe disruption (brainrot)
|
||||
#define DISEASE_SEVERITY_DANGEROUS "Dangerous" //Diseases that can kill or maim if left untreated (flesh eating, blindness)
|
||||
#define DISEASE_SEVERITY_BIOHAZARD "BIOHAZARD" //Diseases that can quickly kill an unprepared victim (fungal tb, gbs)
|
||||
+60
-68
@@ -1,92 +1,84 @@
|
||||
/*
|
||||
These defines are specific to the atom/flags_1 bitmask
|
||||
*/
|
||||
#define ALL ~0 //For convenience.
|
||||
#define ALL (~0) //For convenience.
|
||||
#define NONE 0
|
||||
|
||||
GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768))
|
||||
|
||||
// for /datum/var/datum_flags
|
||||
#define DF_USE_TAG (1<<0)
|
||||
#define DF_VAR_EDITED (1<<1)
|
||||
#define DF_ISPROCESSING (1<<2)
|
||||
|
||||
//FLAGS BITMASK
|
||||
#define STOPSPRESSUREDMAGE_1 1 //This flag is used on the flags_1 variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere
|
||||
//To successfully stop you taking all pressure damage you must have both a suit and head item with this flag.
|
||||
|
||||
#define NODROP_1 2 // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted.
|
||||
#define NOBLUDGEON_1 4 // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby()
|
||||
#define MASKINTERNALS_1 8 // mask allows internals
|
||||
#define HEAR_1 16 // This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not.
|
||||
#define CHECK_RICOCHET_1 32 // Projectiels will check ricochet on things impacted that have this.
|
||||
#define CONDUCT_1 64 // conducts electricity (metal etc.)
|
||||
#define ABSTRACT_1 128 // for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way
|
||||
#define NODECONSTRUCT_1 128 // For machines and structures that should not break into parts, eg, holodeck stuff
|
||||
#define OVERLAY_QUEUED_1 256 // atom queued to SSoverlay
|
||||
#define ON_BORDER_1 512 // item has priority to check when entering or leaving
|
||||
|
||||
#define NOSLIP_1 1024 //prevents from slipping on wet floors, in space etc
|
||||
#define CLEAN_ON_MOVE_1 2048
|
||||
|
||||
// BLOCK_GAS_SMOKE_EFFECT_1 only used in masks at the moment.
|
||||
#define BLOCK_GAS_SMOKE_EFFECT_1 4096 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY!
|
||||
#define THICKMATERIAL_1 8192 //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body.
|
||||
#define DROPDEL_1 16384 // When dropped, it calls qdel on itself
|
||||
#define PREVENT_CLICK_UNDER_1 32768 //Prevent clicking things below it on the same turf eg. doors/ fulltile windows
|
||||
|
||||
/* Secondary atom flags, for the flags_2 var, denoted with a _2 */
|
||||
|
||||
#define SLOWS_WHILE_IN_HAND_2 1
|
||||
#define NO_EMP_WIRES_2 2
|
||||
#define HOLOGRAM_2 4
|
||||
#define FROZEN_2 8
|
||||
#define STATIONLOVING_2 16
|
||||
#define INFORM_ADMINS_ON_RELOCATE_2 32
|
||||
#define BANG_PROTECT_2 64
|
||||
|
||||
// An item worn in the ear slot with HEALS_EARS will heal your ears each
|
||||
// Life() tick, even if normally your ears would be too damaged to heal.
|
||||
#define HEALS_EARS_2 128
|
||||
|
||||
// A mob with OMNITONGUE has no restriction in the ability to speak
|
||||
// languages that they know. So even if they wouldn't normally be able to
|
||||
// through mob or tongue restrictions, this flag allows them to ignore
|
||||
// those restrictions.
|
||||
#define OMNITONGUE_2 256
|
||||
|
||||
// TESLA_IGNORE grants immunity from being targeted by tesla-style electricity
|
||||
#define TESLA_IGNORE_2 512
|
||||
#define NODROP_1 (1<<1) // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted.
|
||||
#define NOBLUDGEON_1 (1<<2) // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby()
|
||||
#define HEAR_1 (1<<3) // This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not.
|
||||
#define CHECK_RICOCHET_1 (1<<4) // Projectiels will check ricochet on things impacted that have this.
|
||||
#define CONDUCT_1 (1<<5) // conducts electricity (metal etc.)
|
||||
#define ABSTRACT_1 (1<<6) // for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way
|
||||
#define NODECONSTRUCT_1 (1<<7) // For machines and structures that should not break into parts, eg, holodeck stuff
|
||||
#define OVERLAY_QUEUED_1 (1<<8) // atom queued to SSoverlay
|
||||
#define ON_BORDER_1 (1<<9) // item has priority to check when entering or leaving
|
||||
#define DROPDEL_1 (1<<10) // When dropped, it calls qdel on itself
|
||||
#define PREVENT_CLICK_UNDER_1 (1<<11) //Prevent clicking things below it on the same turf eg. doors/ fulltile windows
|
||||
#define HOLOGRAM_1 (1<<12)
|
||||
#define TESLA_IGNORE_1 (1<<13) // TESLA_IGNORE grants immunity from being targeted by tesla-style electricity
|
||||
#define INITIALIZED_1 (1<<14) //Whether /atom/Initialize() has already run for the object
|
||||
#define ADMIN_SPAWNED_1 (1<<15) //was this spawned by an admin? used for stat tracking stuff.
|
||||
|
||||
//turf-only flags
|
||||
#define NOJAUNT_1 1
|
||||
#define UNUSED_TRANSIT_TURF_1 2
|
||||
#define CAN_BE_DIRTY_1 4 // If a turf can be made dirty at roundstart. This is also used in areas.
|
||||
#define NO_DEATHRATTLE_1 16 // Do not notify deadchat about any deaths that occur on this turf.
|
||||
//#define CHECK_RICOCHET_1 32 //Same thing as atom flag.
|
||||
#define NOJAUNT_1 (1<<0)
|
||||
#define UNUSED_TRANSIT_TURF_1 (1<<1)
|
||||
#define CAN_BE_DIRTY_1 (1<<2) // If a turf can be made dirty at roundstart. This is also used in areas.
|
||||
#define NO_DEATHRATTLE_1 (1<<4) // Do not notify deadchat about any deaths that occur on this turf.
|
||||
#define NO_RUINS_1 (1<<5) //Blocks ruins spawning on the turf
|
||||
#define NO_LAVA_GEN_1 (1<<6) //Blocks lava rivers being generated on the turf
|
||||
|
||||
/*
|
||||
These defines are used specifically with the atom/pass_flags bitmask
|
||||
the atom/checkpass() proc uses them (tables will call movable atom checkpass(PASSTABLE) for example)
|
||||
*/
|
||||
//flags for pass_flags
|
||||
#define PASSTABLE 1
|
||||
#define PASSGLASS 2
|
||||
#define PASSGRILLE 4
|
||||
#define PASSBLOB 8
|
||||
#define PASSMOB 16
|
||||
#define LETPASSTHROW 32
|
||||
#define PASSTABLE (1<<0)
|
||||
#define PASSGLASS (1<<1)
|
||||
#define PASSGRILLE (1<<2)
|
||||
#define PASSBLOB (1<<3)
|
||||
#define PASSMOB (1<<4)
|
||||
#define PASSCLOSEDTURF (1<<5)
|
||||
#define LETPASSTHROW (1<<6)
|
||||
|
||||
|
||||
//Movement Types
|
||||
#define IMMOBILE 0
|
||||
#define GROUND 1
|
||||
#define FLYING 2
|
||||
#define GROUND (1<<0)
|
||||
#define FLYING (1<<1)
|
||||
|
||||
// Flags for reagents
|
||||
#define REAGENT_NOREACT 1
|
||||
#define REAGENT_NOREACT (1<<0)
|
||||
|
||||
//Fire and Acid stuff, for resistance_flags
|
||||
#define LAVA_PROOF 1
|
||||
#define FIRE_PROOF 2 //100% immune to fire damage (but not necessarily to lava or heat)
|
||||
#define FLAMMABLE 4
|
||||
#define ON_FIRE 8
|
||||
#define UNACIDABLE 16 //acid can't even appear on it, let alone melt it.
|
||||
#define ACID_PROOF 32 //acid stuck on it doesn't melt it.
|
||||
#define INDESTRUCTIBLE 64 //doesn't take damage
|
||||
#define FREEZE_PROOF 128 //can't be frozen
|
||||
#define LAVA_PROOF (1<<0)
|
||||
#define FIRE_PROOF (1<<1) //100% immune to fire damage (but not necessarily to lava or heat)
|
||||
#define FLAMMABLE (1<<2)
|
||||
#define ON_FIRE (1<<3)
|
||||
#define UNACIDABLE (1<<4) //acid can't even appear on it, let alone melt it.
|
||||
#define ACID_PROOF (1<<5) //acid stuck on it doesn't melt it.
|
||||
#define INDESTRUCTIBLE (1<<6) //doesn't take damage
|
||||
#define FREEZE_PROOF (1<<7) //can't be frozen
|
||||
|
||||
//tesla_zap
|
||||
#define TESLA_MACHINE_EXPLOSIVE (1<<0)
|
||||
#define TESLA_ALLOW_DUPLICATES (1<<1)
|
||||
#define TESLA_OBJ_DAMAGE (1<<2)
|
||||
#define TESLA_MOB_DAMAGE (1<<3)
|
||||
#define TESLA_MOB_STUN (1<<4)
|
||||
|
||||
#define TESLA_DEFAULT_FLAGS ALL
|
||||
|
||||
//EMP protection
|
||||
#define EMP_PROTECT_SELF (1<<0)
|
||||
#define EMP_PROTECT_CONTENTS (1<<1)
|
||||
#define EMP_PROTECT_WIRES (1<<2)
|
||||
|
||||
|
||||
+13
-12
@@ -1,12 +1,13 @@
|
||||
#define MEAT 1
|
||||
#define VEGETABLES 2
|
||||
#define RAW 4
|
||||
#define JUNKFOOD 8
|
||||
#define GRAIN 16
|
||||
#define FRUIT 32
|
||||
#define DAIRY 64
|
||||
#define FRIED 128
|
||||
#define ALCOHOL 256
|
||||
#define SUGAR 512
|
||||
#define GROSS 1024
|
||||
#define TOXIC 2048
|
||||
#define MEAT (1<<0)
|
||||
#define VEGETABLES (1<<1)
|
||||
#define RAW (1<<2)
|
||||
#define JUNKFOOD (1<<3)
|
||||
#define GRAIN (1<<4)
|
||||
#define FRUIT (1<<5)
|
||||
#define DAIRY (1<<6)
|
||||
#define FRIED (1<<7)
|
||||
#define ALCOHOL (1<<8)
|
||||
#define SUGAR (1<<9)
|
||||
#define GROSS (1<<10)
|
||||
#define TOXIC (1<<11)
|
||||
#define PINEAPPLE (1<<12)
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#define IF_HAS_BLOOD_DNA(__thing) GET_COMPONENT_FROM(__FR##__thing, /datum/component/forensics, __thing); if(__FR##__thing && length(__FR##__thing.blood_DNA))
|
||||
#define IF_HAS_BLOOD_DNA_AND(__thing, __conditions...) GET_COMPONENT_FROM(__FR##__thing, /datum/component/forensics, __thing); if(__FR##__thing && length(__FR##__thing.blood_DNA) && (##__conditions))
|
||||
@@ -0,0 +1,48 @@
|
||||
#define IC_INPUT "I"
|
||||
#define IC_OUTPUT "O"
|
||||
#define IC_ACTIVATOR "A"
|
||||
|
||||
// Pin functionality.
|
||||
#define DATA_CHANNEL "data channel"
|
||||
#define PULSE_CHANNEL "pulse channel"
|
||||
|
||||
// Methods of obtaining a circuit.
|
||||
#define IC_SPAWN_DEFAULT 1 // If the circuit comes in the default circuit box and able to be printed in the IC printer.
|
||||
#define IC_SPAWN_RESEARCH 2 // If the circuit design will be available in the IC printer after upgrading it.
|
||||
|
||||
// Categories that help differentiate circuits that can do different tipes of actions
|
||||
#define IC_ACTION_MOVEMENT (1<<0) // If the circuit can move the assembly
|
||||
#define IC_ACTION_COMBAT (1<<1) // If the circuit can cause harm
|
||||
#define IC_ACTION_LONG_RANGE (1<<2) // If the circuit communicate with something outside of the assembly
|
||||
|
||||
// Displayed along with the pin name to show what type of pin it is.
|
||||
#define IC_FORMAT_ANY "\<ANY\>"
|
||||
#define IC_FORMAT_STRING "\<TEXT\>"
|
||||
#define IC_FORMAT_CHAR "\<CHAR\>"
|
||||
#define IC_FORMAT_COLOR "\<COLOR\>"
|
||||
#define IC_FORMAT_NUMBER "\<NUM\>"
|
||||
#define IC_FORMAT_DIR "\<DIR\>"
|
||||
#define IC_FORMAT_BOOLEAN "\<BOOL\>"
|
||||
#define IC_FORMAT_REF "\<REF\>"
|
||||
#define IC_FORMAT_LIST "\<LIST\>"
|
||||
#define IC_FORMAT_INDEX "\<INDEX\>"
|
||||
|
||||
#define IC_FORMAT_PULSE "\<PULSE\>"
|
||||
|
||||
// Used inside input/output list to tell the constructor what pin to make.
|
||||
#define IC_PINTYPE_ANY /datum/integrated_io
|
||||
#define IC_PINTYPE_STRING /datum/integrated_io/string
|
||||
#define IC_PINTYPE_CHAR /datum/integrated_io/char
|
||||
#define IC_PINTYPE_COLOR /datum/integrated_io/color
|
||||
#define IC_PINTYPE_NUMBER /datum/integrated_io/number
|
||||
#define IC_PINTYPE_DIR /datum/integrated_io/dir
|
||||
#define IC_PINTYPE_BOOLEAN /datum/integrated_io/boolean
|
||||
#define IC_PINTYPE_REF /datum/integrated_io/ref
|
||||
#define IC_PINTYPE_LIST /datum/integrated_io/lists
|
||||
#define IC_PINTYPE_INDEX /datum/integrated_io/index
|
||||
|
||||
#define IC_PINTYPE_PULSE_IN /datum/integrated_io/activate
|
||||
#define IC_PINTYPE_PULSE_OUT /datum/integrated_io/activate/out
|
||||
|
||||
// Data limits.
|
||||
#define IC_MAX_LIST_LENGTH 500
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
#define INTERACT_ATOM_REQUIRES_ANCHORED (1<<0) //whether can_interact() checks for anchored. only works on movables.
|
||||
#define INTERACT_ATOM_ATTACK_HAND (1<<1) //calls try_interact() on attack_hand() and returns that.
|
||||
#define INTERACT_ATOM_UI_INTERACT (1<<2) //automatically calls and returns ui_interact() on interact().
|
||||
#define INTERACT_ATOM_REQUIRES_DEXTERITY (1<<3) //user must be dextrous
|
||||
#define INTERACT_ATOM_IGNORE_INCAPACITATED (1<<4) //ignores incapacitated check
|
||||
#define INTERACT_ATOM_IGNORE_RESTRAINED (1<<5) //incapacitated check ignores restrained
|
||||
#define INTERACT_ATOM_CHECK_GRAB (1<<6) //incapacitated check checks grab
|
||||
#define INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND (1<<7) //prevents leaving fingerprints automatically on attack_hand
|
||||
#define INTERACT_ATOM_NO_FINGERPRINT_INTERACT (1<<8) //adds hiddenprints instead of fingerprints on interact
|
||||
|
||||
#define INTERACT_ITEM_ATTACK_HAND_PICKUP (1<<0) //attempt pickup on attack_hand for items
|
||||
|
||||
#define INTERACT_MACHINE_OPEN (1<<0) //can_interact() while open
|
||||
#define INTERACT_MACHINE_OFFLINE (1<<1) //can_interact() while offline
|
||||
#define INTERACT_MACHINE_WIRES_IF_OPEN (1<<2) //try to interact with wires if open
|
||||
#define INTERACT_MACHINE_ALLOW_SILICON (1<<3) //let silicons interact
|
||||
#define INTERACT_MACHINE_OPEN_SILICON (1<<4) //let silicons interact while open
|
||||
#define INTERACT_MACHINE_REQUIRES_SILICON (1<<5) //must be silicon to interact
|
||||
#define INTERACT_MACHINE_SET_MACHINE (1<<6) //MACHINES HAVE THIS BY DEFAULT, SOMEONE SHOULD RUN THROUGH MACHINES AND REMOVE IT FROM THINGS LIKE LIGHT SWITCHES WHEN POSSIBLE!!--------------------------
|
||||
//This flag determines if a machine set_machine's the user when the user uses it, making updateUsrDialog make the user re-call interact() on it.
|
||||
//THIS FLAG IS ON ALL MACHINES BY DEFAULT, NEEDS TO BE RE-EVALUATED LATER!!
|
||||
+170
-116
@@ -14,137 +14,121 @@
|
||||
#define STORAGE_VIEW_DEPTH 2
|
||||
|
||||
//ITEM INVENTORY SLOT BITMASKS
|
||||
#define SLOT_OCLOTHING 1
|
||||
#define SLOT_ICLOTHING 2
|
||||
#define SLOT_GLOVES 4
|
||||
#define SLOT_EYES 8
|
||||
#define SLOT_EARS 16
|
||||
#define SLOT_MASK 32
|
||||
#define SLOT_HEAD 64
|
||||
#define SLOT_FEET 128
|
||||
#define SLOT_ID 256
|
||||
#define SLOT_BELT 512
|
||||
#define SLOT_BACK 1024
|
||||
#define SLOT_POCKET 2048 // this is to allow items with a w_class of WEIGHT_CLASS_NORMAL or WEIGHT_CLASS_BULKY to fit in pockets.
|
||||
#define SLOT_DENYPOCKET 4096 // this is to deny items with a w_class of WEIGHT_CLASS_SMALL or WEIGHT_CLASS_TINY to fit in pockets.
|
||||
#define SLOT_NECK 8192
|
||||
#define ITEM_SLOT_OCLOTHING (1<<0)
|
||||
#define ITEM_SLOT_ICLOTHING (1<<1)
|
||||
#define ITEM_SLOT_GLOVES (1<<2)
|
||||
#define ITEM_SLOT_EYES (1<<3)
|
||||
#define ITEM_SLOT_EARS (1<<4)
|
||||
#define ITEM_SLOT_MASK (1<<5)
|
||||
#define ITEM_SLOT_HEAD (1<<6)
|
||||
#define ITEM_SLOT_FEET (1<<7)
|
||||
#define ITEM_SLOT_ID (1<<8)
|
||||
#define ITEM_SLOT_BELT (1<<9)
|
||||
#define ITEM_SLOT_BACK (1<<10)
|
||||
#define ITEM_SLOT_POCKET (1<<11) // this is to allow items with a w_class of WEIGHT_CLASS_NORMAL or WEIGHT_CLASS_BULKY to fit in pockets.
|
||||
#define ITEM_SLOT_DENYPOCKET (1<<12) // this is to deny items with a w_class of WEIGHT_CLASS_SMALL or WEIGHT_CLASS_TINY to fit in pockets.
|
||||
#define ITEM_SLOT_NECK (1<<13)
|
||||
|
||||
//SLOTS
|
||||
#define slot_back 1
|
||||
#define slot_wear_mask 2
|
||||
#define slot_handcuffed 3
|
||||
#define slot_hands 4 //wherever you provide a slot for hands you provide slot_hands
|
||||
//slot_hands as a slot will pick ANY available hand
|
||||
#define slot_belt 5
|
||||
#define slot_wear_id 6
|
||||
#define slot_ears 7
|
||||
#define slot_glasses 8
|
||||
#define slot_gloves 9
|
||||
#define slot_neck 10
|
||||
#define slot_head 11
|
||||
#define slot_shoes 12
|
||||
#define slot_wear_suit 13
|
||||
#define slot_w_uniform 14
|
||||
#define slot_l_store 15
|
||||
#define slot_r_store 16
|
||||
#define slot_s_store 17
|
||||
#define slot_in_backpack 18
|
||||
#define slot_legcuffed 19
|
||||
#define slot_generic_dextrous_storage 20
|
||||
#define SLOT_BACK 1
|
||||
#define SLOT_WEAR_MASK 2
|
||||
#define SLOT_HANDCUFFED 3
|
||||
#define SLOT_HANDS 4 //wherever you provide a slot for hands you provide SLOT_HANDS
|
||||
//SLOT_HANDS as a slot will pick ANY available hand
|
||||
#define SLOT_BELT 5
|
||||
#define SLOT_WEAR_ID 6
|
||||
#define SLOT_EARS 7
|
||||
#define SLOT_GLASSES 8
|
||||
#define SLOT_GLOVES 9
|
||||
#define SLOT_NECK 10
|
||||
#define SLOT_HEAD 11
|
||||
#define SLOT_SHOES 12
|
||||
#define SLOT_WEAR_SUIT 13
|
||||
#define SLOT_W_UNIFORM 14
|
||||
#define SLOT_L_STORE 15
|
||||
#define SLOT_R_STORE 16
|
||||
#define SLOT_S_STORE 17
|
||||
#define SLOT_IN_BACKPACK 18
|
||||
#define SLOT_LEGCUFFED 19
|
||||
#define SLOT_GENERC_DEXTROUS_STORAGE 20
|
||||
|
||||
#define slots_amt 20 // Keep this up to date!
|
||||
#define SLOTS_AMT 20 // Keep this up to date!
|
||||
|
||||
//I hate that this has to exist
|
||||
/proc/slotdefine2slotbit(slotdefine) //Keep this up to date with the value of SLOT BITMASKS and SLOTS (the two define sections above)
|
||||
. = 0
|
||||
switch(slotdefine)
|
||||
if(slot_back)
|
||||
. = SLOT_BACK
|
||||
if(slot_wear_mask)
|
||||
. = SLOT_MASK
|
||||
if(slot_neck)
|
||||
. = SLOT_NECK
|
||||
if(slot_belt)
|
||||
. = SLOT_BELT
|
||||
if(slot_wear_id)
|
||||
. = SLOT_ID
|
||||
if(slot_ears)
|
||||
. = SLOT_EARS
|
||||
if(slot_glasses)
|
||||
. = SLOT_EYES
|
||||
if(slot_gloves)
|
||||
. = SLOT_GLOVES
|
||||
if(slot_head)
|
||||
. = SLOT_HEAD
|
||||
if(slot_shoes)
|
||||
. = SLOT_FEET
|
||||
if(slot_wear_suit)
|
||||
. = SLOT_OCLOTHING
|
||||
if(slot_w_uniform)
|
||||
. = SLOT_ICLOTHING
|
||||
if(slot_l_store, slot_r_store)
|
||||
. = SLOT_POCKET
|
||||
if(SLOT_BACK)
|
||||
. = ITEM_SLOT_BACK
|
||||
if(SLOT_WEAR_MASK)
|
||||
. = ITEM_SLOT_MASK
|
||||
if(SLOT_NECK)
|
||||
. = ITEM_SLOT_NECK
|
||||
if(SLOT_BELT)
|
||||
. = ITEM_SLOT_BELT
|
||||
if(SLOT_WEAR_ID)
|
||||
. = ITEM_SLOT_ID
|
||||
if(SLOT_EARS)
|
||||
. = ITEM_SLOT_EARS
|
||||
if(SLOT_GLASSES)
|
||||
. = ITEM_SLOT_EYES
|
||||
if(SLOT_GLOVES)
|
||||
. = ITEM_SLOT_GLOVES
|
||||
if(SLOT_HEAD)
|
||||
. = ITEM_SLOT_HEAD
|
||||
if(SLOT_SHOES)
|
||||
. = ITEM_SLOT_FEET
|
||||
if(SLOT_WEAR_SUIT)
|
||||
. = ITEM_SLOT_OCLOTHING
|
||||
if(SLOT_W_UNIFORM)
|
||||
. = ITEM_SLOT_ICLOTHING
|
||||
if(SLOT_L_STORE, SLOT_R_STORE)
|
||||
. = ITEM_SLOT_POCKET
|
||||
|
||||
|
||||
//Bit flags_1 for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses.
|
||||
#define HIDEGLOVES 1
|
||||
#define HIDESUITSTORAGE 2
|
||||
#define HIDEJUMPSUIT 4 //these first four are only used in exterior suits
|
||||
#define HIDESHOES 8
|
||||
#define HIDEMASK 16 //these last six are only used in masks and headgear.
|
||||
#define HIDEEARS 32 // (ears means headsets and such)
|
||||
#define HIDEEYES 64 // Whether eyes and glasses are hidden
|
||||
#define HIDEFACE 128 // Whether we appear as unknown.
|
||||
#define HIDEHAIR 256
|
||||
#define HIDEFACIALHAIR 512
|
||||
#define HIDENECK 1024
|
||||
//Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses.
|
||||
#define HIDEGLOVES (1<<0)
|
||||
#define HIDESUITSTORAGE (1<<1)
|
||||
#define HIDEJUMPSUIT (1<<2) //these first four are only used in exterior suits
|
||||
#define HIDESHOES (1<<3)
|
||||
#define HIDEMASK (1<<4) //these last six are only used in masks and headgear.
|
||||
#define HIDEEARS (1<<5) // (ears means headsets and such)
|
||||
#define HIDEEYES (1<<6) // Whether eyes and glasses are hidden
|
||||
#define HIDEFACE (1<<7) // Whether we appear as unknown.
|
||||
#define HIDEHAIR (1<<8)
|
||||
#define HIDEFACIALHAIR (1<<9)
|
||||
#define HIDENECK (1<<10)
|
||||
|
||||
//bitflags for clothing coverage - also used for limbs
|
||||
#define HEAD 1
|
||||
#define CHEST 2
|
||||
#define GROIN 4
|
||||
#define LEG_LEFT 8
|
||||
#define LEG_RIGHT 16
|
||||
#define LEGS 24
|
||||
#define FOOT_LEFT 32
|
||||
#define FOOT_RIGHT 64
|
||||
#define FEET 96
|
||||
#define ARM_LEFT 128
|
||||
#define ARM_RIGHT 256
|
||||
#define ARMS 384
|
||||
#define HAND_LEFT 512
|
||||
#define HAND_RIGHT 1024
|
||||
#define HANDS 1536
|
||||
#define NECK 2048
|
||||
#define FULL_BODY 4095
|
||||
#define HEAD (1<<0)
|
||||
#define CHEST (1<<1)
|
||||
#define GROIN (1<<2)
|
||||
#define LEG_LEFT (1<<3)
|
||||
#define LEG_RIGHT (1<<4)
|
||||
#define LEGS (LEG_LEFT | LEG_RIGHT)
|
||||
#define FOOT_LEFT (1<<5)
|
||||
#define FOOT_RIGHT (1<<6)
|
||||
#define FEET (FOOT_LEFT | FOOT_RIGHT)
|
||||
#define ARM_LEFT (1<<7)
|
||||
#define ARM_RIGHT (1<<8)
|
||||
#define ARMS (ARM_LEFT | ARM_RIGHT)
|
||||
#define HAND_LEFT (1<<9)
|
||||
#define HAND_RIGHT (1<<10)
|
||||
#define HANDS (HAND_LEFT | HAND_RIGHT)
|
||||
#define NECK (1<<11)
|
||||
#define FULL_BODY (~0)
|
||||
|
||||
// bitflags for the percentual amount of protection a piece of clothing which covers the body part offers.
|
||||
// Used with human/proc/get_heat_protection() and human/proc/get_cold_protection()
|
||||
// The values here should add up to 1.
|
||||
// Hands and feet have 2.5%, arms and legs 7.5%, each of the torso parts has 15% and the head has 30%
|
||||
#define THERMAL_PROTECTION_HEAD 0.3
|
||||
#define THERMAL_PROTECTION_CHEST 0.15
|
||||
#define THERMAL_PROTECTION_GROIN 0.15
|
||||
#define THERMAL_PROTECTION_LEG_LEFT 0.075
|
||||
#define THERMAL_PROTECTION_LEG_RIGHT 0.075
|
||||
#define THERMAL_PROTECTION_FOOT_LEFT 0.025
|
||||
#define THERMAL_PROTECTION_FOOT_RIGHT 0.025
|
||||
#define THERMAL_PROTECTION_ARM_LEFT 0.075
|
||||
#define THERMAL_PROTECTION_ARM_RIGHT 0.075
|
||||
#define THERMAL_PROTECTION_HAND_LEFT 0.025
|
||||
#define THERMAL_PROTECTION_HAND_RIGHT 0.025
|
||||
|
||||
//flags_1 for female outfits: How much the game can safely "take off" the uniform without it looking weird
|
||||
//flags for female outfits: How much the game can safely "take off" the uniform without it looking weird
|
||||
#define NO_FEMALE_UNIFORM 0
|
||||
#define FEMALE_UNIFORM_FULL 1
|
||||
#define FEMALE_UNIFORM_TOP 2
|
||||
|
||||
//flags_1 for alternate styles: These are hard sprited so don't set this if you didn't put the effort in
|
||||
//flags for alternate styles: These are hard sprited so don't set this if you didn't put the effort in
|
||||
#define NORMAL_STYLE 0
|
||||
#define ALT_STYLE 1
|
||||
#define DIGITIGRADE_STYLE 2
|
||||
|
||||
//flags_1 for outfits that have mutantrace variants (try not to use this): Currently only needed if you're trying to add tight fitting bootyshorts
|
||||
//flags for outfits that have mutantrace variants (try not to use this): Currently only needed if you're trying to add tight fitting bootyshorts
|
||||
#define NO_MUTANTRACE_VARIATION 0
|
||||
#define MUTANTRACE_VARIATION 1
|
||||
|
||||
@@ -152,12 +136,82 @@
|
||||
#define FULL_DIGITIGRADE 1
|
||||
#define SQUISHED_DIGITIGRADE 2
|
||||
|
||||
//flags_1 for covering body parts
|
||||
#define GLASSESCOVERSEYES 1
|
||||
#define MASKCOVERSEYES 2 // get rid of some of the other retardation in these flags_1
|
||||
#define HEADCOVERSEYES 4 // feel free to realloc these numbers for other purposes
|
||||
#define MASKCOVERSMOUTH 8 // on other items, these are just for mask/head
|
||||
#define HEADCOVERSMOUTH 16
|
||||
//flags for covering body parts
|
||||
#define GLASSESCOVERSEYES (1<<0)
|
||||
#define MASKCOVERSEYES (1<<1) // get rid of some of the other retardation in these flags
|
||||
#define HEADCOVERSEYES (1<<2) // feel free to realloc these numbers for other purposes
|
||||
#define MASKCOVERSMOUTH (1<<3) // on other items, these are just for mask/head
|
||||
#define HEADCOVERSMOUTH (1<<4)
|
||||
|
||||
#define TINT_DARKENED 2 //Threshold of tint level to apply weld mask overlay
|
||||
#define TINT_BLIND 3 //Threshold of tint level to obscure vision fully
|
||||
|
||||
//Allowed equipment lists for security vests and hardsuits.
|
||||
|
||||
GLOBAL_LIST_INIT(advanced_hardsuit_allowed, typecacheof(list(
|
||||
/obj/item/ammo_box,
|
||||
/obj/item/ammo_casing,
|
||||
/obj/item/flashlight,
|
||||
/obj/item/gun,
|
||||
/obj/item/melee/baton,
|
||||
/obj/item/reagent_containers/spray/pepper,
|
||||
/obj/item/restraints/handcuffs,
|
||||
/obj/item/tank/internals)))
|
||||
|
||||
GLOBAL_LIST_INIT(security_hardsuit_allowed, typecacheof(list(
|
||||
/obj/item/ammo_box,
|
||||
/obj/item/ammo_casing,
|
||||
/obj/item/flashlight,
|
||||
/obj/item/gun/ballistic,
|
||||
/obj/item/gun/energy,
|
||||
/obj/item/melee/baton,
|
||||
/obj/item/reagent_containers/spray/pepper,
|
||||
/obj/item/restraints/handcuffs,
|
||||
/obj/item/tank/internals)))
|
||||
|
||||
GLOBAL_LIST_INIT(detective_vest_allowed, typecacheof(list(
|
||||
/obj/item/ammo_box,
|
||||
/obj/item/ammo_casing,
|
||||
/obj/item/detective_scanner,
|
||||
/obj/item/flashlight,
|
||||
/obj/item/taperecorder,
|
||||
/obj/item/gun/ballistic,
|
||||
/obj/item/gun/energy,
|
||||
/obj/item/lighter,
|
||||
/obj/item/melee/baton,
|
||||
/obj/item/melee/classic_baton,
|
||||
/obj/item/reagent_containers/spray/pepper,
|
||||
/obj/item/restraints/handcuffs,
|
||||
/obj/item/storage/fancy/cigarettes,
|
||||
/obj/item/tank/internals/emergency_oxygen,
|
||||
/obj/item/tank/internals/plasmaman)))
|
||||
|
||||
GLOBAL_LIST_INIT(security_vest_allowed, typecacheof(list(
|
||||
/obj/item/ammo_box,
|
||||
/obj/item/ammo_casing,
|
||||
/obj/item/flashlight,
|
||||
/obj/item/gun/ballistic,
|
||||
/obj/item/gun/energy,
|
||||
/obj/item/kitchen/knife/combat,
|
||||
/obj/item/melee/baton,
|
||||
/obj/item/melee/classic_baton/telescopic,
|
||||
/obj/item/reagent_containers/spray/pepper,
|
||||
/obj/item/restraints/handcuffs,
|
||||
/obj/item/tank/internals/emergency_oxygen,
|
||||
/obj/item/tank/internals/plasmaman)))
|
||||
|
||||
GLOBAL_LIST_INIT(security_wintercoat_allowed, typecacheof(list(
|
||||
/obj/item/ammo_box,
|
||||
/obj/item/ammo_casing,
|
||||
/obj/item/flashlight,
|
||||
/obj/item/storage/fancy/cigarettes,
|
||||
/obj/item/gun/ballistic,
|
||||
/obj/item/gun/energy,
|
||||
/obj/item/lighter,
|
||||
/obj/item/melee/baton,
|
||||
/obj/item/melee/classic_baton/telescopic,
|
||||
/obj/item/reagent_containers/spray/pepper,
|
||||
/obj/item/restraints/handcuffs,
|
||||
/obj/item/tank/internals/emergency_oxygen,
|
||||
/obj/item/tank/internals/plasmaman,
|
||||
/obj/item/toy)))
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
// simple is_type and similar inline helpers
|
||||
|
||||
#define isdatum(D) (istype(D, /datum))
|
||||
|
||||
#define islist(L) (istype(L, /list))
|
||||
|
||||
#define in_range(source, user) (get_dist(source, user) <= 1)
|
||||
#define in_range(source, user) (get_dist(source, user) <= 1 && (get_step(source, 0)?:z) == (get_step(user, 0)?:z))
|
||||
|
||||
#define ismovableatom(A) (istype(A, /atom/movable))
|
||||
|
||||
#define isatom(A) (isloc(A))
|
||||
|
||||
#define isweakref(D) (istype(D, /datum/weakref))
|
||||
|
||||
//Turfs
|
||||
//#define isturf(A) (istype(A, /turf)) This is actually a byond built-in. Added here for completeness sake.
|
||||
|
||||
#define isopenturf(A) (istype(A, /turf/open))
|
||||
|
||||
#define isindestructiblefloor(A) (istype(A, /turf/open/indestructible))
|
||||
@@ -27,6 +31,8 @@
|
||||
|
||||
#define islava(A) (istype(A, /turf/open/lava))
|
||||
|
||||
#define ischasm(A) (istype(A, /turf/open/chasm))
|
||||
|
||||
#define isplatingturf(A) (istype(A, /turf/open/floor/plating))
|
||||
|
||||
//Mobs
|
||||
@@ -46,11 +52,15 @@
|
||||
#define isplasmaman(A) (is_species(A, /datum/species/plasmaman))
|
||||
#define ispodperson(A) (is_species(A, /datum/species/podperson))
|
||||
#define isflyperson(A) (is_species(A, /datum/species/fly))
|
||||
#define isjellyperson(A) (is_species(A, /datum/species/jelly))
|
||||
#define isslimeperson(A) (is_species(A, /datum/species/jelly/slime))
|
||||
#define isshadowperson(A) (is_species(A, /datum/species/shadow))
|
||||
#define isluminescent(A) (is_species(A, /datum/species/jelly/luminescent))
|
||||
#define iszombie(A) (is_species(A, /datum/species/zombie))
|
||||
#define ishumanbasic(A) (is_species(A, /datum/species/human))
|
||||
|
||||
//why arent catpeople a subspecies
|
||||
#define iscatperson(A) (ishumanbasic(A) && ( A.dna.features["ears"] == "Cat" || A.dna.features["tail_human"] == "Cat") )
|
||||
|
||||
//more carbon mobs
|
||||
#define ismonkey(A) (istype(A, /mob/living/carbon/monkey))
|
||||
|
||||
@@ -73,6 +83,8 @@
|
||||
//Silicon mobs
|
||||
#define issilicon(A) (istype(A, /mob/living/silicon))
|
||||
|
||||
#define issiliconoradminghost(A) (istype(A, /mob/living/silicon) || IsAdminGhost(A))
|
||||
|
||||
#define iscyborg(A) (istype(A, /mob/living/silicon/robot))
|
||||
|
||||
#define isAI(A) (istype(A, /mob/living/silicon/ai))
|
||||
@@ -84,12 +96,8 @@
|
||||
|
||||
#define isrevenant(A) (istype(A, /mob/living/simple_animal/revenant))
|
||||
|
||||
#define isborer(A) (istype(A, /mob/living/simple_animal/borer))
|
||||
|
||||
#define isbot(A) (istype(A, /mob/living/simple_animal/bot))
|
||||
|
||||
#define iscrab(A) (istype(A, /mob/living/simple_animal/crab))
|
||||
|
||||
#define isshade(A) (istype(A, /mob/living/simple_animal/shade))
|
||||
|
||||
#define ismouse(A) (istype(A, /mob/living/simple_animal/mouse))
|
||||
@@ -100,16 +108,10 @@
|
||||
|
||||
#define iscat(A) (istype(A, /mob/living/simple_animal/pet/cat))
|
||||
|
||||
#define isdog(A) (istype(A, /mob/living/simple_animal/pet/dog))
|
||||
|
||||
#define iscorgi(A) (istype(A, /mob/living/simple_animal/pet/dog/corgi))
|
||||
|
||||
#define ishostile(A) (istype(A, /mob/living/simple_animal/hostile))
|
||||
|
||||
#define isbear(A) (istype(A, /mob/living/simple_animal/hostile/bear))
|
||||
|
||||
#define iscarp(A) (istype(A, /mob/living/simple_animal/hostile/carp))
|
||||
|
||||
#define isswarmer(A) (istype(A, /mob/living/simple_animal/hostile/swarmer))
|
||||
|
||||
#define isguardian(A) (istype(A, /mob/living/simple_animal/hostile/guardian))
|
||||
@@ -131,11 +133,21 @@
|
||||
|
||||
#define isovermind(A) (istype(A, /mob/camera/blob))
|
||||
|
||||
#define iscameramob(A) (istype(A, /mob/camera))
|
||||
|
||||
#define iseminence(A) (istype(A, /mob/camera/eminence))
|
||||
|
||||
//Objects
|
||||
#define isobj(A) istype(A, /obj) //override the byond proc because it returns true on children of /atom/movable that aren't objs
|
||||
|
||||
#define isitem(A) (istype(A, /obj/item))
|
||||
|
||||
#define isstructure(A) (istype(A, /obj/structure))
|
||||
|
||||
#define ismachinery(A) (istype(A, /obj/machinery))
|
||||
|
||||
#define ismecha(A) (istype(A, /obj/mecha))
|
||||
|
||||
#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune)) //if something is cleanable
|
||||
|
||||
#define isorgan(A) (istype(A, /obj/item/organ))
|
||||
@@ -151,22 +163,26 @@ GLOBAL_LIST_INIT(pointed_types, typecacheof(list(
|
||||
#define isbodypart(A) (istype(A, /obj/item/bodypart))
|
||||
|
||||
//Assemblies
|
||||
#define isassembly(O) (istype(O, /obj/item/device/assembly))
|
||||
#define isassembly(O) (istype(O, /obj/item/assembly))
|
||||
|
||||
#define isigniter(O) (istype(O, /obj/item/device/assembly/igniter))
|
||||
#define isigniter(O) (istype(O, /obj/item/assembly/igniter))
|
||||
|
||||
#define isinfared(O) (istype(O, /obj/item/device/assembly/infra))
|
||||
#define isprox(O) (istype(O, /obj/item/assembly/prox_sensor))
|
||||
|
||||
#define isprox(O) (istype(O, /obj/item/device/assembly/prox_sensor))
|
||||
|
||||
#define issignaler(O) (istype(O, /obj/item/device/assembly/signaler))
|
||||
|
||||
#define istimer(O) (istype(O, /obj/item/device/assembly/timer))
|
||||
#define issignaler(O) (istype(O, /obj/item/assembly/signaler))
|
||||
|
||||
GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list(
|
||||
/obj/item/stack/sheet/glass,
|
||||
/obj/item/stack/sheet/rglass,
|
||||
/obj/item/stack/sheet/plasmaglass,
|
||||
/obj/item/stack/sheet/plasmarglass)))
|
||||
/obj/item/stack/sheet/glass,
|
||||
/obj/item/stack/sheet/rglass,
|
||||
/obj/item/stack/sheet/plasmaglass,
|
||||
/obj/item/stack/sheet/plasmarglass,
|
||||
/obj/item/stack/sheet/titaniumglass,
|
||||
/obj/item/stack/sheet/plastitaniumglass)))
|
||||
|
||||
#define is_glass_sheet(O) (is_type_in_typecache(O, GLOB.glass_sheet_types))
|
||||
|
||||
#define iseffect(O) (istype(O, /obj/effect))
|
||||
|
||||
#define isblobmonster(O) (istype(O, /mob/living/simple_animal/hostile/blob))
|
||||
|
||||
#define isshuttleturf(T) (length(T.baseturfs) && (/turf/baseturf_skipover/shuttle in T.baseturfs))
|
||||
|
||||
+26
-19
@@ -4,40 +4,47 @@
|
||||
#define CAPTAIN (1<<0)
|
||||
#define HOS (1<<1)
|
||||
#define WARDEN (1<<2)
|
||||
#define DETECTIVE (1<<3)
|
||||
#define DETECTIVE (1<<3)
|
||||
#define OFFICER (1<<4)
|
||||
#define CHIEF (1<<5)
|
||||
#define ENGINEER (1<<6)
|
||||
#define ATMOSTECH (1<<7)
|
||||
#define CHIEF (1<<5)
|
||||
#define ENGINEER (1<<6)
|
||||
#define ATMOSTECH (1<<7)
|
||||
#define ROBOTICIST (1<<8)
|
||||
#define AI_JF (1<<9)
|
||||
#define AI_JF (1<<9)
|
||||
#define CYBORG (1<<10)
|
||||
|
||||
|
||||
#define MEDSCI (1<<1)
|
||||
|
||||
#define RD_JF (1<<0)
|
||||
#define SCIENTIST (1<<1)
|
||||
#define RD_JF (1<<0)
|
||||
#define SCIENTIST (1<<1)
|
||||
#define CHEMIST (1<<2)
|
||||
#define CMO_JF (1<<3)
|
||||
#define CMO_JF (1<<3)
|
||||
#define DOCTOR (1<<4)
|
||||
#define GENETICIST (1<<5)
|
||||
#define VIROLOGIST (1<<6)
|
||||
|
||||
|
||||
#define CIVILIAN (1<<2)
|
||||
#define CIVILIAN (1<<2)
|
||||
|
||||
#define HOP (1<<0)
|
||||
#define BARTENDER (1<<1)
|
||||
#define BOTANIST (1<<2)
|
||||
#define COOK (1<<3)
|
||||
#define BARTENDER (1<<1)
|
||||
#define BOTANIST (1<<2)
|
||||
#define COOK (1<<3)
|
||||
#define JANITOR (1<<4)
|
||||
#define CURATOR (1<<5)
|
||||
#define QUARTERMASTER (1<<6)
|
||||
#define CARGOTECH (1<<7)
|
||||
#define MINER (1<<8)
|
||||
#define QUARTERMASTER (1<<6)
|
||||
#define CARGOTECH (1<<7)
|
||||
#define MINER (1<<8)
|
||||
#define LAWYER (1<<9)
|
||||
#define CHAPLAIN (1<<10)
|
||||
#define CLOWN (1<<11)
|
||||
#define MIME (1<<12)
|
||||
#define ASSISTANT (1<<13)
|
||||
#define CHAPLAIN (1<<10)
|
||||
#define CLOWN (1<<11)
|
||||
#define MIME (1<<12)
|
||||
#define ASSISTANT (1<<13)
|
||||
|
||||
#define JOB_AVAILABLE 0
|
||||
#define JOB_UNAVAILABLE_GENERIC 1
|
||||
#define JOB_UNAVAILABLE_BANNED 2
|
||||
#define JOB_UNAVAILABLE_PLAYTIME 3
|
||||
#define JOB_UNAVAILABLE_ACCOUNTAGE 4
|
||||
#define JOB_UNAVAILABLE_SLOTFULL 5
|
||||
|
||||
@@ -6,12 +6,18 @@
|
||||
#define PLANE_SPACE -95
|
||||
#define PLANE_SPACE_PARALLAX -90
|
||||
|
||||
#define GAME_PLANE 0
|
||||
#define FLOOR_PLANE -2
|
||||
#define GAME_PLANE -1
|
||||
#define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals
|
||||
#define SPACE_LAYER 1.8
|
||||
//#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define
|
||||
#define MID_TURF_LAYER 2.02
|
||||
#define HIGH_TURF_LAYER 2.03
|
||||
#define TURF_PLATING_DECAL_LAYER 2.031
|
||||
#define TURF_DECAL_LAYER 2.039 //Makes turf decals appear in DM how they will look inworld.
|
||||
#define ABOVE_OPEN_TURF_LAYER 2.04
|
||||
#define CLOSED_TURF_LAYER 2.05
|
||||
#define BULLET_HOLE_LAYER 2.06
|
||||
#define ABOVE_NORMAL_TURF_LAYER 2.08
|
||||
#define LATTICE_LAYER 2.2
|
||||
#define DISPOSAL_PIPE_LAYER 2.3
|
||||
@@ -28,14 +34,18 @@
|
||||
#define HIGH_SIGIL_LAYER 2.56
|
||||
|
||||
#define BELOW_OPEN_DOOR_LAYER 2.6
|
||||
#define BLASTDOOR_LAYER 2.65
|
||||
#define OPEN_DOOR_LAYER 2.7
|
||||
#define DOOR_HELPER_LAYER 2.71 //keep this above OPEN_DOOR_LAYER
|
||||
#define PROJECTILE_HIT_THRESHHOLD_LAYER 2.75 //projectiles won't hit objects at or below this layer if possible
|
||||
#define TABLE_LAYER 2.8
|
||||
#define BELOW_OBJ_LAYER 2.9
|
||||
#define LOW_ITEM_LAYER 2.95
|
||||
//#define OBJ_LAYER 3 //For easy recordkeeping; this is a byond define
|
||||
#define CLOSED_BLASTDOOR_LAYER 3.05
|
||||
#define CLOSED_DOOR_LAYER 3.1
|
||||
#define CLOSED_FIREDOOR_LAYER 3.11
|
||||
#define SHUTTER_LAYER 3.12 // HERE BE DRAGONS
|
||||
#define ABOVE_OBJ_LAYER 3.2
|
||||
#define ABOVE_WINDOW_LAYER 3.3
|
||||
#define SIGN_LAYER 3.4
|
||||
@@ -55,9 +65,13 @@
|
||||
#define SPACEVINE_LAYER 4.8
|
||||
#define SPACEVINE_MOB_LAYER 4.9
|
||||
//#define FLY_LAYER 5 //For easy recordkeeping; this is a byond define
|
||||
#define GASFIRE_LAYER 5.05
|
||||
#define RIPPLE_LAYER 5.1
|
||||
|
||||
#define GHOST_LAYER 6
|
||||
#define LOW_LANDMARK_LAYER 9
|
||||
#define MID_LANDMARK_LAYER 9.1
|
||||
#define HIGH_LANDMARK_LAYER 9.2
|
||||
#define AREA_LAYER 10
|
||||
#define MASSIVE_OBJ_LAYER 11
|
||||
#define POINT_LAYER 12
|
||||
@@ -65,6 +79,12 @@
|
||||
#define LIGHTING_PLANE 15
|
||||
#define LIGHTING_LAYER 15
|
||||
|
||||
#define ABOVE_LIGHTING_PLANE 16
|
||||
#define ABOVE_LIGHTING_LAYER 16
|
||||
|
||||
#define BYOND_LIGHTING_PLANE 17
|
||||
#define BYOND_LIGHTING_LAYER 17
|
||||
|
||||
//HUD layer defines
|
||||
|
||||
#define FULLSCREEN_PLANE 18
|
||||
@@ -81,4 +101,4 @@
|
||||
#define ABOVE_HUD_LAYER 20
|
||||
|
||||
#define SPLASHSCREEN_LAYER 21
|
||||
#define SPLASHSCREEN_PLANE 21
|
||||
#define SPLASHSCREEN_PLANE 21
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#define LIGHTING_FALLOFF 1 // type of falloff to use for lighting; 1 for circular, 2 for square
|
||||
#define LIGHTING_LAMBERTIAN 0 // use lambertian shading for light sources
|
||||
#define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
|
||||
#define LIGHTING_ROUND_VALUE 1 / 64 //Value used to round lumcounts, values smaller than 1/129 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY.
|
||||
#define LIGHTING_ROUND_VALUE (1 / 64) //Value used to round lumcounts, values smaller than 1/129 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY.
|
||||
|
||||
#define LIGHTING_ICON 'icons/effects/lighting_object.dmi' // icon used for lighting shading effects
|
||||
|
||||
@@ -23,27 +23,6 @@
|
||||
0, 0, 0, 1 \
|
||||
) \
|
||||
|
||||
// Helpers so we can (more easily) control the colour matrices.
|
||||
#define CL_MATRIX_RR 1
|
||||
#define CL_MATRIX_RG 2
|
||||
#define CL_MATRIX_RB 3
|
||||
#define CL_MATRIX_RA 4
|
||||
#define CL_MATRIX_GR 5
|
||||
#define CL_MATRIX_GG 6
|
||||
#define CL_MATRIX_GB 7
|
||||
#define CL_MATRIX_GA 8
|
||||
#define CL_MATRIX_BR 9
|
||||
#define CL_MATRIX_BG 10
|
||||
#define CL_MATRIX_BB 11
|
||||
#define CL_MATRIX_BA 12
|
||||
#define CL_MATRIX_AR 13
|
||||
#define CL_MATRIX_AG 14
|
||||
#define CL_MATRIX_AB 15
|
||||
#define CL_MATRIX_AA 16
|
||||
#define CL_MATRIX_CR 17
|
||||
#define CL_MATRIX_CG 18
|
||||
#define CL_MATRIX_CB 19
|
||||
#define CL_MATRIX_CA 20
|
||||
|
||||
//Some defines to generalise colours used in lighting.
|
||||
//Important note on colors. Colors can end up significantly different from the basic html picture, especially when saturated
|
||||
@@ -70,7 +49,10 @@
|
||||
#define LIGHT_COLOR_TUNGSTEN "#FAE1AF" //Extremely diluted yellow, close to skin color (for some reason). rgb(250, 225, 175)
|
||||
#define LIGHT_COLOR_HALOGEN "#F0FAFA" //Barely visible cyan-ish hue, as the doctor prescribed. rgb(240, 250, 250)
|
||||
|
||||
#define LIGHT_RANGE_FIRE 3 //How many tiles standard fires glow.
|
||||
|
||||
#define LIGHTING_PLANE_ALPHA_VISIBLE 255
|
||||
#define LIGHTING_PLANE_ALPHA_NV_TRAIT 245
|
||||
#define LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE 192
|
||||
#define LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE 128 //For lighting alpha, small amounts lead to big changes. even at 128 its hard to figure out what is dark and what is light, at 64 you almost can't even tell.
|
||||
#define LIGHTING_PLANE_ALPHA_INVISIBLE 0
|
||||
@@ -87,4 +69,4 @@
|
||||
#define LIGHTING_NO_UPDATE 0
|
||||
#define LIGHTING_VIS_UPDATE 1
|
||||
#define LIGHTING_CHECK_UPDATE 2
|
||||
#define LIGHTING_FORCE_UPDATE 3
|
||||
#define LIGHTING_FORCE_UPDATE 3
|
||||
|
||||
+22
-16
@@ -1,20 +1,26 @@
|
||||
//Investigate logging defines
|
||||
#define INVESTIGATE_ATMOS "atmos"
|
||||
#define INVESTIGATE_BOTANY "botany"
|
||||
#define INVESTIGATE_CARGO "cargo"
|
||||
#define INVESTIGATE_EXPERIMENTOR "experimentor"
|
||||
#define INVESTIGATE_GRAVITY "gravity"
|
||||
#define INVESTIGATE_RECORDS "records"
|
||||
#define INVESTIGATE_SINGULO "singulo"
|
||||
#define INVESTIGATE_SUPERMATTER "supermatter"
|
||||
#define INVESTIGATE_TELESCI "telesci"
|
||||
#define INVESTIGATE_WIRES "wires"
|
||||
#define INVESTIGATE_ATMOS "atmos"
|
||||
#define INVESTIGATE_BOTANY "botany"
|
||||
#define INVESTIGATE_CARGO "cargo"
|
||||
#define INVESTIGATE_EXPERIMENTOR "experimentor"
|
||||
#define INVESTIGATE_GRAVITY "gravity"
|
||||
#define INVESTIGATE_RECORDS "records"
|
||||
#define INVESTIGATE_SINGULO "singulo"
|
||||
#define INVESTIGATE_SUPERMATTER "supermatter"
|
||||
#define INVESTIGATE_TELESCI "telesci"
|
||||
#define INVESTIGATE_WIRES "wires"
|
||||
#define INVESTIGATE_PORTAL "portals"
|
||||
#define INVESTIGATE_HALLUCINATIONS "hallucinations"
|
||||
#define INVESTIGATE_RESEARCH "research"
|
||||
#define INVESTIGATE_HALLUCINATIONS "hallucinations"
|
||||
#define INVESTIGATE_RADIATION "radiation"
|
||||
#define INVESTIGATE_EXONET "exonet"
|
||||
|
||||
//Individual logging defines
|
||||
#define INDIVIDUAL_ATTACK_LOG "Attack log"
|
||||
#define INDIVIDUAL_SAY_LOG "Say log"
|
||||
#define INDIVIDUAL_EMOTE_LOG "Emote log"
|
||||
#define INDIVIDUAL_OOC_LOG "OOC log"
|
||||
#define INDIVIDUAL_SHOW_ALL_LOG "All logs"
|
||||
#define INDIVIDUAL_ATTACK_LOG "Attack log"
|
||||
#define INDIVIDUAL_SAY_LOG "Say log"
|
||||
#define INDIVIDUAL_EMOTE_LOG "Emote log"
|
||||
#define INDIVIDUAL_OOC_LOG "OOC log"
|
||||
#define INDIVIDUAL_OWNERSHIP_LOG "Ownership log"
|
||||
#define INDIVIDUAL_SHOW_ALL_LOG "All logs"
|
||||
#define LOGSRC_CLIENT "Client"
|
||||
#define LOGSRC_MOB "Mob"
|
||||
|
||||
+31
-17
@@ -14,21 +14,22 @@
|
||||
|
||||
|
||||
//bitflags for door switches.
|
||||
#define OPEN 1
|
||||
#define IDSCAN 2
|
||||
#define BOLTS 4
|
||||
#define SHOCK 8
|
||||
#define SAFE 16
|
||||
#define OPEN (1<<0)
|
||||
#define IDSCAN (1<<1)
|
||||
#define BOLTS (1<<2)
|
||||
#define SHOCK (1<<3)
|
||||
#define SAFE (1<<4)
|
||||
|
||||
//used in design to specify which machine can build it
|
||||
#define IMPRINTER 1 //For circuits. Uses glass/chemicals.
|
||||
#define PROTOLATHE 2 //New stuff. Uses glass/metal/chemicals
|
||||
#define AUTOLATHE 4 //Uses glass/metal only.
|
||||
#define CRAFTLATHE 8 //Uses fuck if I know. For use eventually.
|
||||
#define MECHFAB 16 //Remember, objects utilising this flag should have construction_time and construction_cost vars.
|
||||
#define BIOGENERATOR 32 //Uses biomass
|
||||
#define LIMBGROWER 64 //Uses synthetic flesh
|
||||
#define SMELTER 128 //uses various minerals
|
||||
#define IMPRINTER (1<<0) //For circuits. Uses glass/chemicals.
|
||||
#define PROTOLATHE (1<<1) //New stuff. Uses glass/metal/chemicals
|
||||
#define AUTOLATHE (1<<2) //Uses glass/metal only.
|
||||
#define CRAFTLATHE (1<<3) //Uses fuck if I know. For use eventually.
|
||||
#define MECHFAB (1<<4) //Remember, objects utilising this flag should have construction_time and construction_cost vars.
|
||||
#define BIOGENERATOR (1<<5) //Uses biomass
|
||||
#define LIMBGROWER (1<<6) //Uses synthetic flesh
|
||||
#define SMELTER (1<<7) //uses various minerals
|
||||
#define AUTOYLATHE (1<<8) // CITADEL ADD
|
||||
//Note: More then one of these can be added to a design but imprinter and lathe designs are incompatable.
|
||||
|
||||
//Modular computer/NTNet defines
|
||||
@@ -61,10 +62,10 @@
|
||||
#define MIN_NTNET_LOGS 10
|
||||
|
||||
//Program bitflags
|
||||
#define PROGRAM_ALL 7
|
||||
#define PROGRAM_CONSOLE 1
|
||||
#define PROGRAM_LAPTOP 2
|
||||
#define PROGRAM_TABLET 4
|
||||
#define PROGRAM_ALL (~0)
|
||||
#define PROGRAM_CONSOLE (1<<0)
|
||||
#define PROGRAM_LAPTOP (1<<1)
|
||||
#define PROGRAM_TABLET (1<<2)
|
||||
//Program states
|
||||
#define PROGRAM_STATE_KILLED 0
|
||||
#define PROGRAM_STATE_BACKGROUND 1
|
||||
@@ -84,3 +85,16 @@
|
||||
#define SUPERMATTER_DANGER 4 // Integrity < 50%
|
||||
#define SUPERMATTER_EMERGENCY 5 // Integrity < 25%
|
||||
#define SUPERMATTER_DELAMINATING 6 // Pretty obvious.
|
||||
|
||||
//Nuclear bomb stuff
|
||||
#define NUKESTATE_INTACT 5
|
||||
#define NUKESTATE_UNSCREWED 4
|
||||
#define NUKESTATE_PANEL_REMOVED 3
|
||||
#define NUKESTATE_WELDED 2
|
||||
#define NUKESTATE_CORE_EXPOSED 1
|
||||
#define NUKESTATE_CORE_REMOVED 0
|
||||
|
||||
#define NUKE_OFF_LOCKED 0
|
||||
#define NUKE_OFF_UNLOCKED 1
|
||||
#define NUKE_ON_TIMING 2
|
||||
#define NUKE_ON_EXPLODING 3
|
||||
|
||||
+77
-37
@@ -1,47 +1,87 @@
|
||||
/*
|
||||
The /tg/ codebase currently requires you to have 11 z-levels of the same size dimensions.
|
||||
z-level order is important, the order you put them in inside the map config.dm will determine what z level number they are assigned ingame.
|
||||
Names of z-level do not matter, but order does greatly, for instances such as checking alive status of revheads on z1
|
||||
The /tg/ codebase allows mixing of hardcoded and dynamically-loaded z-levels.
|
||||
Z-levels can be reordered as desired and their properties are set by "traits".
|
||||
See map_config.dm for how a particular station's traits may be chosen.
|
||||
The list DEFAULT_MAP_TRAITS at the bottom of this file should correspond to
|
||||
the maps that are hardcoded, as set in _maps/_basemap.dm. SSmapping is
|
||||
responsible for loading every non-hardcoded z-level.
|
||||
|
||||
current as of 2016/6/2
|
||||
z1 = station
|
||||
z2 = centcom
|
||||
z5 = mining
|
||||
Everything else = randomized space
|
||||
Last space-z level = empty
|
||||
As of 2018-02-04, the typical z-levels for a single-level station are:
|
||||
1: CentCom
|
||||
2: Station
|
||||
3-4: Randomized space
|
||||
5: Mining
|
||||
6: City of Cogs
|
||||
7-11: Randomized space
|
||||
12: Empty space
|
||||
13: Transit space
|
||||
|
||||
Multi-Z stations are supported and multi-Z mining and away missions would
|
||||
require only minor tweaks.
|
||||
*/
|
||||
|
||||
#define CROSSLINKED 2
|
||||
#define SELFLOOPING 1
|
||||
#define UNAFFECTED 0
|
||||
|
||||
#define MAIN_STATION "Main Station"
|
||||
#define CENTCOM "CentCom"
|
||||
#define EMPTY_AREA_1 "Empty Area 1"
|
||||
#define EMPTY_AREA_2 "Empty Area 2"
|
||||
#define MINING "Mining Asteroid"
|
||||
#define EMPTY_AREA_3 "Empty Area 3"
|
||||
#define EMPTY_AREA_4 "Empty Area 4"
|
||||
#define EMPTY_AREA_5 "Empty Area 5"
|
||||
#define EMPTY_AREA_6 "Empty Area 6"
|
||||
#define EMPTY_AREA_7 "Empty Area 7"
|
||||
#define EMPTY_AREA_8 "Empty Area 8"
|
||||
#define AWAY_MISSION "Away Mission"
|
||||
|
||||
//for modifying jobs
|
||||
// helpers for modifying jobs, used in various job_changes.dm files
|
||||
#define MAP_JOB_CHECK if(SSmapping.config.map_name != JOB_MODIFICATION_MAP_NAME) { return; }
|
||||
#define MAP_JOB_CHECK_BASE if(SSmapping.config.map_name != JOB_MODIFICATION_MAP_NAME) { return ..(); }
|
||||
#define MAP_REMOVE_JOB(jobpath) /datum/job/##jobpath/map_check() { return (SSmapping.config.map_name != JOB_MODIFICATION_MAP_NAME) && ..() }
|
||||
|
||||
//zlevel defines, can be overridden for different maps in the appropriate _maps file.
|
||||
#define ZLEVEL_CENTCOM 1
|
||||
#define ZLEVEL_STATION_PRIMARY 2
|
||||
#define ZLEVEL_MINING 5
|
||||
#define ZLEVEL_LAVALAND 5
|
||||
#define ZLEVEL_EMPTY_SPACE 12
|
||||
#define ZLEVEL_TRANSIT 11
|
||||
#define SPACERUIN_MAP_EDGE_PAD 15
|
||||
|
||||
#define ZLEVEL_SPACEMIN 3
|
||||
#define ZLEVEL_SPACEMAX 12
|
||||
// traits
|
||||
// boolean - marks a level as having that property if present
|
||||
#define ZTRAIT_CENTCOM "CentCom"
|
||||
#define ZTRAIT_STATION "Station"
|
||||
#define ZTRAIT_MINING "Mining"
|
||||
#define ZTRAIT_REEBE "Reebe"
|
||||
#define ZTRAIT_TRANSIT "Transit"
|
||||
#define ZTRAIT_AWAY "Away Mission"
|
||||
#define ZTRAIT_SPACE_RUINS "Space Ruins"
|
||||
#define ZTRAIT_LAVA_RUINS "Lava Ruins"
|
||||
|
||||
#define SPACERUIN_MAP_EDGE_PAD 15
|
||||
// number - bombcap is multiplied by this before being applied to bombs
|
||||
#define ZTRAIT_BOMBCAP_MULTIPLIER "Bombcap Multiplier"
|
||||
|
||||
// numeric offsets - e.g. {"Down": -1} means that chasms will fall to z - 1 rather than oblivion
|
||||
#define ZTRAIT_UP "Up"
|
||||
#define ZTRAIT_DOWN "Down"
|
||||
|
||||
// enum - how space transitions should affect this level
|
||||
#define ZTRAIT_LINKAGE "Linkage"
|
||||
// UNAFFECTED if absent - no space transitions
|
||||
#define UNAFFECTED null
|
||||
// SELFLOOPING - space transitions always self-loop
|
||||
#define SELFLOOPING "Self"
|
||||
// CROSSLINKED - mixed in with the cross-linked space pool
|
||||
#define CROSSLINKED "Cross"
|
||||
|
||||
// default trait definitions, used by SSmapping
|
||||
#define ZTRAITS_CENTCOM list(ZTRAIT_CENTCOM = TRUE)
|
||||
#define ZTRAITS_STATION list(ZTRAIT_LINKAGE = CROSSLINKED, ZTRAIT_STATION = TRUE)
|
||||
#define ZTRAITS_SPACE list(ZTRAIT_LINKAGE = CROSSLINKED, ZTRAIT_SPACE_RUINS = TRUE)
|
||||
#define ZTRAITS_LAVALAND list(ZTRAIT_MINING = TRUE, ZTRAIT_LAVA_RUINS = TRUE, ZTRAIT_BOMBCAP_MULTIPLIER = 2)
|
||||
#define ZTRAITS_REEBE list(ZTRAIT_REEBE = TRUE, ZTRAIT_BOMBCAP_MULTIPLIER = 0.5)
|
||||
|
||||
#define DL_NAME "name"
|
||||
#define DL_TRAITS "traits"
|
||||
#define DECLARE_LEVEL(NAME, TRAITS) list(DL_NAME = NAME, DL_TRAITS = TRAITS)
|
||||
|
||||
// must correspond to _basemap.dm for things to work correctly
|
||||
#define DEFAULT_MAP_TRAITS list(\
|
||||
DECLARE_LEVEL("CentCom", ZTRAITS_CENTCOM),\
|
||||
)
|
||||
|
||||
// Camera lock flags
|
||||
#define CAMERA_LOCK_STATION 1
|
||||
#define CAMERA_LOCK_MINING 2
|
||||
#define CAMERA_LOCK_CENTCOM 4
|
||||
#define CAMERA_LOCK_REEBE 8
|
||||
|
||||
|
||||
//Ruin Generation
|
||||
|
||||
#define PLACEMENT_TRIES 100 //How many times we try to fit the ruin somewhere until giving up (really should just swap to some packing algo)
|
||||
|
||||
#define PLACE_DEFAULT "random"
|
||||
#define PLACE_SAME_Z "same"
|
||||
#define PLACE_SPACE_RUIN "space"
|
||||
#define PLACE_LAVA_RUIN "lavaland"
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
#define PI 3.1415
|
||||
#define SPEED_OF_LIGHT 3e8 //not exact but hey!
|
||||
#define SPEED_OF_LIGHT_SQ 9e+16
|
||||
#define INFINITY 1e31 //closer then enough
|
||||
|
||||
//atmos
|
||||
#define R_IDEAL_GAS_EQUATION 8.31 //kPa*L/(K*mol)
|
||||
#define ONE_ATMOSPHERE 101.325 //kPa
|
||||
#define T0C 273.15 // 0degC
|
||||
#define T20C 293.15 // 20degC
|
||||
#define TCMB 2.7 // -270.3degC
|
||||
|
||||
//"fancy" math for calculating time in ms from tick_usage percentage and the length of ticks
|
||||
//percent_of_tick_used * (ticklag * 100(to convert to ms)) / 100(percent ratio)
|
||||
//collapsed to percent_of_tick_used * tick_lag
|
||||
#define TICK_DELTA_TO_MS(percent_of_tick_used) ((percent_of_tick_used) * world.tick_lag)
|
||||
#define TICK_USAGE_TO_MS(starting_tickusage) (TICK_DELTA_TO_MS(TICK_USAGE_REAL - starting_tickusage))
|
||||
|
||||
#define PERCENT(val) (round(val*100, 0.1))
|
||||
#define CLAMP01(x) (Clamp(x, 0, 1))
|
||||
|
||||
//time of day but automatically adjusts to the server going into the next day within the same round.
|
||||
//for when you need a reliable time number that doesn't depend on byond time.
|
||||
#define REALTIMEOFDAY (world.timeofday + (MIDNIGHT_ROLLOVER * MIDNIGHT_ROLLOVER_CHECK))
|
||||
#define MIDNIGHT_ROLLOVER_CHECK ( GLOB.rollovercheck_last_timeofday != world.timeofday ? update_midnight_rollover() : GLOB.midnight_rollovers )
|
||||
@@ -0,0 +1,204 @@
|
||||
// Credits to Nickr5 for the useful procs I've taken from his library resource.
|
||||
// This file is quadruple wrapped for your pleasure
|
||||
// (
|
||||
|
||||
#define NUM_E 2.71828183
|
||||
|
||||
#define PI 3.1416
|
||||
#define INFINITY 1e31 //closer then enough
|
||||
|
||||
#define SHORT_REAL_LIMIT 16777216
|
||||
|
||||
//"fancy" math for calculating time in ms from tick_usage percentage and the length of ticks
|
||||
//percent_of_tick_used * (ticklag * 100(to convert to ms)) / 100(percent ratio)
|
||||
//collapsed to percent_of_tick_used * tick_lag
|
||||
#define TICK_DELTA_TO_MS(percent_of_tick_used) ((percent_of_tick_used) * world.tick_lag)
|
||||
#define TICK_USAGE_TO_MS(starting_tickusage) (TICK_DELTA_TO_MS(TICK_USAGE_REAL - starting_tickusage))
|
||||
|
||||
#define PERCENT(val) (round((val)*100, 0.1))
|
||||
#define CLAMP01(x) (CLAMP(x, 0, 1))
|
||||
|
||||
//time of day but automatically adjusts to the server going into the next day within the same round.
|
||||
//for when you need a reliable time number that doesn't depend on byond time.
|
||||
#define REALTIMEOFDAY (world.timeofday + (MIDNIGHT_ROLLOVER * MIDNIGHT_ROLLOVER_CHECK))
|
||||
#define MIDNIGHT_ROLLOVER_CHECK ( GLOB.rollovercheck_last_timeofday != world.timeofday ? update_midnight_rollover() : GLOB.midnight_rollovers )
|
||||
|
||||
#define SIGN(x) ( (x)!=0 ? (x) / abs(x) : 0 )
|
||||
|
||||
#define CEILING(x, y) ( -round(-(x) / (y)) * (y) )
|
||||
|
||||
// round() acts like floor(x, 1) by default but can't handle other values
|
||||
#define FLOOR(x, y) ( round((x) / (y)) * (y) )
|
||||
|
||||
#define CLAMP(CLVALUE,CLMIN,CLMAX) ( max( (CLMIN), min((CLVALUE), (CLMAX)) ) )
|
||||
|
||||
// Similar to clamp but the bottom rolls around to the top and vice versa. min is inclusive, max is exclusive
|
||||
#define WRAP(val, min, max) ( min == max ? min : (val) - (round(((val) - (min))/((max) - (min))) * ((max) - (min))) )
|
||||
|
||||
// Real modulus that handles decimals
|
||||
#define MODULUS(x, y) ( (x) - (y) * round((x) / (y)) )
|
||||
|
||||
// Tangent
|
||||
#define TAN(x) (sin(x) / cos(x))
|
||||
|
||||
// Cotangent
|
||||
#define COT(x) (1 / TAN(x))
|
||||
|
||||
// Secant
|
||||
#define SEC(x) (1 / cos(x))
|
||||
|
||||
// Cosecant
|
||||
#define CSC(x) (1 / sin(x))
|
||||
|
||||
#define ATAN2(x, y) ( !(x) && !(y) ? 0 : (y) >= 0 ? arccos((x) / sqrt((x)*(x) + (y)*(y))) : -arccos((x) / sqrt((x)*(x) + (y)*(y))) )
|
||||
|
||||
// Greatest Common Divisor - Euclid's algorithm
|
||||
/proc/Gcd(a, b)
|
||||
return b ? Gcd(b, (a) % (b)) : a
|
||||
|
||||
// Least Common Multiple
|
||||
#define Lcm(a, b) (abs(a) / Gcd(a, b) * abs(b))
|
||||
|
||||
#define INVERSE(x) ( 1/(x) )
|
||||
|
||||
// Used for calculating the radioactive strength falloff
|
||||
#define INVERSE_SQUARE(initial_strength,cur_distance,initial_distance) ( (initial_strength)*((initial_distance)**2/(cur_distance)**2) )
|
||||
|
||||
#define ISABOUTEQUAL(a, b, deviation) (deviation ? abs((a) - (b)) <= deviation : abs((a) - (b)) <= 0.1)
|
||||
|
||||
#define ISEVEN(x) (x % 2 == 0)
|
||||
|
||||
#define ISODD(x) (x % 2 != 0)
|
||||
|
||||
// Returns true if val is from min to max, inclusive.
|
||||
#define ISINRANGE(val, min, max) (min <= val && val <= max)
|
||||
|
||||
// Same as above, exclusive.
|
||||
#define ISINRANGE_EX(val, min, max) (min < val && val > max)
|
||||
|
||||
#define ISINTEGER(x) (round(x) == x)
|
||||
|
||||
#define ISMULTIPLE(x, y) ((x) % (y) == 0)
|
||||
|
||||
// Performs a linear interpolation between a and b.
|
||||
// Note that amount=0 returns a, amount=1 returns b, and
|
||||
// amount=0.5 returns the mean of a and b.
|
||||
#define LERP(a, b, amount) ( amount ? ((a) + ((b) - (a)) * (amount)) : a )
|
||||
|
||||
// Returns the nth root of x.
|
||||
#define ROOT(n, x) ((x) ** (1 / (n)))
|
||||
|
||||
// The quadratic formula. Returns a list with the solutions, or an empty list
|
||||
// if they are imaginary.
|
||||
/proc/SolveQuadratic(a, b, c)
|
||||
ASSERT(a)
|
||||
. = list()
|
||||
var/d = b*b - 4 * a * c
|
||||
var/bottom = 2 * a
|
||||
if(d < 0)
|
||||
return
|
||||
var/root = sqrt(d)
|
||||
. += (-b + root) / bottom
|
||||
if(!d)
|
||||
return
|
||||
. += (-b - root) / bottom
|
||||
|
||||
#define TODEGREES(radians) ((radians) * 57.2957795)
|
||||
|
||||
#define TORADIANS(degrees) ((degrees) * 0.0174532925)
|
||||
|
||||
// Will filter out extra rotations and negative rotations
|
||||
// E.g: 540 becomes 180. -180 becomes 180.
|
||||
#define SIMPLIFY_DEGREES(degrees) (MODULUS((degrees), 360))
|
||||
|
||||
#define GET_ANGLE_OF_INCIDENCE(face, input) (MODULUS((face) - (input), 360))
|
||||
|
||||
//Finds the shortest angle that angle A has to change to get to angle B. Aka, whether to move clock or counterclockwise.
|
||||
/proc/closer_angle_difference(a, b)
|
||||
if(!isnum(a) || !isnum(b))
|
||||
return
|
||||
a = SIMPLIFY_DEGREES(a)
|
||||
b = SIMPLIFY_DEGREES(b)
|
||||
var/inc = b - a
|
||||
if(inc < 0)
|
||||
inc += 360
|
||||
var/dec = a - b
|
||||
if(dec < 0)
|
||||
dec += 360
|
||||
. = inc > dec? -dec : inc
|
||||
|
||||
//A logarithm that converts an integer to a number scaled between 0 and 1.
|
||||
//Currently, this is used for hydroponics-produce sprite transforming, but could be useful for other transform functions.
|
||||
#define TRANSFORM_USING_VARIABLE(input, max) ( sin((90*(input))/(max))**2 )
|
||||
|
||||
//converts a uniform distributed random number into a normal distributed one
|
||||
//since this method produces two random numbers, one is saved for subsequent calls
|
||||
//(making the cost negligble for every second call)
|
||||
//This will return +/- decimals, situated about mean with standard deviation stddev
|
||||
//68% chance that the number is within 1stddev
|
||||
//95% chance that the number is within 2stddev
|
||||
//98% chance that the number is within 3stddev...etc
|
||||
#define ACCURACY 10000
|
||||
/proc/gaussian(mean, stddev)
|
||||
var/static/gaussian_next
|
||||
var/R1;var/R2;var/working
|
||||
if(gaussian_next != null)
|
||||
R1 = gaussian_next
|
||||
gaussian_next = null
|
||||
else
|
||||
do
|
||||
R1 = rand(-ACCURACY,ACCURACY)/ACCURACY
|
||||
R2 = rand(-ACCURACY,ACCURACY)/ACCURACY
|
||||
working = R1*R1 + R2*R2
|
||||
while(working >= 1 || working==0)
|
||||
working = sqrt(-2 * log(working) / working)
|
||||
R1 *= working
|
||||
gaussian_next = R2 * working
|
||||
return (mean + stddev * R1)
|
||||
#undef ACCURACY
|
||||
|
||||
/proc/get_turf_in_angle(angle, turf/starting, increments)
|
||||
var/pixel_x = 0
|
||||
var/pixel_y = 0
|
||||
for(var/i in 1 to increments)
|
||||
pixel_x += sin(angle)+16*sin(angle)*2
|
||||
pixel_y += cos(angle)+16*cos(angle)*2
|
||||
var/new_x = starting.x
|
||||
var/new_y = starting.y
|
||||
while(pixel_x > 16)
|
||||
pixel_x -= 32
|
||||
new_x++
|
||||
while(pixel_x < -16)
|
||||
pixel_x += 32
|
||||
new_x--
|
||||
while(pixel_y > 16)
|
||||
pixel_y -= 32
|
||||
new_y++
|
||||
while(pixel_y < -16)
|
||||
pixel_y += 32
|
||||
new_y--
|
||||
new_x = CLAMP(new_x, 0, world.maxx)
|
||||
new_y = CLAMP(new_y, 0, world.maxy)
|
||||
return locate(new_x, new_y, starting.z)
|
||||
|
||||
// Returns a list where [1] is all x values and [2] is all y values that overlap between the given pair of rectangles
|
||||
/proc/get_overlap(x1, y1, x2, y2, x3, y3, x4, y4)
|
||||
var/list/region_x1 = list()
|
||||
var/list/region_y1 = list()
|
||||
var/list/region_x2 = list()
|
||||
var/list/region_y2 = list()
|
||||
|
||||
// These loops create loops filled with x/y values that the boundaries inhabit
|
||||
// ex: list(5, 6, 7, 8, 9)
|
||||
for(var/i in min(x1, x2) to max(x1, x2))
|
||||
region_x1["[i]"] = TRUE
|
||||
for(var/i in min(y1, y2) to max(y1, y2))
|
||||
region_y1["[i]"] = TRUE
|
||||
for(var/i in min(x3, x4) to max(x3, x4))
|
||||
region_x2["[i]"] = TRUE
|
||||
for(var/i in min(y3, y4) to max(y3, y4))
|
||||
region_y2["[i]"] = TRUE
|
||||
|
||||
return list(region_x1 & region_x2, region_y1 & region_y2)
|
||||
|
||||
// )
|
||||
@@ -0,0 +1,29 @@
|
||||
// Medal names
|
||||
#define BOSS_KILL_MEDAL "Killer"
|
||||
#define ALL_KILL_MEDAL "Exterminator" //Killing all of x type
|
||||
#define BOSS_KILL_MEDAL_CRUSHER "Crusher"
|
||||
|
||||
//Defines for boss medals
|
||||
#define BOSS_MEDAL_MINER "Blood-drunk Miner"
|
||||
#define BOSS_MEDAL_BUBBLEGUM "Bubblegum"
|
||||
#define BOSS_MEDAL_COLOSSUS "Colossus"
|
||||
#define BOSS_MEDAL_DRAKE "Drake"
|
||||
#define BOSS_MEDAL_HIEROPHANT "Hierophant"
|
||||
#define BOSS_MEDAL_LEGION "Legion"
|
||||
#define BOSS_MEDAL_TENDRIL "Tendril"
|
||||
#define BOSS_MEDAL_SWARMERS "Swarmer Beacon"
|
||||
|
||||
// Score names
|
||||
#define HIEROPHANT_SCORE "Hierophants Killed"
|
||||
#define BOSS_SCORE "Bosses Killed"
|
||||
#define BUBBLEGUM_SCORE "Bubblegum Killed"
|
||||
#define COLOSSUS_SCORE "Colossus Killed"
|
||||
#define DRAKE_SCORE "Drakes Killed"
|
||||
#define LEGION_SCORE "Legion Killed"
|
||||
#define SWARMER_BEACON_SCORE "Swarmer Beacons Killed"
|
||||
#define TENDRIL_CLEAR_SCORE "Tendrils Killed"
|
||||
|
||||
//Misc medals
|
||||
#define MEDAL_METEOR "Your Life Before Your Eyes"
|
||||
#define MEDAL_PULSE "Jackpot"
|
||||
#define MEDAL_TIMEWASTE "Overextended The Joke"
|
||||
+91
-101
@@ -4,6 +4,11 @@
|
||||
// #define EAST 4
|
||||
// #define WEST 8
|
||||
|
||||
#define TEXT_NORTH "[NORTH]"
|
||||
#define TEXT_SOUTH "[SOUTH]"
|
||||
#define TEXT_EAST "[EAST]"
|
||||
#define TEXT_WEST "[WEST]"
|
||||
|
||||
//These get to go at the top, because they're special
|
||||
//You can use these defines to get the typepath of the currently running proc/verb (yes procs + verbs are objects)
|
||||
/* eg:
|
||||
@@ -15,8 +20,8 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
|
||||
#define THIS_PROC_TYPE_STR "[THIS_PROC_TYPE]" //Because you can only obtain a string of THIS_PROC_TYPE using "[]", and it's nice to just +/+= strings
|
||||
#define THIS_PROC_TYPE_STR_WITH_ARGS "[THIS_PROC_TYPE]([args.Join(",")])"
|
||||
#define THIS_PROC_TYPE_WEIRD ...... //This one is WEIRD, in some cases (When used in certain defines? (eg: ASSERT)) THIS_PROC_TYPE will fail to work, but THIS_PROC_TYPE_WEIRD will work instead
|
||||
#define THIS_PROC_TYPE_WEIRD_STR "[THIS_PROC_TYPE_WEIRD]" //Included for completeness
|
||||
#define THIS_PROC_TYPE_WEIRD_STR_WITH_ARGS "[THIS_PROC_TYPE_WEIRD]([args.Join(",")])" //Ditto
|
||||
//define THIS_PROC_TYPE_WEIRD_STR "[THIS_PROC_TYPE_WEIRD]" //Included for completeness
|
||||
//define THIS_PROC_TYPE_WEIRD_STR_WITH_ARGS "[THIS_PROC_TYPE_WEIRD]([args.Join(",")])" //Ditto
|
||||
|
||||
#define MIDNIGHT_ROLLOVER 864000 //number of deciseconds in a day
|
||||
|
||||
@@ -41,10 +46,9 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
|
||||
#define HALLOWEEN "Halloween"
|
||||
#define CHRISTMAS "Christmas"
|
||||
#define FESTIVE_SEASON "Festive Season"
|
||||
#define FRIDAY_13TH "Friday the 13th"
|
||||
|
||||
//Human Overlays Indexes/////////
|
||||
//citadel code
|
||||
//LOTS OF CIT CHANGES HERE. BE CAREFUL WHEN UPSTREAM ADDS MORE LAYERS
|
||||
#define MUTATIONS_LAYER 30 //mutations. Tk headglows, cold resistance glow, etc
|
||||
#define GENITALS_BEHIND_LAYER 29 //Some genitalia needs to be behind everything, such as with taurs (Taurs use body_behind_layer
|
||||
#define BODY_BEHIND_LAYER 28 //certain mutantrace features (tail when looking south) that must appear behind the body parts
|
||||
@@ -56,6 +60,7 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
|
||||
#define DAMAGE_LAYER 22 //damage indicators (cuts and burns)
|
||||
#define UNIFORM_LAYER 21
|
||||
#define ID_LAYER 20
|
||||
#define HANDS_PART_LAYER 20
|
||||
#define SHOES_LAYER 19
|
||||
#define GLOVES_LAYER 18
|
||||
#define EARS_LAYER 17
|
||||
@@ -80,56 +85,11 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
|
||||
//Human Overlay Index Shortcuts for alternate_worn_layer, layers
|
||||
//Because I *KNOW* somebody will think layer+1 means "above"
|
||||
//IT DOESN'T OK, IT MEANS "UNDER"
|
||||
#define UNDER_BODY_BEHIND_LAYER BODY_BEHIND_LAYER+1
|
||||
#define UNDER_BODY_LAYER BODY_LAYER+1
|
||||
#define UNDER_BODY_ADJ_LAYER BODY_ADJ_LAYER+1
|
||||
#define UNDER_MUTATIONS_LAYER MUTATIONS_LAYER+1
|
||||
#define UNDER_BODYPARTS_LAYER BODYPARTS_LAYER+1
|
||||
#define UNDER_DAMAGE_LAYER DAMAGE_LAYER+1
|
||||
#define UNDER_UNIFORM_LAYER UNIFORM_LAYER+1
|
||||
#define UNDER_ID_LAYER ID_LAYER+1
|
||||
#define UNDER_SHOES_LAYER SHOES_LAYER+1
|
||||
#define UNDER_GLOVES_LAYER GLOVES_LAYER+1
|
||||
#define UNDER_EARS_LAYER EARS_LAYER+1
|
||||
#define UNDER_SUIT_LAYER SUIT_LAYER+1
|
||||
#define UNDER_GLASSES_LAYER GLASSES_LAYER+1
|
||||
#define UNDER_BELT_LAYER BELT_LAYER+1
|
||||
#define UNDER_SUIT_STORE_LAYER SUIT_STORE_LAYER+1
|
||||
#define UNDER_BACK_LAYER BACK_LAYER+1
|
||||
#define UNDER_HAIR_LAYER HAIR_LAYER+1
|
||||
#define UNDER_FACEMASK_LAYER FACEMASK_LAYER+1
|
||||
#define UNDER_HEAD_LAYER HEAD_LAYER+1
|
||||
#define UNDER_HANDCUFF_LAYER HANDCUFF_LAYER+1
|
||||
#define UNDER_LEGCUFF_LAYER LEGCUFF_LAYER+1
|
||||
#define UNDER_HANDS_LAYER HANDS_LAYER+1
|
||||
#define UNDER_BODY_FRONT_LAYER BODY_FRONT_LAYER+1
|
||||
#define UNDER_FIRE_LAYER FIRE_LAYER+1
|
||||
#define UNDER_SUIT_LAYER (SUIT_LAYER+1)
|
||||
|
||||
//AND -1 MEANS "ABOVE", OK?, OK!?!
|
||||
#define ABOVE_BODY_BEHIND_LAYER BODY_BEHIND_LAYER-1
|
||||
#define ABOVE_BODY_LAYER BODY_LAYER-1
|
||||
#define ABOVE_BODY_ADJ_LAYER BODY_ADJ_LAYER-1
|
||||
#define ABOVE_MUTATIONS_LAYER MUTATIONS_LAYER-1
|
||||
#define ABOVE_BODYPARTS_LAYER BODYPARTS_LAYER-1
|
||||
#define ABOVE_DAMAGE_LAYER DAMAGE_LAYER-1
|
||||
#define ABOVE_UNIFORM_LAYER UNIFORM_LAYER-1
|
||||
#define ABOVE_ID_LAYER ID_LAYER-1
|
||||
#define ABOVE_SHOES_LAYER SHOES_LAYER-1
|
||||
#define ABOVE_GLOVES_LAYER GLOVES_LAYER-1
|
||||
#define ABOVE_EARS_LAYER EARS_LAYER-1
|
||||
#define ABOVE_SUIT_LAYER SUIT_LAYER-1
|
||||
#define ABOVE_GLASSES_LAYER GLASSES_LAYER-1
|
||||
#define ABOVE_BELT_LAYER BELT_LAYER-1
|
||||
#define ABOVE_SUIT_STORE_LAYER SUIT_STORE_LAYER-1
|
||||
#define ABOVE_BACK_LAYER BACK_LAYER-1
|
||||
#define ABOVE_HAIR_LAYER HAIR_LAYER-1
|
||||
#define ABOVE_FACEMASK_LAYER FACEMASK_LAYER-1
|
||||
#define ABOVE_HEAD_LAYER HEAD_LAYER-1
|
||||
#define ABOVE_HANDCUFF_LAYER HANDCUFF_LAYER-1
|
||||
#define ABOVE_LEGCUFF_LAYER LEGCUFF_LAYER-1
|
||||
#define ABOVE_HANDS_LAYER HANDS_LAYER-1
|
||||
#define ABOVE_BODY_FRONT_LAYER BODY_FRONT_LAYER-1
|
||||
#define ABOVE_FIRE_LAYER FIRE_LAYER-1
|
||||
#define ABOVE_SHOES_LAYER (SHOES_LAYER-1)
|
||||
#define ABOVE_BODY_FRONT_LAYER (BODY_FRONT_LAYER-1)
|
||||
|
||||
|
||||
//Security levels
|
||||
@@ -187,7 +147,6 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
|
||||
#define AI_MECH_HACK 3 //Malfunctioning AI hijacking mecha
|
||||
|
||||
//check_target_facings() return defines
|
||||
#define FACING_FAILED 0
|
||||
#define FACING_SAME_DIR 1
|
||||
#define FACING_EACHOTHER 2
|
||||
#define FACING_INIT_FACING_TARGET_TARGET_FACING_PERPENDICULAR 3 //Do I win the most informative but also most stupid define award?
|
||||
@@ -204,7 +163,7 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache)
|
||||
#define BLOODY_FOOTPRINT_BASE_ALPHA 150
|
||||
#define BLOOD_GAIN_PER_STEP 100
|
||||
#define BLOOD_LOSS_PER_STEP 5
|
||||
#define BLOOD_FADEOUT_TIME 2
|
||||
#define BLOOD_LOSS_IN_SPREAD 20
|
||||
|
||||
//Bloody shoe blood states
|
||||
#define BLOOD_STATE_HUMAN "blood"
|
||||
@@ -226,16 +185,17 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache)
|
||||
#define HAS_SENSORS 1
|
||||
#define LOCKED_SENSORS 2
|
||||
|
||||
//Turf wet states
|
||||
//Wet floor type flags. Stronger ones should be higher in number.
|
||||
#define TURF_DRY 0
|
||||
#define TURF_WET_WATER 1
|
||||
#define TURF_WET_LUBE 2
|
||||
#define TURF_WET_ICE 3
|
||||
#define TURF_WET_PERMAFROST 4
|
||||
#define TURF_WET_SLIDE 5
|
||||
#define TURF_WET_PERMAFROST 2
|
||||
#define TURF_WET_ICE 4
|
||||
#define TURF_WET_LUBE 8
|
||||
|
||||
//Maximum amount of time, (in approx. seconds.) a tile can be wet for.
|
||||
#define MAXIMUM_WET_TIME 300
|
||||
#define IS_WET_OPEN_TURF(O) O.GetComponent(/datum/component/wet_floor)
|
||||
|
||||
//Maximum amount of time, (in deciseconds) a tile can be wet for.
|
||||
#define MAXIMUM_WET_TIME 5 MINUTES
|
||||
|
||||
//unmagic-strings for types of polls
|
||||
#define POLLTYPE_OPTION "OPTION"
|
||||
@@ -288,22 +248,28 @@ GLOBAL_LIST_INIT(ghost_accs_options, list(GHOST_ACCS_NONE, GHOST_ACCS_DIR, GHOST
|
||||
|
||||
GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DEFAULT_SPRITE, GHOST_OTHERS_THEIR_SETTING)) //Same as ghost_accs_options.
|
||||
|
||||
//pda fonts
|
||||
#define MONO "Monospaced"
|
||||
#define VT "VT323"
|
||||
#define ORBITRON "Orbitron"
|
||||
#define SHARE "Share Tech Mono"
|
||||
|
||||
GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE))
|
||||
|
||||
//Color Defines
|
||||
#define OOC_COLOR "#002eb8"
|
||||
|
||||
/////////////////////////////////////
|
||||
// atom.appearence_flags shortcuts //
|
||||
/////////////////////////////////////
|
||||
//this was added midway thru 510, so it might not exist in some versions, but we can't check by minor verison
|
||||
#ifndef TILE_BOUND
|
||||
#error this version of 510 is too old, You must use byond 510.1332 or later. (TILE_BOUND is not defined)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
// Disabling certain features
|
||||
#define APPEARANCE_IGNORE_TRANSFORM RESET_TRANSFORM
|
||||
#define APPEARANCE_IGNORE_COLOUR RESET_COLOR
|
||||
#define APPEARANCE_IGNORE_CLIENT_COLOUR NO_CLIENT_COLOR
|
||||
#define APPEARANCE_IGNORE_COLOURING RESET_COLOR|NO_CLIENT_COLOR
|
||||
#define APPEARANCE_IGNORE_COLOURING (RESET_COLOR|NO_CLIENT_COLOR)
|
||||
#define APPEARANCE_IGNORE_ALPHA RESET_ALPHA
|
||||
#define APPEARANCE_NORMAL_GLIDE ~LONG_GLIDE
|
||||
|
||||
@@ -311,20 +277,15 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
#define APPEARANCE_CONSIDER_TRANSFORM ~RESET_TRANSFORM
|
||||
#define APPEARANCE_CONSIDER_COLOUR ~RESET_COLOUR
|
||||
#define APPEARANCE_CONSIDER_CLIENT_COLOUR ~NO_CLIENT_COLOR
|
||||
#define APPEARANCE_CONSIDER_COLOURING ~RESET_COLOR|~NO_CLIENT_COLOR
|
||||
#define APPEARANCE_CONSIDER_COLOURING (~RESET_COLOR|~NO_CLIENT_COLOR)
|
||||
#define APPEARANCE_CONSIDER_ALPHA ~RESET_ALPHA
|
||||
#define APPEARANCE_LONG_GLIDE LONG_GLIDE
|
||||
|
||||
#ifndef PIXEL_SCALE
|
||||
#define PIXEL_SCALE 0
|
||||
#if DM_VERSION >= 512
|
||||
#error HEY, PIXEL_SCALE probably exists now, remove this gross ass shim.
|
||||
#endif
|
||||
#endif
|
||||
*/
|
||||
|
||||
// Consider these images/atoms as part of the UI/HUD
|
||||
#define APPEARANCE_UI_IGNORE_ALPHA RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA|PIXEL_SCALE
|
||||
#define APPEARANCE_UI RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR
|
||||
// Consider these images/atoms as part of the UI/HUD
|
||||
#define APPEARANCE_UI_IGNORE_ALPHA (RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA|PIXEL_SCALE)
|
||||
#define APPEARANCE_UI (RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|PIXEL_SCALE)
|
||||
|
||||
//Just space
|
||||
#define SPACE_ICON_STATE "[((x + y) ^ ~(x * y) + z) % 25]"
|
||||
@@ -363,20 +324,6 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
|
||||
#define INCREMENT_TALLY(L, stat) if(L[stat]){L[stat]++}else{L[stat] = 1}
|
||||
|
||||
// Medal names
|
||||
#define BOSS_KILL_MEDAL "Killer"
|
||||
#define ALL_KILL_MEDAL "Exterminator" //Killing all of x type
|
||||
|
||||
// Score names
|
||||
#define LEGION_SCORE "Legion Killed"
|
||||
#define COLOSSUS_SCORE "Colossus Killed"
|
||||
#define BUBBLEGUM_SCORE "Bubblegum Killed"
|
||||
#define DRAKE_SCORE "Drakes Killed"
|
||||
#define BIRD_SCORE "Hierophants Killed"
|
||||
#define SWARMER_BEACON_SCORE "Swarmer Beacons Killed"
|
||||
#define BOSS_SCORE "Bosses Killed"
|
||||
#define TENDRIL_CLEAR_SCORE "Tendrils Killed"
|
||||
|
||||
//TODO Move to a pref
|
||||
#define STATION_GOAL_BUDGET 1
|
||||
|
||||
@@ -416,14 +363,6 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
#define CLOCK_PROSELYTIZATION 23
|
||||
#define SHUTTLE_HIJACK 24
|
||||
|
||||
#define TURF_DECAL_PAINT "paint"
|
||||
#define TURF_DECAL_DAMAGE "damage"
|
||||
#define TURF_DECAL_DIRT "dirt"
|
||||
|
||||
//Error handler defines
|
||||
#define ERROR_USEFUL_LEN 2
|
||||
|
||||
#define NO_FIELD 0
|
||||
#define FIELD_TURF 1
|
||||
#define FIELD_EDGE 2
|
||||
|
||||
@@ -432,6 +371,7 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
#define GIBTONITE_ACTIVE 1
|
||||
#define GIBTONITE_STABLE 2
|
||||
#define GIBTONITE_DETONATE 3
|
||||
|
||||
//for obj explosion block calculation
|
||||
#define EXPLOSION_BLOCK_PROC -1
|
||||
|
||||
@@ -440,9 +380,7 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
#define BEAT_SLOW 2
|
||||
#define BEAT_NONE 0
|
||||
|
||||
#define BEAT_CHANNEL 150
|
||||
|
||||
//http://www.byond.com/docs/ref/info.html#/atom/var/mouse_opacity
|
||||
//https://secure.byond.com/docs/ref/info.html#/atom/var/mouse_opacity
|
||||
#define MOUSE_OPACITY_TRANSPARENT 0
|
||||
#define MOUSE_OPACITY_ICON 1
|
||||
#define MOUSE_OPACITY_OPAQUE 2
|
||||
@@ -459,4 +397,56 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
|
||||
//Dummy mob reserve slots
|
||||
#define DUMMY_HUMAN_SLOT_PREFERENCES "dummy_preference_preview"
|
||||
#define DUMMY_HUMAN_SLOT_ADMIN "admintools"
|
||||
#define DUMMY_HUMAN_SLOT_MANIFEST "dummy_manifest_generation"
|
||||
|
||||
#define PR_ANNOUNCEMENTS_PER_ROUND 5 //The number of unique PR announcements allowed per round
|
||||
//This makes sure that a single person can only spam 3 reopens and 3 closes before being ignored
|
||||
|
||||
#define MAX_PROC_DEPTH 195 // 200 proc calls deep and shit breaks, this is a bit lower to give some safety room
|
||||
|
||||
#define SYRINGE_DRAW 0
|
||||
#define SYRINGE_INJECT 1
|
||||
|
||||
//gold slime core spawning
|
||||
#define NO_SPAWN 0
|
||||
#define HOSTILE_SPAWN 1
|
||||
#define FRIENDLY_SPAWN 2
|
||||
|
||||
//slime core activation type
|
||||
#define SLIME_ACTIVATE_MINOR 1
|
||||
#define SLIME_ACTIVATE_MAJOR 2
|
||||
|
||||
#define LUMINESCENT_DEFAULT_GLOW 2
|
||||
|
||||
#define RIDING_OFFSET_ALL "ALL"
|
||||
|
||||
//stack recipe placement check types
|
||||
#define STACK_CHECK_CARDINALS "cardinals" //checks if there is an object of the result type in any of the cardinal directions
|
||||
#define STACK_CHECK_ADJACENT "adjacent" //checks if there is an object of the result type within one tile
|
||||
|
||||
//text files
|
||||
#define BRAIN_DAMAGE_FILE "traumas.json"
|
||||
#define ION_FILE "ion_laws.json"
|
||||
#define PIRATE_NAMES_FILE "pirates.json"
|
||||
|
||||
//Fullscreen overlay resolution in tiles.
|
||||
#define FULLSCREEN_OVERLAY_RESOLUTION_X 15
|
||||
#define FULLSCREEN_OVERLAY_RESOLUTION_Y 15
|
||||
|
||||
#define SUMMON_GUNS "guns"
|
||||
#define SUMMON_MAGIC "magic"
|
||||
|
||||
//Run the world with this parameter to enable a single run though of the game setup and tear down process with unit tests in between
|
||||
#define TEST_RUN_PARAMETER "test-run"
|
||||
//Force the log directory to be something specific in the data/logs folder
|
||||
#define OVERRIDE_LOG_DIRECTORY_PARAMETER "log-directory"
|
||||
//Prevent the master controller from starting automatically, overrides TEST_RUN_PARAMETER
|
||||
#define NO_INIT_PARAMETER "no-init"
|
||||
|
||||
#define EGG_LAYING_MESSAGES list("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.")
|
||||
|
||||
// Used by PDA and cartridge code to reduce repetitiveness of spritesheets
|
||||
#define PDAIMG(what) {"<span class="pda16x16 [#what]"></span>"}
|
||||
//Filters
|
||||
#define AMBIENT_OCCLUSION filter(type="drop_shadow", x=0, y=-2, size=4, border=4, color="#04080FAA")
|
||||
|
||||
+150
-43
@@ -35,6 +35,18 @@
|
||||
#define BLOODCRAWL 1
|
||||
#define BLOODCRAWL_EAT 2
|
||||
|
||||
//Mob bio-types
|
||||
#define MOB_ORGANIC "organic"
|
||||
#define MOB_INORGANIC "inorganic"
|
||||
#define MOB_ROBOTIC "robotic"
|
||||
#define MOB_UNDEAD "undead"
|
||||
#define MOB_HUMANOID "humanoid"
|
||||
#define MOB_BUG "bug"
|
||||
#define MOB_BEAST "beast"
|
||||
#define MOB_EPIC "epic" //megafauna
|
||||
#define MOB_REPTILE "reptile"
|
||||
#define MOB_SPIRIT "spirit"
|
||||
|
||||
//Organ defines for carbon mobs
|
||||
#define ORGAN_ORGANIC 1
|
||||
#define ORGAN_ROBOTIC 2
|
||||
@@ -51,12 +63,89 @@
|
||||
#define DEVIL_BODYPART "devil"
|
||||
/*see __DEFINES/inventory.dm for bodypart bitflag defines*/
|
||||
|
||||
// Health/damage defines for carbon mobs
|
||||
#define HUMAN_MAX_OXYLOSS 3
|
||||
#define HUMAN_CRIT_MAX_OXYLOSS (SSmobs.wait/30)
|
||||
|
||||
#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point
|
||||
#define HEAT_DAMAGE_LEVEL_2 3 //Amount of damage applied when your body temperature passes the 400K point
|
||||
#define HEAT_DAMAGE_LEVEL_3 8 //Amount of damage applied when your body temperature passes the 460K point and you are on fire
|
||||
|
||||
#define COLD_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when your body temperature just passes the 260.15k safety point
|
||||
#define COLD_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when your body temperature passes the 200K point
|
||||
#define COLD_DAMAGE_LEVEL_3 3 //Amount of damage applied when your body temperature passes the 120K point
|
||||
|
||||
//Note that gas heat damage is only applied once every FOUR ticks.
|
||||
#define HEAT_GAS_DAMAGE_LEVEL_1 2 //Amount of damage applied when the current breath's temperature just passes the 360.15k safety point
|
||||
#define HEAT_GAS_DAMAGE_LEVEL_2 4 //Amount of damage applied when the current breath's temperature passes the 400K point
|
||||
#define HEAT_GAS_DAMAGE_LEVEL_3 8 //Amount of damage applied when the current breath's temperature passes the 1000K point
|
||||
|
||||
#define COLD_GAS_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when the current breath's temperature just passes the 260.15k safety point
|
||||
#define COLD_GAS_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when the current breath's temperature passes the 200K point
|
||||
#define COLD_GAS_DAMAGE_LEVEL_3 3 //Amount of damage applied when the current breath's temperature passes the 120K point
|
||||
|
||||
//Brain Damage defines
|
||||
#define BRAIN_DAMAGE_MILD 20
|
||||
#define BRAIN_DAMAGE_SEVERE 100
|
||||
#define BRAIN_DAMAGE_DEATH 200
|
||||
|
||||
#define BRAIN_TRAUMA_MILD /datum/brain_trauma/mild
|
||||
#define BRAIN_TRAUMA_SEVERE /datum/brain_trauma/severe
|
||||
#define BRAIN_TRAUMA_SPECIAL /datum/brain_trauma/special
|
||||
|
||||
#define TRAUMA_RESILIENCE_BASIC 1 //Curable with chems
|
||||
#define TRAUMA_RESILIENCE_SURGERY 2 //Curable with brain surgery
|
||||
#define TRAUMA_RESILIENCE_LOBOTOMY 3 //Curable with lobotomy
|
||||
#define TRAUMA_RESILIENCE_MAGIC 4 //Curable only with magic
|
||||
#define TRAUMA_RESILIENCE_ABSOLUTE 5 //This is here to stay
|
||||
|
||||
//Limit of traumas for each resilience tier
|
||||
#define TRAUMA_LIMIT_BASIC 3
|
||||
#define TRAUMA_LIMIT_SURGERY 2
|
||||
#define TRAUMA_LIMIT_LOBOTOMY 3
|
||||
#define TRAUMA_LIMIT_MAGIC 3
|
||||
#define TRAUMA_LIMIT_ABSOLUTE INFINITY
|
||||
|
||||
#define BRAIN_DAMAGE_INTEGRITY_MULTIPLIER 0.5
|
||||
|
||||
//Surgery Defines
|
||||
#define BIOWARE_GENERIC "generic"
|
||||
#define BIOWARE_NERVES "nerves"
|
||||
#define BIOWARE_CIRCULATION "circulation"
|
||||
|
||||
//Health hud screws for carbon mobs
|
||||
#define SCREWYHUD_NONE 0
|
||||
#define SCREWYHUD_CRIT 1
|
||||
#define SCREWYHUD_DEAD 2
|
||||
#define SCREWYHUD_HEALTHY 3
|
||||
|
||||
//Moods levels for humans
|
||||
#define MOOD_LEVEL_HAPPY4 15
|
||||
#define MOOD_LEVEL_HAPPY3 10
|
||||
#define MOOD_LEVEL_HAPPY2 6
|
||||
#define MOOD_LEVEL_HAPPY1 2
|
||||
#define MOOD_LEVEL_NEUTRAL 0
|
||||
#define MOOD_LEVEL_SAD1 -3
|
||||
#define MOOD_LEVEL_SAD2 -12
|
||||
#define MOOD_LEVEL_SAD3 -18
|
||||
#define MOOD_LEVEL_SAD4 -25
|
||||
|
||||
//Sanity levels for humans
|
||||
#define SANITY_GREAT 125
|
||||
#define SANITY_NEUTRAL 100
|
||||
#define SANITY_DISTURBED 75
|
||||
#define SANITY_UNSTABLE 50
|
||||
#define SANITY_CRAZY 25
|
||||
#define SANITY_INSANE 0
|
||||
|
||||
//Beauty levels of areas for carbons
|
||||
#define BEAUTY_LEVEL_HORRID -100
|
||||
#define BEAUTY_LEVEL_BAD -66
|
||||
#define BEAUTY_LEVEL_MEH -33
|
||||
#define BEAUTY_LEVEL_DECENT 33
|
||||
#define BEAUTY_LEVEL_GOOD 66
|
||||
#define BEAUTY_LEVEL_GREAT 100
|
||||
|
||||
//Nutrition levels for humans
|
||||
#define NUTRITION_LEVEL_FAT 600
|
||||
#define NUTRITION_LEVEL_FULL 550
|
||||
@@ -65,6 +154,9 @@
|
||||
#define NUTRITION_LEVEL_HUNGRY 250
|
||||
#define NUTRITION_LEVEL_STARVING 150
|
||||
|
||||
#define NUTRITION_LEVEL_START_MIN 250
|
||||
#define NUTRITION_LEVEL_START_MAX 400
|
||||
|
||||
//Disgust levels for humans
|
||||
#define DISGUST_LEVEL_MAXEDOUT 150
|
||||
#define DISGUST_LEVEL_DISGUSTED 75
|
||||
@@ -74,6 +166,9 @@
|
||||
//Slime evolution threshold. Controls how fast slimes can split/grow
|
||||
#define SLIME_EVOLUTION_THRESHOLD 10
|
||||
|
||||
//Slime extract crossing. Controls how many extracts is required to feed to a slime to core-cross.
|
||||
#define SLIME_EXTRACT_CROSSING_REQUIRED 10
|
||||
|
||||
//Slime commands defines
|
||||
#define SLIME_FRIENDSHIP_FOLLOW 3 //Min friendship to order it to follow
|
||||
#define SLIME_FRIENDSHIP_STOPEAT 5 //Min friendship to order it to stop eating someone
|
||||
@@ -86,55 +181,29 @@
|
||||
//Sentience types, to prevent things like sentience potions from giving bosses sentience
|
||||
#define SENTIENCE_ORGANIC 1
|
||||
#define SENTIENCE_ARTIFICIAL 2
|
||||
#define SENTIENCE_OTHER 3
|
||||
// #define SENTIENCE_OTHER 3 unused
|
||||
#define SENTIENCE_MINEBOT 4
|
||||
#define SENTIENCE_BOSS 5
|
||||
|
||||
//Mob AI Status
|
||||
|
||||
//Hostile simple animals
|
||||
//If you add a new status, be sure to add a list for it to the simple_animals global in _globalvars/lists/mobs.dm
|
||||
#define AI_ON 1
|
||||
#define AI_IDLE 2
|
||||
#define AI_OFF 3
|
||||
#define AI_Z_OFF 4
|
||||
|
||||
//determines if a mob can smash through it
|
||||
#define ENVIRONMENT_SMASH_NONE 0
|
||||
#define ENVIRONMENT_SMASH_STRUCTURES 1 //crates, lockers, ect
|
||||
#define ENVIRONMENT_SMASH_WALLS 2 //walls
|
||||
#define ENVIRONMENT_SMASH_RWALLS 4 //rwalls
|
||||
#define ENVIRONMENT_SMASH_NONE 0
|
||||
#define ENVIRONMENT_SMASH_STRUCTURES (1<<0) //crates, lockers, ect
|
||||
#define ENVIRONMENT_SMASH_WALLS (1<<1) //walls
|
||||
#define ENVIRONMENT_SMASH_RWALLS (1<<2) //rwalls
|
||||
|
||||
|
||||
//SNPCs
|
||||
//AI defines
|
||||
#define INTERACTING 2
|
||||
#define TRAVEL 4
|
||||
#define FIGHTING 8
|
||||
//Trait defines
|
||||
#define TRAIT_ROBUST 2
|
||||
#define TRAIT_UNROBUST 4
|
||||
#define TRAIT_SMART 8
|
||||
#define TRAIT_DUMB 16
|
||||
#define TRAIT_MEAN 32
|
||||
#define TRAIT_FRIENDLY 64
|
||||
#define TRAIT_THIEVING 128
|
||||
//Range/chance defines
|
||||
#define MAX_RANGE_FIND 32
|
||||
#define MIN_RANGE_FIND 16
|
||||
#define FUZZY_CHANCE_HIGH 85
|
||||
#define FUZZY_CHANCE_LOW 50
|
||||
#define CHANCE_TALK 1
|
||||
//Traitor type defines
|
||||
#define SNPC_BRUTE 1
|
||||
#define SNPC_STEALTH 2
|
||||
#define SNPC_MARTYR 3
|
||||
#define SNPC_PSYCHO 4
|
||||
|
||||
#define TK_MAXRANGE 15
|
||||
|
||||
#define NO_SLIP_WHEN_WALKING 1
|
||||
#define SLIDE 2
|
||||
#define GALOSHES_DONT_HELP 4
|
||||
#define SLIDE_ICE 8
|
||||
#define NO_SLIP_WHEN_WALKING (1<<0)
|
||||
#define SLIDE (1<<1)
|
||||
#define GALOSHES_DONT_HELP (1<<2)
|
||||
#define SLIDE_ICE (1<<3)
|
||||
|
||||
#define MAX_CHICKENS 50
|
||||
|
||||
@@ -146,13 +215,51 @@
|
||||
#define INCORPOREAL_MOVE_JAUNT 3 // is blocked by holy water/salt
|
||||
|
||||
//Secbot and ED209 judgement criteria bitflag values
|
||||
#define JUDGE_EMAGGED 1
|
||||
#define JUDGE_IDCHECK 2
|
||||
#define JUDGE_WEAPONCHECK 4
|
||||
#define JUDGE_RECORDCHECK 8
|
||||
#define JUDGE_EMAGGED (1<<0)
|
||||
#define JUDGE_IDCHECK (1<<1)
|
||||
#define JUDGE_WEAPONCHECK (1<<2)
|
||||
#define JUDGE_RECORDCHECK (1<<3)
|
||||
//ED209's ignore monkeys
|
||||
#define JUDGE_IGNOREMONKEYS 16
|
||||
#define JUDGE_IGNOREMONKEYS (1<<4)
|
||||
|
||||
#define MEGAFAUNA_DEFAULT_RECOVERY_TIME 5
|
||||
|
||||
#define SHADOW_SPECIES_LIGHT_THRESHOLD 0.2
|
||||
#define SHADOW_SPECIES_LIGHT_THRESHOLD 0.2
|
||||
|
||||
// Offsets defines
|
||||
|
||||
#define OFFSET_UNIFORM "uniform"
|
||||
#define OFFSET_ID "id"
|
||||
#define OFFSET_GLOVES "gloves"
|
||||
#define OFFSET_GLASSES "glasses"
|
||||
#define OFFSET_EARS "ears"
|
||||
#define OFFSET_SHOES "shoes"
|
||||
#define OFFSET_S_STORE "s_store"
|
||||
#define OFFSET_FACEMASK "mask"
|
||||
#define OFFSET_HEAD "head"
|
||||
#define OFFSET_FACE "face"
|
||||
#define OFFSET_BELT "belt"
|
||||
#define OFFSET_BACK "back"
|
||||
#define OFFSET_SUIT "suit"
|
||||
#define OFFSET_NECK "neck"
|
||||
|
||||
//MINOR TWEAKS/MISC
|
||||
#define AGE_MIN 18 //youngest a character can be //CITADEL EDIT - 17 --> 18
|
||||
#define AGE_MAX 85 //oldest a character can be
|
||||
#define WIZARD_AGE_MIN 30 //youngest a wizard can be
|
||||
#define APPRENTICE_AGE_MIN 29 //youngest an apprentice can be
|
||||
#define SHOES_SLOWDOWN 0 //How much shoes slow you down by default. Negative values speed you up
|
||||
#define POCKET_STRIP_DELAY 40 //time taken (in deciseconds) to search somebody's pockets
|
||||
#define DOOR_CRUSH_DAMAGE 15 //the amount of damage that airlocks deal when they crush you
|
||||
|
||||
#define HUNGER_FACTOR 0.1 //factor at which mob nutrition decreases
|
||||
#define REAGENTS_METABOLISM 0.4 //How many units of reagent are consumed per tick, by default.
|
||||
#define REAGENTS_EFFECT_MULTIPLIER (REAGENTS_METABOLISM / 0.4) // By defining the effect multiplier this way, it'll exactly adjust all effects according to how they originally were with the 0.4 metabolism
|
||||
|
||||
// Roundstart trait system
|
||||
|
||||
#define MAX_QUIRKS 6 //The maximum amount of quirks one character can have at roundstart
|
||||
|
||||
// AI Toggles
|
||||
#define AI_CAMERA_LUMINOSITY 5
|
||||
#define AI_VOX // Comment out if you don't want VOX to be enabled and have players download the voice sounds.
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
#define MONKEY_RESIST_PROB 50 // resist out of restraints
|
||||
// when the monkey is idle
|
||||
#define MONKEY_PULL_AGGRO_PROB 5 // aggro against the mob pulling it
|
||||
#define MONKEY_PICKUP_PROB 5 // if not currently getting an item, pickup an item around it
|
||||
#define MONKEY_STEAL_PROB 5 // if not currently getting an item, steal an item from someone around it
|
||||
#define MONKEY_SHENANIGAN_PROB 5 // chance of getting into mischief, i.e. finding/stealing items
|
||||
// when the monkey is hunting
|
||||
#define MONKEY_ATTACK_DISARM_PROB 50 // disarm an armed attacker
|
||||
#define MONKEY_WEAPON_PROB 20 // if not currently getting an item, search for a weapon around it
|
||||
@@ -35,4 +34,4 @@
|
||||
#define MONKEY_HUNT_FRUSTRATION_LIMIT 8 // Chase after an enemy before giving up
|
||||
#define MONKEY_DISPOSE_FRUSTRATION_LIMIT 16 // Dispose of a body before giving up
|
||||
|
||||
#define MONKEY_AGGRESSIVE_MVM_PROB 0 // If you mass edit monkies to be aggressive. there is a small chance of in-fighting
|
||||
#define MONKEY_AGGRESSIVE_MVM_PROB 0 // If you mass edit monkies to be aggressive. there is a small chance of in-fighting
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#define HID_RESTRICTED_END 101 //the first nonrestricted ID, automatically assigned on connection creation.
|
||||
|
||||
#define NETWORK_BROADCAST_ID "ALL"
|
||||
@@ -0,0 +1,32 @@
|
||||
// Flags for the obj_flags var on /obj
|
||||
|
||||
|
||||
#define EMAGGED (1<<0)
|
||||
#define IN_USE (1<<1) // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
|
||||
#define CAN_BE_HIT (1<<2) //can this be bludgeoned by items?
|
||||
#define BEING_SHOCKED (1<<3) // Whether this thing is currently (already) being shocked by a tesla
|
||||
#define DANGEROUS_POSSESSION (1<<4) //Admin possession yes/no
|
||||
#define ON_BLUEPRINTS (1<<5) //Are we visible on the station blueprints at roundstart?
|
||||
#define UNIQUE_RENAME (1<<6) // can you customize the description/name of the thing?
|
||||
#define USES_TGUI (1<<7) //put on things that use tgui on ui_interact instead of custom/old UI.
|
||||
#define FROZEN (1<<8)
|
||||
|
||||
// If you add new ones, be sure to add them to /obj/Initialize as well for complete mapping support
|
||||
|
||||
// Flags for the item_flags var on /obj/item
|
||||
|
||||
#define BEING_REMOVED (1<<0)
|
||||
#define IN_INVENTORY (1<<1) //is this item equipped into an inventory slot or hand of a mob? used for tooltips
|
||||
#define FORCE_STRING_OVERRIDE (1<<2) // used for tooltips
|
||||
#define NEEDS_PERMIT (1<<3) //Used by security bots to determine if this item is safe for public use.
|
||||
#define SLOWS_WHILE_IN_HAND (1<<4)
|
||||
#define NO_MAT_REDEMPTION (1<<5) // Stops you from putting things like an RCD or other items into an ORM or protolathe for materials.
|
||||
|
||||
// Flags for the clothing_flags var on /obj/item/clothing
|
||||
|
||||
#define LAVAPROTECT (1<<0)
|
||||
#define STOPSPRESSUREDAMAGE (1<<1) //SUIT and HEAD items which stop pressure damage. To stop you taking all pressure damage you must have both a suit and head item with this flag.
|
||||
#define BLOCK_GAS_SMOKE_EFFECT (1<<2) // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY!
|
||||
#define MASKINTERNALS (1<<3) // mask allows internals
|
||||
#define NOSLIP (1<<4) //prevents from slipping on wet floors, in space etc
|
||||
#define THICKMATERIAL (1<<5) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body.
|
||||
@@ -1,45 +1,18 @@
|
||||
/*
|
||||
PIPE CONSTRUCTION DEFINES
|
||||
Update these any time a path is changed
|
||||
Construction breaks otherwise
|
||||
*/
|
||||
//Construction Categories
|
||||
#define PIPE_STRAIGHT 0 //2 directions: N/S, E/W
|
||||
#define PIPE_BENDABLE 1 //6 directions: N/S, E/W, N/E, N/W, S/E, S/W
|
||||
#define PIPE_TRINARY 2 //4 directions: N/E/S, E/S/W, S/W/N, W/N/E
|
||||
#define PIPE_TRIN_M 3 //8 directions: N->S+E, S->N+E, N->S+W, S->N+W, E->W+S, W->E+S, E->W+N, W->E+N
|
||||
#define PIPE_UNARY 4 //4 directions: N, S, E, W
|
||||
#define PIPE_ONEDIR 5 //1 direction: N/S/E/W
|
||||
#define PIPE_UNARY_FLIPPABLE 6 //8 directions: N/S/E/W/N-flipped/S-flipped/E-flipped/W-flipped
|
||||
|
||||
//Pipes
|
||||
#define PIPE_SIMPLE /obj/machinery/atmospherics/pipe/simple
|
||||
#define PIPE_MANIFOLD /obj/machinery/atmospherics/pipe/manifold
|
||||
#define PIPE_4WAYMANIFOLD /obj/machinery/atmospherics/pipe/manifold4w
|
||||
#define PIPE_HE /obj/machinery/atmospherics/pipe/heat_exchanging/simple
|
||||
#define PIPE_HE_MANIFOLD /obj/machinery/atmospherics/pipe/heat_exchanging/manifold
|
||||
#define PIPE_HE_4WAYMANIFOLD /obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w
|
||||
#define PIPE_JUNCTION /obj/machinery/atmospherics/pipe/heat_exchanging/junction
|
||||
//Unary
|
||||
#define PIPE_CONNECTOR /obj/machinery/atmospherics/components/unary/portables_connector
|
||||
#define PIPE_UVENT /obj/machinery/atmospherics/components/unary/vent_pump
|
||||
#define PIPE_SCRUBBER /obj/machinery/atmospherics/components/unary/vent_scrubber
|
||||
#define PIPE_INJECTOR /obj/machinery/atmospherics/components/unary/outlet_injector
|
||||
#define PIPE_HEAT_EXCHANGE /obj/machinery/atmospherics/components/unary/heat_exchanger
|
||||
//Binary
|
||||
#define PIPE_PUMP /obj/machinery/atmospherics/components/binary/pump
|
||||
#define PIPE_PASSIVE_GATE /obj/machinery/atmospherics/components/binary/passive_gate
|
||||
#define PIPE_VOLUME_PUMP /obj/machinery/atmospherics/components/binary/volume_pump
|
||||
#define PIPE_MVALVE /obj/machinery/atmospherics/components/binary/valve
|
||||
#define PIPE_DVALVE /obj/machinery/atmospherics/components/binary/valve/digital
|
||||
//Trinary
|
||||
#define PIPE_GAS_FILTER /obj/machinery/atmospherics/components/trinary/filter
|
||||
#define PIPE_GAS_MIXER /obj/machinery/atmospherics/components/trinary/mixer
|
||||
|
||||
//Disposal piping numbers - do NOT hardcode these, use the defines
|
||||
#define DISP_PIPE_STRAIGHT 0
|
||||
#define DISP_PIPE_BENT 1
|
||||
#define DISP_JUNCTION 2
|
||||
#define DISP_JUNCTION_FLIP 3
|
||||
#define DISP_YJUNCTION 4
|
||||
#define DISP_END_TRUNK 5
|
||||
#define DISP_END_BIN 6
|
||||
#define DISP_END_OUTLET 7
|
||||
#define DISP_END_CHUTE 8
|
||||
#define DISP_SORTJUNCTION 9
|
||||
#define DISP_SORTJUNCTION_FLIP 10
|
||||
//Disposal pipe relative connection directions
|
||||
#define DISP_DIR_BASE 0
|
||||
#define DISP_DIR_LEFT 1
|
||||
#define DISP_DIR_RIGHT 2
|
||||
#define DISP_DIR_FLIP 4
|
||||
#define DISP_DIR_NONE 8
|
||||
|
||||
//Transit tubes
|
||||
#define TRANSIT_TUBE_STRAIGHT 0
|
||||
@@ -56,4 +29,4 @@ Construction breaks otherwise
|
||||
#define STATION_TUBE_OPEN 0
|
||||
#define STATION_TUBE_OPENING 1
|
||||
#define STATION_TUBE_CLOSED 2
|
||||
#define STATION_TUBE_CLOSING 3
|
||||
#define STATION_TUBE_CLOSING 3
|
||||
|
||||
@@ -1,52 +1,53 @@
|
||||
|
||||
//Preference toggles
|
||||
#define SOUND_ADMINHELP 1
|
||||
#define SOUND_MIDI 2
|
||||
#define SOUND_AMBIENCE 4
|
||||
#define SOUND_LOBBY 8
|
||||
#define MEMBER_PUBLIC 16
|
||||
#define INTENT_STYLE 32
|
||||
#define MIDROUND_ANTAG 64
|
||||
#define SOUND_INSTRUMENTS 128
|
||||
#define SOUND_SHIP_AMBIENCE 256
|
||||
#define SOUND_PRAYERS 512
|
||||
#define ANNOUNCE_LOGIN 1024
|
||||
#define SOUND_ANNOUNCEMENTS 2048
|
||||
#define DISABLE_DEATHRATTLE 4096
|
||||
#define DISABLE_ARRIVALRATTLE 8192
|
||||
|
||||
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS)
|
||||
|
||||
//Chat toggles
|
||||
#define CHAT_OOC 1
|
||||
#define CHAT_DEAD 2
|
||||
#define CHAT_GHOSTEARS 4
|
||||
#define CHAT_GHOSTSIGHT 8
|
||||
#define CHAT_PRAYER 16
|
||||
#define CHAT_RADIO 32
|
||||
#define CHAT_PULLR 64
|
||||
#define CHAT_GHOSTWHISPER 128
|
||||
#define CHAT_GHOSTPDA 256
|
||||
#define CHAT_GHOSTRADIO 512
|
||||
#define CHAT_LOOC 1024
|
||||
|
||||
#define TOGGLES_DEFAULT_CHAT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_PULLR|CHAT_GHOSTWHISPER|CHAT_GHOSTPDA|CHAT_GHOSTRADIO|CHAT_LOOC)
|
||||
|
||||
#define PARALLAX_INSANE -1 //for show offs
|
||||
#define PARALLAX_HIGH 0 //default.
|
||||
#define PARALLAX_MED 1
|
||||
#define PARALLAX_LOW 2
|
||||
#define PARALLAX_DISABLE 3 //this option must be the highest number
|
||||
|
||||
#define PARALLAX_DELAY_DEFAULT world.tick_lag
|
||||
#define PARALLAX_DELAY_MED 1
|
||||
#define PARALLAX_DELAY_LOW 2
|
||||
|
||||
#define SEC_DEPT_NONE "None"
|
||||
#define SEC_DEPT_RANDOM "Random"
|
||||
#define SEC_DEPT_ENGINEERING "Engineering"
|
||||
#define SEC_DEPT_MEDICAL "Medical"
|
||||
#define SEC_DEPT_SCIENCE "Science"
|
||||
|
||||
//Preference toggles
|
||||
#define SOUND_ADMINHELP (1<<0)
|
||||
#define SOUND_MIDI (1<<1)
|
||||
#define SOUND_AMBIENCE (1<<2)
|
||||
#define SOUND_LOBBY (1<<3)
|
||||
#define MEMBER_PUBLIC (1<<4)
|
||||
#define INTENT_STYLE (1<<5)
|
||||
#define MIDROUND_ANTAG (1<<6)
|
||||
#define SOUND_INSTRUMENTS (1<<7)
|
||||
#define SOUND_SHIP_AMBIENCE (1<<8)
|
||||
#define SOUND_PRAYERS (1<<9)
|
||||
#define ANNOUNCE_LOGIN (1<<10)
|
||||
#define SOUND_ANNOUNCEMENTS (1<<11)
|
||||
#define DISABLE_DEATHRATTLE (1<<12)
|
||||
#define DISABLE_ARRIVALRATTLE (1<<13)
|
||||
#define COMBOHUD_LIGHTING (1<<14)
|
||||
|
||||
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS)
|
||||
|
||||
//Chat toggles
|
||||
#define CHAT_OOC (1<<0)
|
||||
#define CHAT_DEAD (1<<1)
|
||||
#define CHAT_GHOSTEARS (1<<2)
|
||||
#define CHAT_GHOSTSIGHT (1<<3)
|
||||
#define CHAT_PRAYER (1<<4)
|
||||
#define CHAT_RADIO (1<<5)
|
||||
#define CHAT_PULLR (1<<6)
|
||||
#define CHAT_GHOSTWHISPER (1<<7)
|
||||
#define CHAT_GHOSTPDA (1<<8)
|
||||
#define CHAT_GHOSTRADIO (1<<9)
|
||||
#define CHAT_LOOC (1<<10)
|
||||
|
||||
#define TOGGLES_DEFAULT_CHAT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_PULLR|CHAT_GHOSTWHISPER|CHAT_GHOSTPDA|CHAT_GHOSTRADIO|CHAT_LOOC)
|
||||
|
||||
#define PARALLAX_INSANE -1 //for show offs
|
||||
#define PARALLAX_HIGH 0 //default.
|
||||
#define PARALLAX_MED 1
|
||||
#define PARALLAX_LOW 2
|
||||
#define PARALLAX_DISABLE 3 //this option must be the highest number
|
||||
|
||||
#define PARALLAX_DELAY_DEFAULT world.tick_lag
|
||||
#define PARALLAX_DELAY_MED 1
|
||||
#define PARALLAX_DELAY_LOW 2
|
||||
|
||||
#define SEC_DEPT_NONE "None"
|
||||
#define SEC_DEPT_RANDOM "Random"
|
||||
#define SEC_DEPT_ENGINEERING "Engineering"
|
||||
#define SEC_DEPT_MEDICAL "Medical"
|
||||
#define SEC_DEPT_SCIENCE "Science"
|
||||
#define SEC_DEPT_SUPPLY "Supply"
|
||||
|
||||
// Playtime tracking system, see jobs_exp.dm
|
||||
@@ -63,6 +64,7 @@
|
||||
#define EXP_TYPE_ANTAG "Antag"
|
||||
#define EXP_TYPE_SPECIAL "Special"
|
||||
#define EXP_TYPE_GHOST "Ghost"
|
||||
#define EXP_TYPE_ADMIN "Admin"
|
||||
|
||||
//Flags in the players table in the db
|
||||
#define DB_FLAG_EXEMPT 1
|
||||
#define DB_FLAG_EXEMPT 1
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#define PROFILE_START ;PROFILE_STORE = list();PROFILE_SET;
|
||||
#define PROFILE_STOP ;PROFILE_STORE = null;
|
||||
|
||||
#define PROFILE_SET ;PROFILE_TIME = TICK_USAGE_REAL; PROFILE_LINE = __LINE__; PROFILE_FILE = __FILE__; PROFILE_SLEEPCHECK = world.time;
|
||||
|
||||
#define PROFILE_TICK ;\
|
||||
if (PROFILE_STORE) {\
|
||||
var/PROFILE_TICK_USAGE_REAL = TICK_USAGE_REAL;\
|
||||
if (PROFILE_SLEEPCHECK == world.time) {\
|
||||
var/PROFILE_STRING = "[PROFILE_FILE]:[PROFILE_LINE] - [__FILE__]:[__LINE__]";\
|
||||
var/list/PROFILE_ITEM = PROFILE_STORE[PROFILE_STRING];\
|
||||
if (!PROFILE_ITEM) {\
|
||||
PROFILE_ITEM = new(PROFILE_ITEM_LEN);\
|
||||
PROFILE_STORE[PROFILE_STRING] = PROFILE_ITEM;\
|
||||
PROFILE_ITEM[PROFILE_ITEM_TIME] = 0;\
|
||||
PROFILE_ITEM[PROFILE_ITEM_COUNT] = 0;\
|
||||
};\
|
||||
PROFILE_ITEM[PROFILE_ITEM_TIME] += TICK_DELTA_TO_MS(PROFILE_TICK_USAGE_REAL-PROFILE_TIME);\
|
||||
var/PROFILE_INCR_AMOUNT = min(1, 2**round(PROFILE_ITEM[PROFILE_ITEM_COUNT]/SHORT_REAL_LIMIT));\
|
||||
if (prob(100/PROFILE_INCR_AMOUNT)) {\
|
||||
PROFILE_ITEM[PROFILE_ITEM_COUNT] += PROFILE_INCR_AMOUNT;\
|
||||
};\
|
||||
};\
|
||||
PROFILE_SET;\
|
||||
};
|
||||
|
||||
#define PROFILE_ITEM_LEN 2
|
||||
#define PROFILE_ITEM_TIME 1
|
||||
#define PROFILE_ITEM_COUNT 2
|
||||
@@ -8,6 +8,7 @@
|
||||
#define QDEL_HINT_HARDDEL_NOW 4 //qdel should assume this object won't gc, and hard del it post haste.
|
||||
#define QDEL_HINT_FINDREFERENCE 5 //functionally identical to QDEL_HINT_QUEUE if TESTING is not enabled in _compiler_options.dm.
|
||||
//if TESTING is enabled, qdel will call this object's find_references() verb.
|
||||
#define QDEL_HINT_IFFAIL_FINDREFERENCE 6 //Above but only if gc fails.
|
||||
//defines for the gc_destroyed var
|
||||
|
||||
#define GC_QUEUE_PREQUEUE 1
|
||||
@@ -22,3 +23,4 @@
|
||||
#define QDELING(X) (X.gc_destroyed)
|
||||
#define QDELETED(X) (!X || QDELING(X))
|
||||
#define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
These defines are the balancing points of various parts of the radiation system.
|
||||
Changes here can have widespread effects: make sure you test well.
|
||||
Ask ninjanomnom if they're around
|
||||
*/
|
||||
|
||||
#define RAD_BACKGROUND_RADIATION 9 // How much radiation is harmless to a mob, this is also when radiation waves stop spreading
|
||||
// WARNING: Lowering this value significantly increases SSradiation load
|
||||
|
||||
// apply_effect((amount*RAD_MOB_COEFFICIENT)/max(1, (radiation**2)*RAD_OVERDOSE_REDUCTION), IRRADIATE, blocked)
|
||||
#define RAD_MOB_COEFFICIENT 0.20 // Radiation applied is multiplied by this
|
||||
#define RAD_MOB_SKIN_PROTECTION ((1/RAD_MOB_COEFFICIENT)+RAD_BACKGROUND_RADIATION)
|
||||
|
||||
#define RAD_LOSS_PER_TICK 0.5
|
||||
#define RAD_TOX_COEFFICIENT 0.05 // Toxin damage per tick coefficient
|
||||
#define RAD_OVERDOSE_REDUCTION 0.000001 // Coefficient to the reduction in applied rads once the thing, usualy mob, has too much radiation
|
||||
// WARNING: This number is highly sensitive to change, graph is first for best results
|
||||
#define RAD_BURN_THRESHOLD 1000 // Applied radiation must be over this to burn
|
||||
|
||||
#define RAD_MOB_SAFE 500 // How much stored radiation in a mob with no ill effects
|
||||
|
||||
#define RAD_MOB_HAIRLOSS 800 // How much stored radiation to check for hair loss
|
||||
|
||||
#define RAD_MOB_MUTATE 1250 // How much stored radiation to check for mutation
|
||||
|
||||
#define RAD_MOB_VOMIT 2000 // The amount of radiation to check for vomitting
|
||||
#define RAD_MOB_VOMIT_PROB 1 // Chance per tick of vomitting
|
||||
|
||||
#define RAD_MOB_KNOCKDOWN 2000 // How much stored radiation to check for stunning
|
||||
#define RAD_MOB_KNOCKDOWN_PROB 1 // Chance of knockdown per tick when over threshold
|
||||
#define RAD_MOB_KNOCKDOWN_AMOUNT 3 // Amount of knockdown when it occurs
|
||||
|
||||
#define RAD_NO_INSULATION 1.0 // For things that shouldn't become irradiated for whatever reason
|
||||
#define RAD_VERY_LIGHT_INSULATION 0.9 // What girders have
|
||||
#define RAD_LIGHT_INSULATION 0.8
|
||||
#define RAD_MEDIUM_INSULATION 0.7 // What common walls have
|
||||
#define RAD_HEAVY_INSULATION 0.6 // What reinforced walls have
|
||||
#define RAD_EXTREME_INSULATION 0.5 // What rad collectors have
|
||||
#define RAD_FULL_INSULATION 0 // Unused
|
||||
|
||||
// WARNING: The deines below could have disastrous consequences if tweaked incorrectly. See: The great SM purge of Oct.6.2017
|
||||
// contamination_chance = (strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_CHANCE_COEFFICIENT * min(1/(steps*RAD_DISTANCE_COEFFICIENT), 1))
|
||||
// contamination_strength = (strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_STR_COEFFICIENT
|
||||
#define RAD_MINIMUM_CONTAMINATION 350 // How strong does a radiation wave have to be to contaminate objects
|
||||
#define RAD_CONTAMINATION_CHANCE_COEFFICIENT 0.005 // Higher means higher strength scaling contamination chance
|
||||
#define RAD_CONTAMINATION_STR_COEFFICIENT 0.3 // Higher means higher strength scaling contamination strength
|
||||
#define RAD_DISTANCE_COEFFICIENT 1 // Lower means further rad spread
|
||||
|
||||
#define RAD_HALF_LIFE 90 // The half-life of contaminated objects
|
||||
+54
-4
@@ -1,5 +1,55 @@
|
||||
#define MIN_FREE_FREQ 1201
|
||||
#define MAX_FREE_FREQ 1599
|
||||
// Radios use a large variety of predefined frequencies.
|
||||
|
||||
#define MIN_FREQ 1441
|
||||
#define MAX_FREQ 1489
|
||||
#define MIN_FREE_FREQ 1201 // -------------------------------------------------
|
||||
// Frequencies are always odd numbers and range from 1201 to 1599.
|
||||
|
||||
#define FREQ_SYNDICATE 1213 // Nuke op comms frequency, dark brown
|
||||
#define FREQ_CTF_RED 1215 // CTF red team comms frequency, red
|
||||
#define FREQ_CTF_BLUE 1217 // CTF blue team comms frequency, blue
|
||||
#define FREQ_CENTCOM 1337 // CentCom comms frequency, gray
|
||||
#define FREQ_SUPPLY 1347 // Supply comms frequency, light brown
|
||||
#define FREQ_SERVICE 1349 // Service comms frequency, green
|
||||
#define FREQ_SCIENCE 1351 // Science comms frequency, plum
|
||||
#define FREQ_COMMAND 1353 // Command comms frequency, gold
|
||||
#define FREQ_MEDICAL 1355 // Medical comms frequency, soft blue
|
||||
#define FREQ_ENGINEERING 1357 // Engineering comms frequency, orange
|
||||
#define FREQ_SECURITY 1359 // Security comms frequency, red
|
||||
|
||||
#define FREQ_STATUS_DISPLAYS 1435
|
||||
#define FREQ_ATMOS_ALARMS 1437 // air alarms <-> alert computers
|
||||
#define FREQ_ATMOS_CONTROL 1439 // air alarms <-> vents and scrubbers
|
||||
|
||||
#define MIN_FREQ 1441 // ------------------------------------------------------
|
||||
// Only the 1441 to 1489 range is freely available for general conversation.
|
||||
// This represents 1/8th of the available spectrum.
|
||||
|
||||
#define FREQ_ATMOS_STORAGE 1441
|
||||
#define FREQ_NAV_BEACON 1445
|
||||
#define FREQ_AI_PRIVATE 1447 // AI private comms frequency, magenta
|
||||
#define FREQ_PRESSURE_PLATE 1447
|
||||
#define FREQ_AIRLOCK_CONTROL 1449
|
||||
#define FREQ_ELECTROPACK 1449
|
||||
#define FREQ_MAGNETS 1449
|
||||
#define FREQ_LOCATOR_IMPLANT 1451
|
||||
#define FREQ_SIGNALER 1457 // the default for new signalers
|
||||
#define FREQ_COMMON 1459 // Common comms frequency, dark green
|
||||
|
||||
#define MAX_FREQ 1489 // ------------------------------------------------------
|
||||
|
||||
#define MAX_FREE_FREQ 1599 // -------------------------------------------------
|
||||
|
||||
// Transmission types.
|
||||
#define TRANSMISSION_WIRE 0 // some sort of wired connection, not used
|
||||
#define TRANSMISSION_RADIO 1 // electromagnetic radiation (default)
|
||||
#define TRANSMISSION_SUBSPACE 2 // subspace transmission (headsets only)
|
||||
#define TRANSMISSION_SUPERSPACE 3 // reaches independent (CentCom) radios only
|
||||
|
||||
// Filter types, used as an optimization to avoid unnecessary proc calls.
|
||||
#define RADIO_TO_AIRALARM "to_airalarm"
|
||||
#define RADIO_FROM_AIRALARM "from_airalarm"
|
||||
#define RADIO_SIGNALER "signaler"
|
||||
#define RADIO_ATMOSIA "atmosia"
|
||||
#define RADIO_AIRLOCK "airlock"
|
||||
#define RADIO_MAGNETS "magnets"
|
||||
|
||||
#define DEFAULT_SIGNALER_CODE 30
|
||||
|
||||
+28
-12
@@ -1,14 +1,30 @@
|
||||
#define SOLID 1
|
||||
#define LIQUID 2
|
||||
#define GAS 3
|
||||
#define SOLID 1
|
||||
#define LIQUID 2
|
||||
#define GAS 3
|
||||
|
||||
#define INJECTABLE_1 1024 //Makes reagents addable through droppers and syringes
|
||||
#define DRAWABLE_1 2048 //If a syringe can draw from it
|
||||
#define OPENCONTAINER_1 4096 //Is an open container for chemistry purposes
|
||||
#define TRANSPARENT_1 8192 //Used for non-open containers which you still want to be able to see the reagents off.
|
||||
|
||||
#define TOUCH 1 //splashing
|
||||
#define INGEST 2 //ingestion
|
||||
#define VAPOR 3 //foam, spray, blob attack
|
||||
#define PATCH 4 //patches
|
||||
#define INJECT 5 //injection
|
||||
// container_type defines
|
||||
#define INJECTABLE (1<<0) // Makes it possible to add reagents through droppers and syringes.
|
||||
#define DRAWABLE (1<<1) // Makes it possible to remove reagents through syringes.
|
||||
|
||||
#define REFILLABLE (1<<2) // Makes it possible to add reagents through any reagent container.
|
||||
#define DRAINABLE (1<<3) // Makes it possible to remove reagents through any reagent container.
|
||||
|
||||
#define TRANSPARENT (1<<4) // Used on containers which you want to be able to see the reagents off.
|
||||
#define AMOUNT_VISIBLE (1<<5) // For non-transparent containers that still have the general amount of reagents in them visible.
|
||||
|
||||
// Is an open container for all intents and purposes.
|
||||
#define OPENCONTAINER (REFILLABLE | DRAINABLE | TRANSPARENT)
|
||||
|
||||
|
||||
#define TOUCH 1 // splashing
|
||||
#define INGEST 2 // ingestion
|
||||
#define VAPOR 3 // foam, spray, blob attack
|
||||
#define PATCH 4 // patches
|
||||
#define INJECT 5 // injection
|
||||
|
||||
|
||||
//defines passed through to the on_reagent_change proc
|
||||
#define DEL_REAGENT 1 // reagent deleted (fully cleared)
|
||||
#define ADD_REAGENT 2 // reagent added
|
||||
#define REM_REAGENT 3 // reagent removed (may still exist)
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
|
||||
#define RDCONSOLE_UI_MODE_NORMAL 1
|
||||
#define RDCONSOLE_UI_MODE_EXPERT 2
|
||||
#define RDCONSOLE_UI_MODE_LIST 3
|
||||
|
||||
//RDSCREEN screens
|
||||
#define RDSCREEN_MENU 0
|
||||
#define RDSCREEN_TECHDISK 1
|
||||
#define RDSCREEN_DESIGNDISK 20
|
||||
#define RDSCREEN_DESIGNDISK_UPLOAD 21
|
||||
#define RDSCREEN_DECONSTRUCT 3
|
||||
#define RDSCREEN_PROTOLATHE 40
|
||||
#define RDSCREEN_PROTOLATHE_MATERIALS 41
|
||||
#define RDSCREEN_PROTOLATHE_CHEMICALS 42
|
||||
#define RDSCREEN_PROTOLATHE_CATEGORY_VIEW 43
|
||||
#define RDSCREEN_PROTOLATHE_SEARCH 44
|
||||
#define RDSCREEN_IMPRINTER 50
|
||||
#define RDSCREEN_IMPRINTER_MATERIALS 51
|
||||
#define RDSCREEN_IMPRINTER_CHEMICALS 52
|
||||
#define RDSCREEN_IMPRINTER_CATEGORY_VIEW 53
|
||||
#define RDSCREEN_IMPRINTER_SEARCH 54
|
||||
#define RDSCREEN_SETTINGS 61
|
||||
#define RDSCREEN_DEVICE_LINKING 62
|
||||
#define RDSCREEN_TECHWEB 70
|
||||
#define RDSCREEN_TECHWEB_NODEVIEW 71
|
||||
#define RDSCREEN_TECHWEB_DESIGNVIEW 72
|
||||
|
||||
#define RDSCREEN_NOBREAK "<NO_HTML_BREAK>"
|
||||
|
||||
#define RDSCREEN_TEXT_NO_PROTOLATHE "<div><h3>No Protolathe Linked!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_IMPRINTER "<div><h3>No Circuit Imprinter Linked!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_DECONSTRUCT "<div><h3>No Destructive Analyzer Linked!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_TDISK "<div><h3>No Technology Disk Inserted!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_DDISK "<div><h3>No Design Disk Inserted!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_SNODE "<div><h3>No Technology Node Selected!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_SDESIGN "<div><h3>No Design Selected!</h3></div><br>"
|
||||
|
||||
#define RDSCREEN_UI_LATHE_CHECK if(QDELETED(linked_lathe)) { return RDSCREEN_TEXT_NO_PROTOLATHE }
|
||||
#define RDSCREEN_UI_IMPRINTER_CHECK if(QDELETED(linked_imprinter)) { return RDSCREEN_TEXT_NO_IMPRINTER }
|
||||
#define RDSCREEN_UI_DECONSTRUCT_CHECK if(QDELETED(linked_destroy)) { return RDSCREEN_TEXT_NO_DECONSTRUCT }
|
||||
#define RDSCREEN_UI_TDISK_CHECK if(QDELETED(t_disk)) { return RDSCREEN_TEXT_NO_TDISK }
|
||||
#define RDSCREEN_UI_DDISK_CHECK if(QDELETED(d_disk)) { return RDSCREEN_TEXT_NO_DDISK }
|
||||
#define RDSCREEN_UI_SNODE_CHECK if(!selected_node) { return RDSCREEN_TEXT_NO_SNODE }
|
||||
#define RDSCREEN_UI_SDESIGN_CHECK if(!selected_design) { return RDSCREEN_TEXT_NO_SDESIGN }
|
||||
|
||||
#define RESEARCH_FABRICATOR_SCREEN_MAIN 1
|
||||
#define RESEARCH_FABRICATOR_SCREEN_CHEMICALS 2
|
||||
#define RESEARCH_FABRICATOR_SCREEN_MATERIALS 3
|
||||
#define RESEARCH_FABRICATOR_SCREEN_SEARCH 4
|
||||
#define RESEARCH_FABRICATOR_SCREEN_CATEGORYVIEW 5
|
||||
|
||||
#define DEPARTMENTAL_FLAG_SECURITY (1<<0)
|
||||
#define DEPARTMENTAL_FLAG_MEDICAL (1<<1)
|
||||
#define DEPARTMENTAL_FLAG_CARGO (1<<2)
|
||||
#define DEPARTMENTAL_FLAG_SCIENCE (1<<3)
|
||||
#define DEPARTMENTAL_FLAG_ENGINEERING (1<<4)
|
||||
#define DEPARTMENTAL_FLAG_SERVICE (1<<5)
|
||||
#define DEPARTMENTAL_FLAG_ALL (1<<6) //NO THIS DOESN'T ALLOW YOU TO PRINT EVERYTHING, IT'S FOR ALL DEPARTMENTS!
|
||||
//#define DEPARTMENTAL_FLAG_MINING (1<<7)
|
||||
|
||||
#define DESIGN_ID_IGNORE "IGNORE_THIS_DESIGN"
|
||||
|
||||
#define RESEARCH_MATERIAL_RECLAMATION_ID "__materials"
|
||||
|
||||
//When adding new types, update the list below!
|
||||
#define TECHWEB_POINT_TYPE_GENERIC "General Research"
|
||||
|
||||
#define TECHWEB_POINT_TYPE_DEFAULT TECHWEB_POINT_TYPE_GENERIC
|
||||
|
||||
//defined here so people don't forget to change this!
|
||||
#define TECHWEB_POINT_TYPE_LIST_ASSOCIATIVE_NAMES list(\
|
||||
TECHWEB_POINT_TYPE_GENERIC = "General Research"\
|
||||
)
|
||||
@@ -29,11 +29,12 @@
|
||||
#define BOT_NO_ROUTE 17 // no destination beacon found (or no route)
|
||||
|
||||
//Bot types
|
||||
#define SEC_BOT 1 // Secutritrons (Beepsky) and ED-209s
|
||||
#define MULE_BOT 2 // MULEbots
|
||||
#define FLOOR_BOT 4 // Floorbots
|
||||
#define CLEAN_BOT 8 // Cleanbots
|
||||
#define MED_BOT 16 // Medibots
|
||||
#define SEC_BOT (1<<0) // Secutritrons (Beepsky) and ED-209s
|
||||
#define MULE_BOT (1<<1) // MULEbots
|
||||
#define FLOOR_BOT (1<<2) // Floorbots
|
||||
#define CLEAN_BOT (1<<3) // Cleanbots
|
||||
#define MED_BOT (1<<4) // Medibots
|
||||
#define HONK_BOT (1<<5) // Honkbots & ED-Honks
|
||||
|
||||
//AI notification defines
|
||||
#define NEW_BORG 1
|
||||
@@ -41,3 +42,10 @@
|
||||
#define RENAME 3
|
||||
#define AI_SHELL 4
|
||||
#define DISCONNECT 5
|
||||
|
||||
//Assembly defines
|
||||
#define ASSEMBLY_FIRST_STEP 0
|
||||
#define ASSEMBLY_SECOND_STEP 1
|
||||
#define ASSEMBLY_THIRD_STEP 2
|
||||
#define ASSEMBLY_FOURTH_STEP 3
|
||||
#define ASSEMBLY_FIFTH_STEP 4
|
||||
|
||||
@@ -6,12 +6,14 @@
|
||||
|
||||
//These are synced with the Database, if you change the values of the defines
|
||||
//then you MUST update the database!
|
||||
#define ROLE_SYNDICATE "Syndicate"
|
||||
#define ROLE_TRAITOR "traitor"
|
||||
#define ROLE_OPERATIVE "operative"
|
||||
#define ROLE_CHANGELING "changeling"
|
||||
#define ROLE_WIZARD "wizard"
|
||||
#define ROLE_MALF "malf AI"
|
||||
#define ROLE_REV "revolutionary"
|
||||
#define ROLE_REV_HEAD "Head Revolutionary"
|
||||
#define ROLE_ALIEN "xenomorph"
|
||||
#define ROLE_PAI "pAI"
|
||||
#define ROLE_CULTIST "cultist"
|
||||
@@ -22,8 +24,9 @@
|
||||
#define ROLE_REVENANT "revenant"
|
||||
#define ROLE_DEVIL "devil"
|
||||
#define ROLE_SERVANT_OF_RATVAR "servant of Ratvar"
|
||||
#define ROLE_BORER "borer"
|
||||
#define ROLE_BROTHER "blood brother"
|
||||
#define ROLE_BRAINWASHED "brainwashed victim"
|
||||
#define ROLE_MISCREANT "miscreant"
|
||||
|
||||
//Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR.
|
||||
//The gamemode specific ones are just so the gamemodes can query whether a player is old enough
|
||||
@@ -39,17 +42,17 @@ GLOBAL_LIST_INIT(special_roles, list(
|
||||
ROLE_ALIEN,
|
||||
ROLE_PAI,
|
||||
ROLE_CULTIST = /datum/game_mode/cult,
|
||||
ROLE_BLOB = /datum/game_mode/blob,
|
||||
ROLE_BLOB,
|
||||
ROLE_NINJA,
|
||||
ROLE_MONKEY = /datum/game_mode/monkey,
|
||||
ROLE_REVENANT,
|
||||
ROLE_ABDUCTOR = /datum/game_mode/abduction,
|
||||
ROLE_ABDUCTOR,
|
||||
ROLE_DEVIL = /datum/game_mode/devil,
|
||||
ROLE_BORER,
|
||||
ROLE_SERVANT_OF_RATVAR = /datum/game_mode/clockwork_cult
|
||||
ROLE_SERVANT_OF_RATVAR = /datum/game_mode/clockwork_cult,
|
||||
ROLE_MISCREANT
|
||||
))
|
||||
|
||||
//Job defines for what happens when you fail to qualify for any job during job selection
|
||||
#define BEASSISTANT 1
|
||||
#define BEOVERFLOW 1
|
||||
#define BERANDOMJOB 2
|
||||
#define RETURNTOLOBBY 3
|
||||
|
||||
+17
-4
@@ -17,6 +17,7 @@
|
||||
#define MODE_HOLOPAD "holopad"
|
||||
#define MODE_CHANGELING "changeling"
|
||||
#define MODE_VOCALCORDS "cords"
|
||||
#define MODE_MONKEY "monkeyhive"
|
||||
|
||||
//Spans. Robot speech, italics, etc. Applied in compose_message().
|
||||
#define SPAN_ROBOT "robot"
|
||||
@@ -37,9 +38,9 @@
|
||||
#define EAVESDROP_EXTRA_RANGE 1 //how much past the specified message_range does the message get starred, whispering only
|
||||
|
||||
// A link given to ghost alice to follow bob
|
||||
#define FOLLOW_LINK(alice, bob) "<a href=?src=\ref[alice];follow=\ref[bob]>(F)</a>"
|
||||
#define TURF_LINK(alice, turfy) "<a href=?src=\ref[alice];x=[turfy.x];y=[turfy.y];z=[turfy.z]>(T)</a>"
|
||||
#define FOLLOW_OR_TURF_LINK(alice, bob, turfy) "<a href=?src=\ref[alice];follow=\ref[bob];x=[turfy.x];y=[turfy.y];z=[turfy.z]>(F)</a>"
|
||||
#define FOLLOW_LINK(alice, bob) "<a href=?src=[REF(alice)];follow=[REF(bob)]>(F)</a>"
|
||||
#define TURF_LINK(alice, turfy) "<a href=?src=[REF(alice)];x=[turfy.x];y=[turfy.y];z=[turfy.z]>(T)</a>"
|
||||
#define FOLLOW_OR_TURF_LINK(alice, bob, turfy) "<a href=?src=[REF(alice)];follow=[REF(bob)];x=[turfy.x];y=[turfy.y];z=[turfy.z]>(F)</a>"
|
||||
|
||||
#define LOGSAY "say"
|
||||
#define LOGWHISPER "whisper"
|
||||
@@ -49,4 +50,16 @@
|
||||
#define LOGCHAT "chat"
|
||||
#define LOGASAY "adminsay"
|
||||
#define LOGCOMMENT "comment"
|
||||
#define LOGOOC "ooc"
|
||||
#define LOGOOC "ooc"
|
||||
|
||||
|
||||
#define LINGHIVE_NONE 0
|
||||
#define LINGHIVE_OUTSIDER 1
|
||||
#define LINGHIVE_LING 2
|
||||
#define LINGHIVE_LINK 3
|
||||
|
||||
//Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam
|
||||
#define MAX_MESSAGE_LEN 1024
|
||||
#define MAX_NAME_LEN 42
|
||||
#define MAX_BROADCAST_LEN 512
|
||||
#define MAX_CHARTER_LEN 80
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#define SERVER_TOOLS_EXTERNAL_CONFIGURATION
|
||||
#define SERVER_TOOLS_DEFINE_AND_SET_GLOBAL(Name, Value) GLOBAL_VAR_INIT(##Name, ##Value); GLOBAL_PROTECT(##Name)
|
||||
#define SERVER_TOOLS_READ_GLOBAL(Name) GLOB.##Name
|
||||
#define SERVER_TOOLS_WRITE_GLOBAL(Name, Value) GLOB.##Name = ##Value
|
||||
#define SERVER_TOOLS_WORLD_ANNOUNCE(message) to_chat(world, "<span class='boldannounce'>[html_encode(##message)]</span>")
|
||||
#define SERVER_TOOLS_LOG(message) log_world("SERVICE: [##message]")
|
||||
#define SERVER_TOOLS_NOTIFY_ADMINS(event) message_admins(##event)
|
||||
#define SERVER_TOOLS_CLIENT_COUNT GLOB.clients.len
|
||||
@@ -1,34 +0,0 @@
|
||||
#define REBOOT_MODE_NORMAL 0
|
||||
#define REBOOT_MODE_HARD 1
|
||||
#define REBOOT_MODE_SHUTDOWN 2
|
||||
|
||||
#define IRC_STATUS_THROTTLE 5
|
||||
|
||||
#define PR_ANNOUNCEMENTS_PER_ROUND 5 //The number of unique PR announcements allowed per round
|
||||
//This makes sure that a single person can only spam 3 reopens and 3 closes before being ignored
|
||||
|
||||
//keep these in sync with TGS3
|
||||
#define SERVICE_WORLD_PARAM "server_service"
|
||||
#define SERVICE_VERSION_PARAM "server_service_version"
|
||||
#define SERVICE_PR_TEST_JSON "prtestjob.json"
|
||||
#define SERVICE_PR_TEST_JSON_OLD "..\\..\\[SERVICE_PR_TEST_JSON]"
|
||||
|
||||
#define SERVICE_CMD_HARD_REBOOT "hard_reboot"
|
||||
#define SERVICE_CMD_GRACEFUL_SHUTDOWN "graceful_shutdown"
|
||||
#define SERVICE_CMD_WORLD_ANNOUNCE "world_announce"
|
||||
#define SERVICE_CMD_IRC_CHECK "irc_check"
|
||||
#define SERVICE_CMD_IRC_STATUS "irc_status"
|
||||
#define SERVICE_CMD_ADMIN_MSG "adminmsg"
|
||||
#define SERVICE_CMD_NAME_CHECK "namecheck"
|
||||
#define SERVICE_CMD_ADMIN_WHO "adminwho"
|
||||
|
||||
#define SERVICE_CMD_PARAM_KEY "serviceCommsKey"
|
||||
#define SERVICE_CMD_PARAM_COMMAND "command"
|
||||
#define SERVICE_CMD_PARAM_MESSAGE "message"
|
||||
#define SERVICE_CMD_PARAM_TARGET "target"
|
||||
#define SERVICE_CMD_PARAM_SENDER "sender"
|
||||
|
||||
#define SERVICE_REQUEST_KILL_PROCESS "killme"
|
||||
#define SERVICE_REQUEST_IRC_BROADCAST "irc"
|
||||
#define SERVICE_REQUEST_IRC_ADMIN_CHANNEL_MESSAGE "send2irc"
|
||||
#define SERVICE_REQUEST_WORLD_REBOOT "worldreboot"
|
||||
@@ -31,11 +31,9 @@
|
||||
|
||||
// Ripples, effects that signal a shuttle's arrival
|
||||
#define SHUTTLE_RIPPLE_TIME 100
|
||||
#define SHUTTLE_RIPPLE_FADEIN 50
|
||||
|
||||
#define TRANSIT_REQUEST 1
|
||||
#define TRANSIT_READY 2
|
||||
#define TRANSIT_FULL 3
|
||||
|
||||
#define SHUTTLE_TRANSIT_BORDER 8
|
||||
|
||||
@@ -54,13 +52,27 @@
|
||||
#define ENGINE_DEFAULT_MAXSPEED_ENGINES 5
|
||||
|
||||
//Docking error flags
|
||||
#define DOCKING_SUCCESS 0
|
||||
#define DOCKING_BLOCKED 1
|
||||
#define DOCKING_IMMOBILIZED 2
|
||||
#define DOCKING_AREA_EMPTY 4
|
||||
|
||||
#define DOCKING_SUCCESS 0
|
||||
#define DOCKING_BLOCKED (1<<0)
|
||||
#define DOCKING_IMMOBILIZED (1<<1)
|
||||
#define DOCKING_AREA_EMPTY (1<<2)
|
||||
#define DOCKING_NULL_DESTINATION (1<<3)
|
||||
#define DOCKING_NULL_SOURCE (1<<4)
|
||||
|
||||
//Docking turf movements
|
||||
#define MOVE_TURF 1
|
||||
#define MOVE_AREA 2
|
||||
#define MOVE_CONTENTS 4
|
||||
#define MOVE_CONTENTS 4
|
||||
|
||||
//Rotation params
|
||||
#define ROTATE_DIR 1
|
||||
#define ROTATE_SMOOTH 2
|
||||
#define ROTATE_OFFSET 4
|
||||
|
||||
#define SHUTTLE_DOCKER_LANDING_CLEAR 1
|
||||
#define SHUTTLE_DOCKER_BLOCKED_BY_HIDDEN_PORT 2
|
||||
#define SHUTTLE_DOCKER_BLOCKED 3
|
||||
|
||||
//Shuttle defaults
|
||||
#define SHUTTLE_DEFAULT_SHUTTLE_AREA_TYPE /area/shuttle
|
||||
#define SHUTTLE_DEFAULT_UNDERLYING_AREA /area/space
|
||||
|
||||
+13
-13
@@ -4,11 +4,11 @@
|
||||
|
||||
#define SEE_INVISIBLE_LIVING 25
|
||||
|
||||
#define SEE_INVISIBLE_LEVEL_ONE 35 //currently unused
|
||||
#define INVISIBILITY_LEVEL_ONE 35 //currently unused
|
||||
//#define SEE_INVISIBLE_LEVEL_ONE 35 //currently unused
|
||||
//#define INVISIBILITY_LEVEL_ONE 35 //currently unused
|
||||
|
||||
#define SEE_INVISIBLE_LEVEL_TWO 45 //currently unused
|
||||
#define INVISIBILITY_LEVEL_TWO 45 //currently unused
|
||||
//#define SEE_INVISIBLE_LEVEL_TWO 45 //currently unused
|
||||
//#define INVISIBILITY_LEVEL_TWO 45 //currently unused
|
||||
|
||||
#define INVISIBILITY_OBSERVER 60
|
||||
#define SEE_INVISIBLE_OBSERVER 60
|
||||
@@ -17,14 +17,14 @@
|
||||
|
||||
#define INVISIBILITY_ABSTRACT 101 //only used for abstract objects (e.g. spacevine_controller), things that are not really there.
|
||||
|
||||
#define BORGMESON 1
|
||||
#define BORGTHERM 2
|
||||
#define BORGXRAY 4
|
||||
#define BORGMATERIAL 8
|
||||
#define BORGMESON (1<<0)
|
||||
#define BORGTHERM (1<<1)
|
||||
#define BORGXRAY (1<<2)
|
||||
#define BORGMATERIAL (1<<3)
|
||||
|
||||
//for clothing visor toggles, these determine which vars to toggle
|
||||
#define VISOR_FLASHPROTECT 1
|
||||
#define VISOR_TINT 2
|
||||
#define VISOR_VISIONFLAGS 4 //all following flags_1 only matter for glasses
|
||||
#define VISOR_DARKNESSVIEW 8
|
||||
#define VISOR_INVISVIEW 16
|
||||
#define VISOR_FLASHPROTECT (1<<0)
|
||||
#define VISOR_TINT (1<<1)
|
||||
#define VISOR_VISIONFLAGS (1<<2) //all following flags only matter for glasses
|
||||
#define VISOR_DARKNESSVIEW (1<<3)
|
||||
#define VISOR_INVISVIEW (1<<4)
|
||||
|
||||
+80
-23
@@ -1,23 +1,80 @@
|
||||
//max channel is 1024. Only go lower from here, because byond tends to pick the first availiable channel to play sounds on
|
||||
#define CHANNEL_LOBBYMUSIC 1024
|
||||
#define CHANNEL_ADMIN 1023
|
||||
#define CHANNEL_VOX 1022
|
||||
#define CHANNEL_JUKEBOX 1021
|
||||
#define CHANNEL_JUSTICAR_ARK 1020
|
||||
#define CHANNEL_HEARTBEAT 1019 //sound channel for heartbeats
|
||||
#define CHANNEL_AMBIENCE 1018
|
||||
#define CHANNEL_BUZZ 1017
|
||||
#define CHANNEL_BICYCLE 1016
|
||||
|
||||
//Citadel code
|
||||
#define CHANNEL_PRED 1015
|
||||
#define CHANNEL_PREYLOOP 1014
|
||||
|
||||
//THIS SHOULD ALWAYS BE THE LOWEST ONE!
|
||||
//KEEP IT UPDATED
|
||||
|
||||
#define CHANNEL_HIGHEST_AVAILABLE 1013
|
||||
|
||||
#define CHANNEL_HIGHEST_AVAILABLE 1017
|
||||
#define SOUND_MINIMUM_PRESSURE 10
|
||||
#define FALLOFF_SOUNDS 0.5
|
||||
//max channel is 1024. Only go lower from here, because byond tends to pick the first availiable channel to play sounds on
|
||||
#define CHANNEL_LOBBYMUSIC 1024
|
||||
#define CHANNEL_ADMIN 1023
|
||||
#define CHANNEL_VOX 1022
|
||||
#define CHANNEL_JUKEBOX 1021
|
||||
#define CHANNEL_JUSTICAR_ARK 1020
|
||||
#define CHANNEL_HEARTBEAT 1019 //sound channel for heartbeats
|
||||
#define CHANNEL_AMBIENCE 1018
|
||||
#define CHANNEL_BUZZ 1017
|
||||
#define CHANNEL_BICYCLE 1016
|
||||
|
||||
//CIT CHANNELS - TRY NOT TO REGRESS
|
||||
#define CHANNEL_PRED 1015
|
||||
#define CHANNEL_DIGEST 1014
|
||||
#define CHANNEL_PREYLOOP 1013
|
||||
|
||||
//THIS SHOULD ALWAYS BE THE LOWEST ONE!
|
||||
//KEEP IT UPDATED
|
||||
|
||||
#define CHANNEL_HIGHEST_AVAILABLE 1012 //CIT CHANGE - COMPENSATES FOR VORESOUND CHANNELS
|
||||
|
||||
|
||||
#define SOUND_MINIMUM_PRESSURE 10
|
||||
#define FALLOFF_SOUNDS 1
|
||||
|
||||
|
||||
//Ambience types
|
||||
|
||||
#define GENERIC list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg',\
|
||||
'sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg',\
|
||||
'sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg',\
|
||||
'sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg',\
|
||||
'sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg',\
|
||||
'sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg','sound/ambience/ambigen15.ogg')
|
||||
|
||||
#define HOLY list('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg',\
|
||||
'sound/ambience/ambicha4.ogg', 'sound/ambience/ambiholy.ogg', 'sound/ambience/ambiholy2.ogg',\
|
||||
'sound/ambience/ambiholy3.ogg')
|
||||
|
||||
#define HIGHSEC list('sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg')
|
||||
|
||||
#define RUINS list('sound/ambience/ambimine.ogg', 'sound/ambience/ambicave.ogg', 'sound/ambience/ambiruin.ogg',\
|
||||
'sound/ambience/ambiruin2.ogg', 'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',\
|
||||
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg', 'sound/ambience/ambiruin7.ogg',\
|
||||
'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambitech3.ogg',\
|
||||
'sound/ambience/ambimystery.ogg', 'sound/ambience/ambimaint1.ogg')
|
||||
|
||||
#define ENGINEERING list('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg',\
|
||||
'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg', 'sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambitech3.ogg')
|
||||
|
||||
#define MINING list('sound/ambience/ambimine.ogg', 'sound/ambience/ambicave.ogg', 'sound/ambience/ambiruin.ogg',\
|
||||
'sound/ambience/ambiruin2.ogg', 'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',\
|
||||
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg', 'sound/ambience/ambiruin7.ogg',\
|
||||
'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambimaint1.ogg', 'sound/ambience/ambilava.ogg')
|
||||
|
||||
#define MEDICAL list('sound/ambience/ambinice.ogg')
|
||||
|
||||
#define SPOOKY list('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/ambience/ambiruin7.ogg','sound/ambience/ambiruin6.ogg',\
|
||||
'sound/ambience/ambiodd.ogg', 'sound/ambience/ambimystery.ogg')
|
||||
|
||||
#define SPACE list('sound/ambience/ambispace.ogg', 'sound/ambience/ambispace2.ogg', 'sound/ambience/title2.ogg', 'sound/ambience/ambiatmos.ogg')
|
||||
|
||||
#define MAINTENANCE list('sound/ambience/ambimaint1.ogg', 'sound/ambience/ambimaint2.ogg', 'sound/ambience/ambimaint3.ogg', 'sound/ambience/ambimaint4.ogg',\
|
||||
'sound/ambience/ambimaint5.ogg', 'sound/voice/lowHiss2.ogg', 'sound/voice/lowHiss3.ogg', 'sound/voice/lowHiss4.ogg', 'sound/ambience/ambitech2.ogg' )
|
||||
|
||||
#define AWAY_MISSION list('sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambiruin.ogg',\
|
||||
'sound/ambience/ambiruin2.ogg', 'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',\
|
||||
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg', 'sound/ambience/ambiruin7.ogg',\
|
||||
'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambimaint.ogg',\
|
||||
'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg', 'sound/ambience/ambiodd.ogg')
|
||||
|
||||
#define REEBE list('sound/ambience/ambireebe1.ogg', 'sound/ambience/ambireebe2.ogg', 'sound/ambience/ambireebe3.ogg')
|
||||
|
||||
|
||||
|
||||
#define CREEPY_SOUNDS list('sound/effects/ghost.ogg', 'sound/effects/ghost2.ogg', 'sound/effects/heart_beat.ogg', 'sound/effects/screech.ogg',\
|
||||
'sound/hallucinations/behind_you1.ogg', 'sound/hallucinations/behind_you2.ogg', 'sound/hallucinations/far_noise.ogg', 'sound/hallucinations/growl1.ogg', 'sound/hallucinations/growl2.ogg',\
|
||||
'sound/hallucinations/growl3.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg', 'sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg',\
|
||||
'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\
|
||||
'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg', 'sound/hallucinations/wail.ogg')
|
||||
|
||||
+19
-31
@@ -1,31 +1,19 @@
|
||||
/*
|
||||
Used with the various stat variables (mob, machines)
|
||||
*/
|
||||
|
||||
//mob/var/stat things
|
||||
#define CONSCIOUS 0
|
||||
#define SOFT_CRIT 1
|
||||
#define UNCONSCIOUS 2
|
||||
#define DEAD 3
|
||||
|
||||
//mob disabilities stat
|
||||
|
||||
#define BLIND 1
|
||||
#define MUTE 2
|
||||
#define DEAF 4
|
||||
#define NEARSIGHT 8
|
||||
#define FAT 32
|
||||
#define HUSK 64
|
||||
#define NOCLONE 128
|
||||
#define CLUMSY 256
|
||||
|
||||
// bitflags for machine stat variable
|
||||
#define BROKEN 1
|
||||
#define NOPOWER 2
|
||||
#define MAINT 4 // under maintaince
|
||||
#define EMPED 8 // temporary broken by EMP pulse
|
||||
|
||||
//ai power requirement defines
|
||||
#define POWER_REQ_NONE 0
|
||||
#define POWER_REQ_ALL 1
|
||||
#define POWER_REQ_CLOCKCULT 2
|
||||
/*
|
||||
Used with the various stat variables (mob, machines)
|
||||
*/
|
||||
|
||||
//mob/var/stat things
|
||||
#define CONSCIOUS 0
|
||||
#define SOFT_CRIT 1
|
||||
#define UNCONSCIOUS 2
|
||||
#define DEAD 3
|
||||
|
||||
// bitflags for machine stat variable
|
||||
#define BROKEN (1<<0)
|
||||
#define NOPOWER (1<<1)
|
||||
#define MAINT (1<<2) // under maintaince
|
||||
#define EMPED (1<<3) // temporary broken by EMP pulse
|
||||
|
||||
//ai power requirement defines
|
||||
#define POWER_REQ_ALL 1
|
||||
#define POWER_REQ_CLOCKCULT 2
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#define STAT_ENTRY_TIME 1
|
||||
#define STAT_ENTRY_COUNT 2
|
||||
#define STAT_ENTRY_LENGTH 2
|
||||
|
||||
|
||||
#define STAT_START_STOPWATCH var/STAT_STOP_WATCH = TICK_USAGE
|
||||
#define STAT_STOP_STOPWATCH var/STAT_TIME = TICK_USAGE_TO_MS(STAT_STOP_WATCH)
|
||||
#define STAT_LOG_ENTRY(entrylist, entryname) \
|
||||
var/list/STAT_ENTRY = entrylist[entryname] || (entrylist[entryname] = new /list(STAT_ENTRY_LENGTH));\
|
||||
STAT_ENTRY[STAT_ENTRY_TIME] += STAT_TIME;\
|
||||
var/STAT_INCR_AMOUNT = min(1, 2**round((STAT_ENTRY[STAT_ENTRY_COUNT] || 0)/SHORT_REAL_LIMIT));\
|
||||
if (STAT_INCR_AMOUNT == 1 || prob(100/STAT_INCR_AMOUNT)) {\
|
||||
STAT_ENTRY[STAT_ENTRY_COUNT] += STAT_INCR_AMOUNT;\
|
||||
};\
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
#define STATUS_EFFECT_REPLACE 2 //if it allows only one, but new instances replace
|
||||
|
||||
#define BASIC_STATUS_EFFECT /datum/status_effect //Has no effect.
|
||||
|
||||
///////////
|
||||
// BUFFS //
|
||||
///////////
|
||||
@@ -28,6 +26,12 @@
|
||||
|
||||
#define STATUS_EFFECT_BLOODDRUNK /datum/status_effect/blooddrunk //Stun immunity and greatly reduced damage taken
|
||||
|
||||
#define STATUS_EFFECT_FLESHMEND /datum/status_effect/fleshmend //Very fast healing; suppressed by fire, and heals less fire damage
|
||||
|
||||
#define STATUS_EFFECT_EXERCISED /datum/status_effect/exercised //Prevents heart disease
|
||||
|
||||
#define STATUS_EFFECT_HIPPOCRATIC_OATH /datum/status_effect/hippocraticOath //Gives you an aura of healing as well as regrowing the Rod of Asclepius if lost
|
||||
|
||||
/////////////
|
||||
// DEBUFFS //
|
||||
/////////////
|
||||
@@ -62,6 +66,10 @@
|
||||
#define CURSE_WASTING 4 //causes gradual damage
|
||||
#define CURSE_GRASPING 8 //hands reach out from the sides of the screen, doing damage and stunning if they hit the target
|
||||
|
||||
#define STATUS_EFFECT_KINDLE /datum/status_effect/kindle //A knockdown reduced by 1 second for every 3 points of damage the target takes.
|
||||
|
||||
#define STATUS_EFFECT_ICHORIAL_STAIN /datum/status_effect/ichorial_stain //Prevents a servant from being revived by vitality matrices for one minute.
|
||||
|
||||
/////////////
|
||||
// NEUTRAL //
|
||||
/////////////
|
||||
@@ -71,3 +79,10 @@
|
||||
#define STATUS_EFFECT_CRUSHERDAMAGETRACKING /datum/status_effect/crusher_damage //tracks total kinetic crusher damage on a target
|
||||
|
||||
#define STATUS_EFFECT_SYPHONMARK /datum/status_effect/syphon_mark //tracks kills for the KA death syphon module
|
||||
|
||||
/////////////
|
||||
// SLIME //
|
||||
/////////////
|
||||
|
||||
#define STATUS_EFFECT_RAINBOWPROTECTION /datum/status_effect/rainbow_protection //Invulnerable and pacifistic
|
||||
#define STATUS_EFFECT_SLIMESKIN /datum/status_effect/slimeskin //Increased armor
|
||||
|
||||
@@ -1,18 +1,23 @@
|
||||
//Update this whenever the db schema changes
|
||||
//make sure you add an update to the schema_version stable in the db changelog
|
||||
#define DB_MAJOR_VERSION 4
|
||||
#define DB_MINOR_VERSION 4
|
||||
|
||||
//Timing subsystem
|
||||
//Don't run if there is an identical unique timer active
|
||||
#define TIMER_UNIQUE 0x1
|
||||
//if the arguments to addtimer are the same as an existing timer, it doesn't create a new timer, and returns the id of the existing timer
|
||||
#define TIMER_UNIQUE (1<<0)
|
||||
//For unique timers: Replace the old timer rather then not start this one
|
||||
#define TIMER_OVERRIDE 0x2
|
||||
#define TIMER_OVERRIDE (1<<1)
|
||||
//Timing should be based on how timing progresses on clients, not the sever.
|
||||
// tracking this is more expensive,
|
||||
// should only be used in conjuction with things that have to progress client side, such as animate() or sound()
|
||||
#define TIMER_CLIENT_TIME 0x4
|
||||
#define TIMER_CLIENT_TIME (1<<2)
|
||||
//Timer can be stopped using deltimer()
|
||||
#define TIMER_STOPPABLE 0x8
|
||||
#define TIMER_STOPPABLE (1<<3)
|
||||
//To be used with TIMER_UNIQUE
|
||||
//prevents distinguishing identical timers with the wait variable
|
||||
#define TIMER_NO_HASH_WAIT 0x10
|
||||
#define TIMER_NO_HASH_WAIT (1<<4)
|
||||
|
||||
#define TIMER_NO_INVOKE_WARNING 600 //number of byond ticks that are allowed to pass before the timer subsystem thinks it hung on something
|
||||
|
||||
@@ -23,8 +28,8 @@
|
||||
#define FLIGHTSUIT_PROCESSING_FULL 1
|
||||
|
||||
#define INITIALIZATION_INSSATOMS 0 //New should not call Initialize
|
||||
#define INITIALIZATION_INNEW_MAPLOAD 1 //New should call Initialize(TRUE)
|
||||
#define INITIALIZATION_INNEW_REGULAR 2 //New should call Initialize(FALSE)
|
||||
#define INITIALIZATION_INNEW_MAPLOAD 2 //New should call Initialize(TRUE)
|
||||
#define INITIALIZATION_INNEW_REGULAR 1 //New should call Initialize(FALSE)
|
||||
|
||||
#define INITIALIZE_HINT_NORMAL 0 //Nothing happens
|
||||
#define INITIALIZE_HINT_LATELOAD 1 //Call LateInitialize
|
||||
@@ -33,7 +38,7 @@
|
||||
//type and all subtypes should always call Initialize in New()
|
||||
#define INITIALIZE_IMMEDIATE(X) ##X/New(loc, ...){\
|
||||
..();\
|
||||
if(!initialized) {\
|
||||
if(!(flags_1 & INITIALIZED_1)) {\
|
||||
args[1] = TRUE;\
|
||||
SSatoms.InitAtom(src, args);\
|
||||
}\
|
||||
@@ -43,16 +48,22 @@
|
||||
// Subsystems shutdown in the reverse of the order they initialize in
|
||||
// The numbers just define the ordering, they are meaningless otherwise.
|
||||
|
||||
#define INIT_ORDER_GARBAGE 19
|
||||
#define INIT_ORDER_DBCORE 18
|
||||
#define INIT_ORDER_BLACKBOX 17
|
||||
#define INIT_ORDER_SERVER_MAINT 16
|
||||
#define INIT_ORDER_JOBS 15
|
||||
#define INIT_ORDER_EVENTS 14
|
||||
#define INIT_ORDER_TICKER 13
|
||||
#define INIT_ORDER_MAPPING 12
|
||||
#define INIT_ORDER_ATOMS 11
|
||||
#define INIT_ORDER_LANGUAGE 10
|
||||
#define INIT_ORDER_MACHINES 9
|
||||
#define INIT_ORDER_INPUT 15
|
||||
#define INIT_ORDER_RESEARCH 14
|
||||
#define INIT_ORDER_EVENTS 13
|
||||
#define INIT_ORDER_JOBS 12
|
||||
#define INIT_ORDER_QUIRKS 11
|
||||
#define INIT_ORDER_TICKER 10
|
||||
#define INIT_ORDER_MAPPING 9
|
||||
#define INIT_ORDER_NETWORKS 8
|
||||
#define INIT_ORDER_ATOMS 7
|
||||
#define INIT_ORDER_LANGUAGE 6
|
||||
#define INIT_ORDER_MACHINES 5
|
||||
#define INIT_ORDER_CIRCUIT 4
|
||||
#define INIT_ORDER_TIMER 1
|
||||
#define INIT_ORDER_DEFAULT 0
|
||||
#define INIT_ORDER_AIR -1
|
||||
@@ -65,8 +76,39 @@
|
||||
#define INIT_ORDER_LIGHTING -20
|
||||
#define INIT_ORDER_SHUTTLE -21
|
||||
#define INIT_ORDER_SQUEAK -40
|
||||
#define INIT_ORDER_PATH -50
|
||||
#define INIT_ORDER_PERSISTENCE -100
|
||||
|
||||
// Subsystem fire priority, from lowest to highest priority
|
||||
// If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child)
|
||||
|
||||
#define FIRE_PRIORITY_PING 10
|
||||
#define FIRE_PRIORITY_IDLE_NPC 10
|
||||
#define FIRE_PRIORITY_SERVER_MAINT 10
|
||||
#define FIRE_PRIORITY_RESEARCH 10
|
||||
#define FIRE_PRIORITY_GARBAGE 15
|
||||
#define FIRE_PRIORITY_WET_FLOORS 20
|
||||
#define FIRE_PRIORITY_AIR 20
|
||||
#define FIRE_PRIORITY_NPC 20
|
||||
#define FIRE_PRIORITY_PROCESS 25
|
||||
#define FIRE_PRIORITY_THROWING 25
|
||||
#define FIRE_PRIORITY_SPACEDRIFT 30
|
||||
#define FIRE_PRIORITY_FIELDS 30
|
||||
#define FIRE_PRIOTITY_SMOOTHING 35
|
||||
#define FIRE_PRIORITY_ORBIT 35
|
||||
#define FIRE_PRIORITY_NETWORKS 40
|
||||
#define FIRE_PRIORITY_OBJ 40
|
||||
#define FIRE_PRIORITY_ACID 40
|
||||
#define FIRE_PRIOTITY_BURNING 40
|
||||
#define FIRE_PRIORITY_DEFAULT 50
|
||||
#define FIRE_PRIORITY_PARALLAX 65
|
||||
#define FIRE_PRIORITY_FLIGHTPACKS 80
|
||||
#define FIRE_PRIORITY_MOBS 100
|
||||
#define FIRE_PRIORITY_TGUI 110
|
||||
#define FIRE_PRIORITY_TICKER 200
|
||||
#define FIRE_PRIORITY_OVERLAYS 500
|
||||
#define FIRE_PRIORITY_INPUT 1000 // This must always always be the max highest priority. Player input must never be lost.
|
||||
|
||||
// SS runlevels
|
||||
|
||||
#define RUNLEVEL_INIT 0
|
||||
@@ -76,3 +118,27 @@
|
||||
#define RUNLEVEL_POSTGAME 8
|
||||
|
||||
#define RUNLEVELS_DEFAULT (RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME)
|
||||
|
||||
|
||||
|
||||
|
||||
#define COMPILE_OVERLAYS(A)\
|
||||
if (TRUE) {\
|
||||
var/list/oo = A.our_overlays;\
|
||||
var/list/po = A.priority_overlays;\
|
||||
if(LAZYLEN(po)){\
|
||||
if(LAZYLEN(oo)){\
|
||||
A.overlays = oo + po;\
|
||||
}\
|
||||
else{\
|
||||
A.overlays = po;\
|
||||
}\
|
||||
}\
|
||||
else if(LAZYLEN(oo)){\
|
||||
A.overlays = oo;\
|
||||
}\
|
||||
else{\
|
||||
A.overlays.Cut();\
|
||||
}\
|
||||
A.flags_1 &= ~OVERLAY_QUEUED_1;\
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#define TGS_EXTERNAL_CONFIGURATION
|
||||
#define TGS_DEFINE_AND_SET_GLOBAL(Name, Value) GLOBAL_VAR_INIT(##Name, ##Value); GLOBAL_PROTECT(##Name)
|
||||
#define TGS_READ_GLOBAL(Name) GLOB.##Name
|
||||
#define TGS_WRITE_GLOBAL(Name, Value) GLOB.##Name = ##Value
|
||||
#define TGS_WORLD_ANNOUNCE(message) to_chat(world, "<span class='boldannounce'>[html_encode(##message)]</span>")
|
||||
#define TGS_INFO_LOG(message) log_world("TGS: Info: [##message]")
|
||||
#define TGS_ERROR_LOG(message) log_world("TGS: Error: [##message]")
|
||||
#define TGS_NOTIFY_ADMINS(event) message_admins(##event)
|
||||
#define TGS_CLIENT_COUNT GLOB.clients.len
|
||||
#define TGS_PROTECT_DATUM(Path)\
|
||||
##Path/can_vv_get(var_name){\
|
||||
return FALSE;\
|
||||
}\
|
||||
##Path/vv_edit_var(var_name, var_value){\
|
||||
return FALSE;\
|
||||
}\
|
||||
##Path/CanProcCall(procname){\
|
||||
return FALSE;\
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
//tgstation-server DMAPI
|
||||
|
||||
//All functions and datums outside this document are subject to change with any version and should not be relied on
|
||||
|
||||
//CONFIGURATION
|
||||
|
||||
//create this define if you want to do configuration outside of this file
|
||||
#ifndef TGS_EXTERNAL_CONFIGURATION
|
||||
|
||||
//Comment this out once you've filled in the below
|
||||
#error TGS API unconfigured
|
||||
|
||||
//Required interfaces (fill in with your codebase equivalent):
|
||||
|
||||
//create a global variable named `Name` and set it to `Value`
|
||||
//These globals must not be modifiable from anywhere outside of the server tools
|
||||
#define TGS_DEFINE_AND_SET_GLOBAL(Name, Value)
|
||||
|
||||
//Read the value in the global variable `Name`
|
||||
#define TGS_READ_GLOBAL(Name)
|
||||
|
||||
//Set the value in the global variable `Name` to `Value`
|
||||
#define TGS_WRITE_GLOBAL(Name, Value)
|
||||
|
||||
//Disallow ANYONE from reflecting a given `path`, security measure to prevent in-game priveledge escalation
|
||||
#define TGS_PROTECT_DATUM(Path)
|
||||
|
||||
//display an announcement `message` from the server to all players
|
||||
#define TGS_WORLD_ANNOUNCE(message)
|
||||
|
||||
//Notify current in-game administrators of a string `event`
|
||||
#define TGS_NOTIFY_ADMINS(event)
|
||||
|
||||
//Write an info `message` to a server log
|
||||
#define TGS_INFO_LOG(message)
|
||||
|
||||
//Write an error `message` to a server log
|
||||
#define TGS_ERROR_LOG(message)
|
||||
|
||||
//Get the number of connected /clients
|
||||
#define TGS_CLIENT_COUNT
|
||||
|
||||
#endif
|
||||
|
||||
//EVENT CODES
|
||||
|
||||
//TODO
|
||||
|
||||
//REQUIRED HOOKS
|
||||
|
||||
//Call this somewhere in /world/New() that is always run
|
||||
//event_handler: optional user defined event handler. The default behaviour is to broadcast the event in english to all connected admin channels
|
||||
/world/proc/TgsNew(datum/tgs_event_handler/event_handler)
|
||||
return
|
||||
|
||||
//Call this when your initializations are complete and your game is ready to play before any player interactions happen
|
||||
//This may use world.sleep_offline to make this happen so ensure no changes are made to it while this call is running
|
||||
/world/proc/TgsInitializationComplete()
|
||||
return
|
||||
|
||||
//Put this somewhere in /world/Topic(T, Addr, Master, Keys) that is always run before T is modified
|
||||
#define TGS_TOPIC var/tgs_topic_return = TgsTopic(T); if(tgs_topic_return) return tgs_topic_return
|
||||
|
||||
//Call this at the beginning of world/Reboot(reason)
|
||||
/world/proc/TgsReboot()
|
||||
return
|
||||
|
||||
//DATUM DEFINITIONS
|
||||
//unless otherwise specified all datums defined here should be considered read-only, warranty void if written
|
||||
|
||||
//represents git revision information about the current world build
|
||||
/datum/tgs_revision_information
|
||||
var/commit //full sha of compiled commit
|
||||
var/origin_commit //full sha of last known remote commit. This may be null if the TGS repository is not currently tracking a remote branch
|
||||
|
||||
//represents a merge of a GitHub pull request
|
||||
/datum/tgs_revision_information/test_merge
|
||||
var/number //pull request number
|
||||
var/title //pull request title
|
||||
var/body //pull request body
|
||||
var/author //pull request github author
|
||||
var/url //link to pull request html
|
||||
var/pull_request_commit //commit of the pull request when it was merged
|
||||
var/time_merged //timestamp of when the merge commit for the pull request was created
|
||||
var/comment //optional comment left by the one who initiated the test merge
|
||||
|
||||
//represents a connected chat channel
|
||||
/datum/tgs_chat_channel
|
||||
var/id //internal channel representation
|
||||
var/friendly_name //user friendly channel name
|
||||
var/server_name //server name the channel resides on
|
||||
var/provider_name //chat provider for the channel
|
||||
var/is_admin_channel //if the server operator has marked this channel for game admins only
|
||||
var/is_private_channel //if this is a private chat channel
|
||||
|
||||
//represents a chat user
|
||||
/datum/tgs_chat_user
|
||||
var/id //Internal user representation
|
||||
var/friendly_name //The user's public name
|
||||
var/mention //The text to use to ping this user in a message
|
||||
var/datum/tgs_chat_channel/channel //The /datum/tgs_chat_channel this user was from
|
||||
|
||||
//user definable callback for handling events
|
||||
/datum/tgs_event_handler/proc/HandleEvent(event_code)
|
||||
return
|
||||
|
||||
//user definable chat command
|
||||
/datum/tgs_chat_command
|
||||
var/name = "" //the string to trigger this command on a chat bot. e.g. TGS3_BOT: do_this_command
|
||||
var/help_text = "" //help text for this command
|
||||
var/admin_only = FALSE //set to TRUE if this command should only be usable by registered chat admins
|
||||
|
||||
//override to implement command
|
||||
//sender: The tgs_chat_user who send to command
|
||||
//params: The trimmed string following the command name
|
||||
//The return value will be stringified and sent to the appropriate chat
|
||||
/datum/tgs_chat_command/proc/Run(datum/tgs_chat_user/sender, params)
|
||||
CRASH("[type] has no implementation for Run()")
|
||||
|
||||
//FUNCTIONS
|
||||
|
||||
//Returns the respective string version of the API
|
||||
/world/proc/TgsMaximumAPIVersion()
|
||||
return
|
||||
|
||||
/world/proc/TgsMinimumAPIVersion()
|
||||
return
|
||||
|
||||
//Gets the current version of the server tools running the server
|
||||
/world/proc/TgsVersion()
|
||||
return
|
||||
|
||||
//Returns TRUE if the world was launched under the server tools and the API matches, FALSE otherwise
|
||||
//No function below this succeeds if it returns FALSE
|
||||
/world/proc/TgsAvailable()
|
||||
return
|
||||
|
||||
/world/proc/TgsInstanceName()
|
||||
return
|
||||
|
||||
//Get the current `/datum/tgs_revision_information`
|
||||
/world/proc/TgsRevision()
|
||||
return
|
||||
|
||||
//Gets a list of active `/datum/tgs_revision_information/test_merge`s
|
||||
/world/proc/TgsTestMerges()
|
||||
return
|
||||
|
||||
//Forces a hard reboot of BYOND by ending the process
|
||||
//unlike del(world) clients will try to reconnect
|
||||
//If the service has not requested a shutdown, the next server will take over
|
||||
/world/proc/TgsEndProcess()
|
||||
return
|
||||
|
||||
//Gets a list of connected tgs_chat_channel
|
||||
/world/proc/TgsChatChannelInfo()
|
||||
return
|
||||
|
||||
//Sends a message to connected game chats
|
||||
//message: The message to send
|
||||
//channels: optional channels to limit the broadcast to
|
||||
/world/proc/TgsChatBroadcast(message, list/channels)
|
||||
return
|
||||
|
||||
//Send a message to non-admin connected chats
|
||||
//message: The message to send
|
||||
//admin_only: If TRUE, message will instead be sent to only admin connected chats
|
||||
/world/proc/TgsTargetedChatBroadcast(message, admin_only)
|
||||
return
|
||||
|
||||
//Send a private message to a specific user
|
||||
//message: The message to send
|
||||
//user: The /datum/tgs_chat_user to send to
|
||||
/world/proc/TgsChatPrivateMessage(message, datum/tgs_chat_user/user)
|
||||
return
|
||||
|
||||
/*
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2017 Jordan Brown
|
||||
|
||||
Permission is hereby granted, free of charge,
|
||||
to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify,
|
||||
merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom
|
||||
the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
||||
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
@@ -20,4 +20,8 @@ When using time2text(), please use "DDD" to find the weekday. Refrain from using
|
||||
|
||||
#define HOURS MINUTES*60
|
||||
|
||||
#define TICKS *world.tick_lag
|
||||
#define TICKS *world.tick_lag
|
||||
|
||||
#define DS2TICKS(DS) ((DS)/world.tick_lag)
|
||||
|
||||
#define TICKS2DS(T) ((T) TICKS)
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// Tool types
|
||||
#define TOOL_CROWBAR "crowbar"
|
||||
#define TOOL_MULTITOOL "multitool"
|
||||
#define TOOL_SCREWDRIVER "screwdriver"
|
||||
#define TOOL_WIRECUTTER "wirecutter"
|
||||
#define TOOL_WRENCH "wrench"
|
||||
#define TOOL_WELDER "welder"
|
||||
#define TOOL_ANALYZER "analyzer"
|
||||
#define TOOL_MINING "mining"
|
||||
#define TOOL_SHOVEL "shovel"
|
||||
|
||||
|
||||
// If delay between the start and the end of tool operation is less than MIN_TOOL_SOUND_DELAY,
|
||||
// tool sound is only played when op is started. If not, it's played twice.
|
||||
#define MIN_TOOL_SOUND_DELAY 20
|
||||
@@ -0,0 +1,87 @@
|
||||
//mob traits
|
||||
#define TRAIT_BLIND "blind"
|
||||
#define TRAIT_MUTE "mute"
|
||||
#define TRAIT_EMOTEMUTE "emotemute"
|
||||
#define TRAIT_DEAF "deaf"
|
||||
#define TRAIT_NEARSIGHT "nearsighted"
|
||||
#define TRAIT_FAT "fat"
|
||||
#define TRAIT_HUSK "husk"
|
||||
#define TRAIT_NOCLONE "noclone"
|
||||
#define TRAIT_CLUMSY "clumsy"
|
||||
#define TRAIT_DUMB "dumb"
|
||||
#define TRAIT_MONKEYLIKE "monkeylike" //sets IsAdvancedToolUser to FALSE
|
||||
#define TRAIT_PACIFISM "pacifism"
|
||||
#define TRAIT_IGNORESLOWDOWN "ignoreslow"
|
||||
#define TRAIT_GOTTAGOFAST "fast"
|
||||
#define TRAIT_GOTTAGOREALLYFAST "2fast"
|
||||
#define TRAIT_FAKEDEATH "fakedeath"
|
||||
#define TRAIT_DISFIGURED "disfigured"
|
||||
#define TRAIT_XENO_HOST "xeno_host" //Tracks whether we're gonna be a baby alien's mummy.
|
||||
#define TRAIT_STUNIMMUNE "stun_immunity"
|
||||
#define TRAIT_SLEEPIMMUNE "sleep_immunity"
|
||||
#define TRAIT_PUSHIMMUNE "push_immunity"
|
||||
#define TRAIT_SHOCKIMMUNE "shock_immunity"
|
||||
#define TRAIT_STABLEHEART "stable_heart"
|
||||
#define TRAIT_RESISTHEAT "resist_heat"
|
||||
#define TRAIT_RESISTHEATHANDS "resist_heat_handsonly" //For when you want to be able to touch hot things, but still want fire to be an issue.
|
||||
#define TRAIT_RESISTCOLD "resist_cold"
|
||||
#define TRAIT_RESISTHIGHPRESSURE "resist_high_pressure"
|
||||
#define TRAIT_RESISTLOWPRESSURE "resist_low_pressure"
|
||||
#define TRAIT_RADIMMUNE "rad_immunity"
|
||||
#define TRAIT_VIRUSIMMUNE "virus_immunity"
|
||||
#define TRAIT_PIERCEIMMUNE "pierce_immunity"
|
||||
#define TRAIT_NODISMEMBER "dismember_immunity"
|
||||
#define TRAIT_NOFIRE "nonflammable"
|
||||
#define TRAIT_NOGUNS "no_guns"
|
||||
#define TRAIT_NOHUNGER "no_hunger"
|
||||
#define TRAIT_EASYDISMEMBER "easy_dismember"
|
||||
#define TRAIT_LIMBATTACHMENT "limb_attach"
|
||||
#define TRAIT_TOXINLOVER "toxinlover"
|
||||
#define TRAIT_NOBREATH "no_breath"
|
||||
#define TRAIT_ANTIMAGIC "anti_magic"
|
||||
#define TRAIT_HOLY "holy"
|
||||
#define TRAIT_DEPRESSION "depression"
|
||||
#define TRAIT_JOLLY "jolly"
|
||||
#define TRAIT_NOCRITDAMAGE "no_crit"
|
||||
#define TRAIT_NOSLIPWATER "noslip_water"
|
||||
#define TRAIT_NOSLIPALL "noslip_all"
|
||||
#define TRAIT_NODEATH "nodeath"
|
||||
#define TRAIT_NOHARDCRIT "nohardcrit"
|
||||
#define TRAIT_NOSOFTCRIT "nosoftcrit"
|
||||
|
||||
|
||||
#define TRAIT_ALCOHOL_TOLERANCE "alcohol_tolerance"
|
||||
#define TRAIT_AGEUSIA "ageusia"
|
||||
#define TRAIT_HEAVY_SLEEPER "heavy_sleeper"
|
||||
#define TRAIT_NIGHT_VISION "night_vision"
|
||||
#define TRAIT_LIGHT_STEP "light_step"
|
||||
#define TRAIT_SPIRITUAL "spiritual"
|
||||
#define TRAIT_VORACIOUS "voracious"
|
||||
#define TRAIT_SELF_AWARE "self_aware"
|
||||
#define TRAIT_FREERUNNING "freerunning"
|
||||
#define TRAIT_SKITTISH "skittish"
|
||||
#define TRAIT_POOR_AIM "poor_aim"
|
||||
#define TRAIT_PROSOPAGNOSIA "prosopagnosia"
|
||||
#define TRAIT_DRUNK_HEALING "drunk_healing"
|
||||
|
||||
// common trait sources
|
||||
#define TRAIT_GENERIC "generic"
|
||||
#define EYE_DAMAGE "eye_damage"
|
||||
#define GENETIC_MUTATION "genetic"
|
||||
#define OBESITY "obesity"
|
||||
#define MAGIC_TRAIT "magic"
|
||||
#define TRAUMA_TRAIT "trauma"
|
||||
#define SPECIES_TRAIT "species"
|
||||
#define ORGAN_TRAIT "organ"
|
||||
#define ROUNDSTART_TRAIT "roundstart" //cannot be removed without admin intervention
|
||||
|
||||
// unique trait sources, still defines
|
||||
#define STATUE_MUTE "statue"
|
||||
#define CHANGELING_DRAIN "drain"
|
||||
#define CHANGELING_HIVEMIND_MUTE "ling_mute"
|
||||
#define ABYSSAL_GAZE_BLIND "abyssal_gaze"
|
||||
#define HIGHLANDER "highlander"
|
||||
#define TRAIT_HULK "hulk"
|
||||
#define STASIS_MUTE "stasis"
|
||||
#define GENETICS_SPELL "genetics_spell"
|
||||
#define EYES_COVERED "eyes_covered"
|
||||
@@ -0,0 +1,4 @@
|
||||
#define CHANGETURF_DEFER_CHANGE 1
|
||||
#define CHANGETURF_IGNORE_AIR 2
|
||||
#define CHANGETURF_FORCEOP 4
|
||||
#define CHANGETURF_SKIP 8 // A flag for PlaceOnTop to just instance the new turf instead of calling ChangeTurf. Used for uninitialized turfs NOTHING ELSE
|
||||
@@ -4,7 +4,12 @@
|
||||
#define DM_HEAL "Heal"
|
||||
#define DM_NOISY "Noisy"
|
||||
#define DM_DRAGON "Dragon"
|
||||
#define DM_ABSORB "Absorb"
|
||||
#define DM_UNABSORB "Un-absorb"
|
||||
|
||||
#define isbelly(A) istype(A, /obj/belly)
|
||||
|
||||
#define QDEL_NULL_LIST(x) if(x) { for(var/y in x) { qdel(y) } ; x = null }
|
||||
#define VORE_STRUGGLE_EMOTE_CHANCE 40
|
||||
|
||||
// Stance for hostile mobs to be in while devouring someone.
|
||||
@@ -48,18 +53,23 @@ GLOBAL_LIST_INIT(death_pred, list(
|
||||
'sound/vore/pred/death_10.ogg'))
|
||||
*/
|
||||
|
||||
GLOBAL_LIST_INIT(pred_vore_sounds, list(
|
||||
GLOBAL_LIST_INIT(vore_sounds, list(
|
||||
"Gulp" = 'sound/vore/pred/swallow_01.ogg',
|
||||
"Swallow" = 'sound/vore/pred/swallow_02.ogg',
|
||||
"Insertion1" = 'sound/vore/pred/insertion_01.ogg',
|
||||
"Insertion2" = 'sound/vore/pred/insertion_02.ogg',
|
||||
"Tauric Swallow" = 'sound/vore/pred/taurswallow.ogg',
|
||||
"Stomach Move" = 'sound/vore/pred/stomachmove.ogg',
|
||||
"Schlorp" = 'sound/vore/pred/schlorp.ogg',
|
||||
"Squish1" = 'sound/vore/pred/squish_01.ogg',
|
||||
"Squish2" = 'sound/vore/pred/squish_02.ogg',
|
||||
"Squish3" = 'sound/vore/pred/squish_03.ogg',
|
||||
"Squish4" = 'sound/vore/pred/squish_04.ogg',
|
||||
"Rustle (cloth)" = 'sound/effects/rustle5.ogg',
|
||||
"rustle2(cloth)" = 'sound/effects/rustle2.ogg',
|
||||
"rustle3(cloth)" = 'sound/effects/rustle3.ogg',
|
||||
"rustle4(cloth)" = 'sound/effects/rustle4.ogg',
|
||||
"rustle5(cloth)" = 'sound/effects/rustle5.ogg',
|
||||
"None" = null))
|
||||
/*
|
||||
GLOBAL_LIST_INIT(pred_struggle_sounds, list(
|
||||
@@ -68,7 +78,7 @@ GLOBAL_LIST_INIT(pred_struggle_sounds, list(
|
||||
"Struggle3" = 'sound/vore/pred/struggle_03.ogg',
|
||||
"Struggle4" = 'sound/vore/pred/struggle_04.ogg',
|
||||
"Struggle5" = 'sound/vore/pred/struggle_05.ogg'))
|
||||
*/
|
||||
|
||||
GLOBAL_LIST_INIT(prey_vore_sounds, list(
|
||||
"Gulp" = 'sound/vore/prey/swallow_01.ogg',
|
||||
"Swallow" = 'sound/vore/prey/swallow_02.ogg',
|
||||
@@ -81,7 +91,7 @@ GLOBAL_LIST_INIT(prey_vore_sounds, list(
|
||||
"Squish3" = 'sound/vore/prey/squish_03.ogg',
|
||||
"Squish4" = 'sound/vore/prey/squish_04.ogg'))
|
||||
|
||||
/*
|
||||
|
||||
GLOBAL_LIST_INIT(prey_struggle_sounds, list(
|
||||
"Struggle1" = 'sound/vore/prey/struggle_01.ogg',
|
||||
"Struggle2" = 'sound/vore/prey/struggle_02.ogg',
|
||||
@@ -121,3 +131,14 @@ GLOBAL_LIST_INIT(death_prey, list(
|
||||
"death9" = 'sound/vore/prey/death_09.ogg',
|
||||
"death10" = 'sound/vore/prey/death_10.ogg'))
|
||||
*/
|
||||
|
||||
GLOBAL_LIST_INIT(release_sounds, list(
|
||||
"rustle (cloth)" = 'sound/effects/rustle1.ogg',
|
||||
"rustle2 (cloth)" = 'sound/effects/rustle2.ogg',
|
||||
"rustle3 (cloth)" = 'sound/effects/rustle3.ogg',
|
||||
"rustle4 (cloth)" = 'sound/effects/rustle4.ogg',
|
||||
"rustle5 (cloth)" = 'sound/effects/rustle5.ogg',
|
||||
"Stomach Move" = 'sound/vore/pred/stomachmove.ogg',
|
||||
"Pred Escape" = 'sound/vore/pred/escape.ogg',
|
||||
"Splatter" = 'sound/effects/splat.ogg',
|
||||
"None" = null))
|
||||
@@ -18,4 +18,4 @@
|
||||
#define VV_NULL "NULL"
|
||||
#define VV_RESTORE_DEFAULT "Restore to Default"
|
||||
#define VV_MARKED_DATUM "Marked Datum"
|
||||
|
||||
#define VV_BITFIELD "Bitfield"
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#define WALL_DENT_HIT 1
|
||||
#define WALL_DENT_SHOT 2
|
||||
@@ -1,3 +1,8 @@
|
||||
//retvals for attempt_wires_interaction
|
||||
#define WIRE_INTERACTION_FAIL 0
|
||||
#define WIRE_INTERACTION_SUCCESSFUL 1
|
||||
#define WIRE_INTERACTION_BLOCK 2 //don't do anything else rather than open wires and whatever else.
|
||||
|
||||
#define WIRE_DUD_PREFIX "__dud"
|
||||
#define WIRE_ACTIVATE "Activate"
|
||||
#define WIRE_AI "AI Connection"
|
||||
|
||||
+87
-66
@@ -23,29 +23,42 @@ Actual Adjacent procs :
|
||||
/turf/proc/reachableAdjacentAtmosTurfs : returns turfs in cardinal directions reachable via atmos
|
||||
|
||||
*/
|
||||
#define PF_TIEBREAKER 0.005
|
||||
//tiebreker weight.To help to choose between equal paths
|
||||
//////////////////////
|
||||
//datum/PathNode object
|
||||
//////////////////////
|
||||
#define MASK_ODD 85
|
||||
#define MASK_EVEN 170
|
||||
|
||||
//////////////////////
|
||||
//PathNode object
|
||||
//////////////////////
|
||||
|
||||
//A* nodes variables
|
||||
/PathNode
|
||||
/datum/PathNode
|
||||
var/turf/source //turf associated with the PathNode
|
||||
var/PathNode/prevNode //link to the parent PathNode
|
||||
var/datum/PathNode/prevNode //link to the parent PathNode
|
||||
var/f //A* Node weight (f = g + h)
|
||||
var/g //A* movement cost variable
|
||||
var/h //A* heuristic variable
|
||||
var/nt //count the number of Nodes traversed
|
||||
var/bf //bitflag for dir to expand.Some sufficiently advanced motherfuckery
|
||||
|
||||
/PathNode/New(s,p,pg,ph,pnt)
|
||||
/datum/PathNode/New(s,p,pg,ph,pnt,_bf)
|
||||
source = s
|
||||
prevNode = p
|
||||
g = pg
|
||||
h = ph
|
||||
f = g + h
|
||||
f = g + h*(1+ PF_TIEBREAKER)
|
||||
nt = pnt
|
||||
bf = _bf
|
||||
|
||||
/datum/PathNode/proc/setp(p,pg,ph,pnt)
|
||||
prevNode = p
|
||||
g = pg
|
||||
h = ph
|
||||
f = g + h*(1+ PF_TIEBREAKER)
|
||||
nt = pnt
|
||||
|
||||
/PathNode/proc/calc_f()
|
||||
/datum/PathNode/proc/calc_f()
|
||||
f = g + h
|
||||
|
||||
//////////////////////
|
||||
@@ -53,125 +66,133 @@ Actual Adjacent procs :
|
||||
//////////////////////
|
||||
|
||||
//the weighting function, used in the A* algorithm
|
||||
/proc/PathWeightCompare(PathNode/a, PathNode/b)
|
||||
/proc/PathWeightCompare(datum/PathNode/a, datum/PathNode/b)
|
||||
return a.f - b.f
|
||||
|
||||
//reversed so that the Heap is a MinHeap rather than a MaxHeap
|
||||
/proc/HeapPathWeightCompare(PathNode/a, PathNode/b)
|
||||
/proc/HeapPathWeightCompare(datum/PathNode/a, datum/PathNode/b)
|
||||
return b.f - a.f
|
||||
|
||||
//wrapper that returns an empty list if A* failed to find a path
|
||||
/proc/get_path_to(caller, end, dist, maxnodes, maxnodedepth = 30, mintargetdist, adjacent = /turf/proc/reachableAdjacentTurfs, id=null, turf/exclude=null, simulated_only = 1)
|
||||
/proc/get_path_to(caller, end, dist, maxnodes, maxnodedepth = 30, mintargetdist, adjacent = /turf/proc/reachableTurftest, id=null, turf/exclude=null, simulated_only = 1)
|
||||
var/l = SSpathfinder.mobs.getfree(caller)
|
||||
while(!l)
|
||||
stoplag(3)
|
||||
l = SSpathfinder.mobs.getfree(caller)
|
||||
var/list/path = AStar(caller, end, dist, maxnodes, maxnodedepth, mintargetdist, adjacent,id, exclude, simulated_only)
|
||||
|
||||
SSpathfinder.mobs.found(l)
|
||||
if(!path)
|
||||
path = list()
|
||||
return path
|
||||
|
||||
//the actual algorithm
|
||||
/proc/AStar(caller, end, dist, maxnodes, maxnodedepth = 30, mintargetdist, adjacent = /turf/proc/reachableAdjacentTurfs, id=null, turf/exclude=null, simulated_only = 1)
|
||||
var/list/pnodelist = list()
|
||||
//sanitation
|
||||
var/start = get_turf(caller)
|
||||
if(!start)
|
||||
return 0
|
||||
/proc/cir_get_path_to(caller, end, dist, maxnodes, maxnodedepth = 30, mintargetdist, adjacent = /turf/proc/reachableTurftest, id=null, turf/exclude=null, simulated_only = 1)
|
||||
var/l = SSpathfinder.circuits.getfree(caller)
|
||||
while(!l)
|
||||
stoplag(3)
|
||||
l = SSpathfinder.circuits.getfree(caller)
|
||||
var/list/path = AStar(caller, end, dist, maxnodes, maxnodedepth, mintargetdist, adjacent,id, exclude, simulated_only)
|
||||
SSpathfinder.circuits.found(l)
|
||||
if(!path)
|
||||
path = list()
|
||||
return path
|
||||
|
||||
/proc/AStar(caller, _end, dist, maxnodes, maxnodedepth = 30, mintargetdist, adjacent = /turf/proc/reachableTurftest, id=null, turf/exclude=null, simulated_only = 1)
|
||||
//sanitation
|
||||
var/turf/end = get_turf(_end)
|
||||
var/turf/start = get_turf(caller)
|
||||
if((!start)||(start.z != end.z)||(start == end)) //no pathfinding between z levels
|
||||
return 0
|
||||
if(maxnodes)
|
||||
//if start turf is farther than maxnodes from end turf, no need to do anything
|
||||
if(call(start, dist)(end) > maxnodes)
|
||||
return 0
|
||||
maxnodedepth = maxnodes //no need to consider path longer than maxnodes
|
||||
|
||||
var/Heap/open = new /Heap(/proc/HeapPathWeightCompare) //the open list
|
||||
var/list/closed = new() //the closed list
|
||||
var/datum/Heap/open = new /datum/Heap(/proc/HeapPathWeightCompare) //the open list
|
||||
var/list/openc = new() //open list for node check
|
||||
var/list/path = null //the returned path, if any
|
||||
var/PathNode/cur //current processed turf
|
||||
|
||||
//initialization
|
||||
open.Insert(new /PathNode(start,null,0,call(start,dist)(end),0))
|
||||
|
||||
var/datum/PathNode/cur = new /datum/PathNode(start,null,0,call(start,dist)(end),0,15,1)//current processed turf
|
||||
open.Insert(cur)
|
||||
openc[start] = cur
|
||||
//then run the main loop
|
||||
while(!open.IsEmpty() && !path)
|
||||
//get the lower f node on the open list
|
||||
cur = open.Pop() //get the lower f turf in the open list
|
||||
closed.Add(cur.source) //and tell we've processed it
|
||||
|
||||
//get the lower f node on the open list
|
||||
//if we only want to get near the target, check if we're close enough
|
||||
var/closeenough
|
||||
if(mintargetdist)
|
||||
closeenough = call(cur.source,dist)(end) <= mintargetdist
|
||||
|
||||
//if too many steps, abandon that path
|
||||
if(maxnodedepth && (cur.nt > maxnodedepth))
|
||||
continue
|
||||
|
||||
//found the target turf (or close enough), let's create the path to it
|
||||
if(cur.source == end || closeenough)
|
||||
path = new()
|
||||
path.Add(cur.source)
|
||||
|
||||
while(cur.prevNode)
|
||||
cur = cur.prevNode
|
||||
path.Add(cur.source)
|
||||
|
||||
break
|
||||
|
||||
//get adjacents turfs using the adjacent proc, checking for access with id
|
||||
var/list/L = call(cur.source,adjacent)(caller,id, simulated_only)
|
||||
for(var/turf/T in L)
|
||||
if(T == exclude || (T in closed))
|
||||
continue
|
||||
|
||||
var/newg = cur.g + call(cur.source,dist)(T)
|
||||
|
||||
var/PathNode/P = pnodelist[T]
|
||||
if(!P)
|
||||
//is not already in open list, so add it
|
||||
var/PathNode/newnode = new /PathNode(T,cur,newg,call(T,dist)(end),cur.nt+1)
|
||||
open.Insert(newnode)
|
||||
pnodelist[T] = newnode
|
||||
else //is already in open list, check if it's a better way from the current turf
|
||||
if(newg < P.g)
|
||||
P.prevNode = cur
|
||||
P.g = (newg * L.len / 9)
|
||||
P.calc_f()
|
||||
P.nt = cur.nt + 1
|
||||
open.ReSort(P)//reorder the changed element in the list
|
||||
if((!maxnodedepth)||(cur.nt <= maxnodedepth))//if too many steps, don't process that path
|
||||
for(var/i = 0 to 3)
|
||||
var/f= 1<<i //get cardinal directions.1,2,4,8
|
||||
if(cur.bf & f)
|
||||
var/T = get_step(cur.source,f)
|
||||
if(T != exclude)
|
||||
var/datum/PathNode/CN = openc[T] //current checking turf
|
||||
var/r=((f & MASK_ODD)<<1)|((f & MASK_EVEN)>>1) //getting reverse direction throught swapping even and odd bits.((f & 01010101)<<1)|((f & 10101010)>>1)
|
||||
var/newg = cur.g + call(cur.source,dist)(T)
|
||||
if(CN)
|
||||
//is already in open list, check if it's a better way from the current turf
|
||||
CN.bf &= 15^r //we have no closed, so just cut off exceed dir.00001111 ^ reverse_dir.We don't need to expand to checked turf.
|
||||
if((newg < CN.g) )
|
||||
if(call(cur.source,adjacent)(caller, T, id, simulated_only))
|
||||
CN.setp(cur,newg,CN.h,cur.nt+1)
|
||||
open.ReSort(CN)//reorder the changed element in the list
|
||||
else
|
||||
//is not already in open list, so add it
|
||||
if(call(cur.source,adjacent)(caller, T, id, simulated_only))
|
||||
CN = new(T,cur,newg,call(T,dist)(end),cur.nt+1,15^r)
|
||||
open.Insert(CN)
|
||||
openc[T] = CN
|
||||
cur.bf = 0
|
||||
CHECK_TICK
|
||||
|
||||
|
||||
//cleaning after us
|
||||
pnodelist = null
|
||||
|
||||
//reverse the path to get it from start to finish
|
||||
if(path)
|
||||
for(var/i = 1; i <= path.len/2; i++)
|
||||
for(var/i = 1 to round(0.5*path.len))
|
||||
path.Swap(i,path.len-i+1)
|
||||
|
||||
openc = null
|
||||
//cleaning after us
|
||||
return path
|
||||
|
||||
//Returns adjacent turfs in cardinal directions that are reachable
|
||||
//simulated_only controls whether only simulated turfs are considered or not
|
||||
|
||||
/turf/proc/reachableAdjacentTurfs(caller, ID, simulated_only)
|
||||
var/list/L = new()
|
||||
var/turf/T
|
||||
var/static/space_type_cache = typecacheof(list(/turf/open/space))
|
||||
var/static/space_type_cache = typecacheof(/turf/open/space)
|
||||
|
||||
for(var/dir in GLOB.cardinals)
|
||||
T = get_step(src,dir)
|
||||
for(var/k in 1 to GLOB.cardinals.len)
|
||||
T = get_step(src,GLOB.cardinals[k])
|
||||
if(!T || (simulated_only && space_type_cache[T.type]))
|
||||
continue
|
||||
if(!T.density && !LinkBlockedWithAccess(T,caller, ID))
|
||||
L.Add(T)
|
||||
return L
|
||||
|
||||
/turf/proc/reachableTurftest(caller, var/turf/T, ID, simulated_only)
|
||||
if(T && !T.density && !(simulated_only && SSpathfinder.space_type_cache[T.type]) && !LinkBlockedWithAccess(T,caller, ID))
|
||||
return TRUE
|
||||
|
||||
//Returns adjacent turfs in cardinal directions that are reachable via atmos
|
||||
/turf/proc/reachableAdjacentAtmosTurfs()
|
||||
return atmos_adjacent_turfs
|
||||
|
||||
/turf/proc/LinkBlockedWithAccess(turf/T, caller, ID)
|
||||
var/adir = get_dir(src, T)
|
||||
var/rdir = get_dir(T, src)
|
||||
|
||||
var/rdir = ((adir & MASK_ODD)<<1)|((adir & MASK_EVEN)>>1)
|
||||
for(var/obj/structure/window/W in src)
|
||||
if(!W.CanAStarPass(ID, adir))
|
||||
return 1
|
||||
|
||||
@@ -26,7 +26,7 @@ proc/get_racelist(var/mob/user)//This proc returns a list of species that 'user'
|
||||
var/list/wlist = S.whitelist
|
||||
if(S.whitelisted && (wlist.Find(user.ckey) || wlist.Find(user.key) || user.client.holder)) //If your ckey is on the species whitelist or you're an admin:
|
||||
GLOB.whitelisted_species_list[S.id] = S.type //Add the species to their available species list.
|
||||
else if(!S.whitelisted && S.roundstart) //Normal roundstart species will be handled here.
|
||||
else if(!S.whitelisted) //Normal roundstart species will be handled here.
|
||||
GLOB.whitelisted_species_list[S.id] = S.type
|
||||
|
||||
return GLOB.whitelisted_species_list
|
||||
@@ -50,6 +50,9 @@ GLOBAL_LIST_EMPTY(xeno_head_list)
|
||||
GLOBAL_LIST_EMPTY(xeno_tail_list)
|
||||
GLOBAL_LIST_EMPTY(xeno_dorsal_list)
|
||||
|
||||
//IPC species
|
||||
GLOBAL_LIST_EMPTY(ipc_screens_list)
|
||||
GLOBAL_LIST_EMPTY(ipc_antennas_list)
|
||||
|
||||
//Genitals and Arousal Lists
|
||||
GLOBAL_LIST_EMPTY(cock_shapes_list)//global_lists.dm for the list initializations //Now also _DATASTRUCTURES globals.dm
|
||||
@@ -86,13 +89,13 @@ GLOBAL_LIST_INIT(dildo_colors, list(//mostly neon colors
|
||||
"Purple" = "#e300ff"//purple
|
||||
))
|
||||
|
||||
//mentor stuff
|
||||
GLOBAL_LIST_EMPTY(mentors)
|
||||
|
||||
//Looc stuff
|
||||
GLOBAL_VAR_INIT(looc_allowed, 1)
|
||||
GLOBAL_VAR_INIT(dlooc_allowed, 1)
|
||||
|
||||
//Crew objective and miscreants stuff
|
||||
GLOBAL_VAR_INIT(miscreants_allowed, FALSE)
|
||||
|
||||
/client/proc/reload_mentors()
|
||||
set name = "Reload Mentors"
|
||||
set category = "Admin"
|
||||
@@ -105,8 +108,8 @@ GLOBAL_VAR_INIT(dlooc_allowed, 1)
|
||||
set desc = "Sets an extended description of your character's features."
|
||||
set category = "IC"
|
||||
|
||||
var/new_flavor = (input(src, "Enter your new flavor text:", "Flavor text", null) as text|null)
|
||||
if(new_flavor)
|
||||
var/new_flavor = input(src, "Enter your new flavor text:", "Flavor text", null) as message|null
|
||||
if(!isnull(new_flavor))
|
||||
flavor_text = sanitize(new_flavor)
|
||||
to_chat(src, "Your flavor text has been updated.")
|
||||
|
||||
@@ -118,7 +121,7 @@ GLOBAL_VAR_INIT(dlooc_allowed, 1)
|
||||
prefs.chat_toggles ^= CHAT_LOOC
|
||||
prefs.save_preferences()
|
||||
src << "You will [(prefs.chat_toggles & CHAT_LOOC) ? "now" : "no longer"] see messages on the LOOC channel."
|
||||
SSblackbox.add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/togglelooc()
|
||||
set category = "Server"
|
||||
@@ -127,7 +130,7 @@ GLOBAL_VAR_INIT(dlooc_allowed, 1)
|
||||
toggle_looc()
|
||||
log_admin("[key_name(usr)] toggled LOOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled LOOC.")
|
||||
SSblackbox.add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/proc/toggle_looc(toggle = null)
|
||||
if(toggle != null) //if we're specifically en/disabling ooc
|
||||
@@ -147,7 +150,7 @@ GLOBAL_VAR_INIT(dlooc_allowed, 1)
|
||||
|
||||
log_admin("[key_name(usr)] toggled Dead LOOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled Dead LOOC.")
|
||||
SSblackbox.add_details("admin_verb","TDLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "TDLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/mob/living/carbon/proc/has_penis()
|
||||
+21
-25
@@ -9,6 +9,18 @@
|
||||
* Misc
|
||||
*/
|
||||
|
||||
#define LAZYINITLIST(L) if (!L) L = list()
|
||||
#define UNSETEMPTY(L) if (L && !length(L)) L = null
|
||||
#define LAZYREMOVE(L, I) if(L) { L -= I; if(!length(L)) { L = null; } }
|
||||
#define LAZYADD(L, I) if(!L) { L = list(); } L += I;
|
||||
#define LAZYOR(L, I) if(!L) { L = list(); } L |= I;
|
||||
#define LAZYFIND(L, V) L ? L.Find(V) : 0
|
||||
#define LAZYACCESS(L, I) (L ? (isnum(I) ? (I > 0 && I <= length(L) ? L[I] : null) : L[I]) : null)
|
||||
#define LAZYSET(L, K, V) if(!L) { L = list(); } L[K] = V;
|
||||
#define LAZYLEN(L) length(L)
|
||||
#define LAZYCLEARLIST(L) if(L) L.Cut()
|
||||
#define SANITIZE_LIST(L) ( islist(L) ? L : list() )
|
||||
|
||||
//Returns a list in plain english as a string
|
||||
/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
var/total = input.len
|
||||
@@ -32,9 +44,9 @@
|
||||
|
||||
//Returns list element or null. Should prevent "index out of bounds" error.
|
||||
/proc/listgetindex(list/L, index)
|
||||
if(istype(L))
|
||||
if(isnum(index) && IsInteger(index))
|
||||
if(IsInRange(index,1,L.len))
|
||||
if(LAZYLEN(L))
|
||||
if(isnum(index) && ISINTEGER(index))
|
||||
if(ISINRANGE(index,1,L.len))
|
||||
return L[index]
|
||||
else if(index in L)
|
||||
return L[index]
|
||||
@@ -42,7 +54,7 @@
|
||||
|
||||
//Return either pick(list) or null if list is not of type /list or is empty
|
||||
/proc/safepick(list/L)
|
||||
if(istype(L) && L.len)
|
||||
if(LAZYLEN(L))
|
||||
return pick(L)
|
||||
|
||||
//Checks if the list is empty
|
||||
@@ -53,7 +65,7 @@
|
||||
|
||||
//Checks for specific types in a list
|
||||
/proc/is_type_in_list(atom/A, list/L)
|
||||
if(!L || !L.len || !A)
|
||||
if(!LAZYLEN(L) || !A)
|
||||
return FALSE
|
||||
for(var/type in L)
|
||||
if(istype(A, type))
|
||||
@@ -61,18 +73,11 @@
|
||||
return FALSE
|
||||
|
||||
//Checks for specific types in specifically structured (Assoc "type" = TRUE) lists ('typecaches')
|
||||
/proc/is_type_in_typecache(atom/A, list/L)
|
||||
if(!L || !L.len || !A)
|
||||
|
||||
return FALSE
|
||||
if(ispath(A))
|
||||
. = L[A]
|
||||
else
|
||||
. = L[A.type]
|
||||
#define is_type_in_typecache(A, L) (A && length(L) && L[(ispath(A) ? A : A:type)])
|
||||
|
||||
//Checks for a string in a list
|
||||
/proc/is_string_in_list(string, list/L)
|
||||
if(!L || !L.len || !string)
|
||||
if(!LAZYLEN(L) || !string)
|
||||
return
|
||||
for(var/V in L)
|
||||
if(string == V)
|
||||
@@ -81,7 +86,7 @@
|
||||
|
||||
//Removes a string from a list
|
||||
/proc/remove_strings_from_list(string, list/L)
|
||||
if(!L || !L.len || !string)
|
||||
if(!LAZYLEN(L) || !string)
|
||||
return
|
||||
for(var/V in L)
|
||||
if(V == string)
|
||||
@@ -474,7 +479,7 @@
|
||||
#error Remie said that lummox was adding a way to get a lists
|
||||
#error contents via list.values, if that is true remove this
|
||||
#error otherwise, update the version and bug lummox
|
||||
#elseif
|
||||
#endif
|
||||
//Flattens a keyed list into a list of it's contents
|
||||
/proc/flatten_list(list/key_list)
|
||||
if(!islist(key_list))
|
||||
@@ -485,15 +490,6 @@
|
||||
|
||||
//Picks from the list, with some safeties, and returns the "default" arg if it fails
|
||||
#define DEFAULTPICK(L, default) ((islist(L) && length(L)) ? pick(L) : default)
|
||||
#define LAZYINITLIST(L) if (!L) L = list()
|
||||
#define UNSETEMPTY(L) if (L && !L.len) L = null
|
||||
#define LAZYREMOVE(L, I) if(L) { L -= I; if(!L.len) { L = null; } }
|
||||
#define LAZYADD(L, I) if(!L) { L = list(); } L += I;
|
||||
#define LAZYACCESS(L, I) (L ? (isnum(I) ? (I > 0 && I <= L.len ? L[I] : null) : L[I]) : null)
|
||||
#define LAZYSET(L, K, V) if(!L) { L = list(); } L[K] = V;
|
||||
#define LAZYLEN(L) length(L)
|
||||
#define LAZYCLEARLIST(L) if(L) L.Cut()
|
||||
#define SANITIZE_LIST(L) ( islist(L) ? L : list() )
|
||||
|
||||
/* Definining a counter as a series of key -> numeric value entries
|
||||
|
||||
|
||||
+103
-53
@@ -1,9 +1,13 @@
|
||||
//location of the rust-g library
|
||||
#define RUST_G "rust_g"
|
||||
|
||||
//wrapper macros for easier grepping
|
||||
#define DIRECT_OUTPUT(A, B) A << B
|
||||
#define SEND_IMAGE(target, image) DIRECT_OUTPUT(target, image)
|
||||
#define SEND_SOUND(target, sound) DIRECT_OUTPUT(target, sound)
|
||||
#define SEND_TEXT(target, text) DIRECT_OUTPUT(target, text)
|
||||
#define WRITE_FILE(file, text) DIRECT_OUTPUT(file, text)
|
||||
#define WRITE_LOG(log, text) call(RUST_G, "log_write")(log, text)
|
||||
|
||||
//print a warning message to world.log
|
||||
#define WARNING(MSG) warning("[MSG] in [__FILE__] at line [__LINE__] src: [src] usr: [usr].")
|
||||
@@ -24,91 +28,134 @@
|
||||
#define testing(msg)
|
||||
#endif
|
||||
|
||||
#ifdef UNIT_TESTS
|
||||
/proc/log_test(text)
|
||||
WRITE_LOG(GLOB.test_log, text)
|
||||
SEND_TEXT(world.log, text)
|
||||
#endif
|
||||
|
||||
|
||||
/* Items with ADMINPRIVATE prefixed are stripped from public logs. */
|
||||
/proc/log_admin(text)
|
||||
GLOB.admin_log.Add(text)
|
||||
if (config.log_admin)
|
||||
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]ADMIN: [text]")
|
||||
if (CONFIG_GET(flag/log_admin))
|
||||
WRITE_LOG(GLOB.world_game_log, "ADMIN: [text]")
|
||||
|
||||
//Items using this proc are stripped from public logs - use with caution
|
||||
/proc/log_admin_private(text)
|
||||
GLOB.admin_log.Add(text)
|
||||
if (config.log_admin)
|
||||
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]ADMINPRIVATE: [text]")
|
||||
if (CONFIG_GET(flag/log_admin))
|
||||
WRITE_LOG(GLOB.world_game_log, "ADMINPRIVATE: [text]")
|
||||
|
||||
/proc/log_adminsay(text)
|
||||
if (config.log_adminchat)
|
||||
log_admin_private("ASAY: [text]")
|
||||
if (CONFIG_GET(flag/log_adminchat))
|
||||
WRITE_LOG(GLOB.world_game_log, "ADMINPRIVATE: ASAY: [text]")
|
||||
|
||||
/proc/log_dsay(text)
|
||||
if (config.log_adminchat)
|
||||
log_admin("DSAY: [text]")
|
||||
if (CONFIG_GET(flag/log_adminchat))
|
||||
WRITE_LOG(GLOB.world_game_log, "ADMIN: DSAY: [text]")
|
||||
|
||||
|
||||
/* All other items are public. */
|
||||
/proc/log_game(text)
|
||||
if (config.log_game)
|
||||
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]GAME: [text]")
|
||||
|
||||
/proc/log_vote(text)
|
||||
if (config.log_vote)
|
||||
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]VOTE: [text]")
|
||||
if (CONFIG_GET(flag/log_game))
|
||||
WRITE_LOG(GLOB.world_game_log, "GAME: [text]")
|
||||
|
||||
/proc/log_access(text)
|
||||
if (config.log_access)
|
||||
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]ACCESS: [text]")
|
||||
|
||||
/proc/log_say(text)
|
||||
if (config.log_say)
|
||||
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]SAY: [text]")
|
||||
|
||||
/proc/log_prayer(text)
|
||||
if (config.log_prayer)
|
||||
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]PRAY: [text]")
|
||||
if (CONFIG_GET(flag/log_access))
|
||||
WRITE_LOG(GLOB.world_game_log, "ACCESS: [text]")
|
||||
|
||||
/proc/log_law(text)
|
||||
if (config.log_law)
|
||||
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]LAW: [text]")
|
||||
|
||||
/proc/log_ooc(text)
|
||||
if (config.log_ooc)
|
||||
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]OOC: [text]")
|
||||
|
||||
/proc/log_whisper(text)
|
||||
if (config.log_whisper)
|
||||
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]WHISPER: [text]")
|
||||
|
||||
/proc/log_emote(text)
|
||||
if (config.log_emote)
|
||||
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]EMOTE: [text]")
|
||||
if (CONFIG_GET(flag/log_law))
|
||||
WRITE_LOG(GLOB.world_game_log, "LAW: [text]")
|
||||
|
||||
/proc/log_attack(text)
|
||||
if (config.log_attack)
|
||||
WRITE_FILE(GLOB.world_attack_log, "\[[time_stamp()]]ATTACK: [text]")
|
||||
if (CONFIG_GET(flag/log_attack))
|
||||
WRITE_LOG(GLOB.world_attack_log, "ATTACK: [text]")
|
||||
|
||||
/proc/log_manifest(ckey, datum/mind/mind,mob/body, latejoin = FALSE)
|
||||
if (CONFIG_GET(flag/log_manifest))
|
||||
WRITE_LOG(GLOB.world_manifest_log, "[ckey] \\ [body.real_name] \\ [mind.assigned_role] \\ [mind.special_role ? mind.special_role : "NONE"] \\ [latejoin ? "LATEJOIN":"ROUNDSTART"]")
|
||||
|
||||
|
||||
/proc/log_say(text)
|
||||
if (CONFIG_GET(flag/log_say))
|
||||
WRITE_LOG(GLOB.world_game_log, "SAY: [text]")
|
||||
|
||||
/proc/log_ooc(text)
|
||||
if (CONFIG_GET(flag/log_ooc))
|
||||
WRITE_LOG(GLOB.world_game_log, "OOC: [text]")
|
||||
|
||||
/proc/log_whisper(text)
|
||||
if (CONFIG_GET(flag/log_whisper))
|
||||
WRITE_LOG(GLOB.world_game_log, "WHISPER: [text]")
|
||||
|
||||
/proc/log_emote(text)
|
||||
if (CONFIG_GET(flag/log_emote))
|
||||
WRITE_LOG(GLOB.world_game_log, "EMOTE: [text]")
|
||||
|
||||
/proc/log_prayer(text)
|
||||
if (CONFIG_GET(flag/log_prayer))
|
||||
WRITE_LOG(GLOB.world_game_log, "PRAY: [text]")
|
||||
|
||||
/proc/log_pda(text)
|
||||
if (config.log_pda)
|
||||
WRITE_FILE(GLOB.world_pda_log, "\[[time_stamp()]]PDA: [text]")
|
||||
if (CONFIG_GET(flag/log_pda))
|
||||
WRITE_LOG(GLOB.world_pda_log, "PDA: [text]")
|
||||
|
||||
/proc/log_comment(text)
|
||||
if (config.log_pda)
|
||||
if (CONFIG_GET(flag/log_pda))
|
||||
//reusing the PDA option because I really don't think news comments are worth a config option
|
||||
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]COMMENT: [text]")
|
||||
WRITE_LOG(GLOB.world_pda_log, "COMMENT: [text]")
|
||||
|
||||
/proc/log_chat(text)
|
||||
if (config.log_pda)
|
||||
WRITE_FILE(GLOB.world_game_log, "\[[time_stamp()]]CHAT: [text]")
|
||||
if (CONFIG_GET(flag/log_pda))
|
||||
//same thing here
|
||||
WRITE_LOG(GLOB.world_pda_log, "CHAT: [text]")
|
||||
|
||||
/proc/log_qdel(text)
|
||||
WRITE_FILE(GLOB.world_qdel_log, "\[[time_stamp()]]QDEL: [text]")
|
||||
/proc/log_vote(text)
|
||||
if (CONFIG_GET(flag/log_vote))
|
||||
WRITE_LOG(GLOB.world_game_log, "VOTE: [text]")
|
||||
|
||||
|
||||
/proc/log_topic(text)
|
||||
WRITE_LOG(GLOB.world_game_log, "TOPIC: [text]")
|
||||
|
||||
/proc/log_href(text)
|
||||
WRITE_LOG(GLOB.world_href_log, "HREF: [text]")
|
||||
|
||||
/proc/log_sql(text)
|
||||
WRITE_FILE(GLOB.sql_error_log, "\[[time_stamp()]]SQL: [text]")
|
||||
WRITE_LOG(GLOB.sql_error_log, "SQL: [text]")
|
||||
|
||||
//This replaces world.log so it displays both in DD and the file
|
||||
/proc/log_qdel(text)
|
||||
WRITE_LOG(GLOB.world_qdel_log, "QDEL: [text]")
|
||||
|
||||
/proc/log_query_debug(text)
|
||||
WRITE_LOG(GLOB.query_debug_log, "SQL: [text]")
|
||||
|
||||
/* Log to both DD and the logfile. */
|
||||
/proc/log_world(text)
|
||||
WRITE_FILE(GLOB.world_runtime_log, text)
|
||||
WRITE_LOG(GLOB.world_runtime_log, text)
|
||||
SEND_TEXT(world.log, text)
|
||||
|
||||
// Helper procs for building detailed log lines
|
||||
/* Log to the logfile only. */
|
||||
/proc/log_runtime(text)
|
||||
WRITE_LOG(GLOB.world_runtime_log, text)
|
||||
|
||||
/* Rarely gets called; just here in case the config breaks. */
|
||||
/proc/log_config(text)
|
||||
WRITE_LOG(GLOB.config_error_log, text)
|
||||
SEND_TEXT(world.log, text)
|
||||
|
||||
|
||||
/* For logging round startup. */
|
||||
/proc/start_log(log)
|
||||
WRITE_LOG(log, "Starting up round ID [GLOB.round_id].\n-------------------------")
|
||||
|
||||
/* Close open log handles. This should be called as late as possible, and no logging should hapen after. */
|
||||
/proc/shutdown_logging()
|
||||
call(RUST_G, "log_close_all")()
|
||||
|
||||
|
||||
/* Helper procs for building detailed log lines */
|
||||
/proc/datum_info_line(datum/D)
|
||||
if(!istype(D))
|
||||
return
|
||||
@@ -125,3 +172,6 @@
|
||||
return "[A.loc] [COORD(T)] ([A.loc.type])"
|
||||
else if(A.loc)
|
||||
return "[A.loc] (0, 0, 0) ([A.loc.type])"
|
||||
|
||||
//this is only used here (for now)
|
||||
#undef RUST_G
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
#define BP_MAX_ROOM_SIZE 300
|
||||
|
||||
// Gets an atmos isolated contained space
|
||||
// Returns an associative list of turf|dirs pairs
|
||||
// The dirs are connected turfs in the same space
|
||||
// break_if_found is a typecache of turf types to return false if found
|
||||
/proc/detect_room(turf/origin, list/break_if_found)
|
||||
if(origin.blocks_air)
|
||||
return list(origin)
|
||||
|
||||
. = list()
|
||||
var/list/checked_turfs = list()
|
||||
var/list/found_turfs = list(origin)
|
||||
while(found_turfs.len)
|
||||
var/turf/sourceT = found_turfs[1]
|
||||
if(break_if_found[sourceT.type])
|
||||
return FALSE
|
||||
if (istype(sourceT.loc, /area/shuttle))
|
||||
return FALSE
|
||||
found_turfs.Cut(1, 2)
|
||||
var/dir_flags = checked_turfs[sourceT]
|
||||
for(var/dir in GLOB.alldirs)
|
||||
if(dir_flags & dir) // This means we've checked this dir before, probably from the other turf
|
||||
continue
|
||||
var/turf/checkT = get_step(sourceT, dir)
|
||||
if(!checkT)
|
||||
continue
|
||||
checked_turfs[sourceT] |= dir
|
||||
checked_turfs[checkT] |= turn(dir, 180)
|
||||
.[sourceT] |= dir
|
||||
.[checkT] |= turn(dir, 180)
|
||||
var/static/list/cardinal_cache = list("[NORTH]"=TRUE, "[EAST]"=TRUE, "[SOUTH]"=TRUE, "[WEST]"=TRUE)
|
||||
if(!cardinal_cache["[dir]"] || checkT.blocks_air || !CANATMOSPASS(sourceT, checkT))
|
||||
continue
|
||||
found_turfs += checkT // Since checkT is connected, add it to the list to be processed
|
||||
|
||||
/proc/create_area(mob/creator)
|
||||
var/static/blacklisted_turfs = typecacheof(/turf/open/space)
|
||||
var/static/blacklisted_areas = typecacheof(list(
|
||||
/area/space,
|
||||
/area/shuttle,
|
||||
))
|
||||
var/list/turfs = detect_room(get_turf(creator), blacklisted_turfs)
|
||||
if(!turfs)
|
||||
to_chat(creator, "<span class='warning'>The new area must be completely airtight and not a part of a shuttle.</span>")
|
||||
return
|
||||
if(turfs.len > BP_MAX_ROOM_SIZE)
|
||||
to_chat(creator, "<span class='warning'>The room you're in is too big. It is [((turfs.len / BP_MAX_ROOM_SIZE)-1)*100]% larger than allowed.</span>")
|
||||
return
|
||||
var/list/areas = list("New Area" = /area)
|
||||
for(var/i in 1 to turfs.len)
|
||||
var/area/place = get_area(turfs[i])
|
||||
if(blacklisted_areas[place.type] || istype(place, /area/shuttle))
|
||||
continue
|
||||
if(!place.requires_power || place.noteleport || place.hidden)
|
||||
continue // No expanding powerless rooms etc
|
||||
areas[place.name] = place
|
||||
var/area_choice = input(creator, "Choose an area to expand or make a new area.", "Area Expansion") as null|anything in areas
|
||||
area_choice = areas[area_choice]
|
||||
|
||||
if(!area_choice)
|
||||
to_chat(creator, "<span class='warning'>No choice selected. The area remains undefined.</span>")
|
||||
return
|
||||
var/area/newA
|
||||
var/area/oldA = get_area(get_turf(creator))
|
||||
if(!isarea(area_choice))
|
||||
var/str = stripped_input(creator,"New area name:", "Blueprint Editing", "", MAX_NAME_LEN)
|
||||
if(!str || !length(str)) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
to_chat(creator, "<span class='warning'>The given name is too long. The area remains undefined.</span>")
|
||||
return
|
||||
newA = new area_choice
|
||||
newA.setup(str)
|
||||
newA.set_dynamic_lighting()
|
||||
newA.has_gravity = oldA.has_gravity
|
||||
else
|
||||
newA = area_choice
|
||||
|
||||
for(var/i in 1 to turfs.len)
|
||||
var/turf/thing = turfs[i]
|
||||
var/area/old_area = thing.loc
|
||||
newA.contents += thing
|
||||
thing.change_area(old_area, newA)
|
||||
|
||||
var/list/firedoors = oldA.firedoors
|
||||
for(var/door in firedoors)
|
||||
var/obj/machinery/door/firedoor/FD = door
|
||||
FD.CalculateAffectingAreas()
|
||||
|
||||
to_chat(creator, "<span class='notice'>You have created a new area, named [newA.name]. It is now weather proof, and constructing an APC will allow it to be powered.</span>")
|
||||
return TRUE
|
||||
|
||||
#undef BP_MAX_ROOM_SIZE
|
||||
+24
-1
@@ -30,7 +30,7 @@ GLOBAL_VAR_INIT(cmp_field, "name")
|
||||
return sorttext(a.ckey, b.ckey)
|
||||
|
||||
/proc/cmp_subsystem_init(datum/controller/subsystem/a, datum/controller/subsystem/b)
|
||||
return b.init_order - a.init_order
|
||||
return initial(b.init_order) - initial(a.init_order) //uses initial() so it can be used on types
|
||||
|
||||
/proc/cmp_subsystem_display(datum/controller/subsystem/a, datum/controller/subsystem/b)
|
||||
return sorttext(b.name, a.name)
|
||||
@@ -58,3 +58,26 @@ GLOBAL_VAR_INIT(cmp_field, "name")
|
||||
. = B.failures - A.failures
|
||||
if (!.)
|
||||
. = B.qdels - A.qdels
|
||||
|
||||
/proc/cmp_generic_stat_item_time(list/A, list/B)
|
||||
. = B[STAT_ENTRY_TIME] - A[STAT_ENTRY_TIME]
|
||||
if (!.)
|
||||
. = B[STAT_ENTRY_COUNT] - A[STAT_ENTRY_COUNT]
|
||||
|
||||
/proc/cmp_profile_avg_time_dsc(list/A, list/B)
|
||||
return (B[PROFILE_ITEM_TIME]/(B[PROFILE_ITEM_COUNT] || 1)) - (A[PROFILE_ITEM_TIME]/(A[PROFILE_ITEM_COUNT] || 1))
|
||||
|
||||
/proc/cmp_profile_time_dsc(list/A, list/B)
|
||||
return B[PROFILE_ITEM_TIME] - A[PROFILE_ITEM_TIME]
|
||||
|
||||
/proc/cmp_profile_count_dsc(list/A, list/B)
|
||||
return B[PROFILE_ITEM_COUNT] - A[PROFILE_ITEM_COUNT]
|
||||
|
||||
/proc/cmp_atom_layer_asc(atom/A,atom/B)
|
||||
if(A.plane != B.plane)
|
||||
return A.plane - B.plane
|
||||
else
|
||||
return A.layer - B.layer
|
||||
|
||||
/proc/cmp_advdisease_resistance_asc(datum/disease/advance/A, datum/disease/advance/B)
|
||||
return A.totalResistance() - B.totalResistance()
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
//Curse you calenders...
|
||||
/proc/IsLeapYear(y)
|
||||
return ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0))
|
||||
|
||||
//Y, eg: 2017, 2018, 2019, in num form (not string)
|
||||
//etc. Between 1583 and 4099
|
||||
//Adapted from a free algorithm written in BASIC (https://www.assa.org.au/edm#Computer)
|
||||
/proc/EasterDate(y)
|
||||
var/FirstDig, Remain19, temp //Intermediate Results
|
||||
var/tA, tB, tC, tD, tE //Table A-E results
|
||||
var/d, m //Day and Month returned
|
||||
|
||||
FirstDig = round((y / 100))
|
||||
Remain19 = y % 19
|
||||
|
||||
temp = (round((FirstDig - 15) / 2)) + 202 - 11 * Remain19
|
||||
|
||||
switch(FirstDig)
|
||||
if(21,24,25,27,28,29,30,31,32,34,35,38)
|
||||
temp -= 1
|
||||
if(33,36,37,39,40)
|
||||
temp -= 2
|
||||
temp %= 30
|
||||
|
||||
tA = temp + 21
|
||||
if(temp == 29)
|
||||
tA -= 1
|
||||
if(temp == 28 && (Remain19 > 10))
|
||||
tA -= 1
|
||||
tB = (tA - 19) % 7
|
||||
|
||||
tC = (40 - FirstDig) % 4
|
||||
if(tC == 3)
|
||||
tC += 1
|
||||
if(tC > 1)
|
||||
tC += 1
|
||||
temp = y % 100
|
||||
tD = (temp + round((temp / 4))) % 7
|
||||
|
||||
tE = ((20 - tB - tC - tD) % 7) + 1
|
||||
d = tA + tE
|
||||
if(d > 31)
|
||||
d -= 31
|
||||
m = 4
|
||||
else
|
||||
m = 3
|
||||
return list("day" = d, "month" = m)
|
||||
@@ -35,6 +35,7 @@
|
||||
return path
|
||||
|
||||
#define FTPDELAY 200 //200 tick delay to discourage spam
|
||||
#define ADMIN_FTPDELAY_MODIFIER 0.5 //Admins get to spam files faster since we ~trust~ them!
|
||||
/* This proc is a failsafe to prevent spamming of file requests.
|
||||
It is just a timer that only permits a download every [FTPDELAY] ticks.
|
||||
This can be changed by modifying FTPDELAY's value above.
|
||||
@@ -43,11 +44,15 @@
|
||||
/client/proc/file_spam_check()
|
||||
var/time_to_wait = GLOB.fileaccess_timer - world.time
|
||||
if(time_to_wait > 0)
|
||||
to_chat(src, "<font color='red'>Error: file_spam_check(): Spam. Please wait [round(time_to_wait/10)] seconds.</font>")
|
||||
to_chat(src, "<font color='red'>Error: file_spam_check(): Spam. Please wait [DisplayTimeText(time_to_wait)].</font>")
|
||||
return 1
|
||||
GLOB.fileaccess_timer = world.time + FTPDELAY
|
||||
var/delay = FTPDELAY
|
||||
if(holder)
|
||||
delay *= ADMIN_FTPDELAY_MODIFIER
|
||||
GLOB.fileaccess_timer = world.time + delay
|
||||
return 0
|
||||
#undef FTPDELAY
|
||||
#undef ADMIN_FTPDELAY_MODIFIER
|
||||
|
||||
/proc/pathwalk(path)
|
||||
var/list/jobs = list(path)
|
||||
|
||||
+55
-86
@@ -14,15 +14,11 @@
|
||||
var/turf/T = get_turf(A)
|
||||
return T ? T.loc : null
|
||||
|
||||
/proc/get_area_name(atom/X)
|
||||
var/area/Y = get_area(X)
|
||||
return Y.name
|
||||
|
||||
/proc/get_area_by_name(N) //get area by its name
|
||||
for(var/area/A in world)
|
||||
if(A.name == N)
|
||||
return A
|
||||
return 0
|
||||
/proc/get_area_name(atom/X, format_text = FALSE)
|
||||
var/area/A = isarea(X) ? X : get_area(X)
|
||||
if(!A)
|
||||
return null
|
||||
return format_text ? format_text(A.name) : A.name
|
||||
|
||||
/proc/get_areas_in_range(dist=0, atom/center=usr)
|
||||
if(!dist)
|
||||
@@ -77,7 +73,7 @@
|
||||
|
||||
/proc/alone_in_area(area/the_area, mob/must_be_alone, check_type = /mob/living/carbon)
|
||||
var/area/our_area = get_area(the_area)
|
||||
for(var/C in GLOB.living_mob_list)
|
||||
for(var/C in GLOB.alive_mob_list)
|
||||
if(!istype(C, check_type))
|
||||
continue
|
||||
if(C == must_be_alone)
|
||||
@@ -192,7 +188,7 @@
|
||||
if(sight_check && !isInSight(A_tmp, O))
|
||||
passed=0
|
||||
|
||||
else if(include_radio && istype(A, /obj/item/device/radio))
|
||||
else if(include_radio && istype(A, /obj/item/radio))
|
||||
passed=1
|
||||
|
||||
if(sight_check && !isInSight(A, O))
|
||||
@@ -214,30 +210,39 @@
|
||||
/proc/get_hearers_in_view(R, atom/source)
|
||||
// Returns a list of hearers in view(R) from source (ignoring luminosity). Used in saycode.
|
||||
var/turf/T = get_turf(source)
|
||||
var/list/hear = list()
|
||||
. = list()
|
||||
|
||||
if(!T)
|
||||
return hear
|
||||
return
|
||||
|
||||
var/list/range = get_hear(R, T)
|
||||
for(var/atom/movable/A in range)
|
||||
hear |= recursive_hear_check(A)
|
||||
var/list/processing_list = list()
|
||||
if (R == 0) // if the range is zero, we know exactly where to look for, we can skip view
|
||||
processing_list += T.contents // We can shave off one iteration by assuming turfs cannot hear
|
||||
else // A variation of get_hear inlined here to take advantage of the compiler's fastpath for obj/mob in view
|
||||
var/lum = T.luminosity
|
||||
T.luminosity = 6 // This is the maximum luminosity
|
||||
for(var/mob/M in view(R, T))
|
||||
processing_list += M
|
||||
for(var/obj/O in view(R, T))
|
||||
processing_list += O
|
||||
T.luminosity = lum
|
||||
|
||||
return hear
|
||||
|
||||
|
||||
/proc/get_mobs_in_radio_ranges(list/obj/item/device/radio/radios)
|
||||
|
||||
set background = BACKGROUND_ENABLED
|
||||
while(processing_list.len) // recursive_hear_check inlined here
|
||||
var/atom/A = processing_list[1]
|
||||
if(A.flags_1 & HEAR_1)
|
||||
. += A
|
||||
processing_list.Cut(1, 2)
|
||||
processing_list += A.contents
|
||||
|
||||
/proc/get_mobs_in_radio_ranges(list/obj/item/radio/radios)
|
||||
. = list()
|
||||
// Returns a list of mobs who can hear any of the radios given in @radios
|
||||
for(var/obj/item/device/radio/R in radios)
|
||||
for(var/obj/item/radio/R in radios)
|
||||
if(R)
|
||||
. |= get_hearers_in_view(R.canhear_range, R)
|
||||
|
||||
|
||||
#define SIGN(X) ((X<0)?-1:1)
|
||||
#define SIGNV(X) ((X<0)?-1:1)
|
||||
|
||||
/proc/inLineOfSight(X1,Y1,X2,Y2,Z=1,PX1=16.5,PY1=16.5,PX2=16.5,PY2=16.5)
|
||||
var/turf/T
|
||||
@@ -268,7 +273,7 @@
|
||||
if(T.opacity)
|
||||
return 0
|
||||
return 1
|
||||
#undef SIGN
|
||||
#undef SIGNV
|
||||
|
||||
|
||||
/proc/isInSight(atom/A, atom/B)
|
||||
@@ -300,6 +305,7 @@
|
||||
else
|
||||
return get_step(start, EAST)
|
||||
|
||||
|
||||
/proc/try_move_adjacent(atom/movable/AM)
|
||||
var/turf/T = get_turf(AM)
|
||||
for(var/direction in GLOB.cardinals)
|
||||
@@ -307,28 +313,26 @@
|
||||
break
|
||||
|
||||
/proc/get_mob_by_key(key)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if(M.ckey == lowertext(key))
|
||||
var/ckey = ckey(key)
|
||||
for(var/i in GLOB.player_list)
|
||||
var/mob/M = i
|
||||
if(M.ckey == ckey)
|
||||
return M
|
||||
return null
|
||||
|
||||
// Will return a list of active candidates. It increases the buffer 5 times until it finds a candidate which is active within the buffer.
|
||||
/proc/considered_alive(datum/mind/M, enforce_human = TRUE)
|
||||
if(M && M.current)
|
||||
if(enforce_human)
|
||||
var/mob/living/carbon/human/H
|
||||
if(ishuman(M.current))
|
||||
H = M.current
|
||||
return M.current.stat != DEAD && !issilicon(M.current) && !isbrain(M.current) && (!H || H.dna.species.id != "memezombies")
|
||||
else if(isliving(M.current))
|
||||
return M.current.stat != DEAD
|
||||
return FALSE
|
||||
|
||||
/proc/get_candidates(be_special_type, afk_bracket = config.inactivity_period, jobbanType)
|
||||
var/list/candidates = list()
|
||||
// Keep looping until we find a non-afk candidate within the time bracket (we limit the bracket to 10 minutes (6000))
|
||||
while(!candidates.len && afk_bracket < config.afk_period)
|
||||
for(var/mob/dead/observer/G in GLOB.player_list)
|
||||
if(G.client != null)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
if(!G.client.is_afk(afk_bracket) && (be_special_type in G.client.prefs.be_special))
|
||||
if (jobbanType)
|
||||
if(!(jobban_isbanned(G, jobbanType) || jobban_isbanned(G, "Syndicate")))
|
||||
candidates += G.client
|
||||
else
|
||||
candidates += G.client
|
||||
afk_bracket += 600 // Add a minute to the bracket, for every attempt
|
||||
return candidates
|
||||
/proc/considered_afk(datum/mind/M)
|
||||
return !M || !M.current || !M.current.client || M.current.client.is_afk()
|
||||
|
||||
/proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480)
|
||||
if(!isobj(O))
|
||||
@@ -346,7 +350,7 @@
|
||||
/proc/flick_overlay(image/I, list/show_to, duration)
|
||||
for(var/client/C in show_to)
|
||||
C.images += I
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /.proc/remove_images_from_clients, I, show_to), duration)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /.proc/remove_images_from_clients, I, show_to), duration, TIMER_CLIENT_TIME)
|
||||
|
||||
/proc/flick_overlay_view(image/I, atom/target, duration) //wrapper for the above, flicks to everyone who can see the target atom
|
||||
var/list/viewing = list()
|
||||
@@ -377,51 +381,13 @@
|
||||
active_players++
|
||||
return active_players
|
||||
|
||||
/datum/projectile_data
|
||||
var/src_x
|
||||
var/src_y
|
||||
var/time
|
||||
var/distance
|
||||
var/power_x
|
||||
var/power_y
|
||||
var/dest_x
|
||||
var/dest_y
|
||||
|
||||
/datum/projectile_data/New(var/src_x, var/src_y, var/time, var/distance, \
|
||||
var/power_x, var/power_y, var/dest_x, var/dest_y)
|
||||
src.src_x = src_x
|
||||
src.src_y = src_y
|
||||
src.time = time
|
||||
src.distance = distance
|
||||
src.power_x = power_x
|
||||
src.power_y = power_y
|
||||
src.dest_x = dest_x
|
||||
src.dest_y = dest_y
|
||||
|
||||
/proc/projectile_trajectory(src_x, src_y, rotation, angle, power)
|
||||
|
||||
// returns the destination (Vx,y) that a projectile shot at [src_x], [src_y], with an angle of [angle],
|
||||
// rotated at [rotation] and with the power of [power]
|
||||
// Thanks to VistaPOWA for this function
|
||||
|
||||
var/power_x = power * cos(angle)
|
||||
var/power_y = power * sin(angle)
|
||||
var/time = 2* power_y / 10 //10 = g
|
||||
|
||||
var/distance = time * power_x
|
||||
|
||||
var/dest_x = src_x + distance*sin(rotation);
|
||||
var/dest_y = src_y + distance*cos(rotation);
|
||||
|
||||
return new /datum/projectile_data(src_x, src_y, time, distance, power_x, power_y, dest_x, dest_y)
|
||||
|
||||
/proc/showCandidatePollWindow(mob/M, poll_time, Question, list/candidates, ignore_category, time_passed, flashwindow = TRUE)
|
||||
set waitfor = 0
|
||||
|
||||
SEND_SOUND(M, 'sound/misc/notice2.ogg') //Alerting them to their consideration
|
||||
if(flashwindow)
|
||||
window_flash(M.client)
|
||||
switch(ignore_category ? askuser(M,Question,"Please answer in [poll_time/10] seconds!","Yes","No","Never for this round", StealFocus=0, Timeout=poll_time) : askuser(M,Question,"Please answer in [poll_time/10] seconds!","Yes","No", StealFocus=0, Timeout=poll_time))
|
||||
switch(ignore_category ? askuser(M,Question,"Please answer in [DisplayTimeText(poll_time)]!","Yes","No","Never for this round", StealFocus=0, Timeout=poll_time) : askuser(M,Question,"Please answer in [DisplayTimeText(poll_time)]!","Yes","No", StealFocus=0, Timeout=poll_time))
|
||||
if(1)
|
||||
to_chat(M, "<span class='notice'>Choice registered: Yes.</span>")
|
||||
if(time_passed + poll_time <= world.time)
|
||||
@@ -467,7 +433,7 @@
|
||||
if(!gametypeCheck.age_check(M.client))
|
||||
continue
|
||||
if(jobbanType)
|
||||
if(jobban_isbanned(M, jobbanType) || jobban_isbanned(M, "Syndicate"))
|
||||
if(jobban_isbanned(M, jobbanType) || jobban_isbanned(M, ROLE_SYNDICATE))
|
||||
continue
|
||||
|
||||
showCandidatePollWindow(M, poll_time, Question, result, ignore_category, time_passed, flashwindow)
|
||||
@@ -530,7 +496,7 @@
|
||||
winset(C, "mainwindow", "flash=5")
|
||||
|
||||
/proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
|
||||
if(!SSticker.IsRoundInProgress() || !character)
|
||||
if(!SSticker.IsRoundInProgress() || QDELETED(character))
|
||||
return
|
||||
var/area/A = get_area(character)
|
||||
var/message = "<span class='game deadsay'><span class='name'>\
|
||||
@@ -555,9 +521,12 @@
|
||||
return hex2num(copytext(hexa, 6, 8))
|
||||
|
||||
/proc/lavaland_equipment_pressure_check(turf/T)
|
||||
. = FALSE
|
||||
if(!istype(T))
|
||||
return
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
if(!istype(environment))
|
||||
return
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure <= LAVALAND_EQUIPMENT_EFFECT_PRESSURE)
|
||||
return TRUE
|
||||
. = TRUE
|
||||
|
||||
+100
-116
@@ -1,116 +1,100 @@
|
||||
//////////////////////////
|
||||
/////Initial Building/////
|
||||
//////////////////////////
|
||||
|
||||
/proc/make_datum_references_lists()
|
||||
//hair
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair, GLOB.hair_styles_list, GLOB.hair_styles_male_list, GLOB.hair_styles_female_list)
|
||||
//facial hair
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, GLOB.facial_hair_styles_list, GLOB.facial_hair_styles_male_list, GLOB.facial_hair_styles_female_list)
|
||||
//underwear
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, GLOB.underwear_list, GLOB.underwear_m, GLOB.underwear_f)
|
||||
//undershirt
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, GLOB.undershirt_list, GLOB.undershirt_m, GLOB.undershirt_f)
|
||||
//socks
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, GLOB.socks_list)
|
||||
//lizard bodyparts (blizzard intensifies)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, GLOB.body_markings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/lizard, GLOB.tails_list_lizard)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/lizard, GLOB.animated_tails_list_lizard)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, GLOB.tails_list_human)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/human, GLOB.animated_tails_list_human)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts, GLOB.snouts_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/horns,GLOB.horns_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/ears, GLOB.ears_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.wings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings_open, GLOB.wings_open_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, GLOB.frills_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines, GLOB.spines_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines_animated, GLOB.animated_spines_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, GLOB.legs_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.r_wings_list,roundstart = TRUE)
|
||||
|
||||
//citadel code
|
||||
//mammal bodyparts (fucking furries)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_body_markings, GLOB.mam_body_markings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails, GLOB.mam_tails_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_ears, GLOB.mam_ears_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails_animated, GLOB.mam_tails_animated_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/taur, GLOB.taur_list)
|
||||
//avian bodyparts (i swear this isn't starbound)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/beaks/avian, GLOB.avian_beaks_list)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/avian, GLOB.avian_tails_list)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/avian_wings, GLOB.avian_wings_list)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/avian_open_wings, GLOB.avian_open_wings_list)
|
||||
//xeno parts (hiss?)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_head, GLOB.xeno_head_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_tail, GLOB.xeno_tail_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_dorsal, GLOB.xeno_dorsal_list)
|
||||
//genitals
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/penis, GLOB.cock_shapes_list)
|
||||
|
||||
for(var/K in GLOB.cock_shapes_list)
|
||||
var/datum/sprite_accessory/penis/value = GLOB.cock_shapes_list[K]
|
||||
GLOB.cock_shapes_icons[K] = value.icon_state
|
||||
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/vagina, GLOB.vagina_shapes_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/breasts, GLOB.breasts_shapes_list)
|
||||
GLOB.breasts_size_list = list("a","b","c","d","e") //We need the list to choose from initialized, but it's no longer a sprite_accessory thing.
|
||||
|
||||
//Species
|
||||
for(var/spath in subtypesof(/datum/species))
|
||||
var/datum/species/S = new spath()
|
||||
if(S.roundstart)
|
||||
GLOB.roundstart_species[S.id] = S.type
|
||||
GLOB.species_list[S.id] = S.type
|
||||
|
||||
//Surgeries
|
||||
for(var/path in subtypesof(/datum/surgery))
|
||||
GLOB.surgeries_list += new path()
|
||||
|
||||
//Materials
|
||||
for(var/path in subtypesof(/datum/material))
|
||||
var/datum/material/D = new path()
|
||||
GLOB.materials_list[D.id] = D
|
||||
|
||||
//Techs
|
||||
for(var/path in subtypesof(/datum/tech))
|
||||
var/datum/tech/D = new path()
|
||||
GLOB.tech_list[D.id] = D
|
||||
|
||||
//Emotes
|
||||
for(var/path in subtypesof(/datum/emote))
|
||||
var/datum/emote/E = new path()
|
||||
E.emote_list[E.key] = E
|
||||
|
||||
init_subtypes(/datum/crafting_recipe, GLOB.crafting_recipes)
|
||||
|
||||
/* // Uncomment to debug chemical reaction list.
|
||||
/client/verb/debug_chemical_list()
|
||||
|
||||
for (var/reaction in chemical_reactions_list)
|
||||
. += "chemical_reactions_list\[\"[reaction]\"\] = \"[chemical_reactions_list[reaction]]\"\n"
|
||||
if(islist(chemical_reactions_list[reaction]))
|
||||
var/list/L = chemical_reactions_list[reaction]
|
||||
for(var/t in L)
|
||||
. += " has: [t]\n"
|
||||
to_chat(world, .)
|
||||
*/
|
||||
|
||||
//creates every subtype of prototype (excluding prototype) and adds it to list L.
|
||||
//if no list/L is provided, one is created.
|
||||
/proc/init_subtypes(prototype, list/L)
|
||||
if(!istype(L))
|
||||
L = list()
|
||||
for(var/path in subtypesof(prototype))
|
||||
L += new path()
|
||||
return L
|
||||
|
||||
//returns a list of paths to every subtype of prototype (excluding prototype)
|
||||
//if no list/L is provided, one is created.
|
||||
/proc/init_paths(prototype, list/L)
|
||||
if(!istype(L))
|
||||
L = list()
|
||||
for(var/path in subtypesof(prototype))
|
||||
L+= path
|
||||
return L
|
||||
//////////////////////////
|
||||
/////Initial Building/////
|
||||
//////////////////////////
|
||||
|
||||
/proc/make_datum_references_lists()
|
||||
//hair
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair, GLOB.hair_styles_list, GLOB.hair_styles_male_list, GLOB.hair_styles_female_list)
|
||||
//facial hair
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, GLOB.facial_hair_styles_list, GLOB.facial_hair_styles_male_list, GLOB.facial_hair_styles_female_list)
|
||||
//underwear
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, GLOB.underwear_list, GLOB.underwear_m, GLOB.underwear_f)
|
||||
//undershirt
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, GLOB.undershirt_list, GLOB.undershirt_m, GLOB.undershirt_f)
|
||||
//socks
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, GLOB.socks_list)
|
||||
//bodypart accessories (blizzard intensifies)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, GLOB.body_markings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/lizard, GLOB.tails_list_lizard)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/lizard, GLOB.animated_tails_list_lizard)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, GLOB.tails_list_human)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/human, GLOB.animated_tails_list_human)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts, GLOB.snouts_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/horns,GLOB.horns_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/ears, GLOB.ears_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.wings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings_open, GLOB.wings_open_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, GLOB.frills_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines, GLOB.spines_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines_animated, GLOB.animated_spines_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, GLOB.legs_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.r_wings_list,roundstart = TRUE)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/caps, GLOB.caps_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_wings, GLOB.moth_wings_list)
|
||||
|
||||
//CIT CHANGES START HERE, ADDS SNOWFLAKE BODYPARTS AND MORE
|
||||
//mammal bodyparts (fucking furries)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_body_markings, GLOB.mam_body_markings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails, GLOB.mam_tails_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_ears, GLOB.mam_ears_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails_animated, GLOB.mam_tails_animated_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/taur, GLOB.taur_list)
|
||||
//avian bodyparts (i swear this isn't starbound)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/beaks/avian, GLOB.avian_beaks_list)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/avian, GLOB.avian_tails_list)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/avian_wings, GLOB.avian_wings_list)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/avian_open_wings, GLOB.avian_open_wings_list)
|
||||
//xeno parts (hiss?)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_head, GLOB.xeno_head_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_tail, GLOB.xeno_tail_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_dorsal, GLOB.xeno_dorsal_list)
|
||||
//genitals
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/penis, GLOB.cock_shapes_list)
|
||||
|
||||
for(var/K in GLOB.cock_shapes_list)
|
||||
var/datum/sprite_accessory/penis/value = GLOB.cock_shapes_list[K]
|
||||
GLOB.cock_shapes_icons[K] = value.icon_state
|
||||
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/vagina, GLOB.vagina_shapes_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/breasts, GLOB.breasts_shapes_list)
|
||||
GLOB.breasts_size_list = list("a","b","c","d","e") //We need the list to choose from initialized, but it's no longer a sprite_accessory thing.
|
||||
//END OF CIT CHANGES
|
||||
|
||||
//Species
|
||||
for(var/spath in subtypesof(/datum/species))
|
||||
var/datum/species/S = new spath()
|
||||
GLOB.species_list[S.id] = spath
|
||||
|
||||
//Surgeries
|
||||
for(var/path in subtypesof(/datum/surgery))
|
||||
GLOB.surgeries_list += new path()
|
||||
|
||||
//Materials
|
||||
for(var/path in subtypesof(/datum/material))
|
||||
var/datum/material/D = new path()
|
||||
GLOB.materials_list[D.id] = D
|
||||
|
||||
//Emotes
|
||||
for(var/path in subtypesof(/datum/emote))
|
||||
var/datum/emote/E = new path()
|
||||
E.emote_list[E.key] = E
|
||||
|
||||
init_subtypes(/datum/crafting_recipe, GLOB.crafting_recipes)
|
||||
|
||||
//creates every subtype of prototype (excluding prototype) and adds it to list L.
|
||||
//if no list/L is provided, one is created.
|
||||
/proc/init_subtypes(prototype, list/L)
|
||||
if(!istype(L))
|
||||
L = list()
|
||||
for(var/path in subtypesof(prototype))
|
||||
L += new path()
|
||||
return L
|
||||
|
||||
//returns a list of paths to every subtype of prototype (excluding prototype)
|
||||
//if no list/L is provided, one is created.
|
||||
/proc/init_paths(prototype, list/L)
|
||||
if(!istype(L))
|
||||
L = list()
|
||||
for(var/path in subtypesof(prototype))
|
||||
L+= path
|
||||
return L
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
|
||||
//////////////////////
|
||||
//Heap object
|
||||
//datum/Heap object
|
||||
//////////////////////
|
||||
|
||||
/Heap
|
||||
/datum/Heap
|
||||
var/list/L
|
||||
var/cmp
|
||||
|
||||
/Heap/New(compare)
|
||||
/datum/Heap/New(compare)
|
||||
L = new()
|
||||
cmp = compare
|
||||
|
||||
/Heap/proc/IsEmpty()
|
||||
/datum/Heap/proc/IsEmpty()
|
||||
return !L.len
|
||||
|
||||
//Insert and place at its position a new node in the heap
|
||||
/Heap/proc/Insert(atom/A)
|
||||
/datum/Heap/proc/Insert(atom/A)
|
||||
|
||||
L.Add(A)
|
||||
Swim(L.len)
|
||||
|
||||
//removes and returns the first element of the heap
|
||||
//(i.e the max or the min dependant on the comparison function)
|
||||
/Heap/proc/Pop()
|
||||
/datum/Heap/proc/Pop()
|
||||
if(!L.len)
|
||||
return 0
|
||||
. = L[1]
|
||||
|
||||
L[1] = L[L.len]
|
||||
L.Cut(L.len)
|
||||
|
||||
Sink(1)
|
||||
if(L.len)
|
||||
Sink(1)
|
||||
|
||||
//Get a node up to its right position in the heap
|
||||
/Heap/proc/Swim(var/index)
|
||||
/datum/Heap/proc/Swim(var/index)
|
||||
var/parent = round(index * 0.5)
|
||||
|
||||
while(parent > 0 && (call(cmp)(L[index],L[parent]) > 0))
|
||||
@@ -42,7 +42,7 @@
|
||||
parent = round(index * 0.5)
|
||||
|
||||
//Get a node down to its right position in the heap
|
||||
/Heap/proc/Sink(var/index)
|
||||
/datum/Heap/proc/Sink(var/index)
|
||||
var/g_child = GetGreaterChild(index)
|
||||
|
||||
while(g_child > 0 && (call(cmp)(L[index],L[g_child]) < 0))
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
//Returns the greater (relative to the comparison proc) of a node children
|
||||
//or 0 if there's no child
|
||||
/Heap/proc/GetGreaterChild(var/index)
|
||||
/datum/Heap/proc/GetGreaterChild(var/index)
|
||||
if(index * 2 > L.len)
|
||||
return 0
|
||||
|
||||
@@ -65,11 +65,12 @@
|
||||
return index * 2
|
||||
|
||||
//Replaces a given node so it verify the heap condition
|
||||
/Heap/proc/ReSort(atom/A)
|
||||
/datum/Heap/proc/ReSort(atom/A)
|
||||
var/index = L.Find(A)
|
||||
|
||||
Swim(index)
|
||||
Sink(index)
|
||||
|
||||
/Heap/proc/List()
|
||||
/datum/Heap/proc/List()
|
||||
. = L.Copy()
|
||||
|
||||
@@ -24,21 +24,21 @@
|
||||
*/
|
||||
|
||||
//Redefinitions of the diagonal directions so they can be stored in one var without conflicts
|
||||
#define N_NORTH 2
|
||||
#define N_SOUTH 4
|
||||
#define N_EAST 16
|
||||
#define N_WEST 256
|
||||
#define N_NORTHEAST 32
|
||||
#define N_NORTHWEST 512
|
||||
#define N_SOUTHEAST 64
|
||||
#define N_SOUTHWEST 1024
|
||||
#define N_NORTH (1<<1)
|
||||
#define N_SOUTH (1<<2)
|
||||
#define N_EAST (1<<4)
|
||||
#define N_WEST (1<<8)
|
||||
#define N_NORTHEAST (1<<5)
|
||||
#define N_NORTHWEST (1<<9)
|
||||
#define N_SOUTHEAST (1<<6)
|
||||
#define N_SOUTHWEST (1<<10)
|
||||
|
||||
#define SMOOTH_FALSE 0 //not smooth
|
||||
#define SMOOTH_TRUE 1 //smooths with exact specified types or just itself
|
||||
#define SMOOTH_MORE 2 //smooths with all subtypes of specified types or just itself (this value can replace SMOOTH_TRUE)
|
||||
#define SMOOTH_DIAGONAL 4 //if atom should smooth diagonally, this should be present in 'smooth' var
|
||||
#define SMOOTH_BORDER 8 //atom will smooth with the borders of the map
|
||||
#define SMOOTH_QUEUED 16 //atom is currently queued to smooth.
|
||||
#define SMOOTH_FALSE 0 //not smooth
|
||||
#define SMOOTH_TRUE (1<<0) //smooths with exact specified types or just itself
|
||||
#define SMOOTH_MORE (1<<1) //smooths with all subtypes of specified types or just itself (this value can replace SMOOTH_TRUE)
|
||||
#define SMOOTH_DIAGONAL (1<<2) //if atom should smooth diagonally, this should be present in 'smooth' var
|
||||
#define SMOOTH_BORDER (1<<3) //atom will smooth with the borders of the map
|
||||
#define SMOOTH_QUEUED (1<<4) //atom is currently queued to smooth.
|
||||
|
||||
#define NULLTURF_BORDER 123456789
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
return
|
||||
if(QDELETED(A))
|
||||
return
|
||||
if((A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE))
|
||||
if(A.smooth & (SMOOTH_TRUE | SMOOTH_MORE))
|
||||
var/adjacencies = calculate_adjacencies(A)
|
||||
|
||||
if(A.smooth & SMOOTH_DIAGONAL)
|
||||
@@ -156,7 +156,7 @@
|
||||
/turf/closed/wall/diagonal_smooth(adjacencies)
|
||||
adjacencies = reverse_ndir(..())
|
||||
if(adjacencies)
|
||||
var/mutable_appearance/underlay_appearance = mutable_appearance(layer = TURF_LAYER)
|
||||
var/mutable_appearance/underlay_appearance = mutable_appearance(layer = TURF_LAYER, plane = FLOOR_PLANE)
|
||||
var/list/U = list(underlay_appearance)
|
||||
if(fixed_underlay)
|
||||
if(fixed_underlay["space"])
|
||||
@@ -179,6 +179,10 @@
|
||||
underlay_appearance.icon_state = DEFAULT_UNDERLAY_ICON_STATE
|
||||
underlays = U
|
||||
|
||||
// Drop posters which were previously placed on this wall.
|
||||
for(var/obj/structure/sign/poster/P in src)
|
||||
P.roll_and_drop(src)
|
||||
|
||||
|
||||
/proc/cardinal_smooth(atom/A, adjacencies)
|
||||
//NW CORNER
|
||||
@@ -263,6 +267,13 @@
|
||||
if(!target_turf)
|
||||
return NULLTURF_BORDER
|
||||
|
||||
var/area/target_area = get_area(target_turf)
|
||||
var/area/source_area = get_area(source)
|
||||
if(source_area.canSmoothWithAreas && !is_type_in_typecache(target_area, source_area.canSmoothWithAreas))
|
||||
return null
|
||||
if(target_area.canSmoothWithAreas && !is_type_in_typecache(source_area, target_area.canSmoothWithAreas))
|
||||
return null
|
||||
|
||||
if(source.canSmoothWith)
|
||||
var/atom/A
|
||||
if(source.smooth & SMOOTH_MORE)
|
||||
|
||||
+327
-235
@@ -178,7 +178,7 @@ mob
|
||||
// Send the icon to src's local cache
|
||||
src<<browse_rsc(I, iconName)
|
||||
// Update the label to show it
|
||||
winset(src,"imageLabel","image='\ref[I]'");
|
||||
winset(src,"imageLabel","image='[REF(I)]'");
|
||||
|
||||
Add_Overlay()
|
||||
set name = "4. Add Overlay"
|
||||
@@ -308,7 +308,8 @@ world
|
||||
*/
|
||||
|
||||
/proc/ReadRGB(rgb)
|
||||
if(!rgb) return
|
||||
if(!rgb)
|
||||
return
|
||||
|
||||
// interpret the HSV or HSVA value
|
||||
var/i=1,start=1
|
||||
@@ -317,19 +318,27 @@ world
|
||||
var/digits=0
|
||||
for(i=start, i<=length(rgb), ++i)
|
||||
ch = text2ascii(rgb, i)
|
||||
if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102) break
|
||||
if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102)
|
||||
break
|
||||
++digits
|
||||
if(digits == 8) break
|
||||
if(digits == 8)
|
||||
break
|
||||
|
||||
var/single = digits < 6
|
||||
if(digits != 3 && digits != 4 && digits != 6 && digits != 8) return
|
||||
if(digits == 4 || digits == 8) usealpha = 1
|
||||
if(digits != 3 && digits != 4 && digits != 6 && digits != 8)
|
||||
return
|
||||
if(digits == 4 || digits == 8)
|
||||
usealpha = 1
|
||||
for(i=start, digits>0, ++i)
|
||||
ch = text2ascii(rgb, i)
|
||||
if(ch >= 48 && ch <= 57) ch -= 48
|
||||
else if(ch >= 65 && ch <= 70) ch -= 55
|
||||
else if(ch >= 97 && ch <= 102) ch -= 87
|
||||
else break
|
||||
if(ch >= 48 && ch <= 57)
|
||||
ch -= 48
|
||||
else if(ch >= 65 && ch <= 70)
|
||||
ch -= 55
|
||||
else if(ch >= 97 && ch <= 102)
|
||||
ch -= 87
|
||||
else
|
||||
break
|
||||
--digits
|
||||
switch(which)
|
||||
if(0)
|
||||
@@ -337,69 +346,91 @@ world
|
||||
if(single)
|
||||
r |= r << 4
|
||||
++which
|
||||
else if(!(digits & 1)) ++which
|
||||
else if(!(digits & 1))
|
||||
++which
|
||||
if(1)
|
||||
g = (g << 4) | ch
|
||||
if(single)
|
||||
g |= g << 4
|
||||
++which
|
||||
else if(!(digits & 1)) ++which
|
||||
else if(!(digits & 1))
|
||||
++which
|
||||
if(2)
|
||||
b = (b << 4) | ch
|
||||
if(single)
|
||||
b |= b << 4
|
||||
++which
|
||||
else if(!(digits & 1)) ++which
|
||||
else if(!(digits & 1))
|
||||
++which
|
||||
if(3)
|
||||
alpha = (alpha << 4) | ch
|
||||
if(single) alpha |= alpha << 4
|
||||
if(single)
|
||||
alpha |= alpha << 4
|
||||
|
||||
. = list(r, g, b)
|
||||
if(usealpha) . += alpha
|
||||
if(usealpha)
|
||||
. += alpha
|
||||
|
||||
/proc/ReadHSV(hsv)
|
||||
if(!hsv) return
|
||||
if(!hsv)
|
||||
return
|
||||
|
||||
// interpret the HSV or HSVA value
|
||||
var/i=1,start=1
|
||||
if(text2ascii(hsv) == 35) ++start // skip opening #
|
||||
if(text2ascii(hsv) == 35)
|
||||
++start // skip opening #
|
||||
var/ch,which=0,hue=0,sat=0,val=0,alpha=0,usealpha
|
||||
var/digits=0
|
||||
for(i=start, i<=length(hsv), ++i)
|
||||
ch = text2ascii(hsv, i)
|
||||
if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102) break
|
||||
if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102)
|
||||
break
|
||||
++digits
|
||||
if(digits == 9) break
|
||||
if(digits > 7) usealpha = 1
|
||||
if(digits <= 4) ++which
|
||||
if(digits <= 2) ++which
|
||||
if(digits == 9)
|
||||
break
|
||||
if(digits > 7)
|
||||
usealpha = 1
|
||||
if(digits <= 4)
|
||||
++which
|
||||
if(digits <= 2)
|
||||
++which
|
||||
for(i=start, digits>0, ++i)
|
||||
ch = text2ascii(hsv, i)
|
||||
if(ch >= 48 && ch <= 57) ch -= 48
|
||||
else if(ch >= 65 && ch <= 70) ch -= 55
|
||||
else if(ch >= 97 && ch <= 102) ch -= 87
|
||||
else break
|
||||
if(ch >= 48 && ch <= 57)
|
||||
ch -= 48
|
||||
else if(ch >= 65 && ch <= 70)
|
||||
ch -= 55
|
||||
else if(ch >= 97 && ch <= 102)
|
||||
ch -= 87
|
||||
else
|
||||
break
|
||||
--digits
|
||||
switch(which)
|
||||
if(0)
|
||||
hue = (hue << 4) | ch
|
||||
if(digits == (usealpha ? 6 : 4)) ++which
|
||||
if(digits == (usealpha ? 6 : 4))
|
||||
++which
|
||||
if(1)
|
||||
sat = (sat << 4) | ch
|
||||
if(digits == (usealpha ? 4 : 2)) ++which
|
||||
if(digits == (usealpha ? 4 : 2))
|
||||
++which
|
||||
if(2)
|
||||
val = (val << 4) | ch
|
||||
if(digits == (usealpha ? 2 : 0)) ++which
|
||||
if(digits == (usealpha ? 2 : 0))
|
||||
++which
|
||||
if(3)
|
||||
alpha = (alpha << 4) | ch
|
||||
|
||||
. = list(hue, sat, val)
|
||||
if(usealpha) . += alpha
|
||||
if(usealpha)
|
||||
. += alpha
|
||||
|
||||
/proc/HSVtoRGB(hsv)
|
||||
if(!hsv) return "#000000"
|
||||
if(!hsv)
|
||||
return "#000000"
|
||||
var/list/HSV = ReadHSV(hsv)
|
||||
if(!HSV) return "#000000"
|
||||
if(!HSV)
|
||||
return "#000000"
|
||||
|
||||
var/hue = HSV[1]
|
||||
var/sat = HSV[2]
|
||||
@@ -407,27 +438,30 @@ world
|
||||
|
||||
// Compress hue into easier-to-manage range
|
||||
hue -= hue >> 8
|
||||
if(hue >= 0x5fa) hue -= 0x5fa
|
||||
if(hue >= 0x5fa)
|
||||
hue -= 0x5fa
|
||||
|
||||
var/hi,mid,lo,r,g,b
|
||||
hi = val
|
||||
lo = round((255 - sat) * val / 255, 1)
|
||||
mid = lo + round(abs(round(hue, 510) - hue) * (hi - lo) / 255, 1)
|
||||
if(hue >= 765)
|
||||
if(hue >= 1275) {r=hi; g=lo; b=mid}
|
||||
if(hue >= 1275) {r=hi; g=lo; b=mid}
|
||||
else if(hue >= 1020) {r=mid; g=lo; b=hi }
|
||||
else {r=lo; g=mid; b=hi }
|
||||
else {r=lo; g=mid; b=hi }
|
||||
else
|
||||
if(hue >= 510) {r=lo; g=hi; b=mid}
|
||||
else if(hue >= 255) {r=mid; g=hi; b=lo }
|
||||
else {r=hi; g=mid; b=lo }
|
||||
if(hue >= 510) {r=lo; g=hi; b=mid}
|
||||
else if(hue >= 255) {r=mid; g=hi; b=lo }
|
||||
else {r=hi; g=mid; b=lo }
|
||||
|
||||
return (HSV.len > 3) ? rgb(r,g,b,HSV[4]) : rgb(r,g,b)
|
||||
|
||||
/proc/RGBtoHSV(rgb)
|
||||
if(!rgb) return "#0000000"
|
||||
if(!rgb)
|
||||
return "#0000000"
|
||||
var/list/RGB = ReadRGB(rgb)
|
||||
if(!RGB) return "#0000000"
|
||||
if(!RGB)
|
||||
return "#0000000"
|
||||
|
||||
var/r = RGB[1]
|
||||
var/g = RGB[2]
|
||||
@@ -456,15 +490,22 @@ world
|
||||
return hsv(hue, sat, val, (RGB.len>3 ? RGB[4] : null))
|
||||
|
||||
/proc/hsv(hue, sat, val, alpha)
|
||||
if(hue < 0 || hue >= 1536) hue %= 1536
|
||||
if(hue < 0) hue += 1536
|
||||
if(hue < 0 || hue >= 1536)
|
||||
hue %= 1536
|
||||
if(hue < 0)
|
||||
hue += 1536
|
||||
if((hue & 0xFF) == 0xFF)
|
||||
++hue
|
||||
if(hue >= 1536) hue = 0
|
||||
if(sat < 0) sat = 0
|
||||
if(sat > 255) sat = 255
|
||||
if(val < 0) val = 0
|
||||
if(val > 255) val = 255
|
||||
if(hue >= 1536)
|
||||
hue = 0
|
||||
if(sat < 0)
|
||||
sat = 0
|
||||
if(sat > 255)
|
||||
sat = 255
|
||||
if(val < 0)
|
||||
val = 0
|
||||
if(val > 255)
|
||||
val = 255
|
||||
. = "#"
|
||||
. += TO_HEX_DIGIT(hue >> 8)
|
||||
. += TO_HEX_DIGIT(hue >> 4)
|
||||
@@ -474,8 +515,10 @@ world
|
||||
. += TO_HEX_DIGIT(val >> 4)
|
||||
. += TO_HEX_DIGIT(val)
|
||||
if(!isnull(alpha))
|
||||
if(alpha < 0) alpha = 0
|
||||
if(alpha > 255) alpha = 255
|
||||
if(alpha < 0)
|
||||
alpha = 0
|
||||
if(alpha > 255)
|
||||
alpha = 255
|
||||
. += TO_HEX_DIGIT(alpha >> 4)
|
||||
. += TO_HEX_DIGIT(alpha)
|
||||
|
||||
@@ -493,32 +536,44 @@ world
|
||||
var/list/HSV2 = ReadHSV(hsv2)
|
||||
|
||||
// add missing alpha if needed
|
||||
if(HSV1.len < HSV2.len) HSV1 += 255
|
||||
else if(HSV2.len < HSV1.len) HSV2 += 255
|
||||
if(HSV1.len < HSV2.len)
|
||||
HSV1 += 255
|
||||
else if(HSV2.len < HSV1.len)
|
||||
HSV2 += 255
|
||||
var/usealpha = HSV1.len > 3
|
||||
|
||||
// normalize hsv values in case anything is screwy
|
||||
if(HSV1[1] > 1536) HSV1[1] %= 1536
|
||||
if(HSV2[1] > 1536) HSV2[1] %= 1536
|
||||
if(HSV1[1] < 0) HSV1[1] += 1536
|
||||
if(HSV2[1] < 0) HSV2[1] += 1536
|
||||
if(HSV1[1] > 1536)
|
||||
HSV1[1] %= 1536
|
||||
if(HSV2[1] > 1536)
|
||||
HSV2[1] %= 1536
|
||||
if(HSV1[1] < 0)
|
||||
HSV1[1] += 1536
|
||||
if(HSV2[1] < 0)
|
||||
HSV2[1] += 1536
|
||||
if(!HSV1[3]) {HSV1[1] = 0; HSV1[2] = 0}
|
||||
if(!HSV2[3]) {HSV2[1] = 0; HSV2[2] = 0}
|
||||
|
||||
// no value for one color means don't change saturation
|
||||
if(!HSV1[3]) HSV1[2] = HSV2[2]
|
||||
if(!HSV2[3]) HSV2[2] = HSV1[2]
|
||||
if(!HSV1[3])
|
||||
HSV1[2] = HSV2[2]
|
||||
if(!HSV2[3])
|
||||
HSV2[2] = HSV1[2]
|
||||
// no saturation for one color means don't change hues
|
||||
if(!HSV1[2]) HSV1[1] = HSV2[1]
|
||||
if(!HSV2[2]) HSV2[1] = HSV1[1]
|
||||
if(!HSV1[2])
|
||||
HSV1[1] = HSV2[1]
|
||||
if(!HSV2[2])
|
||||
HSV2[1] = HSV1[1]
|
||||
|
||||
// Compress hues into easier-to-manage range
|
||||
HSV1[1] -= HSV1[1] >> 8
|
||||
HSV2[1] -= HSV2[1] >> 8
|
||||
|
||||
var/hue_diff = HSV2[1] - HSV1[1]
|
||||
if(hue_diff > 765) hue_diff -= 1530
|
||||
else if(hue_diff <= -765) hue_diff += 1530
|
||||
if(hue_diff > 765)
|
||||
hue_diff -= 1530
|
||||
else if(hue_diff <= -765)
|
||||
hue_diff += 1530
|
||||
|
||||
var/hue = round(HSV1[1] + hue_diff * amount, 1)
|
||||
var/sat = round(HSV1[2] + (HSV2[2] - HSV1[2]) * amount, 1)
|
||||
@@ -526,8 +581,10 @@ world
|
||||
var/alpha = usealpha ? round(HSV1[4] + (HSV2[4] - HSV1[4]) * amount, 1) : null
|
||||
|
||||
// normalize hue
|
||||
if(hue < 0 || hue >= 1530) hue %= 1530
|
||||
if(hue < 0) hue += 1530
|
||||
if(hue < 0 || hue >= 1530)
|
||||
hue %= 1530
|
||||
if(hue < 0)
|
||||
hue += 1530
|
||||
// decompress hue
|
||||
hue += round(hue / 255)
|
||||
|
||||
@@ -547,8 +604,10 @@ world
|
||||
var/list/RGB2 = ReadRGB(rgb2)
|
||||
|
||||
// add missing alpha if needed
|
||||
if(RGB1.len < RGB2.len) RGB1 += 255
|
||||
else if(RGB2.len < RGB1.len) RGB2 += 255
|
||||
if(RGB1.len < RGB2.len)
|
||||
RGB1 += 255
|
||||
else if(RGB2.len < RGB1.len)
|
||||
RGB2 += 255
|
||||
var/usealpha = RGB1.len > 3
|
||||
|
||||
var/r = round(RGB1[1] + (RGB2[1] - RGB1[1]) * amount, 1)
|
||||
@@ -563,15 +622,18 @@ world
|
||||
|
||||
/proc/HueToAngle(hue)
|
||||
// normalize hsv in case anything is screwy
|
||||
if(hue < 0 || hue >= 1536) hue %= 1536
|
||||
if(hue < 0) hue += 1536
|
||||
if(hue < 0 || hue >= 1536)
|
||||
hue %= 1536
|
||||
if(hue < 0)
|
||||
hue += 1536
|
||||
// Compress hue into easier-to-manage range
|
||||
hue -= hue >> 8
|
||||
return hue / (1530/360)
|
||||
|
||||
/proc/AngleToHue(angle)
|
||||
// normalize hsv in case anything is screwy
|
||||
if(angle < 0 || angle >= 360) angle -= 360 * round(angle / 360)
|
||||
if(angle < 0 || angle >= 360)
|
||||
angle -= 360 * round(angle / 360)
|
||||
var/hue = angle * (1530/360)
|
||||
// Decompress hue
|
||||
hue += round(hue / 255)
|
||||
@@ -583,18 +645,23 @@ world
|
||||
var/list/HSV = ReadHSV(hsv)
|
||||
|
||||
// normalize hsv in case anything is screwy
|
||||
if(HSV[1] >= 1536) HSV[1] %= 1536
|
||||
if(HSV[1] < 0) HSV[1] += 1536
|
||||
if(HSV[1] >= 1536)
|
||||
HSV[1] %= 1536
|
||||
if(HSV[1] < 0)
|
||||
HSV[1] += 1536
|
||||
|
||||
// Compress hue into easier-to-manage range
|
||||
HSV[1] -= HSV[1] >> 8
|
||||
|
||||
if(angle < 0 || angle >= 360) angle -= 360 * round(angle / 360)
|
||||
if(angle < 0 || angle >= 360)
|
||||
angle -= 360 * round(angle / 360)
|
||||
HSV[1] = round(HSV[1] + angle * (1530/360), 1)
|
||||
|
||||
// normalize hue
|
||||
if(HSV[1] < 0 || HSV[1] >= 1530) HSV[1] %= 1530
|
||||
if(HSV[1] < 0) HSV[1] += 1530
|
||||
if(HSV[1] < 0 || HSV[1] >= 1530)
|
||||
HSV[1] %= 1530
|
||||
if(HSV[1] < 0)
|
||||
HSV[1] += 1530
|
||||
// decompress hue
|
||||
HSV[1] += round(HSV[1] / 255)
|
||||
|
||||
@@ -614,8 +681,10 @@ world
|
||||
var/gray = RGB[1]*0.3 + RGB[2]*0.59 + RGB[3]*0.11
|
||||
var/tone_gray = TONE[1]*0.3 + TONE[2]*0.59 + TONE[3]*0.11
|
||||
|
||||
if(gray <= tone_gray) return BlendRGB("#000000", tone, gray/(tone_gray || 1))
|
||||
else return BlendRGB(tone, "#ffffff", (gray-tone_gray)/((255-tone_gray) || 1))
|
||||
if(gray <= tone_gray)
|
||||
return BlendRGB("#000000", tone, gray/(tone_gray || 1))
|
||||
else
|
||||
return BlendRGB(tone, "#ffffff", (gray-tone_gray)/((255-tone_gray) || 1))
|
||||
|
||||
|
||||
//Used in the OLD chem colour mixing algorithm
|
||||
@@ -637,149 +706,192 @@ world
|
||||
((hi3 >= 65 ? hi3-55 : hi3-48)<<4) | (lo3 >= 65 ? lo3-55 : lo3-48),
|
||||
((hi4 >= 65 ? hi4-55 : hi4-48)<<4) | (lo4 >= 65 ? lo4-55 : lo4-48))
|
||||
|
||||
|
||||
/*
|
||||
Get flat icon by DarkCampainger. As it says on the tin, will return an icon with all the overlays
|
||||
as a single icon. Useful for when you want to manipulate an icon via the above as overlays are not normally included.
|
||||
The _flatIcons list is a cache for generated icon files.
|
||||
*/
|
||||
|
||||
// Creates a single icon from a given /atom or /image. Only the first argument is required.
|
||||
/proc/getFlatIcon(image/A, defdir=A.dir, deficon=A.icon, defstate=A.icon_state, defblend=A.blend_mode)
|
||||
// We start with a blank canvas, otherwise some icon procs crash silently
|
||||
var/icon/flat = icon('icons/effects/effects.dmi', "nothing") // Final flattened icon
|
||||
if(!A)
|
||||
return flat
|
||||
if(A.alpha <= 0)
|
||||
return flat
|
||||
/proc/getFlatIcon(image/A, defdir, deficon, defstate, defblend, start = TRUE, no_anim = FALSE)
|
||||
//Define... defines.
|
||||
var/static/icon/flat_template = icon('icons/effects/effects.dmi', "nothing")
|
||||
|
||||
#define BLANK icon(flat_template)
|
||||
#define SET_SELF(SETVAR) var/icon/SELF_ICON=icon(icon(curicon, curstate, base_icon_dir),"",SOUTH,no_anim?1:null);if(A.alpha<255)SELF_ICON.Blend(rgb(255,255,255,A.alpha),ICON_MULTIPLY);if(A.color)SELF_ICON.Blend(A.color,ICON_MULTIPLY);;##SETVAR=SELF_ICON;
|
||||
|
||||
#define INDEX_X_LOW 1
|
||||
#define INDEX_X_HIGH 2
|
||||
#define INDEX_Y_LOW 3
|
||||
#define INDEX_Y_HIGH 4
|
||||
|
||||
#define flatX1 flat_size[INDEX_X_LOW]
|
||||
#define flatX2 flat_size[INDEX_X_HIGH]
|
||||
#define flatY1 flat_size[INDEX_Y_LOW]
|
||||
#define flatY2 flat_size[INDEX_Y_HIGH]
|
||||
#define addX1 add_size[INDEX_X_LOW]
|
||||
#define addX2 add_size[INDEX_X_HIGH]
|
||||
#define addY1 add_size[INDEX_Y_LOW]
|
||||
#define addY2 add_size[INDEX_Y_HIGH]
|
||||
|
||||
if(!A || A.alpha <= 0)
|
||||
return BLANK
|
||||
|
||||
var/noIcon = FALSE
|
||||
if(start)
|
||||
if(!defdir)
|
||||
defdir = A.dir
|
||||
if(!deficon)
|
||||
deficon = A.icon
|
||||
if(!defstate)
|
||||
defstate = A.icon_state
|
||||
if(!defblend)
|
||||
defblend = A.blend_mode
|
||||
|
||||
var/curicon
|
||||
if(A.icon)
|
||||
curicon = A.icon
|
||||
else
|
||||
curicon = deficon
|
||||
var/curicon = A.icon || deficon
|
||||
var/curstate = A.icon_state || defstate
|
||||
|
||||
if(!curicon)
|
||||
noIcon = TRUE // Do not render this object.
|
||||
|
||||
var/curstate
|
||||
if(A.icon_state)
|
||||
curstate = A.icon_state
|
||||
else
|
||||
curstate = defstate
|
||||
|
||||
if(!noIcon && !(curstate in icon_states(curicon)))
|
||||
if("" in icon_states(curicon))
|
||||
curstate = ""
|
||||
else
|
||||
noIcon = TRUE // Do not render this object.
|
||||
if(!((noIcon = (!curicon))))
|
||||
var/curstates = icon_states(curicon)
|
||||
if(!(curstate in curstates))
|
||||
if("" in curstates)
|
||||
curstate = ""
|
||||
else
|
||||
noIcon = TRUE // Do not render this object.
|
||||
|
||||
var/curdir
|
||||
if(A.dir != 2)
|
||||
curdir = A.dir
|
||||
else
|
||||
var/base_icon_dir //We'll use this to get the icon state to display if not null BUT NOT pass it to overlays as the dir we have
|
||||
|
||||
//These should use the parent's direction (most likely)
|
||||
if(!A.dir || A.dir == SOUTH)
|
||||
curdir = defdir
|
||||
|
||||
var/curblend
|
||||
if(A.blend_mode == BLEND_DEFAULT)
|
||||
curblend = defblend
|
||||
else
|
||||
curblend = A.blend_mode
|
||||
curdir = A.dir
|
||||
|
||||
// Layers will be a sorted list of icons/overlays, based on the order in which they are displayed
|
||||
var/list/layers = list()
|
||||
var/image/copy
|
||||
// Add the atom's icon itself, without pixel_x/y offsets.
|
||||
if(!noIcon)
|
||||
copy = image(icon=curicon, icon_state=curstate, layer=A.layer, dir=curdir)
|
||||
copy.color = A.color
|
||||
copy.alpha = A.alpha
|
||||
copy.blend_mode = curblend
|
||||
layers[copy] = A.layer
|
||||
|
||||
// Loop through the underlays, then overlays, sorting them into the layers list
|
||||
var/list/process = A.underlays // Current list being processed
|
||||
var/pSet=0 // Which list is being processed: 0 = underlays, 1 = overlays
|
||||
var/curIndex=1 // index of 'current' in list being processed
|
||||
var/current // Current overlay being sorted
|
||||
var/currentLayer // Calculated layer that overlay appears on (special case for FLOAT_LAYER)
|
||||
var/compare // The overlay 'add' is being compared against
|
||||
var/cmpIndex // The index in the layers list of 'compare'
|
||||
while(TRUE)
|
||||
if(curIndex<=process.len)
|
||||
current = process[curIndex]
|
||||
if(!current)
|
||||
curIndex++ //Try the next layer
|
||||
continue
|
||||
var/image/I = current
|
||||
currentLayer = I.layer
|
||||
if(currentLayer<0) // Special case for FLY_LAYER
|
||||
if(currentLayer <= -1000) return flat
|
||||
if(pSet == 0) // Underlay
|
||||
currentLayer = A.layer+currentLayer/1000
|
||||
else // Overlay
|
||||
currentLayer = A.layer+(1000+currentLayer)/1000
|
||||
|
||||
// Sort add into layers list
|
||||
for(cmpIndex=1,cmpIndex<=layers.len,cmpIndex++)
|
||||
compare = layers[cmpIndex]
|
||||
if(currentLayer < layers[compare]) // Associated value is the calculated layer
|
||||
layers.Insert(cmpIndex,current)
|
||||
layers[current] = currentLayer
|
||||
break
|
||||
if(cmpIndex>layers.len) // Reached end of list without inserting
|
||||
layers[current]=currentLayer // Place at end
|
||||
|
||||
curIndex++
|
||||
|
||||
if(curIndex>process.len)
|
||||
if(pSet == 0) // Switch to overlays
|
||||
curIndex = 1
|
||||
pSet = 1
|
||||
process = A.overlays
|
||||
else // All done
|
||||
//Try to remove/optimize this section ASAP, CPU hog.
|
||||
//Determines if there's directionals.
|
||||
if(!noIcon && curdir != SOUTH)
|
||||
var/exist = FALSE
|
||||
var/static/list/checkdirs = list(NORTH, EAST, WEST)
|
||||
for(var/i in checkdirs) //Not using GLOB for a reason.
|
||||
if(length(icon_states(icon(curicon, curstate, i))))
|
||||
exist = TRUE
|
||||
break
|
||||
if(!exist)
|
||||
base_icon_dir = SOUTH
|
||||
//
|
||||
|
||||
var/icon/add // Icon of overlay being added
|
||||
if(!base_icon_dir)
|
||||
base_icon_dir = curdir
|
||||
|
||||
ASSERT(!BLEND_DEFAULT) //I might just be stupid but lets make sure this define is 0.
|
||||
|
||||
var/curblend = A.blend_mode || defblend
|
||||
|
||||
if(A.overlays.len || A.underlays.len)
|
||||
var/icon/flat = BLANK
|
||||
// Layers will be a sorted list of icons/overlays, based on the order in which they are displayed
|
||||
var/list/layers = list()
|
||||
var/image/copy
|
||||
// Add the atom's icon itself, without pixel_x/y offsets.
|
||||
if(!noIcon)
|
||||
copy = image(icon=curicon, icon_state=curstate, layer=A.layer, dir=base_icon_dir)
|
||||
copy.color = A.color
|
||||
copy.alpha = A.alpha
|
||||
copy.blend_mode = curblend
|
||||
layers[copy] = A.layer
|
||||
|
||||
// Loop through the underlays, then overlays, sorting them into the layers list
|
||||
for(var/process_set in 0 to 1)
|
||||
var/list/process = process_set? A.overlays : A.underlays
|
||||
for(var/i in 1 to process.len)
|
||||
var/image/current = process[i]
|
||||
if(!current)
|
||||
continue
|
||||
if(current.plane != FLOAT_PLANE && current.plane != A.plane)
|
||||
continue
|
||||
var/current_layer = current.layer
|
||||
if(current_layer < 0)
|
||||
if(current_layer <= -1000)
|
||||
return flat
|
||||
current_layer = process_set + A.layer + current_layer / 1000
|
||||
|
||||
for(var/p in 1 to layers.len)
|
||||
var/image/cmp = layers[p]
|
||||
if(current_layer < layers[cmp])
|
||||
layers.Insert(p, current)
|
||||
break
|
||||
layers[current] = current_layer
|
||||
|
||||
//sortTim(layers, /proc/cmp_image_layer_asc)
|
||||
|
||||
var/icon/add // Icon of overlay being added
|
||||
|
||||
// Current dimensions of flattened icon
|
||||
var/{flatX1=1;flatX2=flat.Width();flatY1=1;flatY2=flat.Height()}
|
||||
var/list/flat_size = list(1, flat.Width(), 1, flat.Height())
|
||||
// Dimensions of overlay being added
|
||||
var/{addX1;addX2;addY1;addY2}
|
||||
var/list/add_size[4]
|
||||
|
||||
for(var/V in layers)
|
||||
var/image/I = V
|
||||
if(I.alpha == 0)
|
||||
continue
|
||||
for(var/V in layers)
|
||||
var/image/I = V
|
||||
if(I.alpha == 0)
|
||||
continue
|
||||
|
||||
if(I == copy) // 'I' is an /image based on the object being flattened.
|
||||
curblend = BLEND_OVERLAY
|
||||
add = icon(I.icon, I.icon_state, I.dir)
|
||||
else // 'I' is an appearance object.
|
||||
add = getFlatIcon(new/image(I), curdir, curicon, curstate, curblend)
|
||||
if(I == copy) // 'I' is an /image based on the object being flattened.
|
||||
curblend = BLEND_OVERLAY
|
||||
add = icon(I.icon, I.icon_state, base_icon_dir)
|
||||
else // 'I' is an appearance object.
|
||||
add = getFlatIcon(image(I), curdir, curicon, curstate, curblend, FALSE, no_anim)
|
||||
if(!add)
|
||||
continue
|
||||
// Find the new dimensions of the flat icon to fit the added overlay
|
||||
add_size = list(
|
||||
min(flatX1, I.pixel_x+1),
|
||||
max(flatX2, I.pixel_x+add.Width()),
|
||||
min(flatY1, I.pixel_y+1),
|
||||
max(flatY2, I.pixel_y+add.Height())
|
||||
)
|
||||
|
||||
// Find the new dimensions of the flat icon to fit the added overlay
|
||||
addX1 = min(flatX1, I.pixel_x+1)
|
||||
addX2 = max(flatX2, I.pixel_x+add.Width())
|
||||
addY1 = min(flatY1, I.pixel_y+1)
|
||||
addY2 = max(flatY2, I.pixel_y+add.Height())
|
||||
if(flat_size ~! add_size)
|
||||
// Resize the flattened icon so the new icon fits
|
||||
flat.Crop(
|
||||
addX1 - flatX1 + 1,
|
||||
addY1 - flatY1 + 1,
|
||||
addX2 - flatX1 + 1,
|
||||
addY2 - flatY1 + 1
|
||||
)
|
||||
flat_size = add_size.Copy()
|
||||
|
||||
if(addX1!=flatX1 || addX2!=flatX2 || addY1!=flatY1 || addY2!=flatY2)
|
||||
// Resize the flattened icon so the new icon fits
|
||||
flat.Crop(addX1-flatX1+1, addY1-flatY1+1, addX2-flatX1+1, addY2-flatY1+1)
|
||||
flatX1=addX1;flatX2=addX2
|
||||
flatY1=addY1;flatY2=addY2
|
||||
// Blend the overlay into the flattened icon
|
||||
flat.Blend(add, blendMode2iconMode(curblend), I.pixel_x + 2 - flatX1, I.pixel_y + 2 - flatY1)
|
||||
|
||||
// Blend the overlay into the flattened icon
|
||||
flat.Blend(add, blendMode2iconMode(curblend), I.pixel_x + 2 - flatX1, I.pixel_y + 2 - flatY1)
|
||||
if(A.color)
|
||||
flat.Blend(A.color, ICON_MULTIPLY)
|
||||
if(A.alpha < 255)
|
||||
flat.Blend(rgb(255, 255, 255, A.alpha), ICON_MULTIPLY)
|
||||
|
||||
if(A.color)
|
||||
flat.Blend(A.color, ICON_MULTIPLY)
|
||||
if(A.alpha < 255)
|
||||
flat.Blend(rgb(255, 255, 255, A.alpha), ICON_MULTIPLY)
|
||||
if(no_anim)
|
||||
//Clean up repeated frames
|
||||
var/icon/cleaned = new /icon()
|
||||
cleaned.Insert(flat, "", SOUTH, 1, 0)
|
||||
. = cleaned
|
||||
else
|
||||
. = icon(flat, "", SOUTH)
|
||||
else //There's no overlays.
|
||||
if(!noIcon)
|
||||
SET_SELF(.)
|
||||
|
||||
return icon(flat, "", SOUTH)
|
||||
//Clear defines
|
||||
#undef flatX1
|
||||
#undef flatX2
|
||||
#undef flatY1
|
||||
#undef flatY2
|
||||
#undef addX1
|
||||
#undef addX2
|
||||
#undef addY1
|
||||
#undef addY2
|
||||
|
||||
#undef INDEX_X_LOW
|
||||
#undef INDEX_X_HIGH
|
||||
#undef INDEX_Y_LOW
|
||||
#undef INDEX_Y_HIGH
|
||||
|
||||
#undef BLANK
|
||||
#undef SET_SELF
|
||||
|
||||
/proc/getIconMask(atom/A)//By yours truly. Creates a dynamic mask for a mob/whatever. /N
|
||||
var/icon/alpha_mask = new(A.icon,A.icon_state)//So we want the default icon and icon state of A.
|
||||
@@ -795,8 +907,7 @@ The _flatIcons list is a cache for generated icon files.
|
||||
/mob/proc/AddCamoOverlay(atom/A)//A is the atom which we are using as the overlay.
|
||||
var/icon/opacity_icon = new(A.icon, A.icon_state)//Don't really care for overlays/underlays.
|
||||
//Now we need to culculate overlays+underlays and add them together to form an image for a mask.
|
||||
//var/icon/alpha_mask = getFlatIcon(src)//Accurate but SLOW. Not designed for running each tick. Could have other uses I guess.
|
||||
var/icon/alpha_mask = getIconMask(src)//Which is why I created that proc. Also a little slow since it's blending a bunch of icons together but good enough.
|
||||
var/icon/alpha_mask = getIconMask(src)//getFlatIcon(src) is accurate but SLOW. Not designed for running each tick. This is also a little slow since it's blending a bunch of icons together but good enough.
|
||||
opacity_icon.AddAlphaMask(alpha_mask)//Likely the main source of lag for this proc. Probably not designed to run each tick.
|
||||
opacity_icon.ChangeOpacity(0.4)//Front end for MapColors so it's fast. 0.5 means half opacity and looks the best in my opinion.
|
||||
for(var/i=0,i<5,i++)//And now we add it as overlays. It's faster than creating an icon and then merging it.
|
||||
@@ -831,15 +942,14 @@ The _flatIcons list is a cache for generated icon files.
|
||||
|
||||
//What the mob looks like as animated static
|
||||
//By vg's ComicIronic
|
||||
/proc/getStaticIcon(icon/A, safety=1)
|
||||
/proc/getStaticIcon(icon/A, safety = TRUE)
|
||||
var/icon/flat_icon = safety ? A : new(A)
|
||||
flat_icon.Blend(rgb(255,255,255))
|
||||
flat_icon.BecomeAlphaMask()
|
||||
var/icon/static_icon = new/icon('icons/effects/effects.dmi', "static_base")
|
||||
var/icon/static_icon = icon('icons/effects/effects.dmi', "static_base")
|
||||
static_icon.AddAlphaMask(flat_icon)
|
||||
return static_icon
|
||||
|
||||
|
||||
//What the mob looks like as a pitch black outline
|
||||
//By vg's ComicIronic
|
||||
/proc/getBlankIcon(icon/A, safety=1)
|
||||
@@ -880,7 +990,7 @@ GLOBAL_LIST_EMPTY(friendly_animal_types)
|
||||
if(!GLOB.friendly_animal_types.len)
|
||||
for(var/T in typesof(/mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/SA = T
|
||||
if(initial(SA.gold_core_spawnable) == 2)
|
||||
if(initial(SA.gold_core_spawnable) == FRIENDLY_SPAWN)
|
||||
GLOB.friendly_animal_types += SA
|
||||
|
||||
|
||||
@@ -926,7 +1036,7 @@ GLOBAL_LIST_EMPTY(friendly_animal_types)
|
||||
return 0
|
||||
|
||||
//For creating consistent icons for human looking simple animals
|
||||
/proc/get_flat_human_icon(icon_id, datum/job/J, datum/preferences/prefs, dummy_key)
|
||||
/proc/get_flat_human_icon(icon_id, datum/job/J, datum/preferences/prefs, dummy_key, showDirs = GLOB.cardinals)
|
||||
var/static/list/humanoid_icon_cache = list()
|
||||
if(!icon_id || !humanoid_icon_cache[icon_id])
|
||||
var/mob/living/carbon/human/dummy/body = generate_or_wait_for_human_dummy(dummy_key)
|
||||
@@ -936,25 +1046,13 @@ GLOBAL_LIST_EMPTY(friendly_animal_types)
|
||||
if(J)
|
||||
J.equip(body, TRUE, FALSE)
|
||||
|
||||
SSoverlays.Flush()
|
||||
|
||||
var/icon/out_icon = icon('icons/effects/effects.dmi', "nothing")
|
||||
|
||||
body.setDir(NORTH)
|
||||
var/icon/partial = getFlatIcon(body)
|
||||
out_icon.Insert(partial,dir=NORTH)
|
||||
|
||||
body.setDir(SOUTH)
|
||||
partial = getFlatIcon(body)
|
||||
out_icon.Insert(partial,dir=SOUTH)
|
||||
|
||||
body.setDir(WEST)
|
||||
partial = getFlatIcon(body)
|
||||
out_icon.Insert(partial,dir=WEST)
|
||||
|
||||
body.setDir(EAST)
|
||||
partial = getFlatIcon(body)
|
||||
out_icon.Insert(partial,dir=EAST)
|
||||
for(var/D in showDirs)
|
||||
body.setDir(D)
|
||||
COMPILE_OVERLAYS(body)
|
||||
var/icon/partial = getFlatIcon(body)
|
||||
out_icon.Insert(partial,dir=D)
|
||||
|
||||
humanoid_icon_cache[icon_id] = out_icon
|
||||
dummy_key? unset_busy_human_dummy(dummy_key) : qdel(body)
|
||||
@@ -968,31 +1066,25 @@ GLOBAL_LIST_EMPTY(friendly_animal_types)
|
||||
/image/proc/setDir(newdir)
|
||||
dir = newdir
|
||||
|
||||
#define FROZEN_RED_COLOR "#2E5E69"
|
||||
#define FROZEN_GREEN_COLOR "#60A2A8"
|
||||
#define FROZEN_BLUE_COLOR "#A1AFB1"
|
||||
GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0,0,0)))
|
||||
|
||||
/obj/proc/make_frozen_visual()
|
||||
// Used to make the frozen item visuals for Freon.
|
||||
if(resistance_flags & FREEZE_PROOF)
|
||||
return
|
||||
if(!(flags_2 & FROZEN_2))
|
||||
if(!(obj_flags & FROZEN))
|
||||
name = "frozen [name]"
|
||||
add_atom_colour(list(FROZEN_RED_COLOR, FROZEN_GREEN_COLOR, FROZEN_BLUE_COLOR, rgb(0,0,0)), TEMPORARY_COLOUR_PRIORITY)
|
||||
add_atom_colour(GLOB.freon_color_matrix, TEMPORARY_COLOUR_PRIORITY)
|
||||
alpha -= 25
|
||||
flags_2 |= FROZEN_2
|
||||
obj_flags |= FROZEN
|
||||
|
||||
//Assumes already frozed
|
||||
/obj/proc/make_unfrozen()
|
||||
if(flags_2 & FROZEN_2)
|
||||
if(obj_flags & FROZEN)
|
||||
name = replacetext(name, "frozen ", "")
|
||||
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, list(FROZEN_RED_COLOR, FROZEN_GREEN_COLOR, FROZEN_BLUE_COLOR, rgb(0,0,0)))
|
||||
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, GLOB.freon_color_matrix)
|
||||
alpha += 25
|
||||
flags_2 &= ~FROZEN_2
|
||||
|
||||
#undef FROZEN_RED_COLOR
|
||||
#undef FROZEN_GREEN_COLOR
|
||||
#undef FROZEN_BLUE_COLOR
|
||||
obj_flags &= ~FROZEN
|
||||
|
||||
|
||||
//Converts an icon to base64. Operates by putting the icon in the iconCache savefile,
|
||||
@@ -1076,7 +1168,7 @@ GLOBAL_LIST_EMPTY(friendly_animal_types)
|
||||
|
||||
// Either an atom or somebody fucked up and is gonna get a runtime, which I'm fine with.
|
||||
var/atom/A = thing
|
||||
var/key = "[istype(A.icon, /icon) ? "\ref[A.icon]" : A.icon]:[A.icon_state]"
|
||||
var/key = "[istype(A.icon, /icon) ? "[REF(A.icon)]" : A.icon]:[A.icon_state]"
|
||||
|
||||
|
||||
if (!bicon_cache[key]) // Doesn't exist, make it.
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// Helpers for checking whether a z-level conforms to a specific requirement
|
||||
|
||||
// Basic levels
|
||||
#define is_centcom_level(z) SSmapping.level_trait(z, ZTRAIT_CENTCOM)
|
||||
|
||||
#define is_station_level(z) SSmapping.level_trait(z, ZTRAIT_STATION)
|
||||
|
||||
#define is_mining_level(z) SSmapping.level_trait(z, ZTRAIT_MINING)
|
||||
|
||||
#define is_reebe(z) SSmapping.level_trait(z, ZTRAIT_REEBE)
|
||||
|
||||
#define is_transit_level(z) SSmapping.level_trait(z, ZTRAIT_TRANSIT)
|
||||
|
||||
#define is_away_level(z) SSmapping.level_trait(z, ZTRAIT_AWAY)
|
||||
|
||||
// If true, the singularity cannot strip away asteroid turf on this Z
|
||||
#define is_planet_level(z) (GLOB.z_is_planet["z"])
|
||||
@@ -1,222 +0,0 @@
|
||||
// Credits to Nickr5 for the useful procs I've taken from his library resource.
|
||||
|
||||
GLOBAL_VAR_INIT(E, 2.71828183)
|
||||
GLOBAL_VAR_INIT(Sqrt2, 1.41421356)
|
||||
|
||||
// List of square roots for the numbers 1-100.
|
||||
GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
|
||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||
8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10))
|
||||
|
||||
/proc/sign(x)
|
||||
return x!=0?x/abs(x):0
|
||||
|
||||
/proc/Atan2(x, y)
|
||||
if(!x && !y) return 0
|
||||
var/a = arccos(x / sqrt(x*x + y*y))
|
||||
return y >= 0 ? a : -a
|
||||
|
||||
/proc/Ceiling(x, y=1)
|
||||
return -round(-x / y) * y
|
||||
|
||||
/proc/Floor(x, y=1)
|
||||
return round(x / y) * y
|
||||
|
||||
#define Clamp(CLVALUE,CLMIN,CLMAX) ( max( (CLMIN), min((CLVALUE), (CLMAX)) ) )
|
||||
|
||||
// cotangent
|
||||
/proc/Cot(x)
|
||||
return 1 / Tan(x)
|
||||
|
||||
// cosecant
|
||||
/proc/Csc(x)
|
||||
return 1 / sin(x)
|
||||
|
||||
/proc/Default(a, b)
|
||||
return a ? a : b
|
||||
|
||||
// Greatest Common Divisor - Euclid's algorithm
|
||||
/proc/Gcd(a, b)
|
||||
return b ? Gcd(b, a % b) : a
|
||||
|
||||
/proc/Inverse(x)
|
||||
return 1 / x
|
||||
|
||||
/proc/IsAboutEqual(a, b, deviation = 0.1)
|
||||
return abs(a - b) <= deviation
|
||||
|
||||
/proc/IsEven(x)
|
||||
return x % 2 == 0
|
||||
|
||||
// Returns true if val is from min to max, inclusive.
|
||||
/proc/IsInRange(val, min, max)
|
||||
return min <= val && val <= max
|
||||
|
||||
/proc/IsInteger(x)
|
||||
return round(x) == x
|
||||
|
||||
/proc/IsOdd(x)
|
||||
return !IsEven(x)
|
||||
|
||||
/proc/IsMultiple(x, y)
|
||||
return x % y == 0
|
||||
|
||||
// Least Common Multiple
|
||||
/proc/Lcm(a, b)
|
||||
return abs(a) / Gcd(a, b) * abs(b)
|
||||
|
||||
// Performs a linear interpolation between a and b.
|
||||
// Note that amount=0 returns a, amount=1 returns b, and
|
||||
// amount=0.5 returns the mean of a and b.
|
||||
/proc/Lerp(a, b, amount = 0.5)
|
||||
return a + (b - a) * amount
|
||||
|
||||
//Calculates the sum of a list of numbers.
|
||||
/proc/Sum(var/list/data)
|
||||
. = 0
|
||||
for(var/val in data)
|
||||
.+= val
|
||||
|
||||
//Calculates the mean of a list of numbers.
|
||||
/proc/Mean(var/list/data)
|
||||
. = Sum(data) / (data.len)
|
||||
|
||||
|
||||
// Returns the nth root of x.
|
||||
/proc/Root(n, x)
|
||||
return x ** (1 / n)
|
||||
|
||||
// secant
|
||||
/proc/Sec(x)
|
||||
return 1 / cos(x)
|
||||
|
||||
// The quadratic formula. Returns a list with the solutions, or an empty list
|
||||
// if they are imaginary.
|
||||
/proc/SolveQuadratic(a, b, c)
|
||||
ASSERT(a)
|
||||
. = list()
|
||||
var/d = b*b - 4 * a * c
|
||||
var/bottom = 2 * a
|
||||
if(d < 0) return
|
||||
var/root = sqrt(d)
|
||||
. += (-b + root) / bottom
|
||||
if(!d) return
|
||||
. += (-b - root) / bottom
|
||||
|
||||
// tangent
|
||||
/proc/Tan(x)
|
||||
return sin(x) / cos(x)
|
||||
|
||||
/proc/ToDegrees(radians)
|
||||
// 180 / Pi
|
||||
return radians * 57.2957795
|
||||
|
||||
/proc/ToRadians(degrees)
|
||||
// Pi / 180
|
||||
return degrees * 0.0174532925
|
||||
|
||||
// Will filter out extra rotations and negative rotations
|
||||
// E.g: 540 becomes 180. -180 becomes 180.
|
||||
/proc/SimplifyDegrees(degrees)
|
||||
degrees = degrees % 360
|
||||
if(degrees < 0)
|
||||
degrees += 360
|
||||
return degrees
|
||||
|
||||
// min is inclusive, max is exclusive
|
||||
/proc/Wrap(val, min, max)
|
||||
var/d = max - min
|
||||
var/t = round((val - min) / d)
|
||||
return val - (t * d)
|
||||
|
||||
#define NORM_ROT(rot) ((((rot % 360) + (rot - round(rot, 1))) > 0) ? ((rot % 360) + (rot - round(rot, 1))) : (((rot % 360) + (rot - round(rot, 1))) + 360))
|
||||
|
||||
/proc/get_angle_of_incidence(face_angle, angle_in, auto_normalize = TRUE)
|
||||
|
||||
var/angle_in_s = NORM_ROT(angle_in)
|
||||
var/face_angle_s = NORM_ROT(face_angle)
|
||||
var/incidence = face_angle_s - angle_in_s
|
||||
var/incidence_s = incidence
|
||||
while(incidence_s < -90)
|
||||
incidence_s += 180
|
||||
while(incidence_s > 90)
|
||||
incidence_s -= 180
|
||||
if(auto_normalize)
|
||||
return incidence_s
|
||||
else
|
||||
return incidence
|
||||
|
||||
//A logarithm that converts an integer to a number scaled between 0 and 1 (can be tweaked to be higher).
|
||||
//Currently, this is used for hydroponics-produce sprite transforming, but could be useful for other transform functions.
|
||||
/proc/TransformUsingVariable(input, inputmaximum, scaling_modifier = 0)
|
||||
|
||||
var/inputToDegrees = (input/inputmaximum)*180 //Converting from a 0 -> 100 scale to a 0 -> 180 scale. The 0 -> 180 scale corresponds to degrees
|
||||
var/size_factor = ((-cos(inputToDegrees) +1) /2) //returns a value from 0 to 1
|
||||
|
||||
return size_factor + scaling_modifier //scale mod of 0 results in a number from 0 to 1. A scale modifier of +0.5 returns 0.5 to 1.5
|
||||
//to_chat(world, "Transform multiplier of [src] is [size_factor + scaling_modifer]")
|
||||
|
||||
//converts a uniform distributed random number into a normal distributed one
|
||||
//since this method produces two random numbers, one is saved for subsequent calls
|
||||
//(making the cost negligble for every second call)
|
||||
//This will return +/- decimals, situated about mean with standard deviation stddev
|
||||
//68% chance that the number is within 1stddev
|
||||
//95% chance that the number is within 2stddev
|
||||
//98% chance that the number is within 3stddev...etc
|
||||
#define ACCURACY 10000
|
||||
/proc/gaussian(mean, stddev)
|
||||
var/static/gaussian_next
|
||||
var/R1;var/R2;var/working
|
||||
if(gaussian_next != null)
|
||||
R1 = gaussian_next
|
||||
gaussian_next = null
|
||||
else
|
||||
do
|
||||
R1 = rand(-ACCURACY,ACCURACY)/ACCURACY
|
||||
R2 = rand(-ACCURACY,ACCURACY)/ACCURACY
|
||||
working = R1*R1 + R2*R2
|
||||
while(working >= 1 || working==0)
|
||||
working = sqrt(-2 * log(working) / working)
|
||||
R1 *= working
|
||||
gaussian_next = R2 * working
|
||||
return (mean + stddev * R1)
|
||||
#undef ACCURACY
|
||||
|
||||
/proc/mouse_angle_from_client(client/client)
|
||||
var/list/mouse_control = params2list(client.mouseParams)
|
||||
if(mouse_control["screen-loc"])
|
||||
var/list/screen_loc_params = splittext(mouse_control["screen-loc"], ",")
|
||||
var/list/screen_loc_X = splittext(screen_loc_params[1],":")
|
||||
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
|
||||
var/x = (text2num(screen_loc_X[1]) * 32 + text2num(screen_loc_X[2]) - 32)
|
||||
var/y = (text2num(screen_loc_Y[1]) * 32 + text2num(screen_loc_Y[2]) - 32)
|
||||
var/screenview = (client.view * 2 + 1) * world.icon_size //Refer to http://www.byond.com/docs/ref/info.html#/client/var/view for mad maths
|
||||
var/ox = round(screenview/2) - client.pixel_x //"origin" x
|
||||
var/oy = round(screenview/2) - client.pixel_y //"origin" y
|
||||
var/angle = NORM_ROT(Atan2(y - oy, x - ox))
|
||||
return angle
|
||||
|
||||
/proc/get_turf_in_angle(angle, turf/starting, increments)
|
||||
var/pixel_x = 0
|
||||
var/pixel_y = 0
|
||||
for(var/i in 1 to increments)
|
||||
pixel_x += sin(angle)+16*sin(angle)*2
|
||||
pixel_y += cos(angle)+16*cos(angle)*2
|
||||
var/new_x = starting.x
|
||||
var/new_y = starting.y
|
||||
while(pixel_x > 16)
|
||||
pixel_x -= 32
|
||||
new_x++
|
||||
while(pixel_x < -16)
|
||||
pixel_x += 32
|
||||
new_x--
|
||||
while(pixel_y > 16)
|
||||
pixel_y -= 32
|
||||
new_y++
|
||||
while(pixel_y < -16)
|
||||
pixel_y += 32
|
||||
new_y--
|
||||
new_x = Clamp(new_x, 0, world.maxx)
|
||||
new_y = Clamp(new_y, 0, world.maxy)
|
||||
return locate(new_x, new_y, starting.z)
|
||||
+93
-36
@@ -20,32 +20,35 @@
|
||||
else
|
||||
return "000"
|
||||
|
||||
/proc/random_underwear(gender)
|
||||
/proc/random_underwear(gender)//Cit change - makes random underwear always return nude
|
||||
if(!GLOB.underwear_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, GLOB.underwear_list, GLOB.underwear_m, GLOB.underwear_f)
|
||||
switch(gender)
|
||||
return "Nude"
|
||||
/*switch(gender)
|
||||
if(MALE)
|
||||
return pick(GLOB.underwear_m)
|
||||
if(FEMALE)
|
||||
return pick(GLOB.underwear_f)
|
||||
else
|
||||
return pick(GLOB.underwear_list)
|
||||
return pick(GLOB.underwear_list)*/
|
||||
|
||||
/proc/random_undershirt(gender)
|
||||
/proc/random_undershirt(gender)//Cit change - makes random undershirts always return nude
|
||||
if(!GLOB.undershirt_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, GLOB.undershirt_list, GLOB.undershirt_m, GLOB.undershirt_f)
|
||||
switch(gender)
|
||||
return "Nude"
|
||||
/*switch(gender)
|
||||
if(MALE)
|
||||
return pick(GLOB.undershirt_m)
|
||||
if(FEMALE)
|
||||
return pick(GLOB.undershirt_f)
|
||||
else
|
||||
return pick(GLOB.undershirt_list)
|
||||
return pick(GLOB.undershirt_list)*/
|
||||
|
||||
/proc/random_socks()
|
||||
/proc/random_socks()//Cit change - makes random socks always return nude
|
||||
if(!GLOB.socks_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, GLOB.socks_list)
|
||||
return pick(GLOB.socks_list)
|
||||
return "Nude"
|
||||
//return pick(GLOB.socks_list)
|
||||
|
||||
/proc/random_features()
|
||||
if(!GLOB.tails_list_human.len)
|
||||
@@ -68,13 +71,20 @@
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, GLOB.body_markings_list)
|
||||
if(!GLOB.wings_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.wings_list)
|
||||
if(!GLOB.moth_wings_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_wings, GLOB.moth_wings_list)
|
||||
|
||||
//CIT CHANGES - genitals and such
|
||||
if(!GLOB.cock_shapes_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/penis, GLOB.cock_shapes_list)
|
||||
if(!GLOB.vagina_shapes_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/vagina, GLOB.vagina_shapes_list)
|
||||
if(!GLOB.breasts_shapes_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/breasts, GLOB.breasts_shapes_list)
|
||||
if(!GLOB.ipc_screens_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/screen, GLOB.ipc_screens_list)
|
||||
if(!GLOB.ipc_antennas_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/antenna, GLOB.ipc_antennas_list)
|
||||
// if(ishuman(src))
|
||||
// var/mob/living/carbon/human/H = src
|
||||
/* if(H.gender == MALE) Fuck if I know how to fix this.
|
||||
@@ -90,6 +100,7 @@
|
||||
womb = 1
|
||||
breasts = 1 */
|
||||
|
||||
//CIT CHANGE - changes this entire return to support cit's snowflake parts
|
||||
return(list(
|
||||
"mcolor" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"),
|
||||
"mcolor2" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"),
|
||||
@@ -104,14 +115,16 @@
|
||||
"spines" = pick(GLOB.spines_list),
|
||||
"body_markings" = pick(GLOB.body_markings_list),
|
||||
"legs" = "Normal Legs",
|
||||
"caps" = pick(GLOB.caps_list),
|
||||
"moth_wings" = pick(GLOB.moth_wings_list),
|
||||
"taur" = "None",
|
||||
"mam_body_markings" = "None",
|
||||
"mam_ears" = "None",
|
||||
"mam_tail" = "None",
|
||||
"mam_body_markings" = "wolf",
|
||||
"mam_ears" = "wolf",
|
||||
"mam_tail" = "wolf",
|
||||
"mam_tail_animated" = "None",
|
||||
"xenodorsal" = "None",
|
||||
"xenohead" = "None",
|
||||
"xenotail" = "None",
|
||||
"xenodorsal" = "standard",
|
||||
"xenohead" = "standard",
|
||||
"xenotail" = "standard",
|
||||
"exhibitionist" = FALSE,
|
||||
"genitals_use_skintone" = FALSE,
|
||||
"has_cock" = FALSE,
|
||||
@@ -157,6 +170,8 @@
|
||||
"womb_cum_mult" = CUM_RATE_MULT,
|
||||
"womb_efficiency" = CUM_EFFICIENCY,
|
||||
"womb_fluid" = "femcum",
|
||||
"ipc_screen" = "Sunburst",
|
||||
"ipc_antenna" = "None",
|
||||
"flavor_text" = ""))
|
||||
|
||||
/proc/random_hair_style(gender)
|
||||
@@ -178,27 +193,34 @@
|
||||
return pick(GLOB.facial_hair_styles_list)
|
||||
|
||||
/proc/random_unique_name(gender, attempts_to_find_unique_name=10)
|
||||
for(var/i=1, i<=attempts_to_find_unique_name, i++)
|
||||
for(var/i in 1 to attempts_to_find_unique_name)
|
||||
if(gender==FEMALE)
|
||||
. = capitalize(pick(GLOB.first_names_female)) + " " + capitalize(pick(GLOB.last_names))
|
||||
else
|
||||
. = capitalize(pick(GLOB.first_names_male)) + " " + capitalize(pick(GLOB.last_names))
|
||||
|
||||
if(i != attempts_to_find_unique_name && !findname(.))
|
||||
if(!findname(.))
|
||||
break
|
||||
|
||||
/proc/random_unique_lizard_name(gender, attempts_to_find_unique_name=10)
|
||||
for(var/i=1, i<=attempts_to_find_unique_name, i++)
|
||||
for(var/i in 1 to attempts_to_find_unique_name)
|
||||
. = capitalize(lizard_name(gender))
|
||||
|
||||
if(i != attempts_to_find_unique_name && !findname(.))
|
||||
if(!findname(.))
|
||||
break
|
||||
|
||||
/proc/random_unique_plasmaman_name(attempts_to_find_unique_name=10)
|
||||
for(var/i=1, i<=attempts_to_find_unique_name, i++)
|
||||
for(var/i in 1 to attempts_to_find_unique_name)
|
||||
. = capitalize(plasmaman_name())
|
||||
|
||||
if(i != attempts_to_find_unique_name && !findname(.))
|
||||
if(!findname(.))
|
||||
break
|
||||
|
||||
/proc/random_unique_moth_name(attempts_to_find_unique_name=10)
|
||||
for(var/i in 1 to attempts_to_find_unique_name)
|
||||
. = capitalize(pick(GLOB.moth_first)) + " " + capitalize(pick(GLOB.moth_last))
|
||||
|
||||
if(!findname(.))
|
||||
break
|
||||
|
||||
/proc/random_skin_tone()
|
||||
@@ -220,7 +242,6 @@ GLOBAL_LIST_INIT(skin_tones, list(
|
||||
))
|
||||
|
||||
GLOBAL_LIST_EMPTY(species_list)
|
||||
GLOBAL_LIST_EMPTY(roundstart_species)
|
||||
|
||||
/proc/age2agedescription(age)
|
||||
switch(age)
|
||||
@@ -257,8 +278,8 @@ Proc for attack log creation, because really why not
|
||||
/proc/add_logs(mob/user, mob/target, what_done, object=null, addition=null)
|
||||
var/turf/attack_location = get_turf(target)
|
||||
|
||||
var/is_mob_user = user && GLOB.typecache_mob[user.type]
|
||||
var/is_mob_target = target && GLOB.typecache_mob[target.type]
|
||||
var/is_mob_user = user && ismob(user)
|
||||
var/is_mob_target = target && ismob(target)
|
||||
|
||||
var/mob/living/living_target
|
||||
|
||||
@@ -267,7 +288,7 @@ Proc for attack log creation, because really why not
|
||||
|
||||
var/hp =" "
|
||||
if(living_target)
|
||||
hp = "(NEWHP: [living_target.health])"
|
||||
hp = " (NEWHP: [living_target.health]) "
|
||||
|
||||
var/starget = "NON-EXISTENT SUBJECT"
|
||||
if(target)
|
||||
@@ -286,20 +307,22 @@ Proc for attack log creation, because really why not
|
||||
var/sobject = ""
|
||||
if(object)
|
||||
sobject = "[object]"
|
||||
if(addition)
|
||||
addition = " [addition]"
|
||||
|
||||
var/sattackloc = ""
|
||||
if(attack_location)
|
||||
sattackloc = "([attack_location.x],[attack_location.y],[attack_location.z])"
|
||||
|
||||
if(is_mob_user)
|
||||
var/message = "<font color='red'>has [what_done] [starget] with [sobject][addition] [hp] [sattackloc]</font>"
|
||||
var/message = "<font color='red'>has [what_done] [starget][(sobject||addition) ? " with ":""][sobject][addition][hp][sattackloc]</font>"
|
||||
user.log_message(message, INDIVIDUAL_ATTACK_LOG)
|
||||
|
||||
if(is_mob_target)
|
||||
var/message = "<font color='orange'>has been [what_done] by [ssource] with [sobject][addition] [hp] [sattackloc]</font>"
|
||||
var/message = "<font color='orange'>has been [what_done] by [ssource][(sobject||addition) ? " with ":""][sobject][addition][hp][sattackloc]</font>"
|
||||
target.log_message(message, INDIVIDUAL_ATTACK_LOG)
|
||||
|
||||
log_attack("[ssource] [what_done] [starget] with [sobject][addition] [hp] [sattackloc]")
|
||||
log_attack("[ssource] [what_done] [starget][(sobject||addition) ? " with ":""][sobject][addition][hp][sattackloc]")
|
||||
|
||||
|
||||
/proc/do_mob(mob/user , mob/target, time = 30, uninterruptible = 0, progress = 1, datum/callback/extra_checks = null)
|
||||
@@ -322,7 +345,7 @@ Proc for attack log creation, because really why not
|
||||
var/starttime = world.time
|
||||
. = 1
|
||||
while (world.time < endtime)
|
||||
stoplag()
|
||||
stoplag(1)
|
||||
if (progress)
|
||||
progbar.update(world.time - starttime)
|
||||
if(QDELETED(user) || QDELETED(target))
|
||||
@@ -356,11 +379,11 @@ Proc for attack log creation, because really why not
|
||||
checked_health["health"] = health
|
||||
return ..()
|
||||
|
||||
/proc/do_after(mob/user, delay, needhand = 1, atom/target = null, progress = 1, datum/callback/extra_checks = null)
|
||||
/proc/do_after(mob/user, var/delay, needhand = 1, atom/target = null, progress = 1, datum/callback/extra_checks = null)
|
||||
if(!user)
|
||||
return 0
|
||||
var/atom/Tloc = null
|
||||
if(target)
|
||||
if(target && !isturf(target))
|
||||
Tloc = target.loc
|
||||
|
||||
var/atom/Uloc = user.loc
|
||||
@@ -375,6 +398,8 @@ Proc for attack log creation, because really why not
|
||||
if(holding)
|
||||
holdingnull = 0 //Users hand started holding something, check to see if it's still holding that
|
||||
|
||||
delay *= user.do_after_coefficent()
|
||||
|
||||
var/datum/progressbar/progbar
|
||||
if (progress)
|
||||
progbar = new(user, delay, target)
|
||||
@@ -383,7 +408,7 @@ Proc for attack log creation, because really why not
|
||||
var/starttime = world.time
|
||||
. = 1
|
||||
while (world.time < endtime)
|
||||
stoplag()
|
||||
stoplag(1)
|
||||
if (progress)
|
||||
progbar.update(world.time - starttime)
|
||||
|
||||
@@ -413,6 +438,10 @@ Proc for attack log creation, because really why not
|
||||
if (progress)
|
||||
qdel(progbar)
|
||||
|
||||
/mob/proc/do_after_coefficent() // This gets added to the delay on a do_after, default 1
|
||||
. = 1
|
||||
return
|
||||
|
||||
/proc/do_after_mob(mob/user, var/list/targets, time = 30, uninterruptible = 0, progress = 1, datum/callback/extra_checks)
|
||||
if(!user || !targets)
|
||||
return 0
|
||||
@@ -438,7 +467,7 @@ Proc for attack log creation, because really why not
|
||||
. = 1
|
||||
mainloop:
|
||||
while(world.time < endtime)
|
||||
sleep(1)
|
||||
stoplag(1)
|
||||
if(progress)
|
||||
progbar.update(world.time - starttime)
|
||||
if(QDELETED(user) || !targets)
|
||||
@@ -465,14 +494,19 @@ Proc for attack log creation, because really why not
|
||||
if(H.dna && istype(H.dna.species, species_datum))
|
||||
. = TRUE
|
||||
|
||||
/proc/spawn_atom_to_turf(spawn_type, target, amount, admin_spawn=FALSE)
|
||||
/proc/spawn_atom_to_turf(spawn_type, target, amount, admin_spawn=FALSE, list/extra_args)
|
||||
var/turf/T = get_turf(target)
|
||||
if(!T)
|
||||
CRASH("attempt to spawn atom type: [spawn_type] in nullspace")
|
||||
|
||||
var/list/new_args = list(T)
|
||||
if(extra_args)
|
||||
new_args += extra_args
|
||||
|
||||
for(var/j in 1 to amount)
|
||||
var/atom/X = new spawn_type(T)
|
||||
X.admin_spawned = admin_spawn
|
||||
var/atom/X = new spawn_type(arglist(new_args))
|
||||
if (admin_spawn)
|
||||
X.flags_1 |= ADMIN_SPAWNED_1
|
||||
|
||||
/proc/spawn_and_random_walk(spawn_type, target, amount, walk_chance=100, max_walk=3, always_max_walk=FALSE, admin_spawn=FALSE)
|
||||
var/turf/T = get_turf(target)
|
||||
@@ -482,7 +516,8 @@ Proc for attack log creation, because really why not
|
||||
|
||||
for(var/j in 1 to amount)
|
||||
var/atom/movable/X = new spawn_type(T)
|
||||
X.admin_spawned = admin_spawn
|
||||
if (admin_spawn)
|
||||
X.flags_1 |= ADMIN_SPAWNED_1
|
||||
|
||||
if(always_max_walk || prob(walk_chance))
|
||||
if(always_max_walk)
|
||||
@@ -568,7 +603,29 @@ Proc for attack log creation, because really why not
|
||||
log_adminsay(logmessage)
|
||||
if(LOGOOC)
|
||||
log_ooc(logmessage)
|
||||
log_looc(logmessage) //CITADEL EDIT, logging LOOC because why not
|
||||
else
|
||||
warning("Invalid speech logging type detected. [logtype]. Defaulting to say")
|
||||
log_say(logmessage)
|
||||
|
||||
//Used in chemical_mob_spawn. Generates a random mob based on a given gold_core_spawnable value.
|
||||
/proc/create_random_mob(spawn_location, mob_class = HOSTILE_SPAWN)
|
||||
var/static/list/mob_spawn_meancritters = list() // list of possible hostile mobs
|
||||
var/static/list/mob_spawn_nicecritters = list() // and possible friendly mobs
|
||||
|
||||
if(mob_spawn_meancritters.len <= 0 || mob_spawn_nicecritters.len <= 0)
|
||||
for(var/T in typesof(/mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/SA = T
|
||||
switch(initial(SA.gold_core_spawnable))
|
||||
if(HOSTILE_SPAWN)
|
||||
mob_spawn_meancritters += T
|
||||
if(FRIENDLY_SPAWN)
|
||||
mob_spawn_nicecritters += T
|
||||
|
||||
var/chosen
|
||||
if(mob_class == FRIENDLY_SPAWN)
|
||||
chosen = pick(mob_spawn_nicecritters)
|
||||
else
|
||||
chosen = pick(mob_spawn_meancritters)
|
||||
var/mob/living/simple_animal/C = new chosen(spawn_location)
|
||||
return C
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/proc/mouse_angle_from_client(client/client)
|
||||
var/list/mouse_control = params2list(client.mouseParams)
|
||||
if(mouse_control["screen-loc"] && client)
|
||||
var/list/screen_loc_params = splittext(mouse_control["screen-loc"], ",")
|
||||
var/list/screen_loc_X = splittext(screen_loc_params[1],":")
|
||||
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
|
||||
var/x = (text2num(screen_loc_X[1]) * 32 + text2num(screen_loc_X[2]) - 32)
|
||||
var/y = (text2num(screen_loc_Y[1]) * 32 + text2num(screen_loc_Y[2]) - 32)
|
||||
var/list/screenview = getviewsize(client.view)
|
||||
var/screenviewX = screenview[1] * world.icon_size
|
||||
var/screenviewY = screenview[2] * world.icon_size
|
||||
var/ox = round(screenviewX/2) - client.pixel_x //"origin" x
|
||||
var/oy = round(screenviewY/2) - client.pixel_y //"origin" y
|
||||
var/angle = SIMPLIFY_DEGREES(ATAN2(y - oy, x - ox))
|
||||
return angle
|
||||
|
||||
//Wow, specific name!
|
||||
/proc/mouse_absolute_datum_map_position_from_client(client/client)
|
||||
if(!isloc(client.mob.loc))
|
||||
return
|
||||
var/list/mouse_control = params2list(client.mouseParams)
|
||||
var/cx = client.mob.x
|
||||
var/cy = client.mob.y
|
||||
var/cz = client.mob.z
|
||||
if(mouse_control["screen-loc"])
|
||||
var/x = 0
|
||||
var/y = 0
|
||||
var/z = 0
|
||||
var/p_x = 0
|
||||
var/p_y = 0
|
||||
//Split screen-loc up into X+Pixel_X and Y+Pixel_Y
|
||||
var/list/screen_loc_params = splittext(mouse_control["screen-loc"], ",")
|
||||
//Split X+Pixel_X up into list(X, Pixel_X)
|
||||
var/list/screen_loc_X = splittext(screen_loc_params[1],":")
|
||||
//Split Y+Pixel_Y up into list(Y, Pixel_Y)
|
||||
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
|
||||
var/sx = text2num(screen_loc_X[1])
|
||||
var/sy = text2num(screen_loc_Y[1])
|
||||
//Get the resolution of the client's current screen size.
|
||||
var/list/screenview = getviewsize(client.view)
|
||||
var/svx = screenview[1]
|
||||
var/svy = screenview[2]
|
||||
var/cox = round((svx - 1) / 2)
|
||||
var/coy = round((svy - 1) / 2)
|
||||
x = cx + (sx - 1 - cox)
|
||||
y = cy + (sy - 1 - coy)
|
||||
z = cz
|
||||
p_x = text2num(screen_loc_X[2])
|
||||
p_y = text2num(screen_loc_Y[2])
|
||||
return new /datum/position(x, y, z, p_x, p_y)
|
||||
+244
-246
@@ -1,246 +1,244 @@
|
||||
#define ION_FILE "ion_laws.json"
|
||||
|
||||
/proc/lizard_name(gender)
|
||||
if(gender == MALE)
|
||||
return "[pick(GLOB.lizard_names_male)]-[pick(GLOB.lizard_names_male)]"
|
||||
else
|
||||
return "[pick(GLOB.lizard_names_female)]-[pick(GLOB.lizard_names_female)]"
|
||||
|
||||
/proc/plasmaman_name()
|
||||
return "[pick(GLOB.plasmaman_names)] \Roman[rand(1,99)]"
|
||||
|
||||
/proc/church_name()
|
||||
var/static/church_name
|
||||
if (church_name)
|
||||
return church_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
name += pick("Holy", "United", "First", "Second", "Last")
|
||||
|
||||
if (prob(20))
|
||||
name += " Space"
|
||||
|
||||
name += " " + pick("Church", "Cathedral", "Body", "Worshippers", "Movement", "Witnesses")
|
||||
name += " of [religion_name()]"
|
||||
|
||||
return name
|
||||
|
||||
GLOBAL_VAR(command_name)
|
||||
/proc/command_name()
|
||||
if (GLOB.command_name)
|
||||
return GLOB.command_name
|
||||
|
||||
var/name = "Central Command"
|
||||
|
||||
GLOB.command_name = name
|
||||
return name
|
||||
|
||||
/proc/change_command_name(name)
|
||||
|
||||
GLOB.command_name = name
|
||||
|
||||
return name
|
||||
|
||||
/proc/religion_name()
|
||||
var/static/religion_name
|
||||
if (religion_name)
|
||||
return religion_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
name += pick("bee", "science", "edu", "captain", "assistant", "monkey", "alien", "space", "unit", "sprocket", "gadget", "bomb", "revolution", "beyond", "station", "goon", "robot", "ivor", "hobnob")
|
||||
name += pick("ism", "ia", "ology", "istism", "ites", "ick", "ian", "ity")
|
||||
|
||||
return capitalize(name)
|
||||
|
||||
/proc/station_name()
|
||||
if(!GLOB.station_name)
|
||||
var/newname
|
||||
if(config && config.station_name)
|
||||
newname = config.station_name
|
||||
else
|
||||
newname = new_station_name()
|
||||
|
||||
set_station_name(newname)
|
||||
|
||||
return GLOB.station_name
|
||||
|
||||
/proc/set_station_name(newname)
|
||||
GLOB.station_name = newname
|
||||
|
||||
if(config && config.server_name)
|
||||
world.name = "[config.server_name][config.server_name==GLOB.station_name ? "" : ": [GLOB.station_name]"]"
|
||||
else
|
||||
world.name = GLOB.station_name
|
||||
|
||||
|
||||
/proc/new_station_name()
|
||||
var/random = rand(1,5)
|
||||
var/name = ""
|
||||
var/new_station_name = ""
|
||||
|
||||
//Rare: Pre-Prefix
|
||||
if (prob(10))
|
||||
name = pick(GLOB.station_prefixes)
|
||||
new_station_name = name + " "
|
||||
name = ""
|
||||
|
||||
// Prefix
|
||||
for(var/holiday_name in SSevents.holidays)
|
||||
if(holiday_name == "Friday the 13th")
|
||||
random = 13
|
||||
var/datum/holiday/holiday = SSevents.holidays[holiday_name]
|
||||
name = holiday.getStationPrefix()
|
||||
//get normal name
|
||||
if(!name)
|
||||
name = pick(GLOB.station_names)
|
||||
if(name)
|
||||
new_station_name += name + " "
|
||||
|
||||
// Suffix
|
||||
name = pick(GLOB.station_suffixes)
|
||||
new_station_name += name + " "
|
||||
|
||||
// ID Number
|
||||
switch(random)
|
||||
if(1)
|
||||
new_station_name += "[rand(1, 99)]"
|
||||
if(2)
|
||||
new_station_name += pick(GLOB.greek_letters)
|
||||
if(3)
|
||||
new_station_name += "\Roman[rand(1,99)]"
|
||||
if(4)
|
||||
new_station_name += pick(GLOB.phonetic_alphabet)
|
||||
if(5)
|
||||
new_station_name += pick(GLOB.numbers_as_words)
|
||||
if(13)
|
||||
new_station_name += pick("13","XIII","Thirteen")
|
||||
return new_station_name
|
||||
|
||||
/proc/syndicate_name()
|
||||
var/static/syndicate_name
|
||||
if (syndicate_name)
|
||||
return syndicate_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
// Prefix
|
||||
name += pick("Clandestine", "Prima", "Blue", "Zero-G", "Max", "Blasto", "Waffle", "North", "Omni", "Newton", "Cyber", "Bonk", "Gene", "Gib")
|
||||
|
||||
// Suffix
|
||||
if (prob(80))
|
||||
name += " "
|
||||
|
||||
// Full
|
||||
if (prob(60))
|
||||
name += pick("Syndicate", "Consortium", "Collective", "Corporation", "Group", "Holdings", "Biotech", "Industries", "Systems", "Products", "Chemicals", "Enterprises", "Family", "Creations", "International", "Intergalactic", "Interplanetary", "Foundation", "Positronics", "Hive")
|
||||
// Broken
|
||||
else
|
||||
name += pick("Syndi", "Corp", "Bio", "System", "Prod", "Chem", "Inter", "Hive")
|
||||
name += pick("", "-")
|
||||
name += pick("Tech", "Sun", "Co", "Tek", "X", "Inc", "Code")
|
||||
// Small
|
||||
else
|
||||
name += pick("-", "*", "")
|
||||
name += pick("Tech", "Sun", "Co", "Tek", "X", "Inc", "Gen", "Star", "Dyne", "Code", "Hive")
|
||||
|
||||
syndicate_name = name
|
||||
return name
|
||||
|
||||
|
||||
//Traitors and traitor silicons will get these. Revs will not.
|
||||
GLOBAL_VAR(syndicate_code_phrase) //Code phrase for traitors.
|
||||
GLOBAL_VAR(syndicate_code_response) //Code response for traitors.
|
||||
|
||||
/*
|
||||
Should be expanded.
|
||||
How this works:
|
||||
Instead of "I'm looking for James Smith," the traitor would say "James Smith" as part of a conversation.
|
||||
Another traitor may then respond with: "They enjoy running through the void-filled vacuum of the derelict."
|
||||
The phrase should then have the words: James Smith.
|
||||
The response should then have the words: run, void, and derelict.
|
||||
This way assures that the code is suited to the conversation and is unpredicatable.
|
||||
Obviously, some people will be better at this than others but in theory, everyone should be able to do it and it only enhances roleplay.
|
||||
Can probably be done through "{ }" but I don't really see the practical benefit.
|
||||
One example of an earlier system is commented below.
|
||||
/N
|
||||
*/
|
||||
|
||||
/proc/generate_code_phrase(return_list=FALSE)//Proc is used for phrase and response in master_controller.dm
|
||||
|
||||
if(!return_list)
|
||||
. = ""
|
||||
else
|
||||
. = list()
|
||||
|
||||
var/words = pick(//How many words there will be. Minimum of two. 2, 4 and 5 have a lesser chance of being selected. 3 is the most likely.
|
||||
50; 2,
|
||||
200; 3,
|
||||
50; 4,
|
||||
25; 5
|
||||
)
|
||||
|
||||
var/list/safety = list(1,2,3)//Tells the proc which options to remove later on.
|
||||
var/nouns = strings(ION_FILE, "ionabstract")
|
||||
var/objects = strings(ION_FILE, "ionobjects")
|
||||
var/adjectives = strings(ION_FILE, "ionadjectives")
|
||||
var/threats = strings(ION_FILE, "ionthreats")
|
||||
var/foods = strings(ION_FILE, "ionfood")
|
||||
var/drinks = strings(ION_FILE, "iondrinks")
|
||||
var/list/locations = GLOB.teleportlocs.len ? GLOB.teleportlocs : drinks //if null, defaults to drinks instead.
|
||||
|
||||
var/list/names = list()
|
||||
for(var/datum/data/record/t in GLOB.data_core.general)//Picks from crew manifest.
|
||||
names += t.fields["name"]
|
||||
|
||||
var/maxwords = words//Extra var to check for duplicates.
|
||||
|
||||
for(words,words>0,words--)//Randomly picks from one of the choices below.
|
||||
|
||||
if(words==1&&(1 in safety)&&(2 in safety))//If there is only one word remaining and choice 1 or 2 have not been selected.
|
||||
safety = list(pick(1,2))//Select choice 1 or 2.
|
||||
else if(words==1&&maxwords==2)//Else if there is only one word remaining (and there were two originally), and 1 or 2 were chosen,
|
||||
safety = list(3)//Default to list 3
|
||||
|
||||
switch(pick(safety))//Chance based on the safety list.
|
||||
if(1)//1 and 2 can only be selected once each to prevent more than two specific names/places/etc.
|
||||
switch(rand(1,2))//Mainly to add more options later.
|
||||
if(1)
|
||||
if(names.len&&prob(70))
|
||||
. += pick(names)
|
||||
else
|
||||
if(prob(10))
|
||||
. += pick(lizard_name(MALE),lizard_name(FEMALE))
|
||||
else
|
||||
var/new_name = pick(pick(GLOB.first_names_male,GLOB.first_names_female))
|
||||
new_name += " "
|
||||
new_name += pick(GLOB.last_names)
|
||||
. += new_name
|
||||
if(2)
|
||||
. += pick(get_all_jobs())//Returns a job.
|
||||
safety -= 1
|
||||
if(2)
|
||||
switch(rand(1,3))//Food, drinks, or things. Only selectable once.
|
||||
if(1)
|
||||
. += lowertext(pick(drinks))
|
||||
if(2)
|
||||
. += lowertext(pick(foods))
|
||||
if(3)
|
||||
. += lowertext(pick(locations))
|
||||
safety -= 2
|
||||
if(3)
|
||||
switch(rand(1,4))//Abstract nouns, objects, adjectives, threats. Can be selected more than once.
|
||||
if(1)
|
||||
. += lowertext(pick(nouns))
|
||||
if(2)
|
||||
. += lowertext(pick(objects))
|
||||
if(3)
|
||||
. += lowertext(pick(adjectives))
|
||||
if(4)
|
||||
. += lowertext(pick(threats))
|
||||
if(!return_list)
|
||||
if(words==1)
|
||||
. += "."
|
||||
else
|
||||
. += ", "
|
||||
/proc/lizard_name(gender)
|
||||
if(gender == MALE)
|
||||
return "[pick(GLOB.lizard_names_male)]-[pick(GLOB.lizard_names_male)]"
|
||||
else
|
||||
return "[pick(GLOB.lizard_names_female)]-[pick(GLOB.lizard_names_female)]"
|
||||
|
||||
/proc/plasmaman_name()
|
||||
return "[pick(GLOB.plasmaman_names)] \Roman[rand(1,99)]"
|
||||
|
||||
/proc/moth_name()
|
||||
return "[pick(GLOB.moth_first)] [pick(GLOB.moth_last)]"
|
||||
|
||||
/proc/church_name()
|
||||
var/static/church_name
|
||||
if (church_name)
|
||||
return church_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
name += pick("Holy", "United", "First", "Second", "Last")
|
||||
|
||||
if (prob(20))
|
||||
name += " Space"
|
||||
|
||||
name += " " + pick("Church", "Cathedral", "Body", "Worshippers", "Movement", "Witnesses")
|
||||
name += " of [religion_name()]"
|
||||
|
||||
return name
|
||||
|
||||
GLOBAL_VAR(command_name)
|
||||
/proc/command_name()
|
||||
if (GLOB.command_name)
|
||||
return GLOB.command_name
|
||||
|
||||
var/name = "Central Command"
|
||||
|
||||
GLOB.command_name = name
|
||||
return name
|
||||
|
||||
/proc/change_command_name(name)
|
||||
|
||||
GLOB.command_name = name
|
||||
|
||||
return name
|
||||
|
||||
/proc/religion_name()
|
||||
var/static/religion_name
|
||||
if (religion_name)
|
||||
return religion_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
name += pick("bee", "science", "edu", "captain", "assistant", "monkey", "alien", "space", "unit", "sprocket", "gadget", "bomb", "revolution", "beyond", "station", "goon", "robot", "ivor", "hobnob")
|
||||
name += pick("ism", "ia", "ology", "istism", "ites", "ick", "ian", "ity")
|
||||
|
||||
return capitalize(name)
|
||||
|
||||
/proc/station_name()
|
||||
if(!GLOB.station_name)
|
||||
var/newname
|
||||
var/config_station_name = CONFIG_GET(string/stationname)
|
||||
if(config_station_name)
|
||||
newname = config_station_name
|
||||
else
|
||||
newname = new_station_name()
|
||||
|
||||
set_station_name(newname)
|
||||
|
||||
return GLOB.station_name
|
||||
|
||||
/proc/set_station_name(newname)
|
||||
GLOB.station_name = newname
|
||||
|
||||
var/config_server_name = CONFIG_GET(string/servername)
|
||||
if(config_server_name)
|
||||
world.name = "[config_server_name][config_server_name == GLOB.station_name ? "" : ": [GLOB.station_name]"]"
|
||||
else
|
||||
world.name = GLOB.station_name
|
||||
|
||||
|
||||
/proc/new_station_name()
|
||||
var/random = rand(1,5)
|
||||
var/name = ""
|
||||
var/new_station_name = ""
|
||||
|
||||
//Rare: Pre-Prefix
|
||||
if (prob(10))
|
||||
name = pick(GLOB.station_prefixes)
|
||||
new_station_name = name + " "
|
||||
name = ""
|
||||
|
||||
// Prefix
|
||||
for(var/holiday_name in SSevents.holidays)
|
||||
if(holiday_name == "Friday the 13th")
|
||||
random = 13
|
||||
var/datum/holiday/holiday = SSevents.holidays[holiday_name]
|
||||
name = holiday.getStationPrefix()
|
||||
//get normal name
|
||||
if(!name)
|
||||
name = pick(GLOB.station_names)
|
||||
if(name)
|
||||
new_station_name += name + " "
|
||||
|
||||
// Suffix
|
||||
name = pick(GLOB.station_suffixes)
|
||||
new_station_name += name + " "
|
||||
|
||||
// ID Number
|
||||
switch(random)
|
||||
if(1)
|
||||
new_station_name += "[rand(1, 99)]"
|
||||
if(2)
|
||||
new_station_name += pick(GLOB.greek_letters)
|
||||
if(3)
|
||||
new_station_name += "\Roman[rand(1,99)]"
|
||||
if(4)
|
||||
new_station_name += pick(GLOB.phonetic_alphabet)
|
||||
if(5)
|
||||
new_station_name += pick(GLOB.numbers_as_words)
|
||||
if(13)
|
||||
new_station_name += pick("13","XIII","Thirteen")
|
||||
return new_station_name
|
||||
|
||||
/proc/syndicate_name()
|
||||
var/name = ""
|
||||
|
||||
// Prefix
|
||||
name += pick("Clandestine", "Prima", "Blue", "Zero-G", "Max", "Blasto", "Waffle", "North", "Omni", "Newton", "Cyber", "Bonk", "Gene", "Gib")
|
||||
|
||||
// Suffix
|
||||
if (prob(80))
|
||||
name += " "
|
||||
|
||||
// Full
|
||||
if (prob(60))
|
||||
name += pick("Syndicate", "Consortium", "Collective", "Corporation", "Group", "Holdings", "Biotech", "Industries", "Systems", "Products", "Chemicals", "Enterprises", "Family", "Creations", "International", "Intergalactic", "Interplanetary", "Foundation", "Positronics", "Hive")
|
||||
// Broken
|
||||
else
|
||||
name += pick("Syndi", "Corp", "Bio", "System", "Prod", "Chem", "Inter", "Hive")
|
||||
name += pick("", "-")
|
||||
name += pick("Tech", "Sun", "Co", "Tek", "X", "Inc", "Code")
|
||||
// Small
|
||||
else
|
||||
name += pick("-", "*", "")
|
||||
name += pick("Tech", "Sun", "Co", "Tek", "X", "Inc", "Gen", "Star", "Dyne", "Code", "Hive")
|
||||
|
||||
return name
|
||||
|
||||
|
||||
//Traitors and traitor silicons will get these. Revs will not.
|
||||
GLOBAL_VAR(syndicate_code_phrase) //Code phrase for traitors.
|
||||
GLOBAL_VAR(syndicate_code_response) //Code response for traitors.
|
||||
|
||||
/*
|
||||
Should be expanded.
|
||||
How this works:
|
||||
Instead of "I'm looking for James Smith," the traitor would say "James Smith" as part of a conversation.
|
||||
Another traitor may then respond with: "They enjoy running through the void-filled vacuum of the derelict."
|
||||
The phrase should then have the words: James Smith.
|
||||
The response should then have the words: run, void, and derelict.
|
||||
This way assures that the code is suited to the conversation and is unpredicatable.
|
||||
Obviously, some people will be better at this than others but in theory, everyone should be able to do it and it only enhances roleplay.
|
||||
Can probably be done through "{ }" but I don't really see the practical benefit.
|
||||
One example of an earlier system is commented below.
|
||||
/N
|
||||
*/
|
||||
|
||||
/proc/generate_code_phrase(return_list=FALSE)//Proc is used for phrase and response in master_controller.dm
|
||||
|
||||
if(!return_list)
|
||||
. = ""
|
||||
else
|
||||
. = list()
|
||||
|
||||
var/words = pick(//How many words there will be. Minimum of two. 2, 4 and 5 have a lesser chance of being selected. 3 is the most likely.
|
||||
50; 2,
|
||||
200; 3,
|
||||
50; 4,
|
||||
25; 5
|
||||
)
|
||||
|
||||
var/list/safety = list(1,2,3)//Tells the proc which options to remove later on.
|
||||
var/nouns = strings(ION_FILE, "ionabstract")
|
||||
var/objects = strings(ION_FILE, "ionobjects")
|
||||
var/adjectives = strings(ION_FILE, "ionadjectives")
|
||||
var/threats = strings(ION_FILE, "ionthreats")
|
||||
var/foods = strings(ION_FILE, "ionfood")
|
||||
var/drinks = strings(ION_FILE, "iondrinks")
|
||||
var/list/locations = GLOB.teleportlocs.len ? GLOB.teleportlocs : drinks //if null, defaults to drinks instead.
|
||||
|
||||
var/list/names = list()
|
||||
for(var/datum/data/record/t in GLOB.data_core.general)//Picks from crew manifest.
|
||||
names += t.fields["name"]
|
||||
|
||||
var/maxwords = words//Extra var to check for duplicates.
|
||||
|
||||
for(words,words>0,words--)//Randomly picks from one of the choices below.
|
||||
|
||||
if(words==1&&(1 in safety)&&(2 in safety))//If there is only one word remaining and choice 1 or 2 have not been selected.
|
||||
safety = list(pick(1,2))//Select choice 1 or 2.
|
||||
else if(words==1&&maxwords==2)//Else if there is only one word remaining (and there were two originally), and 1 or 2 were chosen,
|
||||
safety = list(3)//Default to list 3
|
||||
|
||||
switch(pick(safety))//Chance based on the safety list.
|
||||
if(1)//1 and 2 can only be selected once each to prevent more than two specific names/places/etc.
|
||||
switch(rand(1,2))//Mainly to add more options later.
|
||||
if(1)
|
||||
if(names.len&&prob(70))
|
||||
. += pick(names)
|
||||
else
|
||||
if(prob(10))
|
||||
. += pick(lizard_name(MALE),lizard_name(FEMALE))
|
||||
else
|
||||
var/new_name = pick(pick(GLOB.first_names_male,GLOB.first_names_female))
|
||||
new_name += " "
|
||||
new_name += pick(GLOB.last_names)
|
||||
. += new_name
|
||||
if(2)
|
||||
. += pick(get_all_jobs())//Returns a job.
|
||||
safety -= 1
|
||||
if(2)
|
||||
switch(rand(1,3))//Food, drinks, or things. Only selectable once.
|
||||
if(1)
|
||||
. += lowertext(pick(drinks))
|
||||
if(2)
|
||||
. += lowertext(pick(foods))
|
||||
if(3)
|
||||
. += lowertext(pick(locations))
|
||||
safety -= 2
|
||||
if(3)
|
||||
switch(rand(1,4))//Abstract nouns, objects, adjectives, threats. Can be selected more than once.
|
||||
if(1)
|
||||
. += lowertext(pick(nouns))
|
||||
if(2)
|
||||
. += lowertext(pick(objects))
|
||||
if(3)
|
||||
. += lowertext(pick(adjectives))
|
||||
if(4)
|
||||
. += lowertext(pick(threats))
|
||||
if(!return_list)
|
||||
if(words==1)
|
||||
. += "."
|
||||
else
|
||||
. += ", "
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/proc/priority_announce(text, title = "", sound = 'sound/ai/attention.ogg', type)
|
||||
/proc/priority_announce(text, title = "", sound = 'sound/ai/attention.ogg', type , sender_override)
|
||||
if(!text)
|
||||
return
|
||||
|
||||
@@ -13,13 +13,18 @@
|
||||
GLOB.news_network.SubmitArticle(text, "Captain's Announcement", "Station Announcements", null)
|
||||
|
||||
else
|
||||
announcement += "<h1 class='alert'>[command_name()] Update</h1>"
|
||||
if(!sender_override)
|
||||
announcement += "<h1 class='alert'>[command_name()] Update</h1>"
|
||||
else
|
||||
announcement += "<h1 class='alert'>[sender_override]</h1>"
|
||||
if (title && length(title) > 0)
|
||||
announcement += "<br><h2 class='alert'>[html_encode(title)]</h2>"
|
||||
if(title == "")
|
||||
GLOB.news_network.SubmitArticle(text, "Central Command Update", "Station Announcements", null)
|
||||
else
|
||||
GLOB.news_network.SubmitArticle(title + "<br><br>" + text, "Central Command", "Station Announcements", null)
|
||||
|
||||
if(!sender_override)
|
||||
if(title == "")
|
||||
GLOB.news_network.SubmitArticle(text, "Central Command Update", "Station Announcements", null)
|
||||
else
|
||||
GLOB.news_network.SubmitArticle(title + "<br><br>" + text, "Central Command", "Station Announcements", null)
|
||||
|
||||
announcement += "<br><span class='alert'>[html_encode(text)]</span><br>"
|
||||
announcement += "<br>"
|
||||
@@ -38,14 +43,11 @@
|
||||
if(announce)
|
||||
priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", 'sound/ai/commandreport.ogg')
|
||||
|
||||
for(var/obj/machinery/computer/communications/C in GLOB.machines)
|
||||
if(!(C.stat & (BROKEN|NOPOWER)) && (C.z in GLOB.station_z_levels))
|
||||
var/obj/item/paper/P = new /obj/item/paper(C.loc)
|
||||
P.name = "paper - '[title]'"
|
||||
P.info = text
|
||||
C.messagetitle.Add("[title]")
|
||||
C.messagetext.Add(text)
|
||||
P.update_icon()
|
||||
var/datum/comm_message/M = new
|
||||
M.title = title
|
||||
M.content = text
|
||||
|
||||
SScommunications.send_message(M)
|
||||
|
||||
/proc/minor_announce(message, title = "Attention:", alert)
|
||||
if(!message)
|
||||
@@ -53,7 +55,7 @@
|
||||
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!isnewplayer(M) && M.can_hear())
|
||||
to_chat(M, "<b><font size = 3><font color = red>[title]</font color><BR>[message]</font size></b><BR>")
|
||||
to_chat(M, "<span class='big bold'><font color = red>[title]</font color><BR>[message]</span><BR>")
|
||||
if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS)
|
||||
if(alert)
|
||||
SEND_SOUND(M, sound('sound/misc/notice1.ogg'))
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
/datum/proc/p_s(temp_gender) //is this a descriptive proc name, or what?
|
||||
. = "s"
|
||||
|
||||
/datum/proc/p_es(temp_gender)
|
||||
. = "es"
|
||||
|
||||
//like clients, which do have gender.
|
||||
/client/p_they(capitalized, temp_gender)
|
||||
if(!temp_gender)
|
||||
@@ -107,6 +110,12 @@
|
||||
if(temp_gender != PLURAL && temp_gender != NEUTER)
|
||||
. = "s"
|
||||
|
||||
/client/p_es(temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
if(temp_gender != PLURAL && temp_gender != NEUTER)
|
||||
. = "es"
|
||||
|
||||
//mobs(and atoms but atoms don't really matter write your own proc overrides) also have gender!
|
||||
/mob/p_they(capitalized, temp_gender)
|
||||
if(!temp_gender)
|
||||
@@ -184,59 +193,72 @@
|
||||
if(temp_gender != PLURAL)
|
||||
. = "s"
|
||||
|
||||
/mob/p_es(temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
if(temp_gender != PLURAL)
|
||||
. = "es"
|
||||
|
||||
//humans need special handling, because they can have their gender hidden
|
||||
/mob/living/carbon/human/p_they(capitalized, temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_their(capitalized, temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_them(capitalized, temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_have(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_are(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_were(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_do(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_s(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_es(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
// A special GetAllContents that doesn't search past things with rad insulation
|
||||
// The protection var only protects the things inside from being affected.
|
||||
// The protecting object itself will get returned still.
|
||||
// The ignore list makes those objects never return at all
|
||||
/proc/get_rad_contents(atom/location)
|
||||
var/list/processing_list = list(location)
|
||||
. = list()
|
||||
while(processing_list.len)
|
||||
var/static/list/ignored_things = typecacheof(list(
|
||||
/mob/dead,
|
||||
/mob/camera,
|
||||
/obj/effect,
|
||||
/obj/docking_port,
|
||||
/atom/movable/lighting_object,
|
||||
/obj/item/projectile
|
||||
))
|
||||
var/atom/thing = processing_list[1]
|
||||
processing_list -= thing
|
||||
if(ignored_things[thing.type])
|
||||
continue
|
||||
. += thing
|
||||
var/datum/component/rad_insulation/insulation = thing.GetComponent(/datum/component/rad_insulation)
|
||||
if(insulation && insulation.protects)
|
||||
continue
|
||||
processing_list += thing.contents
|
||||
|
||||
/proc/radiation_pulse(atom/source, intensity, range_modifier, log=FALSE, can_contaminate=TRUE)
|
||||
if(!SSradiation.can_fire)
|
||||
return
|
||||
for(var/dir in GLOB.cardinals)
|
||||
new /datum/radiation_wave(source, dir, intensity, range_modifier, can_contaminate)
|
||||
|
||||
var/list/things = get_rad_contents(source) //copypasta because I don't want to put special code in waves to handle their origin
|
||||
for(var/k in 1 to things.len)
|
||||
var/atom/thing = things[k]
|
||||
if(!thing)
|
||||
continue
|
||||
thing.rad_act(intensity)
|
||||
|
||||
var/static/last_huge_pulse = 0
|
||||
if(intensity > 3000 && world.time > last_huge_pulse + 200)
|
||||
last_huge_pulse = world.time
|
||||
log = TRUE
|
||||
if(log)
|
||||
var/turf/_source_T = isturf(source) ? source : get_turf(source)
|
||||
log_game("Radiation pulse with intensity: [intensity] and range modifier: [range_modifier] in [AREACOORD(_source_T)] ")
|
||||
return TRUE
|
||||
+14
-14
@@ -1,14 +1,14 @@
|
||||
// Ensure the frequency is within bounds of what it should be sending/recieving at
|
||||
/proc/sanitize_frequency(frequency, free = FALSE)
|
||||
. = round(frequency)
|
||||
if(free)
|
||||
. = Clamp(frequency, MIN_FREE_FREQ, MAX_FREE_FREQ)
|
||||
else
|
||||
. = Clamp(frequency, MIN_FREQ, MAX_FREQ)
|
||||
if(!(. % 2)) // Ensure the last digit is an odd number
|
||||
. += 1
|
||||
|
||||
// Format frequency by moving the decimal.
|
||||
/proc/format_frequency(frequency)
|
||||
frequency = text2num(frequency)
|
||||
return "[round(frequency / 10)].[frequency % 10]"
|
||||
// Ensure the frequency is within bounds of what it should be sending/recieving at
|
||||
/proc/sanitize_frequency(frequency, free = FALSE)
|
||||
. = round(frequency)
|
||||
if(free)
|
||||
. = CLAMP(frequency, MIN_FREE_FREQ, MAX_FREE_FREQ)
|
||||
else
|
||||
. = CLAMP(frequency, MIN_FREQ, MAX_FREQ)
|
||||
if(!(. % 2)) // Ensure the last digit is an odd number
|
||||
. += 1
|
||||
|
||||
// Format frequency by moving the decimal.
|
||||
/proc/format_frequency(frequency)
|
||||
frequency = text2num(frequency)
|
||||
return "[round(frequency / 10)].[frequency % 10]"
|
||||
|
||||
@@ -0,0 +1,544 @@
|
||||
#define POPCOUNT_SURVIVORS "survivors" //Not dead at roundend
|
||||
#define POPCOUNT_ESCAPEES "escapees" //Not dead and on centcom/shuttles marked as escaped
|
||||
#define POPCOUNT_SHUTTLE_ESCAPEES "shuttle_escapees" //Emergency shuttle only.
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/gather_roundend_feedback()
|
||||
gather_antag_data()
|
||||
record_nuke_disk_location()
|
||||
var/json_file = file("[GLOB.log_directory]/round_end_data.json")
|
||||
var/list/file_data = list("escapees" = list("humans" = list(), "silicons" = list(), "others" = list(), "npcs" = list()), "abandoned" = list("humans" = list(), "silicons" = list(), "others" = list(), "npcs" = list()), "ghosts" = list(), "additional data" = list())
|
||||
var/num_survivors = 0
|
||||
var/num_escapees = 0
|
||||
var/num_shuttle_escapees = 0
|
||||
var/list/area/shuttle_areas
|
||||
if(SSshuttle && SSshuttle.emergency)
|
||||
shuttle_areas = SSshuttle.emergency.shuttle_areas
|
||||
for(var/mob/m in GLOB.mob_list)
|
||||
var/escaped
|
||||
var/category
|
||||
var/list/mob_data = list()
|
||||
if(isnewplayer(m))
|
||||
continue
|
||||
if(m.mind)
|
||||
if(m.stat != DEAD && !isbrain(m) && !iscameramob(m))
|
||||
num_survivors++
|
||||
mob_data += list("name" = m.name, "ckey" = ckey(m.mind.key))
|
||||
if(isobserver(m))
|
||||
escaped = "ghosts"
|
||||
else if(isliving(m))
|
||||
var/mob/living/L = m
|
||||
mob_data += list("location" = get_area(L), "health" = L.health)
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
category = "humans"
|
||||
mob_data += list("job" = H.mind.assigned_role, "species" = H.dna.species.name)
|
||||
else if(issilicon(L))
|
||||
category = "silicons"
|
||||
if(isAI(L))
|
||||
mob_data += list("module" = "AI")
|
||||
if(isAI(L))
|
||||
mob_data += list("module" = "pAI")
|
||||
if(iscyborg(L))
|
||||
var/mob/living/silicon/robot/R = L
|
||||
mob_data += list("module" = R.module)
|
||||
else
|
||||
category = "others"
|
||||
mob_data += list("typepath" = m.type)
|
||||
if(!escaped)
|
||||
if(EMERGENCY_ESCAPED_OR_ENDGAMED && (m.onCentCom() || m.onSyndieBase()))
|
||||
escaped = "escapees"
|
||||
num_escapees++
|
||||
if(shuttle_areas[get_area(m)])
|
||||
num_shuttle_escapees++
|
||||
else
|
||||
escaped = "abandoned"
|
||||
if(!m.mind && (!ishuman(m) || !issilicon(m)))
|
||||
var/list/npc_nest = file_data["[escaped]"]["npcs"]
|
||||
if(npc_nest.Find(initial(m.name)))
|
||||
file_data["[escaped]"]["npcs"]["[initial(m.name)]"] += 1
|
||||
else
|
||||
file_data["[escaped]"]["npcs"]["[initial(m.name)]"] = 1
|
||||
else
|
||||
if(isobserver(m))
|
||||
var/pos = length(file_data["[escaped]"]) + 1
|
||||
file_data["[escaped]"]["[pos]"] = mob_data
|
||||
else
|
||||
if(!category)
|
||||
category = "others"
|
||||
mob_data += list("name" = m.name, "typepath" = m.type)
|
||||
var/pos = length(file_data["[escaped]"]["[category]"]) + 1
|
||||
file_data["[escaped]"]["[category]"]["[pos]"] = mob_data
|
||||
var/datum/station_state/end_state = new /datum/station_state()
|
||||
end_state.count()
|
||||
var/station_integrity = min(PERCENT(GLOB.start_state.score(end_state)), 100)
|
||||
file_data["additional data"]["station integrity"] = station_integrity
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
SSblackbox.record_feedback("nested tally", "round_end_stats", num_survivors, list("survivors", "total"))
|
||||
SSblackbox.record_feedback("nested tally", "round_end_stats", num_escapees, list("escapees", "total"))
|
||||
SSblackbox.record_feedback("nested tally", "round_end_stats", GLOB.joined_player_list.len, list("players", "total"))
|
||||
SSblackbox.record_feedback("nested tally", "round_end_stats", GLOB.joined_player_list.len - num_survivors, list("players", "dead"))
|
||||
. = list()
|
||||
.[POPCOUNT_SURVIVORS] = num_survivors
|
||||
.[POPCOUNT_ESCAPEES] = num_escapees
|
||||
.[POPCOUNT_SHUTTLE_ESCAPEES] = num_shuttle_escapees
|
||||
.["station_integrity"] = station_integrity
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/gather_antag_data()
|
||||
var/team_gid = 1
|
||||
var/list/team_ids = list()
|
||||
|
||||
for(var/datum/antagonist/A in GLOB.antagonists)
|
||||
if(!A.owner)
|
||||
continue
|
||||
|
||||
var/list/antag_info = list()
|
||||
antag_info["key"] = A.owner.key
|
||||
antag_info["name"] = A.owner.name
|
||||
antag_info["antagonist_type"] = A.type
|
||||
antag_info["antagonist_name"] = A.name //For auto and custom roles
|
||||
antag_info["objectives"] = list()
|
||||
antag_info["team"] = list()
|
||||
var/datum/team/T = A.get_team()
|
||||
if(T)
|
||||
antag_info["team"]["type"] = T.type
|
||||
antag_info["team"]["name"] = T.name
|
||||
if(!team_ids[T])
|
||||
team_ids[T] = team_gid++
|
||||
antag_info["team"]["id"] = team_ids[T]
|
||||
|
||||
if(A.objectives.len)
|
||||
for(var/datum/objective/O in A.objectives)
|
||||
var/result = O.check_completion() ? "SUCCESS" : "FAIL"
|
||||
antag_info["objectives"] += list(list("objective_type"=O.type,"text"=O.explanation_text,"result"=result))
|
||||
SSblackbox.record_feedback("associative", "antagonists", 1, antag_info)
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/record_nuke_disk_location()
|
||||
var/obj/item/disk/nuclear/N = locate() in GLOB.poi_list
|
||||
if(N)
|
||||
var/list/data = list()
|
||||
var/turf/T = get_turf(N)
|
||||
if(T)
|
||||
data["x"] = T.x
|
||||
data["y"] = T.y
|
||||
data["z"] = T.z
|
||||
var/atom/outer = get_atom_on_turf(N,/mob/living)
|
||||
if(outer != N)
|
||||
if(isliving(outer))
|
||||
var/mob/living/L = outer
|
||||
data["holder"] = L.real_name
|
||||
else
|
||||
data["holder"] = outer.name
|
||||
|
||||
SSblackbox.record_feedback("associative", "roundend_nukedisk", 1 , data)
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/gather_newscaster()
|
||||
var/json_file = file("[GLOB.log_directory]/newscaster.json")
|
||||
var/list/file_data = list()
|
||||
var/pos = 1
|
||||
for(var/V in GLOB.news_network.network_channels)
|
||||
var/datum/newscaster/feed_channel/channel = V
|
||||
if(!istype(channel))
|
||||
stack_trace("Non-channel in newscaster channel list")
|
||||
continue
|
||||
file_data["[pos]"] = list("channel name" = "[channel.channel_name]", "author" = "[channel.author]", "censored" = channel.censored ? 1 : 0, "author censored" = channel.authorCensor ? 1 : 0, "messages" = list())
|
||||
for(var/M in channel.messages)
|
||||
var/datum/newscaster/feed_message/message = M
|
||||
if(!istype(message))
|
||||
stack_trace("Non-message in newscaster channel messages list")
|
||||
continue
|
||||
var/list/comment_data = list()
|
||||
for(var/C in message.comments)
|
||||
var/datum/newscaster/feed_comment/comment = C
|
||||
if(!istype(comment))
|
||||
stack_trace("Non-message in newscaster message comments list")
|
||||
continue
|
||||
comment_data += list(list("author" = "[comment.author]", "time stamp" = "[comment.time_stamp]", "body" = "[comment.body]"))
|
||||
file_data["[pos]"]["messages"] += list(list("author" = "[message.author]", "time stamp" = "[message.time_stamp]", "censored" = message.bodyCensor ? 1 : 0, "author censored" = message.authorCensor ? 1 : 0, "photo file" = "[message.photo_file]", "photo caption" = "[message.caption]", "body" = "[message.body]", "comments" = comment_data))
|
||||
pos++
|
||||
if(GLOB.news_network.wanted_issue.active)
|
||||
file_data["wanted"] = list("author" = "[GLOB.news_network.wanted_issue.scannedUser]", "criminal" = "[GLOB.news_network.wanted_issue.criminal]", "description" = "[GLOB.news_network.wanted_issue.body]", "photo file" = "[GLOB.news_network.wanted_issue.photo_file]")
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/declare_completion()
|
||||
set waitfor = FALSE
|
||||
|
||||
to_chat(world, "<BR><BR><BR><span class='big bold'>The round has ended.</span>")
|
||||
if(LAZYLEN(GLOB.round_end_notifiees))
|
||||
send2irc("Notice", "[GLOB.round_end_notifiees.Join(", ")] the round has ended.")
|
||||
|
||||
for(var/I in round_end_events)
|
||||
var/datum/callback/cb = I
|
||||
cb.InvokeAsync()
|
||||
LAZYCLEARLIST(round_end_events)
|
||||
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(!C.credits)
|
||||
C.RollCredits()
|
||||
C.playtitlemusic(40)
|
||||
|
||||
var/popcount = gather_roundend_feedback()
|
||||
display_report(popcount)
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
// Add AntagHUD to everyone, see who was really evil the whole time!
|
||||
for(var/datum/atom_hud/antag/H in GLOB.huds)
|
||||
for(var/m in GLOB.player_list)
|
||||
var/mob/M = m
|
||||
H.add_hud_to(M)
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
//Set news report and mode result
|
||||
mode.set_round_result()
|
||||
|
||||
send2irc("Server", "Round just ended.")
|
||||
|
||||
if(length(CONFIG_GET(keyed_string_list/cross_server)))
|
||||
send_news_report()
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
//These need update to actually reflect the real antagonists
|
||||
//Print a list of antagonists to the server log
|
||||
var/list/total_antagonists = list()
|
||||
//Look into all mobs in world, dead or alive
|
||||
for(var/datum/mind/Mind in minds)
|
||||
var/temprole = Mind.special_role
|
||||
if(temprole) //if they are an antagonist of some sort.
|
||||
if(temprole in total_antagonists) //If the role exists already, add the name to it
|
||||
total_antagonists[temprole] += ", [Mind.name]([Mind.key])"
|
||||
else
|
||||
total_antagonists.Add(temprole) //If the role doesnt exist in the list, create it and add the mob
|
||||
total_antagonists[temprole] += ": [Mind.name]([Mind.key])"
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
//Now print them all into the log!
|
||||
log_game("Antagonists at round end were...")
|
||||
for(var/i in total_antagonists)
|
||||
log_game("[i]s[total_antagonists[i]].")
|
||||
|
||||
CHECK_TICK
|
||||
SSdbcore.SetRoundEnd()
|
||||
//Collects persistence features
|
||||
if(mode.allow_persistence_save)
|
||||
SSpersistence.CollectData()
|
||||
|
||||
//stop collecting feedback during grifftime
|
||||
SSblackbox.Seal()
|
||||
|
||||
sleep(50)
|
||||
ready_for_reboot = TRUE
|
||||
standard_reboot()
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/standard_reboot()
|
||||
if(ready_for_reboot)
|
||||
if(mode.station_was_nuked)
|
||||
Reboot("Station destroyed by Nuclear Device.", "nuke")
|
||||
else
|
||||
Reboot("Round ended.", "proper completion")
|
||||
else
|
||||
CRASH("Attempted standard reboot without ticker roundend completion")
|
||||
|
||||
//Common part of the report
|
||||
/datum/controller/subsystem/ticker/proc/build_roundend_report()
|
||||
var/list/parts = list()
|
||||
|
||||
//Gamemode specific things. Should be empty most of the time.
|
||||
parts += mode.special_report()
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
//AI laws
|
||||
parts += law_report()
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
//Antagonists
|
||||
parts += antag_report()
|
||||
|
||||
CHECK_TICK
|
||||
//Medals
|
||||
parts += medal_report()
|
||||
//Station Goals
|
||||
parts += goal_report()
|
||||
|
||||
listclearnulls(parts)
|
||||
|
||||
return parts.Join()
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/survivor_report(popcount)
|
||||
var/list/parts = list()
|
||||
var/station_evacuated = EMERGENCY_ESCAPED_OR_ENDGAMED
|
||||
|
||||
parts += "[GLOB.TAB]Shift Duration: <B>[DisplayTimeText(world.time - SSticker.round_start_time)]</B>"
|
||||
parts += "[GLOB.TAB]Station Integrity: <B>[mode.station_was_nuked ? "<span class='redtext'>Destroyed</span>" : "[popcount["station_integrity"]]%"]</B>"
|
||||
var/total_players = GLOB.joined_player_list.len
|
||||
if(total_players)
|
||||
parts+= "[GLOB.TAB]Total Population: <B>[total_players]</B>"
|
||||
if(station_evacuated)
|
||||
parts += "<BR>[GLOB.TAB]Evacuation Rate: <B>[popcount[POPCOUNT_ESCAPEES]] ([PERCENT(popcount[POPCOUNT_ESCAPEES]/total_players)]%)</B>"
|
||||
parts += "[GLOB.TAB](on emergency shuttle): <B>[popcount[POPCOUNT_SHUTTLE_ESCAPEES]] ([PERCENT(popcount[POPCOUNT_SHUTTLE_ESCAPEES]/total_players)]%)</B>"
|
||||
parts += "[GLOB.TAB]Survival Rate: <B>[popcount[POPCOUNT_SURVIVORS]] ([PERCENT(popcount[POPCOUNT_SURVIVORS]/total_players)]%)</B>"
|
||||
if(SSblackbox.first_death)
|
||||
var/list/ded = SSblackbox.first_death
|
||||
if(ded.len)
|
||||
parts += "[GLOB.TAB]First Death: <b>[ded["name"]], [ded["role"]], at [ded["area"]]. Damage taken: [ded["damage"]].[ded["last_words"] ? " Their last words were: \"[ded["last_words"]]\"" : ""]</b>"
|
||||
//ignore this comment, it fixes the broken sytax parsing caused by the " above
|
||||
else
|
||||
parts += "[GLOB.TAB]<i>Nobody died this shift!</i>"
|
||||
return parts.Join("<br>")
|
||||
|
||||
/client/proc/roundend_report_file()
|
||||
return "data/roundend_reports/[ckey].html"
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/show_roundend_report(client/C, previous = FALSE)
|
||||
var/datum/browser/roundend_report = new(C, "roundend")
|
||||
roundend_report.width = 800
|
||||
roundend_report.height = 600
|
||||
var/content
|
||||
var/filename = C.roundend_report_file()
|
||||
if(!previous)
|
||||
var/list/report_parts = list(personal_report(C), GLOB.common_report)
|
||||
content = report_parts.Join()
|
||||
C.verbs -= /client/proc/show_previous_roundend_report
|
||||
fdel(filename)
|
||||
text2file(content, filename)
|
||||
else
|
||||
content = file2text(filename)
|
||||
roundend_report.set_content(content)
|
||||
roundend_report.stylesheets = list()
|
||||
roundend_report.add_stylesheet("roundend", 'html/browser/roundend.css')
|
||||
roundend_report.open(0)
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/personal_report(client/C, popcount)
|
||||
var/list/parts = list()
|
||||
var/mob/M = C.mob
|
||||
if(M.mind && !isnewplayer(M))
|
||||
if(M.stat != DEAD && !isbrain(M))
|
||||
if(EMERGENCY_ESCAPED_OR_ENDGAMED)
|
||||
if(!M.onCentCom() && !M.onSyndieBase())
|
||||
parts += "<div class='panel stationborder'>"
|
||||
parts += "<span class='marooned'>You managed to survive, but were marooned on [station_name()]...</span>"
|
||||
else
|
||||
parts += "<div class='panel greenborder'>"
|
||||
parts += "<span class='greentext'>You managed to survive the events on [station_name()] as [M.real_name].</span>"
|
||||
else
|
||||
parts += "<div class='panel greenborder'>"
|
||||
parts += "<span class='greentext'>You managed to survive the events on [station_name()] as [M.real_name].</span>"
|
||||
|
||||
else
|
||||
parts += "<div class='panel redborder'>"
|
||||
parts += "<span class='redtext'>You did not survive the events on [station_name()]...</span>"
|
||||
else
|
||||
parts += "<div class='panel stationborder'>"
|
||||
parts += "<br>"
|
||||
parts += GLOB.survivor_report
|
||||
parts += "</div>"
|
||||
|
||||
return parts.Join()
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/display_report(popcount)
|
||||
GLOB.common_report = build_roundend_report()
|
||||
GLOB.survivor_report = survivor_report(popcount)
|
||||
for(var/client/C in GLOB.clients)
|
||||
show_roundend_report(C, FALSE)
|
||||
give_show_report_button(C)
|
||||
CHECK_TICK
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/law_report()
|
||||
var/list/parts = list()
|
||||
var/borg_spacer = FALSE //inserts an extra linebreak to seperate AIs from independent borgs, and then multiple independent borgs.
|
||||
//Silicon laws report
|
||||
for (var/i in GLOB.ai_list)
|
||||
var/mob/living/silicon/ai/aiPlayer = i
|
||||
if(aiPlayer.mind)
|
||||
parts += "<b>[aiPlayer.name]</b> (Played by: <b>[aiPlayer.mind.key]</b>)'s laws [aiPlayer.stat != DEAD ? "at the end of the round" : "when it was <span class='redtext'>deactivated</span>"] were:"
|
||||
parts += aiPlayer.laws.get_law_list(include_zeroth=TRUE)
|
||||
|
||||
parts += "<b>Total law changes: [aiPlayer.law_change_counter]</b>"
|
||||
|
||||
if (aiPlayer.connected_robots.len)
|
||||
var/borg_num = aiPlayer.connected_robots.len
|
||||
var/robolist = "<br><b>[aiPlayer.real_name]</b>'s minions were: "
|
||||
for(var/mob/living/silicon/robot/robo in aiPlayer.connected_robots)
|
||||
borg_num--
|
||||
if(robo.mind)
|
||||
robolist += "<b>[robo.name]</b> (Played by: <b>[robo.mind.key]</b>)[robo.stat == DEAD ? " <span class='redtext'>(Deactivated)</span>" : ""][borg_num ?", ":""]<br>"
|
||||
parts += "[robolist]"
|
||||
if(!borg_spacer)
|
||||
borg_spacer = TRUE
|
||||
|
||||
for (var/mob/living/silicon/robot/robo in GLOB.silicon_mobs)
|
||||
if (!robo.connected_ai && robo.mind)
|
||||
parts += "[borg_spacer?"<br>":""]<b>[robo.name]</b> (Played by: <b>[robo.mind.key]</b>) [(robo.stat != DEAD)? "<span class='greentext'>survived</span> as an AI-less borg!" : "was <span class='redtext'>unable to survive</span> the rigors of being a cyborg without an AI."] Its laws were:"
|
||||
|
||||
if(robo) //How the hell do we lose robo between here and the world messages directly above this?
|
||||
parts += robo.laws.get_law_list(include_zeroth=TRUE)
|
||||
|
||||
if(!borg_spacer)
|
||||
borg_spacer = TRUE
|
||||
|
||||
if(parts.len)
|
||||
return "<div class='panel stationborder'>[parts.Join("<br>")]</div>"
|
||||
else
|
||||
return ""
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/goal_report()
|
||||
var/list/parts = list()
|
||||
if(mode.station_goals.len)
|
||||
for(var/V in mode.station_goals)
|
||||
var/datum/station_goal/G = V
|
||||
parts += G.get_result()
|
||||
return "<div class='panel stationborder'><ul>[parts.Join()]</ul></div>"
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/medal_report()
|
||||
if(GLOB.commendations.len)
|
||||
var/list/parts = list()
|
||||
parts += "<span class='header'>Medal Commendations:</span>"
|
||||
for (var/com in GLOB.commendations)
|
||||
parts += com
|
||||
return "<div class='panel stationborder'>[parts.Join("<br>")]</div>"
|
||||
return ""
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/antag_report()
|
||||
var/list/result = list()
|
||||
var/list/all_teams = list()
|
||||
var/list/all_antagonists = list()
|
||||
|
||||
for(var/datum/antagonist/A in GLOB.antagonists)
|
||||
if(!A.owner)
|
||||
continue
|
||||
all_teams |= A.get_team()
|
||||
all_antagonists += A
|
||||
|
||||
for(var/datum/team/T in all_teams)
|
||||
result += T.roundend_report()
|
||||
for(var/datum/antagonist/X in all_antagonists)
|
||||
if(X.get_team() == T)
|
||||
all_antagonists -= X
|
||||
result += " "//newline between teams
|
||||
CHECK_TICK
|
||||
|
||||
var/currrent_category
|
||||
var/datum/antagonist/previous_category
|
||||
|
||||
sortTim(all_antagonists, /proc/cmp_antag_category)
|
||||
|
||||
for(var/datum/antagonist/A in all_antagonists)
|
||||
if(!A.show_in_roundend)
|
||||
continue
|
||||
if(A.roundend_category != currrent_category)
|
||||
if(previous_category)
|
||||
result += previous_category.roundend_report_footer()
|
||||
result += "</div>"
|
||||
result += "<div class='panel redborder'>"
|
||||
result += A.roundend_report_header()
|
||||
currrent_category = A.roundend_category
|
||||
previous_category = A
|
||||
result += A.roundend_report()
|
||||
result += "<br><br>"
|
||||
CHECK_TICK
|
||||
|
||||
if(all_antagonists.len)
|
||||
var/datum/antagonist/last = all_antagonists[all_antagonists.len]
|
||||
result += last.roundend_report_footer()
|
||||
result += "</div>"
|
||||
|
||||
return result.Join()
|
||||
|
||||
/proc/cmp_antag_category(datum/antagonist/A,datum/antagonist/B)
|
||||
return sorttext(B.roundend_category,A.roundend_category)
|
||||
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/give_show_report_button(client/C)
|
||||
var/datum/action/report/R = new
|
||||
C.player_details.player_actions += R
|
||||
R.Grant(C.mob)
|
||||
to_chat(C,"<a href='?src=[REF(R)];report=1'>Show roundend report again</a>")
|
||||
|
||||
/datum/action/report
|
||||
name = "Show roundend report"
|
||||
button_icon_state = "round_end"
|
||||
|
||||
/datum/action/report/Trigger()
|
||||
if(owner && GLOB.common_report && SSticker.current_state == GAME_STATE_FINISHED)
|
||||
SSticker.show_roundend_report(owner.client, FALSE)
|
||||
|
||||
/datum/action/report/IsAvailable()
|
||||
return 1
|
||||
|
||||
/datum/action/report/Topic(href,href_list)
|
||||
if(usr != owner)
|
||||
return
|
||||
if(href_list["report"])
|
||||
Trigger()
|
||||
return
|
||||
|
||||
|
||||
/proc/printplayer(datum/mind/ply, fleecheck)
|
||||
var/jobtext = ""
|
||||
if(ply.assigned_role)
|
||||
jobtext = " the <b>[ply.assigned_role]</b>"
|
||||
var/text = "<b>[ply.key]</b> was <b>[ply.name]</b>[jobtext] and"
|
||||
if(ply.current)
|
||||
if(ply.current.stat == DEAD)
|
||||
text += " <span class='redtext'>died</span>"
|
||||
else
|
||||
text += " <span class='greentext'>survived</span>"
|
||||
if(fleecheck)
|
||||
var/turf/T = get_turf(ply.current)
|
||||
if(!T || !is_station_level(T.z))
|
||||
text += " while <span class='redtext'>fleeing the station</span>"
|
||||
if(ply.current.real_name != ply.name)
|
||||
text += " as <b>[ply.current.real_name]</b>"
|
||||
else
|
||||
text += " <span class='redtext'>had their body destroyed</span>"
|
||||
return text
|
||||
|
||||
/proc/printplayerlist(list/players,fleecheck)
|
||||
var/list/parts = list()
|
||||
|
||||
parts += "<ul class='playerlist'>"
|
||||
for(var/datum/mind/M in players)
|
||||
parts += "<li>[printplayer(M,fleecheck)]</li>"
|
||||
parts += "</ul>"
|
||||
return parts.Join()
|
||||
|
||||
|
||||
/proc/printobjectives(datum/mind/ply)
|
||||
var/list/objective_parts = list()
|
||||
var/count = 1
|
||||
for(var/datum/objective/objective in ply.objectives)
|
||||
if(objective.check_completion())
|
||||
objective_parts += "<b>Objective #[count]</b>: [objective.explanation_text] <span class='greentext'>Success!</span>"
|
||||
else
|
||||
objective_parts += "<b>Objective #[count]</b>: [objective.explanation_text] <span class='redtext'>Fail.</span>"
|
||||
count++
|
||||
return objective_parts.Join("<br>")
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/save_admin_data()
|
||||
if(CONFIG_GET(flag/admin_legacy_system)) //we're already using legacy system so there's nothing to save
|
||||
return
|
||||
else if(load_admins(TRUE)) //returns true if there was a database failure and the backup was loaded from
|
||||
return
|
||||
var/datum/DBQuery/query_admin_rank_update = SSdbcore.NewQuery("UPDATE [format_table_name("player")] p INNER JOIN [format_table_name("admin")] a ON p.ckey = a.ckey SET p.lastadminrank = a.rank")
|
||||
query_admin_rank_update.Execute()
|
||||
//json format backup file generation stored per server
|
||||
var/json_file = file("data/admins_backup.json")
|
||||
var/list/file_data = list("ranks" = list(), "admins" = list())
|
||||
for(var/datum/admin_rank/R in GLOB.admin_ranks)
|
||||
file_data["ranks"]["[R.name]"] = list()
|
||||
file_data["ranks"]["[R.name]"]["include rights"] = R.include_rights
|
||||
file_data["ranks"]["[R.name]"]["exclude rights"] = R.exclude_rights
|
||||
file_data["ranks"]["[R.name]"]["can edit rights"] = R.can_edit_rights
|
||||
for(var/i in GLOB.admin_datums+GLOB.deadmins)
|
||||
var/datum/admins/A = GLOB.admin_datums[i]
|
||||
if(!A)
|
||||
A = GLOB.deadmins[i]
|
||||
if (!A)
|
||||
continue
|
||||
file_data["admins"]["[i]"] = A.rank.name
|
||||
fdel(json_file)
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
@@ -8,9 +8,12 @@
|
||||
if(toIndex <= 0)
|
||||
toIndex += L.len + 1
|
||||
|
||||
GLOB.sortInstance.L = L
|
||||
GLOB.sortInstance.cmp = cmp
|
||||
GLOB.sortInstance.associative = associative
|
||||
var/datum/sortInstance/SI = GLOB.sortInstance
|
||||
if(!SI)
|
||||
SI = new
|
||||
SI.L = L
|
||||
SI.cmp = cmp
|
||||
SI.associative = associative
|
||||
|
||||
GLOB.sortInstance.binarySort(fromIndex, toIndex, fromIndex)
|
||||
SI.binarySort(fromIndex, toIndex, fromIndex)
|
||||
return L
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user