mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 18:46:24 +01:00
Polaris sync
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
//..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/wirecutters))
|
||||
user << "You cut the tag off the bodybag"
|
||||
to_chat(user, "You cut the tag off the bodybag")
|
||||
src.name = "body bag"
|
||||
src.overlays.Cut()
|
||||
return
|
||||
@@ -160,7 +160,7 @@
|
||||
O.name = "used stasis bag"
|
||||
O.icon = src.icon
|
||||
O.icon_state = "bodybag_used"
|
||||
O.desc = "Pretty useless now.."
|
||||
O.desc = "Pretty useless now..."
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag/MouseDrop(over_object, src_location, over_location)
|
||||
@@ -211,9 +211,9 @@
|
||||
/obj/structure/closet/body_bag/cryobag/examine(mob/user)
|
||||
..()
|
||||
if(Adjacent(user)) //The bag's rather thick and opaque from a distance.
|
||||
user << "<span class='info'>You peer into \the [src].</span>"
|
||||
to_chat(user, "<span class='info'>You peer into \the [src].</span>")
|
||||
if(syringe)
|
||||
user << "<span class='info'>It has a syringe added to it.</span>"
|
||||
to_chat(user, "<span class='info'>It has a syringe added to it.</span>")
|
||||
for(var/mob/living/L in contents)
|
||||
L.examine(user)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#define RAD_LEVEL_LOW 5 //10 // Around the level at which radiation starts to become harmful
|
||||
#define RAD_LEVEL_MODERATE 15 //15
|
||||
#define RAD_LEVEL_HIGH 50 //50
|
||||
#define RAD_LEVEL_VERY_HIGH 100 //100
|
||||
#define RAD_LEVEL_LOW 0.01 // Around the level at which radiation starts to become harmful
|
||||
#define RAD_LEVEL_MODERATE 10
|
||||
#define RAD_LEVEL_HIGH 25
|
||||
#define RAD_LEVEL_VERY_HIGH 50
|
||||
|
||||
//Geiger counter
|
||||
//Rewritten version of TG's geiger counter
|
||||
@@ -19,7 +19,14 @@
|
||||
/obj/item/device/geiger/New()
|
||||
processing_objects |= src
|
||||
|
||||
/obj/item/device/geiger/Destroy()
|
||||
processing_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/device/geiger/process()
|
||||
get_radiation()
|
||||
|
||||
/obj/item/device/geiger/proc/get_radiation()
|
||||
if(!scanning)
|
||||
return
|
||||
radiation_count = radiation_repository.get_rads_at_turf(get_turf(src))
|
||||
@@ -27,12 +34,29 @@
|
||||
|
||||
/obj/item/device/geiger/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "<span class='warning'>[scanning ? "ambient" : "stored"] radiation level: [radiation_count ? radiation_count : "0"]Bq.</span>")
|
||||
get_radiation()
|
||||
to_chat(user, "<span class='warning'>[scanning ? "Ambient" : "Stored"] radiation level: [radiation_count ? radiation_count : "0"]Bq.</span>")
|
||||
|
||||
/obj/item/device/geiger/rad_act(amount)
|
||||
if(!amount || !scanning)
|
||||
return FALSE
|
||||
|
||||
if(amount > radiation_count)
|
||||
radiation_count = amount
|
||||
|
||||
var/sound = "geiger"
|
||||
if(amount < 5)
|
||||
sound = "geiger_weak"
|
||||
playsound(src, sound, between(10, 10 + (radiation_count * 4), 100), 0)
|
||||
if(sound == "geiger_weak") // A weak geiger sound every two seconds sounds too infrequent.
|
||||
spawn(1 SECOND)
|
||||
playsound(src, sound, between(10, 10 + (radiation_count * 4), 100), 0)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/geiger/attack_self(var/mob/user)
|
||||
scanning = !scanning
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>\icon[src] You switch [scanning ? "on" : "off"] [src].</span>")
|
||||
to_chat(user, "<span class='notice'>\icon[src] You switch [scanning ? "on" : "off"] \the [src].</span>")
|
||||
|
||||
/obj/item/device/geiger/update_icon()
|
||||
if(!scanning)
|
||||
@@ -40,12 +64,18 @@
|
||||
return 1
|
||||
|
||||
switch(radiation_count)
|
||||
if(null) icon_state = "geiger_on_1"
|
||||
if(-INFINITY to RAD_LEVEL_LOW) icon_state = "geiger_on_1"
|
||||
if(RAD_LEVEL_LOW + 1 to RAD_LEVEL_MODERATE) icon_state = "geiger_on_2"
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH) icon_state = "geiger_on_3"
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH) icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to INFINITY) icon_state = "geiger_on_5"
|
||||
if(null)
|
||||
icon_state = "geiger_on_1"
|
||||
if(-INFINITY to RAD_LEVEL_LOW)
|
||||
icon_state = "geiger_on_1"
|
||||
if(RAD_LEVEL_LOW to RAD_LEVEL_MODERATE)
|
||||
icon_state = "geiger_on_2"
|
||||
if(RAD_LEVEL_MODERATE to RAD_LEVEL_HIGH)
|
||||
icon_state = "geiger_on_3"
|
||||
if(RAD_LEVEL_HIGH to RAD_LEVEL_VERY_HIGH)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_VERY_HIGH to INFINITY)
|
||||
icon_state = "geiger_on_5"
|
||||
|
||||
#undef RAD_LEVEL_LOW
|
||||
#undef RAD_LEVEL_MODERATE
|
||||
|
||||
@@ -75,11 +75,11 @@
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.open)
|
||||
user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
|
||||
return
|
||||
|
||||
if(affecting.is_bandaged())
|
||||
user << "<span class='warning'>The wounds on [M]'s [affecting.name] have already been bandaged.</span>"
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been bandaged.</span>")
|
||||
return 1
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] starts treating [M]'s [affecting.name].</span>", \
|
||||
@@ -93,9 +93,13 @@
|
||||
if(used == amount)
|
||||
break
|
||||
if(!do_mob(user, M, W.damage/5))
|
||||
user << "<span class='notice'>You must stand still to bandage wounds.</span>"
|
||||
to_chat(user, "<span class='notice'>You must stand still to bandage wounds.</span>")
|
||||
break
|
||||
|
||||
if(affecting.is_bandaged()) // We do a second check after the delay, in case it was bandaged after the first check.
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been bandaged.</span>")
|
||||
return 1
|
||||
|
||||
if (W.current_stage <= W.max_bleeding_stage)
|
||||
user.visible_message("<span class='notice'>\The [user] bandages \a [W.desc] on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You bandage \a [W.desc] on [M]'s [affecting.name].</span>" )
|
||||
@@ -111,9 +115,9 @@
|
||||
affecting.update_damages()
|
||||
if(used == amount)
|
||||
if(affecting.is_bandaged())
|
||||
user << "<span class='warning'>\The [src] is used up.</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is used up.</span>")
|
||||
else
|
||||
user << "<span class='warning'>\The [src] is used up, but there are more wounds to treat on \the [affecting.name].</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is used up, but there are more wounds to treat on \the [affecting.name].</span>")
|
||||
use(used)
|
||||
|
||||
/obj/item/stack/medical/ointment
|
||||
@@ -135,17 +139,20 @@
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.open)
|
||||
user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
|
||||
return
|
||||
|
||||
if(affecting.is_salved())
|
||||
user << "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>"
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>")
|
||||
return 1
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] starts salving wounds on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You start salving the wounds on [M]'s [affecting.name].</span>" )
|
||||
if(!do_mob(user, M, 10))
|
||||
user << "<span class='notice'>You must stand still to salve wounds.</span>"
|
||||
to_chat(user, "<span class='notice'>You must stand still to salve wounds.</span>")
|
||||
return 1
|
||||
if(affecting.is_salved()) // We do a second check after the delay, in case it was bandaged after the first check.
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>")
|
||||
return 1
|
||||
user.visible_message("<span class='notice'>[user] salved wounds on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You salved wounds on [M]'s [affecting.name].</span>" )
|
||||
@@ -169,11 +176,11 @@
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.open)
|
||||
user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
|
||||
return
|
||||
|
||||
if(affecting.is_bandaged() && affecting.is_disinfected())
|
||||
user << "<span class='warning'>The wounds on [M]'s [affecting.name] have already been treated.</span>"
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been treated.</span>")
|
||||
return 1
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] starts treating [M]'s [affecting.name].</span>", \
|
||||
@@ -187,8 +194,11 @@
|
||||
if(used == amount)
|
||||
break
|
||||
if(!do_mob(user, M, W.damage/5))
|
||||
user << "<span class='notice'>You must stand still to bandage wounds.</span>"
|
||||
to_chat(user, "<span class='notice'>You must stand still to bandage wounds.</span>")
|
||||
break
|
||||
if(affecting.is_bandaged() && affecting.is_disinfected()) // We do a second check after the delay, in case it was bandaged after the first check.
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been bandaged.</span>")
|
||||
return 1
|
||||
if (W.current_stage <= W.max_bleeding_stage)
|
||||
user.visible_message("<span class='notice'>\The [user] cleans \a [W.desc] on [M]'s [affecting.name] and seals the edges with bioglue.</span>", \
|
||||
"<span class='notice'>You clean and seal \a [W.desc] on [M]'s [affecting.name].</span>" )
|
||||
@@ -205,9 +215,9 @@
|
||||
affecting.update_damages()
|
||||
if(used == amount)
|
||||
if(affecting.is_bandaged())
|
||||
user << "<span class='warning'>\The [src] is used up.</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is used up.</span>")
|
||||
else
|
||||
user << "<span class='warning'>\The [src] is used up, but there are more wounds to treat on \the [affecting.name].</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is used up, but there are more wounds to treat on \the [affecting.name].</span>")
|
||||
use(used)
|
||||
|
||||
/obj/item/stack/medical/advanced/ointment
|
||||
@@ -228,16 +238,19 @@
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.open)
|
||||
user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
|
||||
|
||||
if(affecting.is_salved())
|
||||
user << "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>"
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>")
|
||||
return 1
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] starts salving wounds on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You start salving the wounds on [M]'s [affecting.name].</span>" )
|
||||
if(!do_mob(user, M, 10))
|
||||
user << "<span class='notice'>You must stand still to salve wounds.</span>"
|
||||
to_chat(user, "<span class='notice'>You must stand still to salve wounds.</span>")
|
||||
return 1
|
||||
if(affecting.is_salved()) // We do a second check after the delay, in case it was bandaged after the first check.
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>")
|
||||
return 1
|
||||
user.visible_message( "<span class='notice'>[user] covers wounds on [M]'s [affecting.name] with regenerative membrane.</span>", \
|
||||
"<span class='notice'>You cover wounds on [M]'s [affecting.name] with regenerative membrane.</span>" )
|
||||
@@ -264,20 +277,23 @@
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
var/limb = affecting.name
|
||||
if(!(affecting.organ_tag in splintable_organs))
|
||||
user << "<span class='danger'>You can't use \the [src] to apply a splint there!</span>"
|
||||
to_chat(user, "<span class='danger'>You can't use \the [src] to apply a splint there!</span>")
|
||||
return
|
||||
if(affecting.splinted)
|
||||
user << "<span class='danger'>[M]'s [limb] is already splinted!</span>"
|
||||
to_chat(user, "<span class='danger'>[M]'s [limb] is already splinted!</span>")
|
||||
return
|
||||
if (M != user)
|
||||
user.visible_message("<span class='danger'>[user] starts to apply \the [src] to [M]'s [limb].</span>", "<span class='danger'>You start to apply \the [src] to [M]'s [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
else
|
||||
if(( !user.hand && (affecting.organ_tag in list(BP_R_ARM, BP_R_HAND)) || \
|
||||
user.hand && (affecting.organ_tag in list(BP_L_ARM, BP_L_HAND)) ))
|
||||
user << "<span class='danger'>You can't apply a splint to the arm you're using!</span>"
|
||||
to_chat(user, "<span class='danger'>You can't apply a splint to the arm you're using!</span>")
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user] starts to apply \the [src] to their [limb].</span>", "<span class='danger'>You start to apply \the [src] to your [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
if(do_after(user, 50, M))
|
||||
if(affecting.splinted)
|
||||
to_chat(user, "<span class='danger'>[M]'s [limb] is already splinted!</span>")
|
||||
return
|
||||
if(M == user && prob(75))
|
||||
user.visible_message("<span class='danger'>\The [user] fumbles [src].</span>", "<span class='danger'>You fumble [src].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
return
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
|
||||
if(do_after(user, 20 * O.toolspeed))
|
||||
src.locked = 0
|
||||
user << "<span class = 'caution'> You disable the locking modules.</span>"
|
||||
to_chat(user, "<span class = 'caution'> You disable the locking modules.</span>")
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon))
|
||||
@@ -50,7 +50,7 @@
|
||||
else
|
||||
playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
|
||||
if(W.force < 15)
|
||||
user << "<span class='notice'>The cabinet's protective glass glances off the hit.</span>"
|
||||
to_chat(user, "<span class='notice'>The cabinet's protective glass glances off the hit.</span>")
|
||||
else
|
||||
src.hitstaken++
|
||||
if(src.hitstaken == 4)
|
||||
@@ -63,12 +63,14 @@
|
||||
if (istype(O, /obj/item/weapon/material/twohanded/fireaxe) && src.localopened)
|
||||
if(!fireaxe)
|
||||
if(O:wielded)
|
||||
user << "<span class='warning'>Unwield the axe first.</span>"
|
||||
return
|
||||
O:wielded = 0
|
||||
O.update_icon()
|
||||
//to_chat(user, "<span class='warning'>Unwield the axe first.</span>")
|
||||
//return
|
||||
fireaxe = O
|
||||
user.remove_from_mob(O)
|
||||
src.contents += O
|
||||
user << "<span class='notice'>You place the fire axe back in the [src.name].</span>"
|
||||
to_chat(user, "<span class='notice'>You place the fire axe back in the [src.name].</span>")
|
||||
update_icon()
|
||||
else
|
||||
if(src.smashed)
|
||||
@@ -91,11 +93,11 @@
|
||||
spawn(10) update_icon()
|
||||
return
|
||||
else
|
||||
user << "<span class='warning'>Resetting circuitry...</span>"
|
||||
to_chat(user, "<span class='warning'>Resetting circuitry...</span>")
|
||||
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
|
||||
if(do_after(user,20 * O.toolspeed))
|
||||
src.locked = 1
|
||||
user << "<span class = 'caution'> You re-enable the locking modules.</span>"
|
||||
to_chat(user, "<span class = 'caution'> You re-enable the locking modules.</span>")
|
||||
return
|
||||
else
|
||||
localopened = !localopened
|
||||
@@ -116,13 +118,13 @@
|
||||
hasaxe = 1
|
||||
|
||||
if(src.locked)
|
||||
user <<"<span class='warning'>The cabinet won't budge!</span>"
|
||||
to_chat(user, "<span class='warning'>The cabinet won't budge!</span>")
|
||||
return
|
||||
if(localopened)
|
||||
if(fireaxe)
|
||||
user.put_in_hands(fireaxe)
|
||||
fireaxe = null
|
||||
user << "<span class='notice'>You take the fire axe from the [name].</span>"
|
||||
to_chat (user, "<span class='notice'>You take the fire axe from the [name].</span>")
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
else
|
||||
@@ -149,7 +151,7 @@
|
||||
attack_tk(mob/user as mob)
|
||||
if(localopened && fireaxe)
|
||||
fireaxe.forceMove(loc)
|
||||
user << "<span class='notice'>You telekinetically remove the fire axe.</span>"
|
||||
to_chat(user, "<span class='notice'>You telekinetically remove the fire axe.</span>")
|
||||
fireaxe = null
|
||||
update_icon()
|
||||
return
|
||||
@@ -161,9 +163,9 @@
|
||||
|
||||
if (isrobot(usr) || src.locked || src.smashed)
|
||||
if(src.locked)
|
||||
usr << "<span class='warning'>The cabinet won't budge!</span>"
|
||||
to_chat(usr, "<span class='warning'>The cabinet won't budge!</span>")
|
||||
else if(src.smashed)
|
||||
usr << "<span class='notice'>The protective glass is broken!</span>"
|
||||
to_chat(usr, "<span class='notice'>The protective glass is broken!</span>")
|
||||
return
|
||||
|
||||
localopened = !localopened
|
||||
@@ -180,23 +182,23 @@
|
||||
if(fireaxe)
|
||||
usr.put_in_hands(fireaxe)
|
||||
fireaxe = null
|
||||
usr << "<span class='notice'>You take the Fire axe from the [name].</span>"
|
||||
to_chat(usr, "<span class='notice'>You take the Fire axe from the [name].</span>")
|
||||
else
|
||||
usr << "<span class='notice'>The [src.name] is empty.</span>"
|
||||
to_chat(usr, "<span class='notice'>The [src.name] is empty.</span>")
|
||||
else
|
||||
usr << "<span class='notice'>The [src.name] is closed.</span>"
|
||||
to_chat(usr, "<span class='notice'>The [src.name] is closed.</span>")
|
||||
update_icon()
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
if(src.smashed)
|
||||
user << "<span class='warning'>The security of the cabinet is compromised.</span>"
|
||||
to_chat(user, "<span class='warning'>The security of the cabinet is compromised.</span>")
|
||||
return
|
||||
else
|
||||
locked = !locked
|
||||
if(locked)
|
||||
user << "<span class='warning'>Cabinet locked.</span>"
|
||||
to_chat(user, "<span class='warning'>Cabinet locked.</span>")
|
||||
else
|
||||
user << "<span class='notice'>Cabinet unlocked.</span>"
|
||||
to_chat(user, "<span class='notice'>Cabinet unlocked.</span>")
|
||||
return
|
||||
|
||||
update_icon() //Template: fireaxe[has fireaxe][is opened][hits taken][is smashed]. If you want the opening or closing animations, add "opening" or "closing" right after the numbers
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/obj/structure/fitness
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
anchored = 1
|
||||
var/being_used = 0
|
||||
|
||||
/obj/structure/fitness/punchingbag
|
||||
name = "punching bag"
|
||||
desc = "A punching bag."
|
||||
icon_state = "punchingbag"
|
||||
density = 1
|
||||
var/list/hit_message = list("hit", "punch", "kick", "robust")
|
||||
|
||||
/obj/structure/fitness/punchingbag/attack_hand(var/mob/living/carbon/human/user)
|
||||
if(!istype(user))
|
||||
..()
|
||||
return
|
||||
if(user.nutrition < 20)
|
||||
to_chat(user, "<span class='warning'>You need more energy to use the punching bag. Go eat something.</span>")
|
||||
else
|
||||
if(user.a_intent == I_HURT)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
flick("[icon_state]_hit", src)
|
||||
playsound(src.loc, 'sound/effects/woodhit.ogg', 25, 1, -1)
|
||||
user.do_attack_animation(src)
|
||||
user.nutrition = user.nutrition - 5
|
||||
to_chat(user, "<span class='warning'>You [pick(hit_message)] \the [src].</span>")
|
||||
|
||||
/obj/structure/fitness/weightlifter
|
||||
name = "weightlifting machine"
|
||||
desc = "A machine used to lift weights."
|
||||
icon_state = "weightlifter"
|
||||
var/weight = 1
|
||||
var/list/qualifiers = list("with ease", "without any trouble", "with great effort")
|
||||
|
||||
/obj/structure/fitness/weightlifter/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1)
|
||||
weight = ((weight) % qualifiers.len) + 1
|
||||
to_chat(user, "You set the machine's weight level to [weight].")
|
||||
|
||||
/obj/structure/fitness/weightlifter/attack_hand(var/mob/living/carbon/human/user)
|
||||
if(!istype(user))
|
||||
return
|
||||
if(user.loc != src.loc)
|
||||
to_chat(user, "<span class='warning'>You must be on the weight machine to use it.</span>")
|
||||
return
|
||||
if(user.nutrition < 50)
|
||||
to_chat(user, "<span class='warning'>You need more energy to lift weights. Go eat something.</span>")
|
||||
return
|
||||
if(being_used)
|
||||
to_chat(user, "<span class='warning'>The weight machine is already in use by somebody else.</span>")
|
||||
return
|
||||
else
|
||||
being_used = 1
|
||||
playsound(src.loc, 'sound/effects/weightlifter.ogg', 50, 1)
|
||||
user.set_dir(SOUTH)
|
||||
flick("[icon_state]_[weight]", src)
|
||||
if(do_after(user, 20 + (weight * 10)))
|
||||
playsound(src.loc, 'sound/effects/weightdrop.ogg', 25, 1)
|
||||
user.nutrition -= weight * 10
|
||||
to_chat(user, "<span class='notice'>You lift the weights [qualifiers[weight]].</span>")
|
||||
being_used = 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Against your previous judgement, perhaps working out is not for you.</span>")
|
||||
being_used = 0
|
||||
Reference in New Issue
Block a user