mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-29 02:51:41 +00:00
* [MDB IGNORE] Refactors drinks and fixes a lot of food problems * [MDB IGNORE] Refactors drinks and fixes a lot of food problems * forgto 2 commit * im slowly going insane * why does find and replace not FIND everything * hnghnnngh * h * l * a * a * so close... * delta fix * I thought I committed this already, guess not * this PR has been the bane of my fucking life * orange juice Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com> Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com> Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
134 lines
4.8 KiB
Plaintext
134 lines
4.8 KiB
Plaintext
/obj/item/mop
|
|
desc = "The world of janitalia wouldn't be complete without a mop."
|
|
name = "mop"
|
|
icon = 'icons/obj/janitor.dmi'
|
|
icon_state = "mop"
|
|
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
|
|
force = 8
|
|
throwforce = 10
|
|
throw_speed = 3
|
|
throw_range = 7
|
|
w_class = WEIGHT_CLASS_NORMAL
|
|
attack_verb_continuous = list("mops", "bashes", "bludgeons", "whacks")
|
|
attack_verb_simple = list("mop", "bash", "bludgeon", "whack")
|
|
resistance_flags = FLAMMABLE
|
|
var/mopcount = 0
|
|
///Maximum volume of reagents it can hold.
|
|
var/max_reagent_volume = 50 // SKYRAT EDIT - ORIGINAL: 15
|
|
var/mopspeed = 1.5 SECONDS
|
|
force_string = "robust... against germs"
|
|
var/insertable = TRUE
|
|
|
|
/obj/item/mop/Initialize(mapload)
|
|
. = ..()
|
|
AddComponent(/datum/component/cleaner, mopspeed, on_cleaned_callback=CALLBACK(src, .proc/apply_reagents))
|
|
create_reagents(max_reagent_volume)
|
|
GLOB.janitor_devices += src
|
|
//SKYRAT EDIT ADDITION
|
|
AddElement(/datum/element/liquids_interaction, on_interaction_callback = /obj/item/mop/.proc/attack_on_liquids_turf)
|
|
|
|
/obj/item/mop/proc/attack_on_liquids_turf(obj/item/mop/the_mop, turf/T, mob/user, obj/effect/abstract/liquid_turf/liquids)
|
|
var/free_space = the_mop.reagents.maximum_volume - the_mop.reagents.total_volume
|
|
if(free_space <= 0)
|
|
to_chat(user, "<span class='warning'>Your mop can't absorb any more!</span>")
|
|
return TRUE
|
|
var/datum/reagents/tempr = liquids.take_reagents_flat(free_space)
|
|
tempr.trans_to(the_mop.reagents, tempr.total_volume)
|
|
to_chat(user, "<span class='notice'>You soak the mop with some liquids.</span>")
|
|
qdel(tempr)
|
|
user.changeNext_move(CLICK_CD_MELEE)
|
|
return TRUE
|
|
//SKYRAT EDIT END
|
|
|
|
/obj/item/mop/Destroy(force)
|
|
GLOB.janitor_devices -= src
|
|
return ..()
|
|
|
|
/**
|
|
* Applies reagents to the cleaned floor and removes them from the mop.
|
|
*
|
|
* Arguments
|
|
* * cleaning_source the source of the cleaning
|
|
* * cleaned_turf the turf that is being cleaned
|
|
* * cleaner the mob that is doing the cleaning
|
|
*/
|
|
/obj/item/mop/proc/apply_reagents(datum/cleaning_source, turf/cleaned_turf, mob/living/cleaner)
|
|
reagents.expose(cleaned_turf, TOUCH, 10) //Needed for proper floor wetting.
|
|
var/val2remove = 1
|
|
if(cleaner?.mind)
|
|
val2remove = round(cleaner.mind.get_skill_modifier(/datum/skill/cleaning, SKILL_SPEED_MODIFIER),0.1)
|
|
reagents.remove_any(val2remove) //reaction() doesn't use up the reagents
|
|
|
|
/obj/item/mop/afterattack(atom/A, mob/user, proximity)
|
|
. = ..()
|
|
//SKYRAT EDIT ADDITION
|
|
if(.)
|
|
return
|
|
//SKYRAT EDIT END
|
|
if(!proximity)
|
|
return
|
|
|
|
if(reagents.total_volume < 0.1)
|
|
to_chat(user, span_warning("Your mop is dry!"))
|
|
return
|
|
|
|
var/turf/T = get_turf(A)
|
|
|
|
if(istype(A, /obj/item/reagent_containers/cup/bucket) || istype(A, /obj/structure/janitorialcart))
|
|
return
|
|
|
|
if(T)
|
|
var/should_clean = reagents.has_chemical_flag(REAGENT_CLEANS, 1)
|
|
start_cleaning(src, T, user, clean_target = should_clean)
|
|
|
|
/obj/item/mop/cyborg/Initialize(mapload)
|
|
. = ..()
|
|
ADD_TRAIT(src, TRAIT_NODROP, CYBORG_ITEM_TRAIT)
|
|
|
|
/obj/item/mop/advanced
|
|
desc = "The most advanced tool in a custodian's arsenal, complete with a condenser for self-wetting! Just think of all the viscera you will clean up with this! Due to the self-wetting technology, it proves very inefficient for cleaning up spills." //SKYRAT EDIT
|
|
name = "advanced mop"
|
|
max_reagent_volume = 100 // SKYRAT EDIT - ORIGINAL: 10
|
|
icon_state = "advmop"
|
|
inhand_icon_state = "mop"
|
|
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
|
|
force = 12
|
|
throwforce = 14
|
|
throw_range = 4
|
|
mopspeed = 0.8 SECONDS
|
|
var/refill_enabled = TRUE //Self-refill toggle for when a janitor decides to mop with something other than water.
|
|
/// Amount of reagent to refill per second
|
|
var/refill_rate = 0.5
|
|
var/refill_reagent = /datum/reagent/water //Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING
|
|
|
|
/obj/item/mop/advanced/Initialize(mapload)
|
|
. = ..()
|
|
START_PROCESSING(SSobj, src)
|
|
|
|
/obj/item/mop/advanced/attack_self(mob/user)
|
|
refill_enabled = !refill_enabled
|
|
if(refill_enabled)
|
|
START_PROCESSING(SSobj, src)
|
|
else
|
|
STOP_PROCESSING(SSobj,src)
|
|
to_chat(user, span_notice("You set the condenser switch to the '[refill_enabled ? "ON" : "OFF"]' position."))
|
|
playsound(user, 'sound/machines/click.ogg', 30, TRUE)
|
|
|
|
/obj/item/mop/advanced/process(delta_time)
|
|
var/amadd = min(max_reagent_volume - reagents.total_volume, refill_rate * delta_time)
|
|
if(amadd > 0)
|
|
reagents.add_reagent(refill_reagent, amadd)
|
|
|
|
/obj/item/mop/advanced/examine(mob/user)
|
|
. = ..()
|
|
. += span_notice("The condenser switch is set to <b>[refill_enabled ? "ON" : "OFF"]</b>.")
|
|
|
|
/obj/item/mop/advanced/Destroy()
|
|
STOP_PROCESSING(SSobj, src)
|
|
return ..()
|
|
|
|
/obj/item/mop/advanced/cyborg
|
|
insertable = FALSE
|