This commit is contained in:
jack-fractal
2013-11-17 16:30:42 -05:00
199 changed files with 16877 additions and 14848 deletions

View File

@@ -145,14 +145,14 @@ datum/fusion_reaction/pergium_tritium
energy_production = 0
radiation = 5
datum/fusion_reaction/pergium_deuterium
datum/fusion_reaction/pergium_obdurium
primary_reactant = "Pergium"
secondary_reactant = "Obdurium"
energy_consumption = 5
energy_production = 0
radiation = 5
datum/fusion_reaction/pergium_tritium
datum/fusion_reaction/pergium_solonium
primary_reactant = "Pergium"
secondary_reactant = "Solonium"
energy_consumption = 5

View File

@@ -23,7 +23,8 @@
/datum/medical_effect/proc/cure(mob/living/carbon/human/H)
for(var/R in cures)
if(H.reagents.has_reagent(R))
H <<"\red [cure_message]"
if (cure_message)
H <<"\blue [cure_message]"
return 1
return 0
@@ -39,16 +40,21 @@
M.start = life_tick
return
var/list/L = typesof(/datum/medical_effect)-/datum/medical_effect
for(var/T in L)
var/datum/medical_effect/M = new T
if(M.name == name)
M.strength = strength
M.start = life_tick
side_effects += M
var/T = side_effects[name]
if (!T)
return
var/datum/medical_effect/M = new T
if(M.name == name)
M.strength = strength
M.start = life_tick
side_effects += M
/mob/living/carbon/human/proc/handle_medical_side_effects()
//Going to handle those things only every few ticks.
if(life_tick % 15 != 0)
return 0
var/list/L = typesof(/datum/medical_effect)-/datum/medical_effect
for(var/T in L)
@@ -60,18 +66,14 @@
for (var/datum/medical_effect/M in side_effects)
if (!M) continue
var/strength_percent = sin((life_tick - M.start) / 2)
log_debug ("[src], tick [life_tick] : Processing [M], Current phase: [strength_percent]")
// Only do anything if the effect is currently strong enough
if(strength_percent >= 0.4)
log_debug ("[src], tick [life_tick] : Active phase ; strength [M.strength]")
if (M.cure(src) || M.strength > 50)
log_debug ("[src], tick [life_tick] : [M] cured or reached end of lifecycle")
side_effects -= M
del(M)
M = null
else
if(life_tick % 45 == 0)
log_debug ("[src], tick [life_tick] : Activating [M] ")
M.on_life(src, strength_percent*M.strength)
// Effect slowly growing stronger
M.strength+=0.08
@@ -81,7 +83,7 @@
/datum/medical_effect/headache
name = "Headache"
triggers = list("cryoxadone" = 10, "bicaridine" = 15, "tricordrazine" = 15)
cures = list("alkysine", "tramadol")
cures = list("alkysine", "tramadol", "paracetamol", "oxycodone")
cure_message = "Your head stops throbbing..."
/datum/medical_effect/headache/on_life(mob/living/carbon/human/H, strength)
@@ -92,7 +94,6 @@
H.custom_pain("You feel a throbbing pain in your head!",1)
if(31 to INFINITY)
H.custom_pain("You feel an excrutiating pain in your head!",1)
H.adjustBrainLoss(1)
// BAD STOMACH
// ===========
@@ -110,7 +111,6 @@
H.custom_pain("Your stomach hurts.",0)
if(31 to INFINITY)
H.custom_pain("You feel sick.",1)
H.adjustToxLoss(1)
// CRAMPS
// ======
@@ -129,7 +129,6 @@
if(31 to INFINITY)
H.emote("me",1,"flinches as all the muscles in their body cramp up.")
H.custom_pain("There's pain all over your body.",1)
H.adjustToxLoss(1)
// ITCH
// ====
@@ -148,4 +147,3 @@
if(31 to INFINITY)
H.emote("me",1,"shivers slightly.")
H.custom_pain("This itch makes it really hard to concentrate.",1)
H.adjustToxLoss(1)

View File

@@ -148,7 +148,7 @@
if(!block)
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)
spawn(5)

View File

@@ -65,6 +65,6 @@
P.set_up(10,location)
P.start()
spawn(5)
var/datum/effect/effect/system/harmless_smoke_spread/S = new/datum/effect/effect/system/harmless_smoke_spread()
var/datum/effect/effect/system/smoke_spread/S = new/datum/effect/effect/system/smoke_spread()
S.set_up(5,0,location,null)
S.start()

View File

@@ -1,19 +1,35 @@
var/list/obj/machinery/faxmachine/allfaxes = list()
var/list/alldepartments = list("Central Command")
/obj/machinery/faxmachine
name = "fax machine"
icon = 'icons/obj/library.dmi'
icon_state = "fax"
req_access = list(access_lawyer)
req_one_access = list(access_lawyer, access_heads)
anchored = 1
density = 1
use_power = 1
idle_power_usage = 30
active_power_usage = 200
power_channel = EQUIP
var/obj/item/weapon/card/id/scan = null // identification
var/authenticated = 0
var/obj/item/weapon/paper/tofax = null // what we're sending to central
var/obj/item/weapon/paper/tofax = null // what we're sending
var/sendcooldown = 0 // to avoid spamming fax messages
var/department = "Unknown" // our department
var/dpt = "Central Command" // the department we're sending to
/obj/machinery/faxmachine/New()
..()
allfaxes += src
if( !("[department]" in alldepartments) )
alldepartments += department
/obj/machinery/faxmachine/process()
return 0
@@ -26,7 +42,7 @@
/obj/machinery/faxmachine/attack_hand(mob/user as mob)
user.set_machine(src)
var/dat = "Central Command Fax Machine<BR>"
var/dat = "Fax Machine<BR>"
var/scan_name
if(scan)
@@ -54,14 +70,15 @@
else
dat += "<a href='byond://?src=\ref[src];send=1'>Send</a><br>"
dat += "<b>Currently sending:</b> [tofax.name]"
dat += "<b>Currently sending:</b> [tofax.name]<br>"
dat += "<b>Sending to:</b> <a href='byond://?src=\ref[src];dept=1'>[dpt]</a><br>"
else
if(sendcooldown)
dat += "Please insert paper to send to Central Command via secure connection.<br><br>"
dat += "Please insert paper to send via secure connection.<br><br>"
dat += "<b>Transmitter arrays realigning. Please stand by.</b><br>"
else
dat += "Please insert paper to send to Central Command via secure connection.<br><br>"
dat += "Please insert paper to send via secure connection.<br><br>"
else
dat += "Proper authentication is required to use this device.<br><br>"
@@ -76,10 +93,18 @@
/obj/machinery/faxmachine/Topic(href, href_list)
if(href_list["send"])
if(tofax)
Centcomm_fax(tofax.info, tofax.name, usr)
usr << "Message transmitted."
sendcooldown = 1
spawn(3000) // three minute cooldown. might mess with this number a bit as time goes on
if(dpt == "Central Command")
Centcomm_fax(tofax.info, tofax.name, usr)
sendcooldown = 1800
else
SendFax(tofax.info, tofax.name, usr, dpt)
sendcooldown = 600
usr << "Message transmitted successfully."
spawn(sendcooldown) // cooldown time
sendcooldown = 0
if(href_list["remove"])
@@ -107,6 +132,9 @@
scan = I
authenticated = 0
if(href_list["dept"])
dpt = input(usr, "Which department?", "Choose a department", "") as null|anything in alldepartments
if(href_list["auth"])
if ( (!( authenticated ) && (scan)) )
if (check_access(scan))
@@ -148,3 +176,20 @@
var/msg = "\blue <b><font color='orange'>CENTCOMM FAX: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<a href='?_src_=holder;CentcommFaxReply=\ref[Sender]'>RPLY</a>)</b>: Receiving '[sentname]' via secure connection ... <a href='?_src_=holder;CentcommFaxView=\ref[sent]'>view message</a>"
admins << msg
proc/SendFax(var/sent, var/sentname, var/mob/Sender, var/dpt)
for(var/obj/machinery/faxmachine/F in allfaxes)
if( F.department == dpt )
if(! (F.stat & (BROKEN|NOPOWER) ) )
flick("faxreceive", F)
// give the sprite some time to flick
spawn(20)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( F.loc )
P.name = "[sentname]"
P.info = "[sent]"
P.update_icon()
playsound(F.loc, "sound/items/polaroid1.ogg", 50, 1)