mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-20 19:57:28 +01:00
West = Custom Channel (mic off, speaker off) North = Common Channel (mic on, speaker on) East = Private Channel (mic off, speaker on) //No change The old system had two intercoms on the common channel, one with the mic on/speaker off and one with the mic off/speaker on. Apparently it was too confusing for players to figure out that when they changed the freq for one, they'd have to change the speaker/mic of the other. Fixes issue 837. I've also fixed a derp with fire extinguishers I made in my last commit. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4548 316c924e-a436-60f5-8080-3fe189b3f50e
132 lines
4.0 KiB
Plaintext
132 lines
4.0 KiB
Plaintext
/obj/item/weapon/extinguisher
|
|
name = "fire extinguisher"
|
|
desc = "A traditional red fire extinguisher."
|
|
icon = 'icons/obj/items.dmi'
|
|
icon_state = "fire_extinguisher0"
|
|
item_state = "fire_extinguisher"
|
|
hitsound = 'sound/weapons/smash.ogg'
|
|
flags = FPRINT | USEDELAY | TABLEPASS | CONDUCT
|
|
throwforce = 10
|
|
w_class = 3.0
|
|
throw_speed = 2
|
|
throw_range = 10
|
|
force = 10.0
|
|
m_amt = 90
|
|
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
|
|
var/max_water = 50
|
|
var/last_use = 1.0
|
|
var/safety = 1
|
|
var/sprite_name = "fire_extinguisher"
|
|
|
|
/obj/item/weapon/extinguisher/mini
|
|
name = "fire extinguisher"
|
|
desc = "A light and compact fibreglass-framed model fire extinguisher."
|
|
icon_state = "miniFE0"
|
|
item_state = "miniFE"
|
|
hitsound = null //it is much lighter, after all.
|
|
flags = FPRINT | USEDELAY | TABLEPASS
|
|
throwforce = 2
|
|
w_class = 2.0
|
|
force = 3.0
|
|
m_amt = 0
|
|
max_water = 30
|
|
sprite_name = "miniFE"
|
|
|
|
/obj/item/weapon/extinguisher/New()
|
|
var/datum/reagents/R = new/datum/reagents(max_water)
|
|
reagents = R
|
|
R.my_atom = src
|
|
R.add_reagent("water", max_water)
|
|
|
|
/obj/item/weapon/extinguisher/examine()
|
|
set src in usr
|
|
|
|
usr << text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume)
|
|
..()
|
|
return
|
|
|
|
/obj/item/weapon/extinguisher/attack_self(mob/user as mob)
|
|
safety = !safety
|
|
src.icon_state = "[sprite_name][!safety]"
|
|
src.desc = "The safety is [safety ? "on" : "off"]."
|
|
user << "The safety is [safety ? "on" : "off"]."
|
|
return
|
|
|
|
/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag)
|
|
//TODO; Add support for reagents in water.
|
|
|
|
if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(src,target) <= 1)
|
|
var/obj/o = target
|
|
o.reagents.trans_to(src, 50)
|
|
user << "\blue \The [src] is now refilled"
|
|
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
|
return
|
|
|
|
if (!safety)
|
|
if (src.reagents.total_volume < 1)
|
|
usr << "\red \The [src] is empty."
|
|
return
|
|
|
|
if (world.time < src.last_use + 20)
|
|
return
|
|
|
|
src.last_use = world.time
|
|
|
|
playsound(src.loc, 'sound/effects/extinguish.ogg', 75, 1, -3)
|
|
|
|
var/direction = get_dir(src,target)
|
|
|
|
if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
|
|
spawn(0)
|
|
var/obj/B = usr.buckled
|
|
var/movementdirection = turn(direction,180)
|
|
B.Move(get_step(usr,movementdirection), movementdirection)
|
|
sleep(1)
|
|
B.Move(get_step(usr,movementdirection), movementdirection)
|
|
sleep(1)
|
|
B.Move(get_step(usr,movementdirection), movementdirection)
|
|
sleep(1)
|
|
B.Move(get_step(usr,movementdirection), movementdirection)
|
|
sleep(2)
|
|
B.Move(get_step(usr,movementdirection), movementdirection)
|
|
sleep(2)
|
|
B.Move(get_step(usr,movementdirection), movementdirection)
|
|
sleep(3)
|
|
B.Move(get_step(usr,movementdirection), movementdirection)
|
|
sleep(3)
|
|
B.Move(get_step(usr,movementdirection), movementdirection)
|
|
sleep(3)
|
|
B.Move(get_step(usr,movementdirection), movementdirection)
|
|
|
|
var/turf/T = get_turf(target)
|
|
var/turf/T1 = get_step(T,turn(direction, 90))
|
|
var/turf/T2 = get_step(T,turn(direction, -90))
|
|
|
|
var/list/the_targets = list(T,T1,T2)
|
|
|
|
for(var/a=0, a<5, a++)
|
|
spawn(0)
|
|
var/obj/effect/effect/water/W = new /obj/effect/effect/water( get_turf(src) )
|
|
var/turf/my_target = pick(the_targets)
|
|
var/datum/reagents/R = new/datum/reagents(5)
|
|
if(!W) return
|
|
W.reagents = R
|
|
R.my_atom = W
|
|
if(!W || !src) return
|
|
src.reagents.trans_to(W,1)
|
|
for(var/b=0, b<5, b++)
|
|
step_towards(W,my_target)
|
|
if(!W) return
|
|
W.reagents.reaction(get_turf(W))
|
|
for(var/atom/atm in get_turf(W))
|
|
if(!W) return
|
|
W.reagents.reaction(atm)
|
|
if(W.loc == my_target) break
|
|
sleep(2)
|
|
|
|
if((istype(usr.loc, /turf/space)) || (usr.lastarea.has_gravity == 0))
|
|
user.inertia_dir = get_dir(target, user)
|
|
step(user, user.inertia_dir)
|
|
else
|
|
return ..()
|
|
return |