Merge branch 'master' of https://github.com/PolarisSS13/Polaris into parachute

# Conflicts:
#	icons/obj/storage.dmi
This commit is contained in:
Anewbe
2017-12-07 17:59:13 -06:00
73 changed files with 1038 additions and 171 deletions

View File

@@ -18,7 +18,7 @@
/obj/item/device/flash/proc/clown_check(var/mob/user)
if(user && (CLUMSY in user.mutations) && prob(50))
user << "<span class='warning'>\The [src] slips out of your hand.</span>"
to_chat(user, "<span class='warning'>\The [src] slips out of your hand.</span>")
user.drop_item()
return 0
return 1
@@ -43,7 +43,7 @@
if(prob( round(times_used / 2) )) //if you use it 10 times in a minute it has a 5% chance to break.
broken = 1
if(user)
user << "<span class='warning'>The bulb has burnt out!</span>"
to_chat(user, "<span class='warning'>The bulb has burnt out!</span>")
icon_state = "flashburnt"
return FALSE
else
@@ -51,7 +51,8 @@
return TRUE
else //can only use it 10 times a minute
if(user)
user << "<span class='warning'>*click* *click*</span>"
to_chat(user, "<span class='warning'><i>click</i></span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 80, 1)
return FALSE
//attack_as_weapon
@@ -67,7 +68,7 @@
if(!clown_check(user)) return
if(broken)
user << "<span class='warning'>\The [src] is broken.</span>"
to_chat(user, "<span class='warning'>\The [src] is broken.</span>")
return
flash_recharge()
@@ -204,12 +205,12 @@
..()
if(!broken)
broken = 1
user << "<span class='warning'>The bulb has burnt out!</span>"
to_chat(user, "<span class='warning'>The bulb has burnt out!</span>")
icon_state = "flashburnt"
/obj/item/device/flash/synthetic/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
..()
if(!broken)
broken = 1
user << "<span class='warning'>The bulb has burnt out!</span>"
to_chat(user, "<span class='warning'>The bulb has burnt out!</span>")
icon_state = "flashburnt"

View File

@@ -23,6 +23,13 @@ REAGENT SCANNER
matter = list(DEFAULT_WALL_MATERIAL = 200)
origin_tech = list(TECH_MAGNET = 1, TECH_BIO = 1)
var/mode = 1;
var/advscan = 0
var/showadvscan = 1
/obj/item/device/healthanalyzer/New()
if(advscan >= 1)
verbs += /obj/item/device/healthanalyzer/proc/toggle_adv
..()
/obj/item/device/healthanalyzer/do_surgery(mob/living/M, mob/living/user)
if(user.a_intent != I_HELP) //in case it is ever used as a surgery tool
@@ -39,7 +46,7 @@ REAGENT SCANNER
for(var/mob/O in viewers(M, null))
O.show_message("<span class='warning'>\The [user] has analyzed the floor's vitals!</span>", 1)
user.show_message("<span class='notice'>Analyzing Results for The floor:</span>", 1)
user.show_message("Overall Status: Healthy</span>", 1)
user.show_message("<span class='notice'>Overall Status: Healthy</span>", 1)
user.show_message("<span class='notice'> Damage Specifics: 0-0-0-0</span>", 1)
user.show_message("<span class='notice'>Key: Suffocation/Toxin/Burns/Brute</span>", 1)
user.show_message("<span class='notice'>Body Temperature: ???</span>", 1)
@@ -100,39 +107,72 @@ REAGENT SCANNER
OX = fake_oxy > 50 ? "<span class='warning'>Severe oxygen deprivation detected</span>" : "Subject bloodstream oxygen level normal"
user.show_message("[OX] | [TX] | [BU] | [BR]")
if(M.radiation)
user.show_message("<span class='warning'>Radiation detected.</span>")
if(advscan >= 2 && showadvscan == 1)
if(M.radiation >= 75)
user.show_message("<span class='warning'>Critical levels of radiation detected. Immediate treatment advised.</span>")
else if(M.radiation >= 50)
user.show_message("<span class='warning'>Severe levels of radiation detected.</span>")
else if(M.radiation >= 25)
user.show_message("<span class='warning'>Moderate levels of radiation detected.</span>")
else if(M.radiation >= 1)
user.show_message("<span_class='warning'>Low levels of radiation detected.</span>")
else
user.show_message("<span class='warning'>Radiation detected.</span>")
if(istype(M, /mob/living/carbon))
var/mob/living/carbon/C = M
if(C.reagents.total_volume)
var/unknown = 0
var/reagentdata[0]
var/unknownreagents[0]
for(var/A in C.reagents.reagent_list)
var/datum/reagent/R = A
if(R.scannable)
reagentdata["[R.id]"] = "<span class='notice'> [round(C.reagents.get_reagent_amount(R.id), 1)]u [R.name]</span>"
else
unknown++
unknownreagents["[R.id]"] = "<span class='notice'> [round(C.reagents.get_reagent_amount(R.id), 1)]u [R.name]</span>"
if(reagentdata.len)
user.show_message("<span class='notice'>Beneficial reagents detected in subject's blood:</span>")
for(var/d in reagentdata)
user.show_message(reagentdata[d])
if(unknown)
user.show_message("<span class='warning'>Warning: Unknown substance[(unknown>1)?"s":""] detected in subject's blood.</span>")
if(advscan >= 3 && showadvscan == 1)
user.show_message("<span class='warning'>Warning: Non-medical reagent[(unknown>1)?"s":""] detected in subject's blood:</span>")
for(var/d in unknownreagents)
user.show_message(unknownreagents[d])
else
user.show_message("<span class='warning'>Warning: Unknown substance[(unknown>1)?"s":""] detected in subject's blood.</span>")
if(C.ingested && C.ingested.total_volume)
var/unknown = 0
for(var/datum/reagent/R in C.ingested.reagent_list)
if(R.scannable)
user << "<span class='notice'>[R.name] found in subject's stomach.</span>"
var/stomachreagentdata[0]
var/stomachunknownreagents[0]
for(var/B in C.ingested.reagent_list)
var/datum/reagent/T = B
if(T.scannable)
stomachreagentdata["[T.id]"] = "<span class='notice'> [round(C.ingested.get_reagent_amount(T.id), 1)]u [T.name]</span>"
if (advscan == 0 || showadvscan == 0)
user.show_message("<span class='notice'>[T.name] found in subject's stomach.</span>")
else
++unknown
stomachunknownreagents["[T.id]"] = "<span class='notice'> [round(C.ingested.get_reagent_amount(T.id), 1)]u [T.name]</span>"
if(advscan >= 1 && showadvscan == 1)
user.show_message("<span class='notice'>Beneficial reagents detected in subject's stomach:</span>")
for(var/d in stomachreagentdata)
user.show_message(stomachreagentdata[d])
if(unknown)
user << "<span class='warning'>Non-medical reagent[(unknown > 1)?"s":""] found in subject's stomach.</span>"
if(advscan >= 3 && showadvscan == 1)
user.show_message("<span class='warning'>Warning: Non-medical reagent[(unknown > 1)?"s":""] found in subject's stomach:</span>")
for(var/d in stomachunknownreagents)
user.show_message(stomachunknownreagents[d])
else
user.show_message("<span class='warning'>Unknown substance[(unknown > 1)?"s":""] found in subject's stomach.</span>")
if(C.virus2.len)
for (var/ID in C.virus2)
if (ID in virusDB)
var/datum/data/record/V = virusDB[ID]
user.show_message("<span class='warning'>Warning: Pathogen [V.fields["name"]] detected in subject's blood. Known antigen : [V.fields["antigen"]]</span>")
// user.show_message(text("<span class='warning'>Warning: Unknown pathogen detected in subject's blood.</span>"))
else
user.show_message("<span class='warning'>Warning: Unknown pathogen detected in subject's blood.</span>")
if (M.getCloneLoss())
user.show_message("<span class='warning'>Subject appears to have been imperfectly cloned.</span>")
// if (M.reagents && M.reagents.get_reagent_amount("inaprovaline"))
@@ -145,6 +185,8 @@ REAGENT SCANNER
user.show_message("<span class='warning'>Severe brain damage detected. Subject likely to have a traumatic brain injury.</span>")
else if (M.getBrainLoss() >= 10)
user.show_message("<span class='warning'>Significant brain damage detected. Subject may have had a concussion.</span>")
else if (M.getBrainLoss() >= 1 && advscan >= 2 && showadvscan == 1)
user.show_message("<span class='warning'>Minor brain damage detected.</span>")
if(ishuman(M))
var/mob/living/carbon/human/H = M
for(var/name_i in H.internal_organs_by_name)
@@ -166,21 +208,28 @@ REAGENT SCANNER
var/limb = e.name
if(e.status & ORGAN_BROKEN)
if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!e.splinted))
user << "<span class='warning'>Unsecured fracture in subject [limb]. Splinting recommended for transport.</span>"
to_chat(user, "<span class='warning'>Unsecured fracture in subject [limb]. Splinting recommended for transport.</span>")
if(e.has_infected_wound())
user << "<span class='warning'>Infected wound detected in subject [limb]. Disinfection recommended.</span>"
to_chat(user, "<span class='warning'>Infected wound detected in subject [limb]. Disinfection recommended.</span>")
for(var/name in H.organs_by_name)
var/obj/item/organ/external/e = H.organs_by_name[name]
if(e && e.status & ORGAN_BROKEN)
user.show_message(text("<span class='warning'>Bone fractures detected. Advanced scanner required for location.</span>"), 1)
break
if(advscan >= 1 && showadvscan == 1)
user.show_message(text("<span class='warning'>Bone fractures detected in subject [e.name].</span>"), 1)
else
user.show_message(text("<span class='warning'>Bone fractures detected. Advanced scanner required for location.</span>"), 1)
break
for(var/obj/item/organ/external/e in H.organs)
if(!e)
continue
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(advscan >= 1 && showadvscan == 1)
user.show_message(text("<span class='warning'>Internal bleeding detected in subject [e.name].</span>"), 1)
else
user.show_message(text("<span class='warning'>Internal bleeding detected. Advanced scanner required for location.</span>"), 1)
break
break
if(M:vessel)
var/blood_volume = H.vessel.get_reagent_amount("blood")
@@ -202,10 +251,37 @@ REAGENT SCANNER
mode = !mode
switch (mode)
if(1)
usr << "The scanner now shows specific limb damage."
to_chat(usr, "The scanner now shows specific limb damage.")
if(0)
usr << "The scanner no longer shows limb damage."
to_chat(usr, "The scanner no longer shows limb damage.")
/obj/item/device/healthanalyzer/proc/toggle_adv()
set name = "Toggle Advanced Scan"
set category = "Object"
showadvscan = !showadvscan
switch (showadvscan)
if(1)
to_chat(usr, "The scanner will now perform an advanced analysis.")
if(0)
to_chat(usr, "The scanner will now perform a basic analysis.")
/obj/item/device/healthanalyzer/improved //reports bone fractures, IB, quantity of beneficial reagents in stomach; also regular health analyzer stuff
name = "advanced health analyzer"
desc = "A miracle of medical technology, this handheld scanner can produce an accurate and specific report of a patient's biosigns."
advscan = 1
origin_tech = list(TECH_MAGNET = 5, TECH_BIO = 6)
icon_state = "advhealth"
/obj/item/device/healthanalyzer/advanced //reports all of the above, as well as radiation severity and minor brain damage
name = "advanced health analyzer"
advscan = 2
icon_state = "advhealth"
/obj/item/device/healthanalyzer/enhanced //reports all of the above, as well as name and quantity of nonmed reagents in stomach
name = "phasic health analyzer"
advscan = 3
icon_state = "advhealth"
/obj/item/device/analyzer
name = "analyzer"
@@ -235,7 +311,7 @@ REAGENT SCANNER
if (user.stat)
return
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(usr, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
analyze_gases(src, user)
@@ -274,14 +350,14 @@ REAGENT SCANNER
if (user.stat)
return
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(reagents.total_volume)
var/list/blood_traces = list()
for(var/datum/reagent/R in reagents.reagent_list)
if(R.id != "blood")
reagents.clear_reagents()
user << "<span class='warning'>The sample was contaminated! Please insert another sample</span>"
to_chat(user, "<span class='warning'>The sample was contaminated! Please insert another sample</span>")
return
else
blood_traces = params2list(R.data["trace_chem"])
@@ -292,7 +368,7 @@ REAGENT SCANNER
dat += "[R] ([blood_traces[R]] units) "
else
dat += "[R] "
user << "[dat]"
to_chat(user, "[dat]")
reagents.clear_reagents()
return
@@ -325,7 +401,7 @@ REAGENT SCANNER
if (user.stat)
return
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(!istype(O))
return
@@ -335,9 +411,9 @@ REAGENT SCANNER
if(O.reagents.reagent_list.len > 0)
var/one_percent = O.reagents.total_volume / 100
for (var/datum/reagent/R in O.reagents.reagent_list)
dat += "\n \t <span class='notice'>[R][details ? ": [R.volume / one_percent]%" : ""]"
dat += "\n \t <span class='notice'>[R][details ? ": [R.volume / one_percent]%" : ""]</span>"
if(dat)
user << "<span class='notice'>Chemicals found: [dat]</span>"
to_chat(user, "<span class='notice'>Chemicals found: [dat]</span>")
else
user << "<span class='notice'>No active chemical agents found in [O].</span>"
else

View File

@@ -158,6 +158,29 @@
to_chat(usr, "There's no mounting point for the module!")
return 0
/obj/item/borg/upgrade/advhealth
name = "advanced health analyzer module"
desc = "A carbon dioxide jetpack suitable for low-gravity operations."
icon_state = "cyborg_upgrade3"
item_state = "cyborg_upgrade"
require_module = 1
/obj/item/borg/upgrade/advhealth/action(var/mob/living/silicon/robot/R)
if(..()) return 0
var/obj/item/device/healthanalyzer/advanced/T = locate() in R.module
if(!T)
T = locate() in R.module.contents
if(!T)
T = locate() in R.module.modules
if(!T)
R.module.modules += new/obj/item/device/healthanalyzer/advanced
return 1
if(T)
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
to_chat(usr, "There's no mounting point for the module!")
return 0
/obj/item/borg/upgrade/syndicate/
name = "scrambled equipment module"
desc = "Unlocks new and often deadly module specific items of a robot"

View File

@@ -19,6 +19,7 @@
var/unbreakable = 0 //Doesn't lose health
var/fragile = 0 //Shatters when it dies
var/dulled = 0 //Has gone dull
var/can_dull = 1 //Can it go dull?
var/force_divisor = 0.5
var/thrown_force_divisor = 0.5
var/dulled_divisor = 0.5 //Just drops the damage by half
@@ -92,7 +93,7 @@
if(health<=0)
if(fragile)
shatter(consumed)
else if(!dulled)
else if(!dulled && can_dull)
dull()
/obj/item/weapon/material/proc/shatter(var/consumed)

View File

@@ -85,4 +85,37 @@
thrown_force_divisor = 0.25 // as above
dulled_divisor = 0.75 //Still metal on a long pole
w_class = ITEMSIZE_SMALL
attack_verb = list("slashed", "sliced", "cut", "clawed")
attack_verb = list("slashed", "sliced", "cut", "clawed")
/obj/item/weapon/material/snow/snowball
name = "loose packed snowball"
desc = "A fun snowball. Throw it at your friends!"
icon = 'icons/obj/weapons.dmi'
icon_state = "snowball"
default_material = MAT_SNOW
health = 1
fragile = 1
force_divisor = 0.01
thrown_force_divisor = 0.10
w_class = ITEMSIZE_SMALL
attack_verb = list("mushed", "splatted", "splooshed", "splushed") // Words that totally exist.
/obj/item/weapon/material/snow/snowball/attack_self(mob/user as mob)
if(user.a_intent == I_HURT)
visible_message("[user] has smashed the snowball in their hand!", "You smash the snowball in your hand.")
var/atom/S = new /obj/item/stack/material/snow(user.loc)
del(src)
user.put_in_hands(S)
else
visible_message("[user] starts compacting the snowball.", "You start compacting the snowball.")
if(do_after(user, 2000))
var/atom/S = new /obj/item/weapon/material/snow/snowball/reinforced(user.loc)
del(src)
user.put_in_hands(S)
/obj/item/weapon/material/snow/snowball/reinforced
name = "snowball"
desc = "A well-formed and fun snowball. It looks kind of dangerous."
icon_state = "snowball-reinf"
force_divisor = 0.20
thrown_force_divisor = 0.25

View File

@@ -145,6 +145,7 @@
base_icon = "spearglass"
name = "spear"
desc = "A haphazardly-constructed yet still deadly weapon of ancient design."
description_info = "This weapon can strike from two tiles away, and over certain objects such as tables, or other people."
force = 10
w_class = ITEMSIZE_LARGE
slot_flags = SLOT_BACK
@@ -158,4 +159,6 @@
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
default_material = "glass"
applies_material_colour = 0
fragile = 1 //It's a haphazard thing of glass, wire, and steel
fragile = 1 //It's a haphazard thing of glass, wire, and steel
reach = 2 // Spears are long.
attackspeed = 14

View File

@@ -10,7 +10,9 @@
* Plant Bag
* Sheet Snatcher
* Cash Bag
*
* Chemistry Bag
Food Bag
* -Sayu
*/
@@ -261,3 +263,16 @@
w_class = ITEMSIZE_LARGE
slowdown = 1
can_hold = list(/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/glass/bottle)
// -----------------------------
// Food Bag
// -----------------------------
/obj/item/weapon/storage/bag/food
name = "food bag"
icon = 'icons/obj/storage.dmi'
icon_state = "foodbag"
desc = "A bag for storing foods of all kinds."
max_storage_space = ITEMSIZE_COST_NORMAL * 25
max_w_class = ITEMSIZE_NORMAL
w_class = ITEMSIZE_SMALL
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks,/obj/item/weapon/reagent_containers/food/condiment)

View File

@@ -149,6 +149,7 @@
new /obj/item/weapon/surgical/bonegel(src)
new /obj/item/weapon/surgical/FixOVein(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/device/healthanalyzer/advanced(src)
return
/obj/item/weapon/storage/firstaid/clotting