mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 09:35:30 +01:00
Grep for space indentation (#54850)
#54604 atomizing Since a lot of the space indents are in lists ill atomize those later
This commit is contained in:
@@ -47,13 +47,13 @@
|
||||
removable = is_removable
|
||||
|
||||
/**
|
||||
* Activates the skillchip, if possible.
|
||||
*
|
||||
* Returns a message containing the reason if activation is not possible.
|
||||
* Arguments:
|
||||
* * silent - Boolean. Whether or not an activation message should be shown to the user.
|
||||
* * force - Boolean. Whether or not to just force de-activation if it would be prevented for any reason.
|
||||
*/
|
||||
* Activates the skillchip, if possible.
|
||||
*
|
||||
* Returns a message containing the reason if activation is not possible.
|
||||
* Arguments:
|
||||
* * silent - Boolean. Whether or not an activation message should be shown to the user.
|
||||
* * force - Boolean. Whether or not to just force de-activation if it would be prevented for any reason.
|
||||
*/
|
||||
/obj/item/skillchip/proc/try_activate_skillchip(silent = FALSE, force = FALSE)
|
||||
// Should not happen. Holding brain is destroyed and the chip hasn't had its state set appropriately.
|
||||
if(QDELETED(holding_brain))
|
||||
@@ -85,13 +85,13 @@
|
||||
on_activate(holding_brain.owner, silent)
|
||||
|
||||
/**
|
||||
* Deactivates the skillchip, if possible.
|
||||
*
|
||||
* Returns a message containing the reason if deactivation is not possible.
|
||||
* Arguments:
|
||||
* * silent - Boolean. Whether or not an activation message should be shown to the user.
|
||||
* * force - Boolean. Whether or not to just force de-activation if it would be prevented for any reason.
|
||||
*/
|
||||
* Deactivates the skillchip, if possible.
|
||||
*
|
||||
* Returns a message containing the reason if deactivation is not possible.
|
||||
* Arguments:
|
||||
* * silent - Boolean. Whether or not an activation message should be shown to the user.
|
||||
* * force - Boolean. Whether or not to just force de-activation if it would be prevented for any reason.
|
||||
*/
|
||||
/obj/item/skillchip/proc/try_deactivate_skillchip(silent = FALSE, force = FALSE)
|
||||
if(!active)
|
||||
return "Skillchip is not active."
|
||||
@@ -120,11 +120,11 @@
|
||||
on_deactivate(holding_brain.owner, silent)
|
||||
|
||||
/**
|
||||
* Called when a skillchip is inserted in a user's brain.
|
||||
*
|
||||
* Arguments:
|
||||
* * owner_brain - The brain that this skillchip was implanted in to.
|
||||
*/
|
||||
* Called when a skillchip is inserted in a user's brain.
|
||||
*
|
||||
* Arguments:
|
||||
* * owner_brain - The brain that this skillchip was implanted in to.
|
||||
*/
|
||||
/obj/item/skillchip/proc/on_implant(obj/item/organ/brain/owner_brain)
|
||||
if(holding_brain)
|
||||
CRASH("Skillchip is trying to be implanted into [owner_brain], but it's already implanted in [holding_brain]")
|
||||
@@ -132,12 +132,12 @@
|
||||
holding_brain = owner_brain
|
||||
|
||||
/**
|
||||
* Called when a skillchip is activated.
|
||||
*
|
||||
* Arguments:
|
||||
* * user - The user to apply skillchip effects to.
|
||||
* * silent - Boolean. Whether or not an activation message should be shown to the user.
|
||||
*/
|
||||
* Called when a skillchip is activated.
|
||||
*
|
||||
* Arguments:
|
||||
* * user - The user to apply skillchip effects to.
|
||||
* * silent - Boolean. Whether or not an activation message should be shown to the user.
|
||||
*/
|
||||
/obj/item/skillchip/proc/on_activate(mob/living/carbon/user, silent=FALSE)
|
||||
if(!silent && activate_message)
|
||||
to_chat(user, activate_message)
|
||||
@@ -150,13 +150,13 @@
|
||||
COOLDOWN_START(src, chip_cooldown, cooldown)
|
||||
|
||||
/**
|
||||
* Called when a skillchip is removed from the user's brain.
|
||||
*
|
||||
* Always deactivates the skillchip.
|
||||
* Arguments:
|
||||
* * user - The user to remove skillchip effects from.
|
||||
* * silent - Boolean. Whether or not a deactivation message should be shown to the user.
|
||||
*/
|
||||
* Called when a skillchip is removed from the user's brain.
|
||||
*
|
||||
* Always deactivates the skillchip.
|
||||
* Arguments:
|
||||
* * user - The user to remove skillchip effects from.
|
||||
* * silent - Boolean. Whether or not a deactivation message should be shown to the user.
|
||||
*/
|
||||
/obj/item/skillchip/proc/on_removal(silent=FALSE)
|
||||
if(active)
|
||||
try_deactivate_skillchip(silent, TRUE)
|
||||
@@ -166,12 +166,12 @@
|
||||
holding_brain = null
|
||||
|
||||
/**
|
||||
* Called when a skillchip is deactivated.
|
||||
*
|
||||
* Arguments:
|
||||
* * user - The user to remove skillchip effects from.
|
||||
* * silent - Boolean. Whether or not a deactivation message should be shown to the user.
|
||||
*/
|
||||
* Called when a skillchip is deactivated.
|
||||
*
|
||||
* Arguments:
|
||||
* * user - The user to remove skillchip effects from.
|
||||
* * silent - Boolean. Whether or not a deactivation message should be shown to the user.
|
||||
*/
|
||||
/obj/item/skillchip/proc/on_deactivate(mob/living/carbon/user, silent=FALSE)
|
||||
if(!silent && deactivate_message)
|
||||
to_chat(user, deactivate_message)
|
||||
@@ -184,13 +184,13 @@
|
||||
COOLDOWN_START(src, chip_cooldown, cooldown)
|
||||
|
||||
/**
|
||||
* Checks whether a given skillchip has an incompatibility with a brain that should render it impossible
|
||||
* to activate.
|
||||
*
|
||||
* Returns a string with an explanation if the chip is not activatable. FALSE otherwise.
|
||||
* Arguments:
|
||||
* * skillchip - The skillchip you're intending to activate. Does not activate the chip.
|
||||
*/
|
||||
* Checks whether a given skillchip has an incompatibility with a brain that should render it impossible
|
||||
* to activate.
|
||||
*
|
||||
* Returns a string with an explanation if the chip is not activatable. FALSE otherwise.
|
||||
* Arguments:
|
||||
* * skillchip - The skillchip you're intending to activate. Does not activate the chip.
|
||||
*/
|
||||
/obj/item/skillchip/proc/has_activate_incompatibility(obj/item/organ/brain/brain)
|
||||
if(QDELETED(brain))
|
||||
return "No brain detected."
|
||||
@@ -205,15 +205,15 @@
|
||||
|
||||
|
||||
/**
|
||||
* Checks for skillchip incompatibility with another chip.
|
||||
*
|
||||
* Does *this* skillchip have incompatibility with the skillchip in the args?
|
||||
* Override this with any snowflake chip-vs-chip incompatibility checks.
|
||||
* Returns a string with an incompatibility explanation if the chip is not compatible, returns FALSE
|
||||
* if it is compatible.
|
||||
* Arguments:
|
||||
* * skillchip - The skillchip to test for incompatability.
|
||||
*/
|
||||
* Checks for skillchip incompatibility with another chip.
|
||||
*
|
||||
* Does *this* skillchip have incompatibility with the skillchip in the args?
|
||||
* Override this with any snowflake chip-vs-chip incompatibility checks.
|
||||
* Returns a string with an incompatibility explanation if the chip is not compatible, returns FALSE
|
||||
* if it is compatible.
|
||||
* Arguments:
|
||||
* * skillchip - The skillchip to test for incompatability.
|
||||
*/
|
||||
/obj/item/skillchip/proc/has_skillchip_incompatibility(obj/item/skillchip/skillchip)
|
||||
// Only allow multiple copies of a type if SKILLCHIP_ALLOWS_MULTIPLE flag is set
|
||||
if(!(skillchip_flags & SKILLCHIP_ALLOWS_MULTIPLE) && (skillchip.type == type))
|
||||
@@ -226,15 +226,15 @@
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* Performs a full sweep of checks that dictate if this chip can be implanted in a given target.
|
||||
*
|
||||
* Override this with any snowflake chip checks. An example of which would be checking if a target is
|
||||
* mindshielded if you've got a special security skillchip.
|
||||
* Returns a string with an incompatibility explanation if the chip is not compatible, returns FALSE
|
||||
* if it is compatible.
|
||||
* Arguments:
|
||||
* * target - The mob to check for implantability with.
|
||||
*/
|
||||
* Performs a full sweep of checks that dictate if this chip can be implanted in a given target.
|
||||
*
|
||||
* Override this with any snowflake chip checks. An example of which would be checking if a target is
|
||||
* mindshielded if you've got a special security skillchip.
|
||||
* Returns a string with an incompatibility explanation if the chip is not compatible, returns FALSE
|
||||
* if it is compatible.
|
||||
* Arguments:
|
||||
* * target - The mob to check for implantability with.
|
||||
*/
|
||||
/obj/item/skillchip/proc/has_mob_incompatibility(mob/living/carbon/target)
|
||||
// No carbon/carbon of incorrect type
|
||||
if(!istype(target))
|
||||
@@ -253,13 +253,13 @@
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* Performs a full sweep of checks that dictate if this chip can be implanted in a given brain.
|
||||
*
|
||||
* Override this with any snowflake chip checks.
|
||||
* Returns TRUE if the chip is fully compatible, FALSE otherwise.
|
||||
* Arguments:
|
||||
* * brain - The brain to check for implantability with.
|
||||
*/
|
||||
* Performs a full sweep of checks that dictate if this chip can be implanted in a given brain.
|
||||
*
|
||||
* Override this with any snowflake chip checks.
|
||||
* Returns TRUE if the chip is fully compatible, FALSE otherwise.
|
||||
* Arguments:
|
||||
* * brain - The brain to check for implantability with.
|
||||
*/
|
||||
/obj/item/skillchip/proc/has_brain_incompatibility(obj/item/organ/brain/brain)
|
||||
if(!istype(brain))
|
||||
stack_trace("Attempted to check incompatibility with invalid brain object [brain].")
|
||||
@@ -283,36 +283,36 @@
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* Returns whether the chip is on cooldown. Chips ordinarily go on cooldown when activated.
|
||||
*
|
||||
* This does not mean the chip should be impossible to do anything with.
|
||||
* It's up to each individual piece of code to decide what it does with the result of this proc.
|
||||
*
|
||||
* Returns TRUE if the chip's extraction cooldown hasn't yet passed.
|
||||
*/
|
||||
* Returns whether the chip is on cooldown. Chips ordinarily go on cooldown when activated.
|
||||
*
|
||||
* This does not mean the chip should be impossible to do anything with.
|
||||
* It's up to each individual piece of code to decide what it does with the result of this proc.
|
||||
*
|
||||
* Returns TRUE if the chip's extraction cooldown hasn't yet passed.
|
||||
*/
|
||||
/obj/item/skillchip/proc/is_on_cooldown()
|
||||
return !COOLDOWN_FINISHED(src, chip_cooldown)
|
||||
|
||||
/**
|
||||
* Returns whether the chip is active.
|
||||
*
|
||||
* Intended to be overriden.
|
||||
* Returns TRUE if the chip is active.
|
||||
*/
|
||||
* Returns whether the chip is active.
|
||||
*
|
||||
* Intended to be overriden.
|
||||
* Returns TRUE if the chip is active.
|
||||
*/
|
||||
/obj/item/skillchip/proc/is_active()
|
||||
return active
|
||||
|
||||
/**
|
||||
* Returns the chip's complexity.
|
||||
*
|
||||
* Intended to be overriden.
|
||||
*/
|
||||
* Returns the chip's complexity.
|
||||
*
|
||||
* Intended to be overriden.
|
||||
*/
|
||||
/obj/item/skillchip/proc/get_complexity()
|
||||
return complexity
|
||||
|
||||
/**
|
||||
* Returns a list of basic chip info. Used by the skill station.
|
||||
*/
|
||||
* Returns a list of basic chip info. Used by the skill station.
|
||||
*/
|
||||
/obj/item/skillchip/proc/get_chip_data()
|
||||
return list(
|
||||
"name" = skill_name,
|
||||
@@ -328,12 +328,12 @@
|
||||
"actionable" = is_on_cooldown())
|
||||
|
||||
/**
|
||||
* Gets key metadata from this skillchip in an assoc list.
|
||||
*
|
||||
* If you override this proc, don't forget to also override set_metadata, which takes the output of
|
||||
* this proc and uses it to set the metadata.
|
||||
* Does not copy over any owner or brain status. Handle that externally.
|
||||
*/
|
||||
* Gets key metadata from this skillchip in an assoc list.
|
||||
*
|
||||
* If you override this proc, don't forget to also override set_metadata, which takes the output of
|
||||
* this proc and uses it to set the metadata.
|
||||
* Does not copy over any owner or brain status. Handle that externally.
|
||||
*/
|
||||
/obj/item/skillchip/proc/get_metadata()
|
||||
var/list/metadata = list()
|
||||
metadata["type"] = type
|
||||
@@ -344,15 +344,15 @@
|
||||
return metadata
|
||||
|
||||
/**
|
||||
* Sets key metadata for this skillchip from an assoc list.
|
||||
*
|
||||
* Best used with the output from get_metadata() of another chip.
|
||||
* If you override this proc, don't forget to also override get_metadata, which is where you should
|
||||
* usually get the assoc list that feeds into this proc.
|
||||
* Does not set any owner or brain status. Handle that externally.
|
||||
* Arguments:
|
||||
* metadata - Ideally the output of another chip's get_metadata proc. Assoc list of metadata.
|
||||
*/
|
||||
* Sets key metadata for this skillchip from an assoc list.
|
||||
*
|
||||
* Best used with the output from get_metadata() of another chip.
|
||||
* If you override this proc, don't forget to also override get_metadata, which is where you should
|
||||
* usually get the assoc list that feeds into this proc.
|
||||
* Does not set any owner or brain status. Handle that externally.
|
||||
* Arguments:
|
||||
* metadata - Ideally the output of another chip's get_metadata proc. Assoc list of metadata.
|
||||
*/
|
||||
/obj/item/skillchip/proc/set_metadata(list/metadata)
|
||||
var/active_msg
|
||||
// Start by trying to activate.
|
||||
|
||||
Reference in New Issue
Block a user