Merge branch 'master' into upstream-merge-29523

This commit is contained in:
LetterJay
2017-08-14 08:30:40 -05:00
committed by GitHub
735 changed files with 67775 additions and 63573 deletions
+19 -5
View File
@@ -10,12 +10,13 @@
var/check_flags = 0
var/processing = FALSE
var/obj/screen/movable/action_button/button = null
var/button_icon = 'icons/mob/actions.dmi'
var/background_icon_state = ACTION_BUTTON_DEFAULT_BACKGROUND
var/buttontooltipstyle = ""
var/icon_icon = 'icons/mob/actions.dmi'
var/button_icon_state = "default"
var/button_icon = 'icons/mob/actions/backgrounds.dmi' //This is the file for the BACKGROUND icon
var/background_icon_state = ACTION_BUTTON_DEFAULT_BACKGROUND //And this is the state for the background icon
var/icon_icon = 'icons/mob/actions.dmi' //This is the file for the ACTION icon
var/button_icon_state = "default" //And this is the state for the action icon
var/mob/owner
/datum/action/New(Target)
@@ -168,6 +169,10 @@
/datum/action/item_action/toggle_firemode
name = "Toggle Firemode"
/datum/action/item_action/rcl
name = "Change Cable Color"
button_icon_state = "rcl_rainbow"
/datum/action/item_action/startchainsaw
name = "Pull The Starting Cord"
@@ -221,6 +226,7 @@
/datum/action/item_action/toggle_unfriendly_fire
name = "Toggle Friendly Fire \[ON\]"
desc = "Toggles if the club's blasts cause friendly fire."
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "vortex_ff_on"
/datum/action/item_action/toggle_unfriendly_fire/Trigger()
@@ -254,6 +260,7 @@
/datum/action/item_action/vortex_recall
name = "Vortex Recall"
desc = "Recall yourself, and anyone nearby, to an attuned hierophant beacon at any time.<br>If the beacon is still attached, will detach it."
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "vortex_recall"
/datum/action/item_action/vortex_recall/IsAvailable()
@@ -264,6 +271,7 @@
return ..()
/datum/action/item_action/clock
icon_icon = 'icons/mob/actions/actions_clockcult.dmi'
background_icon_state = "bg_clock"
buttontooltipstyle = "clockcult"
@@ -363,6 +371,7 @@
/datum/action/item_action/toggle_research_scanner
name = "Toggle Research Scanner"
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "scan_mode"
var/active = FALSE
@@ -399,6 +408,7 @@
/datum/action/item_action/ninjajaunt
name = "Phase Jaunt (10E)"
desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "ninja_phase"
/datum/action/item_action/ninjasmoke
@@ -407,6 +417,7 @@
button_icon_state = "smoke"
/datum/action/item_action/ninjaboost
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_CONSCIOUS
name = "Adrenaline Boost"
desc = "Inject a secret chemical that will counteract all movement-impairing effect."
button_icon_state = "repulse"
@@ -437,6 +448,7 @@
/datum/action/item_action/ninja_stealth
name = "Toggle Stealth"
desc = "Toggles stealth mode on and off."
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "ninja_cloak"
/datum/action/item_action/toggle_glove
@@ -478,7 +490,7 @@
var/obj/effect/proc_holder/spell/S = target
S.action = src
name = S.name
button_icon = S.action_icon
icon_icon = S.action_icon
button_icon_state = S.action_icon_state
background_icon_state = S.action_background_icon_state
button.name = name
@@ -553,12 +565,14 @@
/datum/action/item_action/stickmen
name = "Summon Stick Minions"
desc = "Allows you to summon faithful stickmen allies to aide you in battle."
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
button_icon_state = "art_summon"
//surf_ss13
/datum/action/item_action/bhop
name = "Activate Jump Boots"
desc = "Activates the jump boot's internal propulsion system, allowing the user to dash over 4-wide gaps."
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "jetboot"
/datum/action/language_menu
+9 -6
View File
@@ -23,6 +23,7 @@
/datum/antagonist/traitor/human
should_specialise = FALSE
var/should_equip = TRUE
/datum/antagonist/traitor/human/custom
silent = TRUE
should_give_codewords = FALSE
@@ -31,6 +32,7 @@
/datum/antagonist/traitor/AI
should_specialise = FALSE
/datum/antagonist/traitor/AI/custom
silent = TRUE
should_give_codewords = FALSE
@@ -38,9 +40,8 @@
/datum/antagonist/traitor/on_body_transfer(mob/living/old_body, mob/living/new_body)
if(issilicon(new_body) && issilicon(old_body))
..()
else
// human <-> silicon only
if(old_body && issilicon(new_body) ^ issilicon(old_body))
silent = TRUE
owner.add_antag_datum(base_datum_custom)
for(var/datum/antagonist/traitor/new_datum in owner.antag_datums)
@@ -49,13 +50,14 @@
transfer_important_variables(new_datum)
break
on_removal()
else
..()
/datum/antagonist/traitor/human/custom //used to give custom objectives
silent = TRUE
give_objectives = FALSE
should_give_codewords = FALSE
/datum/antagonist/traitor/AI/custom //used to give custom objectives
silent = TRUE
give_objectives = FALSE
@@ -83,7 +85,8 @@
if(owner.assigned_role == "Clown")
var/mob/living/carbon/human/traitor_mob = owner.current
if(traitor_mob&&istype(traitor_mob))
if(!silent) to_chat(traitor_mob, "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself.")
if(!silent)
to_chat(traitor_mob, "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself.")
traitor_mob.dna.remove_mutation(CLOWNMUT)
/datum/antagonist/traitor/remove_innate_effects()
+54
View File
@@ -100,3 +100,57 @@
if (object == GLOBAL_PROC)
return call(delegate)(arglist(calling_arguments))
return call(object, delegate)(arglist(calling_arguments))
/datum/callback_select
var/list/finished
var/pendingcount
var/total
/datum/callback_select/New(count, savereturns)
total = count
if (savereturns)
finished = new(count)
/datum/callback_select/proc/invoke_callback(index, datum/callback/callback, list/callback_args, savereturn = TRUE)
set waitfor = FALSE
if (!callback || !istype(callback))
//This check only exists because the alternative is callback_select would block forever if given invalid data
CRASH("invalid callback passed to invoke_callback")
if (!length(callback_args))
callback_args = list()
pendingcount++
var/rtn = callback.Invoke(arglist(callback_args))
pendingcount--
if (savereturn)
finished[index] = rtn
//runs a list of callbacks asynchronously, returning once all of them return.
//callbacks can be repeated.
//callbacks-args is a optional list of argument lists, in the same order as the callbacks,
// the inner lists will be sent to the callbacks when invoked() as additional args.
//can optionly save and return a list of return values, in the same order as the original list of callbacks
//resolution is the number of byond ticks between checks.
/proc/callback_select(list/callbacks, list/callback_args, savereturns = TRUE, resolution = 1)
if (!callbacks)
return
var/count = length(callbacks)
if (!count)
return
if (!callback_args)
callback_args = list()
callback_args.len = count
var/datum/callback_select/CS = new(count, savereturns)
for (var/i in 1 to count)
CS.invoke_callback(i, callbacks[i], callback_args[i], savereturns)
while(CS.pendingcount)
sleep(resolution*world.tick_lag)
return CS.finished
+99
View File
@@ -0,0 +1,99 @@
# Datum Component System (DCS)
## Concept
Loosely adapted from /vg/. This is an entity component system for adding behaviours to datums when inheritance doesn't quite cut it. By using signals and events instead of direct inheritance, you can inject behaviours without hacky overloads. It requires a different method of thinking, but is not hard to use correctly. If a behaviour can have application across more than one thing. Make it generic, make it a component. Atom/mob/obj event? Give it a signal, and forward it's arguments with a `SendSignal()` call. Now every component that want's to can also know about this happening.
### In the code
#### Slippery things
At the time of this writing, every object that is slippery overrides atom/Crossed does some checks, then slips the mob. Instead of all those Crossed overrides they could add a slippery component to all these objects. And have the checks in one proc that is run by the Crossed event
#### Powercells
A lot of objects have powercells. The `get_cell()` proc was added to give generic access to the cell var if it had one. This is just a specific use case of `GetComponent()`
#### Radios
The radio object as it is should not exist, given that more things use the _concept_ of radios rather than the object itself. The actual function of the radio can exist in a component which all the things that use it (Request consoles, actual radios, the SM shard) can add to themselves.
#### Standos
Stands have a lot of procs which mimic mob procs. Rather than inserting hooks for all these procs in overrides, the same can be accomplished with signals
## API
### Vars
1. `/datum/var/list/datum_components` (private)
* Lazy list of all components a datum has (TODO: Make this a typecache with longer paths overwriting shorter ones maybe? It'd be weird)
1. `/datum/component/var/enabled` (protected, boolean)
* If the component is enabled. If not, it will not react to signals
* TRUE by default
1. `/datum/component/var/dupe_mode` (protected, enum)
* How multiple components of the exact same type are handled when added to the datum.
* `COMPONENT_DUPE_HIGHLANDER` (default): Old component will be deleted, new component will first have `/datum/component/proc/InheritComponent(datum/component/old, FALSE)` on it
* `COMPONENT_DUPE_ALLOWED`: The components will be treated as seperate, `GetComponent()` will return the first added
* `COMPONENT_DUPE_UNIQUE`: New component will be deleted, old component will first have `/datum/component/proc/InheritComponent(datum/component/new, TRUE)` on it
1. `/datum/component/var/list/signal_procs` (private)
* Associated lazy list of signals -> callbacks that will be run when the parent datum recieves that signal
1. `/datum/component/var/datum/parent` (protected, read-only)
* The datum this component belongs to
### Procs
1. `/datum/proc/GetComponent(component_type(type)) -> datum/component?` (public, final)
* Returns a reference to a component of component_type if it exists in the datum, null otherwise
1. `/datum/proc/GetComponents(component_type(type)) -> list` (public, final)
* Returns a list of references to all components of component_type that exist in the datum
1. `/datum/proc/GetExactComponent(component_type(type)) -> datum/component?` (public, final)
* Returns a reference to a component whose type MATCHES component_type if that component exists in the datum, null otherwise
1. `GET_COMPONENT(varname, component_type)` OR `GET_COMPONENT_FROM(varname, component_type, src)`
* Shorthand for `var/component_type/varname = src.GetComponent(component_type)`
1. `/datum/proc/AddComponent(component_type(type), ...) -> datum/component` (public, final)
* Creates an instance of `component_type` in the datum and passes `...` to it's `New()` call
* Sends the `COMSIG_COMPONENT_ADDED` signal to the datum
* All components a datum owns are deleted with the datum
* Returns the component that was created. Or the old component in a dupe situation where `COMPONENT_DUPE_UNIQUE` was set
1. `/datum/proc/ComponentActivated(datum/component/C)` (abstract)
* Called on a component's `parent` after a signal recieved causes it to activate. `src` is the parameter
* Will only be called if a component's callback returns `TRUE`
1. `/datum/proc/TakeComponent(datum/component/C)` (public, final)
* Properly transfers ownership of a component from one datum to another
* Singals `COMSIG_COMPONENT_REMOVING` on the parent
* Called on the datum you want to own the component with another datum's component
1. `/datum/proc/SendSignal(signal, ...)` (public, final)
* Call to send a signal to the components of the target datum
* Extra arguments are to be specified in the signal definition
1. `/datum/component/New(datum/parent, ...)` (protected, virtual)
* Forwarded the arguments from `AddComponent()`
1. `/datum/component/Destroy()` (virtual)
* Sends the `COMSIG_COMPONENT_REMOVING` signal to the parent datum if the `parent` isn't being qdeleted
* Properly removes the component from `parent` and cleans up references
1. `/datum/component/proc/InheritComponent(datum/component/C, i_am_original(boolean))` (abstract)
* Called on a component when a component of the same type was added to the same parent
* See `/datum/component/var/dupe_mode`
* `C`'s type will always be the same of the called component
1. `/datum/component/proc/OnTransfer(datum/new_parent)` (abstract)
* Called before the new `parent` is assigned in `TakeComponent()`, after the remove signal, before the added signal
* Allows the component to react to ownership transfers
1. `/datum/component/proc/_RemoveNoSignal()` (private, final)
* Internal, clears the parent var and removes the component from the parents component list
1. `/datum/component/proc/RegisterSignal(signal(string), proc_ref(type), override(boolean))` (protected, final) (Consider removing for performance gainz)
* Makes a component listen for the specified `signal` on it's `parent` datum.
* When that signal is recieved `proc_ref` will be called on the component, along with associated arguments
* Example proc ref: `.proc/OnEvent`
* If a previous registration is overwritten by the call, a runtime occurs. Setting `override` to TRUE prevents this
* These callbacks run asyncronously
* Returning `TRUE` from these callbacks will trigger a `TRUE` return from the `SendSignal()` that initiated it
1. `/datum/component/proc/ReceiveSignal(signal, ...)` (virtual)
* Called when a component recieves any signal and is enabled
* Default implementation looks if the signal is registered and runs the appropriate proc
### See signals and their arguments in __DEFINES\components.dm
## Examples
Material Containers: #29268 (Too many GetComponent calls, but not bad)
Slips: #00000 (PR DIS)
Powercells: (TODO)
+216 -15
View File
@@ -26,7 +26,7 @@
//set up the typecache
var/our_type = type
for(var/I in _GetInverseTypeListExceptRoot(our_type))
for(var/I in _GetInverseTypeList(our_type))
var/test = dc[I]
if(test) //already another component of this type here
var/list/components_of_type
@@ -66,7 +66,7 @@
if(P)
var/list/dc = P.datum_components
var/our_type = type
for(var/I in _GetInverseTypeListExceptRoot(our_type))
for(var/I in _GetInverseTypeList(our_type))
var/list/components_of_type = dc[I]
if(islist(components_of_type)) //
var/list/subtracted = components_of_type - src
@@ -110,25 +110,226 @@
/datum/component/proc/OnTransfer(datum/new_parent)
return
/datum/component/proc/_GetInverseTypeListExceptRoot(our_type_cached)
var/datum/component/current_type = our_type_cached
. = list()
while (current_type != /datum/component)
. += current_type
current_type = type2parent(current_type)
/datum/component/proc/AfterComponentActivated()
return
/datum/var/list/datum_components //special typecache of /datum/component
/datum/component/proc/_GetInverseTypeList(current_type)
. = list(current_type)
while (current_type != /datum/component)
current_type = type2parent(current_type)
. += current_type
/datum/proc/SendSignal(sigtype, ...)
var/list/comps = datum_components
. = FALSE
for(var/I in comps)
var/datum/component/C = I
if(!C.enabled)
continue
if(C.ReceiveSignal(arglist(args)))
if(!comps)
return
var/target = comps[/datum/component]
if(!islist(target))
var/datum/component/C = target
if(C.enabled && C.ReceiveSignal(arglist(args)))
ComponentActivated(C)
. = TRUE
C.AfterComponentActivated()
return TRUE
else
for(var/I in target)
var/datum/component/C = I
if(!C.enabled)
continue
if(C.ReceiveSignal(arglist(args)))
ComponentActivated(C)
. = TRUE
/datum/proc/ComponentActivated(datum/component/C)
return
/datum/proc/GetComponent(c_type)
var/list/dc = datum_components
if(!dc)
return null
. = dc[c_type]
if(islist(.))
return .[1]
/datum/proc/GetExactComponent(c_type)
var/list/dc = datum_components
if(!dc)
return null
var/datum/component/C = dc[c_type]
if(C)
if(islist(C))
C = C[1]
if(C.type == c_type)
return C
return null
/datum/proc/GetComponents(c_type)
var/list/dc = datum_components
if(!dc)
return null
. = dc[c_type]
if(!islist(.))
return list(.)
/datum/proc/AddComponent(new_type, ...)
var/nt = new_type
args[1] = src
var/datum/component/C = new nt(arglist(args))
return QDELING(C) ? GetComponent(new_type) : C
/datum/proc/TakeComponent(datum/component/C)
if(!C)
return
var/datum/helicopter = C.parent
if(helicopter == src)
//wat
return
C._RemoveNoSignal()
helicopter.SendSignal(COMSIG_COMPONENT_REMOVING, C)
C.OnTransfer(src)
C.parent = src
SendSignal(COMSIG_COMPONENT_ADDED, C)
/datum/component
var/enabled = TRUE
var/dupe_mode = COMPONENT_DUPE_HIGHLANDER
var/list/signal_procs
var/datum/parent
/datum/component/New(datum/P, ...)
var/dm = dupe_mode
if(dm != COMPONENT_DUPE_ALLOWED)
var/datum/component/old = P.GetExactComponent(type)
if(old)
switch(dm)
if(COMPONENT_DUPE_HIGHLANDER)
InheritComponent(old, FALSE)
qdel(old)
if(COMPONENT_DUPE_UNIQUE)
old.InheritComponent(src, TRUE)
qdel(src)
return
P.SendSignal(COMSIG_COMPONENT_ADDED, src)
//lazy init the parent's dc list
var/list/dc = P.datum_components
if(!dc)
P.datum_components = dc = list()
//set up the typecache
var/our_type = type
for(var/I in _GetInverseTypeList(our_type))
var/test = dc[I]
if(test) //already another component of this type here
var/list/components_of_type
if(!islist(test))
components_of_type = list(test)
dc[I] = components_of_type
else
components_of_type = test
if(I == our_type) //exact match, take priority
var/inserted = FALSE
for(var/J in 1 to components_of_type.len)
var/datum/component/C = components_of_type[J]
if(C.type != our_type) //but not over other exact matches
components_of_type.Insert(J, I)
inserted = TRUE
break
if(!inserted)
components_of_type += src
else //indirect match, back of the line with ya
components_of_type += src
else //only component of this type, no list
dc[I] = src
parent = P
/datum/component/Destroy()
enabled = FALSE
var/datum/P = parent
if(P)
_RemoveNoSignal()
P.SendSignal(COMSIG_COMPONENT_REMOVING, src)
LAZYCLEARLIST(signal_procs)
return ..()
/datum/component/proc/_RemoveNoSignal()
var/datum/P = parent
if(P)
var/list/dc = P.datum_components
var/our_type = type
for(var/I in _GetInverseTypeList(our_type))
var/list/components_of_type = dc[I]
if(islist(components_of_type)) //
var/list/subtracted = components_of_type - src
if(subtracted.len == 1) //only 1 guy left
dc[I] = subtracted[1] //make him special
else
dc[I] = subtracted
else //just us
dc -= I
if(!dc.len)
P.datum_components = null
parent = null
/datum/component/proc/RegisterSignal(sig_type, proc_on_self, override = FALSE)
if(QDELETED(src))
return
var/list/procs = signal_procs
if(!procs)
procs = list()
signal_procs = procs
if(!override)
. = procs[sig_type]
if(.)
stack_trace("[sig_type] overridden. Use override = TRUE to suppress this warning")
procs[sig_type] = CALLBACK(src, proc_on_self)
/datum/component/proc/ReceiveSignal(sigtype, ...)
var/list/sps = signal_procs
var/datum/callback/CB = LAZYACCESS(sps, sigtype)
if(!CB)
return FALSE
var/list/arguments = args.Copy()
arguments.Cut(1, 2)
return CB.InvokeAsync(arglist(arguments))
/datum/component/proc/InheritComponent(datum/component/C, i_am_original)
return
/datum/component/proc/OnTransfer(datum/new_parent)
return
/datum/component/proc/AfterComponentActivated()
return
/datum/component/proc/_GetInverseTypeList(current_type)
. = list(current_type)
while (current_type != /datum/component)
current_type = type2parent(current_type)
. += current_type
/datum/proc/SendSignal(sigtype, ...)
var/list/comps = datum_components
. = FALSE
if(!comps)
return
var/target = comps[/datum/component]
if(!islist(target))
var/datum/component/C = target
if(C.enabled && C.ReceiveSignal(arglist(args)))
ComponentActivated(C)
C.AfterComponentActivated()
return TRUE
else
for(var/I in target)
var/datum/component/C = I
if(!C.enabled)
continue
if(C.ReceiveSignal(arglist(args)))
ComponentActivated(C)
. = TRUE
/datum/proc/ComponentActivated(datum/component/C)
return
+31
View File
@@ -0,0 +1,31 @@
/datum
var/gc_destroyed //Time when this object was destroyed.
var/list/active_timers //for SStimer
var/list/datum_components //for /datum/components
var/ui_screen = "home" //for tgui
#ifdef TESTING
var/running_find_references
var/last_find_references = 0
#endif
// Default implementation of clean-up code.
// This should be overridden to remove all references pointing to the object being destroyed.
// Return the appropriate QDEL_HINT; in most cases this is QDEL_HINT_QUEUE.
/datum/proc/Destroy(force=FALSE)
tag = null
var/list/timers = active_timers
active_timers = null
for(var/thing in timers)
var/datum/timedevent/timer = thing
if (timer.spent)
continue
qdel(timer)
var/list/dc = datum_components
for(var/I in dc)
var/datum/component/C = I
C._RemoveNoSignal()
qdel(C)
if(dc)
dc.Cut()
return QDEL_HINT_QUEUE
+1 -1
View File
@@ -21,7 +21,7 @@
return debug_variable(var_name, vars[var_name], 0, src)
//please call . = ..() first and append to the result, that way parent items are always at the top and child items are further down
//add seperaters by doing . += "---"
//add separaters by doing . += "---"
/datum/proc/vv_get_dropdown()
. = list()
. += "---"
@@ -1,134 +0,0 @@
diff a/code/datums/diseases/advance/symptoms/sensory.dm b/code/datums/diseases/advance/symptoms/sensory.dm (rejected hunks)
@@ -23,106 +23,43 @@ Bonus
transmittable = -3
level = 5
severity = 0
+ symptom_delay_min = 5
+ symptom_delay_max = 10
+ var/purge_alcohol = FALSE
+ var/brain_heal = FALSE
-/datum/symptom/sensory_restoration/Activate(var/datum/disease/advance/A)
+/datum/symptom/sensory_restoration/Start(datum/disease/advance/A)
..()
+ if(A.properties["resistance"] >= 6) //heal brain damage
+ brain_heal = TRUE
+ if(A.properties["transmittable"] >= 8) //purge alcohol
+ purge_alcohol = TRUE
+
+/datum/symptom/sensory_restoration/Activate(var/datum/disease/advance/A)
+ if(!..())
+ return
var/mob/living/M = A.affected_mob
if(A.stage >= 2)
M.restoreEars()
if(A.stage >= 3)
- M.dizziness = 0
- M.drowsyness = 0
- M.slurring = 0
- M.confused = 0
- M.reagents.remove_all_type(/datum/reagent/consumable/ethanol, 3)
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- H.drunkenness = max(H.drunkenness - 10, 0)
+ M.dizziness = max(0, M.dizziness - 2)
+ M.drowsyness = max(0, M.drowsyness - 2)
+ M.slurring = max(0, M.slurring - 2)
+ M.confused = max(0, M.confused - 2)
+ if(purge_alcohol)
+ M.reagents.remove_all_type(/datum/reagent/consumable/ethanol, 3)
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ H.drunkenness = max(H.drunkenness - 5, 0)
if(A.stage >= 4)
- M.drowsyness = max(M.drowsyness-5, 0)
+ M.drowsyness = max(0, M.drowsyness - 2)
if(M.reagents.has_reagent("mindbreaker"))
M.reagents.remove_reagent("mindbreaker", 5)
if(M.reagents.has_reagent("histamine"))
M.reagents.remove_reagent("histamine", 5)
M.hallucination = max(0, M.hallucination - 10)
- if(A.stage >= 5)
- M.adjustBrainLoss(-3)
-
-/*
-//////////////////////////////////////
-Sensory-Destruction
- noticable.
- Lowers resistance
- Decreases stage speed tremendously.
- Decreases transmittablity tremendously.
- the drugs hit them so hard they have to focus on not dying
-
-Bonus
- The body generates Sensory destructive chemicals.
- You cannot taste anything anymore.
- ethanol for extremely drunk victim
- mindbreaker to break the mind
- impedrezene to ruin the brain
-
-//////////////////////////////////////
-*/
-/datum/symptom/sensory_destruction
- name = "Sensory destruction"
- stealth = -1
- resistance = -2
- stage_speed = -3
- transmittable = -4
- level = 6
- severity = 5
- var/sleepy = 0
- var/sleepy_ticks = 0
-
-/datum/symptom/sensory_destruction/Activate(var/datum/disease/advance/A)
- ..()
- var/mob/living/M = A.affected_mob
- if(prob(SYMPTOM_ACTIVATION_PROB))
- switch(A.stage)
- if(1)
- to_chat(M, "<span class='warning'>You can't feel anything.</span>")
- if(2)
- to_chat(M, "<span class='warning'>You feel absolutely hammered.</span>")
- if(prob(10))
- sleepy_ticks += rand(10,14)
- if(3)
- M.reagents.add_reagent("ethanol",rand(5,7))
- to_chat(M, "<span class='warning'>You try to focus on not dying.</span>")
- if(prob(15))
- sleepy_ticks += rand(10,14)
- if(4)
- M.reagents.add_reagent("ethanol",rand(6,10))
- to_chat(M, "<span class='warning'>u can count 2 potato!</span>")
- if(prob(20))
- sleepy_ticks += rand(10,14)
- if(5)
- M.reagents.add_reagent("ethanol",rand(7,13))
- if(prob(25))
- sleepy_ticks += rand(10,14)
-
- if(sleepy_ticks)
- if(A.stage>=4)
- M.hallucination = min(M.hallucination + 10, 50)
- if(A.stage>=5)
- if(prob(80))
- M.adjustBrainLoss(1)
- if(prob(50))
- M.drowsyness = max(M.drowsyness, 3)
- sleepy++
- sleepy_ticks--
- else
- sleepy = 0
-
- switch(sleepy) //Works like morphine
- if(11)
- to_chat(M, "<span class='warning'>You start to feel tired...</span>")
- if(12 to 24)
- M.drowsyness += 1
- if(24 to INFINITY)
- M.Sleeping(2, 0)
+ if(brain_heal && A.stage >= 5)
+ M.adjustBrainLoss(-3)
\ No newline at end of file
@@ -1,19 +0,0 @@
diff a/code/datums/diseases/advance/symptoms/vision.dm b/code/datums/diseases/advance/symptoms/vision.dm (rejected hunks)
@@ -40,7 +40,7 @@ Bonus
if(!..())
return
var/mob/living/carbon/M = A.affected_mob
- var/obj/item/organ/eyes = M.getorganslot("eye_sight")
+ var/obj/item/organ/eyes/eyes = M.getorganslot("eye_sight")
if(istype(eyes))
switch(A.stage)
if(1, 2)
@@ -55,7 +55,7 @@ Bonus
M.adjust_eye_damage(5)
if(eyes.eye_damage >= 10)
M.become_nearsighted()
- if(prob(M.eye_damage - 10 + 1))
+ if(prob(eyes.eye_damage - 10 + 1))
if(!remove_eyes)
if(M.become_blind())
to_chat(M, "<span class='userdanger'>You go blind!</span>")
@@ -1,30 +0,0 @@
diff a/code/datums/diseases/advance/symptoms/vomit.dm b/code/datums/diseases/advance/symptoms/vomit.dm (rejected hunks)
@@ -32,7 +32,7 @@ Bonus
symptom_delay_min = 25
symptom_delay_max = 80
var/vomit_blood = FALSE
- var/proj_vomit = FALSE
+ var/proj_vomit = 0
/datum/symptom/vomit/Start(datum/disease/advance/A)
..()
@@ -41,7 +41,7 @@ Bonus
if(A.properties["resistance"] >= 7) //blood vomit
vomit_blood = TRUE
if(A.properties["transmittable"] >= 7) //projectile vomit
- proj_vomit = TRUE
+ proj_vomit = 5
/datum/symptom/vomit/Activate(datum/disease/advance/A)
if(!..())
@@ -52,7 +52,7 @@ Bonus
if(prob(base_message_chance) && !suppress_warning)
to_chat(M, "<span class='warning'>[pick("You feel nauseous.", "You feel like you're going to throw up!")]</span>")
else
- Vomit(M)
+ vomit(M)
-/datum/symptom/vomit/proc/Vomit(mob/living/carbon/M)
- M.vomit(20, vomit_blood, distance = 5 * proj_vomit)
+/datum/symptom/vomit/proc/vomit(mob/living/carbon/M)
+ M.vomit(20, vomit_blood, distance = proj_vomit)
+7
View File
@@ -29,6 +29,10 @@
destination.dna.temporary_mutations = temporary_mutations.Copy()
if(transfer_SE)
destination.dna.struc_enzymes = struc_enzymes
if(ishuman(destination))
var/mob/living/carbon/human/H = destination
H.give_genitals(TRUE)//This gives the body the genitals of this DNA. Used for any transformations based on DNA
destination.flavor_text = destination.dna.features["flavor_text"] //Update the flavor_text to use new dna text
/datum/dna/proc/copy_dna(datum/dna/new_dna)
new_dna.unique_enzymes = unique_enzymes
@@ -228,6 +232,7 @@
if(newfeatures)
dna.features = newfeatures
flavor_text = dna.features["flavor_text"] //Update the flavor_text to use new dna text
if(mrace)
set_species(mrace, icon_update=0)
@@ -247,6 +252,8 @@
dna.struc_enzymes = se
domutcheck()
give_genitals(TRUE)//Give all genitalia that DNA says you should have, remove any pre-existing ones as this is a hardset!
if(mrace || newfeatures || ui)
update_body()
update_hair()
+2 -2
View File
@@ -68,7 +68,7 @@ GLOBAL_LIST_EMPTY(explosions)
//I would make this not ex_act the thing that triggered the explosion,
//but everything that explodes gives us their loc or a get_turf()
//and somethings expect us to ex_act them so they can qdel()
stoplag() //tldr, let the calling proc call qdel(src) before we explode
sleep(1) //tldr, let the calling proc call qdel(src) before we explode
EX_PREPROCESS_EXIT_CHECK
@@ -275,7 +275,7 @@ GLOBAL_LIST_EMPTY(explosions)
. = list()
var/processed = 0
while(!stopped && running)
while(running)
var/I
for(I in (processed + 1) to affected_turfs.len) // we cache the explosion block rating of every turf in the explosion area
var/turf/T = affected_turfs[I]
+4 -2
View File
@@ -73,12 +73,14 @@
return ""
. = header ? "The following pull requests are currently test merged:<br>" : ""
for(var/line in testmerge)
var/details
var/details
if(world.RunningService())
var/cm = testmerge[line]["commit"]
details = ": '" + html_encode(testmerge[line]["title"]) + "' by " + html_encode(testmerge[line]["author"]) + " at commit " + html_encode(copytext(cm, 1, min(length(cm), 7)))
else if(has_pr_details) //tgs2 support
details = ": '" + html_encode(testmerge[line]["title"]) + "' by " + html_encode(testmerge[line]["user"]["login"])
if(details && findtext(details, "\[s\]") && (!usr || !usr.client.holder))
continue
. += "<a href=\"[config.githuburl]/pull/[line]\">#[line][details]</a><br>"
/client/verb/showrevinfo()
@@ -96,7 +98,7 @@
to_chat(src, "[prefix]<a href=\"[config.githuburl]/commit/[pc]\">[copytext(pc, 1, min(length(pc), 7))]</a>")
else
to_chat(src, "Revision unknown")
to_chat(src, "<b>Current Infomational Settings:</b>")
to_chat(src, "<b>Current Informational Settings:</b>")
to_chat(src, "Protect Authority Roles From Traitor: [config.protect_roles_from_antagonist]")
to_chat(src, "Protect Assistant Role From Traitor: [config.protect_assistant_from_antagonist]")
to_chat(src, "Enforce Human Authority: [config.enforce_human_authority]")
+8 -7
View File
@@ -38,7 +38,7 @@
calling_pad.say("Connection failure.")
qdel(src)
return
testing("Holocall started")
//cleans up ALL references :)
@@ -49,16 +49,16 @@
if(user_good)
user.reset_perspective()
user.remote_control = null
if(!QDELETED(eye))
if(user_good && user.client)
for(var/datum/camerachunk/chunk in eye.visibleCameraChunks)
chunk.remove(eye)
qdel(eye)
eye = null
user = null
if(hologram)
hologram.HC = null
hologram = null
@@ -75,7 +75,7 @@
if(connected_holopad)
connected_holopad.SetLightsAndPower()
connected_holopad = null
testing("Holocall destroyed")
return ..()
@@ -123,7 +123,7 @@
if(I == H)
continue
Disconnect(I)
for(var/I in H.holo_calls)
var/datum/holocall/HC = I
if(HC != src)
@@ -155,7 +155,7 @@
var/obj/machinery/holopad/H = I
if(!H.is_operational())
ConnectionFailure(H)
if(QDELETED(src))
return FALSE
@@ -174,6 +174,7 @@
/datum/action/innate/end_holocall
name = "End Holocall"
icon_icon = 'icons/mob/actions/actions_silicon.dmi'
button_icon_state = "camera_off"
var/datum/holocall/hcall
+3 -3
View File
@@ -11,7 +11,7 @@
var/minetype = "lavaland"
var/list/transition_config = list(CENTCOMM = SELFLOOPING,
var/list/transition_config = list(CENTCOM = SELFLOOPING,
MAIN_STATION = CROSSLINKED,
EMPTY_AREA_1 = CROSSLINKED,
EMPTY_AREA_2 = CROSSLINKED,
@@ -115,8 +115,8 @@
return UNAFFECTED
if("MAIN_STATION")
return MAIN_STATION
if("CENTCOMM")
return CENTCOMM
if("CENTCOM")
return CENTCOM
if("MINING")
return MINING
if("EMPTY_AREA_1")
+3
View File
@@ -6,6 +6,7 @@
/datum/action/neck_chop
name = "Neck Chop - Injures the neck, stopping the victim from speaking for a while."
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "neckchop"
/datum/action/neck_chop/Trigger()
@@ -22,6 +23,7 @@
/datum/action/leg_sweep
name = "Leg Sweep - Trips the victim, knocking them down for a brief moment."
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "legsweep"
/datum/action/leg_sweep/Trigger()
@@ -38,6 +40,7 @@
/datum/action/lung_punch//referred to internally as 'quick choke'
name = "Lung Punch - Delivers a strong punch just above the victim's abdomen, constraining the lungs. The victim will be unable to breathe for a short time."
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "lungpunch"
/datum/action/lung_punch/Trigger()
+2
View File
@@ -186,6 +186,8 @@
attack_verb = list("smashed", "slammed", "whacked", "thwacked")
icon = 'icons/obj/weapons.dmi'
icon_state = "bostaff0"
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
block_chance = 50
/obj/item/weapon/twohanded/bostaff/update_icon()
+5 -4
View File
@@ -120,6 +120,10 @@
transfer_martial_arts(new_character)
if(active || force_key_move)
new_character.key = key //now transfer the key to link the client to our new body
if(isliving(new_character)) //New humans and such are by default enabled arousal. Let's always use the new mind's prefs.
var/mob/living/L = new_character
L.canbearoused = L.client.prefs.arousable //Technically this should make taking over a character mean the body gain the new minds setting...
L.update_arousal_hud() //Removes the old icon
/datum/mind/proc/store_memory(new_text)
memory += "[new_text]<BR>"
@@ -1690,10 +1694,7 @@
else
mind = new /datum/mind(key)
if(SSticker)
SSticker.minds += mind
else
stack_trace("mind_initialize(): No SSticker ready")
SSticker.minds += mind
if(!mind.name)
mind.name = real_name
mind.current = src
+1 -1
View File
@@ -82,7 +82,7 @@
id = "derelict4"
suffix = "derelict4.dmm"
name = "Derelict 4"
description = "Centcom ferries have never crashed, will never crash, there is no current investigation into a crashed ferry, and we will not let Internal Affairs trample over high security \
description = "CentCom ferries have never crashed, will never crash, there is no current investigation into a crashed ferry, and we will not let Internal Affairs trample over high security \
information in the name of this baseless witchhunt."
/datum/map_template/ruin/space/derelict5
+5 -5
View File
@@ -133,7 +133,7 @@
/datum/map_template/shuttle/emergency/cramped
suffix = "cramped"
name = "Secure Transport Vessel 5 (STV5)"
description = "Well, looks like Centcomm only had this ship in the area, they probably weren't expecting you to need evac for a while. \
description = "Well, looks like CentCom only had this ship in the area, they probably weren't expecting you to need evac for a while. \
Probably best if you don't rifle around in whatever equipment they were transporting. I hope you're friendly with your coworkers, because there is very little space in this thing.\n\
\n\
Contains contraband armory guns, maintenance loot, and abandoned crates!"
@@ -181,7 +181,7 @@
suffix = "supermatter"
name = "Hyperfractal Gigashuttle"
description = "\"I dunno, this seems kinda needlessly complicated.\"\n\
\"This shuttle has very a very high safety record, according to Centcom Officer Cadet Yins.\"\n\
\"This shuttle has very a very high safety record, according to CentCom Officer Cadet Yins.\"\n\
\"Are you sure?\"\n\
\"Yes, it has a safety record of N-A-N, which is apparently larger than 100%.\""
admin_notes = "Supermatter that spawns on shuttle is special anchored 'hugbox' supermatter that cannot take damage and does not take in or emit gas. \
@@ -215,7 +215,7 @@
/datum/map_template/shuttle/ferry/base
suffix = "base"
name = "transport ferry"
description = "Standard issue Box/Metastation Centcom ferry."
description = "Standard issue Box/Metastation CentCom ferry."
/datum/map_template/shuttle/ferry/meat
suffix = "meat"
@@ -267,7 +267,7 @@
/datum/map_template/shuttle/emergency/raven
suffix = "raven"
name = "Centcomm Raven Battlecruiser"
description = "The Centcomm Raven Battlecruiser is currently docked at the Centcomm ship bay awaiting a mission, this Battlecruiser has been reassigned as an emergency escape shuttle for currently unknown reasons. The Centcomm Raven Battlecruiser should comfortably fit a medium to large crew size crew and is complete with all required facitlities including a top of the range Centcomm Medical Bay."
name = "CentCom Raven Battlecruiser"
description = "The CentCom Raven Battlecruiser is currently docked at the CentCom ship bay awaiting a mission, this Battlecruiser has been reassigned as an emergency escape shuttle for currently unknown reasons. The CentCom Raven Battlecruiser should comfortably fit a medium to large crew size crew and is complete with all required facitlities including a top of the range CentCom Medical Bay."
admin_notes = "The long way home"
credit_cost = 12500
+8 -8
View File
@@ -21,7 +21,7 @@
var/list/status = list()
status += "The law sync module is [R.lawupdate ? "on" : "off"]."
status += "The intelligence link display shows [R.connected_ai ? R.connected_ai.name : "NULL"]."
status += "The camera light is [!isnull(R.camera) && R.camera.status ? "on" : "off"]."
status += "The camera light is [!isnull(R.builtInCamera) && R.builtInCamera.status ? "on" : "off"]."
status += "The lockdown indicator is [R.lockcharge ? "on" : "off"]."
status += "The reset module hardware light is [R.has_module() ? "on" : "off"]."
return status
@@ -45,9 +45,9 @@
else
R.notify_ai(TRUE)
if(WIRE_CAMERA) // Pulse to disable the camera.
if(!isnull(R.camera) && !R.scrambledcodes)
R.camera.toggle_cam(usr, 0)
R.visible_message("[R]'s camera lense focuses loudly.", "Your camera lense focuses loudly.")
if(!QDELETED(R.builtInCamera) && !R.scrambledcodes)
R.builtInCamera.toggle_cam(usr, 0)
R.visible_message("[R]'s camera lens focuses loudly.", "Your camera lens focuses loudly.")
if(WIRE_LAWSYNC) // Forces a law update if possible.
if(R.lawupdate)
R.visible_message("[R] gently chimes.", "LawSync protocol engaged.")
@@ -75,10 +75,10 @@
else if(!R.deployed) //AI shells must always have the same laws as the AI
R.lawupdate = FALSE
if (WIRE_CAMERA) // Disable the camera.
if(!isnull(R.camera) && !R.scrambledcodes)
R.camera.status = mend
R.camera.toggle_cam(usr, 0)
R.visible_message("[R]'s camera lense focuses loudly.", "Your camera lense focuses loudly.")
if(!QDELETED(R.builtInCamera) && !R.scrambledcodes)
R.builtInCamera.status = mend
R.builtInCamera.toggle_cam(usr, 0)
R.visible_message("[R]'s camera lens focuses loudly.", "Your camera lens focuses loudly.")
if(WIRE_LOCKDOWN) // Simple lockdown.
R.SetLockdown(!mend)
if(WIRE_RESET_MODULE)