Polaris sync

This commit is contained in:
killer653
2017-11-17 19:27:03 -05:00
73 changed files with 393 additions and 163 deletions
+4 -4
View File
@@ -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)
+42 -12
View File
@@ -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
+35 -19
View File
@@ -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