Merge branch 'bleeding-edge-freeze' into viro

This commit is contained in:
comma
2013-07-09 12:49:23 +04:00
117 changed files with 2329 additions and 2264 deletions
+2 -2
View File
@@ -186,7 +186,7 @@ var/global/floorIsLava = 0
dat += "No notes found."
else
dat += "<table>"
sortList(note_keys)
note_keys = sortList(note_keys)
// Display the notes on the current page
var/number_pages = note_keys.len / PLAYER_NOTES_ENTRIES_PER_PAGE
@@ -210,7 +210,7 @@ var/global/floorIsLava = 0
for(var/index = 1, index <= number_pages, index++)
if(index == page)
dat += "<b>"
dat += "<a href='?src=\ref[src];notes=list;index='[index]'>[index]</a> "
dat += "<a href='?src=\ref[src];notes=list;index=[index]'>[index]</a> "
if(index == page)
dat += "</b>"
+2
View File
@@ -469,6 +469,7 @@
dat += "<tr><td><i>Wizard not found!</i></td></tr>"
dat += "</table>"
/*
if(ticker.mode.ninjas.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Ninjas</B></td><td></td><td></td></tr>"
for(var/datum/mind/ninja in ticker.mode.ninjas)
@@ -480,6 +481,7 @@
else
dat += "<tr><td><i>Ninja not found!</i></td></tr>"
dat += "</table>"
*/
if(ticker.mode.cult.len)
dat += "<br><table cellspacing=5><tr><td><B>Cultists</B></td><td></td></tr>"
+2
View File
@@ -2466,4 +2466,6 @@
switch(href_list["notes"])
if("show")
show_player_info(ckey)
if("list")
PlayerNotesPage(text2num(href_list["index"]))
return
+3 -8
View File
@@ -106,15 +106,10 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins.")
if(admin_number_present <= 0)
if(!admin_number_afk)
send2irc(ckey, "[original_msg] - No admins online")
send2adminirc("ADMINHELP from [key_name(src)]: [original_msg] - !!No admins online!!")
else
send2irc(ckey, "[original_msg] - All admins AFK ([admin_number_afk])")
send2adminirc("ADMINHELP from [key_name(src)]: [original_msg] - !!All admins AFK ([admin_number_afk])!!")
else
send2irc(ckey, original_msg)
send2adminirc("ADMINHELP from [key_name(src)]: [original_msg]")
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
proc/send2irc(msg,msg2)
if(config.useircbot)
shell("python [config.nudge_script_path] [msg] [msg2]")
return
+4 -4
View File
@@ -462,7 +462,8 @@ client/proc/one_click_antag()
candidates.Remove(G)
if(candidates.len)
var/raiders = 4
var/max_raiders = 6
var/raiders = max_raiders
//Spawns vox raiders and equips them.
for (var/obj/effect/landmark/L in world)
if(L.name == "Response Team")
@@ -484,18 +485,17 @@ client/proc/one_click_antag()
new_vox << "\red Don't forget to turn on your nitrogen internals!"
raiders--
if(raiders > 4)
if(raiders > max_raiders)
return 0
else
return 0
return 1
/datum/admins/proc/create_vox_raider(obj/spawn_location, leader_chosen = 0)
var/mob/living/carbon/human/new_vox = new(spawn_location.loc)
new_vox.gender = pick(MALE, FEMALE)
var/datum/preferences/A = new() //Randomize appearance for the raider.
A.randomize_appearance_for(new_vox)
new_vox.h_style = "Short Vox Quills"
new_vox.regenerate_icons()
+11 -4
View File
@@ -1,3 +1,5 @@
var/global/vox_tick = 1
/mob/living/carbon/human/proc/equip_vox_raider()
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(src)
@@ -8,7 +10,7 @@
equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/vox(src), slot_shoes) // REPLACE THESE WITH CODED VOX ALTERNATIVES.
equip_to_slot_or_del(new /obj/item/clothing/gloves/yellow/vox(src), slot_gloves) // AS ABOVE.
switch(rand(1,4)) // Come up with a better way of doing this - ticker of some sort maybe.
switch(vox_tick)
if(1) // Vox raider!
equip_to_slot_or_del(new /obj/item/clothing/suit/space/vox/carapace(src), slot_wear_suit)
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/vox/carapace(src), slot_head)
@@ -41,14 +43,16 @@
W.cell.charge = 500
equip_to_slot_or_del(W, slot_r_hand)
var/obj/item/stack/rods/A = new(src)
A.amount = 20
equip_to_slot_or_del(A, slot_l_hand)
if(4) // Vox medic!
equip_to_slot_or_del(new /obj/item/clothing/suit/space/vox/pressure(src), slot_wear_suit)
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/vox/pressure(src), slot_head)
equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(src), slot_belt) // Who needs actual surgical tools?
equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health(src), slot_glasses) // REPLACE WITH CODED VOX ALTERNATIVE.
equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray(src), slot_l_store)
equip_to_slot_or_del(new /obj/item/weapon/circular_saw(src), slot_l_hand)
equip_to_slot_or_del(new /obj/item/weapon/circular_saw(src), slot_l_store)
equip_to_slot_or_del(new /obj/item/weapon/gun/dartgun/vox/medical, slot_r_hand)
equip_to_slot_or_del(new /obj/item/clothing/mask/breath/vox(src), slot_wear_mask)
@@ -63,4 +67,7 @@
W.registered_name = real_name
equip_to_slot_or_del(W, slot_wear_id)
vox_tick++
if (vox_tick > 4) vox_tick = 1
return 1
+8 -2
View File
@@ -46,11 +46,15 @@
if(!M.client) return
var/client/C = M.client
var/image/holder
for(var/mob/living/carbon/human/patient in view(M))
for(var/mob/living/carbon/human/patient in view(get_turf(M)))
if(M.see_invisible < patient.invisibility)
continue
var/foundVirus = 0
for(var/datum/disease/D in patient.viruses)
if(!D.hidden[SCANNER])
foundVirus++
if(patient.virus2)
foundVirus++
if(!C) continue
holder = patient.hud_list[HEALTH_HUD]
@@ -90,7 +94,9 @@
if(!M.client) return
var/client/C = M.client
var/image/holder
for(var/mob/living/carbon/human/perp in view(M))
for(var/mob/living/carbon/human/perp in view(get_turf(M)))
if(M.see_invisible < perp.invisibility)
continue
if(!C) continue
var/perpname = perp.name
holder = perp.hud_list[ID_HUD]
+19
View File
@@ -791,6 +791,25 @@
flags = FPRINT|TABLEPASS
w_class = 1
slot_flags = SLOT_MASK
var/obj/item/held //Item inside locket.
/obj/item/clothing/tie/fluff/konaa_hirano/attack_self(mob/user as mob)
if(held)
user << "You open [src] and [held] falls out."
held.loc = get_turf(user)
src.held = null
/obj/item/clothing/tie/fluff/konaa_hirano/attackby(var/obj/item/O as obj, mob/user as mob)
if(istype(O,/obj/item/weapon/paper))
if(held)
usr << "[src] already has something inside it."
else
usr << "You slip [O] into [src]."
user.drop_item()
O.loc = src
src.held = O
return
..()
////// Medallion - Nasir Khayyam - Jamini
+1 -1
View File
@@ -21,7 +21,7 @@
/datum/event/alien_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
+14
View File
@@ -0,0 +1,14 @@
/proc/send2irc(var/channel, var/msg)
if(config.use_irc_bot)
ext_python("ircbot_message.py", "[channel] [msg]")
return
/proc/send2mainirc(var/msg)
if(config.use_irc_bot && config.main_irc)
ext_python("ircbot_message.py", "[config.main_irc] [msg]")
return
/proc/send2adminirc(var/msg)
if(config.use_irc_bot && config.admin_irc)
ext_python("ircbot_message.py", "[config.admin_irc] [msg]")
return
+9
View File
@@ -0,0 +1,9 @@
/proc/ext_python(var/script, var/args, var/scriptsprefix = 1)
if(scriptsprefix) script = "scripts/" + script
if(world.system_type == MS_WINDOWS)
script = replacetext(script, "/", "\\")
var/command = config.python_path + " " + script + " " + args
return shell(command)
+3
View File
@@ -86,6 +86,9 @@ proc/move_mining_shuttle()
for(var/mob/living/carbon/bug in toArea) // If someone somehow is still in the shuttle's docking area...
bug.gib()
for(var/mob/living/simple_animal/pest in toArea) // And for the other kind of bug...
pest.gib()
fromArea.move_contents_to(toArea)
if (mining_shuttle_location)
mining_shuttle_location = 0
+23 -1
View File
@@ -455,4 +455,26 @@
<BR>"}
user << browse(dat, text("window=mob[];size=325x500", name))
onclose(user, "mob[name]")
return
return
//generates realistic-ish pulse output based on preset levels
/mob/living/carbon/proc/get_pulse(var/method) //method 0 is for hands, 1 is for machines, more accurate
var/temp = 0 //see setup.dm:694
switch(src.pulse)
if(PULSE_NONE)
return "0"
if(PULSE_SLOW)
temp = rand(40, 60)
return num2text(method ? temp : temp + rand(-10, 10))
if(PULSE_NORM)
temp = rand(60, 90)
return num2text(method ? temp : temp + rand(-10, 10))
if(PULSE_FAST)
temp = rand(90, 120)
return num2text(method ? temp : temp + rand(-10, 10))
if(PULSE_2FAST)
temp = rand(120, 160)
return num2text(method ? temp : temp + rand(-10, 10))
if(PULSE_THREADY)
return method ? ">250" : "extremely weak and fast, patient's artery feels like a thread"
// output for machines^ ^^^^^^^output for people^^^^^^^^^
@@ -18,4 +18,6 @@
//Surgery info
var/datum/surgery_status/op_stage = new/datum/surgery_status
//Active emote/pose
var/pose = null
var/pose = null
var/pulse = PULSE_NORM //current pulse level
+65 -58
View File
@@ -209,19 +209,13 @@
spawn(15)
usr << "\blue [t_He] has a pulse!"
if (src.stat == 2 || (status_flags & FAKEDEATH))
if(distance <= 1)
if(istype(usr, /mob/living/carbon/human) && usr.stat == 0)
for(var/mob/O in viewers(usr.loc, null))
O.show_message("[usr] checks [src]'s pulse.", 1)
if(distance <= 1)
if(istype(usr, /mob/living/carbon/human) && usr.stat == 0)
spawn(15)
var/foundghost = 0
if(src.client)
foundghost = 1
if(!foundghost)
usr << "<span class='deadsay'>[t_He] has no pulse and [t_his] soul has departed...</span>"
if(pulse == PULSE_NONE)
usr << "<span class='deadsay'>[t_He] has no pulse[src.client ? "" : " and [t_his] soul has departed"]...</span>"
else
usr << "<span class='deadsay'>[t_He] has no pulse...</span>"
usr << "<span class='deadsay'>[t_He] has a pulse!</span>"
msg += "<span class='warning'>"
@@ -387,60 +381,50 @@
msg += "[t_He] [t_is] repulsively uncanny!\n"
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
if(usr.stat || H != usr) //|| !usr.canmove || usr.restrained()) Fluff: Sechuds have eye-tracking technology and sets 'arrest' to people that the wearer looks and blinks at.
return //Non-fluff: This allows sec to set people to arrest as they get disarmed or beaten
if(hasHUD(usr,"security"))
var/perpname = "wot"
var/criminal = "None"
var/perpname = "wot"
var/criminal = "None"
if(wear_id)
var/obj/item/weapon/card/id/I = wear_id.GetID()
if(I)
perpname = I.registered_name
else
perpname = name
if(wear_id)
var/obj/item/weapon/card/id/I = wear_id.GetID()
if(I)
perpname = I.registered_name
else
perpname = name
else
perpname = name
if(perpname)
for (var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if(R.fields["id"] == E.fields["id"])
criminal = R.fields["criminal"]
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
msg += "<span class = 'deptradio'>Security records:</span> <a href='?src=\ref[src];secrecord=`'>\[View\]</a> <a href='?src=\ref[src];secrecordadd=`'>\[Add comment\]</a>\n"
//msg += "\[Set Hostile Identification\]\n"
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
var/perpname = "wot"
var/medical = "None"
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
if(perpname)
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.general)
if (R.fields["id"] == E.fields["id"])
medical = R.fields["p_stat"]
if(E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if(R.fields["id"] == E.fields["id"])
criminal = R.fields["criminal"]
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
msg += "<span class = 'deptradio'>Security records:</span> <a href='?src=\ref[src];secrecord=`'>\[View\]</a> <a href='?src=\ref[src];secrecordadd=`'>\[Add comment\]</a>\n"
msg += "<span class = 'deptradio'>Physical status:</span> <a href='?src=\ref[src];medical=1'>\[[medical]\]</a>\n"
msg += "<span class = 'deptradio'>Medical records:</span> <a href='?src=\ref[src];medrecord=`'>\[View\]</a> <a href='?src=\ref[src];medrecordadd=`'>\[Add comment\]</a>\n"
if(hasHUD(usr,"medical"))
var/perpname = "wot"
var/medical = "None"
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.general)
if (R.fields["id"] == E.fields["id"])
medical = R.fields["p_stat"]
msg += "<span class = 'deptradio'>Physical status:</span> <a href='?src=\ref[src];medical=1'>\[[medical]\]</a>\n"
msg += "<span class = 'deptradio'>Medical records:</span> <a href='?src=\ref[src];medrecord=`'>\[View\]</a> <a href='?src=\ref[src];medrecordadd=`'>\[Add comment\]</a>\n"
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
@@ -452,3 +436,26 @@
msg += "\n[t_He] is [pose]"
usr << msg
//Helper procedure. Called by /mob/living/carbon/human/examine() and /mob/living/carbon/human/Topic() to determine HUD access to security and medical records.
/proc/hasHUD(mob/M as mob, hudtype)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
switch(hudtype)
if("security")
return istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud)
if("medical")
return istype(H.glasses, /obj/item/clothing/glasses/hud/health)
else
return 0
else if(istype(M, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = M
switch(hudtype)
if("security")
return istype(R.module_state_1, /obj/item/borg/sight/hud/sec) || istype(R.module_state_2, /obj/item/borg/sight/hud/sec) || istype(R.module_state_3, /obj/item/borg/sight/hud/sec)
if("medical")
return istype(R.module_state_1, /obj/item/borg/sight/hud/med) || istype(R.module_state_2, /obj/item/borg/sight/hud/med) || istype(R.module_state_3, /obj/item/borg/sight/hud/med)
else
return 0
else
return 0
+272 -247
View File
@@ -499,267 +499,258 @@
return
if (href_list["criminal"])
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
if(hasHUD(usr,"security"))
/* // Uncomment if you want sechuds to need security access
var/allowed_access = 0
if(H.wear_id)
var/list/access = H.wear_id.GetAccess()
if(access_security in access)
allowed_access = 1
return
if(!allowed_access)
H << "<span class='warning'>ERROR: Invalid Access</span>"
return
*/
var/modified = 0
var/perpname = "wot"
if(wear_id)
var/obj/item/weapon/card/id/I = wear_id.GetID()
if(I)
perpname = I.registered_name
else
perpname = name
var/modified = 0
var/perpname = "wot"
if(wear_id)
var/obj/item/weapon/card/id/I = wear_id.GetID()
if(I)
perpname = I.registered_name
else
perpname = name
else
perpname = name
if(perpname)
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
if(setcriminal != "Cancel")
R.fields["criminal"] = setcriminal
modified = 1
spawn()
H.handle_regular_hud_updates()
if(!modified)
usr << "\red Unable to locate a data core entry for this person."
if (href_list["secrecord"])
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
var/perpname = "wot"
var/read = 0
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
if(perpname)
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
usr << "<b>Name:</b> [R.fields["name"]] <b>Criminal Status:</b> [R.fields["criminal"]]"
usr << "<b>Minor Crimes:</b> [R.fields["mi_crim"]]"
usr << "<b>Details:</b> [R.fields["mi_crim_d"]]"
usr << "<b>Major Crimes:</b> [R.fields["ma_crim"]]"
usr << "<b>Details:</b> [R.fields["ma_crim_d"]]"
usr << "<b>Notes:</b> [R.fields["notes"]]"
usr << "<a href='?src=\ref[src];secrecordComment=`'>\[View Comment Log\]</a>"
read = 1
if(!read)
usr << "\red Unable to locate a data core entry for this person."
var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
if (href_list["secrecordComment"])
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
var/perpname = "wot"
var/read = 0
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
read = 1
var/counter = 1
while(R.fields[text("com_[]", counter)])
usr << text("[]", R.fields[text("com_[]", counter)])
counter++
if (counter == 1)
usr << "No comment found"
usr << "<a href='?src=\ref[src];secrecordadd=`'>\[Add comment\]</a>"
if(!read)
usr << "\red Unable to locate a data core entry for this person."
if (href_list["secrecordadd"])
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
var/perpname = "wot"
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
var/t1 = copytext(sanitize(input("Add Comment:", "Sec. records", null, null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || src.stat || src.restrained() || !(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))))
return
var/counter = 1
while(R.fields[text("com_[]", counter)])
counter++
R.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2053<BR>[]",H.get_authentification_name(), H.get_assignment(), time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1)
if (href_list["medical"])
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
var/perpname = "wot"
var/modified = 0
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.general)
if (R.fields["id"] == E.fields["id"])
var/setmedical = input(usr, "Specify a new medical status for this person.", "Medical HUD", R.fields["p_stat"]) in list("*Deceased*", "*Unconscious*", "Physically Unfit", "Active", "Cancel")
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
if(setmedical != "Cancel")
R.fields["p_stat"] = setmedical
if(hasHUD(usr, "security"))
if(setcriminal != "Cancel")
R.fields["criminal"] = setcriminal
modified = 1
spawn()
H.handle_regular_hud_updates()
if(istype(usr,/mob/living/carbon/human))
var/mob/living/carbon/human/U = usr
U.handle_regular_hud_updates()
if(istype(usr,/mob/living/silicon/robot))
var/mob/living/silicon/robot/U = usr
U.handle_regular_hud_updates()
if(!modified)
usr << "\red Unable to locate a data core entry for this person."
if(!modified)
usr << "\red Unable to locate a data core entry for this person."
if (href_list["secrecord"])
if(hasHUD(usr,"security"))
var/perpname = "wot"
var/read = 0
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"security"))
usr << "<b>Name:</b> [R.fields["name"]] <b>Criminal Status:</b> [R.fields["criminal"]]"
usr << "<b>Minor Crimes:</b> [R.fields["mi_crim"]]"
usr << "<b>Details:</b> [R.fields["mi_crim_d"]]"
usr << "<b>Major Crimes:</b> [R.fields["ma_crim"]]"
usr << "<b>Details:</b> [R.fields["ma_crim_d"]]"
usr << "<b>Notes:</b> [R.fields["notes"]]"
usr << "<a href='?src=\ref[src];secrecordComment=`'>\[View Comment Log\]</a>"
read = 1
if(!read)
usr << "\red Unable to locate a data core entry for this person."
if (href_list["secrecordComment"])
if(hasHUD(usr,"security"))
var/perpname = "wot"
var/read = 0
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"security"))
read = 1
var/counter = 1
while(R.fields[text("com_[]", counter)])
usr << text("[]", R.fields[text("com_[]", counter)])
counter++
if (counter == 1)
usr << "No comment found"
usr << "<a href='?src=\ref[src];secrecordadd=`'>\[Add comment\]</a>"
if(!read)
usr << "\red Unable to locate a data core entry for this person."
if (href_list["secrecordadd"])
if(hasHUD(usr,"security"))
var/perpname = "wot"
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"security"))
var/t1 = copytext(sanitize(input("Add Comment:", "Sec. records", null, null) as message),1,MAX_MESSAGE_LEN)
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"security")) )
return
var/counter = 1
while(R.fields[text("com_[]", counter)])
counter++
if(istype(usr,/mob/living/carbon/human))
var/mob/living/carbon/human/U = usr
R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], 2557<BR>[t1]")
if(istype(usr,/mob/living/silicon/robot))
var/mob/living/silicon/robot/U = usr
R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], 2557<BR>[t1]")
if (href_list["medical"])
if(hasHUD(usr,"medical"))
var/perpname = "wot"
var/modified = 0
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.general)
if (R.fields["id"] == E.fields["id"])
var/setmedical = input(usr, "Specify a new medical status for this person.", "Medical HUD", R.fields["p_stat"]) in list("*Deceased*", "*Unconscious*", "Physically Unfit", "Active", "Cancel")
if(hasHUD(usr,"medical"))
if(setmedical != "Cancel")
R.fields["p_stat"] = setmedical
modified = 1
spawn()
if(istype(usr,/mob/living/carbon/human))
var/mob/living/carbon/human/U = usr
U.handle_regular_hud_updates()
if(istype(usr,/mob/living/silicon/robot))
var/mob/living/silicon/robot/U = usr
U.handle_regular_hud_updates()
if(!modified)
usr << "\red Unable to locate a data core entry for this person."
if (href_list["medrecord"])
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
var/perpname = "wot"
var/read = 0
if(hasHUD(usr,"medical"))
var/perpname = "wot"
var/read = 0
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.medical)
if (R.fields["id"] == E.fields["id"])
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
usr << "<b>Name:</b> [R.fields["name"]] <b>Blood Type:</b> [R.fields["b_type"]]"
usr << "<b>DNA:</b> [R.fields["b_dna"]]"
usr << "<b>Minor Disabilities:</b> [R.fields["mi_dis"]]"
usr << "<b>Details:</b> [R.fields["mi_dis_d"]]"
usr << "<b>Major Disabilities:</b> [R.fields["ma_dis"]]"
usr << "<b>Details:</b> [R.fields["ma_dis_d"]]"
usr << "<b>Notes:</b> [R.fields["notes"]]"
usr << "<a href='?src=\ref[src];medrecordComment=`'>\[View Comment Log\]</a>"
read = 1
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.medical)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"medical"))
usr << "<b>Name:</b> [R.fields["name"]] <b>Blood Type:</b> [R.fields["b_type"]]"
usr << "<b>DNA:</b> [R.fields["b_dna"]]"
usr << "<b>Minor Disabilities:</b> [R.fields["mi_dis"]]"
usr << "<b>Details:</b> [R.fields["mi_dis_d"]]"
usr << "<b>Major Disabilities:</b> [R.fields["ma_dis"]]"
usr << "<b>Details:</b> [R.fields["ma_dis_d"]]"
usr << "<b>Notes:</b> [R.fields["notes"]]"
usr << "<a href='?src=\ref[src];medrecordComment=`'>\[View Comment Log\]</a>"
read = 1
if(!read)
usr << "\red Unable to locate a data core entry for this person."
if(!read)
usr << "\red Unable to locate a data core entry for this person."
if (href_list["medrecordComment"])
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
var/perpname = "wot"
var/read = 0
if(hasHUD(usr,"medical"))
var/perpname = "wot"
var/read = 0
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.medical)
if (R.fields["id"] == E.fields["id"])
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
read = 1
var/counter = 1
while(R.fields[text("com_[]", counter)])
usr << text("[]", R.fields[text("com_[]", counter)])
counter++
if (counter == 1)
usr << "No comment found"
usr << "<a href='?src=\ref[src];medrecordadd=`'>\[Add comment\]</a>"
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.medical)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"medical"))
read = 1
var/counter = 1
while(R.fields[text("com_[]", counter)])
usr << text("[]", R.fields[text("com_[]", counter)])
counter++
if (counter == 1)
usr << "No comment found"
usr << "<a href='?src=\ref[src];medrecordadd=`'>\[Add comment\]</a>"
if(!read)
usr << "\red Unable to locate a data core entry for this person."
if(!read)
usr << "\red Unable to locate a data core entry for this person."
if (href_list["medrecordadd"])
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
var/perpname = "wot"
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.medical)
if (R.fields["id"] == E.fields["id"])
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
var/t1 = copytext(sanitize(input("Add Comment:", "Med. records", null, null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || src.stat || src.restrained() || !(istype(H.glasses, /obj/item/clothing/glasses/hud/health))))
return
var/counter = 1
while(R.fields[text("com_[]", counter)])
counter++
R.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2053<BR>[]",H.get_authentification_name(), H.get_assignment(), time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1)
if(hasHUD(usr,"medical"))
var/perpname = "wot"
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.medical)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"medical"))
var/t1 = copytext(sanitize(input("Add Comment:", "Med. records", null, null) as message),1,MAX_MESSAGE_LEN)
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"medical")) )
return
var/counter = 1
while(R.fields[text("com_[]", counter)])
counter++
if(istype(usr,/mob/living/carbon/human))
var/mob/living/carbon/human/U = usr
R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], 2557<BR>[t1]")
if(istype(usr,/mob/living/silicon/robot))
var/mob/living/silicon/robot/U = usr
R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], 2557<BR>[t1]")
..()
return
@@ -1166,21 +1157,22 @@ mob/living/carbon/human/yank_out_object()
if(O == selection)
affected = organ
if(self)
src << "<span class='warning'>You attempt to get a good grip on the [selection] in your [affected] with bloody fingers.</span>"
src << "<span class='warning'>You attempt to get a good grip on the [selection] in your [affected.display_name] with bloody fingers.</span>"
else
U << "<span class='warning'>You attempt to get a good grip on the [selection] in [S]'s [affected] with bloody fingers.</span>"
U << "<span class='warning'>You attempt to get a good grip on the [selection] in [S]'s [affected.display_name] with bloody fingers.</span>"
if(istype(U,/mob/living/carbon/human/)) U.bloody_hands(S)
if(!do_after(U, 80))
return
if(!selection || !affected || !S || !U)
return
if(!selection || !affected || !S || !U)
return
if(self)
visible_message("<span class='warning'><b>[src] rips [selection] out of their [affected] in a welter of blood.</b></span>","<span class='warning'><b>You rip [selection] out of your [affected] in a welter of blood.</b></span>")
visible_message("<span class='warning'><b>[src] rips [selection] out of their [affected.display_name] in a welter of blood.</b></span>","<span class='warning'><b>You rip [selection] out of your [affected] in a welter of blood.</b></span>")
else
visible_message("<span class='warning'><b>[usr] rips [selection] out of [src]'s [affected] in a welter of blood.</b></span>","<span class='warning'><b>[src] rips [selection] out of your [affected] in a welter of blood.</b></span>")
visible_message("<span class='warning'><b>[usr] rips [selection] out of [src]'s [affected.display_name] in a welter of blood.</b></span>","<span class='warning'><b>[usr] rips [selection] out of your [affected] in a welter of blood.</b></span>")
selection.loc = get_turf(src)
affected.implants -= selection
@@ -1217,13 +1209,46 @@ mob/living/carbon/human/yank_out_object()
var/msg = null
switch(rand(1,3))
if(1)
msg ="<span class='warning'>A spike of pain jolts your [organ] as you bump [O] inside.</span>"
msg ="<span class='warning'>A spike of pain jolts your [organ.display_name] as you bump [O] inside.</span>"
if(2)
msg ="<span class='warning'>Your movement jostles [O] in your [organ] painfully.</span>"
msg ="<span class='warning'>Your movement jostles [O] in your [organ.display_name] painfully.</span>"
if(3)
msg ="<span class='warning'>[O] in your [organ] twists painfully as you move.</span>"
msg ="<span class='warning'>[O] in your [organ.display_name] twists painfully as you move.</span>"
src << msg
organ.status |= ORGAN_BLEEDING
organ.take_damage(rand(1,3), 0, 0)
src.adjustToxLoss(rand(1,3))
src.adjustToxLoss(rand(1,3))
/mob/living/carbon/human/verb/check_pulse()
set category = "Object"
set name = "Check pulse"
set desc = "Approximately count somebody's pulse. Requires you to stand still at least 6 seconds."
set src in view(1)
var/self = 0
if(usr.stat == 1 || usr.restrained() || !isliving(usr)) return
if(usr == src)
self = 1
if(!self)
usr.visible_message("\blue [usr] kneels down, puts \his hand on [src]'s wrist and begins counting their pulse.",\
"You begin counting [src]'s pulse")
else
usr.visible_message("\blue [usr] begins counting their pulse.",\
"You begin counting your pulse.")
if(src.pulse)
usr << "\blue [self ? "You have a" : "[src] has a"] pulse! Counting..."
else
usr << "\red [src] has no pulse!" //it is REALLY UNLIKELY that a dead person would check his own pulse
return
usr << "Don't move until counting is finished."
var/time = world.timeofday
sleep(60)
if(usr.l_move_time >= time) //checks if our mob has moved during the sleep()
usr << "You moved while counting. Try again."
else
usr << "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)]."
@@ -113,6 +113,8 @@
handle_regular_hud_updates()
pulse = handle_pulse()
// Grabbing
for(var/obj/item/weapon/grab/G in src)
G.process()
@@ -1430,5 +1432,34 @@
if (shock_stage > 80)
Paralyse(rand(15,28))
proc/handle_pulse()
if(life_tick % 5) return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
if(stat == DEAD)
return PULSE_NONE //that's it, you're dead, nothing can influence your pulse
var/temp = PULSE_NORM
if(round(vessel.get_reagent_amount("blood")) <= BLOOD_VOLUME_BAD) //how much blood do we have
temp = PULSE_THREADY //not enough :(
if(status_flags & FAKEDEATH)
temp = PULSE_NONE //pretend that we're dead. unlike actual death, can be inflienced by meds
for(var/datum/reagent/R in reagents.reagent_list)
if(R.id in bradycardics)
if(temp <= PULSE_THREADY && temp >= PULSE_NORM)
temp--
break //one reagent is enough
//comment out the breaks to make med effects stack
for(var/datum/reagent/R in reagents.reagent_list) //handles different chems' influence on pulse
if(R.id in tachycardics)
if(temp <= PULSE_FAST && temp >= PULSE_NONE)
temp++
break
return temp
#undef HUMAN_MAX_OXYLOSS
#undef HUMAN_CRIT_MAX_OXYLOSS
@@ -143,14 +143,11 @@ Please contact me on #coderbus IRC. ~Carn x
overlays += I
else
var/stealth = 0
if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja) && wear_suit:s_active)
stealth = 1
else
//cloaking devices. //TODO: get rid of this :<
for(var/obj/item/weapon/cloaking_device/S in list(l_hand,r_hand,belt,l_store,r_store))
if(S.active)
stealth = 1
break
//cloaking devices. //TODO: get rid of this :<
for(var/obj/item/weapon/cloaking_device/S in list(l_hand,r_hand,belt,l_store,r_store))
if(S.active)
stealth = 1
break
if(stealth)
icon = 'icons/mob/human.dmi'
icon_state = "body_cloaked"
@@ -725,7 +722,7 @@ proc/get_damage_icon_part(damage_state, body_part)
/mob/living/carbon/human/update_inv_wear_mask(var/update_icons=1)
if( wear_mask && istype(wear_mask, /obj/item/clothing/mask) )
if( wear_mask && ( istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/tie) ) )
wear_mask.screen_loc = ui_mask //TODO
var/image/lying = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]2")
var/image/standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]")
+43 -51
View File
@@ -31,6 +31,8 @@ var/list/ai_list = list()
var/icon/holo_icon//Default is assigned when AI is created.
var/obj/item/device/pda/ai/aiPDA = null
var/obj/item/device/multitool/aiMulti = null
var/custom_sprite = 0 //For our custom sprites
//Hud stuff
//MALFUNCTION
var/datum/AI_Module/module_picker/malf_picker
@@ -125,55 +127,45 @@ var/list/ai_list = list()
set name = "Set AI Core Display"
if(stat || aiRestorePowerRoutine)
return
if(!custom_sprite) //Check to see if custom sprite time, checking the appopriate file to change a var
var/file = file2text("config/custom_sprites.txt")
var/lines = text2list(file, "\n")
for(var/line in lines)
// split & clean up
var/list/Entry = text2list(line, "-")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
if(Entry.len < 2)
continue;
if(Entry[1] == src.ckey && Entry[2] == src.real_name)
custom_sprite = 1 //They're in the list? Custom sprite time
icon = 'icons/mob/custom-synthetic.dmi'
//if(icon_state == initial(icon_state))
var/icontype = ""
var/list/icons = list("Monochrome", "Blue", "Inverted", "Text", "Smiley", "Angry", "Dorf", "Matrix", "Bliss", "Firewall", "Green", "Red", "Static", "Triumvirate", "Triumvirate Static")
if (src.name == "M00X-BC" && src.ckey == "searif")
icons += "M00X-BC"
if (src.name == "Skuld" && src.ckey == "ravensdale")
icons += "Skuld"
if (src.name == "REMNANT" && src.ckey == "serithi")
icons += "REMNANT"
icontype = input("Please, select a display!", "AI", null/*, null*/) in icons
if(icontype == "Clown")
icon_state = "ai-clown2"
else if(icontype == "Monochrome")
icon_state = "ai-mono"
else if(icontype == "Blue")
icon_state = "ai"
else if(icontype == "Inverted")
icon_state = "ai-u"
else if(icontype == "Firewall")
icon_state = "ai-magma"
else if(icontype == "Green")
icon_state = "ai-wierd"
else if(icontype == "Red")
icon_state = "ai-malf"
else if(icontype == "Static")
icon_state = "ai-static"
else if(icontype == "Text")
icon_state = "ai-text"
else if(icontype == "Smiley")
icon_state = "ai-smiley"
else if(icontype == "Matrix")
icon_state = "ai-matrix"
else if(icontype == "Angry")
icon_state = "ai-angryface"
else if(icontype == "Dorf")
icon_state = "ai-dorf"
else if(icontype == "Bliss")
icon_state = "ai-bliss"
else if(icontype == "M00X-BC")
icon_state = "ai-searif"
else if(icontype == "Triumvirate")
icon_state = "ai-triumvirate"
else if(icontype == "Triumvirate Static")
icon_state = "ai-triumvirate-malf"
else if(icontype == "Skuld")
icon_state = "ai-ravensdale"
else if(icontype == "REMNANT")
icon_state = "ai-serithi"
if (custom_sprite == 1) icontype = ("Custom")//automagically selects custom sprite if one is available
else icontype = input("Select an icon!", "AI", null, null) in list("Monochrome", "Blue", "Inverted", "Text", "Smiley", "Angry", "Dorf", "Matrix", "Bliss", "Firewall", "Green", "Red", "Static", "Triumvirate", "Triumvirate Static")
switch(icontype)
if("Custom") icon_state = "[src.ckey]-ai"
if("Clown") icon_state = "ai-clown2"
if("Monochrome") icon_state = "ai-mono"
if("Inverted") icon_state = "ai-u"
if("Firewall") icon_state = "ai-magma"
if("Green") icon_state = "ai-wierd"
if("Red") icon_state = "ai-red"
if("Static") icon_state = "ai-static"
if("Text") icon_state = "ai-text"
if("Smiley") icon_state = "ai-smiley"
if("Matrix") icon_state = "ai-matrix"
if("Angry") icon_state = "ai-angryface"
if("Dorf") icon_state = "ai-dorf"
if("Bliss") icon_state = "ai-bliss"
if("Triumvirate") icon_state = "ai-triumvirate"
if("Triumvirate Static") icon_state = "ai-triumvirate-malf"
else icon_state = "ai"
//else
//usr <<"You can only change your display once!"
//return
@@ -188,7 +180,7 @@ var/list/ai_list = list()
if (malf.apcs >= 3)
stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/(malf.apcs/3), 0)] seconds")
/mob/living/silicon/ai/proc/ai_alerts()
set category = "AI Commands"
set name = "Show Alerts"
@@ -337,10 +329,6 @@ var/list/ai_list = list()
else
src << "<span class='notice'>Unable to locate the holopad.</span>"
if(href_list["say_word"])
src.announcement(href_list["say_word"])
return
if (href_list["lawc"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
var/L = text2num(href_list["lawc"])
switch(lawcheck[L+1])
@@ -349,6 +337,10 @@ var/list/ai_list = list()
// src << text ("Switching Law [L]'s report status to []", lawcheck[L+1])
checklaws()
if(href_list["say_word"])
src.announcement(href_list["say_word"])
return
if (href_list["lawi"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
var/L = text2num(href_list["lawi"])
switch(ioncheck[L])
+2 -4
View File
@@ -1,10 +1,8 @@
/mob/living/silicon/ai/death(gibbed)
if(stat == DEAD) return
stat = DEAD
if (src.name == "Skuld" && src.ckey == "ravensdale")//checks ID of AI and player to see if it needs to pull the custom death sprite and goes to blue-screen if it doesn't
icon_state = "ai-ravensdale-crash"
else if (src.name == "REMNANT" && src.ckey == "serithi")
icon_state = "ai-serithi-crash"
if (src.custom_sprite == 1)//check for custom AI sprite, defaulting to blue screen if no.
icon_state = "[ckey]-ai-crash"
else icon_state = "ai-crash"
update_canmove()
if(src.eyeobj)
+7 -2
View File
@@ -9,6 +9,8 @@
var/image/holder
var/turf/T = get_turf_or_move(src.loc)
for(var/mob/living/carbon/human/perp in view(T))
if(src.see_invisible < perp.invisibility)
continue
var/perpname = "wot"
holder = perp.hud_list[ID_HUD]
if(perp.wear_id)
@@ -51,11 +53,14 @@
var/image/holder
var/turf/T = get_turf_or_move(src.loc)
for(var/mob/living/carbon/human/patient in view(T))
if(src.see_invisible < patient.invisibility)
continue
var/foundVirus = 0
for(var/datum/disease/D in patient.viruses)
if(!D.hidden[SCANNER])
foundVirus = 1
foundVirus++
if(patient.virus2)
foundVirus++
holder = patient.hud_list[HEALTH_HUD]
if(patient.stat == 2)
@@ -39,7 +39,7 @@
brute_damage += brute
electronics_damage += electronics
if(brute_damage + electronics_damage > max_damage) destroy()
if(brute_damage + electronics_damage >= max_damage) destroy()
/datum/robot_component/proc/heal_damage(brute, electronics)
if(installed != 1)
@@ -50,7 +50,7 @@
electronics_damage = max(0, electronics_damage - electronics)
/datum/robot_component/proc/is_powered()
return installed == 1 && (!energy_consumption || powered)
return (installed == 1) && (brute_damage + electronics_damage < max_damage) && (!energy_consumption || powered)
/datum/robot_component/proc/consume_power()
@@ -6,7 +6,7 @@
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>[custom_name ? ", [modtype] [braintype]" : ""]!\n"
msg += "<span class='warning'>"
if (src.getBruteLoss())
if (src.getBruteLoss() < 75)
@@ -5,8 +5,6 @@
/mob/living/silicon/robot/get_active_hand()
return module_active
/*-------TODOOOOOOOOOO--------*/
/mob/living/silicon/robot/proc/uneq_active()
if(isnull(module_active))
@@ -38,6 +36,7 @@
module_active = null
module_state_3 = null
inv3.icon_state = "inv3"
updateicon()
/mob/living/silicon/robot/proc/uneq_all()
module_active = null
@@ -66,7 +65,7 @@
contents -= module_state_3
module_state_3 = null
inv3.icon_state = "inv3"
updateicon()
/mob/living/silicon/robot/proc/activated(obj/item/O)
if(module_state_1 == O)
@@ -76,4 +75,5 @@
else if(module_state_3 == O)
return 1
else
return 0
return 0
updateicon()
@@ -5,7 +5,6 @@
if (src.monkeyizing)
return
src.blinded = null
//Status updates, death etc.
@@ -21,9 +20,6 @@
process_locks()
update_canmove()
/mob/living/silicon/robot/proc/clamp_values()
// SetStunned(min(stunned, 30))
@@ -70,9 +66,7 @@
else
src.camera.status = 1
health = 200 - (getOxyLoss() + getFireLoss() + getBruteLoss())
if(getOxyLoss() > 50) Paralyse(3)
updatehealth()
if(src.sleeping)
Paralyse(3)
@@ -286,7 +280,7 @@
src.module_state_2:screen_loc = ui_inv2
if(src.module_state_3)
src.module_state_3:screen_loc = ui_inv3
updateicon()
/mob/living/silicon/robot/proc/process_killswitch()
if(killswitch)
+64 -39
View File
@@ -9,6 +9,8 @@
var/sight_mode = 0
var/custom_name = ""
var/base_icon
var/custom_sprite = 0 //Due to all the sprites involved, a var for our custom borgs may be best
//Hud stuff
@@ -45,7 +47,7 @@
//var/list/laws = list()
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list())
var/viewalerts = 0
var/modtype = "robot"
var/modtype = "Default"
var/lower_mod = 0
var/jetpack = 0
var/datum/effect/effect/system/ion_trail_follow/ion_trail = null
@@ -84,7 +86,7 @@
module = new /obj/item/weapon/robot_module/syndicate(src)
hands.icon_state = "standard"
icon_state = "secborg"
modtype = "Synd"
modtype = "Security"
else
laws = new /datum/ai_laws/nanotrasen()
connected_ai = select_active_ai_with_fewest_borgs()
@@ -144,11 +146,11 @@
/mob/living/silicon/robot/proc/pick_module()
if(module)
return
var/list/modules = list("Standard", "Engineering", "Medical", "Miner", "Janitor","Service", "Security","Combat")
var/list/modules = list("Standard", "Engineering", "Medical", "Miner", "Janitor", "Service", "Security")
if(emagged || security_level > SEC_LEVEL_BLUE)
src << "\red Crisis mode active. Combat module available."
modules+="Combat"
var/mod = input("Please, select a module!", "Robot", null, null) in modules
modtype = input("Please, select a module!", "Robot", null, null) in modules
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
var/channels = list()
@@ -156,17 +158,15 @@
if(module)
return
switch(mod)
switch(modtype)
if("Standard")
module = new /obj/item/weapon/robot_module/standard(src)
modtype = "Stand"
module_sprites["Basic"] = "robot_old"
module_sprites["Android"] = "droid"
module_sprites["Default"] = "robot"
if("Service")
module = new /obj/item/weapon/robot_module/butler(src)
modtype = "Butler"
module_sprites["Waitress"] = "Service"
module_sprites["Kent"] = "toiletbot"
module_sprites["Bro"] = "Brobot"
@@ -175,15 +175,13 @@
if("Miner")
module = new /obj/item/weapon/robot_module/miner(src)
modtype = "Miner"
channels = list("Mining" = 1)
channels = list("Supply" = 1)
module_sprites["Basic"] = "Miner_old"
module_sprites["Advanced Droid"] = "droid-miner"
module_sprites["Default"] = "Miner"
module_sprites["Treadhead"] = "Miner"
if("Medical")
module = new /obj/item/weapon/robot_module/medical(src)
modtype = "Med"
channels = list("Medical" = 1)
module_sprites["Basic"] = "Medbot"
module_sprites["Advanced Droid"] = "droid-medical"
@@ -192,7 +190,6 @@
if("Security")
module = new /obj/item/weapon/robot_module/security(src)
modtype = "Sec"
channels = list("Security" = 1)
module_sprites["Basic"] = "secborg"
module_sprites["Red Knight"] = "Security"
@@ -201,7 +198,6 @@
if("Engineering")
module = new /obj/item/weapon/robot_module/engineering(src)
modtype = "Eng"
channels = list("Engineering" = 1)
module_sprites["Basic"] = "Engineering"
module_sprites["Antique"] = "engineerrobot"
@@ -209,41 +205,33 @@
if("Janitor")
module = new /obj/item/weapon/robot_module/janitor(src)
modtype = "Jan"
module_sprites["Basic"] = "JanBot2"
module_sprites["Mopbot"] = "janitorrobot"
module_sprites["Mop Gear Rex"] = "mopgearrex"
if("Combat")
module = new /obj/item/weapon/robot_module/combat(src)
modtype = "Com"
module_sprites["Combat Android"] = "droid-combat"
channels = list("Security" = 1)
//Begin awful custom item checks.
if (src.name == "Lucy" && src.ckey == "rowtree")
switch(mod)
if("Medical")
module_sprites["Lucy"] = "rowtree-medical"
if("Security" || "Combat")
module_sprites["Lucy"] = "rowtree-security"
if("Engineering")
module_sprites["Lucy"] = "rowtree-engineering"
else
module_sprites["Lucy"] = "rowtree-lucy"
//Custom_sprite check and entry
if (custom_sprite == 1)
module_sprites["Custom"] = "[src.ckey]-[modtype]"
hands.icon_state = lowertext(mod)
feedback_inc("cyborg_[lowertext(mod)]",1)
updatename(mod)
hands.icon_state = lowertext(modtype)
feedback_inc("cyborg_[lowertext(modtype)]",1)
updatename()
if(mod == "Medical" || mod == "Security" || mod == "Combat")
if(modtype == "Medical" || modtype == "Security" || modtype == "Combat")
status_flags &= ~CANPUSH
choose_icon(6,module_sprites)
radio.config(channels)
base_icon = icon_state
/mob/living/silicon/robot/proc/updatename(var/prefix as text)
if(prefix)
modtype = prefix
if(istype(mmi, /obj/item/device/mmi/posibrain))
braintype = "Android"
else
@@ -253,7 +241,7 @@
if(custom_name)
changed_name = custom_name
else
changed_name = "[(prefix ? "[prefix] " : "")][braintype]-[num2text(ident)]"
changed_name = "[modtype] [braintype]-[num2text(ident)]"
real_name = changed_name
name = real_name
@@ -264,6 +252,23 @@
if (camera)
camera.c_tag = changed_name
if(!custom_sprite) //Check for custom sprite
var/file = file2text("config/custom_sprites.txt")
var/lines = text2list(file, "\n")
for(var/line in lines)
// split & clean up
var/list/Entry = text2list(line, "-")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
if(Entry.len < 2)
continue;
if(Entry[1] == src.ckey && Entry[2] == src.real_name) //They're in the list? Custom sprite time, var and icon change required
custom_sprite = 1
icon = 'icons/mob/custom-synthetic.dmi'
/mob/living/silicon/robot/verb/Namepick()
if(custom_name)
return 0
@@ -274,7 +279,7 @@
if (newname != "")
custom_name = newname
updatename("Default")
updatename()
updateicon()
/mob/living/silicon/robot/verb/cmd_robot_alerts()
@@ -978,6 +983,14 @@
else
overlays -= "eyes"
if(opened && custom_sprite == 1) //Custom borgs also have custom panels, heh
if(wiresexposed)
overlays += "[src.ckey]-openpanel +w"
else if(cell)
overlays += "[src.ckey]-openpanel +c"
else
overlays += "[src.ckey]-openpanel -c"
if(opened)
if(wiresexposed)
overlays += "ov-openpanel +w"
@@ -985,7 +998,16 @@
overlays += "ov-openpanel +c"
else
overlays += "ov-openpanel -c"
return
if(module_active && istype(module_active,/obj/item/borg/combat/shield))
overlays += "[icon_state]-shield"
if(base_icon)
if(module_active && istype(module_active,/obj/item/borg/combat/mobility))
icon_state = "[base_icon]-roll"
else
icon_state = base_icon
return
//Call when target overlay should be added/removed
/mob/living/silicon/robot/update_targeted()
@@ -1222,9 +1244,12 @@
overlays -= "eyes"
updateicon()
var/choice = input("Look at your icon - is this what you want?") in list("Yes","No")
if(choice=="No")
choose_icon(triesleft, module_sprites)
if (triesleft >= 1)
var/choice = input("Look at your icon - is this what you want?") in list("Yes","No")
if(choice=="No")
choose_icon(triesleft, module_sprites)
else
triesleft = 0
return
else
triesleft = 0
return
src << "Your icon has been set. You now require a module reset to change it."
@@ -1,18 +1,25 @@
/mob/living/silicon/robot/updatehealth()
if(status_flags & GODMODE)
health = 100
stat = CONSCIOUS
return
health = 100 - (getBruteLoss() + getFireLoss())
return
/mob/living/silicon/robot/getBruteLoss()
var/amount = 0
for(var/V in components)
var/datum/robot_component/C = components[V]
if(C.installed == 1) amount += C.brute_damage
if(C.installed != 0) amount += C.brute_damage
return amount
/mob/living/silicon/robot/getFireLoss()
var/amount = 0
for(var/V in components)
var/datum/robot_component/C = components[V]
if(C.installed == 1) amount += C.electronics_damage
if(C.installed != 0) amount += C.electronics_damage
return amount
/mob/living/silicon/robot/adjustBruteLoss(var/amount)
if(amount > 0)
take_overall_damage(amount, 0)
@@ -46,11 +53,28 @@
var/datum/robot_component/picked = pick(parts)
picked.heal_damage(brute,burn)
/mob/living/silicon/robot/take_organ_damage(var/brute, var/burn, var/sharp = 0)
/mob/living/silicon/robot/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0)
var/list/components = get_damageable_components()
if(components.len)
if(!components.len)
return
//Combat shielding absorbs a percentage of damage directly into the cell.
if(module_active && istype(module_active,/obj/item/borg/combat/shield))
var/obj/item/borg/combat/shield/shield = module_active
//Shields absorb a certain percentage of damage based on their power setting.
var/absorb_brute = brute*shield.shield_level
var/absorb_burn = burn*shield.shield_level
var/cost = (absorb_brute+absorb_burn)*100
cell.charge -= cost
if(cell.charge <= 0)
cell.charge = 0
src << "\red Your shield has overloaded!"
else
brute -= absorb_brute
burn -= absorb_burn
src << "\red Your shield absorbs some of the impact!"
var/datum/robot_component/C = pick(components)
C.take_damage(brute,burn,sharp)
@@ -70,9 +94,27 @@
parts -= picked
/mob/living/silicon/robot/take_overall_damage(var/brute, var/burn, var/sharp = 0, var/used_weapon = null)
/mob/living/silicon/robot/take_overall_damage(var/brute = 0, var/burn = 0, var/sharp = 0, var/used_weapon = null)
if(status_flags & GODMODE) return //godmode
var/list/datum/robot_component/parts = get_damageable_components()
//Combat shielding absorbs a percentage of damage directly into the cell.
if(module_active && istype(module_active,/obj/item/borg/combat/shield))
var/obj/item/borg/combat/shield/shield = module_active
//Shields absorb a certain percentage of damage based on their power setting.
var/absorb_brute = brute*shield.shield_level
var/absorb_burn = burn*shield.shield_level
var/cost = (absorb_brute+absorb_burn)*100
cell.charge -= cost
if(cell.charge <= 0)
cell.charge = 0
src << "\red Your shield has overloaded!"
else
brute -= absorb_brute
burn -= absorb_burn
src << "\red Your shield absorbs some of the impact!"
while(parts.len && (brute>0 || burn>0) )
var/datum/robot_component/picked = pick(parts)
@@ -84,4 +126,4 @@
brute -= (picked.brute_damage - brute_was)
burn -= (picked.electronics_damage - burn_was)
parts -= picked
parts -= picked
@@ -120,3 +120,25 @@
add_fingerprint(user)
return
//Personal shielding for the combat module.
/obj/item/borg/combat/shield
name = "personal shielding"
desc = "A powerful experimental module that turns aside or absorbs incoming attacks at the cost of charge."
icon = 'icons/obj/decals.dmi'
icon_state = "shock"
var/shield_level = 0.5 //Percentage of damage absorbed by the shield.
/obj/item/borg/combat/shield/verb/set_shield_level()
set name = "Set shield level"
set category = "Object"
set src in range(0)
var/N = input("How much damage should the shield absorb?") in list("5","10","25","50","75","100")
if (N)
shield_level = text2num(N)/100
/obj/item/borg/combat/mobility
name = "mobility module"
desc = "By retracting limbs and tucking in its head, a combat android can roll at high speeds."
icon = 'icons/obj/decals.dmi'
icon_state = "shock"
@@ -226,9 +226,10 @@
New()
src.modules += new /obj/item/borg/sight/thermal(src)
src.modules += new /obj/item/weapon/melee/energy/sword(src)
src.modules += new /obj/item/weapon/gun/energy/lasercannon/cyborg(src)
src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src)
src.modules += new /obj/item/borg/combat/shield(src)
src.modules += new /obj/item/borg/combat/mobility(src)
src.modules += new /obj/item/weapon/wrench(src) //Is a combat android really going to be stopped by a chair?
src.emag = new /obj/item/weapon/gun/energy/pulse_rifle/cyborg(src)
return
@@ -12,4 +12,10 @@
tally = speed
if(module_active && istype(module_active,/obj/item/borg/combat/mobility))
tally-=3
return tally+config.robot_delay
/mob/living/silicon/robot/Move()
..()
+1 -20
View File
@@ -7,26 +7,7 @@
message_admins("Admin logout: [key_name(src)]")
if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
var/cheesy_message = pick( list( \
"I have no admins online!",\
"I'm all alone :(",\
"I'm feeling lonely :(",\
"I'm so lonely :(",\
"Why does nobody love me? :(",\
"I want a man :(",\
"Where has everyone gone?",\
"I need a hug :(",\
"Someone come hold me :(",\
"I need someone on me :(",\
"What happened? Where has everyone gone?",\
"Forever alone :("\
) )
if(cheesy_message)
cheesy_message += " (No admins online)"
send2irc("Server", "[cheesy_message]")
send2adminirc("[key_name(src)] logged out - no more admins online.")
..()
return 1
+3 -3
View File
@@ -298,7 +298,7 @@ var/list/slot_equipment_priority = list( \
/mob/verb/memory()
set name = "Notes"
set category = "OOC"
set category = "IC"
if(mind)
mind.show_memory(src)
else
@@ -306,7 +306,7 @@ var/list/slot_equipment_priority = list( \
/mob/verb/add_memory(msg as message)
set name = "Add Note"
set category = "OOC"
set category = "IC"
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
msg = sanitize(msg)
@@ -946,7 +946,7 @@ mob/verb/yank_out_object()
if(self)
visible_message("<span class='warning'><b>[src] rips [selection] out of their body.</b></span>","<span class='warning'><b>You rip [selection] out of your body.</b></span>")
else
visible_message("<span class='warning'><b>[usr] rips [selection] out of [src]'s body.</b></span>","<span class='warning'><b>[src] rips [selection] out of your body.</b></span>")
visible_message("<span class='warning'><b>[usr] rips [selection] out of [src]'s body.</b></span>","<span class='warning'><b>[usr] rips [selection] out of your body.</b></span>")
selection.loc = get_turf(src)
@@ -269,6 +269,14 @@
proc/AttemptLateSpawn(rank)
if (src != usr)
return 0
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
usr << "\red The round is either not ready, or has already finished..."
return 0
if(!enter_allowed)
usr << "\blue There is an administrative lock on entering the game!"
return 0
if(!IsJobAvailable(rank))
src << alert("[rank] is not available. Please try another.")
return 0
+1 -1
View File
@@ -128,7 +128,7 @@
for(var/area/A in gravity_generator:localareas)
var/obj/machinery/gravity_generator/G
for(G in world)
for(G in machines)
if((A.master in G.localareas) && (G.on))
break
if(!G)
@@ -346,7 +346,7 @@ field_generator power level display
//I want to avoid using global variables.
spawn(1)
var/temp = 1 //stops spam
for(var/obj/machinery/singularity/O in world)
for(var/obj/machinery/singularity/O in machines)
if(O.last_warning && temp)
if((world.time - O.last_warning) > 50) //to stop message-spam
temp = 0
@@ -42,7 +42,7 @@ var/global/list/uneatable = list(
spawn(temp)
del(src)
..()
for(var/obj/machinery/singularity_beacon/singubeacon in world)
for(var/obj/machinery/singularity_beacon/singubeacon in machines)
if(singubeacon.active)
target = singubeacon
break
+2 -2
View File
@@ -212,11 +212,11 @@
/obj/machinery/computer/turbine_computer/New()
..()
spawn(5)
for(var/obj/machinery/compressor/C in world)
for(var/obj/machinery/compressor/C in machines)
if(id == C.comp_id)
compressor = C
doors = new /list()
for(var/obj/machinery/door/poddoor/P in world)
for(var/obj/machinery/door/poddoor/P in machines)
if(P.id == id)
doors += P
+16 -12
View File
@@ -125,16 +125,20 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
busy = 1
use_power(max(1000, (3750*amount/10)))
spawn(16)
var/stacktype = stack.type
stack.use(amount)
if(do_after(usr,16))
user << "\blue You add [amount] sheets to the [src.name]."
if(istype(stack, /obj/item/stack/sheet/glass))
g_amount += amount * 3750
else if(istype(stack, /obj/item/stack/sheet/mineral/gold))
gold_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/diamond))
diamond_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/uranium))
uranium_amount += amount * 2000
stack.use(amount)
busy = 0
src.updateUsrDialog()
switch(stacktype)
if(/obj/item/stack/sheet/glass)
g_amount += amount * 3750
if(/obj/item/stack/sheet/mineral/gold)
gold_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/diamond)
diamond_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/uranium)
uranium_amount += amount * 2000
else
new stacktype(src.loc, amount)
busy = 0
src.updateUsrDialog()
+1 -1
View File
@@ -241,7 +241,7 @@ var/obj/machinery/blackbox_recorder/blackbox
var/pda_msg_amt = 0
var/rc_msg_amt = 0
for(var/obj/machinery/message_server/MS in world)
for(var/obj/machinery/message_server/MS in machines)
if(MS.pda_msgs.len > pda_msg_amt)
pda_msg_amt = MS.pda_msgs.len
if(MS.rc_msgs.len > rc_msg_amt)
+26 -22
View File
@@ -152,28 +152,32 @@ Note: Must be placed west/left of and R&D console to function.
icon_state = "protolathe"
busy = 1
use_power(max(1000, (3750*amount/10)))
spawn(16)
var/stacktype = stack.type
stack.use(amount)
if (do_after(user, 16))
user << "\blue You add [amount] sheets to the [src.name]."
icon_state = "protolathe"
if(istype(stack, /obj/item/stack/sheet/metal))
m_amount += amount * 3750
else if(istype(stack, /obj/item/stack/sheet/glass))
g_amount += amount * 3750
else if(istype(stack, /obj/item/stack/sheet/mineral/gold))
gold_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/silver))
silver_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/plasma))
plasma_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/uranium))
uranium_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/diamond))
diamond_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/clown))
clown_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/adamantine))
adamantine_amount += amount * 2000
stack.use(amount)
busy = 0
src.updateUsrDialog()
switch(stacktype)
if(/obj/item/stack/sheet/metal)
m_amount += amount * 3750
if(/obj/item/stack/sheet/glass)
g_amount += amount * 3750
if(/obj/item/stack/sheet/mineral/gold)
gold_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/silver)
silver_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/plasma)
plasma_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/uranium)
uranium_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/diamond)
diamond_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/clown)
clown_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/adamantine)
adamantine_amount += amount * 2000
else
new stacktype(src.loc, amount)
busy = 0
src.updateUsrDialog()
return
+3 -3
View File
@@ -116,7 +116,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
//Have it automatically push research to the centcomm server so wild griffins can't fuck up R&D's work --NEO
/obj/machinery/computer/rdconsole/proc/griefProtection()
for(var/obj/machinery/r_n_d/server/centcom/C in world)
for(var/obj/machinery/r_n_d/server/centcom/C in machines)
for(var/datum/tech/T in files.known_tech)
C.files.AddTech2Known(T)
for(var/datum/design/D in files.known_designs)
@@ -128,7 +128,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
..()
files = new /datum/research(src) //Setup the research data holder.
if(!id)
for(var/obj/machinery/r_n_d/server/centcom/S in world)
for(var/obj/machinery/r_n_d/server/centcom/S in machines)
S.initialize()
break
@@ -322,7 +322,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
griefProtection() //Putting this here because I dont trust the sync process
spawn(30)
if(src)
for(var/obj/machinery/r_n_d/server/S in world)
for(var/obj/machinery/r_n_d/server/S in machines)
var/server_processed = 0
if(S.disabled)
continue
@@ -49,6 +49,9 @@ proc/move_research_shuttle()
for(var/mob/living/carbon/bug in toArea) // If someone somehow is still in the shuttle's docking area...
bug.gib()
for(var/mob/living/simple_animal/pest in toArea) // And for the other kind of bug...
pest.gib()
fromArea.move_contents_to(toArea)
if (research_shuttle_location)
research_shuttle_location = 0
+6 -6
View File
@@ -93,7 +93,7 @@
//Backup files to centcomm to help admins recover data after greifer attacks
/obj/machinery/r_n_d/server/proc/griefProtection()
for(var/obj/machinery/r_n_d/server/centcom/C in world)
for(var/obj/machinery/r_n_d/server/centcom/C in machines)
for(var/datum/tech/T in files.known_tech)
C.files.AddTech2Known(T)
for(var/datum/design/D in files.known_designs)
@@ -170,7 +170,7 @@
..()
var/list/no_id_servers = list()
var/list/server_ids = list()
for(var/obj/machinery/r_n_d/server/S in world)
for(var/obj/machinery/r_n_d/server/S in machines)
switch(S.server_id)
if(-1)
continue
@@ -219,20 +219,20 @@
temp_server = null
consoles = list()
servers = list()
for(var/obj/machinery/r_n_d/server/S in world)
for(var/obj/machinery/r_n_d/server/S in machines)
if(S.server_id == text2num(href_list["access"]) || S.server_id == text2num(href_list["data"]) || S.server_id == text2num(href_list["transfer"]))
temp_server = S
break
if(href_list["access"])
screen = 1
for(var/obj/machinery/computer/rdconsole/C in world)
for(var/obj/machinery/computer/rdconsole/C in machines)
if(C.sync)
consoles += C
else if(href_list["data"])
screen = 2
else if(href_list["transfer"])
screen = 3
for(var/obj/machinery/r_n_d/server/S in world)
for(var/obj/machinery/r_n_d/server/S in machines)
if(S == src)
continue
servers += S
@@ -283,7 +283,7 @@
if(0) //Main Menu
dat += "Connected Servers:<BR><BR>"
for(var/obj/machinery/r_n_d/server/S in world)
for(var/obj/machinery/r_n_d/server/S in machines)
if(istype(S, /obj/machinery/r_n_d/server/centcom) && !badmin)
continue
dat += "[S.name] || "
@@ -20,7 +20,7 @@
B.charge += 25
for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
S.charge += 25
for (var/mob/living/silicon/robot/M in world)
for (var/mob/living/silicon/robot/M in mob_list)
for (var/obj/item/weapon/cell/D in M.contents)
D.charge += 25
M << "\blue SYSTEM ALERT: Energy boost detected!"
@@ -33,7 +33,7 @@
B.charge += rand() * 100
for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
S.charge += 250
for (var/mob/living/silicon/robot/M in world)
for (var/mob/living/silicon/robot/M in mob_list)
for (var/obj/item/weapon/cell/D in M.contents)
D.charge += rand() * 100
M << "\blue SYSTEM ALERT: Energy boost detected!"
@@ -22,7 +22,7 @@
B.charge = max(B.charge - 50,0)
for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
S.charge = max(S.charge - 100,0)
for (var/mob/living/silicon/robot/M in world)
for (var/mob/living/silicon/robot/M in mob_list)
for (var/obj/item/weapon/cell/D in M.contents)
D.charge = max(D.charge - 50,0)
M << "\red SYSTEM ALERT: Energy drain detected!"
@@ -35,7 +35,7 @@
B.charge = max(B.charge - rand() * 150,0)
for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
S.charge = max(S.charge - 250,0)
for (var/mob/living/silicon/robot/M in world)
for (var/mob/living/silicon/robot/M in mob_list)
for (var/obj/item/weapon/cell/D in M.contents)
D.charge = max(D.charge - rand() * 150,0)
M << "\red SYSTEM ALERT: Energy drain detected!"
@@ -51,7 +51,7 @@
if(w.isOn())
if(w.get_fuel() >= 4 && !src.method)
if(inside)
inside.loc = src.loc
inside.loc = get_turf(src)
for(var/mob/M in viewers(world.view, user))
M.show_message("<span class='info'>[src] burns away revealing [inside].</span>",1)
else
@@ -96,7 +96,7 @@
msg+="!"
var/list/listening = viewers(src)
for(var/mob/M in world)
for(var/mob/M in mob_list)
if (!M.client)
continue //skip monkeys and leavers
if (istype(M, /mob/new_player))
@@ -109,7 +109,7 @@
/obj/machinery/keycard_auth/proc/broadcast_request()
icon_state = "auth_on"
for(var/obj/machinery/keycard_auth/KA in world)
for(var/obj/machinery/keycard_auth/KA in machines)
if(KA == src) continue
KA.reset()
spawn()
@@ -148,7 +148,7 @@
feedback_inc("alert_keycard_auth_maint",1)
/proc/make_maint_all_access()
for(var/obj/machinery/door/airlock/A in world)
for(var/obj/machinery/door/airlock/A in machines)
if(A.z == 1)
A.req_access.Remove(access_maint_tunnels)
@@ -24,7 +24,7 @@
world << "<font size=4 color='red'>Attention! Security level lowered to green</font>"
world << "<font color='red'>[config.alert_desc_green]</font>"
security_level = SEC_LEVEL_GREEN
for(var/obj/machinery/firealarm/FA in world)
for(var/obj/machinery/firealarm/FA in machines)
if(FA.z == 1)
FA.overlays = list()
FA.overlays += image('icons/obj/monitors.dmi', "overlay_green")
@@ -36,7 +36,7 @@
world << "<font size=4 color='red'>Attention! Security level lowered to blue</font>"
world << "<font color='red'>[config.alert_desc_blue_downto]</font>"
security_level = SEC_LEVEL_BLUE
for(var/obj/machinery/firealarm/FA in world)
for(var/obj/machinery/firealarm/FA in machines)
if(FA.z == 1)
FA.overlays = list()
FA.overlays += image('icons/obj/monitors.dmi', "overlay_blue")
@@ -54,7 +54,7 @@
if(CC)
CC.post_status("alert", "redalert")*/
for(var/obj/machinery/firealarm/FA in world)
for(var/obj/machinery/firealarm/FA in machines)
if(FA.z == 1)
FA.overlays = list()
FA.overlays += image('icons/obj/monitors.dmi', "overlay_red")
@@ -67,7 +67,7 @@
world << "<font size=4 color='red'>Attention! Delta security level reached!</font>"
world << "<font color='red'>[config.alert_desc_delta]</font>"
security_level = SEC_LEVEL_DELTA
for(var/obj/machinery/firealarm/FA in world)
for(var/obj/machinery/firealarm/FA in machines)
if(FA.z == 1)
FA.overlays = list()
FA.overlays += image('icons/obj/monitors.dmi', "overlay_delta")