Janitor Rework

This commit is contained in:
Fox-McCloud
2014-11-10 03:17:56 -05:00
parent bf65915b85
commit 111b24ceb8
32 changed files with 5128 additions and 4991 deletions
+11 -5
View File
@@ -44,16 +44,22 @@
if(user.client && (target in user.client.screen))
user << "<span class='notice'>You need to take that [target.name] off before cleaning it.</span>"
else if(istype(target,/obj/effect/decal/cleanable))
user << "<span class='notice'>You scrub \the [target.name] out.</span>"
del(target)
user.visible_message("<span class='warning'>[user] begins to scrub \the [target.name] out with [src].</span>")
if(do_after(user, src.cleanspeed))
user << "<span class='notice'>You scrub \the [target.name] out.</span>"
del(target)
else
user << "<span class='notice'>You clean \the [target.name].</span>"
target.clean_blood()
user.visible_message("<span class='warning'>[user] begins to clean \the [target.name] with [src].</span>")
if(do_after(user, src.cleanspeed))
user << "<span class='notice'>You clean \the [target.name].</span>"
var/obj/effect/decal/cleanable/C = locate() in target
del(C)
target.clean_blood()
return
/obj/item/weapon/soap/attack(mob/target as mob, mob/user as mob)
if(target && user && ishuman(target) && ishuman(user) && !target.stat && !user.stat && user.zone_sel &&user.zone_sel.selecting == "mouth" )
user.visible_message("\red \the [user] washes \the [target]'s mouth out with soap!")
user.visible_message("\red \the [user] washes \the [target]'s mouth out with [src.name]!")
return
..()
+43 -32
View File
@@ -4,58 +4,69 @@
icon = 'icons/obj/janitor.dmi'
icon_state = "mop"
force = 3.0
throwforce = 10.0
throw_speed = 5
throwforce = 5.0
throw_speed = 3
throw_range = 10
w_class = 3.0
flags = FPRINT | TABLEPASS
attack_verb = list("mopped", "bashed", "bludgeoned", "whacked")
var/mopping = 0
var/mopcount = 0
var/mopcap = 5
var/mopspeed = 40
/obj/item/weapon/mop/New()
var/datum/reagents/R = new/datum/reagents(5)
reagents = R
R.my_atom = src
create_reagents(mopcap)
obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
reagents.reaction(A,1,10)
A.clean_blood()
A.dirt = 0
for(var/obj/effect/O in A)
if( istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay) )
del(O)
/obj/effect/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/mop))
return
..()
obj/item/weapon/mop/proc/clean(turf/simulated/A)
if(reagents.has_reagent("water", 1) || reagents.has_reagent("holywater", 1))
A.clean_blood()
for(var/obj/effect/O in A)
if(istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay) || istype(O,/obj/effect/rune))
del(O)
reagents.reaction(A, TOUCH, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly.
reagents.remove_any(1) //reaction() doesn't use up the reagents
/obj/item/weapon/mop/afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(reagents.total_volume < 1 || mopcount >= 5)
if(reagents.total_volume < 1)
user << "<span class='notice'>Your mop is dry!</span>"
return
if(istype(A, /turf/simulated) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay) || istype(A, /obj/effect/rune))
user.visible_message("<span class='warning'>[user] begins to clean \the [get_turf(A)].</span>")
if(do_after(user, 40))
if(A)
clean(get_turf(A))
user << "<span class='notice'>You have finished mopping!</span>"
mopcount++
var/turf/simulated/turf = A
if(istype(A, /obj/effect/rune) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay))
turf = A.loc
A = null
if(mopcount >= 5) //Okay this stuff is an ugly hack and i feel bad about it.
spawn(5)
reagents.clear_reagents()
mopcount = 0
return
if(istype(turf))
user.visible_message("<span class='warning'>[user] begins to clean \the [turf] with [src].</span>")
if(do_after(user, mopspeed))
clean(turf)
user << "<span class='notice'>You have finished mopping!</span>"
/obj/effect/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/mop) || istype(I, /obj/item/weapon/soap))
return
..()
/obj/item/weapon/mop/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
J.put_in_cart(src, user)
J.mymop=src
J.update_icon()
J.update_icon()
/obj/item/weapon/mop/advanced
desc = "The most advanced tool in a custodian's arsenal. Just think of all the viscera you will clean up with this!"
name = "advanced mop"
mopcap = 10
icon_state = "advmop"
item_state = "mop" //meh will do for now until TG makes one
force = 6
throwforce = 8
throw_range = 4
mopspeed = 20
@@ -34,7 +34,7 @@
w_class = 4
max_w_class = 2
storage_slots = 21
storage_slots = 30
can_hold = list() // any
cant_hold = list("/obj/item/weapon/disk/nuclear","/obj/item/flag/nation")
@@ -163,4 +163,20 @@
name = "military belt"
desc = "A syndicate belt designed to be used by boarding parties. Its style is modeled after the hardsuits they wear."
icon_state = "militarybelt"
item_state = "military"
item_state = "military"
/obj/item/weapon/storage/belt/janitor
name = "janibelt"
desc = "A belt used to hold most janitorial supplies."
icon_state = "janibelt"
item_state = "janibelt"
storage_slots = 6
max_w_class = 4 // Set to this so the light replacer can fit.
can_hold = list(
"/obj/item/weapon/grenade/chem_grenade/cleaner",
"/obj/item/device/lightreplacer",
"/obj/item/device/flashlight",
"/obj/item/weapon/reagent_containers/spray",
"/obj/item/weapon/soap",
"/obj/item/weapon/holosign_creator"
)
@@ -135,38 +135,34 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "telebaton_0"
item_state = "telebaton_0"
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 2
force = 3
var/cooldown = 0
var/on = 0
/obj/item/weapon/melee/telebaton/attack_self(mob/user as mob)
on = !on
if(on)
user.visible_message("\red With a flick of their wrist, [user] extends their telescopic baton.",\
"\red You extend the baton.",\
"You hear an ominous click.")
user << "<span class ='warning'>You extend the baton.</span>"
icon_state = "telebaton_1"
item_state = "telebaton_1"
w_class = 3
force = 15//quite robust
attack_verb = list("smacked", "struck", "slapped")
item_state = "nullrod"
w_class = 4 //doesnt fit in backpack when its on for balance
force = 10 //seclite damage
attack_verb = list("smacked", "struck", "cracked", "beaten")
else
user.visible_message("\blue [user] collapses their telescopic baton.",\
"\blue You collapse the baton.",\
"You hear a click.")
user << "<span class ='notice'>You collapse the baton.</span>"
icon_state = "telebaton_0"
item_state = "telebaton_0"
item_state = "telebaton_0" //no sprite in other words
slot_flags = SLOT_BELT
w_class = 2
force = 3//not so robust now
attack_verb = list("hit", "punched")
force = 3 //not so robust now
attack_verb = list("hit", "poked")
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
add_fingerprint(user)
if (!blood_DNA) return
if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any
@@ -183,8 +179,9 @@
/obj/item/weapon/melee/telebaton/attack(mob/target as mob, mob/living/user as mob)
if(on)
if ((M_CLUMSY in user.mutations) && prob(50))
user << "\red You club yourself over the head."
add_fingerprint(user)
if((M_CLUMSY in user.mutations) && prob(50))
user << "<span class ='danger'>You club yourself over the head.</span>"
user.Weaken(3 * force)
if(ishuman(user))
var/mob/living/carbon/human/H = user
@@ -192,23 +189,28 @@
else
user.take_organ_damage(2*force)
return
if(isrobot(target))
..()
return
if(!isliving(target))
return
if (user.a_intent == "harm")
if(!..()) return
if(!isrobot(target))
playsound(src.loc, "swing_hit", 50, 1, -1)
target.Weaken(4)
if(!isrobot(target)) return
else
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1, -1)
target.Weaken(2)
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [target.name] ([target.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
src.add_fingerprint(user)
target.visible_message("\red <B>[target] has been stunned with \the [src] by [user]!</B>")
if(!iscarbon(user))
target.LAssailant = null
else
target.LAssailant = user
if(cooldown <= 0)
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
target.Weaken(3)
add_logs(user, target, "stunned", object="telescopic baton")
src.add_fingerprint(user)
target.visible_message("<span class ='danger'>[target] has been knocked down with \the [src] by [user]!</span>")
if(!iscarbon(user))
target.LAssailant = null
else
target.LAssailant = user
cooldown = 1
spawn(40)
cooldown = 0
return
else
return ..()
@@ -75,12 +75,12 @@
new /obj/item/weapon/caution(src)
new /obj/item/weapon/caution(src)
new /obj/item/weapon/caution(src)
new /obj/item/weapon/caution(src)
new /obj/item/weapon/caution(src)
new /obj/item/weapon/storage/bag/trash(src)
new /obj/item/device/lightreplacer(src)
new /obj/item/weapon/holosign_creator(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/head/soft/purple(src)
new /obj/item/weapon/storage/belt/janitor(src)
/*
* Lawyer
@@ -27,7 +27,6 @@
new /obj/item/clothing/gloves/captain(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/clothing/suit/armor/captain(src)
new /obj/item/weapon/melee/telebaton(src)
new /obj/item/clothing/under/dress/dress_cap(src)
return
@@ -121,7 +120,6 @@
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/clothing/tie/holster/armpit(src)
new /obj/item/weapon/melee/telebaton(src)
return
@@ -28,7 +28,7 @@
sleep(2)
new /obj/item/weapon/tank/jetpack/oxygen/harness(src)
new /obj/item/clothing/mask/gas/syndicate(src)
new /obj/item/clothing/shoes/magboots(src)
new /obj/item/clothing/shoes/magboots/syndie(src)
/obj/structure/closet/syndicate/nuclear
desc = "It's a storage unit for a Syndicate boarding party.."