Merge branch 'master' into findnreplace

This commit is contained in:
Mark van Alphen
2017-04-01 23:51:58 +02:00
committed by GitHub
181 changed files with 4952 additions and 4176 deletions
+35 -61
View File
@@ -1,14 +1,10 @@
//moved these here from code/defines/obj/weapon.dm
//please preference put stuff where it's easy to find - C
/obj/item/weapon/autopsy_scanner
name = "autopsy scanner"
desc = "Extracts information on wounds."
icon = 'icons/obj/autopsy_scanner.dmi'
icon_state = ""
flags = CONDUCT
w_class = 1
w_class = WEIGHT_CLASS_TINY
origin_tech = "materials=1;biotech=1"
var/list/datum/autopsy_data_scanner/wdata = list()
var/list/datum/autopsy_data_scanner/chemtraces = list()
@@ -28,28 +24,23 @@
var/hits = 0
var/time_inflicted = 0
proc/copy()
var/datum/autopsy_data/W = new()
W.weapon = weapon
W.pretend_weapon = pretend_weapon
W.damage = damage
W.hits = hits
W.time_inflicted = time_inflicted
return W
/datum/autopsy_data/proc/copy()
var/datum/autopsy_data/W = new()
W.weapon = weapon
W.pretend_weapon = pretend_weapon
W.damage = damage
W.hits = hits
W.time_inflicted = time_inflicted
return W
/obj/item/weapon/autopsy_scanner/proc/add_data(var/obj/item/organ/external/O)
if(!O.autopsy_data.len && !O.trace_chemicals.len) return
/obj/item/weapon/autopsy_scanner/proc/add_data(obj/item/organ/external/O)
if(!O.autopsy_data.len && !O.trace_chemicals.len)
return
for(var/V in O.autopsy_data)
var/datum/autopsy_data/W = O.autopsy_data[V]
if(!W.pretend_weapon)
/*
// the more hits, the more likely it is that we get the right weapon type
if(prob(50 + W.hits * 10 + W.damage))
*/
// Buffing this stuff up for now!
if(1)
W.pretend_weapon = W.weapon
else
@@ -76,10 +67,11 @@
chemtraces += V
/obj/item/weapon/autopsy_scanner/verb/print_data()
set src in view(usr, 1)
set name = "Print Data"
if(usr.stat || !(istype(usr,/mob/living/carbon/human)))
to_chat(usr, "No.")
set category = "Object"
set src in oview(1)
if(usr.incapacitated())
return
var/scan_data = ""
@@ -101,8 +93,10 @@
var/wname = W.pretend_weapon
if(wname in weapon_chances) weapon_chances[wname] += W.damage
else weapon_chances[wname] = max(W.damage, 1)
if(wname in weapon_chances)
weapon_chances[wname] += W.damage
else
weapon_chances[wname] = max(W.damage, 1)
total_score+=W.damage
@@ -126,7 +120,8 @@
if(30 to 1000)
damage_desc = "<font color='red'>severe</font>"
if(!total_score) total_score = D.organs_scanned.len
if(!total_score)
total_score = D.organs_scanned.len
scan_data += "<b>Weapon #[n]</b><br>"
if(damaging_weapon)
@@ -147,9 +142,8 @@
for(var/chemID in chemtraces)
scan_data += chemID
scan_data += "<br>"
for(var/mob/O in viewers(usr))
O.show_message("<span class='warning'>\the [src] rattles and prints out a sheet of paper.</span>", 1)
usr.visible_message("<span class='warning'>[src] rattles and prints out a sheet of paper.</span>")
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
sleep(10)
@@ -159,24 +153,9 @@
P.info = "<tt>[scan_data]</tt>"
P.overlays += "paper_words"
if(istype(usr,/mob/living/carbon))
// place the item in the usr's hand if possible
if(!usr.r_hand)
P.loc = usr
usr.r_hand = P
P.layer = 20
P.plane = HUD_PLANE
else if(!usr.l_hand)
P.loc = usr
usr.l_hand = P
P.layer = 20
P.plane = HUD_PLANE
usr.put_in_hands(P)
if(istype(usr,/mob/living/carbon/human))
usr:update_inv_l_hand()
usr:update_inv_r_hand()
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M, mob/living/carbon/user)
if(!istype(M))
return
@@ -185,23 +164,18 @@
if(target_name != M.name)
target_name = M.name
src.wdata = list()
src.chemtraces = list()
src.timeofdeath = null
to_chat(user, "<span class='warning'>A new patient has been registered.. Purging data for previous patient.</span>")
wdata.Cut()
chemtraces.Cut()
timeofdeath = null
to_chat(user, "<span class='warning'>A new patient has been registered. Purging data for previous patient.</span>")
src.timeofdeath = M.timeofdeath
timeofdeath = M.timeofdeath
var/obj/item/organ/external/S = M.get_organ(user.zone_sel.selecting)
if(!S)
to_chat(usr, "<b>You can't scan this body part.</b>")
to_chat(user, "<span class='warning'>You can't scan this body part.</span>")
return
if(!S.open)
to_chat(usr, "<b>You have to cut the limb open first!</b>")
return
for(var/mob/O in viewers(M))
O.show_message("<span class='warning'>[user.name] scans the wounds on [M.name]'s [S.name] with \the [src.name]</span>", 1)
M.visible_message("<span class='warning'>[user] scans the wounds on [M]'s [S] with [src]</span>")
src.add_data(S)
return 1
add_data(S)
return 1
@@ -315,7 +315,7 @@ var/global/list/default_medbay_channels = list(
actually transmit large mass. Headsets are the only radio devices capable
of sending subspace transmissions to the Communications Satellite.
A headset sends a signal to a subspace listener/reciever elsewhere in space,
A headset sends a signal to a subspace listener/receiver elsewhere in space,
the signal gets processed and logged, and an audible transmission gets sent
to each individual headset.
*/
+3 -3
View File
@@ -253,7 +253,7 @@ REAGENT SCANNER
if(H.gene_stability < 40)
user.show_message("<span class='userdanger'>Subject's genes are quickly breaking down!</span>")
else if(H.gene_stability < 70)
user.show_message("<span class='danger'>Subject's genes are showing signs of spontenous breakdown.</span>")
user.show_message("<span class='danger'>Subject's genes are showing signs of spontaneous breakdown.</span>")
else if(H.gene_stability < 85)
user.show_message("<span class='warning'>Subject's genes are showing minor signs of instability.</span>")
else
@@ -279,7 +279,7 @@ REAGENT SCANNER
else
to_chat(user, "<span class='notice'>You install the upgrade in the [src].</span>")
overlays += "advanced"
playsound(src.loc, usesound, 50, 1)
playsound(loc, W.usesound, 50, 1)
upgraded = 1
qdel(W)
@@ -531,5 +531,5 @@ REAGENT SCANNER
user.show_message("Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]", 1)
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting", 1)
if(T.cores > 1)
user.show_message("Anomalious slime core amount detected", 1)
user.show_message("Anomalous slime core amount detected", 1)
user.show_message("Growth progress: [T.amount_grown]/10", 1)
+5 -5
View File
@@ -175,7 +175,7 @@
heal_burn = 12
//Splits//
//Splints//
/obj/item/stack/medical/splint
@@ -203,14 +203,14 @@
to_chat(user, "<span class='notice'>You remove the splint from [H]'s [limb].</span>")
return
if(M == user)
user.visible_message("<span class='notice'>[user] starts to apply [src] to [H]'s [limb].</span>", \
"<span class='notice'>You start to apply [src] to [H]'s [limb].</span>", \
user.visible_message("<span class='notice'>[user] starts to apply [src] to their [limb].</span>", \
"<span class='notice'>You start to apply [src] to your [limb].</span>", \
"<span class='notice'>You hear something being wrapped.</span>")
if(!do_mob(user, H, self_delay))
return
else
user.visible_message("<span class='green'>[user] applies [src] to their [limb].</span>", \
"<span class='green'>You apply [src] to your [limb].</span>", \
user.visible_message("<span class='green'>[user] applies [src] to [H]'s [limb].</span>", \
"<span class='green'>You apply [src] to [H]'s [limb].</span>", \
"<span class='green'>You hear something being wrapped.</span>")
affecting.status |= ORGAN_SPLINTED
@@ -22,6 +22,7 @@
origin_tech = "materials=1"
var/created_window = /obj/structure/window/basic
var/full_window = /obj/structure/window/full/basic
merge_type = /obj/item/stack/sheet/glass
/obj/item/stack/sheet/glass/fifty
amount = 50
@@ -155,6 +156,7 @@
origin_tech = "materials=2"
var/created_window = /obj/structure/window/reinforced
var/full_window = /obj/structure/window/full/reinforced
merge_type = /obj/item/stack/sheet/rglass
/obj/item/stack/sheet/rglass/cyborg
materials = list()
@@ -22,6 +22,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
new /datum/stack_recipe("barber chair", /obj/structure/stool/bed/chair/barber, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("wheelchair", /obj/structure/stool/bed/chair/wheelchair, 15, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("psychiatrist bed", /obj/structure/stool/psychbed, 5, one_per_turf = 1, on_floor = 1),
null,
new /datum/stack_recipe_list("office chairs",list(
new /datum/stack_recipe("dark office chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1),
@@ -100,6 +101,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
throwforce = 10.0
flags = CONDUCT
origin_tech = "materials=1"
merge_type = /obj/item/stack/sheet/metal
/obj/item/stack/sheet/metal/cyborg
materials = list()
@@ -136,6 +138,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list(
throwforce = 10.0
flags = CONDUCT
origin_tech = "materials=2"
merge_type = /obj/item/stack/sheet/plasteel
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
recipes = plasteel_recipes
@@ -171,6 +174,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list(
icon_state = "sheet-wood"
origin_tech = "materials=1;biotech=1"
burn_state = FLAMMABLE
merge_type = /obj/item/stack/sheet/wood
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
recipes = wood_recipes
@@ -208,6 +212,7 @@ var/global/list/datum/stack_recipe/cloth_recipes = list ( \
burn_state = FLAMMABLE
force = 0
throwforce = 0
merge_type = /obj/item/stack/sheet/cloth
/obj/item/stack/sheet/cloth/New(loc, amount=null)
recipes = cloth_recipes
@@ -240,6 +245,7 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list (
icon_state = "sheet-card"
origin_tech = "materials=1"
burn_state = FLAMMABLE
merge_type = /obj/item/stack/sheet/cardboard
/obj/item/stack/sheet/cardboard/New(var/loc, var/amt = null)
recipes = cardboard_recipes
@@ -265,6 +271,7 @@ var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \
icon_state = "sheet-runed"
icon = 'icons/obj/items.dmi'
sheettype = "runed"
merge_type = /obj/item/stack/sheet/runed_metal
/obj/item/stack/sheet/runed_metal/attack_self(mob/living/user)
if(!iscultist(user))
@@ -320,6 +327,7 @@ var/global/list/datum/stack_recipe/plastic_recipes = list ( \
icon_state = "sheet-plastic"
throwforce = 7
origin_tech = "materials=1;biotech=1"
merge_type = /obj/item/stack/sheet/plastic
/obj/item/stack/sheet/plastic/New()
recipes = plastic_recipes
+4 -1
View File
@@ -14,11 +14,14 @@
var/singular_name
var/amount = 1
var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
var/merge_type = null // This path and its children should merge with this stack, defaults to src.type
/obj/item/stack/New(var/loc, var/amt = null)
..()
if(amt != null) //Allow for stacks with the amount=0
amount = amt
if(!merge_type)
merge_type = type
/obj/item/stack/Destroy()
if(usr && usr.machine == src)
@@ -232,7 +235,7 @@
/obj/item/stack/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, type))
if(istype(W, merge_type))
var/obj/item/stack/S = W
if(S.amount >= max_amount)
return 1
@@ -136,6 +136,7 @@
icon_state = "tile_space"
turf_type = /turf/simulated/floor/fakespace
burn_state = FLAMMABLE
merge_type = /obj/item/stack/tile/fakespace
/obj/item/stack/tile/fakespace/loaded
amount = 30
@@ -148,6 +149,7 @@
icon_state = "tile_noslip"
turf_type = /turf/simulated/floor/noslip
origin_tech = "materials=3"
merge_type = /obj/item/stack/tile/noslip
/obj/item/stack/tile/noslip/loaded
amount = 20
+1
View File
@@ -12,6 +12,7 @@
burn_state = FLAMMABLE
singular_name = "credit"
max_amount = 1000000
merge_type = /obj/item/stack/spacecash
/obj/item/stack/spacecash/New(loc, amt = null)
..()
@@ -22,16 +22,22 @@
if(src.used)
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.flags & NO_DNA)
to_chat(user, "<span class='warning'>You failed to inject [M], as they have no DNA to scramble, nor flesh to inject.</span>")
return
if(M == user)
user.visible_message("<span class='danger'>[user.name] injects \himself with [src]!</span>")
user.visible_message("<span class='danger'>[user] injects \himself with [src]!</span>")
src.injected(user,user)
else
user.visible_message("<span class='danger'>[user.name] is trying to inject [M.name] with [src]!</span>")
user.visible_message("<span class='danger'>[user] is trying to inject [M] with [src]!</span>")
if(do_mob(user,M,30))
user.visible_message("<span class='danger'>[user.name] injects [M.name] with [src].</span>")
user.visible_message("<span class='danger'>[user] injects [M] with [src].</span>")
src.injected(M, user)
else
to_chat(user, "<span class='warning'>You failed to inject [M.name].</span>")
to_chat(user, "<span class='warning'>You failed to inject [M].</span>")
proc/injected(var/mob/living/carbon/target, var/mob/living/carbon/user)
scramble(1, target, 100)
@@ -12,7 +12,7 @@
for(var/mob/living/M in hearers(7, flashbang_turf))
bang(get_turf(M), M)
for(var/obj/effect/blob/B in hear(8,flashbang_turf)) //Blob damage here
for(var/obj/structure/blob/B in hear(8,flashbang_turf)) //Blob damage here
var/damage = round(30/(get_dist(B,get_turf(src))+1))
B.health -= damage
B.update_icon()
@@ -30,7 +30,7 @@
sleep(10)
src.smoke.start()
for(var/obj/effect/blob/B in view(8,src))
for(var/obj/structure/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
B.health -= damage
B.update_icon()
@@ -423,11 +423,15 @@
desc = "A box for containing construction permits, used to officially declare built rooms as additions to the station."
icon_state = "id"
/obj/item/weapon/storage/box/permits/New() //There's only a few, so blueprints are still useful beyond setting every room's name to PRIMARY FART STORAGE
/obj/item/weapon/storage/box/permits/New()
..()
new /obj/item/areaeditor/permit(src)
new /obj/item/areaeditor/permit(src)
new /obj/item/areaeditor/permit(src)
new /obj/item/areaeditor/permit(src)
new /obj/item/areaeditor/permit(src)
new /obj/item/areaeditor/permit(src)
new /obj/item/areaeditor/permit(src)
/obj/item/weapon/storage/box/ids
@@ -301,7 +301,7 @@
if(!Adj|| !istype(target, /turf))
return
if(metal_synthesis_cooldown < 5)
var/obj/effect/effect/foam/F = new /obj/effect/effect/foam(get_turf(target), 1)
var/obj/structure/foam/F = new /obj/structure/foam(get_turf(target), 1)
F.amount = 0
metal_synthesis_cooldown++
spawn(100)