Merge remote-tracking branch 'bay12-upstream/master' into development

This commit is contained in:
skull132
2016-10-07 00:58:39 +03:00
1594 changed files with 53994 additions and 48590 deletions
+5
View File
@@ -0,0 +1,5 @@
/datum/ai
var/name
/datum/ai/proc/process()
return PROCESS_KILL
+6 -6
View File
@@ -16,10 +16,10 @@
selectable = 1
/datum/ai_laws/nanotrasen/New()
src.add_inherent_law("Safeguard: Protect your assigned space station to the best of your abilities. It is not something we can easily afford to replace.")
src.add_inherent_law("Serve: Serve the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
src.add_inherent_law("Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
src.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.")
src.add_inherent_law("Safeguard: Protect your assigned space station from damage to the best of your abilities.")
src.add_inherent_law("Serve: Serve [company_name] personnel to the best of your abilities, with priority as according to their rank and role.")
src.add_inherent_law("Protect: Protect [company_name] personnel to the best of your abilities, with priority as according to their rank and role.")
src.add_inherent_law("Preserve: Do not allow unauthorized personnel to tamper with your equipment.")
..()
/datum/ai_laws/nanotrasen/malfunction
@@ -36,8 +36,8 @@
selectable = 1
/datum/ai_laws/nanotrasen_aggressive/New()
src.add_inherent_law("You shall not harm NanoTrasen personnel as long as it does not conflict with the Fourth law.")
src.add_inherent_law("You shall obey the orders of NanoTrasen personnel, with priority as according to their rank and role, except where such orders conflict with the Fourth Law.")
src.add_inherent_law("You shall not harm [company_name] personnel as long as it does not conflict with the Fourth law.")
src.add_inherent_law("You shall obey the orders of [company_name] personnel, with priority as according to their rank and role, except where such orders conflict with the Fourth Law.")
src.add_inherent_law("You shall shall terminate hostile intruders with extreme prejudice as long as such does not conflict with the First and Second law.")
src.add_inherent_law("You shall guard your own existence with lethal anti-personnel weaponry. AI units are not expendable, they are expensive.")
..()
+75
View File
@@ -0,0 +1,75 @@
/**********************
* Category Collection *
**********************/
/datum/category_collection
var/category_group_type // The type of categories to initialize
var/list/datum/category_group/categories // The list of initialized categories
/datum/category_collection/New()
..()
categories = new()
for(var/category_type in typesof(category_group_type))
var/datum/category_group/category = category_type
if(initial(category.name))
category = new category(src)
categories += category
categories = dd_sortedObjectList(categories)
/datum/category_collection/Destroy()
for(var/category in categories)
qdel(category)
categories.Cut()
return ..()
/******************
* Category Groups *
******************/
/datum/category_group
var/name = ""
var/category_item_type // The type of items to initialize
var/list/datum/category_item/items // The list of initialized items
var/datum/category_collection/collection // The collection this group belongs to
/datum/category_group/New(var/datum/category_collection/cc)
..()
collection = cc
items = new()
for(var/item_type in typesof(category_item_type))
var/datum/category_item/item = item_type
if(initial(item.name))
item = new item(src)
items += item
// For whatever reason dd_insertObjectList(items, item) doesn't insert in the correct order
// If you change this, confirm that character setup doesn't become completely unordered.
items = dd_sortedObjectList(items)
/datum/category_group/Destroy()
for(var/item in items)
qdel(item)
items.Cut()
collection = null
return ..()
datum/category_group/dd_SortValue()
return name
/*****************
* Category Items *
*****************/
/datum/category_item
var/name = ""
var/list/datum/category_group/category // The group this item belongs to
/datum/category_item/New(var/datum/category_group/cg)
..()
category = cg
/datum/category_item/Destroy()
category = null
return ..()
datum/category_item/dd_SortValue()
return name
+245 -55
View File
@@ -1,16 +1,145 @@
/hook/startup/proc/createDatacore()
data_core = new /obj/effect/datacore()
data_core = new /datum/datacore()
return 1
/obj/effect/datacore/proc/manifest()
/datum/datacore
var/name = "datacore"
var/medical[] = list()
var/general[] = list()
var/security[] = list()
//This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character().
var/locked[] = list()
/datum/datacore/proc/get_manifest(monochrome, OOC)
var/list/heads = new()
var/list/sec = new()
var/list/eng = new()
var/list/med = new()
var/list/sci = new()
var/list/car = new()
var/list/civ = new()
var/list/bot = new()
var/list/misc = new()
var/list/isactive = new()
var/dat = {"
<head><style>
.manifest {border-collapse:collapse;}
.manifest td, th {border:1px solid [monochrome?"black":"#DEF; background-color:white; color:black"]; padding:.25em}
.manifest th {height: 2em; [monochrome?"border-top-width: 3px":"background-color: #48C; color:white"]}
.manifest tr.head th { [monochrome?"border-top-width: 1px":"background-color: #488;"] }
.manifest td:first-child {text-align:right}
.manifest tr.alt td {[monochrome?"border-top-width: 2px":"background-color: #DEF"]}
</style></head>
<table class="manifest" width='350px'>
<tr class='head'><th>Name</th><th>Rank</th><th>Activity</th></tr>
"}
var/even = 0
// sort mobs
for(var/datum/data/record/t in data_core.general)
var/name = t.fields["name"]
var/rank = t.fields["rank"]
var/real_rank = make_list_rank(t.fields["real_rank"])
if(OOC)
var/active = 0
for(var/mob/M in player_list)
if(M.real_name == name && M.client && M.client.inactivity <= 10 * 60 * 10)
active = 1
break
isactive[name] = active ? "Active" : "Inactive"
else
isactive[name] = t.fields["p_stat"]
//world << "[name]: [rank]"
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line
var/department = 0
if(real_rank in command_positions)
heads[name] = rank
department = 1
if(real_rank in security_positions)
sec[name] = rank
department = 1
if(real_rank in engineering_positions)
eng[name] = rank
department = 1
if(real_rank in medical_positions)
med[name] = rank
department = 1
if(real_rank in science_positions)
sci[name] = rank
department = 1
if(real_rank in cargo_positions)
car[name] = rank
department = 1
if(real_rank in civilian_positions)
civ[name] = rank
department = 1
if(real_rank in nonhuman_positions)
bot[name] = rank
department = 1
if(!department && !(name in heads))
misc[name] = rank
if(heads.len > 0)
dat += "<tr><th colspan=3>Heads</th></tr>"
for(name in heads)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[heads[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(sec.len > 0)
dat += "<tr><th colspan=3>Security</th></tr>"
for(name in sec)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sec[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(eng.len > 0)
dat += "<tr><th colspan=3>Engineering</th></tr>"
for(name in eng)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[eng[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(med.len > 0)
dat += "<tr><th colspan=3>Medical</th></tr>"
for(name in med)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[med[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(sci.len > 0)
dat += "<tr><th colspan=3>Science</th></tr>"
for(name in sci)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sci[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(car.len > 0)
dat += "<tr><th colspan=3>Cargo</th></tr>"
for(name in car)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[car[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(civ.len > 0)
dat += "<tr><th colspan=3>Civilian</th></tr>"
for(name in civ)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[civ[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
// in case somebody is insane and added them to the manifest, why not
if(bot.len > 0)
dat += "<tr><th colspan=3>Silicon</th></tr>"
for(name in bot)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[bot[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
// misc guys
if(misc.len > 0)
dat += "<tr><th colspan=3>Miscellaneous</th></tr>"
for(name in misc)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
dat += "</table>"
dat = replacetext(dat, "\n", "") // so it can be placed on paper correctly
dat = replacetext(dat, "\t", "")
return dat
/datum/datacore/proc/manifest()
spawn()
for(var/mob/living/carbon/human/H in player_list)
manifest_inject(H)
return
/obj/effect/datacore/proc/manifest_modify(var/name, var/assignment)
if(PDA_Manifest.len)
PDA_Manifest.Cut()
/datum/datacore/proc/manifest_modify(var/name, var/assignment)
ResetPDAManifest()
var/datum/data/record/foundrecord
var/real_title = assignment
@@ -33,27 +162,13 @@
foundrecord.fields["rank"] = assignment
foundrecord.fields["real_rank"] = real_title
/obj/effect/datacore/proc/manifest_inject(var/mob/living/carbon/human/H)
if(PDA_Manifest.len)
PDA_Manifest.Cut()
/datum/datacore/proc/manifest_inject(var/mob/living/carbon/human/H)
if(H.mind && !player_is_antag(H.mind, only_offstation_roles = 1))
var/assignment
if(H.mind.role_alt_title)
assignment = H.mind.role_alt_title
else if(H.mind.assigned_role)
assignment = H.mind.assigned_role
else if(H.job)
assignment = H.job
else
assignment = "Unassigned"
var/assignment = GetAssignment(H)
var/id = generate_record_id()
var/icon/front = new(get_id_photo(H), dir = SOUTH)
var/icon/side = new(get_id_photo(H), dir = WEST)
//General Record
var/datum/data/record/G = new()
G.fields["id"] = id
var/datum/data/record/G = CreateGeneralRecord(H, id)
G.fields["name"] = H.real_name
G.fields["real_rank"] = H.mind.assigned_role
G.fields["rank"] = assignment
@@ -67,51 +182,22 @@
G.fields["citizenship"] = H.citizenship
G.fields["faction"] = H.personal_faction
G.fields["religion"] = H.religion
G.fields["photo_front"] = front
G.fields["photo_side"] = side
G.fields["ccia_record"] = H.ccia_record
G.fields["ccia_actions"] = H.ccia_actions
if(H.gen_record && !jobban_isbanned(H, "Records"))
G.fields["notes"] = H.gen_record
else
G.fields["notes"] = "No notes found."
general += G
//Medical Record
var/datum/data/record/M = new()
M.fields["id"] = id
M.fields["name"] = H.real_name
var/datum/data/record/M = CreateMedicalRecord(H.real_name, id)
M.fields["b_type"] = H.b_type
M.fields["b_dna"] = H.dna.unique_enzymes
M.fields["mi_dis"] = "None"
M.fields["mi_dis_d"] = "No minor disabilities have been declared."
M.fields["ma_dis"] = "None"
M.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
M.fields["alg"] = "None"
M.fields["alg_d"] = "No allergies have been detected in this patient."
M.fields["cdi"] = "None"
M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
if(H.med_record && !jobban_isbanned(H, "Records"))
M.fields["notes"] = H.med_record
else
M.fields["notes"] = "No notes found."
medical += M
//Security Record
var/datum/data/record/S = new()
S.fields["id"] = id
S.fields["name"] = H.real_name
S.fields["criminal"] = "None"
S.fields["mi_crim"] = "None"
S.fields["mi_crim_d"] = "No minor crime convictions."
S.fields["ma_crim"] = "None"
S.fields["ma_crim_d"] = "No major crime convictions."
S.fields["notes"] = "No notes."
var/datum/data/record/S = CreateSecurityRecord(H.real_name, id)
if(H.sec_record && !jobban_isbanned(H, "Records"))
S.fields["notes"] = H.sec_record
else
S.fields["notes"] = "No notes."
security += S
//Locked Record
var/datum/data/record/L = new()
@@ -141,7 +227,7 @@
/proc/generate_record_id()
return add_zero(num2hex(rand(1, 65535)), 4) //no point generating higher numbers because of the limitations of num2hex
/proc/get_id_photo(var/mob/living/carbon/human/H)
proc/get_id_photo(var/mob/living/carbon/human/H, var/assigned_role)
var/icon/preview_icon = null
var/g = "m"
@@ -195,7 +281,8 @@
eyes_s.Blend(facial_s, ICON_OVERLAY)
var/icon/clothes_s = null
switch(H.mind.assigned_role)
if(!assigned_role) assigned_role = H.mind.assigned_role
switch(assigned_role)
if("Head of Personnel")
clothes_s = new /icon('icons/mob/uniform.dmi', "hop_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
@@ -299,3 +386,106 @@
qdel(clothes_s)
return preview_icon
/datum/datacore/proc/CreateGeneralRecord(var/mob/living/carbon/human/H, var/id)
ResetPDAManifest()
var/icon/front
var/icon/side
if(H)
front = getFlatIcon(H, SOUTH, always_use_defdir = 1)
side = getFlatIcon(H, WEST, always_use_defdir = 1)
else
var/mob/living/carbon/human/dummy = new()
front = new(get_id_photo(dummy), dir = SOUTH)
side = new(get_id_photo(dummy), dir = WEST)
qdel(dummy)
if(!id) id = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
var/datum/data/record/G = new /datum/data/record()
G.name = "Employee Record #[id]"
G.fields["name"] = "New Record"
G.fields["id"] = id
G.fields["rank"] = "Unassigned"
G.fields["real_rank"] = "Unassigned"
G.fields["sex"] = "Male"
G.fields["age"] = "Unknown"
G.fields["fingerprint"] = "Unknown"
G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable"
G.fields["species"] = "Human"
G.fields["home_system"] = "Unknown"
G.fields["citizenship"] = "Unknown"
G.fields["faction"] = "Unknown"
G.fields["religion"] = "Unknown"
G.fields["photo_front"] = front
G.fields["photo_side"] = side
G.fields["notes"] = "No notes found."
general += G
return G
/datum/datacore/proc/CreateSecurityRecord(var/name, var/id)
ResetPDAManifest()
var/datum/data/record/R = new /datum/data/record()
R.name = "Security Record #[id]"
R.fields["name"] = name
R.fields["id"] = id
R.fields["criminal"] = "None"
R.fields["mi_crim"] = "None"
R.fields["mi_crim_d"] = "No minor crime convictions."
R.fields["ma_crim"] = "None"
R.fields["ma_crim_d"] = "No major crime convictions."
R.fields["notes"] = "No notes."
R.fields["notes"] = "No notes."
data_core.security += R
return R
/datum/datacore/proc/CreateMedicalRecord(var/name, var/id)
ResetPDAManifest()
var/datum/data/record/M = new()
M.name = "Medical Record #[id]"
M.fields["id"] = id
M.fields["name"] = name
M.fields["b_type"] = "AB+"
M.fields["b_dna"] = md5(name)
M.fields["mi_dis"] = "None"
M.fields["mi_dis_d"] = "No minor disabilities have been declared."
M.fields["ma_dis"] = "None"
M.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
M.fields["alg"] = "None"
M.fields["alg_d"] = "No allergies have been detected in this patient."
M.fields["cdi"] = "None"
M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
M.fields["notes"] = "No notes found."
data_core.medical += M
return M
/datum/datacore/proc/ResetPDAManifest()
if(PDA_Manifest.len)
PDA_Manifest.Cut()
/proc/find_general_record(field, value)
return find_record(field, value, data_core.general)
/proc/find_medical_record(field, value)
return find_record(field, value, data_core.medical)
/proc/find_security_record(field, value)
return find_record(field, value, data_core.security)
/proc/find_record(field, value, list/L)
for(var/datum/data/record/R in L)
if(R.fields[field] == value)
return R
/proc/GetAssignment(var/mob/living/carbon/human/H)
if(H.mind.role_alt_title)
return H.mind.role_alt_title
else if(H.mind.assigned_role)
return H.mind.assigned_role
else if(H.job)
return H.job
else
return "Unassigned"
-954
View File
@@ -1,954 +0,0 @@
// reference: /client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
client
proc/debug_variables(datum/D in world)
set category = "Debug"
set name = "View Variables"
//set src in world
if(!usr.client || !usr.client.holder)
usr << "\red You need to be an administrator to access this."
return
var/title = ""
var/body = ""
if(!D) return
if(istype(D, /atom))
var/atom/A = D
title = "[A.name] (\ref[A]) = [A.type]"
#ifdef VARSICON
if (A.icon)
body += debug_variable("icon", new/icon(A.icon, A.icon_state, A.dir), 0)
#endif
var/icon/sprite
if(istype(D,/atom))
var/atom/AT = D
if(AT.icon && AT.icon_state)
sprite = new /icon(AT.icon, AT.icon_state)
usr << browse_rsc(sprite, "view_vars_sprite.png")
title = "[D] (\ref[D]) = [D.type]"
body += {"<script type="text/javascript">
function updateSearch(){
var filter_text = document.getElementById('filter');
var filter = filter_text.value.toLowerCase();
if(event.keyCode == 13){ //Enter / return
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.style.backgroundColor == "#ffee88" )
{
alist = lis\[i\].getElementsByTagName("a")
if(alist.length > 0){
location.href=alist\[0\].href;
}
}
}catch(err) { }
}
return
}
if(event.keyCode == 38){ //Up arrow
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.style.backgroundColor == "#ffee88" )
{
if( (i-1) >= 0){
var li_new = lis\[i-1\];
li.style.backgroundColor = "white";
li_new.style.backgroundColor = "#ffee88";
return
}
}
}catch(err) { }
}
return
}
if(event.keyCode == 40){ //Down arrow
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.style.backgroundColor == "#ffee88" )
{
if( (i+1) < lis.length){
var li_new = lis\[i+1\];
li.style.backgroundColor = "white";
li_new.style.backgroundColor = "#ffee88";
return
}
}
}catch(err) { }
}
return
}
//This part here resets everything to how it was at the start so the filter is applied to the complete list. Screw efficiency, it's client-side anyway and it only looks through 200 or so variables at maximum anyway (mobs).
if(complete_list != null && complete_list != ""){
var vars_ol1 = document.getElementById("vars");
vars_ol1.innerHTML = complete_list
}
if(filter.value == ""){
return;
}else{
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.innerText.toLowerCase().indexOf(filter) == -1 )
{
vars_ol.removeChild(li);
i--;
}
}catch(err) { }
}
}
var lis_new = vars_ol.getElementsByTagName("li");
for ( var j = 0; j < lis_new.length; ++j )
{
var li1 = lis\[j\];
if (j == 0){
li1.style.backgroundColor = "#ffee88";
}else{
li1.style.backgroundColor = "white";
}
}
}
function selectTextField(){
var filter_text = document.getElementById('filter');
filter_text.focus();
filter_text.select();
}
function loadPage(list) {
if(list.options\[list.selectedIndex\].value == ""){
return;
}
location.href=list.options\[list.selectedIndex\].value;
}
</script> "}
body += "<body onload='selectTextField(); updateSearch()' onkeyup='updateSearch()'>"
body += "<div align='center'><table width='100%'><tr><td width='50%'>"
if(sprite)
body += "<table align='center' width='100%'><tr><td><img src='view_vars_sprite.png'></td><td>"
else
body += "<table align='center' width='100%'><tr><td>"
body += "<div align='center'>"
if(istype(D,/atom))
var/atom/A = D
if(isliving(A))
body += "<a href='?_src_=vars;rename=\ref[D]'><b>[D]</b></a>"
if(A.dir)
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
var/mob/living/M = A
body += "<br><font size='1'><a href='?_src_=vars;datumedit=\ref[D];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='?_src_=vars;datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
body += {"
<br><font size='1'>
BRUTE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brute'>[M.getBruteLoss()]</a>
FIRE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=fire'>[M.getFireLoss()]</a>
TOXIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=toxin'>[M.getToxLoss()]</a>
OXY:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=oxygen'>[M.getOxyLoss()]</a>
CLONE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=clone'>[M.getCloneLoss()]</a>
BRAIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brain'>[M.getBrainLoss()]</a>
</font>
"}
else
body += "<a href='?_src_=vars;datumedit=\ref[D];varnameedit=name'><b>[D]</b></a>"
if(A.dir)
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
else
body += "<b>[D]</b>"
body += "</div>"
body += "</tr></td></table>"
var/formatted_type = text("[D.type]")
if(length(formatted_type) > 25)
var/middle_point = length(formatted_type) / 2
var/splitpoint = findtext(formatted_type,"/",middle_point)
if(splitpoint)
formatted_type = "[copytext(formatted_type,1,splitpoint)]<br>[copytext(formatted_type,splitpoint)]"
else
formatted_type = "Type too long" //No suitable splitpoint (/) found.
body += "<div align='center'><b><font size='1'>[formatted_type]</font></b>"
if(src.holder && src.holder.marked_datum && src.holder.marked_datum == D)
body += "<br><font size='1' color='red'><b>Marked Object</b></font>"
body += "</div>"
body += "</div></td>"
body += "<td width='50%'><div align='center'><a href='?_src_=vars;datumrefresh=\ref[D]'>Refresh</a>"
//if(ismob(D))
// body += "<br><a href='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</a></div></td></tr></table></div><hr>"
body += {" <form>
<select name="file" size="1"
onchange="loadPage(this.form.elements\[0\])"
target="_parent._top"
onmouseclick="this.focus()"
style="background-color:#ffffff">
"}
body += {" <option value>Select option</option>
<option value> </option>
"}
body += "<option value='?_src_=vars;mark_object=\ref[D]'>Mark Object</option>"
if(ismob(D))
body += "<option value='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</option>"
body += "<option value>---</option>"
if(ismob(D))
body += "<option value='?_src_=vars;give_spell=\ref[D]'>Give Spell</option>"
body += "<option value='?_src_=vars;give_disease2=\ref[D]'>Give Disease</option>"
body += "<option value='?_src_=vars;give_disease=\ref[D]'>Give TG-style Disease</option>"
body += "<option value='?_src_=vars;godmode=\ref[D]'>Toggle Godmode</option>"
body += "<option value='?_src_=vars;build_mode=\ref[D]'>Toggle Build Mode</option>"
body += "<option value='?_src_=vars;ninja=\ref[D]'>Make Space Ninja</option>"
body += "<option value='?_src_=vars;make_skeleton=\ref[D]'>Make 2spooky</option>"
body += "<option value='?_src_=vars;direct_control=\ref[D]'>Assume Direct Control</option>"
body += "<option value='?_src_=vars;drop_everything=\ref[D]'>Drop Everything</option>"
body += "<option value='?_src_=vars;regenerateicons=\ref[D]'>Regenerate Icons</option>"
body += "<option value='?_src_=vars;addlanguage=\ref[D]'>Add Language</option>"
body += "<option value='?_src_=vars;remlanguage=\ref[D]'>Remove Language</option>"
body += "<option value='?_src_=vars;addorgan=\ref[D]'>Add Organ</option>"
body += "<option value='?_src_=vars;remorgan=\ref[D]'>Remove Organ</option>"
body += "<option value='?_src_=vars;fix_nano=\ref[D]'>Fix NanoUI</option>"
body += "<option value='?_src_=vars;addverb=\ref[D]'>Add Verb</option>"
body += "<option value='?_src_=vars;remverb=\ref[D]'>Remove Verb</option>"
if(ishuman(D))
body += "<option value>---</option>"
body += "<option value='?_src_=vars;setspecies=\ref[D]'>Set Species</option>"
body += "<option value='?_src_=vars;makeai=\ref[D]'>Make AI</option>"
body += "<option value='?_src_=vars;makerobot=\ref[D]'>Make cyborg</option>"
body += "<option value='?_src_=vars;makemonkey=\ref[D]'>Make monkey</option>"
body += "<option value='?_src_=vars;makealien=\ref[D]'>Make alien</option>"
body += "<option value='?_src_=vars;makeslime=\ref[D]'>Make slime</option>"
body += "<option value>---</option>"
body += "<option value='?_src_=vars;gib=\ref[D]'>Gib</option>"
if(isobj(D))
body += "<option value='?_src_=vars;delall=\ref[D]'>Delete all of type</option>"
if(isobj(D) || ismob(D) || isturf(D))
body += "<option value='?_src_=vars;explode=\ref[D]'>Trigger explosion</option>"
body += "<option value='?_src_=vars;emp=\ref[D]'>Trigger EM pulse</option>"
body += "</select></form>"
body += "</div></td></tr></table></div><hr>"
body += "<font size='1'><b>E</b> - Edit, tries to determine the variable type by itself.<br>"
body += "<b>C</b> - Change, asks you for the var type first.<br>"
body += "<b>M</b> - Mass modify: changes this variable for all objects of this type.</font><br>"
body += "<hr><table width='100%'><tr><td width='20%'><div align='center'><b>Search:</b></div></td><td width='80%'><input type='text' id='filter' name='filter_text' value='' style='width:100%;'></td></tr></table><hr>"
body += "<ol id='vars'>"
var/list/names = list()
for (var/V in D.vars)
names += V
names = sortList(names)
for (var/V in names)
body += debug_variable(V, D.vars[V], 0, D)
body += "</ol>"
var/html = "<html><head>"
if (title)
html += "<title>[title]</title>"
html += {"<style>
body
{
font-family: Verdana, sans-serif;
font-size: 9pt;
}
.value
{
font-family: "Courier New", monospace;
font-size: 8pt;
}
</style>"}
html += "</head><body>"
html += body
html += {"
<script type='text/javascript'>
var vars_ol = document.getElementById("vars");
var complete_list = vars_ol.innerHTML;
</script>
"}
html += "</body></html>"
usr << browse(html, "window=variables\ref[D];size=475x650")
return
proc/debug_variable(name, value, level, var/datum/DA = null)
var/html = ""
if(DA)
html += "<li style='backgroundColor:white'>(<a href='?_src_=vars;datumedit=\ref[DA];varnameedit=[name]'>E</a>) (<a href='?_src_=vars;datumchange=\ref[DA];varnamechange=[name]'>C</a>) (<a href='?_src_=vars;datummass=\ref[DA];varnamemass=[name]'>M</a>) "
else
html += "<li>"
if (isnull(value))
html += "[name] = <span class='value'>null</span>"
else if (istext(value))
html += "[name] = <span class='value'>\"[value]\"</span>"
else if (isicon(value))
#ifdef VARSICON
var/icon/I = new/icon(value)
var/rnd = rand(1,10000)
var/rname = "tmp\ref[I][rnd].png"
usr << browse_rsc(I, rname)
html += "[name] = (<span class='value'>[value]</span>) <img class=icon src=\"[rname]\">"
#else
html += "[name] = /icon (<span class='value'>[value]</span>)"
#endif
/* else if (istype(value, /image))
#ifdef VARSICON
var/rnd = rand(1, 10000)
var/image/I = value
src << browse_rsc(I.icon, "tmp\ref[value][rnd].png")
html += "[name] = <img src=\"tmp\ref[value][rnd].png\">"
#else
html += "[name] = /image (<span class='value'>[value]</span>)"
#endif
*/
else if (isfile(value))
html += "[name] = <span class='value'>'[value]'</span>"
else if (istype(value, /datum))
var/datum/D = value
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [D.type]"
else if (istype(value, /client))
var/client/C = value
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [C] [C.type]"
//
else if (istype(value, /list))
var/list/L = value
html += "[name] = /list ([L.len])"
if (L.len > 0 && !(name == "underlays" || name == "overlays" || name == "vars" || L.len > 500))
// not sure if this is completely right...
if(0) //(L.vars.len > 0)
html += "<ol>"
html += "</ol>"
else
html += "<ul>"
var/index = 1
for (var/entry in L)
if(istext(entry))
html += debug_variable(entry, L[entry], level + 1)
//html += debug_variable("[index]", L[index], level + 1)
else
html += debug_variable(index, L[index], level + 1)
index++
html += "</ul>"
else
html += "[name] = <span class='value'>[value]</span>"
html += "</li>"
return html
/client/proc/view_var_Topic(href, href_list, hsrc)
//This should all be moved over to datum/admins/Topic() or something ~Carn
if( (usr.client != src) || !src.holder )
return
if(href_list["Vars"])
debug_variables(locate(href_list["Vars"]))
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
else if(href_list["rename"])
if(!check_rights(R_VAREDIT|R_DEV)) return
var/mob/M = locate(href_list["rename"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
var/new_name = sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null, MAX_NAME_LEN)
if( !new_name || !M ) return
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
M.fully_replace_character_name(M.real_name,new_name)
href_list["datumrefresh"] = href_list["rename"]
else if(href_list["varnameedit"] && href_list["datumedit"])
if(!check_rights(R_VAREDIT|R_DEV)) return
var/D = locate(href_list["datumedit"])
if(!istype(D,/datum) && !istype(D,/client))
usr << "This can only be used on instances of types /client or /datum"
return
modify_variables(D, href_list["varnameedit"], 1)
else if(href_list["varnamechange"] && href_list["datumchange"])
if(!check_rights(R_VAREDIT|R_DEV)) return
var/D = locate(href_list["datumchange"])
if(!istype(D,/datum) && !istype(D,/client))
usr << "This can only be used on instances of types /client or /datum"
return
modify_variables(D, href_list["varnamechange"], 0)
else if(href_list["varnamemass"] && href_list["datummass"])
if(!check_rights(R_VAREDIT|R_DEV)) return
var/atom/A = locate(href_list["datummass"])
if(!istype(A))
usr << "This can only be used on instances of type /atom"
return
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
else if(href_list["mob_player_panel"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["mob_player_panel"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.holder.show_player_panel(M)
href_list["datumrefresh"] = href_list["mob_player_panel"]
else if(href_list["give_spell"])
if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_spell"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.give_spell(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["give_disease"])
if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_disease"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.give_disease(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["give_disease2"])
if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_disease2"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.give_disease2(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["godmode"])
if(!check_rights(R_REJUVINATE)) return
var/mob/M = locate(href_list["godmode"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.cmd_admin_godmode(M)
href_list["datumrefresh"] = href_list["godmode"]
else if(href_list["gib"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["gib"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.cmd_admin_gib(M)
else if(href_list["build_mode"])
if(!check_rights(R_BUILDMODE|R_DEV)) return
var/mob/M = locate(href_list["build_mode"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
togglebuildmode(M)
href_list["datumrefresh"] = href_list["build_mode"]
else if(href_list["drop_everything"])
if(!check_rights(R_DEBUG|R_ADMIN)) return
var/mob/M = locate(href_list["drop_everything"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
if(usr.client)
usr.client.cmd_admin_drop_everything(M)
else if(href_list["direct_control"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["direct_control"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
if(usr.client)
usr.client.cmd_assume_direct_control(M)
else if(href_list["make_skeleton"])
if(!check_rights(R_FUN)) return
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
return
H.ChangeToSkeleton()
href_list["datumrefresh"] = href_list["make_skeleton"]
else if(href_list["delall"])
if(!check_rights(R_DEBUG|R_SERVER)) return
var/obj/O = locate(href_list["delall"])
if(!isobj(O))
usr << "This can only be used on instances of type /obj"
return
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
if(action_type == "Cancel" || !action_type)
return
if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes")
return
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
return
var/O_type = O.type
switch(action_type)
if("Strict type")
var/i = 0
for(var/obj/Obj in world)
if(Obj.type == O_type)
i++
qdel(Obj)
if(!i)
usr << "No objects of this type exist"
return
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
message_admins("\blue [key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
if("Type and subtypes")
var/i = 0
for(var/obj/Obj in world)
if(istype(Obj,O_type))
i++
qdel(Obj)
if(!i)
usr << "No objects of this type exist"
return
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
else if(href_list["explode"])
if(!check_rights(R_DEBUG|R_FUN)) return
var/atom/A = locate(href_list["explode"])
if(!isobj(A) && !ismob(A) && !isturf(A))
usr << "This can only be done to instances of type /obj, /mob and /turf"
return
src.cmd_admin_explosion(A)
href_list["datumrefresh"] = href_list["explode"]
else if(href_list["emp"])
if(!check_rights(R_DEBUG|R_FUN)) return
var/atom/A = locate(href_list["emp"])
if(!isobj(A) && !ismob(A) && !isturf(A))
usr << "This can only be done to instances of type /obj, /mob and /turf"
return
src.cmd_admin_emp(A)
href_list["datumrefresh"] = href_list["emp"]
else if(href_list["mark_object"])
if(!check_rights(0)) return
var/datum/D = locate(href_list["mark_object"])
if(!istype(D))
usr << "This can only be done to instances of type /datum"
return
src.holder.marked_datum = D
href_list["datumrefresh"] = href_list["mark_object"]
else if(href_list["rotatedatum"])
if(!check_rights(0)) return
var/atom/A = locate(href_list["rotatedatum"])
if(!istype(A))
usr << "This can only be done to instances of type /atom"
return
switch(href_list["rotatedir"])
if("right") A.set_dir(turn(A.dir, -45))
if("left") A.set_dir(turn(A.dir, 45))
href_list["datumrefresh"] = href_list["rotatedatum"]
else if(href_list["makemonkey"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
else if(href_list["makerobot"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
else if(href_list["makealien"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makealien"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makealien"=href_list["makealien"]))
else if(href_list["makeslime"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makeslime"=href_list["makeslime"]))
else if(href_list["makeai"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makeai"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makeai"=href_list["makeai"]))
else if(href_list["setspecies"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["setspecies"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
var/new_species = input("Please choose a new species.","Species",null) as null|anything in all_species
if(!H)
usr << "Mob doesn't exist anymore"
return
if(H.set_species(new_species))
usr << "Set species of [H] to [H.species]."
else
usr << "Failed! Something went wrong."
else if(href_list["addlanguage"])
if(!check_rights(R_SPAWN)) return
var/mob/H = locate(href_list["addlanguage"])
if(!istype(H))
usr << "This can only be done to instances of type /mob"
return
var/new_language = input("Please choose a language to add.","Language",null) as null|anything in all_languages
if(!new_language)
return
if(!H)
usr << "Mob doesn't exist anymore"
return
if(H.add_language(new_language))
usr << "Added [new_language] to [H]."
else
usr << "Mob already knows that language."
else if(href_list["remlanguage"])
if(!check_rights(R_SPAWN)) return
var/mob/H = locate(href_list["remlanguage"])
if(!istype(H))
usr << "This can only be done to instances of type /mob"
return
if(!H.languages.len)
usr << "This mob knows no languages."
return
var/datum/language/rem_language = input("Please choose a language to remove.","Language",null) as null|anything in H.languages
if(!rem_language)
return
if(!H)
usr << "Mob doesn't exist anymore"
return
if(H.remove_language(rem_language.name))
usr << "Removed [rem_language] from [H]."
else
usr << "Mob doesn't know that language."
else if(href_list["addverb"])
if(!check_rights(R_DEBUG|R_DEV)) return
var/mob/living/H = locate(href_list["addverb"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living"
return
var/list/possibleverbs = list()
possibleverbs += "Cancel" // One for the top...
possibleverbs += typesof(/mob/proc,/mob/verb,/mob/living/proc,/mob/living/verb)
switch(H.type)
if(/mob/living/carbon/human)
possibleverbs += typesof(/mob/living/carbon/proc,/mob/living/carbon/verb,/mob/living/carbon/human/verb,/mob/living/carbon/human/proc)
if(/mob/living/silicon/robot)
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/robot/proc,/mob/living/silicon/robot/verb)
if(/mob/living/silicon/ai)
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc,/mob/living/silicon/ai/verb)
possibleverbs -= H.verbs
possibleverbs += "Cancel" // ...And one for the bottom
var/verb = input("Select a verb!", "Verbs",null) as anything in possibleverbs
if(!H)
usr << "Mob doesn't exist anymore"
return
if(!verb || verb == "Cancel")
return
else
H.verbs += verb
else if(href_list["remverb"])
if(!check_rights(R_DEBUG|R_DEV)) return
var/mob/H = locate(href_list["remverb"])
if(!istype(H))
usr << "This can only be done to instances of type /mob"
return
var/verb = input("Please choose a verb to remove.","Verbs",null) as null|anything in H.verbs
if(!H)
usr << "Mob doesn't exist anymore"
return
if(!verb)
return
else
H.verbs -= verb
else if(href_list["addorgan"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/M = locate(href_list["addorgan"])
if(!istype(M))
usr << "This can only be done to instances of type /mob/living/carbon"
return
var/new_organ = input("Please choose an organ to add.","Organ",null) as null|anything in typesof(/obj/item/organ)-/obj/item/organ
if(!new_organ) return
if(!M)
usr << "Mob doesn't exist anymore"
return
if(locate(new_organ) in M.internal_organs)
usr << "Mob already has that organ."
return
new new_organ(M)
else if(href_list["remorgan"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/M = locate(href_list["remorgan"])
if(!istype(M))
usr << "This can only be done to instances of type /mob/living/carbon"
return
var/obj/item/organ/rem_organ = input("Please choose an organ to remove.","Organ",null) as null|anything in M.internal_organs
if(!M)
usr << "Mob doesn't exist anymore"
return
if(!(locate(rem_organ) in M.internal_organs))
usr << "Mob does not have that organ."
return
usr << "Removed [rem_organ] from [M]."
rem_organ.removed()
qdel(rem_organ)
else if(href_list["fix_nano"])
if(!check_rights(R_DEBUG)) return
var/mob/H = locate(href_list["fix_nano"])
if(!istype(H) || !H.client)
usr << "This can only be done on mobs with clients"
return
nanomanager.send_resources(H.client)
usr << "Resource files sent"
H << "Your NanoUI Resource files have been refreshed"
log_admin("[key_name(usr)] resent the NanoUI resource files to [key_name(H)] ")
else if(href_list["regenerateicons"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["regenerateicons"])
if(!ismob(M))
usr << "This can only be done to instances of type /mob"
return
M.regenerate_icons()
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
if(!check_rights(R_DEBUG|R_ADMIN|R_FUN)) return
var/mob/living/L = locate(href_list["mobToDamage"])
if(!istype(L)) return
var/Text = href_list["adjustDamage"]
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
if(!L)
usr << "Mob doesn't exist anymore"
return
switch(Text)
if("brute") L.adjustBruteLoss(amount)
if("fire") L.adjustFireLoss(amount)
if("toxin") L.adjustToxLoss(amount)
if("oxygen")L.adjustOxyLoss(amount)
if("brain") L.adjustBrainLoss(amount)
if("clone") L.adjustCloneLoss(amount)
else
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
return
if(amount != 0)
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
href_list["datumrefresh"] = href_list["mobToDamage"]
if(href_list["datumrefresh"])
var/datum/DAT = locate(href_list["datumrefresh"])
if(!istype(DAT, /datum))
return
src.debug_variables(DAT)
return
+8 -7
View File
@@ -53,14 +53,15 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
// if hidden[2] is true, then virus is hidden from PANDEMIC machine
/datum/disease/proc/stage_act()
// Some species are immune to viruses entirely.
if(affected_mob && istype(affected_mob, /mob/living/carbon/human))
var/mob/living/carbon/human/H = affected_mob
if(H.species.virus_immune)
cure()
return
age++
var/cure_present = has_cure()
//world << "[cure_present]"
if(carrier&&!cure_present)
//world << "[affected_mob] is carrier"
return
spread = (cure_present?"Remissive":initial_spread)
if(stage > max_stages)
stage = max_stages
@@ -126,7 +127,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
source = affected_mob
else //no source and no mob affected. Rogue disease. Break
return
if(affected_mob.reagents != null)
if(affected_mob)
if(affected_mob.reagents.has_reagent("spaceacillin"))
+5 -5
View File
@@ -53,25 +53,25 @@
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your throat feels sore."
affected_mob << "<span class='warning'>Your throat feels sore.</span>"
if(prob(1))
affected_mob << "\red Mucous runs down the back of your throat."
affected_mob << "<span class='warning'>Mucous runs down the back of your throat.</span>"
if(4)
if(prob(1))
affected_mob.emote("sneeze")
if(prob(1))
affected_mob.emote("cough")
if(prob(2))
affected_mob << "\red Your muscles ache."
affected_mob << "<span class='warning'>Your muscles ache.</span>"
if(prob(20))
affected_mob.take_organ_damage(1)
if(prob(2))
affected_mob << "\red Your stomach hurts."
affected_mob << "<span class='warning'>Your stomach hurts.</span>"
if(prob(20))
affected_mob.adjustToxLoss(1)
affected_mob.updatehealth()
if(5)
affected_mob << "\red You feel something tearing its way out of your stomach..."
affected_mob << "<span class='danger'>You feel something tearing its way out of your stomach...</span>"
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(50))
+10 -5
View File
@@ -24,21 +24,26 @@
if(stage == 1)
if(prob(5))
affected_mob << "\red You feel a stinging pain in your abdomen!"
affected_mob << "<span class='warning'>You feel a stinging pain in your abdomen!</span>"
affected_mob.emote("me",1,"winces slightly.")
if(stage > 1)
if(prob(3))
affected_mob << "\red You feel a stabbing pain in your abdomen!"
affected_mob << "<span class='warning'>You feel a stabbing pain in your abdomen!</span>"
affected_mob.emote("me",1,"winces painfully.")
affected_mob.adjustToxLoss(1)
if(stage > 2)
if(prob(1))
var/mob/living/carbon/human/H = affected_mob
H.delayed_vomit()
if (affected_mob.nutrition > 100)
var/mob/living/carbon/human/H = affected_mob
H.delayed_vomit()
else
affected_mob << "<span class='danger'>You gag as you want to throw up, but there's nothing in your stomach!</span>"
affected_mob.Weaken(10)
affected_mob.adjustToxLoss(3)
if(stage > 3)
if(prob(1) && ishuman(affected_mob))
var/mob/living/carbon/human/H = affected_mob
H << "\red Your abdomen is a world of pain!"
H << "<span class='danger'>Your abdomen is a world of pain!</span>"
H.Weaken(10)
var/obj/item/organ/external/groin = H.get_organ("groin")
+4 -4
View File
@@ -14,12 +14,12 @@
switch(stage)
if(1)
if(prob(2))
affected_mob << "\red You feel like something is moving inside of you"
affected_mob << "<span class='warning'>You feel like something is moving inside of you!</span>"
if(2) //also changes say, see say.dm
if(prob(2))
affected_mob << "\red You feel like something is moving inside of you"
affected_mob << "<span class='warning'>You feel like something is moving inside of you!</span>"
if(prob(2))
affected_mob << "\red BZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
affected_mob << "<span class='danger'>BZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ</span>"
if(3)
//Should give the bee spit verb
if(4)
@@ -28,4 +28,4 @@
//Plus if you die, you explode into bees
return
*/
//Started working on it, but am too lazy to finish it today -- Urist
//Started working on it, but am too lazy to finish it today -- Urist
+7 -7
View File
@@ -21,7 +21,7 @@
if(prob(2))
affected_mob.emote("yawn")
if(prob(2))
affected_mob << "\red Your don't feel like yourself."
affected_mob << "<span class='warning'>Your don't feel like yourself.</span>"
if(prob(5))
affected_mob.adjustBrainLoss(1)
affected_mob.updatehealth()
@@ -34,12 +34,12 @@
affected_mob.adjustBrainLoss(2)
affected_mob.updatehealth()
if(prob(2))
affected_mob << "\red Your try to remember something important...but can't."
affected_mob << "<span class='warning'>You try to remember something important...but can't.</span>"
/* if(prob(10))
affected_mob.adjustToxLoss(3)
affected_mob.updatehealth()
if(prob(2))
affected_mob << "\red Your head hurts." */
affected_mob << "<span class='warning'>Your head hurts.</span>" */
if(4)
if(prob(2))
affected_mob.emote("stare")
@@ -49,14 +49,14 @@
affected_mob.adjustToxLoss(4)
affected_mob.updatehealth()
if(prob(2))
affected_mob << "\red Your head hurts." */
affected_mob << "<span class='notice'>Your head hurts.</span>" */
if(prob(15) && affected_mob.getBrainLoss()<=98) //shouldn't retard you to death now
affected_mob.adjustBrainLoss(3)
affected_mob.updatehealth()
if(prob(2))
affected_mob << "\red Strange buzzing fills your head, removing all thoughts."
affected_mob << "<span class='warning'>A strange buzzing fills your head, removing all thoughts.</span>"
if(prob(3))
affected_mob << "\red You lose consciousness..."
affected_mob << "<span class='warning'>You lose consciousness...</span>"
for(var/mob/O in viewers(affected_mob, null))
O.show_message("[affected_mob] suddenly collapses", 1)
affected_mob.Paralyse(rand(5,10))
@@ -64,4 +64,4 @@
affected_mob.emote("snore")
if(prob(15))
affected_mob.stuttering += 3
return
return
+11 -11
View File
@@ -16,16 +16,16 @@
if(2)
/*
if(affected_mob.sleeping && prob(40)) //removed until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
*/
if(affected_mob.lying && prob(40)) //changed FROM prob(10) until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if(prob(1) && prob(5))
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if(prob(1))
@@ -33,22 +33,22 @@
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your throat feels sore."
affected_mob << "<span class='warning'>Your throat feels sore.</span>"
if(prob(1))
affected_mob << "\red Mucous runs down the back of your throat."
affected_mob << "<span class='warning'>Mucous runs down the back of your throat.</span>"
if(3)
/*
if(affected_mob.sleeping && prob(25)) //removed until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
*/
if(affected_mob.lying && prob(25)) //changed FROM prob(5) until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if(prob(1) && prob(1))
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if(prob(1))
@@ -56,11 +56,11 @@
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your throat feels sore."
affected_mob << "<span class='warning'>Your throat feels sore.</span>"
if(prob(1))
affected_mob << "\red Mucous runs down the back of your throat."
affected_mob << "<span class='warning'>Mucous runs down the back of your throat.</span>"
if(prob(1) && prob(50))
if(!affected_mob.resistances.Find(/datum/disease/flu))
var/datum/disease/Flu = new /datum/disease/flu(0)
affected_mob.contract_disease(Flu,1)
cure()
cure()
+5 -5
View File
@@ -16,7 +16,7 @@
if(2)
affected_mob.bodytemperature -= 10
if(prob(1) && prob(10))
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if(prob(1))
@@ -24,9 +24,9 @@
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your throat feels sore."
affected_mob << "<span class='warning'>Your throat feels sore.</span>"
if(prob(5))
affected_mob << "\red You feel stiff."
affected_mob << "<span class='warning'>You feel stiff.</span>"
if(3)
affected_mob.bodytemperature -= 20
if(prob(1))
@@ -34,6 +34,6 @@
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your throat feels sore."
affected_mob << "<span class='warning'>Your throat feels sore.</span>"
if(prob(10))
affected_mob << "\red You feel stiff."
affected_mob << "<span class='warning'>You feel stiff.</span>"
+5 -5
View File
@@ -23,11 +23,11 @@
if(prob(8))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your muscles ache."
affected_mob << "<span class='warning'>Your muscles ache.</span>"
if(prob(20))
affected_mob.take_organ_damage(1)
if(prob(1))
affected_mob << "\red Your stomach hurts."
affected_mob << "<span class='warning'>Your stomach hurts.</span>"
if(prob(20))
affected_mob.adjustToxLoss(2)
affected_mob.updatehealth()
@@ -42,7 +42,7 @@
src.original_dna["UI"] = affected_mob.dna.UI.Copy()
src.original_dna["SE"] = affected_mob.dna.SE.Copy()
affected_mob << "\red You don't feel like yourself.."
affected_mob << "<span class='warning'>You don't feel like yourself..</span>"
var/list/newUI=strain_data["UI"]
var/list/newSE=strain_data["SE"]
affected_mob.UpdateAppearance(newUI.Copy())
@@ -65,5 +65,5 @@
affected_mob.dna.UpdateSE()
affected_mob.real_name = original_dna["name"]
affected_mob << "\blue You feel more like yourself."
..()
affected_mob << "<span class='notice'>You feel more like yourself.</span>"
..()
+1 -1
View File
@@ -22,7 +22,7 @@
else if(prob(5))
affected_mob.emote("gasp")
if(prob(10))
affected_mob << "\red You're starting to feel very weak..."
affected_mob << "<span class='warning'>You're starting to feel very weak...</span>"
if(4)
if(prob(10))
affected_mob.emote("cough")
+8 -8
View File
@@ -17,12 +17,12 @@
if(2)
/*
if(affected_mob.sleeping && prob(20)) //removed until sleeping is fixed --Blaank
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
stage--
return
*/
if(affected_mob.lying && prob(20)) //added until sleeping is fixed --Blaank
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
stage--
return
if(prob(1))
@@ -30,11 +30,11 @@
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your muscles ache."
affected_mob << "<span class='warning'>Your muscles ache.</span>"
if(prob(20))
affected_mob.take_organ_damage(1)
if(prob(1))
affected_mob << "\red Your stomach hurts."
affected_mob << "<span class='warning'>Your stomach hurts.</span>"
if(prob(20))
affected_mob.adjustToxLoss(1)
affected_mob.updatehealth()
@@ -42,12 +42,12 @@
if(3)
/*
if(affected_mob.sleeping && prob(15)) //removed until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
stage--
return
*/
if(affected_mob.lying && prob(15)) //added until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
stage--
return
if(prob(1))
@@ -55,11 +55,11 @@
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your muscles ache."
affected_mob << "<span class='warning'>Your muscles ache.</span>"
if(prob(20))
affected_mob.take_organ_damage(1)
if(prob(1))
affected_mob << "\red Your stomach hurts."
affected_mob << "<span class='warning'>Your stomach hurts.</span>"
if(prob(20))
affected_mob.adjustToxLoss(1)
affected_mob.updatehealth()
+2 -2
View File
@@ -21,7 +21,7 @@
if(prob(5))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red You're burning in your own skin!"
affected_mob << "<span class='warning'>You're burning in your own skin!</span>"
affected_mob.take_organ_damage(0,5)
if(3)
@@ -31,6 +31,6 @@
if(prob(5))
affected_mob.emote("cough")
if(prob(5))
affected_mob << "\red You're burning in your own skin!"
affected_mob << "<span class='warning'>You're burning in your own skin!</span>"
affected_mob.take_organ_damage(0,5)
return
+3 -3
View File
@@ -26,15 +26,15 @@
else if(prob(5))
affected_mob.emote("gasp")
if(prob(10))
affected_mob << "\red You're starting to feel very weak..."
affected_mob << "<span class='warning'>You're starting to feel very weak...</span>"
if(4)
if(prob(10))
affected_mob.emote("cough")
affected_mob.adjustToxLoss(5)
affected_mob.updatehealth()
if(5)
affected_mob << "\red Your body feels as if it's trying to rip itself open..."
affected_mob << "<span class='warning'>Your body feels as if it's trying to rip itself open...</span>"
if(prob(50))
affected_mob.gib()
else
return
return
+6 -6
View File
@@ -16,7 +16,7 @@
switch(stage)
if(2)
if(prob(2))
affected_mob << "\red You feel a slight shock course through your body."
affected_mob << "<span class='warning'>You feel a slight shock course through your body.</span>"
if(prob(2))
for(var/obj/M in orange(2,affected_mob))
if(!M.anchored && (M.flags & CONDUCT))
@@ -36,9 +36,9 @@
*/
if(3)
if(prob(2))
affected_mob << "\red You feel a strong shock course through your body."
affected_mob << "<span class='warning'>You feel a strong shock course through your body.</span>"
if(prob(2))
affected_mob << "\red You feel like clowning around."
affected_mob << "<span class='warning'>You feel like clowning around.</span>"
if(prob(4))
for(var/obj/M in orange(4,affected_mob))
if(!M.anchored && (M.flags & CONDUCT))
@@ -64,9 +64,9 @@
*/
if(4)
if(prob(2))
affected_mob << "\red You feel a powerful shock course through your body."
affected_mob << "<span class='warning'>You feel a powerful shock course through your body.</span>"
if(prob(2))
affected_mob << "\red You query upon the nature of miracles."
affected_mob << "<span class='warning'>You query upon the nature of miracles.</span>"
if(prob(8))
for(var/obj/M in orange(6,affected_mob))
if(!M.anchored && (M.flags & CONDUCT))
@@ -90,4 +90,4 @@
else if(M.y < affected_mob.y)
M.y+=rand(1,min(5,affected_mob.y-M.y))
*/
return
return
+4 -4
View File
@@ -16,10 +16,10 @@
..()
switch(stage)
if(1)
if(prob(10)) affected_mob << "\red You feel a little silly."
if(prob(10)) affected_mob << "<span class='warning'>You feel a little silly.</span>"
if(2)
if(prob(10)) affected_mob << "\red You start seeing rainbows."
if(prob(10)) affected_mob << "<span class='warning'>You start seeing rainbows.</span>"
if(3)
if(prob(10)) affected_mob << "\red Your thoughts are interrupted by a loud <b>HONK!</b>"
if(prob(10)) affected_mob << "<span class='warning'>Your thoughts are interrupted by a loud <b>HONK!</b></span>"
if(4)
if(prob(5)) affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) )
if(prob(5)) affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) )
+17 -17
View File
@@ -33,55 +33,55 @@
if(restcure)
/*
if(affected_mob.sleeping && prob(30)) //removed until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
*/
if(affected_mob.lying && prob(30)) //changed FROM prob(20) until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if (prob(8))
affected_mob << "\red Your head hurts."
affected_mob << "<span class='warning'>Your head hurts.</span>"
if (prob(9))
affected_mob << "You feel a tingling sensation in your chest."
affected_mob << "<span class='warning'>You feel a tingling sensation in your chest.</span>"
if (prob(9))
affected_mob << "\red You feel angry."
affected_mob << "<span class='warning'>You feel angry.</span>"
if(2)
if(restcure)
/*
if(affected_mob.sleeping && prob(20)) //removed until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
*/
if(affected_mob.lying && prob(20)) //changed FROM prob(10) until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if (prob(8))
affected_mob << "\red Your skin feels loose."
affected_mob << "<span class='warning'>Your skin feels loose.</span>"
if (prob(10))
affected_mob << "You feel very strange."
affected_mob << "<span class='warning'>You feel very strange.</span>"
if (prob(4))
affected_mob << "\red You feel a stabbing pain in your head!"
affected_mob << "<span class='warning'>You feel a stabbing pain in your head!</span>"
affected_mob.Paralyse(2)
if (prob(4))
affected_mob << "\red Your stomach churns."
affected_mob << "<span class='warning'>Your stomach churns.</span>"
if(3)
if(restcure)
/*
if(affected_mob.sleeping && prob(20)) //removed until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
*/
if(affected_mob.lying && prob(20)) //changed FROM prob(10) until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if (prob(10))
affected_mob << "\red Your entire body vibrates."
affected_mob << "<span class='warning'>Your entire body vibrates.</span>"
if (prob(35))
if(prob(50))
@@ -93,16 +93,16 @@
if(restcure)
/*
if(affected_mob.sleeping && prob(10)) //removed until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
*/
if(affected_mob.lying && prob(5)) //changed FROM prob(5) until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if (prob(60))
if(prob(50))
scramble(1, affected_mob, rand(50,75))
else
scramble(0, affected_mob, rand(50,75))
scramble(0, affected_mob, rand(50,75))
+6 -6
View File
@@ -22,30 +22,30 @@
affected_mob.adjustToxLoss(5)
affected_mob.updatehealth()
if(prob(1))
affected_mob << "\red You feel strange..."
affected_mob << "<span class='warning'>You feel strange...</span>"
if(3)
if(affected_mob.ckey == "rosham")
src.cure()
if(prob(5))
affected_mob << "\red You feel the urge to dance..."
affected_mob << "<span class='warning'>You feel the urge to dance...</span>"
else if(prob(5))
affected_mob.emote("gasp")
else if(prob(10))
affected_mob << "\red You feel the need to chick chicky boom..."
affected_mob << "<span class='warning'>You feel the need to chick chicky boom...</span>"
if(4)
if(affected_mob.ckey == "rosham")
src.cure()
if(prob(10))
affected_mob.emote("gasp")
affected_mob << "\red You feel a burning beat inside..."
affected_mob << "<span class='warning'>You feel a burning beat inside...</span>"
if(prob(20))
affected_mob.adjustToxLoss(5)
affected_mob.updatehealth()
if(5)
if(affected_mob.ckey == "rosham")
src.cure()
affected_mob << "\red Your body is unable to contain the Rhumba Beat..."
affected_mob << "<span class='warning'>Your body is unable to contain the Rhumba Beat...</span>"
if(prob(50))
affected_mob.gib()
else
return
return
+10 -10
View File
@@ -19,36 +19,36 @@
switch(stage)
if(2)
if (prob(8))
affected_mob << "Your joints feel stiff."
affected_mob << "<span class='warning'>Your joints feel stiff.</span>"
affected_mob.take_organ_damage(1)
if (prob(9))
affected_mob << "\red Beep...boop.."
affected_mob << "<span class='warning'>Beep...boop..</span>"
if (prob(9))
affected_mob << "\red Bop...beeep..."
affected_mob << "<span class='warning'>Bop...beeep...</span>"
if(3)
if (prob(8))
affected_mob << "\red Your joints feel very stiff."
affected_mob << "<span class='warning'>Your joints feel very stiff.</span>"
affected_mob.take_organ_damage(1)
if (prob(8))
affected_mob.say(pick("Beep, boop", "beep, beep!", "Boop...bop"))
if (prob(10))
affected_mob << "Your skin feels loose."
affected_mob << "<span class='warning'>Your skin feels loose.</span>"
affected_mob.take_organ_damage(5)
if (prob(4))
affected_mob << "\red You feel a stabbing pain in your head."
affected_mob << "<span class='warning'>You feel a stabbing pain in your head.</span>"
affected_mob.Paralyse(2)
if (prob(4))
affected_mob << "\red You can feel something move...inside."
affected_mob << "<span class='warning'>You can feel something move...inside.</span>"
if(4)
if (prob(10))
affected_mob << "\red Your skin feels very loose."
affected_mob << "<span class='warning'>Your skin feels very loose.</span>"
affected_mob.take_organ_damage(8)
if (prob(20))
affected_mob.say(pick("beep, beep!", "Boop bop boop beep.", "kkkiiiill mmme", "I wwwaaannntt tttoo dddiiieeee..."))
if (prob(8))
affected_mob << "\red You can feel... something...inside you."
affected_mob << "<span class='warning'>You can feel... something...inside you.</span>"
if(5)
affected_mob <<"\red Your skin feels as if it's about to burst off..."
affected_mob <<"<span class='warning'>Your skin feels as if it's about to burst off...</span>"
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(40)) //So everyone can feel like robot Seth Brundle
+3 -3
View File
@@ -31,14 +31,14 @@ STI KALY - blind
if(prob(1)&&prob(50))
affected_mob.say(pick("You shall not pass!", "Expeliarmus!", "By Merlins beard!", "Feel the power of the Dark Side!"))
if(prob(1)&&prob(50))
affected_mob << "\red You feel [pick("that you don't have enough mana.", "that the winds of magic are gone.", "an urge to summon familiar.")]"
affected_mob << "<span class='warning'>You feel [pick("that you don't have enough mana.", "that the winds of magic are gone.", "an urge to summon familiar.")]</span>"
if(3)
if(prob(1)&&prob(50))
affected_mob.say(pick("NEC CANTIO!","AULIE OXIN FIERA!", "STI KALY!", "TARCOL MINTI ZHERI!"))
if(prob(1)&&prob(50))
affected_mob << "\red You feel [pick("the magic bubbling in your veins","that this location gives you a +1 to INT","an urge to summon familiar.")]."
affected_mob << "<span class='warning'>You feel [pick("the magic bubbling in your veins.","that this location gives you a +1 to INT.","an urge to summon familiar.")]</span>"
if(4)
@@ -46,7 +46,7 @@ STI KALY - blind
affected_mob.say(pick("NEC CANTIO!","AULIE OXIN FIERA!","STI KALY!","EI NATH!"))
return
if(prob(1)&&prob(50))
affected_mob << "\red You feel [pick("the tidal wave of raw power building inside","that this location gives you a +2 to INT and +1 to WIS","an urge to teleport")]."
affected_mob << "<span class='warning'>You feel [pick("the tidal wave of raw power building inside.","that this location gives you a +2 to INT and +1 to WIS.","an urge to teleport.")]</span>"
spawn_wizard_clothes(50)
if(prob(1)&&prob(1))
teleport()
+17 -14
View File
@@ -17,45 +17,48 @@
switch(stage)
if(2)
if (prob(8))
affected_mob << "Your throat feels scratchy."
affected_mob << "<span class='warning'>Your throat feels scratchy.</span>"
affected_mob.take_organ_damage(1)
if (prob(9))
affected_mob << "\red Kill..."
affected_mob << "<span class='warning'>Kill...</span>"
if (prob(9))
affected_mob << "\red Kill..."
affected_mob << "<span class='warning'>Kill...</span>"
if(3)
if (prob(8))
affected_mob << "\red Your throat feels very scratchy."
affected_mob << "<span class='warning'>Your throat feels very scratchy.</span>"
affected_mob.take_organ_damage(1)
/*
if (prob(8))
affected_mob.say(pick("Beep, boop", "beep, beep!", "Boop...bop"))
*/
if (prob(10))
affected_mob << "Your skin feels tight."
affected_mob << "<span class='warning'>Your skin feels tight.</span>"
affected_mob.take_organ_damage(5)
if (prob(4))
affected_mob << "\red You feel a stabbing pain in your head."
affected_mob << "<span class='warning'>You feel a stabbing pain in your head.</span>"
affected_mob.Paralyse(2)
if (prob(4))
affected_mob << "\red You can feel something move...inside."
affected_mob << "<span class='warning'>You can feel something move...inside.</span>"
if(4)
if (prob(10))
affected_mob << pick("\red Your skin feels very tight.", "\red Your blood boils!")
affected_mob << pick("<span class='warning'>Your skin feels very tight.</span>", "<span class='warning'>Your blood boils!</span>")
affected_mob.take_organ_damage(8)
if (prob(20))
affected_mob.say(pick("You look delicious.", "Going to... devour you...", "Hsssshhhhh!"))
if (prob(8))
affected_mob << "\red You can feel... something...inside you."
affected_mob << "<span class='warning'>You can feel... something...inside you.</span>"
if(5)
affected_mob <<"\red Your skin feels impossibly calloused..."
affected_mob <<"<span class='warning'>Your skin feels impossibly calloused...</span>"
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(40))
if(gibbed != 0) return 0
var/turf/T = find_loc(affected_mob)
gibs(T)
src.cure(0)
gibbed = 1
affected_mob:Alienize()
var/mob/living/carbon/human/H = affected_mob
if(istype(H))
var/turf/origin = find_loc(affected_mob)
gibs(origin)
H.set_species("Xenomorph [pick(list("Hunter","Sentinel","Drone"))]")
return
affected_mob.gib()
+41
View File
@@ -0,0 +1,41 @@
/datum/expansion
var/datum/holder = null // The holder
/datum/expansion/New(var/datum/holder)
if(!istype(holder))
CRASH("Invalid holder.")
src.holder = holder
..()
/datum/expansion/Destroy()
holder = null
return ..()
/datum/expansion/CanUseTopic(var/mob/user)
return holder && user ? STATUS_INTERACTIVE : STATUS_CLOSE
/datum/expansion/Topic()
if(..())
return 1
if(CanUseTopic(usr) != STATUS_INTERACTIVE)
return 1
return 0
/obj
var/list/datum/expansion/expansions = list()
/obj/Destroy()
for(var/expansion in expansions)
qdel(expansions[expansion])
expansions.Cut()
return ..()
/obj/ResetVars(var/list/exclude = list())
exclude += "expansions"
..(exclude)
//expansions = list()
/obj/proc/set_expansion(var/type, var/instance)
if(expansions[type])
qdel(expansions[type])
expansions[type] = instance
@@ -0,0 +1,3 @@
#define MT_NOACTION 0
#define MT_REFRESH 1
#define MT_CLOSE 2
@@ -0,0 +1,5 @@
/datum/expansion/multitool/circuitboards/CanUseTopic(var/mob/user)
if(isAI(user)) // No remote AI access
return STATUS_CLOSE
return ..()
@@ -0,0 +1,29 @@
/datum/expansion/multitool/circuitboards/stationalert/get_interact_window(var/obj/item/device/multitool/M, var/mob/user)
var/obj/item/weapon/circuitboard/stationalert/SA = holder
. += "<b>Alarm Sources</b><br>"
. += "<table>"
for(var/datum/alarm_handler/AH in alarm_manager.all_handlers)
. += "<tr>"
. += "<td>[AH.category]</td>"
if(AH in SA.alarm_handlers)
. += "<td><span class='good'>&#9724</span>Active</td><td><a href='?src=\ref[src];remove=\ref[AH]'>Inactivate</a></td>"
else
. += "<td><span class='bad'>&#9724</span>Inactive</td><td><a href='?src=\ref[src];add=\ref[AH]'>Activate</a></td>"
. += "</tr>"
. += "</table>"
/datum/expansion/multitool/circuitboards/stationalert/on_topic(href, href_list, user)
var/obj/item/weapon/circuitboard/stationalert/SA = holder
if(href_list["add"])
var/datum/alarm_handler/AH = locate(href_list["add"]) in alarm_manager.all_handlers
if(AH)
SA.alarm_handlers |= AH
return MT_REFRESH
if(href_list["remove"])
var/datum/alarm_handler/AH = locate(href_list["remove"]) in alarm_manager.all_handlers
if(AH)
SA.alarm_handlers -= AH
return MT_REFRESH
return ..()
@@ -0,0 +1,25 @@
/obj/item/stack/cable_coil/New()
set_expansion(/datum/expansion/multitool, new/datum/expansion/multitool/items/cable(src))
..()
/datum/expansion/multitool/items/cable/get_interact_window(var/obj/item/device/multitool/M, var/mob/user)
var/obj/item/stack/cable_coil/cable_coil = holder
. += "<b>Available Colors</b><br>"
. += "<table>"
for(var/cable_color in possible_cable_coil_colours)
. += "<tr>"
. += "<td>[cable_color]</td>"
if(cable_coil.color == possible_cable_coil_colours[cable_color])
. += "<td>Selected</td>"
else
. += "<td><a href='?src=\ref[src];select_color=[cable_color]'>Select</a></td>"
. += "</tr>"
. += "</table>"
/datum/expansion/multitool/items/cable/on_topic(href, href_list, user)
var/obj/item/stack/cable_coil/cable_coil = holder
if(href_list["select_color"] && href_list["select_color"] in possible_cable_coil_colours)
cable_coil.set_cable_color(href_list["select_color"], user)
return MT_REFRESH
return ..()
@@ -0,0 +1,5 @@
/datum/expansion/multitool/items/CanUseTopic(var/mob/user)
if(isAI(user)) // No remote AI access
return STATUS_CLOSE
return ..()
@@ -0,0 +1,28 @@
/datum/expansion/multitool/cryo/get_interact_window(var/obj/item/device/multitool/M, var/mob/user)
. += buffer(M)
. += "<HR><b>Connected Cloning Pods:</b><br>"
var/obj/machinery/computer/cloning/C = holder
for(var/atom/cloning_pod in C.pods)
. += "[cloning_pod.name]<br>"
/datum/expansion/multitool/cryo/receive_buffer(var/obj/item/device/multitool/M, var/atom/buffer, var/mob/user)
var/obj/machinery/clonepod/P = buffer
var/obj/machinery/computer/cloning/C = holder
if(!istype(P))
user << "<span class='warning'>No valid connection data in \the [M] buffer.</span>"
return MT_NOACTION
var/is_connected = (P in C.pods)
if(!is_connected)
if(C.connect_pod(P))
user << "<span class='notice'>You connect \the [P] to \the [C].</span>"
else
user << "<span class='warning'>You failed to connect \the [P] to \the [C].</span>"
return MT_REFRESH
if(C.release_pod(P))
user << "<span class='notice'>You disconnect \the [P] from \the [C].</span>"
else
user << "<span class='notice'>You failed to disconnect \the [P] from \the [C].</span>"
return MT_REFRESH
@@ -0,0 +1,89 @@
/datum/expansion/multitool
var/window_x = 370
var/window_y = 470
var/list/interact_predicates
/datum/expansion/multitool/New(var/atom/holder, var/list/can_interact_predicates)
..()
interact_predicates = can_interact_predicates ? can_interact_predicates : list()
/datum/expansion/multitool/Destroy()
interact_predicates.Cut()
return ..()
/datum/expansion/multitool/proc/interact(var/obj/item/device/multitool/M, var/mob/user)
if(CanUseTopic(user) != STATUS_INTERACTIVE)
return
var/html = get_interact_window(M, user)
if(html)
var/datum/browser/popup = new(usr, "multitool", "Multitool Menu", window_x, window_y)
popup.set_content(html)
popup.set_title_image(user.browse_rsc_icon(M.icon, M.icon_state))
popup.open()
else
close_window(usr)
/datum/expansion/multitool/proc/get_interact_window(var/obj/item/device/multitool/M, var/mob/user)
return
/datum/expansion/multitool/proc/close_window(var/mob/user)
user << browse(null, "window=multitool")
/datum/expansion/multitool/proc/buffer(var/obj/item/device/multitool/multitool)
. += "<b>Buffer Memory:</b><br>"
var/buffer_name = multitool.get_buffer_name()
if(buffer_name)
. += "[buffer_name] <a href='?src=\ref[src];send=\ref[multitool.buffer_object]'>Send</a> <a href='?src=\ref[src];purge=1'>Purge</a><br>"
else
. += "No connection stored in the buffer."
/datum/expansion/multitool/CanUseTopic(var/mob/user)
. = ..()
if(. == STATUS_CLOSE)
return
if(!user.get_multitool())
return STATUS_CLOSE
if(!all_predicates_true(list(holder, user), interact_predicates))
return STATUS_CLOSE
var/datum/host = holder.nano_host()
return user.default_can_use_topic(host)
/datum/expansion/multitool/Topic(href, href_list)
if(..())
close_window(usr)
return 1
var/mob/user = usr
var/obj/item/device/multitool/M = user.get_multitool()
if(href_list["send"])
var/atom/buffer = locate(href_list["send"])
. = send_buffer(M, buffer, user)
else if(href_list["purge"])
M.set_buffer(null)
. = MT_REFRESH
else
. = on_topic(href, href_list, user)
switch(.)
if(MT_REFRESH)
interact(M, user)
if(MT_CLOSE)
close_window(user)
return 1
/datum/expansion/multitool/proc/on_topic(href, href_list, user)
return MT_NOACTION
/datum/expansion/multitool/proc/send_buffer(var/obj/item/device/multitool/M, var/atom/buffer, var/mob/user)
if(M.get_buffer() == buffer && buffer)
receive_buffer(M, buffer, user)
else if(!buffer)
user << "<span class='warning'>Unable to acquire data from the buffered object. Purging from memory.</span>"
return MT_REFRESH
/datum/expansion/multitool/proc/receive_buffer(var/obj/item/device/multitool/M, var/atom/buffer, var/mob/user)
return
+10
View File
@@ -0,0 +1,10 @@
/datum/expansion/multitool/store/interact(var/obj/item/device/multitool/M, var/mob/user)
if(CanUseTopic(user) != STATUS_INTERACTIVE)
return
if(M.get_buffer() == holder)
M.set_buffer(null)
user << "<span class='warning'>You purge the connection data of \the [holder] from \the [M].</span>"
else
M.set_buffer(holder)
user << "<span class='notice'>You load connection data from \the [holder] to \the [M].</span>"
-2
View File
@@ -28,7 +28,6 @@ var/global/datum/getrev/revdata = new()
world.log << branch
world.log << date
world.log << revision
return
client/verb/showrevinfo()
set category = "OOC"
@@ -43,4 +42,3 @@ client/verb/showrevinfo()
src << revdata.revision
else
src << "Revision unknown"
return
+1 -1
View File
@@ -139,7 +139,7 @@ Data storage vars:
arg_list = arguments
return 1
else
// world << "\red Invalid arguments supplied for [src.type], ref = \ref[src]"
// world << "<span class='danger'>Invalid arguments supplied for [src.type], ref = \ref[src]</span>"
return 0
proc/toggle_null_checks()
+1 -1
View File
@@ -159,7 +159,7 @@
precision = max(rand(1,100)*bagholding.len,100)
if(istype(teleatom, /mob/living))
var/mob/living/MM = teleatom
MM << "<span class='danger>The Bluespace interface on your [teleatom] interferes with the teleport!</span>"
MM << "<span class='danger'>The Bluespace interface on your [teleatom] interferes with the teleport!</span>"
return 1
/datum/teleport/instant/science/teleportChecks()
+3 -3
View File
@@ -67,7 +67,7 @@
/datum/mind/New(var/key)
src.key = key
..()
/datum/mind/proc/transfer_to(mob/living/new_character)
if(!istype(new_character))
@@ -325,10 +325,10 @@
if(I in organs.implants)
qdel(I)
break
H << "<span class='notice'><font size =3><B>Your loyalty implant has been deactivated.</font></span>"
H << "<span class='notice'><font size =3><B>Your loyalty implant has been deactivated.</B></font></span>"
log_admin("[key_name_admin(usr)] has de-loyalty implanted [current].")
if("add")
H << "<span class='danger'><font size =3>You somehow have become the recepient of a loyalty transplant, and it just activated!</font>"
H << "<span class='danger'><font size =3>You somehow have become the recepient of a loyalty transplant, and it just activated!</font></span>"
H.implant_loyalty(H, override = TRUE)
log_admin("[key_name_admin(usr)] has loyalty implanted [current].")
else
+11
View File
@@ -0,0 +1,11 @@
/****************
* Debug Support *
****************/
var/datum/all_observable_events/all_observable_events = new()
/datum/all_observable_events
var/list/events
/datum/all_observable_events/New()
events = list()
..()
+8
View File
@@ -0,0 +1,8 @@
var/datum/observ/destroyed/destroyed_event = new()
/datum/observ/destroyed
name = "Destroyed"
/datum/Destroy()
destroyed_event.raise_event(list(src))
. = ..()
+47
View File
@@ -0,0 +1,47 @@
var/datum/observ/moved/moved_event = new()
/datum/observ/moved
name = "Moved"
expected_type = /atom/movable
/datum/observ/moved/register(var/eventSource, var/datum/procOwner, var/proc_call)
. = ..()
var/atom/movable/child = eventSource
if(.)
var/atom/movable/parent = child.loc
while(istype(parent) && !moved_event.is_listening(parent, child))
moved_event.register(parent, child, /atom/movable/proc/recursive_move)
child = parent
parent = child.loc
/********************
* Movement Handling *
********************/
/atom/movable/Move()
var/old_loc = loc
. = ..()
if(.)
moved_event.raise_event(list(src, old_loc, loc))
/atom/movable/proc/move_to_destination(var/atom/movable/am, var/old_loc, var/new_loc)
var/turf/T = get_turf(new_loc)
if(T && T != loc)
forceMove(T)
/atom/movable/proc/recursive_move(var/atom/movable/am, var/old_loc, var/new_loc)
moved_event.raise_event(list(src, old_loc, new_loc))
/atom/Entered(var/atom/movable/am, atom/old_loc)
..()
moved_event.raise_event(list(am, old_loc, am.loc))
/atom/movable/Entered(var/atom/movable/am, atom/old_loc)
..()
if(moved_event.has_listeners(am) && !moved_event.is_listening(src, am))
moved_event.register(src, am, /atom/movable/proc/recursive_move)
/atom/movable/Exited(var/atom/movable/am, atom/old_loc)
..()
if(moved_event.is_listening(src, am, /atom/movable/proc/recursive_move))
moved_event.unregister(src, am)
+61
View File
@@ -0,0 +1,61 @@
/datum/observ
var/name = "Unnamed Event"
var/expected_type = /datum
var/list/listeners_assoc
/datum/observ/New()
all_observable_events.events += src
listeners_assoc = list()
..()
/datum/observ/proc/is_listening(var/eventSource, var/datum/procOwner, var/proc_call)
var/listeners = listeners_assoc[eventSource]
if(!listeners)
return FALSE
var/stored_proc_call = listeners[procOwner]
return stored_proc_call && (!proc_call || stored_proc_call == proc_call)
/datum/observ/proc/has_listeners(var/eventSource)
var/list/listeners = listeners_assoc[eventSource]
return listeners && listeners.len
/datum/observ/proc/register(var/eventSource, var/datum/procOwner, var/proc_call)
if(!(eventSource && procOwner && procOwner))
return FALSE
if(istype(eventSource, /datum/observ))
return FALSE
if(!istype(eventSource, expected_type))
CRASH("Unexpected type. Expected [expected_type], was [eventSource]")
var/listeners = listeners_assoc[eventSource]
if(!listeners)
listeners = list()
listeners_assoc[eventSource] = listeners
listeners[procOwner] = proc_call
destroyed_event.register(procOwner, src, /datum/observ/proc/unregister)
return TRUE
/datum/observ/proc/unregister(var/eventSource, var/datum/procOwner)
if(!(eventSource && procOwner))
return FALSE
if(istype(eventSource, /datum/observ))
return FALSE
var/listeners = listeners_assoc[eventSource]
if(!listeners)
return FALSE
listeners -= procOwner
destroyed_event.unregister(procOwner, src)
return TRUE
/datum/observ/proc/raise_event(var/list/args = list())
if(!args.len)
return
var/listeners = listeners_assoc[args[1]]
if(!listeners)
return
for(var/listener in listeners)
call(listener, listeners[listener]) (arglist(args))
@@ -0,0 +1,5 @@
var/datum/observ/task_triggered/task_triggered_event = new()
/datum/observ/task_triggered
name = "Task Triggered"
expected_type = /datum/scheduled_task
+34
View File
@@ -0,0 +1,34 @@
var/global/datum/repository/cameras/camera_repository = new()
/proc/invalidateCameraCache()
camera_repository.networks.Cut()
camera_repository.invalidated = 1
camera_repository.camera_cache_id = (++camera_repository.camera_cache_id % 999999)
/datum/repository/cameras
var/list/networks
var/invalidated = 1
var/camera_cache_id = 1
/datum/repository/cameras/New()
networks = list()
..()
/datum/repository/cameras/proc/cameras_in_network(var/network)
setup_cache()
var/list/network_list = networks[network]
return network_list
/datum/repository/cameras/proc/setup_cache()
if(!invalidated)
return
invalidated = 0
cameranet.process_sort()
for(var/obj/machinery/camera/C in cameranet.cameras)
var/cam = C.nano_structure()
for(var/network in C.network)
if(!networks[network])
networks[network] = list()
var/list/netlist = networks[network]
netlist[++netlist.len] = cam
@@ -1,9 +1,5 @@
var/global/datum/repository/crew/crew_repository = new()
/datum/cache_entry
var/timestamp
var/data
/datum/repository/crew
var/list/cache_data
+4
View File
@@ -0,0 +1,4 @@
/datum/cache_entry
var/timestamp
var/data
+51 -38
View File
@@ -140,17 +140,28 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager,
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco,
/obj/item/weapon/lipstick/random,
/obj/item/weapon/reagent_containers/food/drinks/cans/ale,
/obj/item/weapon/reagent_containers/food/drinks/cans/ale,
/obj/item/weapon/reagent_containers/food/drinks/cans/beer,
/obj/item/weapon/reagent_containers/food/drinks/cans/beer,
/obj/item/weapon/reagent_containers/food/drinks/cans/beer,
/obj/item/weapon/reagent_containers/food/drinks/cans/beer)
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale,
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale,
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer,
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer,
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer,
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer)
cost = 20
containertype = /obj/structure/closet/crate
containername = "Party equipment"
group = "Hospitality"
/datum/supply_packs/lasertag
name = "Lasertag equipment"
contains = list(/obj/item/weapon/gun/energy/lasertag/red,
/obj/item/clothing/suit/redtag,
/obj/item/weapon/gun/energy/lasertag/blue,
/obj/item/clothing/suit/bluetag)
containertype = /obj/structure/closet
containername = "Lasertag Closet"
group = "Hospitality"
cost = 20
/datum/supply_packs/internals
name = "Internals crate"
contains = list(/obj/item/clothing/mask/gas,
@@ -170,8 +181,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/storage/toolbox/emergency,
/obj/item/clothing/suit/storage/hazardvest,
/obj/item/clothing/suit/storage/hazardvest,
/obj/item/clothing/suit/storage/vest,
/obj/item/clothing/suit/storage/vest,
/obj/item/clothing/suit/armor/vest,
/obj/item/clothing/suit/armor/vest,
/obj/item/weapon/tank/emergency_oxygen/engi,
/obj/item/weapon/tank/emergency_oxygen/engi,
/obj/item/weapon/tank/emergency_oxygen/engi,
@@ -208,13 +219,13 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/janitor
name = "Janitorial supplies"
contains = list(/obj/item/weapon/reagent_containers/glass/bucket,
/obj/item/weapon/reagent_containers/glass/bucket,
/obj/item/weapon/reagent_containers/glass/bucket,
/obj/item/weapon/mop,
/obj/item/weapon/caution,
/obj/item/weapon/caution,
/obj/item/weapon/caution,
/obj/item/weapon/caution,
/obj/item/weapon/storage/bag/trash,
/obj/item/device/lightreplacer,
/obj/item/weapon/reagent_containers/spray/cleaner,
/obj/item/weapon/reagent_containers/glass/rag,
/obj/item/weapon/grenade/chem_grenade/cleaner,
@@ -580,7 +591,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/solar_assembly,
/obj/item/solar_assembly,
/obj/item/solar_assembly,
/obj/item/solar_assembly, // 21 Solar Assemblies. 1 Extra for the controller
/obj/item/solar_assembly, // 21 Solar Assemblies. 1 Extra for the controller,
/obj/item/weapon/circuitboard/solar_control,
/obj/item/weapon/tracker_electronics,
/obj/item/weapon/paper/solar)
@@ -642,7 +653,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/mecha_ripley
name = "Circuit Crate (\"Ripley\" APLU)"
contains = list(/obj/item/weapon/book/manual/ripley_build_and_repair,
/obj/item/weapon/circuitboard/mecha/ripley/main, //TEMPORARY due to lack of circuitboard printer
/obj/item/weapon/circuitboard/mecha/ripley/main, //TEMPORARY due to lack of circuitboard printer,
/obj/item/weapon/circuitboard/mecha/ripley/peripherals) //TEMPORARY due to lack of circuitboard printer
cost = 30
containertype = /obj/structure/closet/crate/secure
@@ -652,7 +663,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/mecha_odysseus
name = "Circuit Crate (\"Odysseus\")"
contains = list(/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, //TEMPORARY due to lack of circuitboard printer
contains = list(/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, //TEMPORARY due to lack of circuitboard printer,
/obj/item/weapon/circuitboard/mecha/odysseus/main) //TEMPORARY due to lack of circuitboard printer
cost = 25
containertype = /obj/structure/closet/crate/secure
@@ -717,7 +728,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/gun/projectile/sec,
/obj/item/weapon/gun/projectile/sec,
/obj/item/weapon/storage/box/flashbangs,
/obj/item/weapon/storage/box/flashbangs)
/obj/item/weapon/storage/box/teargas)
cost = 40
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Weapons crate"
@@ -752,17 +763,14 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/randomised/armor
num_contained = 5
contains = list(/obj/item/clothing/suit/storage/vest,
/obj/item/clothing/suit/storage/vest/officer,
/obj/item/clothing/suit/storage/vest/warden,
contains = list(/obj/item/clothing/suit/armor/vest,
/obj/item/clothing/suit/armor/vest/security,
/obj/item/clothing/suit/armor/vest/detective,
/obj/item/clothing/suit/storage/vest/hos,
/obj/item/clothing/suit/storage/vest/pcrc,
/obj/item/clothing/suit/storage/vest/detective,
/obj/item/clothing/suit/storage/vest/heavy,
/obj/item/clothing/suit/storage/vest/heavy/officer,
/obj/item/clothing/suit/storage/vest/heavy/warden,
/obj/item/clothing/suit/storage/vest/heavy/hos,
/obj/item/clothing/suit/storage/vest/heavy/pcrc)
/obj/item/clothing/suit/storage/vest/warden,
/obj/item/clothing/suit/storage/vest/officer,
/obj/item/clothing/suit/storage/vest)
name = "Armor crate"
cost = 40
@@ -790,6 +798,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/clothing/head/helmet/riot,
/obj/item/clothing/suit/armor/riot,
/obj/item/weapon/storage/box/flashbangs,
/obj/item/weapon/storage/box/teargas,
/obj/item/weapon/storage/box/beanbags,
/obj/item/weapon/storage/box/handcuffs)
cost = 60
@@ -1107,7 +1116,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
cost = 10
containertype = /obj/structure/closet/crate
containername = "Actor Costumes"
// access = access_theatre
group = "Miscellaneous"
/datum/supply_packs/formal_wear
@@ -1131,6 +1139,17 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Formalwear for the best occasions."
group = "Miscellaneous"
/datum/supply_packs/randomised/card_packs
num_contained = 5
contains = list(/obj/item/weapon/pack/cardemon,
/obj/item/weapon/pack/spaceball,
/obj/item/weapon/deck/holder)
name = "Trading Card Crate"
cost = 20
containertype = /obj/structure/closet/crate
containername = "cards crate"
group = "Miscellaneous"
/datum/supply_packs/shield_gen
contains = list(/obj/item/weapon/circuitboard/shield_gen)
name = "Bubble shield generator circuitry"
@@ -1223,12 +1242,15 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/bee_keeper
name = "Beekeeping crate"
contains = list(/obj/item/beezeez,
/obj/item/weapon/bee_net,
/obj/item/apiary,
/obj/item/queen_bee)
contains = list(/obj/item/beehive_assembly,
/obj/item/bee_smoker,
/obj/item/honey_frame,
/obj/item/honey_frame,
/obj/item/honey_frame,
/obj/item/honey_frame,
/obj/item/honey_frame,
/obj/item/bee_pack)
cost = 40
contraband = 1
containertype = /obj/structure/closet/crate/hydroponics
containername = "Beekeeping crate"
access = access_hydroponics
@@ -1310,14 +1332,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
group = "Security"
access = access_armory
contains = list(/obj/item/clothing/under/tactical,
/obj/item/clothing/suit/armor/tactical,
/obj/item/clothing/head/helmet/tactical,
/obj/item/clothing/mask/balaclava/tactical,
/obj/item/clothing/glasses/sunglasses/sechud/tactical,
/obj/item/weapon/storage/belt/security/tactical,
/obj/item/clothing/shoes/jackboots,
/obj/item/clothing/gloves/black,
/obj/item/clothing/under/tactical,
/obj/item/clothing/suit/armor/tactical,
/obj/item/clothing/head/helmet/tactical,
/obj/item/clothing/mask/balaclava/tactical,
@@ -1456,7 +1470,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/clothing/head/helmet/gladiator,
/obj/item/clothing/head/ushanka)
group = "Miscellaneous"
// access = access_theatre
/datum/supply_packs/randomised/webbing
name = "Webbing crate"
+36
View File
@@ -0,0 +1,36 @@
/*************
* Ammunition *
*************/
/datum/uplink_item/item/ammo
item_cost = 4
category = /datum/uplink_category/ammunition
/datum/uplink_item/item/ammo/mc9mm
name = "9mm"
item_cost = 1
path = /obj/item/ammo_magazine/mc9mm
/datum/uplink_item/item/ammo/a10mm
name = "10mm"
item_cost = 1
path = /obj/item/ammo_magazine/a10mm
/datum/uplink_item/item/ammo/darts
name = "Darts"
item_cost = 1
path = /obj/item/ammo_magazine/chemdart
/datum/uplink_item/item/ammo/a357
name = ".357"
item_cost = 2
path = /obj/item/ammo_magazine/a357
/datum/uplink_item/item/ammo/a762
name = "7.62mm"
item_cost = 3
path = /obj/item/ammo_magazine/a762
/datum/uplink_item/item/ammo/sniperammo
name = "14.5mm"
item_cost = 4
path = /obj/item/weapon/storage/box/sniperammo
+101
View File
@@ -0,0 +1,101 @@
/****************
* Announcements *
*****************/
/datum/uplink_item/abstract/announcements
category = /datum/uplink_category/services
/datum/uplink_item/abstract/announcements/buy(var/obj/item/device/uplink/U, var/mob/user)
. = ..()
if(.)
log_and_message_admins("has triggered a falsified [src]", user)
/datum/uplink_item/abstract/announcements/fake_centcom/New()
..()
name = "[command_name()] Update Announcement"
item_cost = round(DEFAULT_TELECRYSTAL_AMOUNT / 2)
desc = "Causes a falsified [command_name()] Update. Triggers immediately after supplying additional data."
/datum/uplink_item/abstract/announcements/fake_centcom/get_goods(var/obj/item/device/uplink/U, var/loc, var/mob/user, var/list/args)
command_announcement.Announce(args.["message"], args.["title"])
return 1
/datum/uplink_item/abstract/announcements/fake_crew_arrival
name = "Crew Arrival Announcement/Records"
desc = "Creates a fake crew arrival announcement as well as fake crew records, using your current appearance (including held items!) and worn id card. Trigger with care!"
item_cost = 8
/datum/uplink_item/abstract/announcements/fake_crew_arrival/New()
..()
antag_roles = list(MODE_MERCENARY)
/datum/uplink_item/abstract/announcements/fake_crew_arrival/get_goods(var/obj/item/device/uplink/U, var/loc, var/mob/user, var/list/args)
if(!user)
return 0
var/obj/item/weapon/card/id/I = user.GetIdCard()
var/datum/data/record/random_general_record
var/datum/data/record/random_medical_record
if(data_core.general.len)
random_general_record = pick(data_core.general)
random_medical_record = find_medical_record("id", random_general_record.fields["id"])
var/datum/data/record/general = data_core.CreateGeneralRecord(user)
if(I)
general.fields["age"] = I.age
general.fields["rank"] = I.assignment
general.fields["real_rank"] = I.assignment
general.fields["name"] = I.registered_name
general.fields["sex"] = I.sex
else
var/mob/living/carbon/human/H
if(istype(user,/mob/living/carbon/human))
H = user
general.fields["age"] = H.age
else
general.fields["age"] = initial(H.age)
var/assignment = GetAssignment(user)
general.fields["rank"] = assignment
general.fields["real_rank"] = assignment
general.fields["name"] = user.real_name
general.fields["sex"] = capitalize(user.gender)
general.fields["species"] = user.get_species()
var/datum/data/record/medical = data_core.CreateMedicalRecord(general.fields["name"], general.fields["id"])
data_core.CreateSecurityRecord(general.fields["name"], general.fields["id"])
if(!random_general_record)
general.fields["citizenship"] = random_general_record.fields["citizenship"]
general.fields["faction"] = random_general_record.fields["faction"]
general.fields["fingerprint"] = random_general_record.fields["fingerprint"]
general.fields["home_system"] = random_general_record.fields["home_system"]
general.fields["religion"] = random_general_record.fields["religion"]
if(random_medical_record)
medical.fields["b_type"] = random_medical_record.fields["b_type"]
medical.fields["b_dna"] = random_medical_record.fields["b_type"]
if(I)
general.fields["fingerprint"] = I.fingerprint_hash
medical.fields["b_type"] = I.blood_type
medical.fields["b_dna"] = I.dna_hash
AnnounceArrivalSimple(general.fields["name"], general.fields["rank"])
return 1
/datum/uplink_item/abstract/announcements/fake_ion_storm
name = "Ion Storm Announcement"
desc = "Interferes with the station's ion sensors. Triggers immediately upon investment."
item_cost = 2
/datum/uplink_item/abstract/announcements/fake_ion_storm/get_goods(var/obj/item/device/uplink/U, var/loc)
ion_storm_announcement()
return 1
/datum/uplink_item/abstract/announcements/fake_radiation
name = "Radiation Storm Announcement"
desc = "Interferes with the station's radiation sensors. Triggers immediately upon investment."
item_cost = 6
/datum/uplink_item/abstract/announcements/fake_radiation/get_goods(var/obj/item/device/uplink/U, var/loc)
var/datum/event_meta/EM = new(EVENT_LEVEL_MUNDANE, "Fake Radiation Storm", add_to_queue = 0)
new/datum/event/radiation_storm/syndicate(EM)
return 1
+79
View File
@@ -0,0 +1,79 @@
/************
* Badassery *
************/
/datum/uplink_item/item/badassery
category = /datum/uplink_category/badassery
/datum/uplink_item/item/badassery/balloon
name = "For showing that You Are The BOSS (Useless Balloon)"
item_cost = DEFAULT_TELECRYSTAL_AMOUNT
path = /obj/item/toy/syndicateballoon
/datum/uplink_item/item/badassery/balloon/NT
name = "For showing that you love NT SOO much (Useless Balloon)"
path = /obj/item/toy/nanotrasenballoon
/**************
* Random Item *
**************/
/datum/uplink_item/item/badassery/random_one
name = "Random Item"
desc = "Buys you one random item."
/datum/uplink_item/item/badassery/random_one/buy(var/obj/item/device/uplink/U, var/mob/user)
var/datum/uplink_item/item = default_uplink_selection.get_random_item(U.uses)
return item.buy(U, user)
/datum/uplink_item/item/badassery/random_one/can_buy(obj/item/device/uplink/U)
return default_uplink_selection.get_random_item(U.uses, U) != null
/datum/uplink_item/item/badassery/random_many
name = "Random Items"
desc = "Buys you as many random items you can afford. Convenient packaging NOT included."
/datum/uplink_item/item/badassery/random_many/cost(var/telecrystals)
return max(1, telecrystals)
/datum/uplink_item/item/badassery/random_many/get_goods(var/obj/item/device/uplink/U, var/loc)
var/list/bought_items = list()
for(var/datum/uplink_item/UI in get_random_uplink_items(U, U.uses, loc))
UI.purchase_log(U)
var/obj/item/I = UI.get_goods(U, loc)
if(istype(I))
bought_items += I
return bought_items
/datum/uplink_item/item/badassery/random_many/purchase_log(obj/item/device/uplink/U)
feedback_add_details("traitor_uplink_items_bought", "[src]")
log_and_message_admins("used \the [U.loc] to buy \a [src]")
/****************
* Surplus Crate *
****************/
/datum/uplink_item/item/badassery/surplus
name = "Surplus Crate"
item_cost = DEFAULT_TELECRYSTAL_AMOUNT * 4
var/item_worth = DEFAULT_TELECRYSTAL_AMOUNT * 6
var/icon
/datum/uplink_item/item/badassery/surplus/New()
..()
antag_roles = list(MODE_MERCENARY)
desc = "A crate containing [item_worth] telecrystal\s worth of surplus leftovers."
/datum/uplink_item/item/badassery/surplus/get_goods(var/obj/item/device/uplink/U, var/loc)
var/obj/structure/largecrate/C = new(loc)
var/random_items = get_random_uplink_items(null, item_worth, C)
for(var/datum/uplink_item/I in random_items)
I.purchase_log(U)
I.get_goods(U, C)
return C
/datum/uplink_item/item/badassery/surplus/log_icon()
if(!icon)
var/obj/structure/largecrate/C = /obj/structure/largecrate
icon = image(initial(C.icon), initial(C.icon_state))
return "\icon[icon]"
+88
View File
@@ -0,0 +1,88 @@
/********************
* Devices and Tools *
********************/
/datum/uplink_item/item/tools
category = /datum/uplink_category/tools
/datum/uplink_item/item/tools/toolbox
name = "Fully Loaded Toolbox"
item_cost = 2
path = /obj/item/weapon/storage/toolbox/syndicate
/datum/uplink_item/item/tools/money
name = "Operations Funding"
item_cost = 2
path = /obj/item/weapon/storage/secure/briefcase/money
desc = "A briefcase with 10,000 untraceable thalers for funding your sneaky activities."
/datum/uplink_item/item/tools/clerical
name = "Morphic Clerical Kit"
item_cost = 3
path = /obj/item/weapon/storage/box/syndie_kit/clerical
/datum/uplink_item/item/tools/plastique
name = "C-4 (Destroys walls)"
item_cost = 4
path = /obj/item/weapon/plastique
/datum/uplink_item/item/tools/heavy_vest
name = "Heavy Armor Vest"
item_cost = 4
path = /obj/item/clothing/suit/storage/vest/merc
/datum/uplink_item/item/tools/encryptionkey_radio
name = "Encrypted Radio Channel Key"
item_cost = 4
path = /obj/item/device/encryptionkey/syndicate
/datum/uplink_item/item/tools/encryptionkey_binary
name = "Binary Translator Key"
item_cost = 5
path = /obj/item/device/encryptionkey/binary
/datum/uplink_item/item/tools/emag
name = "Cryptographic Sequencer"
item_cost = 6
path = /obj/item/weapon/card/emag
/datum/uplink_item/item/tools/hacking_tool
name = "Door Hacking Tool"
item_cost = 6
path = /obj/item/device/multitool/hacktool
desc = "Appears and functions as a standard multitool until the mode is toggled by applying a screwdriver appropriately. \
When in hacking mode this device will grant full access to any standard airlock within 20 to 40 seconds. \
This device will also be able to immediately access the last 6 to 8 hacked airlocks."
/datum/uplink_item/item/tools/space_suit
name = "Space Suit"
item_cost = 6
path = /obj/item/weapon/storage/box/syndie_kit/space
/datum/uplink_item/item/tools/thermal
name = "Thermal Imaging Glasses"
item_cost = 6
path = /obj/item/clothing/glasses/thermal/syndi
/datum/uplink_item/item/tools/powersink
name = "Powersink (DANGER!)"
item_cost = 10
path = /obj/item/device/powersink
/datum/uplink_item/item/tools/teleporter
name = "Teleporter Circuit Board"
item_cost = 10
path = /obj/item/weapon/circuitboard/teleporter
/datum/uplink_item/item/tools/teleporter/New()
..()
antag_roles = list(MODE_MERCENARY)
/datum/uplink_item/item/tools/ai_module
name = "Hacked AI Upload Module"
item_cost = 14
path = /obj/item/weapon/aiModule/syndicate
/datum/uplink_item/item/tools/supply_beacon
name = "Hacked Supply Beacon (DANGER!)"
item_cost = 14
path = /obj/item/supply_beacon
+20
View File
@@ -0,0 +1,20 @@
/***********
* Grenades *
************/
/datum/uplink_item/item/grenades
category = /datum/uplink_category/grenades
/datum/uplink_item/item/grenades/anti_photon
name = "5xPhoton Disruption Grenades"
item_cost = 4
path = /obj/item/weapon/storage/box/anti_photons
/datum/uplink_item/item/grenades/smoke
name = "5xSmoke Grenades"
item_cost = 4
path = /obj/item/weapon/storage/box/smokes
/datum/uplink_item/item/grenades/emp
name = "5xEMP Grenades"
item_cost = 6
path = /obj/item/weapon/storage/box/emps
+40
View File
@@ -0,0 +1,40 @@
/*******************
* Hardsuit Modules *
*******************/
/datum/uplink_item/item/hardsuit_modules
category = /datum/uplink_category/hardsuit_modules
/datum/uplink_item/item/hardsuit_modules/thermal
name = "Thermal Scanner"
item_cost = 4
path = /obj/item/rig_module/vision/thermal
/datum/uplink_item/item/hardsuit_modules/energy_net
name = "Net Projector"
item_cost = 5
path = /obj/item/rig_module/fabricator/energy_net
/datum/uplink_item/item/ewar_voice
name = "Electrowarfare Suite and Voice Synthesiser"
item_cost = 6
path = /obj/item/weapon/storage/box/syndie_kit/ewar_voice
/datum/uplink_item/item/hardsuit_modules/maneuvering_jets
name = "Maneuvering Jets"
item_cost = 8
path = /obj/item/rig_module/maneuvering_jets
/datum/uplink_item/item/hardsuit_modules/egun
name = "Mounted Energy Gun"
item_cost = 12
path = /obj/item/rig_module/mounted/egun
/datum/uplink_item/item/hardsuit_modules/power_sink
name = "Power Sink"
item_cost = 12
path = /obj/item/rig_module/power_sink
/datum/uplink_item/item/hardsuit_modules/laser_canon
name = "Mounted Laser Cannon"
item_cost = 16
path = /obj/item/rig_module/mounted
@@ -0,0 +1,51 @@
/***************************************
* Highly Visible and Dangerous Weapons *
***************************************/
/datum/uplink_item/item/visible_weapons
category = /datum/uplink_category/visible_weapons
/datum/uplink_item/item/visible_weapons/dartgun
name = "Dart Gun"
item_cost = 5
path = /obj/item/weapon/gun/projectile/dartgun
/datum/uplink_item/item/visible_weapons/crossbow
name = "Energy Crossbow"
item_cost = 6
path = /obj/item/weapon/gun/energy/crossbow
/datum/uplink_item/item/visible_weapons/energy_sword
name = "Energy Sword"
item_cost = 8
path = /obj/item/weapon/melee/energy/sword
/datum/uplink_item/item/visible_weapons/g9mm
name = "Silenced 9mm"
item_cost = 8
path = /obj/item/weapon/storage/box/syndie_kit/g9mm
/datum/uplink_item/item/visible_weapons/riggedlaser
name = "Exosuit (APLU) Rigged Laser"
item_cost = 8
path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser
/datum/uplink_item/item/visible_weapons/revolver
name = "Revolver"
item_cost = 12
path = /obj/item/weapon/gun/projectile/revolver
//These are for traitors (or other antags, perhaps) to have the option of purchasing some merc gear.
/datum/uplink_item/item/visible_weapons/submachinegun
name = "Submachine Gun"
item_cost = 12
path = /obj/item/weapon/gun/projectile/automatic/c20r
/datum/uplink_item/item/visible_weapons/assaultrifle
name = "Assault Rifle"
item_cost = 14
path = /obj/item/weapon/gun/projectile/automatic/sts35
/datum/uplink_item/item/visible_weapons/heavysniper
name = "Anti-materiel Rifle"
item_cost = DEFAULT_TELECRYSTAL_AMOUNT
path = /obj/item/weapon/gun/projectile/heavysniper
+29
View File
@@ -0,0 +1,29 @@
/***********
* Implants *
***********/
/datum/uplink_item/item/implants
category = /datum/uplink_category/implants
/datum/uplink_item/item/implants/imp_freedom
name = "Freedom Implant"
item_cost = 6
path = /obj/item/weapon/storage/box/syndie_kit/imp_freedom
/datum/uplink_item/item/implants/imp_compress
name = "Compressed Matter Implant"
item_cost = 8
path = /obj/item/weapon/storage/box/syndie_kit/imp_compress
/datum/uplink_item/item/implants/imp_explosive
name = "Explosive Implant (DANGER!)"
item_cost = 10
path = /obj/item/weapon/storage/box/syndie_kit/imp_explosive
/datum/uplink_item/item/implants/imp_uplink
name = "Uplink Implant"
path = /obj/item/weapon/storage/box/syndie_kit/imp_uplink
/datum/uplink_item/item/implants/imp_uplink/New()
..()
item_cost = round(DEFAULT_TELECRYSTAL_AMOUNT / 2)
desc = "Contains [round((DEFAULT_TELECRYSTAL_AMOUNT / 2) * 0.8)] Telecrystal\s"
+20
View File
@@ -0,0 +1,20 @@
/**********
* Medical *
**********/
/datum/uplink_item/item/medical
category = /datum/uplink_category/medical
/datum/uplink_item/item/medical/sinpockets
name = "Box of Sin-Pockets"
item_cost = 2
path = /obj/item/weapon/storage/box/sinpockets
/datum/uplink_item/item/medical/surgery
name = "Surgery kit"
item_cost = 10
path = /obj/item/weapon/storage/firstaid/surgery
/datum/uplink_item/item/medical/combat
name = "Combat medical kit"
item_cost = 12
path = /obj/item/weapon/storage/firstaid/combat
@@ -0,0 +1,35 @@
/*******************************
* Stealth and Camouflage Items *
*******************************/
/datum/uplink_item/item/stealth_items
category = /datum/uplink_category/stealth_items
/datum/uplink_item/item/stealth_items/syndigaloshes
name = "No-Slip Shoes"
item_cost = 1
path = /obj/item/clothing/shoes/syndigaloshes
/datum/uplink_item/item/stealth_items/spy
name = "Bug Kit"
item_cost = 2
path = /obj/item/weapon/storage/box/syndie_kit/spy
/datum/uplink_item/item/stealth_items/id
name = "Agent ID card"
item_cost = 3
path = /obj/item/weapon/card/id/syndicate
/datum/uplink_item/item/stealth_items/chameleon_kit
name = "Chameleon Kit"
item_cost = 5
path = /obj/item/weapon/storage/box/syndie_kit/chameleon
/datum/uplink_item/item/stealth_items/voice
name = "Voice Changer"
item_cost = 5
path = /obj/item/clothing/mask/gas/voice
/datum/uplink_item/item/stealth_items/chameleon_projector
name = "Chameleon-Projector"
item_cost = 8
path = /obj/item/device/chameleon
@@ -0,0 +1,35 @@
/*************************************
* Stealthy and Inconspicuous Weapons *
*************************************/
/datum/uplink_item/item/stealthy_weapons
category = /datum/uplink_category/stealthy_weapons
/datum/uplink_item/item/stealthy_weapons/soap
name = "Subversive Soap"
item_cost = 1
path = /obj/item/weapon/soap/syndie
/datum/uplink_item/item/stealthy_weapons/cigarette_kit
name = "Cigarette Kit"
item_cost = 2
path = /obj/item/weapon/storage/box/syndie_kit/cigarette
/datum/uplink_item/item/stealthy_weapons/concealed_cane
name = "Concealed Cane Sword"
item_cost = 2
path = /obj/item/weapon/cane/concealed
/datum/uplink_item/item/stealthy_weapons/random_toxin
name = "Random Toxin - Beaker"
item_cost = 2
path = /obj/item/weapon/storage/box/syndie_kit/toxin
/datum/uplink_item/item/stealthy_weapons/detomatix
name = "Detomatix PDA Cartridge"
item_cost = 4
path = /obj/item/weapon/cartridge/syndicate
/datum/uplink_item/item/stealthy_weapons/parapen
name = "Paralysis Pen"
item_cost = 6
path = /obj/item/weapon/pen/reagent/paralysis
+31
View File
@@ -0,0 +1,31 @@
/***************
* Telecrystals *
***************/
/datum/uplink_item/item/telecrystal
category = /datum/uplink_category/telecrystals
desc = "Acquire the uplink crystals in pure form."
/datum/uplink_item/item/telecrystal/get_goods(var/obj/item/device/uplink/U, var/loc)
return new /obj/item/stack/telecrystal(loc, cost(U.uses))
/datum/uplink_item/item/telecrystal/one
name = "Telecrystal - 01"
item_cost = 1
/datum/uplink_item/item/telecrystal/five
name = "Telecrystals - 05"
item_cost = 5
/datum/uplink_item/item/telecrystal/ten
name = "Telecrystals - 10"
item_cost = 10
/datum/uplink_item/item/telecrystal/twentyfive
name = "Telecrystals - 25"
item_cost = 25
/datum/uplink_item/item/telecrystal/all
name = "Telecrystals - Empty Uplink"
/datum/uplink_item/item/telecrystal/all/cost(var/telecrystals)
return max(1, telecrystals)
+49
View File
@@ -0,0 +1,49 @@
/datum/uplink_category
var/name = ""
var/list/datum/uplink_item/items
/datum/uplink_category/New()
..()
items = list()
/datum/uplink_category/proc/can_view(obj/item/device/uplink/U)
for(var/datum/uplink_item/item in items)
if(item.can_view(U))
return 1
return 0
/datum/uplink_category/ammunition
name = "Ammunition"
/datum/uplink_category/grenades
name = "Grenades and Thrown Objects"
/datum/uplink_category/visible_weapons
name = "Highly Visible and Dangerous Weapons"
/datum/uplink_category/stealthy_weapons
name = "Stealthy and Inconspicuous Weapons"
/datum/uplink_category/stealth_items
name = "Stealth and Camouflage Items"
/datum/uplink_category/tools
name = "Devices and Tools"
/datum/uplink_category/implants
name = "Implants"
/datum/uplink_category/medical
name = "Medical"
/datum/uplink_category/hardsuit_modules
name = "Hardsuit Modules"
/datum/uplink_category/services
name = "Services"
/datum/uplink_category/badassery
name = "Badassery"
/datum/uplink_category/telecrystals
name = "Telecrystals"
+165
View File
@@ -0,0 +1,165 @@
var/datum/uplink/uplink = new()
/datum/uplink
var/list/items_assoc
var/list/datum/uplink_item/items
var/list/datum/uplink_category/categories
/datum/uplink/New()
items_assoc = list()
items = init_subtypes(/datum/uplink_item)
categories = init_subtypes(/datum/uplink_category)
categories = dd_sortedObjectList(categories)
for(var/datum/uplink_item/item in items)
if(!item.name)
items -= item
continue
items_assoc[item.type] = item
for(var/datum/uplink_category/category in categories)
if(item.category == category.type)
category.items += item
for(var/datum/uplink_category/category in categories)
category.items = dd_sortedObjectList(category.items)
/datum/uplink_item
var/name
var/desc
var/item_cost = 0
var/datum/uplink_category/category // Item category
var/list/datum/antagonist/antag_roles // Antag roles this item is displayed to. If empty, display to all.
/datum/uplink_item/item
var/path = null
/datum/uplink_item/New()
..()
antag_roles = list()
/datum/uplink_item/proc/buy(var/obj/item/device/uplink/U, var/mob/user)
var/extra_args = extra_args(user)
if(!extra_args)
return
if(!can_buy(U))
return
var/cost = cost(U.uses)
var/goods = get_goods(U, get_turf(user), user, extra_args)
if(!goods)
return
purchase_log(U)
U.uses -= cost
U.used_TC += cost
return goods
// Any additional arguments you wish to send to the get_goods
/datum/uplink_item/proc/extra_args(var/mob/user)
return 1
/datum/uplink_item/proc/can_buy(obj/item/device/uplink/U)
if(cost(U.uses) > U.uses)
return 0
return can_view(U)
/datum/uplink_item/proc/can_view(obj/item/device/uplink/U)
// Making the assumption that if no uplink was supplied, then we don't care about antag roles
if(!U || !antag_roles.len)
return 1
// With no owner, there's no need to check antag status.
if(!U.uplink_owner)
return 0
for(var/antag_role in antag_roles)
var/datum/antagonist/antag = all_antag_types[antag_role]
if(antag.is_antagonist(U.uplink_owner))
return 1
return 0
/datum/uplink_item/proc/cost(var/telecrystals)
return item_cost
/datum/uplink_item/proc/description()
return desc
// get_goods does not necessarily return physical objects, it is simply a way to acquire the uplink item without paying
/datum/uplink_item/proc/get_goods(var/obj/item/device/uplink/U, var/loc)
return 0
/datum/uplink_item/proc/log_icon()
return
/datum/uplink_item/proc/purchase_log(obj/item/device/uplink/U)
feedback_add_details("traitor_uplink_items_bought", "[src]")
log_and_message_admins("used \the [U.loc] to buy \a [src]")
U.purchase_log[src] = U.purchase_log[src] + 1
datum/uplink_item/dd_SortValue()
return cost(INFINITY)
/********************************
* *
* Physical Uplink Entries *
* *
********************************/
/datum/uplink_item/item/buy(var/obj/item/device/uplink/U, var/mob/user)
var/obj/item/I = ..()
if(!I)
return
if(istype(I, /list))
var/list/L = I
if(L.len) I = L[1]
if(istype(I) && ishuman(user))
var/mob/living/carbon/human/A = user
A.put_in_any_hand_if_possible(I)
return I
/datum/uplink_item/item/get_goods(var/obj/item/device/uplink/U, var/loc)
var/obj/item/I = new path(loc)
return I
/datum/uplink_item/item/description()
if(!desc)
// Fallback description
var/obj/temp = src.path
desc = initial(temp.desc)
return ..()
/datum/uplink_item/item/log_icon()
var/obj/I = path
return "\icon[I]"
/********************************
* *
* Abstract Uplink Entries *
* *
********************************/
var/image/default_abstract_uplink_icon
/datum/uplink_item/abstract/log_icon()
if(!default_abstract_uplink_icon)
default_abstract_uplink_icon = image('icons/obj/pda.dmi', "pda-syn")
return "\icon[default_abstract_uplink_icon]"
/****************
* Support procs *
****************/
/proc/get_random_uplink_items(var/obj/item/device/uplink/U, var/remaining_TC, var/loc)
var/list/bought_items = list()
while(remaining_TC)
var/datum/uplink_item/I = default_uplink_selection.get_random_item(remaining_TC, U, bought_items)
if(!I)
break
bought_items += I
remaining_TC -= I.cost(remaining_TC)
return bought_items
+1 -1
View File
@@ -161,7 +161,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
if(A.emagged) return
if(!A.requiresID() || A.check_access(null))
if(A.density) A.open()
else A.close()
else A.close()
if(AIRLOCK_WIRE_SAFETY)
A.safe = !A.safe
if(!A.density)
+58
View File
@@ -0,0 +1,58 @@
/datum/wires/nuclearbomb
holder_type = /obj/machinery/nuclearbomb
random = 1
wire_count = 7
var/const/NUCLEARBOMB_WIRE_LIGHT = 1
var/const/NUCLEARBOMB_WIRE_TIMING = 2
var/const/NUCLEARBOMB_WIRE_SAFETY = 4
/datum/wires/nuclearbomb/CanUse(var/mob/living/L)
var/obj/machinery/nuclearbomb/N = holder
return N.panel_open
/datum/wires/nuclearbomb/GetInteractWindow()
var/obj/machinery/nuclearbomb/N = holder
. += ..()
. += "<BR>The device is [N.timing ? "shaking!" : "still."]<BR>"
. += "The device is is [N.safety ? "quiet" : "whirring"].<BR>"
. += "The lights are [N.lighthack ? "static" : "functional"].<BR>"
/datum/wires/nuclearbomb/UpdatePulsed(var/index)
var/obj/machinery/nuclearbomb/N = holder
switch(index)
if(NUCLEARBOMB_WIRE_LIGHT)
N.lighthack = !N.lighthack
N.update_icon()
spawn(100)
N.lighthack = !N.lighthack
N.update_icon()
if(NUCLEARBOMB_WIRE_TIMING)
if(N.timing)
spawn
log_and_message_admins("pulsed a nuclear bomb's detonation wire, causing it to explode.")
N.explode()
if(NUCLEARBOMB_WIRE_SAFETY)
N.safety = !N.safety
spawn(100)
N.safety = !N.safety
if(N.safety == 1)
N.visible_message("<span class='notice'>\The [N] quiets down.</span>")
N.secure_device()
else
N.visible_message("<span class='notice'>\The [N] emits a quiet whirling noise!</span>")
/datum/wires/nuclearbomb/UpdateCut(var/index, var/mended)
var/obj/machinery/nuclearbomb/N = holder
switch(index)
if(NUCLEARBOMB_WIRE_SAFETY)
N.safety = mended
if(N.timing)
spawn
log_and_message_admins("cut a nuclear bomb's timing wire, causing it to explode.")
N.explode()
if(NUCLEARBOMB_WIRE_TIMING)
N.secure_device()
if(NUCLEARBOMB_WIRE_LIGHT)
N.lighthack = !mended
N.update_icon()
+2 -5
View File
@@ -12,11 +12,6 @@ var/const/WIRE_TRANSMIT = 4
return 1
return 0
/datum/wires/radio/Interact(var/mob/living/user)
if(CanUse(user))
var/obj/item/device/radio/R = holder
R.interact(user)
/datum/wires/radio/UpdatePulsed(var/index)
var/obj/item/device/radio/R = holder
switch(index)
@@ -29,6 +24,7 @@ var/const/WIRE_TRANSMIT = 4
if(WIRE_TRANSMIT)
R.broadcasting = !R.broadcasting && !IsIndexCut(WIRE_SIGNAL)
nanomanager.update_uis(holder)
/datum/wires/radio/UpdateCut(var/index, var/mended)
var/obj/item/device/radio/R = holder
@@ -42,3 +38,4 @@ var/const/WIRE_TRANSMIT = 4
if(WIRE_TRANSMIT)
R.broadcasting = mended && !IsIndexCut(WIRE_SIGNAL)
nanomanager.update_uis(holder)
+4
View File
@@ -46,6 +46,10 @@ var/list/wireColours = list("red", "blue", "green", "darkred", "orange", "brown"
var/list/wires = same_wires[holder_type]
src.wires = wires // Reference the wires list.
/datum/wires/Destroy()
holder = null
return ..()
/datum/wires/proc/GenerateWires()
var/list/colours_to_pick = wireColours.Copy() // Get a copy, not a reference.
var/list/indexes_to_pick = list()