Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit611
This commit is contained in:
+4
-12
@@ -301,16 +301,6 @@
|
||||
name = "Toggle Friendly Fire \[ON\]"
|
||||
..()
|
||||
|
||||
/datum/action/item_action/synthswitch
|
||||
name = "Change Synthesizer Instrument"
|
||||
desc = "Change the type of instrument your synthesizer is playing as."
|
||||
|
||||
/datum/action/item_action/synthswitch/Trigger()
|
||||
if(istype(target, /obj/item/instrument/piano_synth))
|
||||
var/obj/item/instrument/piano_synth/synth = target
|
||||
return synth.selectInstrument()
|
||||
return ..()
|
||||
|
||||
/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."
|
||||
@@ -425,6 +415,7 @@
|
||||
|
||||
/datum/action/item_action/hands_free
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
required_mobility_flags = NONE
|
||||
|
||||
/datum/action/item_action/hands_free/activate
|
||||
name = "Activate"
|
||||
@@ -657,7 +648,7 @@
|
||||
return FALSE
|
||||
var/obj/effect/proc_holder/spell/S = target
|
||||
if(owner)
|
||||
return S.can_cast(owner)
|
||||
return S.can_cast(owner, FALSE, TRUE)
|
||||
return FALSE
|
||||
|
||||
/datum/action/spell_action/alien
|
||||
@@ -674,7 +665,8 @@
|
||||
|
||||
//Preset for general and toggled actions
|
||||
/datum/action/innate
|
||||
check_flags = 0
|
||||
check_flags = NONE
|
||||
required_mobility_flags = NONE
|
||||
var/active = 0
|
||||
|
||||
/datum/action/innate/Trigger()
|
||||
|
||||
+19
-12
@@ -9,8 +9,8 @@
|
||||
var/max_distance = 0
|
||||
var/sleep_time = 3
|
||||
var/finished = 0
|
||||
var/target_oldloc = null
|
||||
var/origin_oldloc = null
|
||||
var/turf/target_oldloc
|
||||
var/turf/origin_oldloc
|
||||
var/static_beam = 0
|
||||
var/beam_type = /obj/effect/ebeam //must be subtype
|
||||
var/timing_id = null
|
||||
@@ -23,13 +23,13 @@
|
||||
target_oldloc = get_turf(target)
|
||||
sleep_time = beam_sleep_time
|
||||
if(origin_oldloc == origin && target_oldloc == target)
|
||||
static_beam = 1
|
||||
static_beam = TRUE
|
||||
max_distance = maxdistance
|
||||
base_icon = new(beam_icon,beam_icon_state)
|
||||
icon = beam_icon
|
||||
icon_state = beam_icon_state
|
||||
beam_type = btype
|
||||
if(time < INFINITY)
|
||||
if(time < INFINITY)
|
||||
addtimer(CALLBACK(src,.proc/End), time)
|
||||
|
||||
/datum/beam/proc/Start()
|
||||
@@ -42,10 +42,14 @@
|
||||
return
|
||||
recalculating = TRUE
|
||||
timing_id = null
|
||||
if(origin && target && get_dist(origin,target)<max_distance && origin.z == target.z)
|
||||
var/origin_turf = get_turf(origin)
|
||||
var/target_turf = get_turf(target)
|
||||
if(!static_beam && (origin_turf != origin_oldloc || target_turf != target_oldloc))
|
||||
var/turf/origin_turf
|
||||
if(origin)
|
||||
origin_turf = get_turf(origin)
|
||||
var/turf/target_turf
|
||||
if(target)
|
||||
target_turf = get_turf(target)
|
||||
if(origin_turf && target_turf && (get_dist(origin_turf, target_turf) < max_distance) && (origin_turf.z == target_turf.z))
|
||||
if(!static_beam && ((origin_turf != origin_oldloc) || (target_turf != target_oldloc)))
|
||||
origin_oldloc = origin_turf //so we don't keep checking against their initial positions, leading to endless Reset()+Draw() calls
|
||||
target_oldloc = target_turf
|
||||
Reset()
|
||||
@@ -83,24 +87,27 @@
|
||||
elements.Cut()
|
||||
|
||||
/datum/beam/Destroy()
|
||||
finished = TRUE
|
||||
Reset()
|
||||
target = null
|
||||
origin = null
|
||||
return ..()
|
||||
|
||||
/datum/beam/proc/Draw()
|
||||
var/Angle = round(Get_Angle(origin,target))
|
||||
if(!origin_oldloc || !target_oldloc)
|
||||
return
|
||||
var/Angle = round(Get_Angle(origin_oldloc,target_oldloc))
|
||||
var/matrix/rot_matrix = matrix()
|
||||
rot_matrix.Turn(Angle)
|
||||
|
||||
//Translation vector for origin and target
|
||||
var/DX = (32*target.x+target.pixel_x)-(32*origin.x+origin.pixel_x)
|
||||
var/DY = (32*target.y+target.pixel_y)-(32*origin.y+origin.pixel_y)
|
||||
var/DX = (32*target_oldloc.x+target_oldloc.pixel_x)-(32*origin_oldloc.x+origin_oldloc.pixel_x)
|
||||
var/DY = (32*target_oldloc.y+target_oldloc.pixel_y)-(32*origin_oldloc.y+origin_oldloc.pixel_y)
|
||||
var/N = 0
|
||||
var/length = round(sqrt((DX)**2+(DY)**2)) //hypotenuse of the triangle formed by target and origin's displacement
|
||||
|
||||
for(N in 0 to length-1 step 32)//-1 as we want < not <=, but we want the speed of X in Y to Z and step X
|
||||
if(QDELETED(src) || finished)
|
||||
if(finished)
|
||||
break
|
||||
var/obj/effect/ebeam/X = new beam_type(origin_oldloc)
|
||||
X.owner = src
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
|
||||
/datum/brain_trauma/special/imaginary_friend/proc/get_ghost()
|
||||
set waitfor = FALSE
|
||||
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [owner]'s imaginary friend?", ROLE_PAI, null, null, 75, friend, POLL_IGNORE_IMAGINARYFRIEND)
|
||||
var/list/candidates = pollCandidatesForMob("Do you want to play as [owner]'s imaginary friend?", ROLE_PAI, null, null, 75, friend, POLL_IGNORE_IMAGINARYFRIEND)
|
||||
if(LAZYLEN(candidates))
|
||||
var/mob/dead/observer/C = pick(candidates)
|
||||
var/mob/C = pick(candidates)
|
||||
C.transfer_ckey(friend, FALSE)
|
||||
friend_initialized = TRUE
|
||||
else
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
..()
|
||||
make_backseats()
|
||||
get_ghost()
|
||||
RegisterSignal(M, COMSIG_MOB_DEATH, .proc/revert_to_normal)
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/proc/make_backseats()
|
||||
stranger_backseat = new(owner, src)
|
||||
@@ -27,9 +28,9 @@
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/proc/get_ghost()
|
||||
set waitfor = FALSE
|
||||
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [owner]'s split personality?", ROLE_PAI, null, null, 75, stranger_backseat, POLL_IGNORE_SPLITPERSONALITY)
|
||||
var/list/mob/candidates = pollCandidatesForMob("Do you want to play as [owner]'s split personality?", ROLE_PAI, null, null, 75, stranger_backseat, POLL_IGNORE_SPLITPERSONALITY)
|
||||
if(LAZYLEN(candidates))
|
||||
var/mob/dead/observer/C = pick(candidates)
|
||||
var/mob/C = pick(candidates)
|
||||
C.transfer_ckey(stranger_backseat, FALSE)
|
||||
log_game("[key_name(stranger_backseat)] became [key_name(owner)]'s split personality.")
|
||||
message_admins("[ADMIN_LOOKUPFLW(stranger_backseat)] became [ADMIN_LOOKUPFLW(owner)]'s split personality.")
|
||||
@@ -37,23 +38,23 @@
|
||||
qdel(src)
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/on_life()
|
||||
if(owner.stat == DEAD)
|
||||
if(current_controller != OWNER)
|
||||
switch_personalities()
|
||||
qdel(src)
|
||||
else if(prob(3))
|
||||
if(prob(3))
|
||||
switch_personalities()
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/on_lose()
|
||||
if(current_controller != OWNER) //it would be funny to cure a guy only to be left with the other personality, but it seems too cruel
|
||||
switch_personalities()
|
||||
switch_personalities(TRUE)
|
||||
QDEL_NULL(stranger_backseat)
|
||||
QDEL_NULL(owner_backseat)
|
||||
UnregisterSignal(owner, COMSIG_MOB_DEATH)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/proc/switch_personalities()
|
||||
if(QDELETED(owner) || owner.stat == DEAD || QDELETED(stranger_backseat) || QDELETED(owner_backseat))
|
||||
/datum/brain_trauma/severe/split_personality/proc/revert_to_normal()
|
||||
qdel(src)
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/proc/switch_personalities(forced = FALSE)
|
||||
if(QDELETED(owner) || (owner.stat == DEAD && !forced) || QDELETED(stranger_backseat) || QDELETED(owner_backseat))
|
||||
return
|
||||
|
||||
var/mob/living/split_personality/current_backseat
|
||||
@@ -126,10 +127,6 @@
|
||||
if(QDELETED(body))
|
||||
qdel(src) //in case trauma deletion doesn't already do it
|
||||
|
||||
if((body.stat == DEAD && trauma.owner_backseat == src))
|
||||
trauma.switch_personalities()
|
||||
qdel(trauma)
|
||||
|
||||
//if one of the two ghosts, the other one stays permanently
|
||||
if(!body.client && trauma.initialized)
|
||||
trauma.switch_personalities()
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
//title_image = ntitle_image
|
||||
|
||||
/datum/browser/proc/add_stylesheet(name, file)
|
||||
if (istype(name, /datum/asset/spritesheet))
|
||||
if(istype(name, /datum/asset/spritesheet))
|
||||
var/datum/asset/spritesheet/sheet = name
|
||||
stylesheets["spritesheet_[sheet.name].css"] = "data/spritesheets/[sheet.name]"
|
||||
else
|
||||
@@ -72,9 +72,9 @@
|
||||
|
||||
return {"<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<head>
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
||||
[head_content]
|
||||
</head>
|
||||
<body scroll=auto>
|
||||
|
||||
@@ -4,132 +4,6 @@
|
||||
|
||||
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
|
||||
See [this thread](https://tgstation13.org/phpBB/viewtopic.php?f=5&t=22674) for an introduction to the system as a whole.
|
||||
|
||||
#### 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
|
||||
|
||||
### Defines
|
||||
|
||||
1. `COMPONENT_INCOMPATIBLE` Return this from `/datum/component/Initialize` or `datum/component/OnTransfer` to have the component be deleted if it's applied to an incorrect type. `parent` must not be modified if this is to be returned. This will be noted in the runtime logs
|
||||
|
||||
### Vars
|
||||
|
||||
1. `/datum/var/list/datum_components` (private)
|
||||
* Lazy associated list of type -> component/list of components.
|
||||
1. `/datum/var/list/comp_lookup` (private)
|
||||
* Lazy associated list of signal -> registree/list of registrees
|
||||
1. `/datum/var/list/signal_procs` (private)
|
||||
* Associated lazy list of signals -> `/datum/callback`s that will be run when the parent datum receives that signal
|
||||
1. `/datum/var/signal_enabled` (protected, boolean)
|
||||
* If the datum is signal enabled. If not, it will not react to signals
|
||||
* `FALSE` by default, set to `TRUE` when a signal is registered
|
||||
1. `/datum/component/var/dupe_mode` (protected, enum)
|
||||
* How duplicate component types 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 separate, `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
|
||||
* `COMPONENT_DUPE_UNIQUE_PASSARGS`: New component will never exist and instead its initialization arguments will be passed on to the old component.
|
||||
1. `/datum/component/var/dupe_type` (protected, type)
|
||||
* Definition of a duplicate component type
|
||||
* `null` means exact match on `type` (default)
|
||||
* Any other type means that and all subtypes
|
||||
1. `/datum/component/var/datum/parent` (protected, read-only)
|
||||
* The datum this component belongs to
|
||||
* Never `null` in child procs
|
||||
1. `report_signal_origin` (protected, boolean)
|
||||
* If `TRUE`, will invoke the callback when signalled with the signal type as the first argument.
|
||||
* `FALSE` by default.
|
||||
|
||||
### 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. `SEND_SIGNAL(target, sigtype, ...)` (public, final)
|
||||
* Use to send signals to target datum
|
||||
* Extra arguments are to be specified in the signal definition
|
||||
* Returns a bitflag with signal specific information assembled from all activated components
|
||||
* Arguments are packaged in a list and handed off to _SendSignal()
|
||||
1. `/datum/proc/AddComponent(component_type(type), ...) -> datum/component` (public, final)
|
||||
* Creates an instance of `component_type` in the datum and passes `...` to its `Initialize()` 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
|
||||
* If this tries to add an component to an incompatible type, the component will be deleted and the result will be `null`. This is very unperformant, try not to do it
|
||||
* Properly handles duplicate situations based on the `dupe_mode` var
|
||||
1. `/datum/proc/LoadComponent(component_type(type), ...) -> datum/component` (public, final)
|
||||
* Equivalent to calling `GetComponent(component_type)` where, if the result would be `null`, returns `AddComponent(component_type, ...)` instead
|
||||
1. `/datum/proc/ComponentActivated(datum/component/C)` (abstract, async)
|
||||
* Called on a component's `parent` after a signal received 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
|
||||
* Signals `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, list/arguments)` (private, final)
|
||||
* Handles most of the actual signaling procedure
|
||||
* Will runtime if used on datums with an empty component list
|
||||
1. `/datum/proc/RegisterSignal(datum/target, signal(string/list of strings), proc_ref(type), override(boolean))` (protected, final)
|
||||
* If signal is a list it will be as if RegisterSignal was called for each of the entries with the same following arguments
|
||||
* Makes the datum listen for the specified `signal` on it's `parent` datum.
|
||||
* When that signal is received `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/New(datum/parent, ...)` (private, final)
|
||||
* Runs internal setup for the component
|
||||
* Extra arguments are passed to `Initialize()`
|
||||
1. `/datum/component/Initialize(...)` (abstract, no-sleep)
|
||||
* Called by `New()` with the same argments excluding `parent`
|
||||
* Component does not exist in `parent`'s `datum_components` list yet, although `parent` is set and may be used
|
||||
* Signals will not be received while this function is running
|
||||
* Component may be deleted after this function completes without being attached
|
||||
* Do not call `qdel(src)` from this function
|
||||
1. `/datum/component/Destroy(force(bool), silent(bool))` (virtual, no-sleep)
|
||||
* 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
|
||||
* Setting `force` makes it not check for and remove the component from the parent
|
||||
* Setting `silent` deletes the component without sending a `COMSIG_COMPONENT_REMOVING` signal
|
||||
1. `/datum/component/proc/InheritComponent(datum/component/C, i_am_original(boolean))` (abstract, no-sleep)
|
||||
* 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/AfterComponentActivated()` (abstract, async)
|
||||
* Called on a component that was activated after it's `parent`'s `ComponentActivated()` is called
|
||||
1. `/datum/component/proc/OnTransfer(datum/new_parent)` (abstract, no-sleep)
|
||||
* Called before `new_parent` is assigned to `parent` in `TakeComponent()`
|
||||
* Allows the component to react to ownership transfers
|
||||
1. `/datum/component/proc/_RemoveFromParent()` (private, final)
|
||||
* Clears `parent` and removes the component from it's component list
|
||||
1. `/datum/component/proc/_JoinParent` (private, final)
|
||||
* Tries to add the component to it's `parent`s `datum_components` list
|
||||
1. `/datum/component/proc/RegisterWithParent` (abstract, no-sleep)
|
||||
* Used to register the signals that should be on the `parent` object
|
||||
* Use this if you plan on the component transfering between parents
|
||||
1. `/datum/component/proc/UnregisterFromParent` (abstract, no-sleep)
|
||||
* Counterpart to `RegisterWithParent()`
|
||||
* Used to unregister the signals that should only be on the `parent` object
|
||||
|
||||
### See/Define signals and their arguments in __DEFINES\components.dm
|
||||
### See/Define signals and their arguments in [__DEFINES\components.dm](..\..\__DEFINES\components.dm)
|
||||
|
||||
@@ -1,21 +1,71 @@
|
||||
/**
|
||||
* # Component
|
||||
*
|
||||
* The component datum
|
||||
*
|
||||
* A component should be a single standalone unit
|
||||
* of functionality, that works by receiving signals from it's parent
|
||||
* object to provide some single functionality (i.e a slippery component)
|
||||
* that makes the object it's attached to cause people to slip over.
|
||||
* Useful when you want shared behaviour independent of type inheritance
|
||||
*/
|
||||
/datum/component
|
||||
/// Defines how duplicate existing components are handled when added to a datum
|
||||
/// See `COMPONENT_DUPE_*` definitions for available options
|
||||
var/dupe_mode = COMPONENT_DUPE_HIGHLANDER
|
||||
|
||||
/// The type to check for duplication
|
||||
/// `null` means exact match on `type` (default)
|
||||
/// Any other type means that and all subtypes
|
||||
var/dupe_type
|
||||
|
||||
/// The datum this components belongs to
|
||||
var/datum/parent
|
||||
//only set to true if you are able to properly transfer this component
|
||||
//At a minimum RegisterWithParent and UnregisterFromParent should be used
|
||||
//Make sure you also implement PostTransfer for any post transfer handling
|
||||
|
||||
/// Only set to true if you are able to properly transfer this component
|
||||
/// At a minimum RegisterWithParent and UnregisterFromParent should be used
|
||||
/// Make sure you also implement PostTransfer for any post transfer handling
|
||||
var/can_transfer = FALSE
|
||||
|
||||
/datum/component/New(datum/P, ...)
|
||||
parent = P
|
||||
var/list/arguments = args.Copy(2)
|
||||
/**
|
||||
* Create a new component.
|
||||
* Additional arguments are passed to `Initialize()`
|
||||
*
|
||||
* Arguments:
|
||||
* * datum/P the parent datum this component reacts to signals from
|
||||
*/
|
||||
/datum/component/New(list/raw_args)
|
||||
parent = raw_args[1]
|
||||
var/list/arguments = raw_args.Copy(2)
|
||||
if(Initialize(arglist(arguments)) == COMPONENT_INCOMPATIBLE)
|
||||
qdel(src, TRUE, TRUE)
|
||||
CRASH("Incompatible [type] assigned to a [P.type]! args: [json_encode(arguments)]")
|
||||
CRASH("Incompatible [type] assigned to a [parent.type]! args: [json_encode(arguments)]")
|
||||
|
||||
_JoinParent(P)
|
||||
_JoinParent(parent)
|
||||
|
||||
/**
|
||||
* Called during component creation with the same arguments as in new excluding parent.
|
||||
* Do not call `qdel(src)` from this function, `return COMPONENT_INCOMPATIBLE` instead
|
||||
*/
|
||||
/datum/component/proc/Initialize(...)
|
||||
return
|
||||
|
||||
/**
|
||||
* Properly removes the component from `parent` and cleans up references
|
||||
* Setting `force` makes it not check for and remove the component from the parent
|
||||
* Setting `silent` deletes the component without sending a `COMSIG_COMPONENT_REMOVING` signal
|
||||
*/
|
||||
/datum/component/Destroy(force=FALSE, silent=FALSE)
|
||||
if(!force && parent)
|
||||
_RemoveFromParent()
|
||||
if(!silent)
|
||||
SEND_SIGNAL(parent, COMSIG_COMPONENT_REMOVING, src)
|
||||
parent = null
|
||||
return ..()
|
||||
|
||||
/**
|
||||
* Internal proc to handle behaviour of components when joining a parent
|
||||
*/
|
||||
/datum/component/proc/_JoinParent()
|
||||
var/datum/P = parent
|
||||
//lazy init the parent's dc list
|
||||
@@ -51,21 +101,9 @@
|
||||
|
||||
RegisterWithParent()
|
||||
|
||||
// If you want/expect to be moving the component around between parents, use this to register on the parent for signals
|
||||
/datum/component/proc/RegisterWithParent()
|
||||
SEND_SIGNAL(src, COMSIG_COMPONENT_REGISTER_PARENT) //CITADEL EDIT
|
||||
|
||||
/datum/component/proc/Initialize(...)
|
||||
return
|
||||
|
||||
/datum/component/Destroy(force=FALSE, silent=FALSE)
|
||||
if(!force && parent)
|
||||
_RemoveFromParent()
|
||||
if(!silent)
|
||||
SEND_SIGNAL(parent, COMSIG_COMPONENT_REMOVING, src)
|
||||
parent = null
|
||||
return ..()
|
||||
|
||||
/**
|
||||
* Internal proc to handle behaviour when being removed from a parent
|
||||
*/
|
||||
/datum/component/proc/_RemoveFromParent()
|
||||
var/datum/P = parent
|
||||
var/list/dc = P.datum_components
|
||||
@@ -84,9 +122,38 @@
|
||||
|
||||
UnregisterFromParent()
|
||||
|
||||
/datum/component/proc/UnregisterFromParent()
|
||||
SEND_SIGNAL(src, COMSIG_COMPONENT_UNREGISTER_PARENT) //CITADEL EDIT
|
||||
/**
|
||||
* Register the component with the parent object
|
||||
*
|
||||
* Use this proc to register with your parent object
|
||||
* Overridable proc that's called when added to a new parent
|
||||
*/
|
||||
/datum/component/proc/RegisterWithParent()
|
||||
return
|
||||
|
||||
/**
|
||||
* Unregister from our parent object
|
||||
*
|
||||
* Use this proc to unregister from your parent object
|
||||
* Overridable proc that's called when removed from a parent
|
||||
* *
|
||||
*/
|
||||
/datum/component/proc/UnregisterFromParent()
|
||||
return
|
||||
|
||||
/**
|
||||
* Register to listen for a signal from the passed in target
|
||||
*
|
||||
* This sets up a listening relationship such that when the target object emits a signal
|
||||
* the source datum this proc is called upon, will recieve a callback to the given proctype
|
||||
* Return values from procs registered must be a bitfield
|
||||
*
|
||||
* Arguments:
|
||||
* * datum/target The target to listen for signals from
|
||||
* * sig_type_or_types Either a string signal name, or a list of signal names (strings)
|
||||
* * proctype The proc to call back when the signal is emitted
|
||||
* * override If a previous registration exists you must explicitly set this
|
||||
*/
|
||||
/datum/proc/RegisterSignal(datum/target, sig_type_or_types, proctype, override = FALSE)
|
||||
if(QDELETED(src) || QDELETED(target))
|
||||
return
|
||||
@@ -119,6 +186,16 @@
|
||||
|
||||
signal_enabled = TRUE
|
||||
|
||||
/**
|
||||
* Stop listening to a given signal from target
|
||||
*
|
||||
* Breaks the relationship between target and source datum, removing the callback when the signal fires
|
||||
* Doesn't care if a registration exists or not
|
||||
*
|
||||
* Arguments:
|
||||
* * datum/target Datum to stop listening to signals from
|
||||
* * sig_typeor_types Signal string key or list of signal keys to stop listening to specifically
|
||||
*/
|
||||
/datum/proc/UnregisterSignal(datum/target, sig_type_or_types)
|
||||
var/list/lookup = target.comp_lookup
|
||||
if(!signal_procs || !signal_procs[target] || !lookup)
|
||||
@@ -126,6 +203,8 @@
|
||||
if(!islist(sig_type_or_types))
|
||||
sig_type_or_types = list(sig_type_or_types)
|
||||
for(var/sig in sig_type_or_types)
|
||||
if(!signal_procs[target][sig])
|
||||
continue
|
||||
switch(length(lookup[sig]))
|
||||
if(2)
|
||||
lookup[sig] = (lookup[sig]-src)[1]
|
||||
@@ -148,15 +227,47 @@
|
||||
if(!signal_procs[target].len)
|
||||
signal_procs -= target
|
||||
|
||||
/**
|
||||
* Called on a component when a component of the same type was added to the same parent
|
||||
* See `/datum/component/var/dupe_mode`
|
||||
* `C`'s type will always be the same of the called component
|
||||
*/
|
||||
/datum/component/proc/InheritComponent(datum/component/C, i_am_original)
|
||||
return
|
||||
|
||||
|
||||
/**
|
||||
* Called on a component when a component of the same type was added to the same parent with COMPONENT_DUPE_SELECTIVE
|
||||
* See `/datum/component/var/dupe_mode`
|
||||
* `C`'s type will always be the same of the called component
|
||||
* return TRUE if you are absorbing the component, otherwise FALSE if you are fine having it exist as a duplicate component
|
||||
*/
|
||||
/datum/component/proc/CheckDupeComponent(datum/component/C, ...)
|
||||
return
|
||||
|
||||
|
||||
/**
|
||||
* Callback Just before this component is transferred
|
||||
*
|
||||
* Use this to do any special cleanup you might need to do before being deregged from an object
|
||||
*
|
||||
*/
|
||||
/datum/component/proc/PreTransfer()
|
||||
return
|
||||
|
||||
/**
|
||||
* Callback Just after a component is transferred
|
||||
*
|
||||
* Use this to do any special setup you need to do after being moved to a new object
|
||||
* Do not call `qdel(src)` from this function, `return COMPONENT_INCOMPATIBLE` instead
|
||||
*
|
||||
*/
|
||||
/datum/component/proc/PostTransfer()
|
||||
return COMPONENT_INCOMPATIBLE //Do not support transfer by default as you must properly support it
|
||||
|
||||
/**
|
||||
* Internal proc to create a list of our type and all parent types
|
||||
*/
|
||||
/datum/component/proc/_GetInverseTypeList(our_type = type)
|
||||
//we can do this one simple trick
|
||||
var/current_type = parent_type
|
||||
@@ -166,6 +277,11 @@
|
||||
current_type = type2parent(current_type)
|
||||
. += current_type
|
||||
|
||||
/**
|
||||
* Internal proc to handle most all of the signaling procedure
|
||||
* Will runtime if used on datums with an empty component list
|
||||
* Use the `SEND_SIGNAL` define instead
|
||||
*/
|
||||
/datum/proc/_SendSignal(sigtype, list/arguments)
|
||||
var/target = comp_lookup[sigtype]
|
||||
if(!length(target))
|
||||
@@ -183,9 +299,16 @@
|
||||
. |= CallAsync(C, proctype, arguments)
|
||||
|
||||
// The type arg is casted so initial works, you shouldn't be passing a real instance into this
|
||||
/**
|
||||
* Return any component assigned to this datum of the given type
|
||||
* This will throw an error if it's possible to have more than one component of that type on the parent
|
||||
*
|
||||
* Arguments:
|
||||
* * datum/component/c_type The typepath of the component you want to get a reference to
|
||||
*/
|
||||
/datum/proc/GetComponent(datum/component/c_type)
|
||||
RETURN_TYPE(c_type)
|
||||
if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED)
|
||||
if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED || initial(c_type.dupe_mode) == COMPONENT_DUPE_SELECTIVE)
|
||||
stack_trace("GetComponent was called to get a component of which multiple copies could be on an object. This can easily break and should be changed. Type: \[[c_type]\]")
|
||||
var/list/dc = datum_components
|
||||
if(!dc)
|
||||
@@ -194,7 +317,18 @@
|
||||
if(length(.))
|
||||
return .[1]
|
||||
|
||||
/datum/proc/GetExactComponent(c_type)
|
||||
// The type arg is casted so initial works, you shouldn't be passing a real instance into this
|
||||
/**
|
||||
* Return any component assigned to this datum of the exact given type
|
||||
* This will throw an error if it's possible to have more than one component of that type on the parent
|
||||
*
|
||||
* Arguments:
|
||||
* * datum/component/c_type The typepath of the component you want to get a reference to
|
||||
*/
|
||||
/datum/proc/GetExactComponent(datum/component/c_type)
|
||||
RETURN_TYPE(c_type)
|
||||
if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED || initial(c_type.dupe_mode) == COMPONENT_DUPE_SELECTIVE)
|
||||
stack_trace("GetComponent was called to get a component of which multiple copies could be on an object. This can easily break and should be changed. Type: \[[c_type]\]")
|
||||
var/list/dc = datum_components
|
||||
if(!dc)
|
||||
return null
|
||||
@@ -206,6 +340,12 @@
|
||||
return C
|
||||
return null
|
||||
|
||||
/**
|
||||
* Get all components of a given type that are attached to this datum
|
||||
*
|
||||
* Arguments:
|
||||
* * c_type The component type path
|
||||
*/
|
||||
/datum/proc/GetComponents(c_type)
|
||||
var/list/dc = datum_components
|
||||
if(!dc)
|
||||
@@ -214,7 +354,15 @@
|
||||
if(!length(.))
|
||||
return list(.)
|
||||
|
||||
/datum/proc/AddComponent(new_type, ...)
|
||||
/**
|
||||
* Creates an instance of `new_type` in the datum and attaches to it as parent
|
||||
* Sends the `COMSIG_COMPONENT_ADDED` signal to the datum
|
||||
* Returns the component that was created. Or the old component in a dupe situation where `COMPONENT_DUPE_UNIQUE` was set
|
||||
* If this tries to add an component to an incompatible type, the component will be deleted and the result will be `null`. This is very unperformant, try not to do it
|
||||
* Properly handles duplicate situations based on the `dupe_mode` var
|
||||
*/
|
||||
/datum/proc/_AddComponent(list/raw_args)
|
||||
var/new_type = raw_args[1]
|
||||
var/datum/component/nt = new_type
|
||||
var/dm = initial(nt.dupe_mode)
|
||||
var/dt = initial(nt.dupe_type)
|
||||
@@ -229,7 +377,7 @@
|
||||
new_comp = nt
|
||||
nt = new_comp.type
|
||||
|
||||
args[1] = src
|
||||
raw_args[1] = src
|
||||
|
||||
if(dm != COMPONENT_DUPE_ALLOWED)
|
||||
if(!dt)
|
||||
@@ -240,37 +388,62 @@
|
||||
switch(dm)
|
||||
if(COMPONENT_DUPE_UNIQUE)
|
||||
if(!new_comp)
|
||||
new_comp = new nt(arglist(args))
|
||||
new_comp = new nt(raw_args)
|
||||
if(!QDELETED(new_comp))
|
||||
old_comp.InheritComponent(new_comp, TRUE)
|
||||
QDEL_NULL(new_comp)
|
||||
if(COMPONENT_DUPE_HIGHLANDER)
|
||||
if(!new_comp)
|
||||
new_comp = new nt(arglist(args))
|
||||
new_comp = new nt(raw_args)
|
||||
if(!QDELETED(new_comp))
|
||||
new_comp.InheritComponent(old_comp, FALSE)
|
||||
QDEL_NULL(old_comp)
|
||||
if(COMPONENT_DUPE_UNIQUE_PASSARGS)
|
||||
if(!new_comp)
|
||||
var/list/arguments = args.Copy(2)
|
||||
old_comp.InheritComponent(null, TRUE, arguments)
|
||||
var/list/arguments = raw_args.Copy(2)
|
||||
arguments.Insert(1, null, TRUE)
|
||||
old_comp.InheritComponent(arglist(arguments))
|
||||
else
|
||||
old_comp.InheritComponent(new_comp, TRUE)
|
||||
if(COMPONENT_DUPE_SELECTIVE)
|
||||
var/list/arguments = raw_args.Copy()
|
||||
arguments[1] = new_comp
|
||||
var/make_new_component = TRUE
|
||||
for(var/i in GetComponents(new_type))
|
||||
var/datum/component/C = i
|
||||
if(C.CheckDupeComponent(arglist(arguments)))
|
||||
make_new_component = FALSE
|
||||
QDEL_NULL(new_comp)
|
||||
break
|
||||
if(!new_comp && make_new_component)
|
||||
new_comp = new nt(raw_args)
|
||||
else if(!new_comp)
|
||||
new_comp = new nt(arglist(args)) // There's a valid dupe mode but there's no old component, act like normal
|
||||
new_comp = new nt(raw_args) // There's a valid dupe mode but there's no old component, act like normal
|
||||
else if(!new_comp)
|
||||
new_comp = new nt(arglist(args)) // Dupes are allowed, act like normal
|
||||
new_comp = new nt(raw_args) // Dupes are allowed, act like normal
|
||||
|
||||
if(!old_comp && !QDELETED(new_comp)) // Nothing related to duplicate components happened and the new component is healthy
|
||||
SEND_SIGNAL(src, COMSIG_COMPONENT_ADDED, new_comp)
|
||||
return new_comp
|
||||
return old_comp
|
||||
|
||||
/**
|
||||
* Get existing component of type, or create it and return a reference to it
|
||||
*
|
||||
* Use this if the item needs to exist at the time of this call, but may not have been created before now
|
||||
*
|
||||
* Arguments:
|
||||
* * component_type The typepath of the component to create or return
|
||||
* * ... additional arguments to be passed when creating the component if it does not exist
|
||||
*/
|
||||
/datum/proc/LoadComponent(component_type, ...)
|
||||
. = GetComponent(component_type)
|
||||
if(!.)
|
||||
return AddComponent(arglist(args))
|
||||
return _AddComponent(args)
|
||||
|
||||
/**
|
||||
* Removes the component from parent, ends up with a null parent
|
||||
*/
|
||||
/datum/component/proc/RemoveComponent()
|
||||
if(!parent)
|
||||
return
|
||||
@@ -280,6 +453,14 @@
|
||||
parent = null
|
||||
SEND_SIGNAL(old_parent, COMSIG_COMPONENT_REMOVING, src)
|
||||
|
||||
/**
|
||||
* Transfer this component to another parent
|
||||
*
|
||||
* Component is taken from source datum
|
||||
*
|
||||
* Arguments:
|
||||
* * datum/component/target Target datum to transfer to
|
||||
*/
|
||||
/datum/proc/TakeComponent(datum/component/target)
|
||||
if(!target || target.parent == src)
|
||||
return
|
||||
@@ -296,6 +477,14 @@
|
||||
if(target == AddComponent(target))
|
||||
target._JoinParent()
|
||||
|
||||
/**
|
||||
* Transfer all components to target
|
||||
*
|
||||
* All components from source datum are taken
|
||||
*
|
||||
* Arguments:
|
||||
* * /datum/target the target to move the components to
|
||||
*/
|
||||
/datum/proc/TransferComponents(datum/target)
|
||||
var/list/dc = datum_components
|
||||
if(!dc)
|
||||
@@ -310,5 +499,8 @@
|
||||
if(C.can_transfer)
|
||||
target.TakeComponent(comps)
|
||||
|
||||
/**
|
||||
* Return the object that is the host of any UI's that this component has
|
||||
*/
|
||||
/datum/component/ui_host()
|
||||
return parent
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
var/obj/screen/craft/C = new()
|
||||
C.icon = H.ui_style
|
||||
H.static_inventory += C
|
||||
if(!CL.prefs.widescreenpref)
|
||||
C.screen_loc = ui_boxcraft
|
||||
CL.screen += C
|
||||
RegisterSignal(C, COMSIG_CLICK, .proc/component_ui_interact)
|
||||
|
||||
|
||||
+212
-57
@@ -14,26 +14,32 @@
|
||||
name = "Glass working tools"
|
||||
desc = "A lovely belt of most the tools you will need to shape, mold, and refine glass into more advanced shapes."
|
||||
icon_state = "glass_tools"
|
||||
tool_behaviour = TOOL_GLASS_CUT
|
||||
tool_behaviour = TOOL_GLASS_CUT //Cutting takes 20 ticks
|
||||
|
||||
/obj/item/glasswork/blowing_rod
|
||||
name = "Glass working blow rod"
|
||||
desc = "A hollow metal stick made for glass blowing."
|
||||
icon_state = "blowing_rods_unused"
|
||||
tool_behaviour = TOOL_BLOW
|
||||
tool_behaviour = TOOL_BLOW //Rods take 5 ticks
|
||||
|
||||
/obj/item/glasswork/glass_base
|
||||
/obj/item/glasswork/glass_base //Welding takes 30 ticks
|
||||
name = "Glass fodder sheet"
|
||||
desc = "A sheet of glass set aside for glass working"
|
||||
icon_state = "glass_base"
|
||||
var/next_step = null
|
||||
var/rod = /obj/item/glasswork/blowing_rod
|
||||
|
||||
/obj/item/lens
|
||||
name = "Optical lens"
|
||||
desc = "Good for selling or crafting, by itself its useless"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "glass_optics"
|
||||
/obj/item/tea_plate
|
||||
name = "Tea Plate"
|
||||
desc = "A polished plate for a tea cup. How fancy!"
|
||||
icon = 'icons/obj/glass_ware.dmi'
|
||||
icon_state = "tea_plate"
|
||||
|
||||
/obj/item/tea_cup
|
||||
name = "Tea Cup"
|
||||
desc = "A glass cup made for fake tea!"
|
||||
icon = 'icons/obj/glass_ware.dmi'
|
||||
icon_state = "tea_plate"
|
||||
|
||||
//////////////////////Chem Disk/////////////////////
|
||||
//Two Steps //
|
||||
@@ -49,8 +55,9 @@
|
||||
/obj/item/glasswork/glass_base/dish/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_GLASS_CUT)
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
if(do_after(user,20, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/dish_part1
|
||||
name = "Half chem dish sheet"
|
||||
@@ -61,8 +68,9 @@
|
||||
/obj/item/glasswork/glass_base/dish_part1/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_GLASS_CUT)
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
if(do_after(user,20, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
//////////////////////Lens//////////////////////////
|
||||
//Six Steps //
|
||||
@@ -78,8 +86,9 @@
|
||||
/obj/item/glasswork/glass_base/glass_lens/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_GLASS_CUT)
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
if(do_after(user,20, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/glass_lens_part1
|
||||
name = "Glass fodder sheet"
|
||||
@@ -90,8 +99,9 @@
|
||||
/obj/item/glasswork/glass_base/glass_lens_part1/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_WELDER)
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
if(do_after(user,30, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/glass_lens_part2
|
||||
name = "Glass fodder sheet"
|
||||
@@ -102,8 +112,9 @@
|
||||
/obj/item/glasswork/glass_base/glass_lens_part2/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_WELDER)
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
if(do_after(user,30, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/glass_lens_part3
|
||||
name = "Glass fodder sheet"
|
||||
@@ -114,9 +125,10 @@
|
||||
/obj/item/glasswork/glass_base/glass_lens_part3/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_BLOW)
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
qdel(I)
|
||||
if(do_after(user,5, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
qdel(I)
|
||||
|
||||
/obj/item/glasswork/glass_base/glass_lens_part4
|
||||
name = "Glass fodder sheet"
|
||||
@@ -127,29 +139,31 @@
|
||||
/obj/item/glasswork/glass_base/glass_lens_part4/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_GLASS_CUT)
|
||||
new next_step(user.loc, 1)
|
||||
new rod(user.loc, 1)
|
||||
qdel(src)
|
||||
if(do_after(user,20, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
new rod(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/glass_lens_part5
|
||||
name = "Unpolished glass lens"
|
||||
desc = "A small unpolished glass lens. Could be polished with some cloth."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
desc = "A small unpolished glass lens. Could be polished with some silk."
|
||||
icon = 'icons/obj/glass_ware.dmi'
|
||||
icon_state = "glass_optics"
|
||||
next_step = /obj/item/glasswork/glass_base/glass_lens_part6
|
||||
|
||||
/obj/item/glasswork/glass_base/glass_lens_part5/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/stack/sheet/cloth))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
if(istype(I, /obj/item/stack/sheet/silk))
|
||||
if(do_after(user,10, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/glass_lens_part6
|
||||
name = "Unrefined glass lens"
|
||||
desc = "A small polished glass lens. Just needs to be refined with some sandstone."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon = 'icons/obj/glass_ware.dmi'
|
||||
icon_state = "glass_optics"
|
||||
next_step = /obj/item/lens
|
||||
next_step = /obj/item/glasswork/glass_base/lens
|
||||
|
||||
/obj/item/glasswork/glass_base/glass_lens_part6/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
@@ -171,8 +185,9 @@
|
||||
/obj/item/glasswork/glass_base/spouty/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_GLASS_CUT)
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
if(do_after(user,20, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/spouty_part2
|
||||
name = "Glass fodder sheet"
|
||||
@@ -183,8 +198,9 @@
|
||||
/obj/item/glasswork/glass_base/spouty_part2/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_WELDER)
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
if(do_after(user,30, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/spouty_part3
|
||||
name = "Glass fodder sheet"
|
||||
@@ -195,9 +211,10 @@
|
||||
/obj/item/glasswork/glass_base/spouty_part3/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_BLOW)
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
qdel(I)
|
||||
if(do_after(user,5, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
qdel(I)
|
||||
|
||||
/obj/item/glasswork/glass_base/spouty_part4
|
||||
name = "Glass fodder sheet"
|
||||
@@ -208,9 +225,10 @@
|
||||
/obj/item/glasswork/glass_base/spouty_part4/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_GLASS_CUT)
|
||||
new next_step(user.loc, 1)
|
||||
new rod(user.loc, 1)
|
||||
qdel(src)
|
||||
if(do_after(user,20, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
new rod(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
//////////////////////Small Bulb Flask//////////////
|
||||
//Two Steps //
|
||||
@@ -226,8 +244,9 @@
|
||||
/obj/item/glasswork/glass_base/flask_small/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_WELDER)
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
if(do_after(user,30, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/flask_small_part1
|
||||
name = "Metled glass"
|
||||
@@ -238,9 +257,10 @@
|
||||
/obj/item/glasswork/glass_base/flask_small_part1/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_BLOW)
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
qdel(I)
|
||||
if(do_after(user,5, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
qdel(I)
|
||||
|
||||
/obj/item/glasswork/glass_base/flask_small_part2
|
||||
name = "Metled glass"
|
||||
@@ -251,9 +271,10 @@
|
||||
/obj/item/glasswork/glass_base/flask_small_part2/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_GLASS_CUT)
|
||||
new next_step(user.loc, 1)
|
||||
new rod(user.loc, 1)
|
||||
qdel(src)
|
||||
if(do_after(user,20, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
new rod(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
//////////////////////Large Bulb Flask//////////////
|
||||
//Two Steps //
|
||||
@@ -269,8 +290,9 @@
|
||||
/obj/item/glasswork/glass_base/flask_large/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_WELDER)
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
if(do_after(user,30, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/flask_large_part1
|
||||
name = "Metled glass"
|
||||
@@ -281,9 +303,10 @@
|
||||
/obj/item/glasswork/glass_base/flask_large_part1/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_BLOW)
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
qdel(I)
|
||||
if(do_after(user,5, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
qdel(I)
|
||||
|
||||
/obj/item/glasswork/glass_base/flask_large_part2
|
||||
name = "Metled glass"
|
||||
@@ -294,6 +317,138 @@
|
||||
/obj/item/glasswork/glass_base/flask_large_part2/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_GLASS_CUT)
|
||||
new next_step(user.loc, 1)
|
||||
new rod(user.loc, 1)
|
||||
qdel(src)
|
||||
if(do_after(user,20, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
new rod(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
//////////////////////Tea Plates////////////////////
|
||||
//Three Steps //
|
||||
//Sells for 1200 cr, takes 5 glass shets //
|
||||
//Usefull for selling and chemical things //
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_plate
|
||||
name = "Glass fodder sheet"
|
||||
desc = "A set of glass sheets set aside for glass working, this one is ideal for a tea plate, how fancy! Needs to be heated with some tools."
|
||||
next_step = /obj/item/glasswork/glass_base/tea_plate1
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_plate/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_WELDER)
|
||||
if(do_after(user,30, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_plate1
|
||||
name = "Metled glass"
|
||||
desc = "A blob of metled glass, this one is ideal for a tea plate. Needs to be blown with some tools."
|
||||
icon_state = "glass_base_molding"
|
||||
next_step = /obj/item/glasswork/glass_base/tea_plate2
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_plate1/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_BLOW)
|
||||
if(do_after(user,5, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
qdel(I)
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_plate2
|
||||
name = "Metled glass"
|
||||
desc = "A blob of metled glass on the end of a blowing rod. Needs to be cut off with some tools."
|
||||
icon_state = "blowing_rods_inuse"
|
||||
next_step = /obj/item/glasswork/glass_base/tea_plate3
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_plate2/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_GLASS_CUT)
|
||||
if(do_after(user,20, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
new rod(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_plate3
|
||||
name = "Disk of glass"
|
||||
desc = "A disk of glass that can be cant be used for much. Needs to be polished with some silk."
|
||||
icon_state = "glass_base_half"
|
||||
next_step = /obj/item/tea_plate
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_plate3/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/stack/sheet/silk))
|
||||
if(do_after(user,10, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
//////////////////////Tea Cup///////////////////////
|
||||
//Four Steps //
|
||||
//Sells for 1800 cr, takes 6 glass shets //
|
||||
//Usefull for selling and chemical things //
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_cup
|
||||
name = "Glass fodder sheet"
|
||||
desc = "A set of glass sheets set aside for glass working, this one is ideal for a tea cup, how fancy! Needs to be heated with some tools."
|
||||
next_step = /obj/item/glasswork/glass_base/tea_cup1
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_cup/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_WELDER)
|
||||
if(do_after(user,30, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_cup1
|
||||
name = "Metled glass"
|
||||
desc = "A blob of metled glass, this one is ideal for a tea cup. Needs to be blown with some tools."
|
||||
icon_state = "glass_base_molding"
|
||||
next_step = /obj/item/glasswork/glass_base/tea_cup2
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_cup1/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_BLOW)
|
||||
if(do_after(user,5, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
qdel(I)
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_cupe2
|
||||
name = "Metled glass"
|
||||
desc = "A blob of metled glass on the end of a blowing rod. Needs to be cut off with some tools."
|
||||
icon_state = "blowing_rods_inuse"
|
||||
next_step = /obj/item/glasswork/glass_base/tea_cup3
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_cup2/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_GLASS_CUT)
|
||||
if(do_after(user,20, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
new rod(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_cup3
|
||||
name = "Disk of glass"
|
||||
desc = "A bowl of glass that can be cant be used for much. Needs to be polished with some silk."
|
||||
icon_state = "glass_base_half"
|
||||
next_step = /obj/item/glasswork/glass_base/tea_cup4
|
||||
|
||||
/obj/item/glasswork/glass_base/cup3/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/stack/sheet/silk))
|
||||
if(do_after(user,10, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/tea_cup4
|
||||
name = "Disk of glass"
|
||||
desc = "A bowl of polished glass that can be cant be used for much. Needs some more glass to make a handle."
|
||||
icon_state = "glass_base_half"
|
||||
next_step = /obj/item/tea_cup
|
||||
|
||||
/obj/item/glasswork/glass_base/cup4/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/stack/sheet/glass))
|
||||
if(do_after(user,10, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
@@ -0,0 +1,98 @@
|
||||
//This file is for crafting using a lens!
|
||||
|
||||
/obj/item/glasswork/glass_base/lens
|
||||
name = "Optical lens"
|
||||
desc = "Good for selling or crafting, by itself its useless"
|
||||
icon = 'icons/obj/glass_ware.dmi'
|
||||
icon_state = "glass_optics"
|
||||
|
||||
//Laser pointers - 2600
|
||||
/obj/item/glasswork/glass_base/laserpointer_shell
|
||||
name = "Laser pointer assembly"
|
||||
desc = "Good for selling or crafting, by itself its useless. Needs a power capactor."
|
||||
icon_state = "laser_case"
|
||||
icon = 'icons/obj/glass_ware.dmi'
|
||||
next_step = /obj/item/glasswork/glass_base/laserpointer_shell_1
|
||||
|
||||
/obj/item/glasswork/glass_base/laserpointer_shell/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/stock_parts/capacitor))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/laserpointer_shell_1
|
||||
name = "Laser pointer assembly"
|
||||
desc = "Good for selling or crafting, by itself its useless. Needs a glass lens."
|
||||
icon_state = "laser_wire"
|
||||
icon_state = "laser_case"
|
||||
next_step = /obj/item/glasswork/glass_base/laserpointer_shell_2
|
||||
|
||||
/obj/item/glasswork/glass_base/laserpointer_shell_1/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/glasswork/glass_base/lens))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/laserpointer_shell_2
|
||||
name = "Laser pointer assembly"
|
||||
desc = "Good for selling or crafting, by itself its useless. Needs to be screwed together."
|
||||
icon_state = "laser_wire"
|
||||
icon_state = "laser_case"
|
||||
next_step = /obj/item/laser_pointer/blue/handmade
|
||||
|
||||
/obj/item/glasswork/glass_base/laserpointer_shell_2/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(do_after(user,260, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
//NERD SHIT - 5000
|
||||
|
||||
/obj/item/glasswork/glass_base/glasses_frame
|
||||
name = "Glasses Frame"
|
||||
desc = "Good for crafting a pare of glasses, by itself its useless. Just add a pare of lens."
|
||||
icon = 'icons/obj/glass_ware.dmi'
|
||||
icon_state = "frames"
|
||||
next_step = /obj/item/glasswork/glass_base/glasses_frame_1
|
||||
|
||||
/obj/item/glasswork/glass_base/glasses_frame/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/glasswork/glass_base/lens))
|
||||
if(do_after(user,60, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/glasses_frame_1
|
||||
name = "Glasses Frame"
|
||||
desc = "Good for crafting a pare of glasses, by itself its useless. Just add a the other lens."
|
||||
icon = 'icons/obj/glass_ware.dmi'
|
||||
icon_state = "frames_1"
|
||||
next_step = /obj/item/glasswork/glass_base/glasses_frame_2
|
||||
|
||||
/obj/item/glasswork/glass_base/glasses_frame_1/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/glasswork/glass_base/lens))
|
||||
if(do_after(user,60, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glass_base/glasses_frame_2
|
||||
name = "Glasses Frame"
|
||||
desc = "Good for crafting a pare of glasses, by itself its useless. Just adjust the pices into the frame with a screwdriver."
|
||||
icon = 'icons/obj/glass_ware.dmi'
|
||||
icon_state = "frames_2"
|
||||
next_step = /obj/item/glasswork/glasses
|
||||
|
||||
/obj/item/glasswork/glass_base/glasses_frame_2/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(do_after(user,180, target = src))
|
||||
new next_step(user.loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glasses
|
||||
name = "Hand Made Glasses"
|
||||
desc = "Hande made glasses that have not been polished at all making them useless. Selling them could still be worth a bit of credits."
|
||||
icon = 'icons/obj/glass_ware.dmi'
|
||||
icon_state = "frames_2"
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/datum/crafting_recipe/mummy/body
|
||||
name = "Mummification Bandages (Body)"
|
||||
result = /obj/item/clothing/under/mummy
|
||||
result = /obj/item/clothing/under/costume/mummy
|
||||
reqs = list(/obj/item/stack/sheet/cloth = 5)
|
||||
|
||||
/datum/crafting_recipe/lizardhat
|
||||
@@ -33,11 +33,24 @@
|
||||
/obj/item/organ/ears/cat = 1)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/papermask
|
||||
name = "Paper Mask"
|
||||
result = /obj/item/clothing/mask/paper
|
||||
time = 10
|
||||
reqs = list(/obj/item/paper = 20)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
////////
|
||||
//Huds//
|
||||
////////
|
||||
|
||||
/datum/crafting_recipe/hudsunsec
|
||||
name = "Security HUDsunglasses"
|
||||
result = /obj/item/clothing/glasses/hud/security/sunglasses
|
||||
time = 20
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
parts = list(/obj/item/clothing/glasses/hud/security = 1,
|
||||
/obj/item/clothing/glasses/sunglasses = 1)
|
||||
reqs = list(/obj/item/clothing/glasses/hud/security = 1,
|
||||
/obj/item/clothing/glasses/sunglasses = 1,
|
||||
/obj/item/stack/cable_coil = 5)
|
||||
@@ -56,9 +69,11 @@
|
||||
result = /obj/item/clothing/glasses/hud/health/sunglasses
|
||||
time = 20
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
parts = list(/obj/item/clothing/glasses/hud/health = 1,
|
||||
/obj/item/clothing/glasses/sunglasses = 1)
|
||||
reqs = list(/obj/item/clothing/glasses/hud/health = 1,
|
||||
/obj/item/clothing/glasses/sunglasses = 1,
|
||||
/obj/item/stack/cable_coil = 5)
|
||||
/obj/item/clothing/glasses/sunglasses = 1,
|
||||
/obj/item/stack/cable_coil = 5)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/hudsunmedremoval
|
||||
@@ -86,6 +101,27 @@
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
reqs = list(/obj/item/clothing/glasses/sunglasses/reagent = 1)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/diagnostic_sunglasses
|
||||
name = "Diagnostic HUDsunglasses"
|
||||
result = /obj/item/clothing/glasses/hud/diagnostic/sunglasses
|
||||
time = 20
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
parts = list(/obj/item/clothing/glasses/hud/diagnostic = 1,
|
||||
/obj/item/clothing/glasses/sunglasses = 1)
|
||||
reqs = list(/obj/item/clothing/glasses/hud/diagnostic = 1,
|
||||
/obj/item/clothing/glasses/sunglasses = 1,
|
||||
/obj/item/stack/cable_coil = 5)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/diagnostic_sunglasses_removal
|
||||
name = "Diagnostic HUDsunglasses removal"
|
||||
result = /obj/item/clothing/glasses/sunglasses
|
||||
time = 20
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
reqs = list(/obj/item/clothing/glasses/hud/diagnostic/sunglasses = 1)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/* //Kevinz doesn't want it as a recipe for now, leaving it in if anything ever changes to let it in
|
||||
/datum/crafting_recipe/stunglasses
|
||||
name = "Stunglasses"
|
||||
@@ -97,6 +133,85 @@
|
||||
/obj/item/stack/cable_coil = 5)
|
||||
category = CAT_CLOTHING
|
||||
*/
|
||||
|
||||
// Eyepatch Glasses
|
||||
|
||||
/datum/crafting_recipe/secpatch
|
||||
name = "Security Eyepatch HUD"
|
||||
result = /obj/item/clothing/glasses/hud/security/sunglasses/eyepatch
|
||||
time = 20
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
parts = list(/obj/item/clothing/glasses/hud/security/sunglasses = 1,
|
||||
/obj/item/clothing/glasses/eyepatch = 1)
|
||||
reqs = list(/obj/item/clothing/glasses/hud/security/sunglasses = 1,
|
||||
/obj/item/clothing/glasses/eyepatch = 1)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/secpatch_removal
|
||||
name = "Security HUDpatch Removal"
|
||||
result = /obj/item/clothing/glasses/eyepatch
|
||||
time = 20
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
reqs = list(/obj/item/clothing/glasses/hud/security/sunglasses/eyepatch = 1)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/medpatch
|
||||
name = "Medical Eyepatch HUD"
|
||||
result = /obj/item/clothing/glasses/hud/health/eyepatch
|
||||
time = 20
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
parts = list(/obj/item/clothing/glasses/hud/health = 1,
|
||||
/obj/item/clothing/glasses/eyepatch = 1)
|
||||
reqs = list(/obj/item/clothing/glasses/hud/health = 1,
|
||||
/obj/item/clothing/glasses/eyepatch = 1)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/medpatch_removal
|
||||
name = "Medical HUDpatch Removal"
|
||||
result = /obj/item/clothing/glasses/eyepatch
|
||||
time = 20
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
reqs = list(/obj/item/clothing/glasses/hud/health/eyepatch = 1)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/diagpatch
|
||||
name = "Diagnostic Eyepatch HUD"
|
||||
result = /obj/item/clothing/glasses/hud/diagnostic/eyepatch
|
||||
time = 20
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
parts = list(/obj/item/clothing/glasses/hud/diagnostic = 1,
|
||||
/obj/item/clothing/glasses/eyepatch = 1)
|
||||
reqs = list(/obj/item/clothing/glasses/hud/diagnostic = 1,
|
||||
/obj/item/clothing/glasses/eyepatch = 1)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/diagpatch_removal
|
||||
name = "Diagnostic HUDpatch Removal"
|
||||
result = /obj/item/clothing/glasses/eyepatch
|
||||
time = 20
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
reqs = list(/obj/item/clothing/glasses/hud/diagnostic/eyepatch = 1)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/mesonpatch
|
||||
name = "Meson Scanner Eyepatch"
|
||||
result = /obj/item/clothing/glasses/meson/eyepatch
|
||||
time = 20
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
parts = list(/obj/item/clothing/glasses/meson = 1,
|
||||
/obj/item/clothing/glasses/eyepatch = 1)
|
||||
reqs = list(/obj/item/clothing/glasses/meson = 1,
|
||||
/obj/item/clothing/glasses/eyepatch = 1)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/mesonpatch_removal
|
||||
name = "Meson Scanner patch Removal"
|
||||
result = /obj/item/clothing/glasses/eyepatch
|
||||
time = 20
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
reqs = list(/obj/item/clothing/glasses/meson/eyepatch = 1)
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/ghostsheet
|
||||
name = "Ghost Sheet"
|
||||
result = /obj/item/clothing/suit/ghost_sheet
|
||||
@@ -130,7 +245,6 @@
|
||||
reqs = list(/obj/item/stack/sheet/durathread = 7,
|
||||
/obj/item/stack/sheet/leather = 3)
|
||||
time = 70
|
||||
always_availible = TRUE
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/durathread_toolbelt
|
||||
@@ -139,7 +253,6 @@
|
||||
reqs = list(/obj/item/stack/sheet/durathread = 5,
|
||||
/obj/item/stack/sheet/leather = 2)
|
||||
time = 30
|
||||
always_availible = TRUE
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/durathread_bandolier
|
||||
@@ -148,7 +261,6 @@
|
||||
reqs = list(/obj/item/stack/sheet/durathread = 6,
|
||||
/obj/item/stack/sheet/leather = 2)
|
||||
time = 50
|
||||
always_availible = TRUE
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/durathread_helmet
|
||||
@@ -157,7 +269,6 @@
|
||||
reqs = list(/obj/item/stack/sheet/durathread = 4,
|
||||
/obj/item/stack/sheet/leather = 2)
|
||||
time = 30
|
||||
always_availible = TRUE
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/durathread_vest
|
||||
@@ -166,7 +277,6 @@
|
||||
reqs = list(/obj/item/stack/sheet/durathread = 6,
|
||||
/obj/item/stack/sheet/leather = 3)
|
||||
time = 50
|
||||
always_availible = TRUE
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/durathread_wintercoat
|
||||
@@ -183,5 +293,4 @@
|
||||
reqs = list(/obj/item/clothing/suit/hooded/wintercoat = 1,
|
||||
/obj/item/bedsheet/cosmos = 1)
|
||||
time = 60
|
||||
always_availible = TRUE
|
||||
category = CAT_CLOTHING
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
result = /obj/item/banner/command/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/captainparade = 1)
|
||||
/obj/item/clothing/under/rank/captain/parade = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/engineering_banner
|
||||
@@ -286,7 +286,7 @@
|
||||
result = /obj/item/banner/engineering/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/engineer = 1)
|
||||
/obj/item/clothing/under/rank/engineering/engineer = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/cargo_banner
|
||||
@@ -294,7 +294,7 @@
|
||||
result = /obj/item/banner/cargo/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/cargotech = 1)
|
||||
/obj/item/clothing/under/rank/cargo/tech = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/science_banner
|
||||
@@ -302,7 +302,7 @@
|
||||
result = /obj/item/banner/science/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/scientist = 1)
|
||||
/obj/item/clothing/under/rank/rnd/scientist = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/medical_banner
|
||||
@@ -310,7 +310,7 @@
|
||||
result = /obj/item/banner/medical/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/medical = 1)
|
||||
/obj/item/clothing/under/rank/medical/doctor = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/security_banner
|
||||
@@ -318,7 +318,7 @@
|
||||
result = /obj/item/banner/security/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/security = 1)
|
||||
/obj/item/clothing/under/rank/security/officer = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/bloodsucker/vassalrack
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
|
||||
/datum/crafting_recipe/arrow
|
||||
name = "Arrow"
|
||||
result = /obj/item/ammo_casing/caseless/arrow
|
||||
result = /obj/item/ammo_casing/caseless/arrow/wood
|
||||
time = 30
|
||||
reqs = list(/obj/item/stack/sheet/mineral/wood = 1,
|
||||
/obj/item/stack/sheet/silk = 1,
|
||||
@@ -293,17 +293,17 @@
|
||||
always_availible = FALSE
|
||||
reqs = list(/obj/item/stack/sheet/bone = 1,
|
||||
/obj/item/stack/sheet/sinew = 1,
|
||||
/obj/item/ammo_casing/caseless/arrow/ashen = 1)
|
||||
/obj/item/ammo_casing/caseless/arrow/ash = 1)
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_AMMO
|
||||
|
||||
/datum/crafting_recipe/ashen_arrow
|
||||
name = "Fire Hardened Arrow"
|
||||
result = /obj/item/ammo_casing/caseless/arrow/ashen
|
||||
result = /obj/item/ammo_casing/caseless/arrow/ash
|
||||
tools = list(TOOL_WELDER)
|
||||
time = 30
|
||||
always_availible = FALSE
|
||||
reqs = list(/obj/item/ammo_casing/caseless/arrow = 1)
|
||||
reqs = list(/obj/item/ammo_casing/caseless/arrow/wood = 1)
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_AMMO
|
||||
|
||||
|
||||
@@ -30,26 +30,23 @@
|
||||
return ..()
|
||||
|
||||
/datum/component/fantasy/RegisterWithParent()
|
||||
. = ..()
|
||||
var/obj/item/master = parent
|
||||
originalName = master.name
|
||||
modify()
|
||||
|
||||
/datum/component/fantasy/UnregisterFromParent()
|
||||
. = ..()
|
||||
unmodify()
|
||||
|
||||
/datum/component/fantasy/InheritComponent(datum/component/fantasy/newComp, original, list/arguments)
|
||||
/datum/component/fantasy/InheritComponent(datum/component/fantasy/newComp, original, quality, list/affixes, canFail, announce)
|
||||
unmodify()
|
||||
if(newComp)
|
||||
quality += newComp.quality
|
||||
canFail = newComp.canFail
|
||||
announce = newComp.announce
|
||||
src.quality += newComp.quality
|
||||
src.canFail = newComp.canFail
|
||||
src.announce = newComp.announce
|
||||
else
|
||||
arguments.len = 5 // This is done to replicate what happens when an arglist smaller than the necessary arguments is given
|
||||
quality += arguments[1]
|
||||
canFail = arguments[4] || canFail
|
||||
announce = arguments[5] || announce
|
||||
src.quality += quality
|
||||
src.canFail = canFail || src.canFail
|
||||
src.announce = announce || src.announce
|
||||
modify()
|
||||
|
||||
/datum/component/fantasy/proc/randomQuality()
|
||||
|
||||
@@ -101,11 +101,11 @@
|
||||
host_mob = null
|
||||
return ..()
|
||||
|
||||
/datum/component/nanites/InheritComponent(datum/component/nanites/new_nanites, i_am_original, list/arguments)
|
||||
/datum/component/nanites/InheritComponent(datum/component/nanites/new_nanites, i_am_original, amount, cloud)
|
||||
if(new_nanites)
|
||||
adjust_nanites(null, new_nanites.nanite_volume)
|
||||
else
|
||||
adjust_nanites(null, arguments[1]) //just add to the nanite volume
|
||||
adjust_nanites(null, amount) //just add to the nanite volume
|
||||
|
||||
/datum/component/nanites/process()
|
||||
adjust_nanites(null, regen_rate)
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
orbiters = null
|
||||
return ..()
|
||||
|
||||
/datum/component/orbiter/InheritComponent(datum/component/orbiter/newcomp, original, list/arguments)
|
||||
if(arguments)
|
||||
begin_orbit(arglist(arguments))
|
||||
/datum/component/orbiter/InheritComponent(datum/component/orbiter/newcomp, original, atom/movable/orbiter, radius, clockwise, rotation_speed, rotation_segments, pre_rotation)
|
||||
if(!newcomp)
|
||||
begin_orbit(arglist(args.Copy(3)))
|
||||
return
|
||||
// The following only happens on component transfers
|
||||
orbiters += newcomp.orbiters
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/datum/component/wearertargeting/phantomthief
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
signals = list(COMSIG_COMBAT_TOGGLED)
|
||||
signals = list(COMSIG_LIVING_COMBAT_ENABLED)
|
||||
proctype = .proc/handlefilterstuff
|
||||
var/filter_x
|
||||
var/filter_y
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_OBJ, .proc/rad_attack)
|
||||
else
|
||||
CRASH("Something that wasn't an atom was given /datum/component/radioactive")
|
||||
return
|
||||
|
||||
if(strength > RAD_MINIMUM_CONTAMINATION)
|
||||
SSradiation.warn(src)
|
||||
@@ -47,7 +46,7 @@
|
||||
if(strength <= RAD_BACKGROUND_RADIATION)
|
||||
return PROCESS_KILL
|
||||
|
||||
/datum/component/radioactive/InheritComponent(datum/component/C, i_am_original, list/arguments)
|
||||
/datum/component/radioactive/InheritComponent(datum/component/C, i_am_original, _strength, _source, _half_life, _can_contaminate)
|
||||
if(!i_am_original)
|
||||
return
|
||||
if(!hl3_release_date) // Permanently radioactive things don't get to grow stronger
|
||||
@@ -56,7 +55,7 @@
|
||||
var/datum/component/radioactive/other = C
|
||||
strength = max(strength, other.strength)
|
||||
else
|
||||
strength = max(strength, arguments[1])
|
||||
strength = max(strength, _strength)
|
||||
|
||||
/datum/component/radioactive/proc/rad_examine(datum/source, mob/user, list/examine_list)
|
||||
var/atom/master = parent
|
||||
@@ -84,4 +83,4 @@
|
||||
#undef RAD_AMOUNT_LOW
|
||||
#undef RAD_AMOUNT_MEDIUM
|
||||
#undef RAD_AMOUNT_HIGH
|
||||
#undef RAD_AMOUNT_EXTREME
|
||||
#undef RAD_AMOUNT_EXTREME
|
||||
|
||||
@@ -53,11 +53,21 @@ handles linking back and forth.
|
||||
|
||||
/datum/component/remote_materials/proc/_MakeLocal()
|
||||
silo = null
|
||||
mat_container = parent.AddComponent(/datum/component/material_container,
|
||||
list(/datum/material/iron, /datum/material/glass, /datum/material/silver, /datum/material/gold, /datum/material/diamond, /datum/material/plasma, /datum/material/uranium, /datum/material/bananium, /datum/material/titanium, /datum/material/bluespace, /datum/material/plastic),
|
||||
local_size,
|
||||
FALSE,
|
||||
/obj/item/stack)
|
||||
var/static/list/allowed_mats = list(
|
||||
/datum/material/iron,
|
||||
/datum/material/glass,
|
||||
/datum/material/silver,
|
||||
/datum/material/gold,
|
||||
/datum/material/diamond,
|
||||
/datum/material/plasma,
|
||||
/datum/material/uranium,
|
||||
/datum/material/bananium,
|
||||
/datum/material/titanium,
|
||||
/datum/material/bluespace,
|
||||
/datum/material/plastic,
|
||||
)
|
||||
|
||||
mat_container = parent.AddComponent(/datum/component/material_container, allowed_mats, local_size, allowed_types=/obj/item/stack)
|
||||
|
||||
/datum/component/remote_materials/proc/set_local_size(size)
|
||||
local_size = size
|
||||
|
||||
@@ -191,20 +191,28 @@
|
||||
|
||||
///////Yes, I said humans. No, this won't end well...//////////
|
||||
/datum/component/riding/human
|
||||
var/fireman_carrying = FALSE
|
||||
|
||||
/datum/component/riding/human/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(parent, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, .proc/on_host_unarmed_melee)
|
||||
|
||||
/datum/component/riding/human/vehicle_mob_unbuckle(datum/source, mob/living/M, force = FALSE)
|
||||
var/mob/living/carbon/human/H = parent
|
||||
H.remove_movespeed_modifier(MOVESPEED_ID_HUMAN_CARRYING)
|
||||
. = ..()
|
||||
var/mob/living/carbon/human/H = parent
|
||||
if(!length(H.buckled_mobs))
|
||||
H.remove_movespeed_modifier(MOVESPEED_ID_HUMAN_CARRYING)
|
||||
if(!fireman_carrying)
|
||||
M.Daze(25)
|
||||
REMOVE_TRAIT(M, TRAIT_MOBILITY_NOUSE, src)
|
||||
|
||||
/datum/component/riding/human/vehicle_mob_buckle(datum/source, mob/living/M, force = FALSE)
|
||||
. = ..()
|
||||
var/mob/living/carbon/human/H = parent
|
||||
H.add_movespeed_modifier(MOVESPEED_ID_HUMAN_CARRYING, multiplicative_slowdown = HUMAN_CARRY_SLOWDOWN)
|
||||
if(length(H.buckled_mobs))
|
||||
H.add_movespeed_modifier(MOVESPEED_ID_HUMAN_CARRYING, multiplicative_slowdown = fireman_carrying? FIREMAN_CARRY_SLOWDOWN : PIGGYBACK_CARRY_SLOWDOWN)
|
||||
if(fireman_carrying)
|
||||
ADD_TRAIT(M, TRAIT_MOBILITY_NOUSE, src)
|
||||
|
||||
/datum/component/riding/human/proc/on_host_unarmed_melee(atom/target)
|
||||
var/mob/living/carbon/human/H = parent
|
||||
@@ -236,11 +244,11 @@
|
||||
else
|
||||
return list(TEXT_NORTH = list(0, 6), TEXT_SOUTH = list(0, 6), TEXT_EAST = list(-6, 4), TEXT_WEST = list( 6, 4))
|
||||
|
||||
|
||||
/datum/component/riding/human/force_dismount(mob/living/user)
|
||||
var/atom/movable/AM = parent
|
||||
AM.unbuckle_mob(user)
|
||||
user.DefaultCombatKnockdown(60)
|
||||
user.Daze(50)
|
||||
user.visible_message("<span class='warning'>[AM] pushes [user] off of [AM.p_them()]!</span>")
|
||||
|
||||
/datum/component/riding/cyborg
|
||||
@@ -341,7 +349,7 @@
|
||||
var/mob/living/parent
|
||||
var/selfdeleting = FALSE
|
||||
|
||||
/obj/item/riding_offhand/dropped()
|
||||
/obj/item/riding_offhand/dropped(mob/user)
|
||||
selfdeleting = TRUE
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
src.allow_death = allow_death
|
||||
check_in_bounds() // Just in case something is being created outside of station/centcom
|
||||
|
||||
/datum/component/stationloving/InheritComponent(datum/component/stationloving/newc, original, list/arguments)
|
||||
/datum/component/stationloving/InheritComponent(datum/component/stationloving/newc, original, inform_admins, allow_death)
|
||||
if (original)
|
||||
if (istype(newc))
|
||||
if (newc)
|
||||
inform_admins = newc.inform_admins
|
||||
allow_death = newc.allow_death
|
||||
else if (LAZYLEN(arguments))
|
||||
inform_admins = arguments[1]
|
||||
else
|
||||
inform_admins = inform_admins
|
||||
|
||||
/datum/component/stationloving/proc/relocate()
|
||||
var/targetturf = find_safe_turf()
|
||||
|
||||
@@ -43,13 +43,13 @@
|
||||
master.cut_overlay(overlay)
|
||||
return ..()
|
||||
|
||||
/datum/component/thermite/InheritComponent(datum/component/thermite/newC, i_am_original, list/arguments)
|
||||
/datum/component/thermite/InheritComponent(datum/component/thermite/newC, i_am_original, _amount)
|
||||
if(!i_am_original)
|
||||
return
|
||||
if(newC)
|
||||
amount += newC.amount
|
||||
else
|
||||
amount += arguments[1]
|
||||
amount += _amount
|
||||
|
||||
/datum/component/thermite/proc/thermite_melt(mob/user)
|
||||
var/turf/master = parent
|
||||
|
||||
@@ -27,8 +27,10 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
var/datum/ui_state/checkstate
|
||||
var/compact_mode = FALSE
|
||||
var/debug = FALSE
|
||||
var/saved_player_population = 0
|
||||
var/list/filters = list()
|
||||
|
||||
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20, datum/ui_state/_checkstate)
|
||||
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20, datum/ui_state/_checkstate, datum/traitor_class/traitor_class)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
@@ -47,7 +49,10 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
RegisterSignal(parent, COMSIG_PEN_ROTATED, .proc/pen_rotation)
|
||||
|
||||
GLOB.uplinks += src
|
||||
uplink_items = get_uplink_items(gamemode, TRUE, allow_restricted)
|
||||
if(istype(traitor_class))
|
||||
filters = traitor_class.uplink_filters
|
||||
starting_tc = traitor_class.TC
|
||||
uplink_items = get_uplink_items(gamemode, TRUE, allow_restricted, filters)
|
||||
|
||||
if(_owner)
|
||||
owner = _owner
|
||||
@@ -64,6 +69,7 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
if(!lockable)
|
||||
active = TRUE
|
||||
locked = FALSE
|
||||
saved_player_population = GLOB.joined_player_list.len
|
||||
|
||||
/datum/component/uplink/InheritComponent(datum/component/uplink/U)
|
||||
lockable |= U.lockable
|
||||
@@ -113,7 +119,18 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
return
|
||||
active = TRUE
|
||||
if(user)
|
||||
//update the saved population
|
||||
var/previous_player_population = saved_player_population
|
||||
saved_player_population = GLOB.joined_player_list.len
|
||||
//if population has changed, update uplink items
|
||||
if(saved_player_population != previous_player_population)
|
||||
//make sure discounts are not rerolled
|
||||
var/old_discounts = uplink_items["Discounted Gear"]
|
||||
uplink_items = get_uplink_items(gamemode, FALSE, allow_restricted, filters)
|
||||
if(old_discounts)
|
||||
uplink_items["Discounted Gear"] = old_discounts
|
||||
ui_interact(user)
|
||||
|
||||
// an unlocked uplink blocks also opening the PDA or headset menu
|
||||
return COMPONENT_NO_INTERACT
|
||||
|
||||
@@ -186,7 +203,9 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
|
||||
if(item in buyable_items)
|
||||
var/datum/uplink_item/I = buyable_items[item]
|
||||
MakePurchase(usr, I)
|
||||
//check to make sure people cannot buy items when the player pop is below the requirement
|
||||
if(GLOB.joined_player_list.len >= I.player_minimum)
|
||||
MakePurchase(usr, I)
|
||||
. = TRUE
|
||||
if("lock")
|
||||
active = FALSE
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
RegisterSignal(current_mind, COMSIG_PRE_MIND_TRANSFER, .proc/pre_player_transfer)
|
||||
if(mastermind?.current)
|
||||
mastermind.current.audiovisual_redirect = M
|
||||
ADD_TRAIT(M, TRAIT_NO_MIDROUND_ANTAG, VIRTUAL_REALITY_TRAIT)
|
||||
|
||||
/datum/component/virtual_reality/UnregisterFromParent()
|
||||
. = ..()
|
||||
@@ -69,6 +70,7 @@
|
||||
current_mind = null
|
||||
if(mastermind?.current)
|
||||
mastermind.current.audiovisual_redirect = null
|
||||
REMOVE_TRAIT(parent, TRAIT_NO_MIDROUND_ANTAG, VIRTUAL_REALITY_TRAIT)
|
||||
|
||||
/**
|
||||
* Called when attempting to connect a mob to a virtual reality mob.
|
||||
@@ -235,7 +237,7 @@
|
||||
qdel(src)
|
||||
|
||||
/**
|
||||
* Used for recursive virtual realities shenanigeans and should be called only through the above proc.
|
||||
* Used for recursive virtual realities shenanigeans and should be called by the above proc.
|
||||
*/
|
||||
/datum/component/virtual_reality/proc/vr_in_a_vr(mob/player, deathcheck = FALSE, lethal_cleanup = FALSE)
|
||||
var/mob/M = parent
|
||||
|
||||
@@ -19,4 +19,4 @@
|
||||
UnregisterSignal(equipper, signals)
|
||||
|
||||
/datum/component/wearertargeting/proc/on_drop(datum/source, mob/user)
|
||||
UnregisterSignal(user, signals)
|
||||
UnregisterSignal(user, signals)
|
||||
|
||||
@@ -12,14 +12,13 @@
|
||||
var/permanent = FALSE
|
||||
var/last_process = 0
|
||||
|
||||
/datum/component/wet_floor/InheritComponent(datum/newcomp, orig, argslist)
|
||||
/datum/component/wet_floor/InheritComponent(datum/newcomp, orig, strength, duration_minimum, duration_add, duration_maximum, _permanent)
|
||||
if(!newcomp) //We are getting passed the arguments of a would-be new component, but not a new component
|
||||
add_wet(arglist(argslist))
|
||||
add_wet(arglist(args.Copy(3)))
|
||||
else //We are being passed in a full blown component
|
||||
var/datum/component/wet_floor/WF = newcomp //Lets make an assumption
|
||||
if(WF.gc()) //See if it's even valid, still. Also does LAZYLEN and stuff for us.
|
||||
CRASH("Wet floor component tried to inherit another, but the other was able to garbage collect while being inherited! What a waste of time!")
|
||||
return
|
||||
for(var/i in WF.time_left_list)
|
||||
add_wet(text2num(i), WF.time_left_list[i])
|
||||
|
||||
|
||||
@@ -287,7 +287,6 @@
|
||||
G.fields["gender"] = "Other"
|
||||
L.fields["blood_type"] = H.dna.blood_type
|
||||
L.fields["b_dna"] = H.dna.unique_enzymes
|
||||
L.fields["enzymes"] = H.dna.struc_enzymes
|
||||
L.fields["identity"] = H.dna.uni_identity
|
||||
L.fields["species"] = H.dna.species.type
|
||||
L.fields["features"] = H.dna.features
|
||||
|
||||
+50
-7
@@ -1,12 +1,42 @@
|
||||
/**
|
||||
* The absolute base class for everything
|
||||
*
|
||||
* A datum instantiated has no physical world prescence, use an atom if you want something
|
||||
* that actually lives in the world
|
||||
*
|
||||
* Be very mindful about adding variables to this class, they are inherited by every single
|
||||
* thing in the entire game, and so you can easily cause memory usage to rise a lot with careless
|
||||
* use of variables at this level
|
||||
*/
|
||||
/datum
|
||||
/**
|
||||
* Tick count time when this object was destroyed.
|
||||
*
|
||||
* If this is non zero then the object has been garbage collected and is awaiting either
|
||||
* a hard del by the GC subsystme, or to be autocollected (if it has no references)
|
||||
*/
|
||||
var/gc_destroyed //Time when this object was destroyed.
|
||||
var/list/active_timers //for SStimer
|
||||
var/list/datum_components //for /datum/components
|
||||
|
||||
/// Active timers with this datum as the target
|
||||
var/list/active_timers
|
||||
/// Status traits attached to this datum
|
||||
var/list/status_traits
|
||||
/// Components attached to this datum
|
||||
/// Lazy associated list in the structure of `type:component/list of components`
|
||||
var/list/datum_components
|
||||
/// Any datum registered to receive signals from this datum is in this list
|
||||
/// Lazy associated list in the structure of `signal:registree/list of registrees`
|
||||
var/list/comp_lookup //it used to be for looking up components which had registered a signal but now anything can register
|
||||
/// Lazy associated list in the structure of `signals:proctype` that are run when the datum receives that signal
|
||||
var/list/list/datum/callback/signal_procs
|
||||
/// Is this datum capable of sending signals?
|
||||
/// Set to true when a signal has been registered
|
||||
var/signal_enabled = FALSE
|
||||
|
||||
/// Datum level flags
|
||||
var/datum_flags = NONE
|
||||
|
||||
/// A weak reference to another datum
|
||||
var/datum/weakref/weak_reference
|
||||
|
||||
#ifdef TESTING
|
||||
@@ -18,9 +48,22 @@
|
||||
var/list/cached_vars
|
||||
#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.
|
||||
/**
|
||||
* Default implementation of clean-up code.
|
||||
*
|
||||
* This should be overridden to remove all references pointing to the object being destroyed, if
|
||||
* you do override it, make sure to call the parent and return it's return value by default
|
||||
*
|
||||
* Return an appropriate QDEL_HINT to modify handling of your deletion;
|
||||
* in most cases this is QDEL_HINT_QUEUE.
|
||||
*
|
||||
* The base case is responsible for doing the following
|
||||
* * Erasing timers pointing to this datum
|
||||
* * Erasing compenents on this datum
|
||||
* * Notifying datums listening to signals from this datum that we are going away
|
||||
*
|
||||
* Returns QDEL_HINT_QUEUE
|
||||
*/
|
||||
/datum/proc/Destroy(force=FALSE, ...)
|
||||
tag = null
|
||||
datum_flags &= ~DF_USE_TAG //In case something tries to REF us
|
||||
@@ -66,6 +109,8 @@
|
||||
UnregisterSignal(target, signal_procs[target])
|
||||
//END: ECS SHIT
|
||||
|
||||
SSsounds.free_datum_channels(src)
|
||||
|
||||
return QDEL_HINT_QUEUE
|
||||
|
||||
#ifdef DATUMVAR_DEBUGGING_MODE
|
||||
@@ -130,11 +175,9 @@
|
||||
if(!islist(jsonlist))
|
||||
if(!istext(jsonlist))
|
||||
CRASH("Invalid JSON")
|
||||
return
|
||||
jsonlist = json_decode(jsonlist)
|
||||
if(!islist(jsonlist))
|
||||
CRASH("Invalid JSON")
|
||||
return
|
||||
if(!jsonlist["DATUM_TYPE"])
|
||||
return
|
||||
if(!ispath(jsonlist["DATUM_TYPE"]))
|
||||
|
||||
+23
-1378
File diff suppressed because it is too large
Load Diff
@@ -61,12 +61,12 @@ Bonus
|
||||
symptom_delay_max = 60
|
||||
if(A.properties["resistance"] >= 8) //mutate twice
|
||||
power = 2
|
||||
possible_mutations = (GLOB.bad_mutations | GLOB.not_good_mutations) - GLOB.mutations_list[RACEMUT]
|
||||
possible_mutations = (GLOB.bad_mutations | GLOB.not_good_mutations) - GLOB.all_mutations[RACEMUT]
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
if(M)
|
||||
if(!M.has_dna())
|
||||
return
|
||||
archived_dna = M.dna.struc_enzymes
|
||||
archived_dna = M.dna.mutation_index
|
||||
|
||||
// Give them back their old DNA when cured.
|
||||
/datum/symptom/genetic_mutation/End(datum/disease/advance/A)
|
||||
@@ -77,5 +77,5 @@ Bonus
|
||||
if(M && archived_dna)
|
||||
if(!M.has_dna())
|
||||
return
|
||||
M.dna.struc_enzymes = archived_dna
|
||||
M.dna.mutation_index = archived_dna
|
||||
M.domutcheck()
|
||||
|
||||
@@ -257,6 +257,8 @@
|
||||
/datum/symptom/heal/coma/End(datum/disease/advance/A)
|
||||
if(!..())
|
||||
return
|
||||
if(active_coma)
|
||||
uncoma()
|
||||
REMOVE_TRAIT(A.affected_mob, TRAIT_NOCRITDAMAGE, DISEASE_TRAIT)
|
||||
|
||||
/datum/symptom/heal/coma/CanHeal(datum/disease/advance/A)
|
||||
@@ -277,7 +279,7 @@
|
||||
/datum/symptom/heal/coma/proc/coma(mob/living/M)
|
||||
if(deathgasp)
|
||||
M.emote("deathgasp")
|
||||
M.fakedeath("regenerative_coma")
|
||||
M.fakedeath("regenerative_coma", TRUE)
|
||||
M.update_stat()
|
||||
M.update_mobility()
|
||||
addtimer(CALLBACK(src, .proc/uncoma, M), 300)
|
||||
|
||||
@@ -32,16 +32,16 @@
|
||||
..()
|
||||
switch(stage)
|
||||
if(1)
|
||||
if (prob(stage_prob) && stage1)
|
||||
if (prob(stage_prob) && length(stage1))
|
||||
to_chat(affected_mob, pick(stage1))
|
||||
if(2)
|
||||
if (prob(stage_prob) && stage2)
|
||||
if (prob(stage_prob) && length(stage2))
|
||||
to_chat(affected_mob, pick(stage2))
|
||||
if(3)
|
||||
if (prob(stage_prob*2) && stage3)
|
||||
if (prob(stage_prob*2) && length(stage3))
|
||||
to_chat(affected_mob, pick(stage3))
|
||||
if(4)
|
||||
if (prob(stage_prob*2) && stage4)
|
||||
if (prob(stage_prob*2) && length(stage4))
|
||||
to_chat(affected_mob, pick(stage4))
|
||||
if(5)
|
||||
do_disease_transformation(affected_mob)
|
||||
@@ -76,9 +76,9 @@
|
||||
/datum/disease/transformation/proc/replace_banned_player(var/mob/living/new_mob) // This can run well after the mob has been transferred, so need a handle on the new mob to kill it if needed.
|
||||
set waitfor = FALSE
|
||||
|
||||
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [affected_mob.name]?", bantype, null, bantype, 50, affected_mob)
|
||||
var/list/mob/candidates = pollCandidatesForMob("Do you want to play as [affected_mob.name]?", bantype, null, bantype, 50, affected_mob)
|
||||
if(LAZYLEN(candidates))
|
||||
var/mob/dead/observer/C = pick(candidates)
|
||||
var/mob/C = pick(candidates)
|
||||
to_chat(affected_mob, "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!")
|
||||
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(affected_mob)]) to replace a jobbaned player.")
|
||||
affected_mob.ghostize(0)
|
||||
@@ -162,7 +162,7 @@
|
||||
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
|
||||
severity = DISEASE_SEVERITY_BIOHAZARD
|
||||
visibility_flags = 0
|
||||
stage1 = list()
|
||||
stage1 = null
|
||||
stage2 = list("Your joints feel stiff.", "<span class='danger'>Beep...boop..</span>")
|
||||
stage3 = list("<span class='danger'>Your joints feel very stiff.</span>", "Your skin feels loose.", "<span class='danger'>You can feel something move...inside.</span>")
|
||||
stage4 = list("<span class='danger'>Your skin feels very loose.</span>", "<span class='danger'>You can feel... something...inside you.</span>")
|
||||
@@ -195,7 +195,7 @@
|
||||
desc = "This disease changes the victim into a xenomorph."
|
||||
severity = DISEASE_SEVERITY_BIOHAZARD
|
||||
visibility_flags = 0
|
||||
stage1 = list()
|
||||
stage1 = null
|
||||
stage2 = list("Your throat feels scratchy.", "<span class='danger'>Kill...</span>")
|
||||
stage3 = list("<span class='danger'>Your throat feels very scratchy.</span>", "Your skin feels tight.", "<span class='danger'>You can feel something move...inside.</span>")
|
||||
stage4 = list("<span class='danger'>Your skin feels very tight.</span>", "<span class='danger'>Your blood boils!</span>", "<span class='danger'>You can feel... something...inside you.</span>")
|
||||
|
||||
+251
-65
@@ -2,7 +2,6 @@
|
||||
/////////////////////////// DNA DATUM
|
||||
/datum/dna
|
||||
var/unique_enzymes
|
||||
var/struc_enzymes
|
||||
var/uni_identity
|
||||
var/blood_type
|
||||
var/datum/species/species = new /datum/species/human //The type of mutant race the player is if applicable (i.e. potato-man)
|
||||
@@ -11,10 +10,13 @@
|
||||
var/nameless = FALSE
|
||||
var/custom_species //siiiiigh I guess this is important
|
||||
var/list/mutations = list() //All mutations are from now on here
|
||||
var/list/temporary_mutations = list() //Timers for temporary mutations
|
||||
var/list/temporary_mutations = list() //Temporary changes to the UE
|
||||
var/list/previous = list() //For temporary name/ui/ue/blood_type modifications
|
||||
var/mob/living/holder
|
||||
var/delete_species = TRUE //Set to FALSE when a body is scanned by a cloner to fix #38875
|
||||
var/mutation_index[DNA_MUTATION_BLOCKS] //List of which mutations this carbon has and its assigned block
|
||||
var/stability = 100
|
||||
var/scrambled = FALSE //Did we take something like mutagen? In that case we cant get our genes scanned to instantly cheese all the powers.
|
||||
|
||||
/datum/dna/New(mob/living/new_holder)
|
||||
if(istype(new_holder))
|
||||
@@ -42,8 +44,8 @@
|
||||
destination.dna.unique_enzymes = unique_enzymes
|
||||
destination.dna.uni_identity = uni_identity
|
||||
destination.dna.blood_type = blood_type
|
||||
destination.dna.features = features.Copy()
|
||||
destination.set_species(species.type, icon_update=0)
|
||||
destination.dna.features = features.Copy()
|
||||
destination.dna.real_name = real_name
|
||||
destination.dna.nameless = nameless
|
||||
destination.dna.custom_species = custom_species
|
||||
@@ -51,13 +53,14 @@
|
||||
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
|
||||
if(transfer_SE)
|
||||
destination.dna.struc_enzymes = struc_enzymes
|
||||
destination.dna.mutation_index = mutation_index
|
||||
|
||||
SEND_SIGNAL(destination, COMSIG_CARBON_IDENTITY_TRANSFERRED_TO, src, transfer_SE)
|
||||
|
||||
/datum/dna/proc/copy_dna(datum/dna/new_dna)
|
||||
new_dna.unique_enzymes = unique_enzymes
|
||||
new_dna.struc_enzymes = struc_enzymes
|
||||
new_dna.mutation_index = mutation_index
|
||||
new_dna.uni_identity = uni_identity
|
||||
new_dna.blood_type = blood_type
|
||||
new_dna.features = features.Copy()
|
||||
@@ -67,26 +70,32 @@
|
||||
new_dna.custom_species = custom_species
|
||||
new_dna.mutations = mutations.Copy()
|
||||
|
||||
/datum/dna/proc/add_mutation(mutation_name)
|
||||
var/datum/mutation/human/HM = GLOB.mutations_list[mutation_name]
|
||||
HM.on_acquiring(holder)
|
||||
//See mutation.dm for what 'class' does. 'time' is time till it removes itself in decimals. 0 for no timer
|
||||
/datum/dna/proc/add_mutation(mutation, class = MUT_OTHER, time)
|
||||
var/mutation_type = mutation
|
||||
if(istype(mutation, /datum/mutation/human))
|
||||
var/datum/mutation/human/HM = mutation
|
||||
mutation_type = HM.type
|
||||
if(get_mutation(mutation_type))
|
||||
return
|
||||
return force_give(new mutation_type (class, time, copymut = mutation))
|
||||
|
||||
/datum/dna/proc/remove_mutation(mutation_name)
|
||||
var/datum/mutation/human/HM = GLOB.mutations_list[mutation_name]
|
||||
HM.on_losing(holder)
|
||||
/datum/dna/proc/remove_mutation(mutation_type)
|
||||
return force_lose(get_mutation(mutation_type))
|
||||
|
||||
/datum/dna/proc/check_mutation(mutation_name)
|
||||
var/datum/mutation/human/HM = GLOB.mutations_list[mutation_name]
|
||||
return mutations.Find(HM)
|
||||
/datum/dna/proc/check_mutation(mutation_type)
|
||||
return get_mutation(mutation_type)
|
||||
|
||||
/datum/dna/proc/remove_all_mutations()
|
||||
remove_mutation_group(mutations)
|
||||
/datum/dna/proc/remove_all_mutations(list/classes = list(MUT_NORMAL, MUT_EXTRA, MUT_OTHER), mutadone = FALSE)
|
||||
remove_mutation_group(mutations, classes, mutadone)
|
||||
scrambled = FALSE
|
||||
|
||||
/datum/dna/proc/remove_mutation_group(list/group)
|
||||
/datum/dna/proc/remove_mutation_group(list/group, list/classes = list(MUT_NORMAL, MUT_EXTRA, MUT_OTHER), mutadone = FALSE)
|
||||
if(!group)
|
||||
return
|
||||
for(var/datum/mutation/human/HM in group)
|
||||
HM.force_lose(holder)
|
||||
if((HM.class in classes) && !(HM.mutadone_proof && mutadone))
|
||||
force_lose(HM)
|
||||
|
||||
/datum/dna/proc/generate_uni_identity()
|
||||
. = ""
|
||||
@@ -136,19 +145,49 @@
|
||||
. += random_string(DNA_BLOCK_SIZE,GLOB.hex_characters)
|
||||
return .
|
||||
|
||||
/datum/dna/proc/generate_struc_enzymes()
|
||||
var/list/sorting = new /list(DNA_STRUC_ENZYMES_BLOCKS)
|
||||
var/result = ""
|
||||
for(var/datum/mutation/human/A in GLOB.good_mutations + GLOB.bad_mutations + GLOB.not_good_mutations)
|
||||
if(A.name == RACEMUT && ismonkey(holder))
|
||||
sorting[A.dna_block] = num2hex(A.lowest_value + rand(0, 256 * 6), DNA_BLOCK_SIZE)
|
||||
mutations |= A
|
||||
else
|
||||
sorting[A.dna_block] = random_string(DNA_BLOCK_SIZE, list("0","1","2","3","4","5","6"))
|
||||
/datum/dna/proc/generate_dna_blocks()
|
||||
var/bonus
|
||||
if(species && species.inert_mutation)
|
||||
bonus = GET_INITIALIZED_MUTATION(species.inert_mutation)
|
||||
var/list/mutations_temp = GLOB.good_mutations + GLOB.bad_mutations + GLOB.not_good_mutations + bonus
|
||||
if(!LAZYLEN(mutations_temp))
|
||||
return
|
||||
mutation_index.Cut()
|
||||
shuffle_inplace(mutations_temp)
|
||||
if(ismonkey(holder))
|
||||
mutations |= new RACEMUT(MUT_NORMAL)
|
||||
mutation_index[RACEMUT] = GET_SEQUENCE(RACEMUT)
|
||||
else
|
||||
mutation_index[RACEMUT] = create_sequence(RACEMUT, FALSE)
|
||||
for(var/i in 2 to DNA_MUTATION_BLOCKS)
|
||||
var/datum/mutation/human/M = mutations_temp[i]
|
||||
mutation_index[M.type] = create_sequence(M.type, FALSE,M.difficulty)
|
||||
shuffle_inplace(mutation_index)
|
||||
|
||||
for(var/B in sorting)
|
||||
result += B
|
||||
return result
|
||||
//Used to generate original gene sequences for every mutation
|
||||
/proc/generate_gene_sequence(length=4)
|
||||
var/static/list/active_sequences = list("AT","TA","GC","CG")
|
||||
var/sequence
|
||||
for(var/i in 1 to length*DNA_SEQUENCE_LENGTH)
|
||||
sequence += pick(active_sequences)
|
||||
return sequence
|
||||
|
||||
//Used to create a chipped gene sequence
|
||||
/proc/create_sequence(mutation, active, difficulty)
|
||||
if(!difficulty)
|
||||
var/datum/mutation/human/A = GET_INITIALIZED_MUTATION(mutation) //leaves the possibility to change difficulty mid-round
|
||||
if(!A)
|
||||
return
|
||||
difficulty = A.difficulty
|
||||
difficulty += rand(-2,4)
|
||||
var/sequence = GET_SEQUENCE(mutation)
|
||||
if(active)
|
||||
return sequence
|
||||
while(difficulty)
|
||||
var/randnum = rand(1, length(sequence))
|
||||
sequence = copytext(sequence, 1, randnum) + "X" + copytext(sequence, randnum+1, length(sequence)+1)
|
||||
difficulty--
|
||||
return sequence
|
||||
|
||||
/datum/dna/proc/generate_unique_enzymes()
|
||||
. = ""
|
||||
@@ -201,12 +240,57 @@
|
||||
if(DNA_TAUR_BLOCK)
|
||||
construct_block(GLOB.taur_list.Find(features["taur"]), GLOB.taur_list.len)
|
||||
|
||||
//Please use add_mutation or activate_mutation instead
|
||||
/datum/dna/proc/force_give(datum/mutation/human/HM)
|
||||
if(holder && HM)
|
||||
if(HM.class == MUT_NORMAL)
|
||||
set_se(1, HM)
|
||||
. = HM.on_acquiring(holder)
|
||||
if(.)
|
||||
qdel(HM)
|
||||
update_instability()
|
||||
|
||||
//Use remove_mutation instead
|
||||
/datum/dna/proc/force_lose(datum/mutation/human/HM)
|
||||
if(holder && (HM in mutations))
|
||||
set_se(0, HM)
|
||||
. = HM.on_losing(holder)
|
||||
update_instability(FALSE)
|
||||
return
|
||||
|
||||
/datum/dna/proc/is_same_as(datum/dna/D)
|
||||
if(uni_identity == D.uni_identity && struc_enzymes == D.struc_enzymes && real_name == D.real_name && nameless == D.nameless && custom_species == D.custom_species)
|
||||
if(uni_identity == D.uni_identity && mutation_index == D.mutation_index && real_name == D.real_name && nameless == D.nameless && custom_species == D.custom_species)
|
||||
if(species.type == D.species.type && features == D.features && blood_type == D.blood_type)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/dna/proc/update_instability(alert=TRUE)
|
||||
stability = 100
|
||||
for(var/datum/mutation/human/M in mutations)
|
||||
if(M.class == MUT_EXTRA)
|
||||
stability -= M.instability * GET_MUTATION_STABILIZER(M)
|
||||
if(holder)
|
||||
var/message
|
||||
if(alert)
|
||||
switch(stability)
|
||||
if(70 to 90)
|
||||
message = "<span class='warning'>You shiver.</span>"
|
||||
if(60 to 69)
|
||||
message = "<span class='warning'>You feel cold.</span>"
|
||||
if(40 to 59)
|
||||
message = "<span class='warning'>You feel sick.</span>"
|
||||
if(20 to 39)
|
||||
message = "<span class='warning'>It feels like your skin is moving.</span>"
|
||||
if(1 to 19)
|
||||
message = "<span class='warning'>You can feel your cells burning.</span>"
|
||||
if(-INFINITY to 0)
|
||||
message = "<span class='boldwarning'>You can feel your DNA exploding, we need to do something fast!</span>"
|
||||
if(stability <= 0)
|
||||
holder.apply_status_effect(STATUS_EFFECT_DNA_MELT)
|
||||
if(message)
|
||||
to_chat(holder, message)
|
||||
|
||||
|
||||
//used to update dna UI, UE, and dna.real_name.
|
||||
/datum/dna/proc/update_dna_identity()
|
||||
uni_identity = generate_uni_identity()
|
||||
@@ -217,8 +301,8 @@
|
||||
blood_type = newblood_type
|
||||
unique_enzymes = generate_unique_enzymes()
|
||||
uni_identity = generate_uni_identity()
|
||||
struc_enzymes = generate_struc_enzymes()
|
||||
features = random_features()
|
||||
generate_dna_blocks()
|
||||
features = random_features(species?.id)
|
||||
|
||||
|
||||
/datum/dna/stored //subtype used by brain mob's stored_dna
|
||||
@@ -232,10 +316,10 @@
|
||||
/datum/dna/stored/check_mutation(mutation_name)
|
||||
return
|
||||
|
||||
/datum/dna/stored/remove_all_mutations()
|
||||
/datum/dna/stored/remove_all_mutations(list/classes = list(MUT_NORMAL, MUT_EXTRA, MUT_OTHER), mutadone = FALSE)
|
||||
return
|
||||
|
||||
/datum/dna/stored/remove_mutation_group(list/group)
|
||||
/datum/dna/stored/remove_mutation_group(list/group, list/classes = list(MUT_NORMAL, MUT_EXTRA, MUT_OTHER), mutadone = FALSE)
|
||||
return
|
||||
|
||||
/////////////////////////// DNA MOB-PROCS //////////////////////
|
||||
@@ -270,6 +354,7 @@
|
||||
if(icon_update)
|
||||
update_body()
|
||||
update_hair()
|
||||
update_body_parts()
|
||||
update_mutations_overlay()// no lizard with human hulk overlay please.
|
||||
|
||||
|
||||
@@ -280,11 +365,10 @@
|
||||
return dna
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/hardset_dna(ui, se, newreal_name, newblood_type, datum/species/mrace, newfeatures)
|
||||
/mob/living/carbon/human/proc/hardset_dna(ui, list/mutation_index, newreal_name, newblood_type, datum/species/mrace, newfeatures)
|
||||
|
||||
if(newfeatures)
|
||||
dna.features = newfeatures
|
||||
flavor_text = dna.features["flavor_text"] //Update the flavor_text to use new dna text
|
||||
|
||||
if(mrace)
|
||||
var/datum/species/newrace = new mrace.type
|
||||
@@ -302,10 +386,12 @@
|
||||
dna.uni_identity = ui
|
||||
updateappearance(icon_update=0)
|
||||
|
||||
if(se)
|
||||
dna.struc_enzymes = se
|
||||
if(LAZYLEN(mutation_index))
|
||||
dna.mutation_index = mutation_index.Copy()
|
||||
domutcheck()
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_HUMAN_HARDSET_DNA, ui, mutation_index, newreal_name, newblood_type, mrace, newfeatures)
|
||||
|
||||
if(mrace || newfeatures || ui)
|
||||
update_body()
|
||||
update_hair()
|
||||
@@ -326,13 +412,13 @@
|
||||
|
||||
switch(deconstruct_block(getblock(dna.uni_identity, DNA_GENDER_BLOCK), 4))
|
||||
if(G_MALE)
|
||||
gender = MALE
|
||||
set_gender(MALE, TRUE, forced = TRUE)
|
||||
if(G_FEMALE)
|
||||
gender = FEMALE
|
||||
set_gender(FEMALE, TRUE, forced = TRUE)
|
||||
if(G_PLURAL)
|
||||
gender = PLURAL
|
||||
set_gender(PLURAL, TRUE, forced = TRUE)
|
||||
else
|
||||
gender = NEUTER
|
||||
set_gender(NEUTER, TRUE, forced = TRUE)
|
||||
|
||||
/mob/living/carbon/human/updateappearance(icon_update=1, mutcolor_update=0, mutations_overlay_update=0)
|
||||
..()
|
||||
@@ -355,19 +441,63 @@
|
||||
/mob/proc/domutcheck()
|
||||
return
|
||||
|
||||
/mob/living/carbon/domutcheck(force_powers=0) //Set force_powers to 1 to bypass the power chance
|
||||
/mob/living/carbon/domutcheck()
|
||||
if(!has_dna())
|
||||
return
|
||||
|
||||
for(var/datum/mutation/human/A in GLOB.good_mutations | GLOB.bad_mutations | GLOB.not_good_mutations)
|
||||
if(ismob(A.check_block(src, force_powers)))
|
||||
for(var/mutation in dna.mutation_index)
|
||||
if(ismob(dna.check_block(mutation)))
|
||||
return //we got monkeyized/humanized, this mob will be deleted, no need to continue.
|
||||
|
||||
update_mutations_overlay()
|
||||
|
||||
/datum/dna/proc/check_block(mutation)
|
||||
var/datum/mutation/human/HM = get_mutation(mutation)
|
||||
if(check_block_string(mutation))
|
||||
if(!HM)
|
||||
. = add_mutation(mutation, MUT_NORMAL)
|
||||
return
|
||||
return force_lose(HM)
|
||||
|
||||
//Return the active mutation of a type if there is one
|
||||
/datum/dna/proc/get_mutation(A)
|
||||
for(var/datum/mutation/human/HM in mutations)
|
||||
if(HM.type == A)
|
||||
return HM
|
||||
|
||||
/datum/dna/proc/check_block_string(mutation)
|
||||
if((LAZYLEN(mutation_index) > DNA_MUTATION_BLOCKS) || !(mutation in mutation_index))
|
||||
return 0
|
||||
return is_gene_active(mutation)
|
||||
|
||||
/datum/dna/proc/is_gene_active(mutation)
|
||||
return (mutation_index[mutation] == GET_SEQUENCE(mutation))
|
||||
|
||||
/datum/dna/proc/set_se(on=TRUE, datum/mutation/human/HM)
|
||||
if(!HM || !(HM.type in mutation_index) || (LAZYLEN(mutation_index) < DNA_MUTATION_BLOCKS))
|
||||
return
|
||||
. = TRUE
|
||||
if(on)
|
||||
mutation_index[HM.type] = GET_SEQUENCE(HM.type)
|
||||
else if(GET_SEQUENCE(HM.type) == mutation_index[HM.type])
|
||||
mutation_index[HM.type] = create_sequence(HM.type, FALSE, HM.difficulty)
|
||||
|
||||
/datum/dna/proc/activate_mutation(mutation) //note that this returns a boolean and not a new mob
|
||||
if(!mutation)
|
||||
return FALSE
|
||||
var/mutation_type = mutation
|
||||
if(istype(mutation, /datum/mutation/human))
|
||||
var/datum/mutation/human/M = mutation
|
||||
mutation_type = M.type
|
||||
if(!mutation_in_sequence(mutation_type)) //cant activate what we dont have, use add_mutation
|
||||
return FALSE
|
||||
add_mutation(mutation, MUT_NORMAL)
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
/////////////////////////// DNA HELPER-PROCS //////////////////////////////
|
||||
|
||||
/proc/getleftblocks(input,blocknumber,blocksize)
|
||||
if(blocknumber > 1)
|
||||
return copytext_char(input,1,((blocksize*blocknumber)-(blocksize-1)))
|
||||
@@ -384,29 +514,47 @@
|
||||
return 0
|
||||
return getleftblocks(istring, blocknumber, blocksize) + replacement + getrightblocks(istring, blocknumber, blocksize)
|
||||
|
||||
/datum/dna/proc/mutation_in_sequence(mutation)
|
||||
if(!mutation)
|
||||
return
|
||||
if(istype(mutation, /datum/mutation/human))
|
||||
var/datum/mutation/human/HM = mutation
|
||||
if(HM.type in mutation_index)
|
||||
return TRUE
|
||||
else if(mutation in mutation_index)
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/randmut(list/candidates, difficulty = 2)
|
||||
if(!has_dna())
|
||||
return
|
||||
var/datum/mutation/human/num = pick(candidates)
|
||||
. = num.force_give(src)
|
||||
var/mutation = pick(candidates)
|
||||
. = dna.add_mutation(mutation)
|
||||
|
||||
/mob/living/carbon/proc/randmutb()
|
||||
/mob/living/carbon/proc/easy_randmut(quality = POSITIVE + NEGATIVE + MINOR_NEGATIVE, scrambled = TRUE, sequence = TRUE, exclude_monkey = TRUE)
|
||||
if(!has_dna())
|
||||
return
|
||||
var/datum/mutation/human/HM = pick((GLOB.bad_mutations | GLOB.not_good_mutations) - GLOB.mutations_list[RACEMUT])
|
||||
. = HM.force_give(src)
|
||||
var/list/mutations = list()
|
||||
if(quality & POSITIVE)
|
||||
mutations += GLOB.good_mutations
|
||||
if(quality & NEGATIVE)
|
||||
mutations += GLOB.bad_mutations
|
||||
if(quality & MINOR_NEGATIVE)
|
||||
mutations += GLOB.not_good_mutations
|
||||
var/list/possible = list()
|
||||
for(var/datum/mutation/human/A in mutations)
|
||||
if((!sequence || dna.mutation_in_sequence(A.type)) && !dna.get_mutation(A.type))
|
||||
possible += A.type
|
||||
if(exclude_monkey)
|
||||
possible.Remove(RACEMUT)
|
||||
if(LAZYLEN(possible))
|
||||
var/mutation = pick(possible)
|
||||
. = dna.activate_mutation(mutation)
|
||||
if(scrambled)
|
||||
var/datum/mutation/human/HM = dna.get_mutation(mutation)
|
||||
if(HM)
|
||||
HM.scrambled = TRUE
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/randmutg()
|
||||
if(!has_dna())
|
||||
return
|
||||
var/datum/mutation/human/HM = pick(GLOB.good_mutations)
|
||||
. = HM.force_give(src)
|
||||
|
||||
/mob/living/carbon/proc/randmutvg()
|
||||
if(!has_dna())
|
||||
return
|
||||
var/datum/mutation/human/HM = pick((GLOB.good_mutations) - GLOB.mutations_list[HULK] - GLOB.mutations_list[DWARFISM])
|
||||
. = HM.force_give(src)
|
||||
|
||||
/mob/living/carbon/proc/randmuti()
|
||||
if(!has_dna())
|
||||
@@ -429,9 +577,9 @@
|
||||
if(!M.has_dna())
|
||||
return 0
|
||||
if(se)
|
||||
for(var/i=1, i<=DNA_STRUC_ENZYMES_BLOCKS, i++)
|
||||
for(var/i=1, i<=DNA_MUTATION_BLOCKS, i++)
|
||||
if(prob(probability))
|
||||
M.dna.struc_enzymes = setblock(M.dna.struc_enzymes, i, random_string(DNA_BLOCK_SIZE, GLOB.hex_characters))
|
||||
M.dna.generate_dna_blocks()
|
||||
M.domutcheck()
|
||||
if(ui)
|
||||
for(var/i=1, i<=DNA_UNI_IDENTITY_BLOCKS, i++)
|
||||
@@ -458,3 +606,41 @@
|
||||
return value
|
||||
|
||||
/////////////////////////// DNA HELPER-PROCS
|
||||
|
||||
/mob/living/carbon/human/proc/something_horrible()
|
||||
if(!has_dna()) //shouldn't ever happen anyway so it's just in really weird cases
|
||||
return
|
||||
if(dna.stability > 0)
|
||||
return
|
||||
var/instability = -dna.stability
|
||||
dna.remove_all_mutations()
|
||||
dna.stability = 100
|
||||
if(prob(max(70-instability,0)))
|
||||
switch(rand(0,3)) //not complete and utter death
|
||||
if(0)
|
||||
monkeyize()
|
||||
if(1)
|
||||
gain_trauma(/datum/brain_trauma/severe/paralysis)
|
||||
if(2)
|
||||
corgize()
|
||||
if(3)
|
||||
to_chat(src, "<span class='notice'>Oh, we actually feel quite alright!</span>")
|
||||
else
|
||||
switch(rand(0,3))
|
||||
if(0)
|
||||
gib()
|
||||
if(1)
|
||||
dust()
|
||||
|
||||
if(2)
|
||||
death()
|
||||
petrify(INFINITY)
|
||||
if(3)
|
||||
if(prob(90))
|
||||
var/obj/item/bodypart/BP = get_bodypart(pick(BODY_ZONE_CHEST,BODY_ZONE_HEAD))
|
||||
if(BP)
|
||||
BP.dismember()
|
||||
else
|
||||
gib()
|
||||
else
|
||||
set_species(/datum/species/dullahan)
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
/**
|
||||
* A holder for simple behaviour that can be attached to many different types
|
||||
*
|
||||
* Only one element of each type is instanced during game init.
|
||||
* Otherwise acts basically like a lightweight component.
|
||||
*/
|
||||
/datum/element
|
||||
/// Option flags for element behaviour
|
||||
var/element_flags = NONE
|
||||
/**
|
||||
* The index of the first attach argument to consider for duplicate elements
|
||||
@@ -7,13 +14,17 @@
|
||||
*/
|
||||
var/id_arg_index = INFINITY
|
||||
|
||||
/// Activates the functionality defined by the element on the given target datum
|
||||
/datum/element/proc/Attach(datum/target)
|
||||
SHOULD_CALL_PARENT(1)
|
||||
if(type == /datum/element)
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
if(element_flags & ELEMENT_DETACH)
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/Detach, override = TRUE)
|
||||
|
||||
/// Deactivates the functionality defines by the element on the given datum
|
||||
/datum/element/proc/Detach(datum/source, force)
|
||||
SHOULD_CALL_PARENT(1)
|
||||
UnregisterSignal(source, COMSIG_PARENT_QDELETING)
|
||||
|
||||
/datum/element/Destroy(force)
|
||||
@@ -24,16 +35,17 @@
|
||||
|
||||
//DATUM PROCS
|
||||
|
||||
/datum/proc/AddElement(eletype, ...)
|
||||
var/datum/element/ele = SSdcs.GetElement(arglist(args))
|
||||
args[1] = src
|
||||
if(ele.Attach(arglist(args)) == ELEMENT_INCOMPATIBLE)
|
||||
CRASH("Incompatible [eletype] assigned to a [type]! args: [json_encode(args)]")
|
||||
/// Finds the singleton for the element type given and attaches it to src
|
||||
/datum/proc/_AddElement(list/arguments)
|
||||
var/datum/element/ele = SSdcs.GetElement(arguments)
|
||||
arguments[1] = src
|
||||
if(ele.Attach(arglist(arguments)) == ELEMENT_INCOMPATIBLE)
|
||||
CRASH("Incompatible [arguments[1]] assigned to a [type]! args: [json_encode(args)]")
|
||||
|
||||
/**
|
||||
* Finds the singleton for the element type given and detaches it from src
|
||||
* You only need additional arguments beyond the type if you're using ELEMENT_BESPOKE
|
||||
*/
|
||||
/datum/proc/RemoveElement(eletype, ...)
|
||||
var/datum/element/ele = SSdcs.GetElement(arglist(args))
|
||||
/datum/proc/_RemoveElement(list/arguments)
|
||||
var/datum/element/ele = SSdcs.GetElement(arguments)
|
||||
ele.Detach(src)
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
|
||||
|
||||
/datum/element/flavor_text
|
||||
element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH
|
||||
id_arg_index = 3
|
||||
var/flavor_name = "Flavor Text"
|
||||
var/list/texts_by_atom = list()
|
||||
var/addendum = "This can also be used for OOC notes and preferences!"
|
||||
var/always_show = FALSE
|
||||
var/max_len = MAX_FLAVOR_LEN
|
||||
var/can_edit = TRUE
|
||||
|
||||
/datum/element/flavor_text/Attach(datum/target, text = "", _name = "Flavor Text", _addendum, _max_len = MAX_FLAVOR_LEN, _always_show = FALSE, _edit = TRUE)
|
||||
. = ..()
|
||||
|
||||
if(. == ELEMENT_INCOMPATIBLE || !isatom(target)) //no reason why this shouldn't work on atoms too.
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
|
||||
if(_max_len)
|
||||
max_len = _max_len
|
||||
texts_by_atom[target] = copytext(text, 1, max_len)
|
||||
if(_name)
|
||||
flavor_name = _name
|
||||
if(!isnull(addendum))
|
||||
addendum = _addendum
|
||||
always_show = _always_show
|
||||
can_edit = _edit
|
||||
|
||||
RegisterSignal(target, COMSIG_PARENT_EXAMINE, .proc/show_flavor)
|
||||
|
||||
if(can_edit && ismob(target)) //but only mobs receive the proc/verb for the time being
|
||||
var/mob/M = target
|
||||
LAZYOR(GLOB.mobs_with_editable_flavor_text[M], src)
|
||||
M.verbs |= /mob/proc/manage_flavor_tests
|
||||
|
||||
/datum/element/flavor_text/Detach(atom/A)
|
||||
. = ..()
|
||||
UnregisterSignal(A, COMSIG_PARENT_EXAMINE)
|
||||
texts_by_atom -= A
|
||||
if(can_edit && ismob(A))
|
||||
var/mob/M = A
|
||||
LAZYREMOVE(GLOB.mobs_with_editable_flavor_text[M], src)
|
||||
if(!GLOB.mobs_with_editable_flavor_text[M])
|
||||
GLOB.mobs_with_editable_flavor_text -= M
|
||||
M.verbs -= /mob/proc/manage_flavor_tests
|
||||
|
||||
/datum/element/flavor_text/proc/show_flavor(atom/target, mob/user, list/examine_list)
|
||||
if(!always_show && isliving(target))
|
||||
var/mob/living/L = target
|
||||
var/unknown = L.get_visible_name() == "Unknown"
|
||||
if(!unknown && iscarbon(target))
|
||||
var/mob/living/carbon/C = L
|
||||
unknown = (C.wear_mask && (C.wear_mask.flags_inv & HIDEFACE)) || (C.head && (C.head.flags_inv & HIDEFACE))
|
||||
if(unknown)
|
||||
if(!("...?" in examine_list)) //can't think of anything better in case of multiple flavor texts.
|
||||
examine_list += "...?"
|
||||
return
|
||||
var/text = texts_by_atom[target]
|
||||
if(!text)
|
||||
return
|
||||
var/msg = replacetext(text, "\n", " ")
|
||||
if(length_char(msg) <= 40)
|
||||
examine_list += "<span class='notice'>[msg]</span>"
|
||||
else
|
||||
examine_list += "<span class='notice'>[copytext_char(msg, 1, 37)]... <a href='?src=[REF(src)];show_flavor=[REF(target)]'>More...</span></a>"
|
||||
|
||||
/datum/element/flavor_text/Topic(href, href_list)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(href_list["show_flavor"])
|
||||
var/atom/target = locate(href_list["show_flavor"])
|
||||
var/text = texts_by_atom[target]
|
||||
if(text)
|
||||
usr << browse("<HTML><HEAD><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><TITLE>[target.name]</TITLE></HEAD><BODY><TT>[replacetext(texts_by_atom[target], "\n", "<BR>")]</TT></BODY></HTML>", "window=[target.name];size=500x200")
|
||||
onclose(usr, "[target.name]")
|
||||
return TRUE
|
||||
|
||||
/mob/proc/manage_flavor_tests()
|
||||
set name = "Manage Flavor Texts"
|
||||
set desc = "Used to manage your various flavor texts."
|
||||
set category = "IC"
|
||||
|
||||
var/list/L = GLOB.mobs_with_editable_flavor_text[src]
|
||||
|
||||
if(length(L) == 1)
|
||||
var/datum/element/flavor_text/F = L[1]
|
||||
F.set_flavor(src)
|
||||
return
|
||||
|
||||
var/list/choices = list()
|
||||
|
||||
for(var/i in L)
|
||||
var/datum/element/flavor_text/F = i
|
||||
choices[F.flavor_name] = F
|
||||
|
||||
var/chosen = input(src, "Which flavor text would you like to modify?") as null|anything in choices
|
||||
if(!chosen)
|
||||
return
|
||||
var/datum/element/flavor_text/F = choices[chosen]
|
||||
F.set_flavor(src)
|
||||
|
||||
/datum/element/flavor_text/proc/set_flavor(mob/user)
|
||||
if(!(user in texts_by_atom))
|
||||
return FALSE
|
||||
|
||||
var/lower_name = lowertext(flavor_name)
|
||||
var/new_text = stripped_multiline_input(user, "Set the [lower_name] displayed on 'examine'. [addendum]", flavor_name, texts_by_atom[usr], max_len, TRUE)
|
||||
if(!isnull(new_text) && (user in texts_by_atom))
|
||||
texts_by_atom[user] = html_decode(new_text)
|
||||
to_chat(src, "Your [lower_name] has been updated.")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//subtypes with additional hooks for DNA and preferences.
|
||||
/datum/element/flavor_text/carbon
|
||||
//list of antagonists etcetera that should have nothing to do with people's snowflakes.
|
||||
var/static/list/i_dont_even_know_who_you_are = typecacheof(list(/datum/antagonist/abductor, /datum/antagonist/ert,
|
||||
/datum/antagonist/nukeop, /datum/antagonist/wizard))
|
||||
|
||||
/datum/element/flavor_text/carbon/Attach(datum/target, text = "", _name = "Flavor Text", _addendum, _max_len = MAX_FLAVOR_LEN, _always_show = FALSE, _edit = TRUE)
|
||||
if(!iscarbon(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
. = ..()
|
||||
if(. == ELEMENT_INCOMPATIBLE)
|
||||
return
|
||||
RegisterSignal(target, COMSIG_CARBON_IDENTITY_TRANSFERRED_TO, .proc/update_dna_flavor_text)
|
||||
RegisterSignal(target, COMSIG_MOB_ANTAG_ON_GAIN, .proc/on_antag_gain)
|
||||
if(ishuman(target))
|
||||
RegisterSignal(target, COMSIG_HUMAN_PREFS_COPIED_TO, .proc/update_prefs_flavor_text)
|
||||
RegisterSignal(target, COMSIG_HUMAN_HARDSET_DNA, .proc/update_dna_flavor_text)
|
||||
RegisterSignal(target, COMSIG_HUMAN_ON_RANDOMIZE, .proc/unset_flavor)
|
||||
|
||||
/datum/element/flavor_text/carbon/Detach(mob/living/carbon/C)
|
||||
. = ..()
|
||||
UnregisterSignal(C, list(COMSIG_CARBON_IDENTITY_TRANSFERRED_TO, COMSIG_MOB_ANTAG_ON_GAIN, COMSIG_HUMAN_PREFS_COPIED_TO, COMSIG_HUMAN_HARDSET_DNA, COMSIG_HUMAN_ON_RANDOMIZE))
|
||||
|
||||
/datum/element/flavor_text/carbon/proc/update_dna_flavor_text(mob/living/carbon/C)
|
||||
texts_by_atom[C] = C.dna.features["flavor_text"]
|
||||
|
||||
/datum/element/flavor_text/carbon/proc/update_prefs_flavor_text(mob/living/carbon/human/H, datum/preferences/P, icon_updates = TRUE, roundstart_checks = TRUE)
|
||||
texts_by_atom[H] = P.features["flavor_text"]
|
||||
|
||||
/datum/element/flavor_text/carbon/set_flavor(mob/living/carbon/user)
|
||||
. = ..()
|
||||
if(. && user.dna)
|
||||
user.dna.features["flavor_text"] = texts_by_atom[user]
|
||||
|
||||
/datum/element/flavor_text/carbon/proc/unset_flavor(mob/living/carbon/user)
|
||||
texts_by_atom[user] = ""
|
||||
|
||||
/datum/element/flavor_text/carbon/proc/on_antag_gain(mob/living/carbon/user, datum/antagonist/antag)
|
||||
if(is_type_in_typecache(antag, i_dont_even_know_who_you_are))
|
||||
texts_by_atom[user] = ""
|
||||
if(user.dna)
|
||||
user.dna.features["flavor_text"] = ""
|
||||
@@ -1,57 +1,54 @@
|
||||
/datum/element/ghost_role_eligibility
|
||||
element_flags = ELEMENT_DETACH
|
||||
var/list/timeouts = list()
|
||||
var/list/mob/eligible_mobs = list()
|
||||
GLOBAL_LIST_EMPTY(ghost_eligible_mobs)
|
||||
|
||||
/datum/element/ghost_role_eligibility/Attach(datum/target,penalize = FALSE)
|
||||
GLOBAL_LIST_EMPTY(client_ghost_timeouts)
|
||||
|
||||
/datum/element/ghost_role_eligibility
|
||||
element_flags = ELEMENT_DETACH | ELEMENT_BESPOKE
|
||||
id_arg_index = 2
|
||||
var/penalizing = FALSE
|
||||
var/free_ghost = FALSE
|
||||
|
||||
/datum/element/ghost_role_eligibility/Attach(datum/target,free_ghosting = FALSE, penalize_on_ghost = FALSE)
|
||||
. = ..()
|
||||
if(!ismob(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
penalizing = penalize_on_ghost
|
||||
free_ghost = free_ghosting
|
||||
var/mob/M = target
|
||||
if(!(M in eligible_mobs))
|
||||
eligible_mobs += M
|
||||
if(penalize) //penalizing them from making a ghost role / midround antag comeback right away.
|
||||
var/penalty = CONFIG_GET(number/suicide_reenter_round_timer) MINUTES
|
||||
var/roundstart_quit_limit = CONFIG_GET(number/roundstart_suicide_time_limit) MINUTES
|
||||
if(world.time < roundstart_quit_limit) //add up the time difference to their antag rolling penalty if they quit before half a (ingame) hour even passed.
|
||||
penalty += roundstart_quit_limit - world.time
|
||||
if(penalty)
|
||||
penalty += world.realtime
|
||||
var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes
|
||||
if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime)
|
||||
penalty = CANT_REENTER_ROUND
|
||||
if(!(M.ckey in timeouts))
|
||||
timeouts += M.ckey
|
||||
timeouts[M.ckey] = 0
|
||||
else if(timeouts[M.ckey] == CANT_REENTER_ROUND)
|
||||
return
|
||||
timeouts[M.ckey] = max(timeouts[M.ckey],penalty)
|
||||
if(!(M in GLOB.ghost_eligible_mobs))
|
||||
GLOB.ghost_eligible_mobs += M
|
||||
RegisterSignal(M, COMSIG_MOB_GHOSTIZE, .proc/get_ghost_flags)
|
||||
|
||||
/datum/element/ghost_role_eligibility/Detach(mob/M)
|
||||
. = ..()
|
||||
if(M in eligible_mobs)
|
||||
eligible_mobs -= M
|
||||
if(M in GLOB.ghost_eligible_mobs)
|
||||
GLOB.ghost_eligible_mobs -= M
|
||||
UnregisterSignal(M, COMSIG_MOB_GHOSTIZE)
|
||||
|
||||
/datum/element/ghost_role_eligibility/proc/get_all_ghost_role_eligible(silent = FALSE)
|
||||
/proc/get_all_ghost_role_eligible(silent = FALSE)
|
||||
var/list/candidates = list()
|
||||
for(var/m in eligible_mobs)
|
||||
for(var/m in GLOB.ghost_eligible_mobs)
|
||||
var/mob/M = m
|
||||
if(M.can_reenter_round(TRUE))
|
||||
candidates += M
|
||||
return candidates
|
||||
|
||||
/mob/proc/can_reenter_round(silent = FALSE)
|
||||
var/datum/element/ghost_role_eligibility/eli = SSdcs.GetElement(/datum/element/ghost_role_eligibility)
|
||||
return eli.can_reenter_round(src,silent)
|
||||
|
||||
/datum/element/ghost_role_eligibility/proc/can_reenter_round(var/mob/M,silent = FALSE)
|
||||
if(!(M in eligible_mobs))
|
||||
if(!(src in GLOB.ghost_eligible_mobs))
|
||||
return FALSE
|
||||
if(!(M.ckey in timeouts))
|
||||
if(!(ckey in GLOB.client_ghost_timeouts))
|
||||
return TRUE
|
||||
var/timeout = timeouts[M.ckey]
|
||||
var/timeout = GLOB.client_ghost_timeouts[ckey]
|
||||
if(timeout != CANT_REENTER_ROUND && timeout <= world.realtime)
|
||||
return TRUE
|
||||
if(!silent && M.client)
|
||||
to_chat(M, "<span class='warning'>You are unable to reenter the round[timeout != CANT_REENTER_ROUND ? " yet. Your ghost role blacklist will expire in [DisplayTimeText(timeout - world.realtime)]" : ""].</span>")
|
||||
if(!silent && client)
|
||||
to_chat(src, "<span class='warning'>You are unable to reenter the round[timeout != CANT_REENTER_ROUND ? " yet. Your ghost role blacklist will expire in [DisplayTimeText(timeout - world.realtime)]" : ""].</span>")
|
||||
return FALSE
|
||||
|
||||
/datum/element/ghost_role_eligibility/proc/get_ghost_flags()
|
||||
. = 0
|
||||
if(!penalizing)
|
||||
. |= COMPONENT_DO_NOT_PENALIZE_GHOSTING
|
||||
if(free_ghost)
|
||||
. |= COMPONENT_FREE_GHOSTING
|
||||
return .
|
||||
|
||||
@@ -8,18 +8,18 @@
|
||||
var/inv_slots
|
||||
var/proctype //if present, will be invoked on headwear generation.
|
||||
|
||||
/datum/element/mob_holder/Attach(datum/target, _worn_state, _alt_worn, _right_hand, _left_hand, _inv_slots = NONE, _proctype)
|
||||
/datum/element/mob_holder/Attach(datum/target, worn_state, alt_worn, right_hand, left_hand, inv_slots = NONE, proctype)
|
||||
. = ..()
|
||||
|
||||
if(!isliving(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
|
||||
worn_state = _worn_state
|
||||
alt_worn = _alt_worn
|
||||
right_hand = _right_hand
|
||||
left_hand = _left_hand
|
||||
inv_slots = _inv_slots
|
||||
proctype = _proctype
|
||||
src.worn_state = worn_state
|
||||
src.alt_worn = alt_worn
|
||||
src.right_hand = right_hand
|
||||
src.left_hand = left_hand
|
||||
src.inv_slots = inv_slots
|
||||
src.proctype = proctype
|
||||
|
||||
RegisterSignal(target, COMSIG_CLICK_ALT, .proc/mob_try_pickup)
|
||||
RegisterSignal(target, COMSIG_PARENT_EXAMINE, .proc/on_examine)
|
||||
@@ -71,11 +71,12 @@
|
||||
name = "bugged mob"
|
||||
desc = "Yell at coderbrush."
|
||||
icon = null
|
||||
alternate_worn_icon = 'icons/mob/animals_held.dmi'
|
||||
mob_overlay_icon = 'icons/mob/animals_held.dmi'
|
||||
righthand_file = 'icons/mob/animals_held_rh.dmi'
|
||||
lefthand_file = 'icons/mob/animals_held_lh.dmi'
|
||||
icon_state = ""
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
dynamic_hair_suffix = ""
|
||||
var/mob/living/held_mob
|
||||
|
||||
/obj/item/clothing/head/mob_holder/Initialize(mapload, mob/living/target, worn_state, alt_worn, right_hand, left_hand, slots = NONE)
|
||||
@@ -85,7 +86,7 @@
|
||||
assimilate(target)
|
||||
|
||||
if(alt_worn)
|
||||
alternate_worn_icon = alt_worn
|
||||
mob_overlay_icon = alt_worn
|
||||
if(worn_state)
|
||||
item_state = worn_state
|
||||
icon_state = worn_state
|
||||
@@ -138,7 +139,7 @@
|
||||
destination = get_turf(loc)
|
||||
AM.forceMove(destination)
|
||||
|
||||
/obj/item/clothing/head/mob_holder/dropped()
|
||||
/obj/item/clothing/head/mob_holder/dropped(mob/user)
|
||||
. = ..()
|
||||
if(held_mob && isturf(loc))//don't release on soft-drops
|
||||
release()
|
||||
@@ -162,6 +163,11 @@
|
||||
L.visible_message("<span class='warning'>[held_mob] escapes from [L]!</span>", "<span class='warning'>[held_mob] escapes your grip!</span>")
|
||||
release()
|
||||
|
||||
/obj/item/clothing/head/mob_holder/mob_can_equip(mob/living/M, mob/living/equipper, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE)
|
||||
if(!ishuman(M)) //monkeys holding monkeys holding monkeys...
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/head/mob_holder/assume_air(datum/gas_mixture/env)
|
||||
var/atom/location = loc
|
||||
if(!loc)
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/datum/element/spellcasting //allows to cast certain spells or skip requirements.
|
||||
element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH
|
||||
id_arg_index = 2
|
||||
var/cast_flags
|
||||
var/cast_slots
|
||||
var/list/users_by_item = list()
|
||||
var/list/stacked_spellcasting_by_user = list()
|
||||
|
||||
/datum/element/spellcasting/Attach(datum/target, _flags, _slots)
|
||||
. = ..()
|
||||
if(isitem(target))
|
||||
RegisterSignal(target, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
|
||||
RegisterSignal(target, COMSIG_ITEM_DROPPED, .proc/on_drop)
|
||||
else if(ismob(target))
|
||||
RegisterSignal(target, COMSIG_MOB_SPELL_CAST_CHECK, .proc/on_cast)
|
||||
stacked_spellcasting_by_user[target]++
|
||||
else
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
cast_flags = _flags
|
||||
cast_slots = _slots
|
||||
|
||||
/datum/element/spellcasting/Detach(datum/target)
|
||||
. = ..()
|
||||
UnregisterSignal(target, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED, COMSIG_MOB_SPELL_CAST_CHECK))
|
||||
if(users_by_item[target])
|
||||
var/mob/user = users_by_item[target]
|
||||
stacked_spellcasting_by_user[user]--
|
||||
if(!stacked_spellcasting_by_user[user])
|
||||
stacked_spellcasting_by_user -= user
|
||||
UnregisterSignal(user, COMSIG_MOB_SPELL_CAST_CHECK)
|
||||
else if(ismob(target))
|
||||
stacked_spellcasting_by_user[target]--
|
||||
if(!stacked_spellcasting_by_user[target])
|
||||
stacked_spellcasting_by_user -= target
|
||||
|
||||
/datum/element/spellcasting/proc/on_equip(datum/source, mob/equipper, slot)
|
||||
if(!(slot in cast_slots))
|
||||
return
|
||||
users_by_item[source] = equipper
|
||||
if(!stacked_spellcasting_by_user[equipper])
|
||||
RegisterSignal(equipper, COMSIG_MOB_SPELL_CAST_CHECK, .proc/on_cast)
|
||||
stacked_spellcasting_by_user[equipper]++
|
||||
|
||||
/datum/element/spellcasting/proc/on_drop(datum/source, mob/user)
|
||||
if(!users_by_item[source])
|
||||
return
|
||||
users_by_item -= source
|
||||
stacked_spellcasting_by_user[user]--
|
||||
if(!stacked_spellcasting_by_user[user])
|
||||
stacked_spellcasting_by_user -= user
|
||||
UnregisterSignal(user, COMSIG_MOB_SPELL_CAST_CHECK)
|
||||
|
||||
/datum/element/spellcasting/proc/on_cast(mob/caster, obj/effect/proc_holder/spell)
|
||||
return cast_flags
|
||||
@@ -15,4 +15,4 @@
|
||||
|
||||
/datum/element/sword_point/proc/point(datum/source, atom/target, mob/user, proximity_flag, params)
|
||||
if(!proximity_flag && ismob(target))
|
||||
user.visible_message("<span class='notice'>[user] points the tip of [src] at [target].</span>", "<span class='notice'>You point the tip of [src] at [target].</span>")
|
||||
user.visible_message("<span class='notice'>[user] points the tip of [source] at [target].</span>", "<span class='notice'>You point the tip of [source] at [target].</span>")
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
var/list/atoms_cache = output_atoms
|
||||
var/sound/S = sound(soundfile)
|
||||
if(direct)
|
||||
S.channel = open_sound_channel()
|
||||
S.channel = SSsounds.random_available_channel()
|
||||
S.volume = volume
|
||||
for(var/i in 1 to atoms_cache.len)
|
||||
var/atom/thing = atoms_cache[i]
|
||||
|
||||
@@ -5,23 +5,20 @@
|
||||
var/id = "" //ID, used by mind/has_martialartcode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proccode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proccode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proccode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proccode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proc
|
||||
var/current_target
|
||||
var/datum/martial_art/base // The permanent style. This will be null unless the martial art is temporary
|
||||
var/deflection_chance = 0 //Chance to deflect projectiles
|
||||
var/reroute_deflection = FALSE //Delete the bullet, or actually deflect it in some direction?
|
||||
var/block_chance = 0 //Chance to block melee attacks using items while on throw mode.
|
||||
var/dodge_chance = 0
|
||||
var/restraining = 0 //used in cqc's disarm_act to check if the disarmed is being restrained and so whether they should be put in a chokehold or not
|
||||
var/help_verb
|
||||
var/pacifism_check = TRUE //are the martial arts combos/attacks unable to be used by pacifist.
|
||||
var/allow_temp_override = TRUE //if this martial art can be overridden by temporary martial arts
|
||||
|
||||
/datum/martial_art/proc/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/proc/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/proc/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/proc/can_use(mob/living/carbon/human/H)
|
||||
return TRUE
|
||||
@@ -38,50 +35,16 @@
|
||||
current_target = new_target
|
||||
streak = ""
|
||||
|
||||
/datum/martial_art/proc/basic_hit(mob/living/carbon/human/A,mob/living/carbon/human/D)
|
||||
|
||||
/datum/martial_art/proc/damage_roll(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
//Here we roll for our damage to be added into the damage var in the various attack procs. This is changed depending on whether we are in combat mode, lying down, or if our target is in combat mode.
|
||||
var/damage = rand(A.dna.species.punchdamagelow, A.dna.species.punchdamagehigh)
|
||||
|
||||
var/atk_verb = A.dna.species.attack_verb
|
||||
if(D.lying)
|
||||
atk_verb = "kick"
|
||||
|
||||
switch(atk_verb)
|
||||
if("kick")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
if("slash")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_CLAW)
|
||||
if("smash")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_SMASH)
|
||||
else
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
|
||||
if(!damage)
|
||||
playsound(D.loc, A.dna.species.miss_sound, 25, 1, -1)
|
||||
D.visible_message("<span class='warning'>[A] has attempted to [atk_verb] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] has attempted to [atk_verb] [D]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
log_combat(A, D, "attempted to [atk_verb]")
|
||||
return 0
|
||||
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
|
||||
var/armor_block = D.run_armor_check(affecting, "melee")
|
||||
|
||||
playsound(D.loc, A.dna.species.attack_sound, 25, 1, -1)
|
||||
D.visible_message("<span class='danger'>[A] has [atk_verb]ed [D]!</span>", \
|
||||
"<span class='userdanger'>[A] has [atk_verb]ed [D]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
|
||||
D.apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
|
||||
log_combat(A, D, "punched")
|
||||
|
||||
if((D.stat != DEAD) && damage >= A.dna.species.punchstunthreshold)
|
||||
D.visible_message("<span class='danger'>[A] has knocked [D] down!!</span>", \
|
||||
"<span class='userdanger'>[A] has knocked [D] down!</span>")
|
||||
D.apply_effect(40, EFFECT_KNOCKDOWN, armor_block)
|
||||
D.forcesay(GLOB.hit_appends)
|
||||
else if(D.lying)
|
||||
D.forcesay(GLOB.hit_appends)
|
||||
return 1
|
||||
if(!(D.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
|
||||
damage *= 1.5
|
||||
if(!CHECK_MOBILITY(A, MOBILITY_STAND))
|
||||
damage *= 0.5
|
||||
if(!(A.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
|
||||
damage *= 0.25
|
||||
return damage
|
||||
|
||||
/datum/martial_art/proc/teach(mob/living/carbon/human/H, make_temporary = FALSE)
|
||||
if(!istype(H) || !H.mind)
|
||||
@@ -98,6 +61,7 @@
|
||||
if(help_verb)
|
||||
H.verbs += help_verb
|
||||
H.mind.martial_art = src
|
||||
ADD_TRAIT(H, TRAIT_PUGILIST, MARTIAL_ARTIST_TRAIT)
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/proc/store(datum/martial_art/M,mob/living/carbon/human/H)
|
||||
@@ -116,8 +80,13 @@
|
||||
else
|
||||
var/datum/martial_art/X = H.mind.default_martial_art
|
||||
X.teach(H)
|
||||
|
||||
REMOVE_TRAIT(H, TRAIT_PUGILIST, MARTIAL_ARTIST_TRAIT)
|
||||
|
||||
/datum/martial_art/proc/on_remove(mob/living/carbon/human/H)
|
||||
if(help_verb)
|
||||
H.verbs -= help_verb
|
||||
return
|
||||
|
||||
///Gets called when a projectile hits the owner. Returning anything other than BULLET_ACT_HIT will stop the projectile from hitting the mob.
|
||||
/datum/martial_art/proc/on_projectile_hit(mob/living/carbon/human/A, obj/item/projectile/P, def_zone)
|
||||
return BULLET_ACT_HIT
|
||||
@@ -16,16 +16,13 @@
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
|
||||
var/atk_verb = pick("left hook","right hook","straight punch")
|
||||
|
||||
var/damage = rand(10, 13)
|
||||
var/extra_damage = rand(A.dna.species.punchdamagelow, A.dna.species.punchdamagehigh)
|
||||
var/extra_damage = damage_roll(A,D)
|
||||
if(extra_damage == A.dna.species.punchdamagelow)
|
||||
playsound(D.loc, A.dna.species.miss_sound, 25, 1, -1)
|
||||
D.visible_message("<span class='warning'>[A] has attempted to [atk_verb] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] has attempted to [atk_verb] [D]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
log_combat(A, D, "attempted to hit", atk_verb)
|
||||
return TRUE
|
||||
damage += extra_damage
|
||||
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
|
||||
var/armor_block = D.run_armor_check(affecting, "melee")
|
||||
@@ -35,9 +32,9 @@
|
||||
D.visible_message("<span class='danger'>[A] has [atk_verb]ed [D]!</span>", \
|
||||
"<span class='userdanger'>[A] has [atk_verb]ed [D]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
|
||||
D.apply_damage(damage, STAMINA, affecting, armor_block)
|
||||
D.apply_damage(rand(10,13) + extra_damage, STAMINA, affecting, armor_block)
|
||||
log_combat(A, D, "punched (boxing) ")
|
||||
if(D.getStaminaLoss() > 100)
|
||||
if(D.getStaminaLoss() > 100 && istype(D.mind?.martial_art, /datum/martial_art/boxing))
|
||||
var/knockout_prob = (D.getStaminaLoss() + rand(-15,15))*0.75
|
||||
if((D.stat != DEAD) && prob(knockout_prob))
|
||||
D.visible_message("<span class='danger'>[A] has knocked [D] out with a haymaker!</span>", \
|
||||
|
||||
+25
-17
@@ -42,11 +42,12 @@
|
||||
/datum/martial_art/cqc/proc/Slam(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
var/damage = (damage_roll(A,D) + 5)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
D.visible_message("<span class='warning'>[A] slams [D] into the ground!</span>", \
|
||||
"<span class='userdanger'>[A] slams you into the ground!</span>")
|
||||
playsound(get_turf(A), 'sound/weapons/slam.ogg', 50, 1, -1)
|
||||
D.apply_damage(10, BRUTE)
|
||||
D.apply_damage(damage, BRUTE)
|
||||
D.DefaultCombatKnockdown(120)
|
||||
log_combat(A, D, "slammed (CQC)")
|
||||
return TRUE
|
||||
@@ -54,29 +55,33 @@
|
||||
/datum/martial_art/cqc/proc/Kick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] back!</span>", \
|
||||
"<span class='userdanger'>[A] kicks you back!</span>")
|
||||
playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
|
||||
var/atom/throw_target = get_edge_target_turf(D, A.dir)
|
||||
D.throw_at(throw_target, 1, 14, A)
|
||||
D.apply_damage(10, BRUTE)
|
||||
log_combat(A, D, "kicked (CQC)")
|
||||
var/damage = damage_roll(A,D)
|
||||
if(!CHECK_MOBILITY(D, MOBILITY_STAND) && CHECK_MOBILITY(D, MOBILITY_USE))
|
||||
log_combat(A, D, "knocked out (Head kick)(CQC)")
|
||||
D.visible_message("<span class='warning'>[A] kicks [D]'s head, knocking [D.p_them()] out!</span>", \
|
||||
"<span class='userdanger'>[A] kicks your head, knocking you out!</span>")
|
||||
playsound(get_turf(A), 'sound/weapons/genhit1.ogg', 50, 1, -1)
|
||||
D.SetSleeping(300)
|
||||
D.adjustOrganLoss(ORGAN_SLOT_BRAIN, 15, 150)
|
||||
D.apply_damage(damage + 5, BRUTE)
|
||||
var/atom/throw_target = get_edge_target_turf(D, A.dir)
|
||||
D.throw_at(throw_target, 1, 14, A)
|
||||
D.adjustOrganLoss(ORGAN_SLOT_BRAIN, damage + 10, 150)
|
||||
else
|
||||
D.visible_message("<span class='warning'>[A] kicks [D]!</span>", \
|
||||
"<span class='userdanger'>[A] kicks you!</span>")
|
||||
playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
|
||||
D.Dizzy(damage)
|
||||
D.apply_damage(damage + 15, BRUTE)
|
||||
log_combat(A, D, "kicked (CQC)")
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/cqc/proc/Pressure(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
var/damage = (damage_roll(A,D) + 55)
|
||||
log_combat(A, D, "pressured (CQC)")
|
||||
D.visible_message("<span class='warning'>[A] punches [D]'s neck!</span>")
|
||||
D.adjustStaminaLoss(60)
|
||||
D.apply_damage(damage, STAMINA)
|
||||
playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
|
||||
return TRUE
|
||||
|
||||
@@ -85,11 +90,12 @@
|
||||
return
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
var/damage = (damage_roll(A,D) + 15)
|
||||
if(!D.stat)
|
||||
log_combat(A, D, "restrained (CQC)")
|
||||
D.visible_message("<span class='warning'>[A] locks [D] into a restraining position!</span>", \
|
||||
"<span class='userdanger'>[A] locks you into a restraining position!</span>")
|
||||
D.adjustStaminaLoss(20)
|
||||
D.apply_damage(damage, STAMINA)
|
||||
D.Stun(100)
|
||||
restraining = TRUE
|
||||
addtimer(VARSET_CALLBACK(src, restraining, FALSE), 50, TIMER_UNIQUE)
|
||||
@@ -98,6 +104,7 @@
|
||||
/datum/martial_art/cqc/proc/Consecutive(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
var/damage = damage_roll(A,D)
|
||||
if(!D.stat)
|
||||
log_combat(A, D, "consecutive CQC'd (CQC)")
|
||||
D.visible_message("<span class='warning'>[A] strikes [D]'s abdomen, neck and back consecutively</span>", \
|
||||
@@ -106,8 +113,8 @@
|
||||
var/obj/item/I = D.get_active_held_item()
|
||||
if(I && D.temporarilyRemoveItemFromInventory(I))
|
||||
A.put_in_hands(I)
|
||||
D.adjustStaminaLoss(50)
|
||||
D.apply_damage(25, BRUTE)
|
||||
D.apply_damage(damage + 45, STAMINA)
|
||||
D.apply_damage(damage + 20, BRUTE)
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/cqc/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
@@ -135,7 +142,7 @@
|
||||
log_combat(A, D, "attacked (CQC)")
|
||||
A.do_attack_animation(D)
|
||||
var/picked_hit_type = pick("CQC'd", "Big Bossed")
|
||||
var/bonus_damage = 13
|
||||
var/bonus_damage = (damage_roll(A,D) + 7)
|
||||
if(!CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
bonus_damage += 5
|
||||
picked_hit_type = "stomps on"
|
||||
@@ -151,7 +158,7 @@
|
||||
D.visible_message("<span class='warning'>[A] leg sweeps [D]!", \
|
||||
"<span class='userdanger'>[A] leg sweeps you!</span>")
|
||||
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
|
||||
D.apply_damage(10, BRUTE)
|
||||
D.apply_damage(bonus_damage, BRUTE)
|
||||
D.DefaultCombatKnockdown(60)
|
||||
log_combat(A, D, "sweeped (CQC)")
|
||||
return TRUE
|
||||
@@ -161,6 +168,7 @@
|
||||
return FALSE
|
||||
add_to_streak("D",D)
|
||||
var/obj/item/I = null
|
||||
var/damage = (damage_roll(A,D)*0.5)
|
||||
if(check_streak(A,D))
|
||||
return TRUE
|
||||
if(prob(65))
|
||||
@@ -172,7 +180,7 @@
|
||||
if(I && D.temporarilyRemoveItemFromInventory(I))
|
||||
A.put_in_hands(I)
|
||||
D.Jitter(2)
|
||||
D.apply_damage(5, BRUTE)
|
||||
D.apply_damage(damage, BRUTE)
|
||||
else
|
||||
D.visible_message("<span class='danger'>[A] attempted to disarm [D]!</span>", \
|
||||
"<span class='userdanger'>[A] attempted to disarm [D]!</span>")
|
||||
|
||||
@@ -84,64 +84,71 @@
|
||||
if("neck_chop")
|
||||
streak = ""
|
||||
neck_chop(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if("leg_sweep")
|
||||
streak = ""
|
||||
leg_sweep(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if("quick_choke")//is actually lung punch
|
||||
streak = ""
|
||||
quick_choke(A,D)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/krav_maga/proc/leg_sweep(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(BODY_ZONE_CHEST)
|
||||
var/armor_block = D.run_armor_check(affecting, "melee")
|
||||
var/damage = damage_roll(A,D)
|
||||
if(!CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
return 0
|
||||
return FALSE
|
||||
D.visible_message("<span class='warning'>[A] leg sweeps [D]!</span>", \
|
||||
"<span class='userdanger'>[A] leg sweeps you!</span>")
|
||||
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
|
||||
D.apply_damage(5, BRUTE)
|
||||
D.DefaultCombatKnockdown(40, override_hardstun = 0.01, override_stamdmg = 25)
|
||||
D.apply_damage(damage + 25, STAMINA, affecting, armor_block)
|
||||
D.DefaultCombatKnockdown(80, override_hardstun = 1, override_stamdmg = 0)
|
||||
log_combat(A, D, "leg sweeped")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/krav_maga/proc/quick_choke(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)//is actually lung punch
|
||||
var/damage = damage_roll(A,D)
|
||||
D.visible_message("<span class='warning'>[A] pounds [D] on the chest!</span>", \
|
||||
"<span class='userdanger'>[A] slams your chest! You can't breathe!</span>")
|
||||
playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, 1, -1)
|
||||
if(D.losebreath <= 10)
|
||||
D.losebreath = CLAMP(D.losebreath + 5, 0, 10)
|
||||
D.adjustOxyLoss(10)
|
||||
D.adjustOxyLoss(damage + 5)
|
||||
log_combat(A, D, "quickchoked")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/krav_maga/proc/neck_chop(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
var/damage = (damage_roll(A,D)*0.5)
|
||||
D.visible_message("<span class='warning'>[A] karate chops [D]'s neck!</span>", \
|
||||
"<span class='userdanger'>[A] karate chops your neck, rendering you unable to speak!</span>")
|
||||
playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, 1, -1)
|
||||
D.apply_damage(5, BRUTE)
|
||||
D.apply_damage(damage, BRUTE)
|
||||
if(D.silent <= 10)
|
||||
D.silent = CLAMP(D.silent + 10, 0, 10)
|
||||
log_combat(A, D, "neck chopped")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/krav_maga/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return TRUE
|
||||
log_combat(A, D, "grabbed (Krav Maga)")
|
||||
..()
|
||||
|
||||
/datum/martial_art/krav_maga/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
|
||||
var/armor_block = D.run_armor_check(affecting, "melee")
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return TRUE
|
||||
log_combat(A, D, "punched")
|
||||
var/picked_hit_type = pick("punches", "kicks")
|
||||
var/bonus_damage = 10
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
bonus_damage += 5
|
||||
var/bonus_damage = damage_roll(A,D)
|
||||
if(!CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
bonus_damage += 10
|
||||
picked_hit_type = "stomps on"
|
||||
D.apply_damage(bonus_damage, BRUTE)
|
||||
D.apply_damage(bonus_damage, BRUTE, affecting, armor_block)
|
||||
if(picked_hit_type == "kicks" || picked_hit_type == "stomps on")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
playsound(get_turf(D), 'sound/effects/hit_kick.ogg', 50, 1, -1)
|
||||
@@ -151,24 +158,34 @@
|
||||
D.visible_message("<span class='danger'>[A] [picked_hit_type] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] [picked_hit_type] you!</span>")
|
||||
log_combat(A, D, "[picked_hit_type] with [name]")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/krav_maga/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
var/obj/item/I = null
|
||||
if(prob(60))
|
||||
I = D.get_active_held_item()
|
||||
if(I)
|
||||
if(D.temporarilyRemoveItemFromInventory(I))
|
||||
A.put_in_hands(I)
|
||||
D.visible_message("<span class='danger'>[A] has disarmed [D]!</span>", \
|
||||
"<span class='userdanger'>[A] has disarmed [D]!</span>")
|
||||
playsound(D, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
/datum/martial_art/krav_maga/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(check_streak(A,D))
|
||||
return TRUE
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
|
||||
var/armor_block = D.run_armor_check(affecting, "melee")
|
||||
var/damage = (damage_roll(A,D)*2)
|
||||
if(D.mobility_flags & MOBILITY_STAND)
|
||||
D.visible_message("<span class='danger'>[A] reprimands [D]!</span>", \
|
||||
"<span class='userdanger'>You're slapped by [A]!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, A)
|
||||
to_chat(A, "<span class='danger'>You jab [D]!</span>")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
playsound(D, 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
|
||||
D.apply_damage(damage + 5, STAMINA, affecting, armor_block)
|
||||
log_combat(A, D, "punched nonlethally")
|
||||
else
|
||||
D.visible_message("<span class='danger'>[A] attempted to disarm [D]!</span>", \
|
||||
"<span class='userdanger'>[A] attempted to disarm [D]!</span>")
|
||||
playsound(D, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
log_combat(A, D, "disarmed (Krav Maga)", "[I ? " removing \the [I]" : ""]")
|
||||
return 1
|
||||
D.visible_message("<span class='danger'>[A] reprimands [D]!</span>", \
|
||||
"<span class='userdanger'>You're manhandled by [A]!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, A)
|
||||
to_chat(A, "<span class='danger'>You stomp [D]!</span>")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
playsound(D, 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
|
||||
D.apply_damage(damage + 10, STAMINA, affecting, armor_block)
|
||||
log_combat(A, D, "stomped nonlethally")
|
||||
if(prob(D.getStaminaLoss()))
|
||||
D.visible_message("<span class='warning'>[D] sputters and recoils in pain!</span>", "<span class='userdanger'>You recoil in pain as you are jabbed in a nerve!</span>")
|
||||
D.drop_all_held_items()
|
||||
return TRUE
|
||||
|
||||
//Krav Maga Gloves
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
/datum/martial_art/mushpunch/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
var/atk_verb
|
||||
var/damage = (damage_roll(A,D)*3)
|
||||
to_chat(A, "<span class='spider'>You begin to wind up an attack...</span>")
|
||||
if(!do_after(A, 25, target = D))
|
||||
to_chat(A, "<span class='spider'><b>Your attack was interrupted!</b></span>")
|
||||
@@ -12,7 +13,7 @@
|
||||
atk_verb = pick("punches", "smashes", "ruptures", "cracks")
|
||||
D.visible_message("<span class='danger'>[A] [atk_verb] [D] with inhuman strength, sending [D.p_them()] flying backwards!</span>", \
|
||||
"<span class='userdanger'>[A] [atk_verb] you with inhuman strength, sending you flying backwards!</span>")
|
||||
D.apply_damage(rand(15,30), BRUTE)
|
||||
D.apply_damage(damage, BRUTE) //KAPOW
|
||||
playsound(D, 'sound/effects/meteorimpact.ogg', 25, 1, -1)
|
||||
var/throwtarget = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
|
||||
D.throw_at(throwtarget, 4, 2, A)//So stuff gets tossed around at the same time.
|
||||
|
||||
@@ -12,16 +12,16 @@
|
||||
if(findtext(streak,TORNADO_COMBO))
|
||||
streak = ""
|
||||
Tornado(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if(findtext(streak,THROWBACK_COMBO))
|
||||
streak = ""
|
||||
Throwback(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if(findtext(streak,PLASMA_COMBO))
|
||||
streak = ""
|
||||
Plasma(A,D)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/plasma_fist/proc/TornadoAnimate(mob/living/carbon/human/A)
|
||||
set waitfor = FALSE
|
||||
@@ -44,11 +44,13 @@
|
||||
return
|
||||
|
||||
/datum/martial_art/plasma_fist/proc/Throwback(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
var/damage = (damage_roll(A,D)*3)
|
||||
D.visible_message("<span class='danger'>[A] has hit [D] with Plasma Punch!</span>", \
|
||||
"<span class='userdanger'>[A] has hit [D] with Plasma Punch!</span>")
|
||||
playsound(D.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
var/atom/throw_target = get_edge_target_turf(D, get_dir(D, get_step_away(D, A)))
|
||||
D.throw_at(throw_target, 200, 4,A)
|
||||
D.apply_damage(damage, BRUTE)
|
||||
A.say("HYAH!", forced="plasma fist")
|
||||
log_combat(A, D, "threw back (Plasma Fist)")
|
||||
return
|
||||
@@ -66,23 +68,20 @@
|
||||
/datum/martial_art/plasma_fist/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
add_to_streak("H",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
basic_hit(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/plasma_fist/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
add_to_streak("D",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
basic_hit(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/plasma_fist/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
add_to_streak("G",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
basic_hit(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/proc/plasma_fist_help()
|
||||
set name = "Recall Teachings"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
/datum/martial_art/psychotic_brawling/proc/psycho_attack(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
var/atk_verb
|
||||
var/damage = damage_roll(A,D)
|
||||
switch(rand(1,8))
|
||||
if(1)
|
||||
D.help_shake_act(A)
|
||||
@@ -44,10 +45,10 @@
|
||||
D.visible_message("<span class='danger'>[A] [atk_verb] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] [atk_verb] you!</span>")
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 40, 1, -1)
|
||||
D.apply_damage(rand(5,10), BRUTE, BODY_ZONE_HEAD)
|
||||
A.apply_damage(rand(5,10), BRUTE, BODY_ZONE_HEAD)
|
||||
D.apply_damage(damage*1.5, BRUTE, BODY_ZONE_HEAD)
|
||||
A.apply_damage(damage, BRUTE, BODY_ZONE_HEAD)
|
||||
if(!istype(D.head,/obj/item/clothing/head/helmet/) && !istype(D.head,/obj/item/clothing/head/hardhat))
|
||||
D.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5)
|
||||
D.adjustOrganLoss(ORGAN_SLOT_BRAIN, damage)
|
||||
A.Stun(rand(10,45))
|
||||
D.DefaultCombatKnockdown(rand(5,30))//CIT CHANGE - makes stuns from martial arts always use Knockdown instead of Stun for the sake of consistency
|
||||
if(5,6)
|
||||
@@ -55,14 +56,14 @@
|
||||
atk_verb = pick("punches", "kicks", "hits", "slams into")
|
||||
D.visible_message("<span class='danger'>[A] [atk_verb] [D] with inhuman strength, sending [D.p_them()] flying backwards!</span>", \
|
||||
"<span class='userdanger'>[A] [atk_verb] you with inhuman strength, sending you flying backwards!</span>")
|
||||
D.apply_damage(rand(15,30), BRUTE)
|
||||
D.apply_damage(damage*2, BRUTE)
|
||||
playsound(get_turf(D), 'sound/effects/meteorimpact.ogg', 25, 1, -1)
|
||||
var/throwtarget = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
|
||||
D.throw_at(throwtarget, 4, 2, A)//So stuff gets tossed around at the same time.
|
||||
D.DefaultCombatKnockdown(60)
|
||||
if(7,8)
|
||||
basic_hit(A,D)
|
||||
return FALSE
|
||||
|
||||
if(atk_verb)
|
||||
log_combat(A, D, "[atk_verb] (Psychotic Brawling)")
|
||||
return 1
|
||||
return TRUE
|
||||
@@ -7,7 +7,6 @@
|
||||
/datum/martial_art/the_rising_bass
|
||||
name = "The Rising Bass"
|
||||
id = MARTIALART_RISINGBASS
|
||||
dodge_chance = 100
|
||||
allow_temp_override = FALSE
|
||||
help_verb = /mob/living/carbon/human/proc/rising_bass_help
|
||||
var/datum/action/risingbassmove/sidekick = new/datum/action/risingbassmove/sidekick()
|
||||
@@ -18,24 +17,24 @@
|
||||
if(findtext(streak,SIDE_KICK_COMBO))
|
||||
streak = ""
|
||||
sideKick(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if(findtext(streak,SHOULDER_FLIP_COMBO))
|
||||
streak = ""
|
||||
shoulderFlip(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if(findtext(streak,REPULSE_PUNCH_COMBO))
|
||||
streak = ""
|
||||
repulsePunch(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if(findtext(streak,FOOT_SMASH_COMBO))
|
||||
streak = ""
|
||||
footSmash(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if(findtext(streak,DEFT_SWITCH_COMBO))
|
||||
streak = ""
|
||||
deftSwitch(A,D)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
//Repulse Punch - Slams the opponent far away from you.
|
||||
@@ -79,6 +78,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/the_rising_bass/proc/sideKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
var/damage = (damage_roll(A,D)*0.5)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
var/dir = A.dir & (NORTH | SOUTH) ? pick(EAST, WEST) : pick(NORTH, SOUTH)
|
||||
var/oppdir = dir == NORTH ? SOUTH : dir == SOUTH ? NORTH : dir == EAST ? WEST : EAST
|
||||
@@ -88,15 +88,16 @@
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] in the side, sliding them over!</span>", \
|
||||
"<span class='userdanger'>[A] kicks you in the side, forcing you to step away!</span>")
|
||||
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
D.apply_damage(5, BRUTE, BODY_ZONE_CHEST)
|
||||
D.apply_damage(damage, BRUTE, BODY_ZONE_CHEST)
|
||||
D.DefaultCombatKnockdown(60)
|
||||
var/L = !checkfordensity(H,D) ? (!checkfordensity(K,D) ? D.loc : K) : H
|
||||
D.forceMove(L)
|
||||
log_combat(A, D, "side kicked (Rising Bass)")
|
||||
return TRUE
|
||||
return basic_hit(A,D)
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/the_rising_bass/proc/shoulderFlip(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
var/damage = (damage_roll(A,D) + 25)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
var/turf/H = get_step(A, get_dir(D,A))
|
||||
var/L = checkfordensity(H,D) ? H : A.loc
|
||||
@@ -105,16 +106,17 @@
|
||||
"<span class='userdanger'>[A] flips you over their shoulder, slamming you into the ground!</span>")
|
||||
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
D.emote("scream")
|
||||
D.apply_damage(10, BRUTE, BODY_ZONE_CHEST)
|
||||
D.apply_damage(30, BRUTE, BODY_ZONE_HEAD)
|
||||
D.apply_damage(damage, BRUTE, BODY_ZONE_CHEST)
|
||||
D.apply_damage(damage, BRUTE, BODY_ZONE_HEAD)
|
||||
D.Sleeping(60)
|
||||
D.DefaultCombatKnockdown(300)
|
||||
D.forceMove(L)
|
||||
log_combat(A, D, "shoulder flipped (Rising Bass)")
|
||||
return TRUE
|
||||
return basic_hit(A,D)
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/the_rising_bass/proc/repulsePunch(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
var/damage = damage_roll(A,D)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND) && repulsecool < world.time)
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
D.visible_message("<span class='warning'>[A] smashes [D] in the chest, throwing them away!</span>", \
|
||||
@@ -122,24 +124,25 @@
|
||||
playsound(get_turf(A), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
var/atom/F = get_edge_target_turf(D, get_dir(A, get_step_away(D, A)))
|
||||
D.throw_at(F, 10, 1)
|
||||
D.apply_damage(10, BRUTE, BODY_ZONE_CHEST)
|
||||
D.apply_damage(damage, BRUTE, BODY_ZONE_CHEST)
|
||||
D.DefaultCombatKnockdown(90)
|
||||
log_combat(A, D, "repulse punched (Rising Bass)")
|
||||
repulsecool = world.time + 3 SECONDS
|
||||
return TRUE
|
||||
return basic_hit(A,D)
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/the_rising_bass/proc/footSmash(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
var/damage = (damage_roll(A,D)*0.5)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
D.visible_message("<span class='warning'>[A] smashes their foot down on [D]'s foot!</span>", \
|
||||
"<span class='userdanger'>[A] smashes your foot!</span>")
|
||||
playsound(get_turf(A), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
D.apply_damage(5, BRUTE, pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
|
||||
D.apply_damage(damage, BRUTE, pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
|
||||
D.dropItemToGround(D.get_active_held_item())
|
||||
log_combat(A, D, "foot smashed (Rising Bass)")
|
||||
return TRUE
|
||||
return basic_hit(A,D)
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/the_rising_bass/proc/deftSwitch(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
@@ -158,19 +161,19 @@
|
||||
/datum/martial_art/the_rising_bass/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
add_to_streak("D",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/datum/martial_art/the_rising_bass/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
add_to_streak("H",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/datum/martial_art/the_rising_bass/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
add_to_streak("G",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/datum/martial_art/the_rising_bass/add_to_streak(element,mob/living/carbon/human/D)
|
||||
@@ -178,6 +181,20 @@
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/datum/martial_art/the_rising_bass/on_projectile_hit(mob/living/carbon/human/A, obj/item/projectile/P, def_zone)
|
||||
. = ..()
|
||||
if(A.incapacitated(FALSE, TRUE)) //NO STUN
|
||||
return BULLET_ACT_HIT
|
||||
if(!CHECK_ALL_MOBILITY(A, MOBILITY_USE|MOBILITY_STAND)) //NO UNABLE TO USE, NO DODGING ON THE FLOOR
|
||||
return BULLET_ACT_HIT
|
||||
if(A.dna && A.dna.check_mutation(HULK)) //NO HULK
|
||||
return BULLET_ACT_HIT
|
||||
if(!isturf(A.loc)) //NO MOTHERFLIPPIN MECHS!
|
||||
return BULLET_ACT_HIT
|
||||
A.visible_message("<span class='danger'>[A] dodges the projectile cleanly, they're immune to ranged weapons!</span>", "<span class='userdanger'>You dodge out of the way of the projectile!</span>")
|
||||
playsound(get_turf(A), pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, TRUE)
|
||||
return BULLET_ACT_FORCE_PIERCE
|
||||
|
||||
/mob/living/carbon/human/proc/rising_bass_help()
|
||||
set name = "Recall Teachings"
|
||||
set desc = "Remember the martial techniques of the Rising Bass clan."
|
||||
|
||||
@@ -1,141 +1,105 @@
|
||||
#define WRIST_WRENCH_COMBO "DD"
|
||||
#define BACK_KICK_COMBO "HG"
|
||||
#define STOMACH_KNEE_COMBO "GH"
|
||||
#define HEAD_KICK_COMBO "DHH"
|
||||
#define ELBOW_DROP_COMBO "HDHDH"
|
||||
#define STRONG_PUNCH_COMBO "HH"
|
||||
#define LAUNCH_KICK_COMBO "HD"
|
||||
#define DROP_KICK_COMBO "HG"
|
||||
|
||||
/datum/martial_art/the_sleeping_carp
|
||||
name = "The Sleeping Carp"
|
||||
id = MARTIALART_SLEEPINGCARP
|
||||
deflection_chance = 100
|
||||
reroute_deflection = TRUE
|
||||
allow_temp_override = FALSE
|
||||
help_verb = /mob/living/carbon/human/proc/sleeping_carp_help
|
||||
var/old_grab_state = null
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/check_streak(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(findtext(streak,WRIST_WRENCH_COMBO))
|
||||
if(findtext(streak,STRONG_PUNCH_COMBO))
|
||||
streak = ""
|
||||
wristWrench(A,D)
|
||||
strongPunch(A,D)
|
||||
return TRUE
|
||||
if(findtext(streak,BACK_KICK_COMBO))
|
||||
if(findtext(streak,LAUNCH_KICK_COMBO))
|
||||
streak = ""
|
||||
backKick(A,D)
|
||||
launchKick(A,D)
|
||||
return TRUE
|
||||
if(findtext(streak,STOMACH_KNEE_COMBO))
|
||||
if(findtext(streak,DROP_KICK_COMBO))
|
||||
streak = ""
|
||||
kneeStomach(A,D)
|
||||
return TRUE
|
||||
if(findtext(streak,HEAD_KICK_COMBO))
|
||||
streak = ""
|
||||
headKick(A,D)
|
||||
return TRUE
|
||||
if(findtext(streak,ELBOW_DROP_COMBO))
|
||||
streak = ""
|
||||
elbowDrop(A,D)
|
||||
dropKick(A,D)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/wristWrench(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_USE))
|
||||
log_combat(A, D, "wrist wrenched (Sleeping Carp)")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
D.visible_message("<span class='warning'>[A] grabs [D]'s wrist and wrenches it sideways!</span>", \
|
||||
"<span class='userdanger'>[A] grabs your wrist and violently wrenches it to the side!</span>")
|
||||
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
D.emote("scream")
|
||||
D.dropItemToGround(D.get_active_held_item())
|
||||
D.apply_damage(5, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
D.DefaultCombatKnockdown(60)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
||||
return TRUE
|
||||
return basic_hit(A,D)
|
||||
///Gnashing Teeth: Harm Harm, consistent 20 force punch on every second harm punch, has a chance to crit
|
||||
/datum/martial_art/the_sleeping_carp/proc/strongPunch(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
///this var is so that the strong punch is always aiming for the body part the user is targeting and not trying to apply to the chest before deviating
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
var/atk_verb = pick("precisely kick", "brutally chop", "cleanly hit", "viciously slam")
|
||||
///this is the critical hit damage added to the attack if it rolls, it starts at 0 because it'll be changed when rolled
|
||||
var/crit_damage = 0
|
||||
var/damage = damage_roll(A,D)
|
||||
D.visible_message("<span class='danger'>[A] [atk_verb]s [D]!</span>", \
|
||||
"<span class='userdanger'>[A] [atk_verb]s you!</span>", null, null, A)
|
||||
to_chat(A, "<span class='danger'>You [atk_verb] [D]!</span>")
|
||||
if(prob(10))
|
||||
crit_damage += (damage*2 + 15)
|
||||
playsound(get_turf(D), 'sound/weapons/bite.ogg', 50, TRUE, -1)
|
||||
D.visible_message("<span class='warning'>[D] staggers as the blow strikes them with inhuman force!</span>", "<span class='userdanger'>You are struck with incredible precision by [A]!</span>")
|
||||
log_combat(A, D, "critcal strong punched (Sleeping Carp)")//log it here because a critical can swing for 40 force and it's important for the sake of how hard they hit
|
||||
else
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, TRUE, -1)
|
||||
log_combat(A, D, "strong punched (Sleeping Carp)")//so as to not double up on logging
|
||||
D.apply_damage((damage + 15) + crit_damage, BRUTE, affecting)
|
||||
return
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/backKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
if(A.dir == D.dir)
|
||||
log_combat(A, D, "back-kicked (Sleeping Carp)")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] in the back!</span>", \
|
||||
"<span class='userdanger'>[A] kicks you in the back, making you stumble and fall!</span>")
|
||||
step_to(D,get_step(D,D.dir),1)
|
||||
D.DefaultCombatKnockdown(80)
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
return TRUE
|
||||
else
|
||||
log_combat(A, D, "missed a back-kick (Sleeping Carp) on")
|
||||
D.visible_message("<span class='warning'>[A] tries to kick [D] in the back, but misses!</span>", \
|
||||
"<span class='userdanger'>[A] tries to kick you in the back, but misses!</span>")
|
||||
return basic_hit(A,D)
|
||||
///Crashing Wave Kick: Harm Disarm combo, throws people seven tiles backwards
|
||||
/datum/martial_art/the_sleeping_carp/proc/launchKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
var/damage = (damage_roll(A,D) + 15)
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] square in the chest, sending them flying!</span>", \
|
||||
"<span class='userdanger'>You are kicked square in the chest by [A], sending you flying!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, A)
|
||||
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, TRUE, -1)
|
||||
var/atom/throw_target = get_edge_target_turf(D, A.dir)
|
||||
D.throw_at(throw_target, 7, 14, A)
|
||||
D.apply_damage(damage, BRUTE, BODY_ZONE_CHEST)
|
||||
log_combat(A, D, "launchkicked (Sleeping Carp)")
|
||||
return
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/kneeStomach(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
log_combat(A, D, "stomach kneed (Sleeping Carp)")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
D.visible_message("<span class='warning'>[A] knees [D] in the stomach!</span>", \
|
||||
"<span class='userdanger'>[A] winds you with a knee in the stomach!</span>")
|
||||
D.audible_message("<b>[D]</b> gags!")
|
||||
D.losebreath += 3
|
||||
D.DefaultCombatKnockdown(40)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
return TRUE
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/headKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
log_combat(A, D, "head kicked (Sleeping Carp)")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] in the head!</span>", \
|
||||
"<span class='userdanger'>[A] kicks you in the jaw!</span>")
|
||||
D.apply_damage(20, BRUTE, BODY_ZONE_HEAD)
|
||||
///Keelhaul: Harm Grab combo, knocks people down, deals stamina damage while they're on the floor
|
||||
/datum/martial_art/the_sleeping_carp/proc/dropKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
var/damage = damage_roll(A,D)
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, TRUE, -1)
|
||||
if((D.mobility_flags & MOBILITY_STAND))
|
||||
D.apply_damage(damage, BRUTE, BODY_ZONE_HEAD)
|
||||
D.DefaultCombatKnockdown(50, override_hardstun = 0.01, override_stamdmg = 0)
|
||||
D.apply_damage(damage + 35, STAMINA, BODY_ZONE_HEAD) //A cit specific change form the tg port to really punish anyone who tries to stand up
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] in the head, sending them face first into the floor!</span>", \
|
||||
"<span class='userdanger'>You are kicked in the head by [A], sending you crashing to the floor!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, A)
|
||||
else
|
||||
D.apply_damage(damage*0.5, BRUTE, BODY_ZONE_HEAD)
|
||||
D.apply_damage(damage + 35, STAMINA, BODY_ZONE_HEAD)
|
||||
D.drop_all_held_items()
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
D.DefaultCombatKnockdown(80)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
||||
return TRUE
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/elbowDrop(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
log_combat(A, D, "elbow dropped (Sleeping Carp)")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
D.visible_message("<span class='warning'>[A] elbow drops [D]!</span>", \
|
||||
"<span class='userdanger'>[A] piledrives you with their elbow!</span>")
|
||||
if(D.stat)
|
||||
D.death() //FINISH HIM!
|
||||
D.apply_damage(50, BRUTE, BODY_ZONE_CHEST)
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 75, 1, -1)
|
||||
return TRUE
|
||||
return basic_hit(A,D)
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] in the head!</span>", \
|
||||
"<span class='userdanger'>You are kicked in the head by [A]!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, A)
|
||||
log_combat(A, D, "dropkicked (Sleeping Carp)")
|
||||
return
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(A.a_intent == INTENT_GRAB && A!=D) // A!=D prevents grabbing yourself
|
||||
add_to_streak("G",D)
|
||||
if(check_streak(A,D)) //if a combo is made no grab upgrade is done
|
||||
return TRUE
|
||||
old_grab_state = A.grab_state
|
||||
D.grabbedby(A, 1)
|
||||
if(old_grab_state == GRAB_PASSIVE)
|
||||
D.drop_all_held_items()
|
||||
A.setGrabState(GRAB_AGGRESSIVE) //Instant agressive grab if on grab intent
|
||||
log_combat(A, D, "grabbed", addition="aggressively")
|
||||
D.visible_message("<span class='warning'>[A] violently grabs [D]!</span>", \
|
||||
"<span class='userdanger'>[A] violently grabs you!</span>")
|
||||
add_to_streak("G",D)
|
||||
if(check_streak(A,D))
|
||||
return TRUE
|
||||
return FALSE
|
||||
log_combat(A, D, "grabbed (Sleeping Carp)")
|
||||
return ..()
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
add_to_streak("H",D)
|
||||
var/damage = (damage_roll(A,D) + 5)
|
||||
if(check_streak(A,D))
|
||||
return TRUE
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
var/atk_verb = pick("punches", "kicks", "chops", "hits", "slams")
|
||||
D.visible_message("<span class='danger'>[A] [atk_verb] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] [atk_verb] you!</span>")
|
||||
D.apply_damage(rand(10,15), BRUTE)
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, 1, -1)
|
||||
if(prob(D.getBruteLoss()) && !D.lying)
|
||||
D.visible_message("<span class='warning'>[D] stumbles and falls!</span>", "<span class='userdanger'>The blow sends you to the ground!</span>")
|
||||
D.DefaultCombatKnockdown(80)
|
||||
log_combat(A, D, "[atk_verb] (Sleeping Carp)")
|
||||
var/atk_verb = pick("kick", "chop", "hit", "slam")
|
||||
D.visible_message("<span class='danger'>[A] [atk_verb]s [D]!</span>", \
|
||||
"<span class='userdanger'>[A] [atk_verb]s you!</span>", null, null, A)
|
||||
to_chat(A, "<span class='danger'>You [atk_verb] [D]!</span>")
|
||||
D.apply_damage(damage, BRUTE, affecting)
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, TRUE, -1)
|
||||
log_combat(A, D, "punched (Sleeping Carp)")
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -143,17 +107,57 @@
|
||||
add_to_streak("D",D)
|
||||
if(check_streak(A,D))
|
||||
return TRUE
|
||||
log_combat(A, D, "disarmed (Sleeping Carp)")
|
||||
return ..()
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/on_projectile_hit(mob/living/carbon/human/A, obj/item/projectile/P, def_zone)
|
||||
. = ..()
|
||||
if(A.incapacitated(FALSE, TRUE)) //NO STUN
|
||||
return BULLET_ACT_HIT
|
||||
if(!CHECK_ALL_MOBILITY(A, MOBILITY_USE|MOBILITY_STAND)) //NO UNABLE TO USE, NO DEFLECTION ON THE FLOOR
|
||||
return BULLET_ACT_HIT
|
||||
if(A.dna && A.dna.check_mutation(HULK)) //NO HULK
|
||||
return BULLET_ACT_HIT
|
||||
if(!isturf(A.loc)) //NO MOTHERFLIPPIN MECHS!
|
||||
return BULLET_ACT_HIT
|
||||
if(A.in_throw_mode)
|
||||
A.visible_message("<span class='danger'>[A] effortlessly swats the projectile aside! They can deflect projectile with their bare hands!</span>", "<span class='userdanger'>You deflect the projectile!</span>")
|
||||
playsound(get_turf(A), pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, TRUE)
|
||||
P.firer = A
|
||||
P.setAngle(rand(0, 360))//SHING
|
||||
A.adjustStaminaLossBuffered (3) //Citadel change to stop infinite bullet sponging as you run away, but it is buffered!
|
||||
return BULLET_ACT_FORCE_PIERCE
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/teach(mob/living/carbon/human/H, make_temporary = FALSE)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
ADD_TRAIT(H, TRAIT_NOGUNS, SLEEPING_CARP_TRAIT)
|
||||
ADD_TRAIT(H, TRAIT_PIERCEIMMUNE, SLEEPING_CARP_TRAIT)
|
||||
ADD_TRAIT(H, TRAIT_NODISMEMBER, SLEEPING_CARP_TRAIT)
|
||||
H.physiology.brute_mod *= 0.4 //brute is really not gonna cut it
|
||||
H.physiology.burn_mod *= 0.7 //burn is distinctly more useful against them than brute but they're still resistant
|
||||
H.physiology.stun_mod *= 0.3 //for those rare stuns
|
||||
H.physiology.pressure_mod *= 0.3 //go hang out with carp
|
||||
H.physiology.cold_mod *= 0.3 //cold mods are different to burn mods, they do stack however
|
||||
H.physiology.heat_mod *= 2 //this is mostly so sleeping carp has a viable weakness. Cooking them alive. Setting them on fire and heating them will be their biggest weakness. The reason for this is....filet jokes.
|
||||
|
||||
H.faction |= "carp" //:D
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/on_remove(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
REMOVE_TRAIT(H, TRAIT_NOGUNS, SLEEPING_CARP_TRAIT)
|
||||
REMOVE_TRAIT(H, TRAIT_PIERCEIMMUNE, SLEEPING_CARP_TRAIT)
|
||||
REMOVE_TRAIT(H, TRAIT_NODISMEMBER, SLEEPING_CARP_TRAIT)
|
||||
H.physiology.brute_mod = initial(H.physiology.brute_mod)
|
||||
H.physiology.burn_mod = initial(H.physiology.burn_mod)
|
||||
H.physiology.stun_mod = initial(H.physiology.stun_mod)
|
||||
H.physiology.pressure_mod = initial(H.physiology.pressure_mod) //no more carpies
|
||||
H.physiology.cold_mod = initial(H.physiology.cold_mod)
|
||||
H.physiology.heat_mod = initial(H.physiology.heat_mod)
|
||||
|
||||
H.faction -= "carp" //:(
|
||||
|
||||
/mob/living/carbon/human/proc/sleeping_carp_help()
|
||||
set name = "Recall Teachings"
|
||||
@@ -162,11 +166,10 @@
|
||||
|
||||
to_chat(usr, "<b><i>You retreat inward and recall the teachings of the Sleeping Carp...</i></b>")
|
||||
|
||||
to_chat(usr, "<span class='notice'>Wrist Wrench</span>: Disarm Disarm. Forces opponent to drop item in hand.")
|
||||
to_chat(usr, "<span class='notice'>Back Kick</span>: Harm Grab. Opponent must be facing away. Knocks down.")
|
||||
to_chat(usr, "<span class='notice'>Stomach Knee</span>: Grab Harm. Knocks the wind out of opponent and stuns.")
|
||||
to_chat(usr, "<span class='notice'>Head Kick</span>: Disarm Harm Harm. Decent damage, forces opponent to drop item in hand.")
|
||||
to_chat(usr, "<span class='notice'>Elbow Drop</span>: Harm Disarm Harm Disarm Harm. Opponent must be on the ground. Deals huge damage, instantly kills anyone in critical condition.")
|
||||
to_chat(usr, "<span class='notice'>Gnashing Teeth</span>: Harm Harm. Deal additional damage every second punch, with a chance for even more damage!")
|
||||
to_chat(usr, "<span class='notice'>Crashing Wave Kick</span>: Harm Disarm. Launch people brutally across rooms, and away from you.")
|
||||
to_chat(usr, "<span class='notice'>Keelhaul</span>: Harm Grab. Kick opponents to the floor. Against prone targets, deal additional stamina damage and disarm them.")
|
||||
to_chat(usr, "<span class='notice'>In addition, your body has become incredibly resilient to most forms of attack. Weapons cannot readily pierce your hardened skin, and you are highly resistant to stuns and knockdowns, and can block all projectiles in Throw Mode. However, you are not invincible, and sustained damage will take it's toll. Avoid heat at all costs!</span>")
|
||||
|
||||
/obj/item/twohanded/bostaff
|
||||
name = "bo staff"
|
||||
@@ -237,7 +240,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/bostaff/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(wielded)
|
||||
return ..()
|
||||
return FALSE
|
||||
/obj/item/twohanded/bostaff/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
if(!wielded)
|
||||
return BLOCK_NONE
|
||||
return ..()
|
||||
|
||||
@@ -18,28 +18,30 @@
|
||||
var/datum/action/drop/drop = new/datum/action/drop()
|
||||
|
||||
/datum/martial_art/wrestling/proc/check_streak(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
if(!can_use(A, D))
|
||||
return FALSE
|
||||
switch(streak)
|
||||
if("drop")
|
||||
streak = ""
|
||||
drop(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if("strike")
|
||||
streak = ""
|
||||
strike(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if("kick")
|
||||
streak = ""
|
||||
kick(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if("throw")
|
||||
streak = ""
|
||||
throw_wrassle(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if("slam")
|
||||
streak = ""
|
||||
slam(A,D)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/action/slam
|
||||
name = "Slam (Cinch) - Slam a grappled opponent into the floor."
|
||||
@@ -136,7 +138,7 @@
|
||||
|
||||
/datum/martial_art/wrestling/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return TRUE
|
||||
log_combat(A, D, "punched with wrestling")
|
||||
..()
|
||||
|
||||
@@ -171,11 +173,11 @@
|
||||
|
||||
if (get_dist(A, D) > 1)
|
||||
to_chat(A, "[D] is too far away!")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if (!isturf(A.loc) || !isturf(D.loc))
|
||||
to_chat(A, "You can't throw [D] from here!")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
A.setDir(turn(A.dir, 90))
|
||||
var/turf/T = get_step(A, A.dir)
|
||||
@@ -184,7 +186,7 @@
|
||||
D.forceMove(T)
|
||||
D.setDir(get_dir(D, A))
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
sleep(delay)
|
||||
|
||||
@@ -193,11 +195,11 @@
|
||||
|
||||
if (get_dist(A, D) > 1)
|
||||
to_chat(A, "[D] is too far away!")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if (!isturf(A.loc) || !isturf(D.loc))
|
||||
to_chat(A, "You can't throw [D] from here!")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
D.forceMove(A.loc) // Maybe this will help with the wallthrowing bug.
|
||||
|
||||
@@ -209,7 +211,7 @@
|
||||
D.emote("scream")
|
||||
D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human.proc/DefaultCombatKnockdown, 20))
|
||||
log_combat(A, D, "has thrown with wrestling")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/wrestling/proc/FlipAnimation(mob/living/carbon/human/D)
|
||||
set waitfor = FALSE
|
||||
@@ -225,6 +227,7 @@
|
||||
if(!A.pulling || A.pulling != D)
|
||||
to_chat(A, "You need to have [D] in a cinch!")
|
||||
return
|
||||
var/damage = damage_roll(A,D)
|
||||
D.forceMove(A.loc)
|
||||
A.setDir(get_dir(A, D))
|
||||
D.setDir(get_dir(D, A))
|
||||
@@ -256,7 +259,7 @@
|
||||
A.pixel_y = 0
|
||||
D.pixel_x = 0
|
||||
D.pixel_y = 0
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if (!isturf(A.loc) || !isturf(D.loc))
|
||||
to_chat(A, "You can't slam [D] here!")
|
||||
@@ -264,7 +267,7 @@
|
||||
A.pixel_y = 0
|
||||
D.pixel_x = 0
|
||||
D.pixel_y = 0
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
if (A)
|
||||
A.pixel_x = 0
|
||||
@@ -272,7 +275,7 @@
|
||||
if (D)
|
||||
D.pixel_x = 0
|
||||
D.pixel_y = 0
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
sleep(1)
|
||||
|
||||
@@ -284,11 +287,11 @@
|
||||
|
||||
if (get_dist(A, D) > 1)
|
||||
to_chat(A, "[D] is too far away!")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if (!isturf(A.loc) || !isturf(D.loc))
|
||||
to_chat(A, "You can't slam [D] here!")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
D.forceMove(A.loc)
|
||||
|
||||
@@ -307,11 +310,11 @@
|
||||
|
||||
switch(rand(1,3))
|
||||
if (2)
|
||||
D.adjustBruteLoss(rand(20,30))
|
||||
D.apply_damage(damage + 25, BRUTE)
|
||||
if (3)
|
||||
D.ex_act(EXPLODE_LIGHT)
|
||||
else
|
||||
D.adjustBruteLoss(rand(10,20))
|
||||
D.apply_damage(damage + 15, BRUTE)
|
||||
else
|
||||
D.ex_act(EXPLODE_LIGHT)
|
||||
|
||||
@@ -325,7 +328,7 @@
|
||||
|
||||
|
||||
log_combat(A, D, "body-slammed")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/wrestling/proc/CheckStrikeTurf(mob/living/carbon/human/A, turf/T)
|
||||
if (A && (T && isturf(T) && get_dist(A, T) <= 1))
|
||||
@@ -335,6 +338,7 @@
|
||||
if(!D)
|
||||
return
|
||||
var/turf/T = get_turf(A)
|
||||
var/damage = damage_roll(A,D)
|
||||
if (T && isturf(T) && D && isturf(D.loc))
|
||||
for (var/i = 0, i < 4, i++)
|
||||
A.setDir(turn(A.dir, 90))
|
||||
@@ -343,7 +347,7 @@
|
||||
addtimer(CALLBACK(src, .proc/CheckStrikeTurf, A, T), 4)
|
||||
|
||||
A.visible_message("<span class = 'danger'><b>[A] headbutts [D]!</b></span>")
|
||||
D.adjustBruteLoss(rand(10,20))
|
||||
D.apply_damage(damage + 15, BRUTE)
|
||||
playsound(A.loc, "swing_hit", 50, 1)
|
||||
D.Unconscious(20)
|
||||
log_combat(A, D, "headbutted")
|
||||
@@ -351,13 +355,14 @@
|
||||
/datum/martial_art/wrestling/proc/kick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D)
|
||||
return
|
||||
var/damage = damage_roll(A,D)
|
||||
A.emote("scream")
|
||||
A.emote("flip")
|
||||
A.setDir(turn(A.dir, 90))
|
||||
|
||||
A.visible_message("<span class = 'danger'><B>[A] roundhouse-kicks [D]!</B></span>")
|
||||
playsound(A.loc, "swing_hit", 50, 1)
|
||||
D.adjustBruteLoss(rand(10,20))
|
||||
D.apply_damage(damage + 15, STAMINA)
|
||||
|
||||
var/turf/T = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
|
||||
if (T && isturf(T))
|
||||
@@ -371,7 +376,8 @@
|
||||
var/obj/surface = null
|
||||
var/turf/ST = null
|
||||
var/falling = 0
|
||||
|
||||
var/damage = damage_roll(A,D)
|
||||
|
||||
for (var/obj/O in oview(1, A))
|
||||
if (O.density == 1)
|
||||
if (O == A)
|
||||
@@ -399,15 +405,15 @@
|
||||
A.pixel_y = 0
|
||||
if (falling == 1)
|
||||
A.visible_message("<span class = 'danger'><B>...and dives head-first into the ground, ouch!</b></span>")
|
||||
A.adjustBruteLoss(rand(10,20))
|
||||
A.apply_damage(damage + 15, BRUTE)
|
||||
A.DefaultCombatKnockdown(60)
|
||||
to_chat(A, "[D] is too far away!")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if (!isturf(A.loc) || !isturf(D.loc))
|
||||
A.pixel_y = 0
|
||||
to_chat(A, "You can't drop onto [D] from here!")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(A)
|
||||
animate(A, transform = matrix(90, MATRIX_ROTATE), time = 1, loop = 0)
|
||||
@@ -425,9 +431,9 @@
|
||||
if (prob(33) || D.stat)
|
||||
D.ex_act(EXPLODE_LIGHT)
|
||||
else
|
||||
D.adjustBruteLoss(rand(20,30))
|
||||
D.apply_damage(damage + 25, BRUTE)
|
||||
else
|
||||
D.adjustBruteLoss(rand(20,30))
|
||||
D.apply_damage(damage + 25, BRUTE)
|
||||
|
||||
D.DefaultCombatKnockdown(40)
|
||||
|
||||
@@ -440,14 +446,18 @@
|
||||
return
|
||||
|
||||
/datum/martial_art/wrestling/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
damage_roll(A,D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return TRUE
|
||||
log_combat(A, D, "wrestling-disarmed")
|
||||
..()
|
||||
|
||||
/datum/martial_art/wrestling/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
damage_roll(A,D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return TRUE
|
||||
if(!can_use(A,D))
|
||||
return ..()
|
||||
if(A.pulling == D || A == D) // don't stun grab yoursel
|
||||
return FALSE
|
||||
A.start_pulling(D)
|
||||
@@ -455,7 +465,7 @@
|
||||
"<span class='userdanger'>[A] gets [D] in a cinch!</span>")
|
||||
D.Stun(rand(60,100))
|
||||
log_combat(A, D, "cinched")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/storage/belt/champion/wrestling
|
||||
name = "Wrestling Belt"
|
||||
@@ -476,3 +486,19 @@
|
||||
if(H.get_item_by_slot(SLOT_BELT) == src)
|
||||
style.remove(H)
|
||||
return
|
||||
|
||||
//Subtype of wrestling, reserved for the wrestling belts found in the holodeck
|
||||
/datum/martial_art/wrestling/holodeck
|
||||
name = "Holodeck Wrestling"
|
||||
|
||||
/obj/item/storage/belt/champion/wrestling/holodeck
|
||||
name = "Holodeck Wrestling Belt"
|
||||
style = new /datum/martial_art/wrestling/holodeck
|
||||
|
||||
//Make sure that moves can only be used on people wearing the holodeck belt
|
||||
/datum/martial_art/wrestling/holodeck/can_use(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
if(!(istype(D.mind?.martial_art, /datum/martial_art/wrestling/holodeck)))
|
||||
return FALSE
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -93,12 +93,12 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
/datum/material/plasma/on_applied(atom/source, amount, material_flags)
|
||||
. = ..()
|
||||
if(ismovableatom(source))
|
||||
source.AddElement(/datum/element/firestacker)
|
||||
source.AddElement(/datum/element/firestacker, amount=1)
|
||||
source.AddComponent(/datum/component/explodable, 0, 0, amount / 2500, amount / 1250)
|
||||
|
||||
/datum/material/plasma/on_removed(atom/source, material_flags)
|
||||
. = ..()
|
||||
source.RemoveElement(/datum/element/firestacker)
|
||||
source.RemoveElement(/datum/element/firestacker, amount=1)
|
||||
qdel(source.GetComponent(/datum/component/explodable))
|
||||
|
||||
///Can cause bluespace effects on use. (Teleportation) (Not yet implemented)
|
||||
|
||||
+9
-9
@@ -95,8 +95,7 @@
|
||||
SStgui.on_transfer(current, new_character)
|
||||
if(iscarbon(current))
|
||||
var/mob/living/carbon/C = current
|
||||
if(C.combatmode)
|
||||
C.toggle_combat_mode(TRUE, TRUE)
|
||||
C.disable_intentional_combat_mode(TRUE)
|
||||
if(!language_holder)
|
||||
var/datum/language_holder/mob_holder = new_character.get_language_holder(shadow = FALSE)
|
||||
language_holder = mob_holder.copy(src)
|
||||
@@ -256,9 +255,11 @@
|
||||
remove_rev()
|
||||
SSticker.mode.update_cult_icons_removed(src)
|
||||
|
||||
/datum/mind/proc/equip_traitor(employer = "The Syndicate", silent = FALSE, datum/antagonist/uplink_owner)
|
||||
/datum/mind/proc/equip_traitor(datum/traitor_class/traitor_class, silent = FALSE, datum/antagonist/uplink_owner)
|
||||
if(!current)
|
||||
return
|
||||
if(!traitor_class)
|
||||
traitor_class = GLOB.traitor_classes[TRAITOR_HUMAN]
|
||||
var/mob/living/carbon/human/traitor_mob = current
|
||||
if (!istype(traitor_mob))
|
||||
return
|
||||
@@ -306,21 +307,21 @@
|
||||
|
||||
if (!uplink_loc)
|
||||
if(!silent)
|
||||
to_chat(traitor_mob, "Unfortunately, [employer] wasn't able to get you an Uplink.")
|
||||
to_chat(traitor_mob, "Unfortunately, [traitor_class.employer] wasn't able to get you an Uplink.")
|
||||
. = 0
|
||||
else
|
||||
. = uplink_loc
|
||||
var/datum/component/uplink/U = uplink_loc.AddComponent(/datum/component/uplink, traitor_mob.key)
|
||||
var/datum/component/uplink/U = uplink_loc.AddComponent(/datum/component/uplink, traitor_mob.key,traitor_class)
|
||||
if(!U)
|
||||
CRASH("Uplink creation failed.")
|
||||
U.setup_unlock_code()
|
||||
if(!silent)
|
||||
if(uplink_loc == R)
|
||||
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [R.name]. Simply dial the frequency [format_frequency(U.unlock_code)] to unlock its hidden features.")
|
||||
to_chat(traitor_mob, "[traitor_class.employer] has cunningly disguised a Syndicate Uplink as your [R.name]. Simply dial the frequency [format_frequency(U.unlock_code)] to unlock its hidden features.")
|
||||
else if(uplink_loc == PDA)
|
||||
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [PDA.name]. Simply enter the code \"[U.unlock_code]\" into the ringtone select to unlock its hidden features.")
|
||||
to_chat(traitor_mob, "[traitor_class.employer] has cunningly disguised a Syndicate Uplink as your [PDA.name]. Simply enter the code \"[U.unlock_code]\" into the ringtone select to unlock its hidden features.")
|
||||
else if(uplink_loc == P)
|
||||
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [P.name]. Simply twist the top of the pen [U.unlock_code] from its starting position to unlock its hidden features.")
|
||||
to_chat(traitor_mob, "[traitor_class.employer] has cunningly disguised a Syndicate Uplink as your [P.name]. Simply twist the top of the pen [U.unlock_code] from its starting position to unlock its hidden features.")
|
||||
|
||||
if(uplink_owner)
|
||||
uplink_owner.antag_memory += U.unlock_note + "<br>"
|
||||
@@ -469,7 +470,6 @@
|
||||
/datum/objective/steal,
|
||||
/datum/objective/download,
|
||||
/datum/objective/nuclear,
|
||||
/datum/objective/capture,
|
||||
/datum/objective/absorb,
|
||||
/datum/objective/custom
|
||||
)
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
GLOBAL_LIST_EMPTY(mutations_list)
|
||||
|
||||
/datum/mutation
|
||||
|
||||
var/name
|
||||
|
||||
/datum/mutation/New()
|
||||
GLOB.mutations_list[name] = src
|
||||
|
||||
/datum/mutation/human
|
||||
var/dna_block
|
||||
var/quality
|
||||
var/get_chance = 100
|
||||
var/lowest_value = 256 * 8
|
||||
var/text_gain_indication = ""
|
||||
var/text_lose_indication = ""
|
||||
var/list/mutable_appearance/visual_indicators = list()
|
||||
var/layer_used = MUTATIONS_LAYER //which mutation layer to use
|
||||
var/list/species_allowed = list() //to restrict mutation to only certain species
|
||||
var/health_req //minimum health required to acquire the mutation
|
||||
var/limb_req //required limbs to acquire this mutation
|
||||
var/time_coeff = 1 //coefficient for timed mutations
|
||||
|
||||
/datum/mutation/human/proc/force_give(mob/living/carbon/human/owner)
|
||||
set_block(owner)
|
||||
. = on_acquiring(owner)
|
||||
|
||||
/datum/mutation/human/proc/force_lose(mob/living/carbon/human/owner)
|
||||
set_block(owner, 0)
|
||||
. = on_losing(owner)
|
||||
|
||||
/datum/mutation/human/proc/set_se(se_string, on = 1)
|
||||
if(!se_string || length(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
|
||||
return
|
||||
var/before = copytext_char(se_string, 1, ((dna_block - 1) * DNA_BLOCK_SIZE) + 1)
|
||||
var/injection = num2hex(on ? rand(lowest_value, (256 * 16) - 1) : rand(0, lowest_value - 1), DNA_BLOCK_SIZE)
|
||||
var/after = copytext_char(se_string, (dna_block * DNA_BLOCK_SIZE) + 1, 0)
|
||||
return before + injection + after
|
||||
|
||||
/datum/mutation/human/proc/set_block(mob/living/carbon/owner, on = 1)
|
||||
if(owner && owner.has_dna())
|
||||
owner.dna.struc_enzymes = set_se(owner.dna.struc_enzymes, on)
|
||||
|
||||
/datum/mutation/human/proc/check_block_string(se_string)
|
||||
if(!se_string || length(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
|
||||
return 0
|
||||
if(hex2num(getblock(se_string, dna_block)) >= lowest_value)
|
||||
return 1
|
||||
|
||||
/datum/mutation/human/proc/check_block(mob/living/carbon/human/owner, force_powers=0)
|
||||
if(check_block_string(owner.dna.struc_enzymes))
|
||||
if(prob(get_chance)||force_powers)
|
||||
. = on_acquiring(owner)
|
||||
else
|
||||
. = on_losing(owner)
|
||||
|
||||
/datum/mutation/human/proc/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(!owner || !istype(owner) || owner.stat == DEAD || (src in owner.dna.mutations))
|
||||
return TRUE
|
||||
if(species_allowed.len && !species_allowed.Find(owner.dna.species.id))
|
||||
return TRUE
|
||||
if(health_req && owner.health < health_req)
|
||||
return TRUE
|
||||
if(limb_req && !owner.get_bodypart(limb_req))
|
||||
return TRUE
|
||||
owner.dna.mutations.Add(src)
|
||||
if(text_gain_indication)
|
||||
to_chat(owner, text_gain_indication)
|
||||
if(visual_indicators.len)
|
||||
var/list/mut_overlay = list(get_visual_indicator(owner))
|
||||
if(owner.overlays_standing[layer_used])
|
||||
mut_overlay = owner.overlays_standing[layer_used]
|
||||
mut_overlay |= get_visual_indicator(owner)
|
||||
owner.remove_overlay(layer_used)
|
||||
owner.overlays_standing[layer_used] = mut_overlay
|
||||
owner.apply_overlay(layer_used)
|
||||
|
||||
/datum/mutation/human/proc/get_visual_indicator(mob/living/carbon/human/owner)
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_attack_hand(mob/living/carbon/human/owner, atom/target, proximity)
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_ranged_attack(mob/living/carbon/human/owner, atom/target)
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_move(mob/living/carbon/human/owner, new_loc)
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_life(mob/living/carbon/human/owner)
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_losing(mob/living/carbon/human/owner)
|
||||
if(owner && istype(owner) && (owner.dna.mutations.Remove(src)))
|
||||
if(text_lose_indication && owner.stat != DEAD)
|
||||
to_chat(owner, text_lose_indication)
|
||||
if(visual_indicators.len)
|
||||
var/list/mut_overlay = list()
|
||||
if(owner.overlays_standing[layer_used])
|
||||
mut_overlay = owner.overlays_standing[layer_used]
|
||||
owner.remove_overlay(layer_used)
|
||||
mut_overlay.Remove(get_visual_indicator(owner))
|
||||
owner.overlays_standing[layer_used] = mut_overlay
|
||||
owner.apply_overlay(layer_used)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/update_mutations_overlay()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/update_mutations_overlay()
|
||||
for(var/datum/mutation/human/CM in dna.mutations)
|
||||
if(CM.species_allowed.len && !CM.species_allowed.Find(dna.species.id))
|
||||
CM.force_lose(src) //shouldn't have that mutation at all
|
||||
continue
|
||||
if(CM.visual_indicators.len)
|
||||
var/list/mut_overlay = list()
|
||||
if(overlays_standing[CM.layer_used])
|
||||
mut_overlay = overlays_standing[CM.layer_used]
|
||||
var/mutable_appearance/V = CM.get_visual_indicator(src)
|
||||
if(!mut_overlay.Find(V)) //either we lack the visual indicator or we have the wrong one
|
||||
remove_overlay(CM.layer_used)
|
||||
for(var/mutable_appearance/MA in CM.visual_indicators)
|
||||
mut_overlay.Remove(MA)
|
||||
mut_overlay |= V
|
||||
overlays_standing[CM.layer_used] = mut_overlay
|
||||
apply_overlay(CM.layer_used)
|
||||
@@ -0,0 +1,193 @@
|
||||
/datum/mutation
|
||||
|
||||
var/name
|
||||
|
||||
/datum/mutation/human
|
||||
name = "mutation"
|
||||
var/desc = "A mutation."
|
||||
var/locked
|
||||
var/quality
|
||||
var/get_chance = 100
|
||||
var/lowest_value = 256 * 8
|
||||
var/text_gain_indication = ""
|
||||
var/text_lose_indication = ""
|
||||
var/list/mutable_appearance/visual_indicators = list()
|
||||
var/obj/effect/proc_holder/spell/power
|
||||
var/layer_used = MUTATIONS_LAYER //which mutation layer to use
|
||||
var/list/species_allowed = list() //to restrict mutation to only certain species
|
||||
var/health_req //minimum health required to acquire the mutation
|
||||
var/limb_req //required limbs to acquire this mutation
|
||||
var/time_coeff = 1 //coefficient for timed mutations
|
||||
var/datum/dna/dna
|
||||
var/mob/living/carbon/human/owner
|
||||
var/instability = 0 //instability the holder gets when the mutation is not native
|
||||
var/blocks = 4 //Amount of those big blocks with gene sequences
|
||||
var/difficulty = 8 //Amount of missing sequences. Sometimes it removes an entire pair for 2 points
|
||||
var/timed = FALSE //Boolean to easily check if we're going to self destruct
|
||||
var/alias //'Mutation #49', decided every round to get some form of distinction between undiscovered mutations
|
||||
var/scrambled = FALSE //Wheter we can read it if it's active. To avoid cheesing with mutagen
|
||||
var/class //Decides player accesibility, sorta
|
||||
//MUT_NORMAL - A mutation that can be activated and deactived by completing a sequence
|
||||
//MUT_EXTRA - A mutation that is in the mutations tab, and can be given and taken away through though the DNA console. Has a 0 before it's name in the mutation section of the dna console
|
||||
//MUT_OTHER Cannot be interacted with by players through normal means. I.E. wizards mutate
|
||||
|
||||
var/list/conflicts //any mutations that might conflict. put mutation typepath defines in here. make sure to enter it both ways (so that A conflicts with B, and B with A)
|
||||
var/can_chromosome = CHROMOSOME_NONE //can we take chromosomes? 0: CHROMOSOME_NEVER never, 1:CHROMOSOME_NONE yeah, 2: CHROMOSOME_USED no, already have one
|
||||
var/chromosome_name //purely cosmetic
|
||||
var/modified = FALSE //ugly but we really don't want chromosomes and on_acquiring to overlap and apply double the powers
|
||||
var/mutadone_proof = FALSE
|
||||
|
||||
//Chromosome stuff - set to -1 to prevent people from changing it. Example: It'd be a waste to decrease cooldown on mutism
|
||||
var/stabilizer_coeff = 1 //genetic stability coeff
|
||||
var/synchronizer_coeff = -1 //makes the mutation hurt the user less
|
||||
var/power_coeff = -1 //boosts mutation strength
|
||||
var/energy_coeff = -1 //lowers mutation cooldown
|
||||
|
||||
/datum/mutation/human/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
|
||||
. = ..()
|
||||
class = class_
|
||||
if(timer)
|
||||
addtimer(CALLBACK(src, .proc/remove), timer)
|
||||
timed = TRUE
|
||||
if(copymut && istype(copymut, /datum/mutation/human))
|
||||
copy_mutation(copymut)
|
||||
|
||||
/datum/mutation/human/proc/on_acquiring(mob/living/carbon/human/H)
|
||||
if(!H || !istype(H) || H.stat == DEAD || (src in H.dna.mutations))
|
||||
return TRUE
|
||||
if(species_allowed.len && !species_allowed.Find(H.dna.species.id))
|
||||
return TRUE
|
||||
if(health_req && H.health < health_req)
|
||||
return TRUE
|
||||
if(limb_req && !H.get_bodypart(limb_req))
|
||||
return TRUE
|
||||
for(var/M in H.dna.mutations)//check for conflicting powers
|
||||
var/datum/mutation/human/mewtayshun = M
|
||||
if(LAZYLEN(mewtayshun.conflicts))
|
||||
for(var/cons in mewtayshun.conflicts)
|
||||
var/datum/mutation/human/conflicter = cons
|
||||
if(conflicter == type)
|
||||
to_chat(H, "<span class='warning'>You feel your genes resisting something.</span>")
|
||||
return TRUE
|
||||
owner = H
|
||||
dna = H.dna
|
||||
dna.mutations += src
|
||||
if(text_gain_indication)
|
||||
to_chat(H, text_gain_indication)
|
||||
if(visual_indicators.len)
|
||||
var/list/mut_overlay = list(get_visual_indicator())
|
||||
if(H.overlays_standing[layer_used])
|
||||
mut_overlay = H.overlays_standing[layer_used]
|
||||
mut_overlay |= get_visual_indicator()
|
||||
H.remove_overlay(layer_used)
|
||||
H.overlays_standing[layer_used] = mut_overlay
|
||||
H.apply_overlay(layer_used)
|
||||
|
||||
grant_spell()
|
||||
if(!modified)
|
||||
addtimer(CALLBACK(src, .proc/modify, 5)) //gonna want children calling ..() to run first
|
||||
|
||||
/datum/mutation/human/proc/get_visual_indicator()
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_attack_hand(atom/target, proximity)
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_ranged_attack(atom/target, mouseparams)
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_move(atom/new_loc)
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_life()
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_losing(mob/living/carbon/human/owner)
|
||||
if(owner && istype(owner) && (owner.dna.mutations.Remove(src)))
|
||||
if(text_lose_indication && owner.stat != DEAD)
|
||||
to_chat(owner, text_lose_indication)
|
||||
if(visual_indicators.len)
|
||||
var/list/mut_overlay = list()
|
||||
if(owner.overlays_standing[layer_used])
|
||||
mut_overlay = owner.overlays_standing[layer_used]
|
||||
owner.remove_overlay(layer_used)
|
||||
mut_overlay.Remove(get_visual_indicator(owner))
|
||||
owner.overlays_standing[layer_used] = mut_overlay
|
||||
owner.apply_overlay(layer_used)
|
||||
if(power)
|
||||
owner.RemoveSpell(power)
|
||||
qdel(src)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/mutation/human/proc/say_mod(message)
|
||||
if(message)
|
||||
return message
|
||||
|
||||
/datum/mutation/human/proc/get_spans()
|
||||
return list()
|
||||
|
||||
/mob/living/carbon/proc/update_mutations_overlay()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/update_mutations_overlay()
|
||||
for(var/datum/mutation/human/CM in dna.mutations)
|
||||
if(CM.species_allowed.len && !CM.species_allowed.Find(dna.species.id))
|
||||
dna.force_lose(CM) //shouldn't have that mutation at all
|
||||
continue
|
||||
if(CM.visual_indicators.len)
|
||||
var/list/mut_overlay = list()
|
||||
if(overlays_standing[CM.layer_used])
|
||||
mut_overlay = overlays_standing[CM.layer_used]
|
||||
var/mutable_appearance/V = CM.get_visual_indicator()
|
||||
if(!mut_overlay.Find(V)) //either we lack the visual indicator or we have the wrong one
|
||||
remove_overlay(CM.layer_used)
|
||||
for(var/mutable_appearance/MA in CM.visual_indicators[CM.type])
|
||||
mut_overlay.Remove(MA)
|
||||
mut_overlay |= V
|
||||
overlays_standing[CM.layer_used] = mut_overlay
|
||||
apply_overlay(CM.layer_used)
|
||||
|
||||
|
||||
/datum/mutation/human/proc/modify() //called when a genome is applied so we can properly update some stats without having to remove and reapply the mutation from someone
|
||||
if(modified || !power || !owner)
|
||||
return
|
||||
power.charge_max *= GET_MUTATION_ENERGY(src)
|
||||
power.charge_counter *= GET_MUTATION_ENERGY(src)
|
||||
modified = TRUE
|
||||
|
||||
/datum/mutation/human/proc/copy_mutation(datum/mutation/human/HM)
|
||||
if(!HM)
|
||||
return
|
||||
chromosome_name = HM.chromosome_name
|
||||
stabilizer_coeff = HM.stabilizer_coeff
|
||||
synchronizer_coeff = HM.synchronizer_coeff
|
||||
power_coeff = HM.power_coeff
|
||||
energy_coeff = HM.energy_coeff
|
||||
mutadone_proof = HM.mutadone_proof
|
||||
can_chromosome = HM.can_chromosome
|
||||
|
||||
/datum/mutation/human/proc/remove_chromosome()
|
||||
stabilizer_coeff = initial(stabilizer_coeff)
|
||||
synchronizer_coeff = initial(synchronizer_coeff)
|
||||
power_coeff = initial(power_coeff)
|
||||
energy_coeff = initial(energy_coeff)
|
||||
mutadone_proof = initial(mutadone_proof)
|
||||
can_chromosome = initial(can_chromosome)
|
||||
chromosome_name = null
|
||||
|
||||
/datum/mutation/human/proc/remove()
|
||||
if(dna)
|
||||
dna.force_lose(src)
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/datum/mutation/human/proc/grant_spell()
|
||||
if(!ispath(power) || !owner)
|
||||
return FALSE
|
||||
|
||||
power = new power()
|
||||
power.action_background_icon_state = "bg_tech_blue_on"
|
||||
power.panel = "Genetic"
|
||||
owner.AddSpell(power)
|
||||
return TRUE
|
||||
@@ -0,0 +1,500 @@
|
||||
/datum/mutation/human/telepathy
|
||||
name = "Telepathy"
|
||||
desc = "A rare mutation that allows the user to telepathically communicate to others."
|
||||
quality = POSITIVE
|
||||
text_gain_indication = "<span class='notice'>You can hear your own voice echoing in your mind!</span>"
|
||||
text_lose_indication = "<span class='notice'>You don't hear your mind echo anymore.</span>"
|
||||
difficulty = 12
|
||||
power = /obj/effect/proc_holder/spell/targeted/telepathy/genetic
|
||||
instability = 10
|
||||
energy_coeff = 1
|
||||
|
||||
/datum/mutation/human/telepathy/on_acquiring(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
|
||||
/datum/mutation/human/telepathy/on_losing(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/telepathy/genetic
|
||||
magic_check = FALSE
|
||||
|
||||
/datum/mutation/human/firebreath
|
||||
name = "Fire Breath"
|
||||
desc = "An ancient mutation that gives lizards breath of fire."
|
||||
quality = POSITIVE
|
||||
difficulty = 12
|
||||
locked = TRUE
|
||||
text_gain_indication = "<span class='notice'>Your throat is burning!</span>"
|
||||
text_lose_indication = "<span class='notice'>Your throat is cooling down.</span>"
|
||||
power = /obj/effect/proc_holder/spell/aimed/firebreath
|
||||
instability = 30
|
||||
energy_coeff = 1
|
||||
power_coeff = 1
|
||||
|
||||
/datum/mutation/human/firebreath/modify()
|
||||
if(power)
|
||||
var/obj/effect/proc_holder/spell/aimed/firebreath/S = power
|
||||
S.strength = 4 + GET_MUTATION_POWER(src)
|
||||
|
||||
/obj/effect/proc_holder/spell/aimed/firebreath
|
||||
name = "Fire Breath"
|
||||
desc = "You can breathe fire at a target."
|
||||
school = "evocation"
|
||||
charge_max = 600
|
||||
clothes_req = NONE
|
||||
range = 20
|
||||
base_icon_state = "fireball"
|
||||
action_icon_state = "fireball0"
|
||||
sound = 'sound/magic/demon_dies.ogg' //horrifying lizard noises
|
||||
active_msg = "You built up heat in your mouth."
|
||||
deactive_msg = "You swallow the flame."
|
||||
var/strength = 4
|
||||
|
||||
/obj/effect/proc_holder/spell/aimed/firebreath/before_cast(list/targets)
|
||||
. = ..()
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
if(C.is_mouth_covered())
|
||||
C.adjust_fire_stacks(2)
|
||||
C.IgniteMob()
|
||||
to_chat(C,"<span class='warning'>Something in front of your mouth caught fire!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/effect/proc_holder/spell/aimed/firebreath/cast(list/targets, mob/living/user)
|
||||
var/turf/T = user.loc
|
||||
if(!isturf(T))
|
||||
return FALSE
|
||||
firecone(T,user.dir,strength)
|
||||
remove_ranged_ability()
|
||||
charge_counter = 0
|
||||
start_recharge()
|
||||
on_deactivation(user)
|
||||
|
||||
/proc/firecone(loc,dir,length)
|
||||
var/addsides = FALSE
|
||||
var/list/turf/recentturf = list(loc)
|
||||
for (var/i = 0;i < length;i++)
|
||||
var/list/turf/h = list()
|
||||
for (var/turf/g in recentturf)
|
||||
var/frontturf = get_step(g,dir)
|
||||
if (addsides)
|
||||
var/rightturf = get_step(frontturf,turn(dir,90))
|
||||
var/leftturf = get_step(frontturf,turn(dir,270))
|
||||
if (!(rightturf in h))
|
||||
h += rightturf
|
||||
if (!(leftturf in h))
|
||||
h += leftturf
|
||||
if (!(frontturf in h))
|
||||
h += frontturf
|
||||
for (var/turf/j in h)
|
||||
if (j.blocks_air)
|
||||
h -= j
|
||||
continue
|
||||
for (var/obj/o in j)
|
||||
if (o.CanAtmosPass == ATMOS_PASS_PROC ? !o.CanAtmosPass(loc) : !o.CanAtmosPass)
|
||||
h -= j
|
||||
continue
|
||||
for (var/turf/l in h)
|
||||
new /obj/effect/hotspot(l)
|
||||
l.hotspot_expose(700,50,1)
|
||||
sleep(1)
|
||||
recentturf = h
|
||||
addsides = !addsides
|
||||
|
||||
/datum/mutation/human/void
|
||||
name = "Void Magnet"
|
||||
desc = "A rare genome that attracts odd forces not usually observed."
|
||||
quality = MINOR_NEGATIVE //upsides and downsides
|
||||
text_gain_indication = "<span class='notice'>You feel a heavy, dull force just beyond the walls watching you.</span>"
|
||||
instability = 30
|
||||
power = /obj/effect/proc_holder/spell/self/void
|
||||
energy_coeff = 1
|
||||
synchronizer_coeff = 1
|
||||
|
||||
/datum/mutation/human/void/on_life()
|
||||
if(!isturf(owner.loc))
|
||||
return
|
||||
if(prob((0.5+((100-dna.stability)/20))) * GET_MUTATION_SYNCHRONIZER(src)) //very rare, but enough to annoy you hopefully. +0.5 probability for every 10 points lost in stability
|
||||
new /obj/effect/immortality_talisman/void(get_turf(owner), owner)
|
||||
|
||||
/obj/effect/proc_holder/spell/self/void
|
||||
name = "Convoke Void" //magic the gathering joke here
|
||||
desc = "A rare genome that attracts odd forces not usually observed. May sometimes pull you in randomly."
|
||||
school = "evocation"
|
||||
clothes_req = NONE
|
||||
charge_max = 600
|
||||
invocation = "DOOOOOOOOOOOOOOOOOOOOM!!!"
|
||||
invocation_type = "shout"
|
||||
action_icon_state = "void_magnet"
|
||||
var/in_use = FALSE //so it doesnt cast while you are already deep innit
|
||||
|
||||
/obj/effect/proc_holder/spell/self/void/can_cast(mob/user = usr)
|
||||
. = ..()
|
||||
if(!isturf(user.loc))
|
||||
return FALSE
|
||||
|
||||
/obj/effect/proc_holder/spell/self/void/cast(mob/user = usr)
|
||||
. = ..()
|
||||
new /obj/effect/immortality_talisman/void(get_turf(user), user)
|
||||
|
||||
/datum/mutation/human/shock
|
||||
name = "Shock Touch"
|
||||
desc = "The affected can channel excess electricity through their hands without shocking themselves, allowing them to shock others."
|
||||
quality = POSITIVE
|
||||
locked = TRUE
|
||||
difficulty = 16
|
||||
text_gain_indication = "<span class='notice'>You feel power flow through your hands.</span>"
|
||||
text_lose_indication = "<span class='notice'>The energy in your hands subsides.</span>"
|
||||
power = /obj/effect/proc_holder/spell/targeted/touch/shock
|
||||
instability = 30
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/touch/shock
|
||||
name = "Shock Touch"
|
||||
desc = "Channel electricity to your hand to shock people with."
|
||||
drawmessage = "You channel electricity into your hand."
|
||||
dropmessage = "You let the electricity from your hand dissipate."
|
||||
hand_path = /obj/item/melee/touch_attack/shock
|
||||
charge_max = 400
|
||||
clothes_req = NONE
|
||||
action_icon_state = "zap"
|
||||
|
||||
/obj/item/melee/touch_attack/shock
|
||||
name = "\improper shock touch"
|
||||
desc = "This is kind of like when you rub your feet on a shag rug so you can zap your friends, only a lot less safe."
|
||||
catchphrase = null
|
||||
on_use_sound = 'sound/weapons/zapbang.ogg'
|
||||
icon_state = "zapper"
|
||||
item_state = "zapper"
|
||||
|
||||
/obj/item/melee/touch_attack/shock/afterattack(atom/target, mob/living/carbon/user, proximity)
|
||||
if(!proximity || !isliving(target))
|
||||
return
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.electrocute_act(15, user, 1, SHOCK_NOSTUN))//doesnt stun. never let this stun
|
||||
C.dropItemToGround(C.get_active_held_item())
|
||||
C.dropItemToGround(C.get_inactive_held_item())
|
||||
C.confused += 10
|
||||
C.visible_message("<span class='danger'>[user] electrocutes [target]!</span>","<span class='userdanger'>[user] electrocutes you!</span>")
|
||||
return ..()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] fails to electrocute [target]!</span>")
|
||||
return ..()
|
||||
else if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.electrocute_act(15, user, 1, SHOCK_NOSTUN)
|
||||
L.visible_message("<span class='danger'>[user] electrocutes [target]!</span>","<span class='userdanger'>[user] electrocutes you!</span>")
|
||||
return ..()
|
||||
else
|
||||
to_chat(user,"<span class='warning'>The electricity doesn't seem to affect [target]...</span>")
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/mutation/human/olfaction
|
||||
name = "Transcendent Olfaction"
|
||||
desc = "Your sense of smell is comparable to that of a canine."
|
||||
quality = POSITIVE
|
||||
difficulty = 12
|
||||
text_gain_indication = "<span class='notice'>Smells begin to make more sense...</span>"
|
||||
text_lose_indication = "<span class='notice'>Your sense of smell goes back to normal.</span>"
|
||||
power = /obj/effect/proc_holder/spell/targeted/olfaction
|
||||
instability = 30
|
||||
synchronizer_coeff = 1
|
||||
var/reek = 200
|
||||
|
||||
/datum/mutation/human/olfaction/modify()
|
||||
if(power)
|
||||
var/obj/effect/proc_holder/spell/targeted/olfaction/S = power
|
||||
S.sensitivity = GET_MUTATION_SYNCHRONIZER(src)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/olfaction
|
||||
name = "Remember the Scent"
|
||||
desc = "Get a scent off of the item you're currently holding to track it. With an empty hand, you'll track the scent you've remembered."
|
||||
charge_max = 100
|
||||
clothes_req = NONE
|
||||
range = -1
|
||||
include_user = TRUE
|
||||
action_icon_state = "nose"
|
||||
var/mob/living/carbon/tracking_target
|
||||
var/list/mob/living/carbon/possible = list()
|
||||
var/sensitivity = 1
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/olfaction/cast(list/targets, mob/living/user = usr)
|
||||
//can we sniff? is there miasma in the air?
|
||||
var/datum/gas_mixture/air = user.loc.return_air()
|
||||
var/list/cached_gases = air.gases
|
||||
|
||||
if(cached_gases[/datum/gas/miasma])
|
||||
user.adjust_disgust(sensitivity * 45)
|
||||
to_chat(user, "<span class='warning'>With your overly sensitive nose, you get a whiff of stench and feel sick! Try moving to a cleaner area!</span>")
|
||||
return
|
||||
|
||||
var/atom/sniffed = user.get_active_held_item()
|
||||
if(sniffed)
|
||||
var/old_target = tracking_target
|
||||
possible = list()
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
if(md5(H.dna.uni_identity) in sniffed.fingerprints)
|
||||
possible |= H
|
||||
if(!length(possible))
|
||||
to_chat(user,"<span class='warning'>Despite your best efforts, there are no scents to be found on [sniffed]...</span>")
|
||||
return
|
||||
tracking_target = input(user, "Choose a scent to remember.", "Scent Tracking") as null|anything in sortNames(possible)
|
||||
if(!tracking_target)
|
||||
if(!old_target)
|
||||
to_chat(user,"<span class='warning'>You decide against remembering any scents. Instead, you notice your own nose in your peripheral vision. This goes on to remind you of that one time you started breathing manually and couldn't stop. What an awful day that was.</span>")
|
||||
return
|
||||
tracking_target = old_target
|
||||
on_the_trail(user)
|
||||
return
|
||||
to_chat(user,"<span class='notice'>You pick up the scent of [tracking_target]. The hunt begins.</span>")
|
||||
on_the_trail(user)
|
||||
return
|
||||
|
||||
if(!tracking_target)
|
||||
to_chat(user,"<span class='warning'>You're not holding anything to smell, and you haven't smelled anything you can track. You smell your skin instead; it's kinda salty.</span>")
|
||||
return
|
||||
|
||||
on_the_trail(user)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/olfaction/proc/on_the_trail(mob/living/user)
|
||||
if(!tracking_target)
|
||||
to_chat(user,"<span class='warning'>You're not tracking a scent, but the game thought you were. Something's gone wrong! Report this as a bug.</span>")
|
||||
return
|
||||
if(tracking_target == user)
|
||||
to_chat(user,"<span class='warning'>You smell out the trail to yourself. Yep, it's you.</span>")
|
||||
return
|
||||
if(usr.z < tracking_target.z)
|
||||
to_chat(user,"<span class='warning'>The trail leads... way up above you? Huh. They must be really, really far away.</span>")
|
||||
return
|
||||
else if(usr.z > tracking_target.z)
|
||||
to_chat(user,"<span class='warning'>The trail leads... way down below you? Huh. They must be really, really far away.</span>")
|
||||
return
|
||||
var/direction_text = "[dir2text(get_dir(usr, tracking_target))]"
|
||||
if(direction_text)
|
||||
to_chat(user,"<span class='notice'>You consider [tracking_target]'s scent. The trail leads <b>[direction_text].</b></span>")
|
||||
|
||||
|
||||
/datum/mutation/human/self_amputation
|
||||
name = "Autotomy"
|
||||
desc = "Allows a creature to voluntary discard a random appendage."
|
||||
quality = POSITIVE
|
||||
text_gain_indication = "<span class='notice'>Your joints feel loose.</span>"
|
||||
instability = 30
|
||||
power = /obj/effect/proc_holder/spell/self/self_amputation
|
||||
|
||||
energy_coeff = 1
|
||||
synchronizer_coeff = 1
|
||||
|
||||
/obj/effect/proc_holder/spell/self/self_amputation
|
||||
name = "Drop a limb"
|
||||
desc = "Concentrate to make a random limb pop right off your body."
|
||||
clothes_req = NONE
|
||||
charge_max = 100
|
||||
action_icon_state = "autotomy"
|
||||
|
||||
/obj/effect/proc_holder/spell/self/self_amputation/cast(list/targets, mob/user = usr)
|
||||
if(!iscarbon(user))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/C = user
|
||||
if(HAS_TRAIT(C, TRAIT_NODISMEMBER))
|
||||
return
|
||||
|
||||
var/list/parts = list()
|
||||
for(var/X in C.bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
if(BP.body_part != HEAD && BP.body_part != CHEST)
|
||||
if(BP.dismemberable)
|
||||
parts += BP
|
||||
if(!parts.len)
|
||||
to_chat(usr, "<span class='notice'>You can't shed any more limbs!</span>")
|
||||
return
|
||||
|
||||
var/obj/item/bodypart/BP = pick(parts)
|
||||
BP.dismember()
|
||||
|
||||
//spider webs
|
||||
/datum/mutation/human/webbing
|
||||
name = "Webbing Production"
|
||||
desc = "Allows the user to lay webbing, and travel through it."
|
||||
quality = POSITIVE
|
||||
text_gain_indication = "<span class='notice'>Your skin feels webby.</span>"
|
||||
instability = 15
|
||||
power = /obj/effect/proc_holder/spell/self/lay_genetic_web
|
||||
|
||||
/obj/effect/proc_holder/spell/self/lay_genetic_web
|
||||
name = "Lay Web"
|
||||
desc = "Drops a web. Only you will be able to traverse your web easily, making it pretty good for keeping you safe."
|
||||
clothes_req = NONE
|
||||
charge_max = 4 SECONDS //the same time to lay a web
|
||||
action_icon = 'icons/mob/actions/actions_genetic.dmi'
|
||||
action_icon_state = "lay_web"
|
||||
|
||||
/obj/effect/proc_holder/spell/self/lay_genetic_web/cast(list/targets, mob/user = usr)
|
||||
var/failed = FALSE
|
||||
if(!isturf(user.loc))
|
||||
to_chat(user, "<span class='warning'>You can't lay webs here!</span>")
|
||||
failed = TRUE
|
||||
var/turf/T = get_turf(user)
|
||||
var/obj/structure/spider/stickyweb/genetic/W = locate() in T
|
||||
if(W)
|
||||
to_chat(user, "<span class='warning'>There's already a web here!</span>")
|
||||
failed = TRUE
|
||||
if(failed)
|
||||
revert_cast(user)
|
||||
return FALSE
|
||||
|
||||
user.visible_message("<span class='notice'>[user] begins to secrete a sticky substance.</span>","<span class='notice'>You begin to lay a web.</span>")
|
||||
if(!do_after(user, 4 SECONDS, target = T))
|
||||
to_chat(user, "<span class='warning'>Your web spinning was interrupted!</span>")
|
||||
return
|
||||
else
|
||||
new /obj/structure/spider/stickyweb/genetic(T, user)
|
||||
|
||||
|
||||
/datum/mutation/human/tongue_spike
|
||||
name = "Tongue Spike"
|
||||
desc = "Allows a creature to voluntary shoot their tongue out as a deadly weapon."
|
||||
quality = POSITIVE
|
||||
text_gain_indication = "<span class='notice'>Your feel like you can throw your voice.</span>"
|
||||
instability = 15
|
||||
power = /obj/effect/proc_holder/spell/self/tongue_spike
|
||||
|
||||
energy_coeff = 1
|
||||
synchronizer_coeff = 1
|
||||
|
||||
/obj/effect/proc_holder/spell/self/tongue_spike
|
||||
name = "Launch spike"
|
||||
desc = "Shoot your tongue out in the direction you're facing, embedding it and dealing damage until they remove it."
|
||||
clothes_req = NONE
|
||||
charge_max = 100
|
||||
action_icon = 'icons/mob/actions/actions_genetic.dmi'
|
||||
action_icon_state = "spike"
|
||||
var/spike_path = /obj/item/hardened_spike
|
||||
|
||||
/obj/effect/proc_holder/spell/self/tongue_spike/cast(list/targets, mob/user = usr)
|
||||
if(!iscarbon(user))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/C = user
|
||||
if(HAS_TRAIT(C, TRAIT_NODISMEMBER))
|
||||
return
|
||||
var/obj/item/organ/tongue/tongue
|
||||
for(var/org in C.internal_organs)
|
||||
if(istype(org, /obj/item/organ/tongue))
|
||||
tongue = org
|
||||
break
|
||||
|
||||
if(!tongue)
|
||||
to_chat(C, "<span class='notice'>You don't have a tongue to shoot!</span>")
|
||||
return
|
||||
|
||||
tongue.Remove(C, special = TRUE)
|
||||
var/obj/item/hardened_spike/spike = new spike_path(get_turf(C), C)
|
||||
tongue.forceMove(spike)
|
||||
spike.throw_at(get_edge_target_turf(C,C.dir), 14, 4, C)
|
||||
|
||||
/obj/item/hardened_spike
|
||||
name = "biomass spike"
|
||||
desc = "Hardened biomass, shaped into a spike. Very pointy!"
|
||||
icon_state = "tonguespike"
|
||||
force = 2
|
||||
throwforce = 15 //15 + 2 (WEIGHT_CLASS_SMALL) * 4 (EMBEDDED_IMPACT_PAIN_MULTIPLIER) = i didnt do the math
|
||||
throw_speed = 4
|
||||
embedding = list("embedded_pain_multiplier" = 4, "embed_chance" = 100, "embedded_fall_chance" = 0)
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
sharpness = IS_SHARP
|
||||
var/mob/living/carbon/human/fired_by
|
||||
|
||||
/obj/item/hardened_spike/Initialize(mapload, firedby)
|
||||
. = ..()
|
||||
fired_by = firedby
|
||||
addtimer(CALLBACK(src, .proc/checkembedded), 5 SECONDS)
|
||||
|
||||
/obj/item/hardened_spike/proc/checkembedded()
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/embedtest = loc
|
||||
for(var/l in embedtest.bodyparts)
|
||||
var/obj/item/bodypart/limb = l
|
||||
if(src in limb.embedded_objects)
|
||||
return limb
|
||||
unembedded()
|
||||
|
||||
/obj/item/hardened_spike/unembedded()
|
||||
var/turf/T = get_turf(src)
|
||||
visible_message("<span class='warning'>[src] cracks and twists, changing shape!</span>")
|
||||
for(var/i in contents)
|
||||
var/obj/o = i
|
||||
o.forceMove(T)
|
||||
qdel(src)
|
||||
|
||||
/datum/mutation/human/tongue_spike/chem
|
||||
name = "Chem Spike"
|
||||
desc = "Allows a creature to voluntary shoot their tongue out as biomass, allowing a long range transfer of chemicals."
|
||||
quality = POSITIVE
|
||||
text_gain_indication = "<span class='notice'>Your feel like you can really connect with people by throwing your voice.</span>"
|
||||
instability = 15
|
||||
locked = TRUE
|
||||
power = /obj/effect/proc_holder/spell/self/tongue_spike/chem
|
||||
energy_coeff = 1
|
||||
synchronizer_coeff = 1
|
||||
|
||||
/obj/effect/proc_holder/spell/self/tongue_spike/chem
|
||||
name = "Launch chem spike"
|
||||
desc = "Shoot your tongue out in the direction you're facing, embedding it for a very small amount of damage. While the other person has the spike embedded, you can transfer your chemicals to them."
|
||||
action_icon_state = "spikechem"
|
||||
spike_path = /obj/item/hardened_spike/chem
|
||||
|
||||
/obj/item/hardened_spike/chem
|
||||
name = "chem spike"
|
||||
desc = "Hardened biomass, shaped into... something."
|
||||
icon_state = "tonguespikechem"
|
||||
throwforce = 2 //2 + 2 (WEIGHT_CLASS_SMALL) * 0 (EMBEDDED_IMPACT_PAIN_MULTIPLIER) = i didnt do the math again but very low or smthin
|
||||
embedding = list("embedded_pain_multiplier" = 0, "embed_chance" = 100, "embedded_fall_chance" = 0, "embedded_pain_chance" = 0, "embedded_ignore_throwspeed_threshold" = TRUE) //never hurts once it's in you
|
||||
var/been_places = FALSE
|
||||
var/datum/action/innate/send_chems/chems
|
||||
|
||||
/obj/item/hardened_spike/chem/embedded(mob/living/carbon/human/embedded_mob)
|
||||
if(been_places)
|
||||
return
|
||||
been_places = TRUE
|
||||
chems = new
|
||||
chems.transfered = embedded_mob
|
||||
chems.spikey = src
|
||||
to_chat(fired_by, "<span class='notice'>Link established! Use the \"Transfer Chemicals\" ability to send your chemicals to the linked target!</span>")
|
||||
chems.Grant(fired_by)
|
||||
|
||||
/obj/item/hardened_spike/chem/unembedded()
|
||||
to_chat(fired_by, "<span class='warning'>Link lost!</span>")
|
||||
QDEL_NULL(chems)
|
||||
..()
|
||||
|
||||
/datum/action/innate/send_chems
|
||||
icon_icon = 'icons/mob/actions/actions_genetic.dmi'
|
||||
background_icon_state = "bg_spell"
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
button_icon_state = "spikechemswap"
|
||||
name = "Transfer Chemicals"
|
||||
desc = "Send all of your reagents into whomever the chem spike is embedded in. One use."
|
||||
var/obj/item/hardened_spike/chem/spikey
|
||||
var/mob/living/carbon/human/transfered
|
||||
|
||||
/datum/action/innate/send_chems/Activate()
|
||||
if(!ishuman(transfered) || !ishuman(owner))
|
||||
return
|
||||
var/mob/living/carbon/human/transferer = owner
|
||||
|
||||
to_chat(transfered, "<span class='warning'>You feel a tiny prick!</span>")
|
||||
transferer.reagents.trans_to(transfered, transferer.reagents.total_volume, 1, 1, 0)
|
||||
|
||||
var/obj/item/bodypart/L = spikey.checkembedded()
|
||||
|
||||
L.embedded_objects -= spikey
|
||||
//this is where it would deal damage, if it transfers chems it removes itself so no damage
|
||||
spikey.forceMove(get_turf(L))
|
||||
transfered.visible_message("<span class='notice'>[spikey] falls out of [transfered]!</span>")
|
||||
if(!transfered.has_embedded_objects())
|
||||
transfered.clear_alert("embeddedobject")
|
||||
SEND_SIGNAL(transfered, COMSIG_CLEAR_MOOD_EVENT, "embedded")
|
||||
spikey.unembedded()
|
||||
@@ -0,0 +1,108 @@
|
||||
/datum/mutation/human/antenna
|
||||
name = "Antenna"
|
||||
desc = "The affected person sprouts an antenna. This is known to allow them to access common radio channels passively."
|
||||
quality = POSITIVE
|
||||
text_gain_indication = "<span class='notice'>You feel an antenna sprout from your forehead.</span>"
|
||||
text_lose_indication = "<span class='notice'>Your antenna shrinks back down.</span>"
|
||||
instability = 5
|
||||
difficulty = 8
|
||||
var/obj/item/implant/radio/antenna/linked_radio
|
||||
|
||||
/obj/item/implant/radio/antenna
|
||||
name = "internal antenna organ"
|
||||
desc = "The internal organ part of the antenna. Science has not yet given it a good name."
|
||||
icon = 'icons/obj/radio.dmi'//maybe make a unique sprite later. not important
|
||||
icon_state = "walkietalkie"
|
||||
|
||||
/obj/item/implant/radio/antenna/Initialize(mapload)
|
||||
..()
|
||||
if (radio)
|
||||
radio.name = "internal antenna"
|
||||
|
||||
/datum/mutation/human/antenna/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
linked_radio = new(owner)
|
||||
linked_radio.implant(owner, null, TRUE, TRUE)
|
||||
|
||||
/datum/mutation/human/antenna/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
if(linked_radio)
|
||||
linked_radio.Destroy()
|
||||
|
||||
/datum/mutation/human/antenna/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
|
||||
..()
|
||||
if(!(type in visual_indicators))
|
||||
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "antenna", -FRONT_MUTATIONS_LAYER+1))//-MUTATIONS_LAYER+1
|
||||
|
||||
/datum/mutation/human/antenna/get_visual_indicator()
|
||||
return visual_indicators[type][1]
|
||||
|
||||
/datum/mutation/human/mindreader
|
||||
name = "Mind Reader"
|
||||
desc = "The affected person can look into the recent memories of others."
|
||||
quality = POSITIVE
|
||||
text_gain_indication = "<span class='notice'>You hear distant voices at the corners of your mind.</span>"
|
||||
text_lose_indication = "<span class='notice'>The distant voices fade.</span>"
|
||||
power = /obj/effect/proc_holder/spell/targeted/mindread
|
||||
instability = 40
|
||||
difficulty = 8
|
||||
locked = TRUE
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/mindread
|
||||
name = "Mindread"
|
||||
desc = "Read the target's mind."
|
||||
charge_max = 300
|
||||
range = 7
|
||||
clothes_req = FALSE
|
||||
action_icon_state = "mindread"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/mindread/cast(list/targets, mob/living/carbon/human/user = usr)
|
||||
for(var/mob/living/M in targets)
|
||||
if(usr.anti_magic_check(FALSE, FALSE, TRUE, 0) || M.anti_magic_check(FALSE, FALSE, TRUE, 0))
|
||||
to_chat(usr, "<span class='warning'>As you reach out with your mind, you're suddenly stopped by a vision of a massive tinfoil wall that streches beyond visible range. It seems you've been foiled.</span>")
|
||||
return
|
||||
if(M.stat == DEAD)
|
||||
to_chat(user, "<span class='boldnotice'>[M] is dead!</span>")
|
||||
return
|
||||
if(M.mind)
|
||||
to_chat(user, "<span class='boldnotice'>You plunge into [M]'s mind...</span>")
|
||||
if(prob(20))
|
||||
to_chat(M, "<span class='danger'>You feel something foreign enter your mind.</span>")//chance to alert the read-ee
|
||||
var/list/recent_speech = list()
|
||||
var/list/say_log = list()
|
||||
var/log_source = M.logging
|
||||
for(var/log_type in log_source)//this whole loop puts the read-ee's say logs into say_log in an easy to access way
|
||||
var/nlog_type = text2num(log_type)
|
||||
if(nlog_type & LOG_SAY)
|
||||
var/list/reversed = log_source[log_type]
|
||||
if(islist(reversed))
|
||||
say_log = reverseRange(reversed.Copy())
|
||||
break
|
||||
if(LAZYLEN(say_log))
|
||||
for(var/spoken_memory in say_log)
|
||||
if(recent_speech.len >= 3)//up to 3 random lines of speech, favoring more recent speech
|
||||
break
|
||||
if(prob(50))
|
||||
recent_speech[spoken_memory] = say_log[spoken_memory]
|
||||
if(recent_speech.len)
|
||||
to_chat(user, "<span class='boldnotice'>You catch some drifting memories of their past conversations...</span>")
|
||||
for(var/spoken_memory in recent_speech)
|
||||
to_chat(user, "<span class='notice'>[recent_speech[spoken_memory]]</span>")
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
to_chat(user, "<span class='boldnotice'>You find that their intent is to [H.a_intent]...</span>")
|
||||
var/datum/dna/the_dna = H.has_dna()
|
||||
if(the_dna)
|
||||
to_chat(user, "<span class='boldnotice'>You uncover that [H.p_their()] true identity is [the_dna.real_name].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't find a mind to read inside of [M]!</span>")
|
||||
|
||||
/datum/mutation/human/mindreader/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
|
||||
..()
|
||||
if(!(type in visual_indicators))
|
||||
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "antenna", -FRONT_MUTATIONS_LAYER+1))
|
||||
|
||||
/datum/mutation/human/mindreader/get_visual_indicator()
|
||||
return visual_indicators[type][1]
|
||||
+239
-15
@@ -3,16 +3,19 @@
|
||||
//Epilepsy gives a very small chance to have a seizure every life tick, knocking you unconscious.
|
||||
/datum/mutation/human/epilepsy
|
||||
name = "Epilepsy"
|
||||
desc = "A genetic defect that sporadically causes seizures."
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You get a headache.</span>"
|
||||
synchronizer_coeff = 1
|
||||
power_coeff = 1
|
||||
|
||||
/datum/mutation/human/epilepsy/on_life(mob/living/carbon/human/owner)
|
||||
if(prob(1) && owner.stat == CONSCIOUS)
|
||||
/datum/mutation/human/epilepsy/on_life()
|
||||
if(prob(1 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS)
|
||||
owner.visible_message("<span class='danger'>[owner] starts having a seizure!</span>", "<span class='userdanger'>You have a seizure!</span>")
|
||||
owner.Unconscious(200)
|
||||
owner.Jitter(1000)
|
||||
owner.Unconscious(200 * GET_MUTATION_POWER(src))
|
||||
owner.Jitter(1000 * GET_MUTATION_POWER(src))
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "epilepsy", /datum/mood_event/epilepsy)
|
||||
addtimer(CALLBACK(src, .proc/jitter_less, owner), 90)
|
||||
addtimer(CALLBACK(src, .proc/jitter_less), 90)
|
||||
|
||||
/datum/mutation/human/epilepsy/proc/jitter_less(mob/living/carbon/human/owner)
|
||||
if(owner)
|
||||
@@ -22,19 +25,23 @@
|
||||
//Unstable DNA induces random mutations!
|
||||
/datum/mutation/human/bad_dna
|
||||
name = "Unstable DNA"
|
||||
desc = "Strange mutation that causes the holder to randomly mutate."
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You feel strange.</span>"
|
||||
locked = TRUE
|
||||
|
||||
/datum/mutation/human/bad_dna/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
to_chat(owner, text_gain_indication)
|
||||
var/mob/new_mob
|
||||
if(prob(95))
|
||||
if(prob(50))
|
||||
new_mob = owner.randmutb()
|
||||
new_mob = owner.easy_randmut(NEGATIVE + MINOR_NEGATIVE)
|
||||
else
|
||||
new_mob = owner.randmuti()
|
||||
else
|
||||
new_mob = owner.randmutg()
|
||||
new_mob = owner.easy_randmut(POSITIVE)
|
||||
if(new_mob && ismob(new_mob))
|
||||
owner = new_mob
|
||||
. = owner
|
||||
@@ -44,40 +51,52 @@
|
||||
//Cough gives you a chronic cough that causes you to drop items.
|
||||
/datum/mutation/human/cough
|
||||
name = "Cough"
|
||||
desc = "A chronic cough."
|
||||
quality = MINOR_NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You start coughing.</span>"
|
||||
synchronizer_coeff = 1
|
||||
power_coeff = 1
|
||||
|
||||
/datum/mutation/human/cough/on_life(mob/living/carbon/human/owner)
|
||||
if(prob(5) && owner.stat == CONSCIOUS)
|
||||
/datum/mutation/human/cough/on_life()
|
||||
if(prob(5 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS)
|
||||
owner.drop_all_held_items()
|
||||
owner.emote("cough")
|
||||
|
||||
if(GET_MUTATION_POWER(src) > 1)
|
||||
var/cough_range = GET_MUTATION_POWER(src) * 4
|
||||
var/turf/target = get_ranged_target_turf(owner, turn(owner.dir, 180), cough_range)
|
||||
owner.throw_at(target, cough_range, GET_MUTATION_POWER(src))
|
||||
|
||||
|
||||
//Dwarfism shrinks your body and lets you pass tables.
|
||||
/datum/mutation/human/dwarfism
|
||||
name = "Dwarfism"
|
||||
desc = "A mutation believed to be the cause of dwarfism."
|
||||
quality = POSITIVE
|
||||
get_chance = 15
|
||||
lowest_value = 256 * 12
|
||||
difficulty = 16
|
||||
instability = 5
|
||||
conflicts = list(GIGANTISM)
|
||||
locked = TRUE // Default intert species for now, so locked from regular pool.
|
||||
|
||||
/datum/mutation/human/dwarfism/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.transform = owner.transform.Scale(1, 0.8)
|
||||
owner.pass_flags |= PASSTABLE
|
||||
passtable_on(owner, GENETIC_MUTATION)
|
||||
owner.visible_message("<span class='danger'>[owner] suddenly shrinks!</span>", "<span class='notice'>Everything around you seems to grow..</span>")
|
||||
|
||||
/datum/mutation/human/dwarfism/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.transform = owner.transform.Scale(1, 1.25)
|
||||
owner.pass_flags &= ~PASSTABLE
|
||||
passtable_off(owner, GENETIC_MUTATION)
|
||||
owner.visible_message("<span class='danger'>[owner] suddenly grows!</span>", "<span class='notice'>Everything around you seems to shrink..</span>")
|
||||
|
||||
|
||||
//Clumsiness has a very large amount of small drawbacks depending on item.
|
||||
/datum/mutation/human/clumsy
|
||||
name = "Clumsiness"
|
||||
desc = "A genome that inhibits certain brain functions, causing the holder to appear clumsy. Honk"
|
||||
quality = MINOR_NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You feel lightheaded.</span>"
|
||||
|
||||
@@ -95,11 +114,13 @@
|
||||
//Tourettes causes you to randomly stand in place and shout.
|
||||
/datum/mutation/human/tourettes
|
||||
name = "Tourette's Syndrome"
|
||||
desc = "A chronic twitch that forces the user to use colorful language."
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You twitch.</span>"
|
||||
synchronizer_coeff = 1
|
||||
|
||||
/datum/mutation/human/tourettes/on_life(mob/living/carbon/human/owner)
|
||||
if(prob(10) && owner.stat == CONSCIOUS && !owner.IsStun())
|
||||
/datum/mutation/human/tourettes/on_life()
|
||||
if(prob(10 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS && !owner.IsStun())
|
||||
owner.Stun(200)
|
||||
switch(rand(1, 3))
|
||||
if(1)
|
||||
@@ -117,6 +138,7 @@
|
||||
//Deafness makes you deaf.
|
||||
/datum/mutation/human/deaf
|
||||
name = "Deafness"
|
||||
desc = "The holder of this genome is completely deaf."
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You can't seem to hear anything.</span>"
|
||||
|
||||
@@ -134,8 +156,10 @@
|
||||
//Monified turns you into a monkey.
|
||||
/datum/mutation/human/race
|
||||
name = "Monkified"
|
||||
desc = "A strange genome, believing to be what differentiates monkeys from humans."
|
||||
quality = NEGATIVE
|
||||
time_coeff = 2
|
||||
locked = TRUE //Species specific, keep out of actual gene pool
|
||||
|
||||
/datum/mutation/human/race/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
@@ -145,3 +169,203 @@
|
||||
/datum/mutation/human/race/on_losing(mob/living/carbon/monkey/owner)
|
||||
if(owner && istype(owner) && owner.stat != DEAD && (owner.dna.mutations.Remove(src)))
|
||||
. = owner.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_KEEPSE)
|
||||
|
||||
|
||||
/datum/mutation/human/glow
|
||||
name = "Glowy"
|
||||
desc = "You permanently emit a light with a random color and intensity."
|
||||
quality = POSITIVE
|
||||
text_gain_indication = "<span class='notice'>Your skin begins to glow softly.</span>"
|
||||
instability = 5
|
||||
var/obj/effect/dummy/luminescent_glow/glowth //shamelessly copied from luminescents
|
||||
var/glow = 1.5
|
||||
power_coeff = 1
|
||||
|
||||
/datum/mutation/human/glow/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
glowth = new(owner)
|
||||
glowth.set_light(glow, glow, dna.features["mcolor"])
|
||||
|
||||
/datum/mutation/human/glow/modify(mob/living/carbon/human/owner)
|
||||
if(glowth)
|
||||
glowth.set_light(glow + GET_MUTATION_POWER(src) , glow + GET_MUTATION_POWER(src), dna.features["mcolor"])
|
||||
|
||||
/datum/mutation/human/glow/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
qdel(glowth)
|
||||
|
||||
/datum/mutation/human/strong
|
||||
name = "Strength"
|
||||
desc = "The user's muscles slightly expand."
|
||||
quality = POSITIVE
|
||||
text_gain_indication = "<span class='notice'>You feel strong.</span>"
|
||||
difficulty = 16
|
||||
|
||||
/datum/mutation/human/fire
|
||||
name = "Fiery Sweat"
|
||||
desc = "The user's skin will randomly combust, but is generally alot more resilient to burning."
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='warning'>You feel hot.</span>"
|
||||
text_lose_indication = "<span class'notice'>You feel a lot cooler.</span>"
|
||||
difficulty = 14
|
||||
synchronizer_coeff = 1
|
||||
power_coeff = 1
|
||||
|
||||
/datum/mutation/human/fire/on_life()
|
||||
if(prob((1+(100-dna.stability)/10)) * GET_MUTATION_SYNCHRONIZER(src))
|
||||
owner.adjust_fire_stacks(2 * GET_MUTATION_POWER(src))
|
||||
owner.IgniteMob()
|
||||
|
||||
/datum/mutation/human/fire/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.physiology.burn_mod *= 0.5
|
||||
|
||||
/datum/mutation/human/fire/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.physiology.burn_mod *= 2
|
||||
|
||||
/datum/mutation/human/insulated
|
||||
name = "Insulated"
|
||||
desc = "The affected person does not conduct electricity."
|
||||
quality = POSITIVE
|
||||
text_gain_indication = "<span class='notice'>Your fingertips go numb.</span>"
|
||||
text_lose_indication = "<span class='notice'>Your fingertips regain feeling.</span>"
|
||||
difficulty = 16
|
||||
instability = 25
|
||||
|
||||
/datum/mutation/human/insulated/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_SHOCKIMMUNE, "genetics")
|
||||
|
||||
/datum/mutation/human/insulated/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
REMOVE_TRAIT(owner, TRAIT_SHOCKIMMUNE, "genetics")
|
||||
|
||||
|
||||
/datum/mutation/human/glow/anti
|
||||
name = "Anti-Glow"
|
||||
desc = "Your skin seems to attract and absorb nearby light creating 'darkness' around you."
|
||||
text_gain_indication = "<span class='notice'>Your light around you seems to disappear.</span>"
|
||||
glow = -3.5 //Slightly stronger, since negating light tends to be harder than making it.
|
||||
locked = TRUE
|
||||
|
||||
/datum/mutation/human/stimmed
|
||||
name = "Stimmed"
|
||||
desc = "The user's chemical balance is more robust."
|
||||
quality = POSITIVE
|
||||
text_gain_indication = "<span class='notice'>You feel stimmed.</span>"
|
||||
difficulty = 16
|
||||
|
||||
/datum/mutation/human/paranoia
|
||||
name = "Paranoia"
|
||||
desc = "Subject is easily terrified, and may suffer from hallucinations."
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You feel screams echo through your mind...</span>"
|
||||
text_lose_indication = "<span class'notice'>The screaming in your mind fades.</span>"
|
||||
|
||||
/datum/mutation/human/paranoia/on_life()
|
||||
if(prob(5) && owner.stat == CONSCIOUS)
|
||||
owner.emote("scream")
|
||||
owner.jitteriness = min(max(0, owner.jitteriness + 5), 30)
|
||||
if(prob(25))
|
||||
to_chat(owner,"<span class='warning'>You feel someone creeping in on you...</span>")
|
||||
owner.hallucination += 20
|
||||
|
||||
|
||||
/datum/mutation/human/badblink
|
||||
name = "Spatial Instability"
|
||||
desc = "The victim of the mutation has a very weak link to spatial reality, and may be displaced. Often causes extreme nausea."
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='warning'>The space around you twists sickeningly.</span>"
|
||||
text_lose_indication = "<span class'notice'>The space around you settles back to normal.</span>"
|
||||
difficulty = 18//high so it's hard to unlock and abuse
|
||||
instability = 10
|
||||
synchronizer_coeff = 1
|
||||
energy_coeff = 1
|
||||
power_coeff = 1
|
||||
var/warpchance = 0
|
||||
|
||||
/datum/mutation/human/badblink/on_life()
|
||||
if (!owner)
|
||||
return
|
||||
if(prob(warpchance))
|
||||
var/warpmessage = pick(
|
||||
"<span class='warning'>With a sickening 720-degree twist of [owner.p_their()] back, [owner] vanishes into thin air.</span>",
|
||||
"<span class='warning'>[owner] does some sort of strange backflip into another dimension. It looks pretty painful.</span>",
|
||||
"<span class='warning'>[owner] does a jump to the left, a step to the right, and warps out of reality.</span>",
|
||||
"<span class='warning'>[owner]'s torso starts folding inside out until it vanishes from reality, taking [owner] with it.</span>",
|
||||
"<span class='warning'>One moment, you see [owner]. The next, [owner] is gone.</span>")
|
||||
owner.visible_message(warpmessage, "<span class='userdanger'>You feel a wave of nausea as you fall through reality!</span>")
|
||||
var/warpdistance = rand(10,15) * GET_MUTATION_POWER(src)
|
||||
do_teleport(owner, get_turf(owner), warpdistance, channel = TELEPORT_CHANNEL_FREE)
|
||||
owner.adjust_disgust(GET_MUTATION_SYNCHRONIZER(src) * (warpchance * warpdistance))
|
||||
warpchance = 0
|
||||
owner.visible_message("<span class='danger'>[owner] appears out of nowhere!</span>")
|
||||
else
|
||||
warpchance += 0.25 * GET_MUTATION_ENERGY(src)
|
||||
|
||||
/datum/mutation/human/acidflesh
|
||||
name = "Acidic Flesh"
|
||||
desc = "Subject has acidic chemicals building up underneath the skin. This is often lethal."
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='userdanger'>A horrible burning sensation envelops you as your flesh turns to acid!</span>"
|
||||
text_lose_indication = "<span class'notice'>A feeling of relief fills you as your flesh goes back to normal.</span>"
|
||||
difficulty = 18//high so it's hard to unlock and use on others
|
||||
var/msgcooldown = 0
|
||||
|
||||
/datum/mutation/human/acidflesh/on_life()
|
||||
if(prob(25))
|
||||
if(world.time > msgcooldown)
|
||||
to_chat(owner, "<span class='danger'>Your acid flesh bubbles...</span>")
|
||||
msgcooldown = world.time + 200
|
||||
if(prob(15))
|
||||
owner.acid_act(rand(30,50), 10)
|
||||
owner.visible_message("<span class='warning'>[owner]'s skin bubbles and pops.</span>", "<span class='userdanger'>Your bubbling flesh pops! It burns!</span>")
|
||||
playsound(owner,'sound/weapons/sear.ogg', 50, TRUE)
|
||||
|
||||
/datum/mutation/human/gigantism
|
||||
name = "Gigantism"//negative version of dwarfism
|
||||
desc = "The cells within the subject spread out to cover more area, making the subject appear larger."
|
||||
quality = MINOR_NEGATIVE
|
||||
difficulty = 12
|
||||
conflicts = list(DWARFISM)
|
||||
|
||||
/datum/mutation/human/gigantism/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.resize = 1.25
|
||||
owner.update_transform()
|
||||
owner.visible_message("<span class='danger'>[owner] suddenly grows!</span>", "<span class='notice'>Everything around you seems to shrink..</span>")
|
||||
|
||||
/datum/mutation/human/gigantism/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.resize = 0.8
|
||||
owner.update_transform()
|
||||
owner.visible_message("<span class='danger'>[owner] suddenly shrinks!</span>", "<span class='notice'>Everything around you seems to grow..</span>")
|
||||
|
||||
/datum/mutation/human/spastic
|
||||
name = "Spastic"
|
||||
desc = "Subject suffers from muscle spasms."
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='warning'>You flinch.</span>"
|
||||
text_lose_indication = "<span class'notice'>Your flinching subsides.</span>"
|
||||
difficulty = 16
|
||||
|
||||
/datum/mutation/human/spastic/on_acquiring()
|
||||
if(..())
|
||||
return
|
||||
if (owner)
|
||||
owner.apply_status_effect(STATUS_EFFECT_SPASMS)
|
||||
|
||||
/datum/mutation/human/spastic/on_losing()
|
||||
if(..())
|
||||
return
|
||||
if (owner)
|
||||
owner.remove_status_effect(STATUS_EFFECT_SPASMS)
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
//Chameleon causes the owner to slowly become transparent when not moving.
|
||||
/datum/mutation/human/chameleon
|
||||
name = "Chameleon"
|
||||
desc = "A genome that causes the holder's skin to become transparent over time."
|
||||
quality = POSITIVE
|
||||
get_chance = 20
|
||||
lowest_value = 256 * 12
|
||||
difficulty = 16
|
||||
text_gain_indication = "<span class='notice'>You feel one with your surroundings.</span>"
|
||||
text_lose_indication = "<span class='notice'>You feel oddly exposed.</span>"
|
||||
time_coeff = 5
|
||||
instability = 25
|
||||
|
||||
/datum/mutation/human/chameleon/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
|
||||
|
||||
/datum/mutation/human/chameleon/on_life(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/chameleon/on_life()
|
||||
owner.alpha = max(0, owner.alpha - 25)
|
||||
|
||||
/datum/mutation/human/chameleon/on_move(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/chameleon/on_move(atom/new_loc)
|
||||
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
|
||||
|
||||
/datum/mutation/human/chameleon/on_attack_hand(mob/living/carbon/human/owner, atom/target, proximity)
|
||||
/datum/mutation/human/chameleon/on_attack_hand(atom/target, proximity)
|
||||
if(proximity) //stops tk from breaking chameleon
|
||||
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
|
||||
return
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/datum/mutation/human/geladikinesis
|
||||
name = "Geladikinesis"
|
||||
desc = "Allows the user to concentrate moisture and sub-zero forces into snow."
|
||||
quality = POSITIVE
|
||||
text_gain_indication = "<span class='notice'>Your hand feels cold.</span>"
|
||||
instability = 10
|
||||
difficulty = 10
|
||||
synchronizer_coeff = 1
|
||||
power = /obj/effect/proc_holder/spell/targeted/conjure_item/snow
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/conjure_item/snow
|
||||
name = "Create Snow"
|
||||
desc = "Concentrates cryokinetic forces to create snow, useful for snow-like construction."
|
||||
item_type = /obj/item/stack/sheet/mineral/snow
|
||||
charge_max = 50
|
||||
action_icon_state = "snow"
|
||||
delete_old = FALSE
|
||||
|
||||
|
||||
/datum/mutation/human/cryokinesis
|
||||
name = "Cryokinesis"
|
||||
desc = "Draws negative energy from the sub-zero void to freeze surrounding temperatures at subject's will."
|
||||
quality = POSITIVE //upsides and downsides
|
||||
text_gain_indication = "<span class='notice'>Your hand feels cold.</span>"
|
||||
instability = 20
|
||||
difficulty = 12
|
||||
synchronizer_coeff = 1
|
||||
power = /obj/effect/proc_holder/spell/aimed/cryo
|
||||
|
||||
/obj/effect/proc_holder/spell/aimed/cryo
|
||||
name = "Cryobeam"
|
||||
desc = "This power fires a frozen bolt at a target."
|
||||
charge_max = 150
|
||||
cooldown_min = 150
|
||||
clothes_req = FALSE
|
||||
range = 3
|
||||
projectile_type = /obj/item/projectile/temp/cryo
|
||||
base_icon_state = "icebeam"
|
||||
action_icon_state = "icebeam"
|
||||
active_msg = "You focus your cryokinesis!"
|
||||
deactive_msg = "You relax."
|
||||
active = FALSE
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
//Cold Resistance gives your entire body an orange halo, and makes you immune to the effects of vacuum and cold.
|
||||
/datum/mutation/human/cold_resistance
|
||||
name = "Cold Resistance"
|
||||
quality = POSITIVE
|
||||
get_chance = 25
|
||||
lowest_value = 256 * 12
|
||||
text_gain_indication = "<span class='notice'>Your body feels warm!</span>"
|
||||
time_coeff = 5
|
||||
|
||||
/datum/mutation/human/cold_resistance/New()
|
||||
..()
|
||||
visual_indicators |= mutable_appearance('icons/effects/genetics.dmi', "fire", -MUTATIONS_LAYER)
|
||||
|
||||
/datum/mutation/human/cold_resistance/get_visual_indicator(mob/living/carbon/human/owner)
|
||||
return visual_indicators[1]
|
||||
|
||||
/datum/mutation/human/cold_resistance/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance")
|
||||
// ADD_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance") CITADEL CHANGE
|
||||
|
||||
/datum/mutation/human/cold_resistance/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
REMOVE_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance")
|
||||
// REMOVE_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance") CITADEL CHANGE
|
||||
|
||||
/datum/mutation/human/cold_resistance/on_life(mob/living/carbon/human/owner)
|
||||
if(owner.getFireLoss())
|
||||
if(prob(1))
|
||||
owner.heal_bodypart_damage(0,1) //Is this really needed?
|
||||
@@ -0,0 +1,28 @@
|
||||
/datum/generecipe
|
||||
var/required = "" //it hurts so bad but initial is not compatible with lists
|
||||
var/result = null
|
||||
|
||||
/proc/get_mixed_mutation(mutation1, mutation2)
|
||||
if(!mutation1 || !mutation2)
|
||||
return FALSE
|
||||
if(mutation1 == mutation2) //this could otherwise be bad
|
||||
return FALSE
|
||||
for(var/A in GLOB.mutation_recipes)
|
||||
if(findtext(A, "[mutation1]") && findtext(A, "[mutation2]"))
|
||||
return GLOB.mutation_recipes[A]
|
||||
|
||||
/datum/generecipe/shock
|
||||
required = "/datum/mutation/human/insulated; /datum/mutation/human/radioactive"
|
||||
result = SHOCKTOUCH
|
||||
|
||||
/datum/generecipe/mindread
|
||||
required = "/datum/mutation/human/antenna; /datum/mutation/human/paranoia"
|
||||
result = MINDREAD
|
||||
|
||||
/datum/generecipe/antiglow
|
||||
required = "/datum/mutation/human/glow; /datum/mutation/human/void"
|
||||
result = ANTIGLOWY
|
||||
|
||||
/datum/generecipe/tonguechem
|
||||
required = "/datum/mutation/human/tongue_spike; /datum/mutation/human/stimmed"
|
||||
result = TONGUESPIKECHEM
|
||||
@@ -1,12 +1,13 @@
|
||||
//Hulk turns your skin green, and allows you to punch through walls.
|
||||
/datum/mutation/human/hulk
|
||||
name = "Hulk"
|
||||
desc = "A poorly understood genome that causes the holder's muscles to expand, inhibit speech and gives the person a bad skin condition."
|
||||
quality = POSITIVE
|
||||
get_chance = 15
|
||||
lowest_value = 256 * 12
|
||||
locked = TRUE
|
||||
difficulty = 16
|
||||
text_gain_indication = "<span class='notice'>Your muscles hurt!</span>"
|
||||
species_allowed = list("fly") //no skeleton/lizard hulk
|
||||
health_req = 25
|
||||
instability = 40
|
||||
|
||||
/datum/mutation/human/hulk/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
@@ -18,11 +19,11 @@
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "hulk", /datum/mood_event/hulk)
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/mutation/human/hulk/on_attack_hand(mob/living/carbon/human/owner, atom/target, proximity)
|
||||
/datum/mutation/human/hulk/on_attack_hand(atom/target, proximity)
|
||||
if(proximity) //no telekinetic hulk attack
|
||||
return target.attack_hulk(owner)
|
||||
|
||||
/datum/mutation/human/hulk/on_life(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/hulk/on_life()
|
||||
if(owner.health < 0)
|
||||
on_losing(owner)
|
||||
to_chat(owner, "<span class='danger'>You suddenly feel very weak.</span>")
|
||||
@@ -32,7 +33,7 @@
|
||||
return
|
||||
REMOVE_TRAIT(owner, TRAIT_STUNIMMUNE, TRAIT_HULK)
|
||||
REMOVE_TRAIT(owner, TRAIT_PUSHIMMUNE, TRAIT_HULK)
|
||||
ADD_TRAIT(owner, TRAIT_CHUNKYFINGERS, TRAIT_HULK)
|
||||
REMOVE_TRAIT(owner, TRAIT_CHUNKYFINGERS, TRAIT_HULK)
|
||||
owner.update_body_parts()
|
||||
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "hulk")
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/datum/mutation/human/radioactive
|
||||
name = "Radioactivity"
|
||||
desc = "A volatile mutation that causes the host to sent out deadly beta radiation. This affects both the hosts and their surroundings."
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='warning'>You can feel it in your bones!</span>"
|
||||
time_coeff = 5
|
||||
instability = 5
|
||||
difficulty = 8
|
||||
|
||||
/datum/mutation/human/radioactive/on_life()
|
||||
radiation_pulse(owner, 20)
|
||||
|
||||
/datum/mutation/human/radioactive/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
|
||||
..()
|
||||
if(!(type in visual_indicators))
|
||||
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "radiation", -MUTATIONS_LAYER))
|
||||
|
||||
/datum/mutation/human/radioactive/get_visual_indicator()
|
||||
return visual_indicators[type][1]
|
||||
@@ -1,6 +1,7 @@
|
||||
//Nearsightedness restricts your vision by several tiles.
|
||||
/datum/mutation/human/nearsight
|
||||
name = "Near Sightness"
|
||||
desc = "The holder of this mutation has poor eyesight."
|
||||
quality = MINOR_NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You can't see very well.</span>"
|
||||
|
||||
@@ -18,6 +19,7 @@
|
||||
//Blind makes you blind. Who knew?
|
||||
/datum/mutation/human/blind
|
||||
name = "Blindness"
|
||||
desc = "Renders the subject completely blind."
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You can't seem to see anything.</span>"
|
||||
|
||||
@@ -32,43 +34,58 @@
|
||||
owner.cure_blind(GENETIC_MUTATION)
|
||||
|
||||
|
||||
//X-ray Vision lets you see through walls.
|
||||
/datum/mutation/human/x_ray
|
||||
name = "X Ray Vision"
|
||||
///Thermal Vision lets you see mobs through walls
|
||||
/datum/mutation/human/thermal
|
||||
name = "Thermal Vision"
|
||||
desc = "The user of this genome can visually percieve the unique human thermal signature."
|
||||
quality = POSITIVE
|
||||
get_chance = 25
|
||||
lowest_value = 256 * 12
|
||||
text_gain_indication = "<span class='notice'>The walls suddenly disappear!</span>"
|
||||
difficulty = 18
|
||||
text_gain_indication = "<span class='notice'>You can see the heat rising off of your skin...</span>"
|
||||
time_coeff = 2
|
||||
instability = 25
|
||||
var/visionflag = TRAIT_THERMAL_VISION
|
||||
|
||||
/datum/mutation/human/x_ray/on_acquiring(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/thermal/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
|
||||
ADD_TRAIT(owner, visionflag, GENETIC_MUTATION)
|
||||
owner.update_sight()
|
||||
|
||||
/datum/mutation/human/x_ray/on_losing(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/thermal/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
REMOVE_TRAIT(owner, visionflag, GENETIC_MUTATION)
|
||||
owner.update_sight()
|
||||
|
||||
///X-ray Vision lets you see through walls.
|
||||
/datum/mutation/human/thermal/x_ray
|
||||
name = "X Ray Vision"
|
||||
desc = "A strange genome that allows the user to see between the spaces of walls." //actual x-ray would mean you'd constantly be blasting rads, wich might be fun for later //hmb
|
||||
text_gain_indication = "<span class='notice'>The walls suddenly disappear!</span>"
|
||||
instability = 35
|
||||
locked = TRUE
|
||||
visionflag = TRAIT_XRAY_VISION
|
||||
|
||||
|
||||
//Laser Eyes lets you shoot lasers from your eyes!
|
||||
/datum/mutation/human/laser_eyes
|
||||
name = "Laser Eyes"
|
||||
desc = "Reflects concentrated light back from the eyes."
|
||||
quality = POSITIVE
|
||||
dna_block = NON_SCANNABLE
|
||||
locked = TRUE
|
||||
difficulty = 16
|
||||
text_gain_indication = "<span class='notice'>You feel pressure building up behind your eyes.</span>"
|
||||
layer_used = FRONT_MUTATIONS_LAYER
|
||||
limb_req = BODY_ZONE_HEAD
|
||||
|
||||
/datum/mutation/human/laser_eyes/New()
|
||||
/datum/mutation/human/laser_eyes/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
|
||||
..()
|
||||
visual_indicators |= mutable_appearance('icons/effects/genetics.dmi', "lasereyes", -FRONT_MUTATIONS_LAYER)
|
||||
|
||||
/datum/mutation/human/laser_eyes/get_visual_indicator(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/laser_eyes/get_visual_indicator()
|
||||
return visual_indicators[1]
|
||||
|
||||
/datum/mutation/human/laser_eyes/on_ranged_attack(mob/living/carbon/human/owner, atom/target, mouseparams)
|
||||
/datum/mutation/human/laser_eyes/on_ranged_attack(atom/target, mouseparams)
|
||||
if(owner.a_intent == INTENT_HARM)
|
||||
owner.LaserEyes(target, mouseparams)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
//Cold Resistance gives your entire body an orange halo, and makes you immune to the effects of vacuum and cold.
|
||||
/datum/mutation/human/space_adaptation
|
||||
name = "Space Adaptation"
|
||||
desc = "A strange mutation that renders the host immune to the vacuum if space. Will still need an oxygen supply."
|
||||
quality = POSITIVE
|
||||
difficulty = 16
|
||||
text_gain_indication = "<span class='notice'>Your body feels warm!</span>"
|
||||
time_coeff = 5
|
||||
instability = 30
|
||||
|
||||
/datum/mutation/human/space_adaptation/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
|
||||
..()
|
||||
if(!(type in visual_indicators))
|
||||
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "fire", -MUTATIONS_LAYER))
|
||||
|
||||
/datum/mutation/human/space_adaptation/get_visual_indicator()
|
||||
return visual_indicators[type][1]
|
||||
|
||||
/datum/mutation/human/space_adaptation/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance")
|
||||
ADD_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance")
|
||||
|
||||
/datum/mutation/human/space_adaptation/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
REMOVE_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance")
|
||||
REMOVE_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance")
|
||||
|
||||
@@ -3,16 +3,18 @@
|
||||
|
||||
/datum/mutation/human/nervousness
|
||||
name = "Nervousness"
|
||||
desc = "Causes the holder to stutter."
|
||||
quality = MINOR_NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You feel nervous.</span>"
|
||||
|
||||
/datum/mutation/human/nervousness/on_life(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/nervousness/on_life()
|
||||
if(prob(10))
|
||||
owner.stuttering = max(10, owner.stuttering)
|
||||
|
||||
|
||||
/datum/mutation/human/wacky
|
||||
name = "Wacky"
|
||||
desc = "<span class='sans'>Unknown.</span>"
|
||||
quality = MINOR_NEGATIVE
|
||||
text_gain_indication = "<span class='sans'>You feel an off sensation in your voicebox.</span>"
|
||||
text_lose_indication = "<span class='notice'>The off sensation passes.</span>"
|
||||
@@ -34,6 +36,7 @@
|
||||
|
||||
/datum/mutation/human/mute
|
||||
name = "Mute"
|
||||
desc = "Completely inhibits the vocal section of the brain."
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You feel unable to express yourself at all.</span>"
|
||||
text_lose_indication = "<span class='danger'>You feel able to speak freely again.</span>"
|
||||
@@ -53,8 +56,8 @@
|
||||
|
||||
/datum/mutation/human/smile
|
||||
name = "Smile"
|
||||
desc = "Causes the user to be in constant mania."
|
||||
quality = MINOR_NEGATIVE
|
||||
dna_block = NON_SCANNABLE
|
||||
text_gain_indication = "<span class='notice'>You feel so happy. Nothing can be wrong with anything. :)</span>"
|
||||
text_lose_indication = "<span class='notice'>Everything is terrible again. :(</span>"
|
||||
|
||||
@@ -95,7 +98,6 @@
|
||||
message = replacetext(message," ugly "," beautiful ")
|
||||
message = replacetext(message," douchbag "," nice guy ")
|
||||
message = replacetext(message," whore "," lady ")
|
||||
message = replacetext(message," gamer "," intellectual ")
|
||||
message = replacetext(message," nerd "," smarty pants ")
|
||||
message = replacetext(message," moron "," fun person ")
|
||||
message = replacetext(message," IT'S LOOSE "," EVERYTHING IS FINE ")
|
||||
@@ -121,8 +123,8 @@
|
||||
|
||||
/datum/mutation/human/unintelligible
|
||||
name = "Unintelligible"
|
||||
desc = "Partially inhibits the vocal center of the brain, severely distorting speech."
|
||||
quality = NEGATIVE
|
||||
dna_block = NON_SCANNABLE
|
||||
text_gain_indication = "<span class='danger'>You can't seem to form any coherent thoughts!</span>"
|
||||
text_lose_indication = "<span class='danger'>Your mind feels more clear.</span>"
|
||||
|
||||
@@ -141,8 +143,9 @@
|
||||
|
||||
/datum/mutation/human/swedish
|
||||
name = "Swedish"
|
||||
desc = "A horrible mutation originating from the distant past. Thought to be eradicated after the incident in 2037."
|
||||
quality = MINOR_NEGATIVE
|
||||
dna_block = NON_SCANNABLE
|
||||
locked = TRUE
|
||||
text_gain_indication = "<span class='notice'>You feel Swedish, however that works.</span>"
|
||||
text_lose_indication = "<span class='notice'>The feeling of Swedishness passes.</span>"
|
||||
|
||||
@@ -173,8 +176,8 @@
|
||||
|
||||
/datum/mutation/human/chav
|
||||
name = "Chav"
|
||||
desc = "Unknown"
|
||||
quality = MINOR_NEGATIVE
|
||||
dna_block = NON_SCANNABLE
|
||||
text_gain_indication = "<span class='notice'>Ye feel like a reet prat like, innit?</span>"
|
||||
text_lose_indication = "<span class='notice'>You no longer feel like being rude and sassy.</span>"
|
||||
|
||||
@@ -220,12 +223,13 @@
|
||||
|
||||
/datum/mutation/human/elvis
|
||||
name = "Elvis"
|
||||
desc = "A terrifying mutation named after its 'patient-zero'."
|
||||
quality = MINOR_NEGATIVE
|
||||
dna_block = NON_SCANNABLE
|
||||
locked = TRUE
|
||||
text_gain_indication = "<span class='notice'>You feel pretty good, honeydoll.</span>"
|
||||
text_lose_indication = "<span class='notice'>You feel a little less conversation would be great.</span>"
|
||||
|
||||
/datum/mutation/human/elvis/on_life(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/elvis/on_life()
|
||||
switch(pick(1,2))
|
||||
if(1)
|
||||
if(prob(15))
|
||||
@@ -266,8 +270,9 @@
|
||||
|
||||
/datum/mutation/human/stoner
|
||||
name = "Stoner"
|
||||
desc = "A common mutation that severely decreases intelligence."
|
||||
quality = NEGATIVE
|
||||
dna_block = NON_SCANNABLE
|
||||
locked = TRUE
|
||||
text_gain_indication = "<span class='notice'>You feel...totally chill, man!</span>"
|
||||
text_lose_indication = "<span class='notice'>You feel like you have a better sense of time.</span>"
|
||||
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
//Telekinesis lets you interact with objects from range, and gives you a light blue halo around your head.
|
||||
/datum/mutation/human/telekinesis
|
||||
name = "Telekinesis"
|
||||
desc = "A strange mutation that allows the holder to interact with objects through thought."
|
||||
quality = POSITIVE
|
||||
get_chance = 20
|
||||
lowest_value = 256 * 12
|
||||
difficulty = 18
|
||||
text_gain_indication = "<span class='notice'>You feel smarter!</span>"
|
||||
limb_req = BODY_ZONE_HEAD
|
||||
instability = 30
|
||||
|
||||
/datum/mutation/human/telekinesis/New()
|
||||
/datum/mutation/human/telekinesis/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
|
||||
..()
|
||||
visual_indicators |= mutable_appearance('icons/effects/genetics.dmi', "telekinesishead", -MUTATIONS_LAYER)
|
||||
if(!(type in visual_indicators))
|
||||
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "telekinesishead", -MUTATIONS_LAYER))
|
||||
|
||||
/datum/mutation/human/telekinesis/get_visual_indicator(mob/living/carbon/human/owner)
|
||||
return visual_indicators[1]
|
||||
/datum/mutation/human/telekinesis/get_visual_indicator()
|
||||
return visual_indicators[type][1]
|
||||
|
||||
/datum/mutation/human/telekinesis/on_ranged_attack(mob/living/carbon/human/owner, atom/target)
|
||||
/datum/mutation/human/telekinesis/on_ranged_attack(atom/target, mouseparams)
|
||||
target.attack_tk(owner)
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
continue
|
||||
contam_atoms += thing
|
||||
var/did_contam = 0
|
||||
if(length(can_contam))
|
||||
if(can_contam)
|
||||
var/rad_strength = ((strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_STR_COEFFICIENT)/contam_atoms.len
|
||||
for(var/k in 1 to contam_atoms.len)
|
||||
var/atom/thing = contam_atoms[k]
|
||||
|
||||
@@ -168,7 +168,8 @@
|
||||
id = "alien-nest"
|
||||
description = "Not even Necropolis is safe from alien infestation. The competition for hosts has locked the legion and aliens in an endless conflict that can only be resolved by a PKA."
|
||||
suffix = "lavaland_surface_alien_nest.dmm"
|
||||
cost = 20
|
||||
cost = 10
|
||||
allow_duplicates = FALSE
|
||||
|
||||
/datum/map_template/ruin/lavaland/fountain
|
||||
name = "Fountain Hall"
|
||||
@@ -176,6 +177,7 @@
|
||||
description = "The fountain has a warning on the side. DANGER: May have undeclared side effects that only become obvious when implemented."
|
||||
suffix = "lavaland_surface_fountain_hall.dmm"
|
||||
cost = 5
|
||||
allow_duplicates = FALSE
|
||||
|
||||
/datum/map_template/ruin/lavaland/survivalcapsule
|
||||
name = "Survival Capsule Ruins"
|
||||
@@ -198,7 +200,7 @@
|
||||
description = "A place of vile worship, the scrawling of blood in the middle glowing eerily. A demonic laugh echoes throughout the caverns"
|
||||
suffix = "lavaland_surface_cultaltar.dmm"
|
||||
allow_duplicates = FALSE
|
||||
cost = 10
|
||||
cost = 5
|
||||
|
||||
/datum/map_template/ruin/lavaland/hermit
|
||||
name = "Makeshift Shelter"
|
||||
@@ -244,15 +246,6 @@
|
||||
description = "A strange tumor which houses a powerful beast..."
|
||||
suffix = "lavaland_surface_elite_tumor.dmm"
|
||||
cost = 5
|
||||
placement_weight = 3
|
||||
always_place = TRUE
|
||||
allow_duplicates = TRUE
|
||||
|
||||
// Mining Base
|
||||
/datum/map_template/ruin/lavaland/mining_base //THIS IS THE MINING BASE. DO NOT FUCK WITH THIS UNLESS YOU ARE 100% CERTAIN YOU KNOW WHAT YOU'RE DOING, OR THE MINING BASE WILL DISAPPEAR
|
||||
name = "Mining Base"
|
||||
id = "miningbase"
|
||||
description = "The mining base that Nanotrasen uses for their mining operations."
|
||||
suffix = "miningbase.dmm"
|
||||
cost = 0
|
||||
always_place = TRUE
|
||||
unpickable = TRUE
|
||||
allow_duplicates = TRUE
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
name = "Asteroid 1"
|
||||
description = "I-spy with my little eye, something beginning with R."
|
||||
|
||||
|
||||
/datum/map_template/ruin/space/asteroid2
|
||||
id = "asteroid2"
|
||||
suffix = "asteroid2.dmm"
|
||||
@@ -187,6 +186,7 @@
|
||||
name = "Abandoned Teleporter"
|
||||
description = "In space construction the teleporter is often the first system brought online. \
|
||||
This lonely half built teleporter is a sign of a proposed structure that for one reason or another just never got built."
|
||||
always_place = TRUE
|
||||
|
||||
/datum/map_template/ruin/space/crashedclownship
|
||||
id = "crashedclownship"
|
||||
@@ -268,6 +268,7 @@
|
||||
suffix = "whiteshipdock.dmm"
|
||||
name = "Whiteship Dock"
|
||||
description = "An abandoned but functional vessel parked in deep space, ripe for the taking."
|
||||
always_place = TRUE
|
||||
|
||||
/datum/map_template/ruin/space/cat_experiments
|
||||
id = "meow"
|
||||
@@ -287,6 +288,7 @@
|
||||
suffix = "hilbertshoteltestingsite.dmm"
|
||||
name = "Hilbert Research Facility"
|
||||
description = "A research facility of great bluespace discoveries. Long since abandoned, willingly or not..."
|
||||
|
||||
/datum/map_template/ruin/space/augmentation
|
||||
id = "augmentationfacility"
|
||||
suffix = "augmentationfacility.dmm"
|
||||
@@ -376,13 +378,13 @@
|
||||
id = "roid8"
|
||||
suffix = "roid8.dmm"
|
||||
name = "Dead wizard Roid"
|
||||
description = "Mineral asteroid. Ft. Dead wizard and toilet paradox bag."
|
||||
description = "Mineral asteroid. Ft. Dead wizard and toilet wand."
|
||||
|
||||
/datum/map_template/ruin/spacenearstation/roid9
|
||||
id = "roid9"
|
||||
suffix = "roid9.dmm"
|
||||
name = "Monitoring Roid"
|
||||
description = "Mineral asteroid. Ft. Station monitoring, syndie toolbox and erp."
|
||||
description = "Mineral asteroid. Ft. Station monitoring, toolbox and erp."
|
||||
|
||||
/datum/map_template/ruin/spacenearstation/roid10
|
||||
id = "roid10"
|
||||
|
||||
@@ -54,3 +54,10 @@
|
||||
id = "engine_budget"
|
||||
suffix = "Box/Engine/budget.dmm"
|
||||
name = "Box P.A.C.M.A.N"
|
||||
|
||||
// Lavaland
|
||||
// Mining Base
|
||||
/datum/map_template/ruin/station/lavaland/mining_base
|
||||
id = "mining_public_01"
|
||||
suffix = "Lavaland/Mining_Station/Mining_Station_Public_01.dmm"
|
||||
name = "Public Mining Base"
|
||||
|
||||
@@ -480,6 +480,12 @@
|
||||
admin_notes = "Comes with turrets that will target any simplemob."
|
||||
credit_cost = 12500
|
||||
|
||||
/datum/map_template/shuttle/emergency/cog
|
||||
suffix = "cog"
|
||||
name = "NES Classic"
|
||||
description = "A blast from the past! This recreation of the Nanotrasen Emergency Shuttle Port features the same focus on seating as the original, but on a slightly longer frame to better accommodate modern shuttle docks."
|
||||
credit_cost = 750
|
||||
|
||||
/datum/map_template/shuttle/arrival/box
|
||||
suffix = "box"
|
||||
name = "arrival shuttle (Box)"
|
||||
@@ -500,6 +506,10 @@
|
||||
suffix = "kilo"
|
||||
name = "labour shuttle (Kilo)"
|
||||
|
||||
/datum/map_template/shuttle/labour/cog
|
||||
suffix = "cog"
|
||||
name = "labour shuttle (Cog)"
|
||||
|
||||
/datum/map_template/shuttle/infiltrator/basic
|
||||
suffix = "basic"
|
||||
name = "basic syndicate infiltrator"
|
||||
@@ -544,6 +554,10 @@
|
||||
suffix = "omega"
|
||||
name = "arrival shuttle (Omega)"
|
||||
|
||||
/datum/map_template/shuttle/arrival/cog
|
||||
suffix = "cog"
|
||||
name = "arrival shuttle (Cog)"
|
||||
|
||||
/datum/map_template/shuttle/aux_base/default
|
||||
suffix = "default"
|
||||
name = "auxilliary base (Default)"
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
owner.adjustFireLoss(-15)
|
||||
|
||||
/datum/status_effect/shadow_mend/on_remove()
|
||||
. = ..()
|
||||
owner.visible_message("<span class='warning'>The violet light around [owner] glows black!</span>", "<span class='warning'>The tendrils around you cinch tightly and reap their toll...</span>")
|
||||
playsound(owner, 'sound/magic/teleport_diss.ogg', 50, 1)
|
||||
owner.apply_status_effect(STATUS_EFFECT_VOID_PRICE)
|
||||
|
||||
|
||||
/datum/status_effect/void_price
|
||||
id = "void_price"
|
||||
duration = 300
|
||||
@@ -48,20 +48,24 @@
|
||||
status_type = STATUS_EFFECT_REPLACE
|
||||
alert_type = /obj/screen/alert/status_effect/vanguard
|
||||
var/datum/progressbar/progbar
|
||||
var/stamhealed = 0 //How much stamina did we regenerate?
|
||||
|
||||
/obj/screen/alert/status_effect/vanguard
|
||||
name = "Vanguard"
|
||||
desc = "You're absorbing stuns! Your stamina is greatly increased, but not infinite. 25% of all stuns taken will affect you after this effect ends."
|
||||
desc = "You're absorbing stuns aswell as quickly regenerating stamina, but be careful: 50% of stamina restored and 25% of stuns absorbed will affect you after this effect ends."
|
||||
icon_state = "vanguard"
|
||||
alerttooltipstyle = "clockcult"
|
||||
|
||||
/obj/screen/alert/status_effect/vanguard/MouseEntered(location,control,params)
|
||||
var/mob/living/L = usr
|
||||
var/datum/status_effect/vanguard_shield/E = attached_effect
|
||||
if(istype(L)) //this is probably more safety than actually needed
|
||||
var/vanguard = L.stun_absorption["vanguard"]
|
||||
desc = initial(desc)
|
||||
desc += "<br><b>[FLOOR(vanguard["stuns_absorbed"] * 0.1, 1)]</b> seconds of stuns held back.\
|
||||
[GLOB.ratvar_awakens ? "":"<br><b>[FLOOR(min(vanguard["stuns_absorbed"] * 0.025, 20), 1)]</b> seconds of stun will affect you."]"
|
||||
<br><b>[E.stamhealed]</b> stamina regenerated.\
|
||||
[GLOB.ratvar_awakens ? "":"<br><b>[FLOOR(min(vanguard["stuns_absorbed"] * 0.025, 20), 1)]</b> seconds of stun will affect you.\
|
||||
<br>You will incur <b>[E.stamhealed * 0.5]</b> staminaloss."]"
|
||||
..()
|
||||
|
||||
/datum/status_effect/vanguard_shield/Destroy()
|
||||
@@ -72,9 +76,8 @@
|
||||
/datum/status_effect/vanguard_shield/on_apply()
|
||||
owner.log_message("gained Vanguard stun immunity", LOG_ATTACK)
|
||||
owner.add_stun_absorption("vanguard", INFINITY, 1, "'s yellow aura momentarily intensifies!", "Your ward absorbs the stun!", " radiating with a soft yellow light!")
|
||||
owner.visible_message("<span class='warning'>[owner] begins to faintly glow!</span>", "<span class='brass'>You will absorb all stuns for the next twenty seconds.</span>")
|
||||
owner.visible_message("<span class='warning'>[owner] begins to faintly glow!</span>", "<span class='brass'>You will absorb all stuns aswell as quickly regenerate stamina for the next twenty seconds .</span>")
|
||||
owner.SetAllImmobility(0, FALSE)
|
||||
owner.setStaminaLoss(0, FALSE)
|
||||
progbar = new(owner, duration, owner)
|
||||
progbar.bar.color = list("#FAE48C", "#FAE48C", "#FAE48C", rgb(0,0,0))
|
||||
progbar.update(duration - world.time)
|
||||
@@ -82,8 +85,12 @@
|
||||
|
||||
/datum/status_effect/vanguard_shield/tick()
|
||||
progbar.update(duration - world.time)
|
||||
var/oldstamloss = owner.getStaminaLoss()
|
||||
owner.adjustStaminaLoss(-6) //up to 30 stam / second for now, lets see...
|
||||
stamhealed += oldstamloss - owner.getStaminaLoss()
|
||||
|
||||
/datum/status_effect/vanguard_shield/on_remove()
|
||||
. = ..()
|
||||
var/vanguard = owner.stun_absorption["vanguard"]
|
||||
var/stuns_blocked = 0
|
||||
if(vanguard)
|
||||
@@ -95,8 +102,9 @@
|
||||
for(var/i in owner.stun_absorption)
|
||||
if(owner.stun_absorption[i]["end_time"] > world.time && owner.stun_absorption[i]["priority"] > vanguard["priority"])
|
||||
otheractiveabsorptions = TRUE
|
||||
if(!GLOB.ratvar_awakens && stuns_blocked && !otheractiveabsorptions)
|
||||
if(!GLOB.ratvar_awakens && (stuns_blocked && !otheractiveabsorptions || stamhealed))
|
||||
owner.DefaultCombatKnockdown(stuns_blocked)
|
||||
owner.adjustStaminaLoss(stamhealed * 0.5)
|
||||
message_to_owner = "<span class='boldwarning'>The weight of the Vanguard's protection crashes down upon you!</span>"
|
||||
if(stuns_blocked >= 300)
|
||||
message_to_owner += "\n<span class='userdanger'>You faint from the exertion!</span>"
|
||||
@@ -105,8 +113,7 @@
|
||||
else
|
||||
stuns_blocked = 0 //so logging is correct in cases where there were stuns blocked but we didn't stun for other reasons
|
||||
owner.visible_message("<span class='warning'>[owner]'s glowing aura fades!</span>", message_to_owner)
|
||||
owner.log_message("lost Vanguard stun immunity[stuns_blocked ? "and was stunned for [stuns_blocked]":""]", LOG_ATTACK)
|
||||
|
||||
owner.log_message("lost Vanguard stun immunity[stuns_blocked ? "and was stunned for [stuns_blocked]":""] [stamhealed ? ", incurring [stamhealed * 0.25] staminaloss" : ""]", LOG_ATTACK)
|
||||
|
||||
/datum/status_effect/inathneqs_endowment
|
||||
id = "inathneqs_endowment"
|
||||
@@ -133,12 +140,12 @@
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/inathneqs_endowment/on_remove()
|
||||
. = ..()
|
||||
owner.log_message("lost Inath-neq's invulnerability", LOG_ATTACK)
|
||||
owner.visible_message("<span class='warning'>The light around [owner] flickers and dissipates!</span>", "<span class='boldwarning'>You feel Inath-neq's power fade from your body!</span>")
|
||||
owner.status_flags &= ~GODMODE
|
||||
playsound(owner, 'sound/magic/ethereal_exit.ogg', 50, 1)
|
||||
|
||||
|
||||
/datum/status_effect/cyborg_power_regen
|
||||
id = "power_regen"
|
||||
duration = 100
|
||||
@@ -210,11 +217,11 @@
|
||||
owner.adjustStaminaLoss(-(grace_heal * 25))
|
||||
|
||||
/datum/status_effect/his_grace/on_remove()
|
||||
. = ..()
|
||||
owner.log_message("lost His Grace's stun immunity", LOG_ATTACK)
|
||||
if(islist(owner.stun_absorption) && owner.stun_absorption["hisgrace"])
|
||||
owner.stun_absorption -= "hisgrace"
|
||||
|
||||
|
||||
/datum/status_effect/wish_granters_gift //Fully revives after ten seconds.
|
||||
id = "wish_granters_gift"
|
||||
duration = 50
|
||||
@@ -225,6 +232,7 @@
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/wish_granters_gift/on_remove()
|
||||
. = ..()
|
||||
owner.revive(full_heal = TRUE, admin_revive = TRUE)
|
||||
owner.visible_message("<span class='warning'>[owner] appears to wake from the dead, having healed all wounds!</span>", "<span class='notice'>You have regenerated.</span>")
|
||||
|
||||
@@ -366,6 +374,7 @@
|
||||
last_health = owner.health
|
||||
|
||||
/datum/status_effect/blooddrunk/on_remove()
|
||||
. = ..()
|
||||
tick()
|
||||
owner.maxHealth *= 0.1
|
||||
owner.bruteloss *= 0.1
|
||||
@@ -404,7 +413,6 @@
|
||||
playsound(owner, 'sound/weapons/fwoosh.wav', 75, 0)
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/status_effect/sword_spin/tick()
|
||||
playsound(owner, 'sound/weapons/fwoosh.wav', 75, 0)
|
||||
var/obj/item/slashy
|
||||
@@ -413,9 +421,9 @@
|
||||
slashy.attack(M, owner)
|
||||
|
||||
/datum/status_effect/sword_spin/on_remove()
|
||||
. = ..()
|
||||
owner.visible_message("<span class='warning'>[owner]'s inhuman strength dissipates and the sword's runes grow cold!</span>")
|
||||
|
||||
|
||||
//Used by changelings to rapidly heal
|
||||
//Heals 10 brute and oxygen damage every second, and 5 fire
|
||||
//Being on fire will suppress this healing
|
||||
@@ -472,6 +480,7 @@
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/hippocraticOath/on_remove()
|
||||
. = ..()
|
||||
REMOVE_TRAIT(owner, TRAIT_PACIFISM, "hippocraticOath")
|
||||
var/datum/atom_hud/H = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
H.remove_hud_from(owner)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
owner.update_stat()
|
||||
|
||||
/datum/status_effect/incapacitating/on_remove()
|
||||
. = ..()
|
||||
owner.update_mobility()
|
||||
if(needs_update_stat || issilicon(owner)) //silicons need stat updates in addition to normal canmove updates
|
||||
owner.update_stat()
|
||||
@@ -86,6 +87,16 @@
|
||||
if(prob(10) && owner.health > owner.crit_threshold)
|
||||
owner.emote("snore")
|
||||
|
||||
/datum/status_effect/staggered
|
||||
id = "staggered"
|
||||
blocks_sprint = TRUE
|
||||
alert_type = null
|
||||
|
||||
/datum/status_effect/staggered/on_creation(mob/living/new_owner, set_duration)
|
||||
if(isnum(set_duration))
|
||||
duration = set_duration
|
||||
return ..()
|
||||
|
||||
/obj/screen/alert/status_effect/asleep
|
||||
name = "Asleep"
|
||||
desc = "You've fallen asleep. Wait a bit and you should wake up. Unless you don't, considering how helpless you are."
|
||||
@@ -101,25 +112,26 @@
|
||||
if(isnum(set_duration))
|
||||
duration = set_duration
|
||||
. = ..()
|
||||
if(iscarbon(owner))
|
||||
var/mob/living/carbon/C = owner
|
||||
if(C.combatmode)
|
||||
C.toggle_combat_mode(TRUE)
|
||||
|
||||
/datum/status_effect/no_combat_mode/mesmerize
|
||||
/datum/status_effect/mesmerize
|
||||
id = "Mesmerize"
|
||||
alert_type = /obj/screen/alert/status_effect/mesmerized
|
||||
|
||||
/datum/status_effect/no_combat_mode/mesmerize/on_creation(mob/living/new_owner, set_duration)
|
||||
/datum/status_effect/mesmerize/on_creation(mob/living/new_owner, set_duration)
|
||||
. = ..()
|
||||
ADD_TRAIT(owner, TRAIT_MUTE, "mesmerize")
|
||||
owner.add_movespeed_modifier("[STATUS_EFFECT_MESMERIZE]_[id]", TRUE, priority = 64, override = TRUE, multiplicative_slowdown = 5, blacklisted_movetypes = FALSE? NONE : CRAWLING)
|
||||
|
||||
/datum/status_effect/no_combat_mode/mesmerize/on_remove()
|
||||
/datum/status_effect/mesmerize/on_remove()
|
||||
. = ..()
|
||||
REMOVE_TRAIT(owner, TRAIT_MUTE, "mesmerize")
|
||||
owner.remove_movespeed_modifier("[STATUS_EFFECT_MESMERIZE]_[id]")
|
||||
|
||||
/datum/status_effect/mesmerize/on_creation(mob/living/new_owner, set_duration)
|
||||
if(isnum(set_duration))
|
||||
duration = set_duration
|
||||
. = ..()
|
||||
|
||||
/obj/screen/alert/status_effect/mesmerized
|
||||
name = "Mesmerized"
|
||||
desc = "You cant tear your sight from who is in front of you... their gaze is simply too enthralling.."
|
||||
@@ -128,11 +140,12 @@
|
||||
|
||||
/datum/status_effect/electrode
|
||||
id = "tased"
|
||||
alert_type = null
|
||||
var/slowdown = 1.5
|
||||
var/slowdown_priority = 50 //to make sure the stronger effect overrides
|
||||
var/affect_crawl = FALSE
|
||||
var/nextmove_modifier = 1
|
||||
var/stamdmg_per_ds = 1 //a 20 duration would do 20 stamdmg, disablers do 24 or something
|
||||
var/stamdmg_per_ds = 0 //a 20 duration would do 20 stamdmg, disablers do 24 or something
|
||||
var/last_tick = 0 //fastprocess processing speed is a goddamn sham, don't trust it.
|
||||
|
||||
/datum/status_effect/electrode/on_creation(mob/living/new_owner, set_duration)
|
||||
@@ -142,8 +155,6 @@
|
||||
last_tick = world.time
|
||||
if(iscarbon(owner))
|
||||
var/mob/living/carbon/C = owner
|
||||
if(C.combatmode)
|
||||
C.toggle_combat_mode(TRUE)
|
||||
C.add_movespeed_modifier("[MOVESPEED_ID_TASED_STATUS]_[id]", TRUE, priority = slowdown_priority, override = TRUE, multiplicative_slowdown = slowdown, blacklisted_movetypes = affect_crawl? NONE : CRAWLING)
|
||||
|
||||
/datum/status_effect/electrode/on_remove()
|
||||
@@ -155,7 +166,11 @@
|
||||
/datum/status_effect/electrode/tick()
|
||||
var/diff = world.time - last_tick
|
||||
if(owner)
|
||||
owner.adjustStaminaLoss(max(0, stamdmg_per_ds * diff)) //if you really want to try to stamcrit someone with a taser alone, you can, but it'll take time and good timing.
|
||||
var/mob/living/carbon/C = owner
|
||||
if(HAS_TRAIT(C, TRAIT_TASED_RESISTANCE))
|
||||
qdel(src)
|
||||
else
|
||||
C.adjustStaminaLoss(max(0, stamdmg_per_ds * diff)) //if you really want to try to stamcrit someone with a taser alone, you can, but it'll take time and good timing.
|
||||
last_tick = world.time
|
||||
|
||||
/datum/status_effect/electrode/nextmove_modifier() //why is this a proc. its no big deal since this doesnt get called often at all but literally w h y
|
||||
@@ -167,13 +182,7 @@
|
||||
slowdown_priority = 100
|
||||
nextmove_modifier = 2
|
||||
blocks_combatmode = TRUE
|
||||
|
||||
/datum/status_effect/electrode/no_combat_mode/on_creation(mob/living/new_owner, set_duration)
|
||||
. = ..()
|
||||
if(iscarbon(owner))
|
||||
var/mob/living/carbon/C = owner
|
||||
if(C.combatmode)
|
||||
C.toggle_combat_mode(TRUE)
|
||||
stamdmg_per_ds = 1
|
||||
|
||||
//OTHER DEBUFFS
|
||||
/datum/status_effect/his_wrath //does minor damage over time unless holding His Grace
|
||||
@@ -212,6 +221,7 @@
|
||||
alerttooltipstyle = "clockcult"
|
||||
|
||||
/datum/status_effect/belligerent/on_apply()
|
||||
. = ..()
|
||||
return do_movement_toggle(TRUE)
|
||||
|
||||
/datum/status_effect/belligerent/tick()
|
||||
@@ -242,6 +252,7 @@
|
||||
/datum/status_effect/belligerent/on_remove()
|
||||
if(owner.m_intent == MOVE_INTENT_WALK)
|
||||
owner.toggle_move_intent()
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/maniamotor
|
||||
id = "maniamotor"
|
||||
@@ -341,6 +352,7 @@
|
||||
alert_type = null
|
||||
|
||||
/datum/status_effect/cultghost/on_apply()
|
||||
. = ..()
|
||||
owner.see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
owner.see_in_dark = 2
|
||||
|
||||
@@ -362,6 +374,7 @@
|
||||
hammer_synced = new_hammer_synced
|
||||
|
||||
/datum/status_effect/crusher_mark/on_apply()
|
||||
. = ..()
|
||||
if(owner.mob_size >= MOB_SIZE_LARGE)
|
||||
marked_underlay = mutable_appearance('icons/effects/effects.dmi', "shield2")
|
||||
marked_underlay.pixel_x = -owner.pixel_x
|
||||
@@ -443,6 +456,7 @@
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/saw_bleed/on_remove()
|
||||
. = ..()
|
||||
if(needs_to_bleed)
|
||||
var/turf/T = get_turf(owner)
|
||||
new /obj/effect/temp_visual/bleed/explode(T)
|
||||
@@ -501,6 +515,7 @@
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/necropolis_curse/on_remove()
|
||||
. = ..()
|
||||
remove_curse(curse_flags)
|
||||
|
||||
/datum/status_effect/necropolis_curse/proc/apply_curse(set_curse)
|
||||
@@ -590,6 +605,7 @@
|
||||
old_oxyloss = owner.getOxyLoss()
|
||||
|
||||
/datum/status_effect/kindle/on_remove()
|
||||
. = ..()
|
||||
owner.visible_message("<span class='warning'>The light in [owner]'s eyes fades!</span>", \
|
||||
"<span class='boldannounce'>You snap out of your daze!</span>")
|
||||
|
||||
@@ -609,11 +625,13 @@
|
||||
alert_type = /obj/screen/alert/status_effect/ichorial_stain
|
||||
|
||||
/datum/status_effect/ichorial_stain/on_apply()
|
||||
. = ..()
|
||||
owner.visible_message("<span class='danger'>[owner] gets back up, [owner.p_their()] body dripping blue ichor!</span>", \
|
||||
"<span class='userdanger'>Thick blue ichor covers your body; you can't be revived like this again until it dries!</span>")
|
||||
return TRUE
|
||||
|
||||
/datum/status_effect/ichorial_stain/on_remove()
|
||||
. = ..()
|
||||
owner.visible_message("<span class='danger'>The blue ichor on [owner]'s body dries out!</span>", \
|
||||
"<span class='boldnotice'>The ichor on your body is dry - you can now be revived by vitality matrices again!</span>")
|
||||
|
||||
@@ -635,6 +653,7 @@
|
||||
owner.add_movespeed_modifier(MOVESPEED_ID_ELECTROSTAFF, multiplicative_slowdown = 1, movetypes = GROUND)
|
||||
|
||||
/datum/status_effect/electrostaff/on_remove()
|
||||
. = ..()
|
||||
owner.remove_movespeed_modifier(MOVESPEED_ID_ELECTROSTAFF)
|
||||
|
||||
//GOLEM GANG
|
||||
@@ -686,6 +705,7 @@ datum/status_effect/pacify
|
||||
|
||||
/datum/status_effect/pacify/on_remove()
|
||||
REMOVE_TRAIT(owner, TRAIT_PACIFISM, "status_effect")
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/trance
|
||||
id = "trance"
|
||||
@@ -707,6 +727,7 @@ datum/status_effect/pacify
|
||||
owner.dizziness = 20
|
||||
|
||||
/datum/status_effect/trance/on_apply()
|
||||
. = ..()
|
||||
if(!iscarbon(owner))
|
||||
return FALSE
|
||||
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/hypnotize)
|
||||
@@ -727,6 +748,7 @@ datum/status_effect/pacify
|
||||
owner.dizziness = 0
|
||||
owner.remove_client_colour(/datum/client_colour/monochrome/trance)
|
||||
to_chat(owner, "<span class='warning'>You snap out of your trance!</span>")
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/trance/proc/hypnotize(datum/source, list/hearing_args)
|
||||
if(!owner.can_hear())
|
||||
@@ -794,3 +816,27 @@ datum/status_effect/pacify
|
||||
to_chat(owner, "<span class='warning'>Your arm spasms!</span>")
|
||||
owner.log_message("threw [I] due to a Muscle Spasm", LOG_ATTACK)
|
||||
owner.throw_item(pick(targets))
|
||||
|
||||
/datum/status_effect/dna_melt
|
||||
id = "dna_melt"
|
||||
duration = 600
|
||||
status_type = STATUS_EFFECT_REPLACE
|
||||
alert_type = /obj/screen/alert/status_effect/dna_melt
|
||||
var/kill_either_way = FALSE //no amount of removing mutations is gonna save you now
|
||||
|
||||
/datum/status_effect/dna_melt/on_creation(mob/living/new_owner, set_duration, updating_canmove)
|
||||
. = ..()
|
||||
to_chat(new_owner, "<span class='boldwarning'>My body can't handle the mutations! I need to get my mutations removed fast!</span>")
|
||||
|
||||
/datum/status_effect/dna_melt/on_remove()
|
||||
if(!ishuman(owner))
|
||||
owner.gib() //fuck you in particular
|
||||
return
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.something_horrible(kill_either_way)
|
||||
return ..()
|
||||
|
||||
/obj/screen/alert/status_effect/dna_melt
|
||||
name = "Genetic Breakdown"
|
||||
desc = "I don't feel so good. Your body can't handle the mutations! You have one minute to remove your mutations, or you will be met with a horrible fate."
|
||||
icon_state = "dna_melt"
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
owner.adjust_bodytemperature(100)
|
||||
owner.update_mobility()
|
||||
UnregisterSignal(owner, COMSIG_LIVING_RESIST)
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/freon/watcher
|
||||
duration = 8
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
/datum/status_effect/syphon_mark/on_remove()
|
||||
get_kill()
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/screen/alert/status_effect/in_love
|
||||
name = "In Love"
|
||||
@@ -81,5 +81,5 @@
|
||||
ADD_TRAIT(owner, TRAIT_SOOTHED_THROAT, "[STATUS_EFFECT_TRAIT]_[id]")
|
||||
|
||||
/datum/status_effect/throat_soothed/on_remove()
|
||||
. = ..()
|
||||
REMOVE_TRAIT(owner, TRAIT_SOOTHED_THROAT, "[STATUS_EFFECT_TRAIT]_[id]")
|
||||
REMOVE_TRAIT(owner, TRAIT_SOOTHED_THROAT, "[STATUS_EFFECT_TRAIT]_[id]")
|
||||
return ..()
|
||||
|
||||
@@ -11,7 +11,10 @@
|
||||
var/on_remove_on_mob_delete = FALSE //if we call on_remove() when the mob is deleted
|
||||
var/examine_text //If defined, this text will appear when the mob is examined - to use he, she etc. use "SUBJECTPRONOUN" and replace it in the examines themselves
|
||||
var/alert_type = /obj/screen/alert/status_effect //the alert thrown by the status effect, contains name and description
|
||||
var/blocks_combatmode //Does this status effect prevent the user from toggling combat mode?
|
||||
/// If this is TRUE, the user will have combt mode forcefully disabled while this is active.
|
||||
var/blocks_combatmode = FALSE
|
||||
/// If this is TRUE, the user will have sprint forcefully disabled while this is active.
|
||||
var/blocks_sprint = FALSE
|
||||
var/obj/screen/alert/status_effect/linked_alert = null //the alert itself, if it exists
|
||||
|
||||
/datum/status_effect/New(list/arguments)
|
||||
@@ -32,11 +35,11 @@
|
||||
var/obj/screen/alert/status_effect/A = owner.throw_alert(id, alert_type)
|
||||
A.attached_effect = src //so the alert can reference us, if it needs to
|
||||
linked_alert = A //so we can reference the alert, if we need to
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
START_PROCESSING(SSstatus_effects, src)
|
||||
return TRUE
|
||||
|
||||
/datum/status_effect/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
STOP_PROCESSING(SSstatus_effects, src)
|
||||
if(owner)
|
||||
owner.clear_alert(id)
|
||||
LAZYREMOVE(owner.status_effects, src)
|
||||
@@ -55,9 +58,21 @@
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/proc/on_apply() //Called whenever the buff is applied; returning FALSE will cause it to autoremove itself.
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
if(blocks_combatmode)
|
||||
ADD_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src)
|
||||
if(blocks_sprint)
|
||||
ADD_TRAIT(owner, TRAIT_SPRINT_LOCKED, src)
|
||||
return TRUE
|
||||
|
||||
/datum/status_effect/proc/tick() //Called every tick.
|
||||
|
||||
/datum/status_effect/proc/on_remove() //Called whenever the buff expires or is removed; do note that at the point this is called, it is out of the owner's status_effects but owner is not yet null
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src)
|
||||
REMOVE_TRAIT(owner, TRAIT_SPRINT_LOCKED, src)
|
||||
return TRUE
|
||||
|
||||
/datum/status_effect/proc/be_replaced() //Called instead of on_remove when a status effect is replaced by itself or when a status effect with on_remove_on_mob_delete = FALSE has its mob deleted
|
||||
owner.clear_alert(id)
|
||||
LAZYREMOVE(owner.status_effects, src)
|
||||
|
||||
@@ -106,12 +106,12 @@
|
||||
|
||||
/datum/quirk/musician/on_spawn()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/obj/item/instrument/guitar/guitar = new(get_turf(H))
|
||||
H.put_in_hands(guitar)
|
||||
H.equip_to_slot(guitar, SLOT_IN_BACKPACK)
|
||||
var/obj/item/choice_beacon/music/B = new(get_turf(H))
|
||||
H.put_in_hands(B)
|
||||
H.equip_to_slot_if_possible(B, SLOT_IN_BACKPACK)
|
||||
var/obj/item/musicaltuner/musicaltuner = new(get_turf(H))
|
||||
H.put_in_hands(musicaltuner)
|
||||
H.equip_to_slot(musicaltuner, SLOT_IN_BACKPACK)
|
||||
H.equip_to_slot_if_possible(musicaltuner, SLOT_IN_BACKPACK)
|
||||
H.regenerate_icons()
|
||||
|
||||
/datum/quirk/photographer
|
||||
|
||||
@@ -88,14 +88,6 @@
|
||||
if(quirk_holder)
|
||||
quirk_holder.remove_client_colour(/datum/client_colour/monochrome)
|
||||
|
||||
/datum/quirk/libido
|
||||
name = "Nymphomania"
|
||||
desc = "You're always feeling a bit in heat. Also, you get aroused faster than usual."
|
||||
value = 0
|
||||
mob_trait = TRAIT_PERMABONER
|
||||
gain_text = "<span class='notice'>You are feeling extra wild.</span>"
|
||||
lose_text = "<span class='notice'>You don't feel that burning sensation anymore.</span>"
|
||||
|
||||
/datum/quirk/maso
|
||||
name = "Masochism"
|
||||
desc = "You are aroused by pain."
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
if(is_ash_immune(L))
|
||||
return
|
||||
if(is_species(L, /datum/species/lizard/ashwalker))
|
||||
if(L.getStaminaLoss() <= STAMINA_SOFTCRIT)
|
||||
if(!IS_STAMCRIT(L))
|
||||
L.adjustStaminaLossBuffered(4)
|
||||
return
|
||||
L.adjustFireLoss(4)
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
..()
|
||||
if(!istype(holder, holder_type))
|
||||
CRASH("Wire holder is not of the expected type!")
|
||||
return
|
||||
|
||||
src.holder = holder
|
||||
if(randomize)
|
||||
|
||||
Reference in New Issue
Block a user