Merge pull request #738 from Erthilo/master

Adds alternate CMO labcoat, engineering crates need proper access, test code for implant only taser firing, changes to overdose, and more bugfixes
This commit is contained in:
SkyMarshal
2012-03-24 18:04:03 -07:00
23 changed files with 159 additions and 111 deletions
+1 -1
View File
@@ -504,7 +504,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_if_possible(new /obj/item/clothing/under/color/grey(M), M.slot_w_uniform)
M.equip_if_possible(new /obj/item/clothing/suit/space(M), M.slot_wear_suit)
M.equip_if_possible(new /obj/item/clothing/head/helmet/space(M), M.slot_head)
var /obj/item/weapon/tank/jetpack/J = new /obj/item/weapon/tank/jetpack(M)
var /obj/item/weapon/tank/jetpack/oxygen/J = new /obj/item/weapon/tank/jetpack/oxygen(M)
M.equip_if_possible(J, M.slot_back)
J.toggle()
M.equip_if_possible(new /obj/item/clothing/mask/breath(M), M.slot_wear_mask)
+41 -33
View File
@@ -447,8 +447,8 @@ datum
M.slurring = 0
M.confused = 0
M.jitteriness = 0
if(125 to INFINITY)
M:adjustToxLoss(0.1)
// if(125 to INFINITY)
// M:adjustToxLoss(0.1)
..()
return
@@ -876,9 +876,11 @@ datum
data++
M.mutations = 0
M.disabilities = 0
switch(data)
if(100 to INFINITY)
M:adjustToxLoss(0.2)
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
// switch(data)
// if(100 to INFINITY)
// M:adjustToxLoss(0.2)
..()
return
@@ -1186,8 +1188,10 @@ datum
M.bodytemperature = max(310, M.bodytemperature-20)
else if(M.bodytemperature < 311)
M.bodytemperature = min(310, M.bodytemperature+20)
if(data >= 100)
M:adjustToxLoss(0.2)
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
// if(data >= 100)
// M:adjustToxLoss(0.2) //This takes like 5 units now.
..()
return
@@ -1206,8 +1210,10 @@ datum
if(!M.confused) M.confused = 1
M.confused = max(M.confused, 20)
holder.remove_reagent(src.id, 0.2)
if(data >= 50)
M:adjustToxLoss(0.2)
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
// if(data >= 50)
// M:adjustToxLoss(0.2)
..()
return
@@ -1245,8 +1251,8 @@ datum
M:heal_organ_damage(0,1)
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
if(data >= 125)
M:adjustToxLoss(0.1)
// if(data >= 125)
// M:adjustToxLoss(0.1)
..()
return
@@ -1266,8 +1272,8 @@ datum
M:heal_organ_damage(0,3)
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
if(data >= 125)
M:adjustToxLoss(0.2)
// if(data >= 125)
// M:adjustToxLoss(0.2)
..()
return
@@ -1289,8 +1295,8 @@ datum
holder.remove_reagent("lexorin", 2)
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
if(data >= 125)
M:adjustToxLoss(0.2)
// if(data >= 125)
// M:adjustToxLoss(0.2)
..()
return
@@ -1312,8 +1318,8 @@ datum
holder.remove_reagent("lexorin", 2)
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
if(data >= 50)
M:adjustToxLoss(0.2)
// if(data >= 50)
// M:adjustToxLoss(0.2)
..()
return
@@ -1448,8 +1454,8 @@ datum
if(prob(10)) M:emote("drool")
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
if(data >= 50)
M:adjustToxLoss(0.4)
// if(data >= 50)
// M:adjustToxLoss(0.4)
..()
return
@@ -1465,8 +1471,8 @@ datum
M:radiation = max(M:radiation-3,0)
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
if(data >= 50)
M:adjustToxLoss(0.2)
// if(data >= 50)
// M:adjustToxLoss(0.2)
..()
return
@@ -1490,8 +1496,8 @@ datum
..()
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
if(data >= 50)
M:adjustToxLoss(0.3)
// if(data >= 50)
// M:adjustToxLoss(0.3)
return
alkysine
@@ -1526,8 +1532,8 @@ datum
M:disabilities &= ~1
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
if(data >= 100)
M:adjustToxLoss(0.2)
// if(data >= 100)
// M:adjustToxLoss(0.2)
..()
return
@@ -1547,8 +1553,8 @@ datum
M:heal_organ_damage(2,0)
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
if(data >= 125)
M:adjustToxLoss(0.2)
// if(data >= 125)
// M:adjustToxLoss(0.2)
..()
return
@@ -1567,8 +1573,8 @@ datum
holder.remove_reagent(src.id, 0.2)
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
if(data >= 50)
M:adjustToxLoss(0.2)
// if(data >= 50)
// M:adjustToxLoss(0.2)
..()
return
@@ -1621,8 +1627,8 @@ datum
holder.remove_reagent(src.id, 0.1)
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
if(data >= 100)
M:adjustToxLoss(0.1)
// if(data >= 100)
// M:adjustToxLoss(0.1)
return
carpotoxin
@@ -1687,8 +1693,10 @@ datum
if(!data) data = 1
data++
M:hallucination += 5
if(data >= 100)
M:adjustToxLoss(0.1)
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
// if(data >= 100)
// M:adjustToxLoss(0.1)
..()
return
+5
View File
@@ -15,6 +15,11 @@
icon_state = "labcoat_cmo_open"
item_state = "labcoat_cmo"
/obj/item/clothing/suit/storage/labcoat/cmoalt
name = "chief medical officer's labcoat"
desc = "With command blue highlights."
icon_state = "labcoat_cmoalt_open"
/obj/item/clothing/suit/storage/labcoat/mad
name = "The Mad's labcoat"
desc = "It makes you look capable of konking someone on the noggin and shooting them into space."
@@ -176,7 +176,6 @@
throw_speed = 3
throw_range = 3
origin_tech = "materials=4"
perunit = 2000
/obj/item/stack/sheet/gold/New(loc,amount)
..()
@@ -198,7 +197,6 @@
throw_speed = 3
throw_range = 3
origin_tech = "materials=3"
perunit = 2000
/obj/item/stack/sheet/silver/New(loc,amount)
..()
@@ -213,7 +211,6 @@
w_class = 3.0
throw_range = 3
origin_tech = "materials=6"
perunit = 3750
/obj/item/stack/sheet/diamond/New(loc,amount)
..()
@@ -229,7 +226,6 @@
throw_speed = 3
throw_range = 3
origin_tech = "materials=5"
perunit = 2000
/obj/item/stack/sheet/enruranium
name = "Enriched Uranium block"
@@ -240,7 +236,6 @@
throw_speed = 3
throw_range = 3
origin_tech = "materials=5"
perunit = 1000
/obj/item/stack/sheet/plasma
name = "solid plasma"
@@ -251,7 +246,6 @@
throw_speed = 3
throw_range = 3
origin_tech = "plasmatech=2;materials=2"
perunit = 2000
/obj/item/stack/sheet/adamantine
name = "adamantine"
@@ -262,7 +256,6 @@
throw_speed = 3
throw_range = 3
origin_tech = "materials=4"
perunit = 2000
/obj/item/stack/sheet/clown
name = "bananium"
@@ -273,7 +266,6 @@
throw_speed = 3
throw_range = 3
origin_tech = "materials=4"
perunit = 2000
/obj/item/stack/sheet/clown/New(loc,amount)
..()
@@ -116,7 +116,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
dat += "<a href='byond://?src=\ref[src];option=save;new=1;candidate=\ref[candidate]'>Save Personality</a><br>"
dat += "<a href='byond://?src=\ref[src];option=load;new=1;candidate=\ref[candidate]'>Load Personality</a><br>"
M << browse(dat, "window=paiRecruit")
M << browse(dat, "window=paiRecruit;can_close=0;can_minimize=0")
proc/findPAI(var/obj/item/device/paicard/p, var/mob/user)
requestRecruits(user)
@@ -169,7 +169,6 @@ var/datum/paiController/paiController // Global handler for pAI candidates
dat += "</table>"
user << browse(dat, "window=findPai")
proc/requestRecruits(var/mob/origin)
for(var/mob/dead/observer/O in world)
if(jobban_isbanned(O, "pAI"))
+2 -1
View File
@@ -16,7 +16,8 @@
// called by datum/sun/calc_position() as sun's angle changes
proc/set_angle(angle)
proc/set_angle(var/angle)
sun_angle = angle
//set icon dir to show sun illumination
dir = turn(NORTH, -angle - 22.5) // 22.5 deg bias ensures, e.g. 67.5-112.5 is EAST
+8 -1
View File
@@ -9,7 +9,14 @@
cell_type = "/obj/item/weapon/cell/crap"
force = 10
/* special_check(var/mob/living/carbon/human/M)
if(ishuman(M))
for(var/obj/item/weapon/implant/I in M)
if(I.implanted)
if(istype(I,/obj/item/weapon/implant/loyalty))
return 1
M << "\red The gun refuses to fire!"
return 0*/// Can be used to restrict weapon use to implants. - Erthilo
/obj/item/weapon/gun/energy/taser/cyborg/load_into_chamber()//TOOD: change this over to the slowly recharge other cell
if(in_chamber)
+1
View File
@@ -7,6 +7,7 @@
name = "conveyor belt"
desc = "A conveyor belt."
anchored = 1
layer = 2.97
var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off
var/operable = 1 // true if can operate (no broken segments in this belt run)
var/forwards // this is the default (forward) direction, set by the map dir, can be 0
+35 -19
View File
@@ -82,6 +82,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
return_name = "Uranium"
if("diamond")
return_name = "Diamond"
if("adamantine")
return_name = "adamantine"
if("clown")
return_name = "Bananium"
else
@@ -367,6 +369,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
linked_lathe.uranium_amount = max(0, (linked_lathe.uranium_amount-being_built.materials[M]))
if("$diamond")
linked_lathe.diamond_amount = max(0, (linked_lathe.diamond_amount-being_built.materials[M]))
if("$adamantine")
linked_lathe.adamantine_amount = max(0, (linked_lathe.adamantine_amount-being_built.materials[M]))
if("$clown")
linked_lathe.clown_amount = max(0, (linked_lathe.clown_amount-being_built.materials[M]))
else
@@ -457,6 +461,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if("diamond")
type = /obj/item/stack/sheet/diamond
res_amount = "diamond_amount"
if("adamantine")
type = /obj/item/stack/sheet/adamantine
res_amount = "adamantine_amount"
if("clown")
type = /obj/item/stack/sheet/clown
res_amount = "clown_amount"
@@ -468,7 +475,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
linked_lathe.vars[res_amount] = max(0, (linked_lathe.vars[res_amount]-sheet.amount * sheet.perunit))
else
del sheet
else if(href_list["imprinter_ejectsheet"] && linked_imprinter) //Causes the protolathe to eject a sheet of material
else if(href_list["imprinter_ejectsheet"] && linked_imprinter) //Causes the circuit imprinter to eject a sheet of material
var/desired_num_sheets = text2num(href_list["imprinter_ejectsheet_amt"])
var/res_amount, type
switch(href_list["imprinter_ejectsheet"])
@@ -725,6 +732,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(D.materials[M] > linked_lathe.uranium_amount) check_materials = 0
if("$diamond")
if(D.materials[M] > linked_lathe.diamond_amount) check_materials = 0
if("$adamantine")
if(D.materials[M] > linked_lathe.adamantine_amount) check_materials = 0
if("$clown")
if(D.materials[M] > linked_lathe.clown_amount) check_materials = 0
else if (!linked_lathe.reagents.has_reagent(M, D.materials[M]))
@@ -741,23 +750,23 @@ won't update every console in existence) but it's more of a hassle to do. Also,
//Metal
dat += "* [linked_lathe.m_amount] cm<sup>3</sup> of Metal || "
dat += "Eject: "
if(linked_lathe.m_amount > 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.m_amount > 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.m_amount > 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
if(linked_lathe.m_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.m_amount >= 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.m_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Glass
dat += "* [linked_lathe.g_amount] cm<sup>3</sup> of Glass || "
dat += "Eject: "
if(linked_lathe.g_amount > 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.g_amount > 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.g_amount > 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
if(linked_lathe.g_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.g_amount >= 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.g_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Gold
dat += "* [linked_lathe.gold_amount] cm<sup>3</sup> of Gold || "
dat += "Eject: "
if(linked_lathe.gold_amount > 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.gold_amount > 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.gold_amount > 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
if(linked_lathe.gold_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.gold_amount >= 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.gold_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Silver
dat += "* [linked_lathe.silver_amount] cm<sup>3</sup> of Silver || "
@@ -787,6 +796,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(linked_lathe.diamond_amount >= 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.diamond_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Adamantine - Is this even possible to get?
dat += "* [linked_lathe.adamantine_amount] cm<sup>3</sup> of Adamantine || "
dat += "Eject: "
if(linked_lathe.adamantine_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=adamantine;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.adamantine_amount >= 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=adamantine;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.adamantine_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=adamantine;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Bananium
dat += "* [linked_lathe.clown_amount] cm<sup>3</sup> of Bananium || "
dat += "Eject: "
@@ -854,23 +870,23 @@ won't update every console in existence) but it's more of a hassle to do. Also,
//Glass
dat += "* [linked_imprinter.g_amount] cm<sup>3</sup> of Glass || "
dat += "Eject: "
if(linked_imprinter.g_amount > 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_imprinter.g_amount > 18750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_imprinter.g_amount > 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=50'>(Max Sheets)</A>"
if(linked_imprinter.g_amount >= 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_imprinter.g_amount >= 18750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_imprinter.g_amount >= 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Gold
dat += "* [linked_imprinter.gold_amount] cm<sup>3</sup> of Gold || "
dat += "Eject: "
if(linked_imprinter.gold_amount > 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_imprinter.gold_amount > 18750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_imprinter.gold_amount > 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=50'>(Max Sheets)</A>"
if(linked_imprinter.gold_amount >= 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_imprinter.gold_amount >= 18750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_imprinter.gold_amount >= 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Diamond
dat += "* [linked_imprinter.diamond_amount] cm<sup>3</sup> of Diamond || "
dat += "Eject: "
if(linked_imprinter.diamond_amount > 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_imprinter.diamond_amount > 18750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_imprinter.diamond_amount > 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=50'>(Max Sheets)</A>"
if(linked_imprinter.diamond_amount >= 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_imprinter.diamond_amount >= 18750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_imprinter.diamond_amount >= 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=50'>(Max Sheets)</A>"
user << browse("<TITLE>Research and Development Console</TITLE><HR>[dat]", "window=rdconsole;size=575x400")
onclose(user, "rdconsole")