mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-31 20:53:34 +00:00
* Nkarrdem Mech - Initial Commit * Fabricator category, garbage bag, module designs * Added combat tech requirement to cleaning grenade launcher * Fixed a comment's spacing * Construction codersprites * Construction path updated * Open and Broken sprites * Codersprites, Construction fixes, Wreckage * Better spacing for equalities, better return bool Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Equality spacing Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * playsound boolean fix Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Mech part comment spacing Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Parts list parenthesis spacing Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Spacing and boolean returns Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Another boolean return Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * More comment spacing Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * More comment spacing Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Ditto Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Comment spacing Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Comment spacing Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Snake cased floor_buffer, removed excess comment * Enhanced floor buffer * Whole lot of time format changes * HUD warning message update * Cutting cargo * Max equipment fix * Spray fixes * Light replacer fixes and defines moved * Mop sound cooldowns * Formatting, autodoc, spacing, and chat alert fixes * Emag warning * Removed excess returns, added click when spray empty * Minor refactor of cleaning_act, removed the async mopping * Excess user * Formatting, Typecaching * Replaces to_chat with occupant_message * Type def, attack log, and timer for CGL * Moved light replacement logic to light object as fix() proc * Free performance is free performance * To chat fix * replaceLight changes * Ranged fix * Moved autodoc * Early return in mop refilling * Reordered early returns in mop action * Applied change to cleaning documentation * Moved acrtion, removed excess subtype * Spray moved to internal spray item, various fixes * Removed excess * Internal garbage storage for garbage magnet * Janimech storage handling, effect when emptying into disposals, user check in handle_item_insertion * Extraneous Return Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Var declaration fix Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> --------- Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
84 lines
3.5 KiB
Plaintext
84 lines
3.5 KiB
Plaintext
#define CMAG_CLEANTIME 50 //The cleaning time for cmagged objects is locked to this, for balance reasons
|
|
|
|
|
|
//For handling standard click-to-clean items like soap and mops.
|
|
|
|
//text_verb and text_description carry strings that, when pieced together by this proc, make the cleaning messages.
|
|
//text_verb is the verb that'll be used for cleaning, i.e. "User begins to [mop] the floor."
|
|
|
|
//text_description by default appends the name of the cleaning object to the cleaning message, i.e. "User begins to clean the floor[ with soap.]"
|
|
//If text_description is ".", the sentence will end early (so you don't say "Lusty Xenomorph Maid begins to clean the floor with the Lusty Xenomorph Maid")
|
|
|
|
//text_targetname is the name of the object being interacted with, i.e. "User begins to scrub out the [rune] with the damp rag."
|
|
//Can normally be left alone, but needs to be defined if the thing being cleaned isn't necessarily the thing being clicked on,
|
|
//such as /obj/effect/rune/cleaning_act() bouncing to turf/simulated/cleaning_act().
|
|
|
|
// skip_do_after - When TRUE, do after and visible messages are disabled
|
|
|
|
/atom/proc/cleaning_act(mob/user, atom/cleaner, cleanspeed = 5 SECONDS, text_verb = "clean", text_description = " with [cleaner].", text_targetname = name, skip_do_after = FALSE)
|
|
var/is_cmagged = FALSE
|
|
|
|
if(user.client && (src in user.client.screen)) //You can't clean items you're wearing for technical reasons
|
|
to_chat(user, "<span class='notice'>You need to take that [text_targetname] off before cleaning it.</span>")
|
|
return FALSE
|
|
|
|
if(HAS_TRAIT(src, TRAIT_CMAGGED)) //So we don't need a cleaning_act for every cmaggable object
|
|
is_cmagged = TRUE
|
|
text_verb = "clean the ooze off"
|
|
cleanspeed = CMAG_CLEANTIME
|
|
|
|
if(!skip_do_after)
|
|
user.visible_message("<span class='warning'>[user] begins to [text_verb] \the [text_targetname][text_description]</span>", "<span class='warning'>You begin to [text_verb] \the [text_targetname][text_description]</span>")
|
|
if(!do_after(user, cleanspeed, target = src))
|
|
return FALSE
|
|
|
|
if(!cleaner.can_clean())
|
|
cleaner.post_clean(src, user)
|
|
return FALSE
|
|
|
|
cleaner.post_clean(src, user)
|
|
|
|
if(!skip_do_after)
|
|
to_chat(user, "<span class='notice'>You [text_verb] \the [text_targetname][text_description]</span>")
|
|
|
|
if(is_cmagged) //If we've cleaned a cmagged object
|
|
REMOVE_TRAIT(src, TRAIT_CMAGGED, CLOWN_EMAG)
|
|
uncmag()
|
|
return TRUE
|
|
else
|
|
//Generic cleaning functionality
|
|
var/obj/effect/decal/cleanable/C = locate() in src
|
|
qdel(C)
|
|
clean_blood()
|
|
SEND_SIGNAL(src, COMSIG_COMPONENT_CLEAN_ACT)
|
|
return TRUE
|
|
|
|
/atom/proc/can_clean() //For determining if a cleaning object can actually remove decals
|
|
return FALSE
|
|
|
|
/atom/proc/post_clean(atom/target, mob/user) //For specific cleaning object behaviors after cleaning, such as mops making floors slippery.
|
|
return
|
|
|
|
/*
|
|
* # machine_wash()
|
|
*
|
|
* Called by machinery/washing_machine during its wash cycle
|
|
* allows custom behaviour to be implemented on items that are put through the washing machine
|
|
* by default it un cmag's objects and cleans all contaminents off of the item
|
|
*
|
|
* source - the washing_machine that is responsible for the washing, used by overrides to detect color to dye with
|
|
*/
|
|
/atom/movable/proc/machine_wash(obj/machinery/washing_machine/source)
|
|
if(HAS_TRAIT(src, TRAIT_CMAGGED)) //If we've cleaned a cmagged object
|
|
uncmag()
|
|
REMOVE_TRAIT(src, TRAIT_CMAGGED, CLOWN_EMAG)
|
|
|
|
//Generic cleaning functionality
|
|
var/obj/effect/decal/cleanable/C = locate() in src
|
|
if(!QDELETED(C))
|
|
qdel(C)
|
|
clean_blood()
|
|
|
|
|
|
#undef CMAG_CLEANTIME
|