Merge remote-tracking branch 'upstream/master' into disease-controller-bye-bye

This commit is contained in:
Fox-McCloud
2017-07-11 17:13:47 -04:00
174 changed files with 1900 additions and 1726 deletions
-45
View File
@@ -1,45 +0,0 @@
//copy pasta of the space piano, don't hurt me -Pete
/obj/item/device/guitar
name = "guitar"
desc = "It's made of wood and has bronze strings."
icon = 'icons/obj/musician.dmi'
icon_state = "guitar"
item_state = "guitar"
force = 10
burn_state = FLAMMABLE
burntime = 20
var/datum/song/handheld/song
hitsound = 'sound/effects/guitarsmash.ogg'
/obj/item/device/guitar/New()
song = new("guitar", src)
song.instrumentExt = "ogg"
/obj/item/device/guitar/Destroy()
QDEL_NULL(song)
return ..()
/obj/item/device/guitar/attack_self(mob/user as mob)
ui_interact(user)
/obj/item/device/guitar/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!isliving(user) || user.incapacitated())
return
song.ui_interact(user, ui_key, ui, force_open)
/obj/item/device/guitar/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
return song.ui_data(user, ui_key, state)
/obj/item/device/guitar/Topic(href, href_list)
song.Topic(href, href_list)
/datum/crafting_recipe/guitar
name = "Guitar"
result = /obj/item/device/guitar
reqs = list(/obj/item/stack/sheet/wood = 5,
/obj/item/stack/cable_coil = 6,
/obj/item/stack/tape_roll = 5)
tools = list(/obj/item/weapon/screwdriver, /obj/item/weapon/wirecutters)
time = 80
@@ -0,0 +1,103 @@
//copy pasta of the space piano, don't hurt me -Pete
/obj/item/device/instrument
name = "generic instrument"
icon = 'icons/obj/musician.dmi'
burn_state = FLAMMABLE
var/datum/song/handheld/song
var/instrumentId = "generic"
var/instrumentExt = "ogg"
/obj/item/device/instrument/New()
song = new(instrumentId, src)
song.instrumentExt = instrumentExt
..()
/obj/item/device/instrument/Destroy()
QDEL_NULL(song)
return ..()
/obj/item/device/instrument/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] begins to play 'Gloomy Sunday'! It looks like \he's trying to commit suicide!</span>")
return (BRUTELOSS)
/obj/item/device/instrument/initialize(mapload)
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
..()
/obj/item/device/instrument/attack_self(mob/user)
ui_interact(user)
/obj/item/device/instrument/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
if(!isliving(user) || user.incapacitated())
return
song.ui_interact(user, ui_key, ui, force_open)
/obj/item/device/instrument/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
return song.ui_data(user, ui_key, state)
/obj/item/device/instrument/Topic(href, href_list)
song.Topic(href, href_list)
/obj/item/device/instrument/violin
name = "space violin"
desc = "A wooden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
icon_state = "violin"
item_state = "violin"
force = 10
hitsound = "swing_hit"
instrumentId = "violin"
/obj/item/device/instrument/violin/golden
name = "golden violin"
desc = "A golden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
icon_state = "golden_violin"
item_state = "golden_violin"
burn_state = LAVA_PROOF
/obj/item/device/instrument/guitar
name = "guitar"
desc = "It's made of wood and has bronze strings."
icon_state = "guitar"
item_state = "guitar"
force = 10
attack_verb = list("played metal on", "serenaded", "crashed", "smashed")
hitsound = 'sound/effects/guitarsmash.ogg'
instrumentId = "guitar"
/obj/item/device/instrument/eguitar
name = "electric guitar"
desc = "Makes all your shredding needs possible."
icon_state = "eguitar"
item_state = "eguitar"
force = 12
attack_verb = list("played metal on", "shredded", "crashed", "smashed")
hitsound = 'sound/weapons/stringsmash.ogg'
instrumentId = "eguitar"
/datum/crafting_recipe/violin
name = "Violin"
result = /obj/item/device/instrument/violin
reqs = list(/obj/item/stack/sheet/wood = 5,
/obj/item/stack/cable_coil = 6,
/obj/item/stack/tape_roll = 5)
tools = list(/obj/item/weapon/screwdriver, /obj/item/weapon/wirecutters)
time = 80
/datum/crafting_recipe/guitar
name = "Guitar"
result = /obj/item/device/instrument/guitar
reqs = list(/obj/item/stack/sheet/wood = 5,
/obj/item/stack/cable_coil = 6,
/obj/item/stack/tape_roll = 5)
tools = list(/obj/item/weapon/screwdriver, /obj/item/weapon/wirecutters)
time = 80
/datum/crafting_recipe/eguitar
name = "Electric Guitar"
result = /obj/item/device/instrument/eguitar
reqs = list(/obj/item/stack/sheet/metal = 5,
/obj/item/stack/cable_coil = 6,
/obj/item/stack/tape_roll = 5)
tools = list(/obj/item/weapon/screwdriver, /obj/item/weapon/wirecutters)
time = 80
+16 -14
View File
@@ -14,6 +14,7 @@ REAGENT SCANNER
icon_state = "t-ray0"
var/on = 0
slot_flags = SLOT_BELT
w_class = 2
w_class = WEIGHT_CLASS_SMALL
item_state = "electronic"
materials = list(MAT_METAL=150)
@@ -224,20 +225,21 @@ REAGENT SCANNER
for(var/datum/wound/W in e.wounds) if(W.internal)
user.show_message(text("<span class='warning'>Internal bleeding detected. Advanced scanner required for location.</span>"), 1)
break
if(H.vessel)
var/blood_type = H.get_blood_name()
var/blood_volume = round(H.vessel.get_reagent_amount(blood_type))
var/blood_percent = blood_volume / BLOOD_VOLUME_NORMAL
blood_percent *= 100
if(blood_volume <= 500)
user.show_message("<span class='warning'><b>Warning: Blood Level LOW: [blood_percent]% [blood_volume]cl</span>")
else if(blood_volume <= 336)
user.show_message("<span class='warning'><b>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl</span>")
else
user.show_message("<span class='notice'>Blood Level Normal: [blood_percent]% [blood_volume]cl</span>")
if(H.species.exotic_blood)
user.show_message("<span class='warning'>Subject possesses exotic blood.</span>")
user.show_message("<span class='warning'>Exotic blood type: [blood_type].</span>")
var/blood_id = H.get_blood_id()
if(blood_id)
if(H.bleed_rate)
to_chat(user, "<span class='danger'>Subject is bleeding!</span>")
var/blood_percent = round((H.blood_volume / BLOOD_VOLUME_NORMAL)*100)
var/blood_type = H.b_type
if(blood_id != "blood")//special blood substance
blood_type = blood_id
if(H.blood_volume <= BLOOD_VOLUME_SAFE && H.blood_volume > BLOOD_VOLUME_OKAY)
user.show_message("<span class='danger'>LOW blood level [blood_percent] %, [H.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
else if(H.blood_volume <= BLOOD_VOLUME_OKAY)
to_chat(user, "<span class='danger'>CRITICAL blood level [blood_percent] %, [H.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
user.show_message("<span class='warning'>blood type: [blood_type].</span>")
if(H.undergoing_cardiac_arrest() && H.stat != DEAD)
user.show_message("<span class='userdanger'>Subject suffering from heart attack: Apply defibrillator immediately.</span>")
user.show_message("<span class='notice'>Subject's pulse: <font color='[H.pulse == PULSE_THREADY || H.pulse == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font></span>")
-41
View File
@@ -1,41 +0,0 @@
//copy pasta of the space piano, don't hurt me -Pete
/obj/item/device/violin
name = "space violin"
desc = "A wooden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
icon = 'icons/obj/musician.dmi'
icon_state = "violin"
item_state = "violin"
attack_verb = list("strung", "fiddled", "tuned", "pitched")
force = 10
burn_state = FLAMMABLE
burntime = 20
hitsound = 'sound/weapons/smash.ogg'
var/datum/song/handheld/song
/obj/item/device/violin/New()
song = new("violin", src)
song.instrumentExt = "ogg"
/obj/item/device/violin/Destroy()
QDEL_NULL(song)
return ..()
/obj/item/device/violin/initialize()
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
..()
/obj/item/device/violin/attack_self(mob/user as mob)
ui_interact(user)
/obj/item/device/violin/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!isliving(user) || user.incapacitated())
return
song.ui_interact(user, ui_key, ui, force_open)
/obj/item/device/violin/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
return song.ui_data(user, ui_key, state)
/obj/item/device/violin/Topic(href, href_list)
song.Topic(href, href_list)