Merge branch 'master' into upstream-merge-33246
This commit is contained in:
@@ -117,4 +117,4 @@
|
||||
D.target = null
|
||||
D.error = "Connection to quantum relay severed"
|
||||
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided an invalid Computer ID.)")
|
||||
var/admin = 0
|
||||
var/ckey = ckey(key)
|
||||
if((ckey in GLOB.admin_datums) || (ckey in GLOB.deadmins))
|
||||
if(GLOB.admin_datums[ckey] || GLOB.deadmins[ckey])
|
||||
admin = 1
|
||||
|
||||
//Whitelist
|
||||
|
||||
+24
-22
@@ -722,41 +722,43 @@
|
||||
/datum/admins/proc/manage_free_slots()
|
||||
if(!check_rights())
|
||||
return
|
||||
var/dat = "<html><head><title>Manage Free Slots</title></head><body>"
|
||||
var/datum/browser/browser = new(usr, "jobmanagement", "Manage Free Slots", 520)
|
||||
var/list/dat = list()
|
||||
var/count = 0
|
||||
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert(usr, "You cannot manage jobs before the round starts!")
|
||||
if(!SSjob.initialized)
|
||||
alert(usr, "You cannot manage jobs before the job subsystem is initialized!")
|
||||
return
|
||||
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
dat += "<table>"
|
||||
|
||||
for(var/j in SSjob.occupations)
|
||||
var/datum/job/job = j
|
||||
count++
|
||||
var/J_title = html_encode(job.title)
|
||||
var/J_opPos = html_encode(job.total_positions - (job.total_positions - job.current_positions))
|
||||
var/J_totPos = html_encode(job.total_positions)
|
||||
if(job.total_positions < 0)
|
||||
dat += "[J_title]: [J_opPos] (unlimited)"
|
||||
else
|
||||
dat += "[J_title]: [J_opPos]/[J_totPos]"
|
||||
dat += "<tr><td>[J_title]:</td> <td>[J_opPos]/[job.total_positions < 0 ? " (unlimited)" : J_totPos]"
|
||||
|
||||
if(job.title == "AI" || job.title == "Cyborg")
|
||||
dat += " (Cannot Late Join)<br>"
|
||||
dat += " (Cannot Late Join)</td>"
|
||||
continue
|
||||
if(job.total_positions >= 0)
|
||||
dat += " <A href='?src=[REF(src)];[HrefToken()];addjobslot=[job.title]'>Add</A> | "
|
||||
if(job.total_positions > job.current_positions)
|
||||
dat += "<A href='?src=[REF(src)];[HrefToken()];removejobslot=[job.title]'>Remove</A> | "
|
||||
else
|
||||
dat += "Remove | "
|
||||
dat += "<A href='?src=[REF(src)];[HrefToken()];unlimitjobslot=[job.title]'>Unlimit</A>"
|
||||
else
|
||||
dat += " <A href='?src=[REF(src)];[HrefToken()];limitjobslot=[job.title]'>Limit</A>"
|
||||
dat += "<br>"
|
||||
dat += "</td>"
|
||||
dat += "<td>"
|
||||
if(job.total_positions >= 0)
|
||||
dat += "<A href='?src=[REF(src)];[HrefToken()];addjobslot=[job.title]'>Add</A> | "
|
||||
if(job.total_positions > job.current_positions)
|
||||
dat += "<A href='?src=[REF(src)];[HrefToken()];removejobslot=[job.title]'>Remove</A> | "
|
||||
else
|
||||
dat += "Remove | "
|
||||
dat += "<A href='?src=[REF(src)];[HrefToken()];unlimitjobslot=[job.title]'>Unlimit</A></td>"
|
||||
else
|
||||
dat += "<A href='?src=[REF(src)];[HrefToken()];limitjobslot=[job.title]'>Limit</A></td>"
|
||||
|
||||
dat += "</body>"
|
||||
var/winheight = 100 + (count * 20)
|
||||
winheight = min(winheight, 690)
|
||||
usr << browse(dat, "window=players;size=375x[winheight]")
|
||||
browser.height = min(100 + count * 20, 650)
|
||||
browser.set_content(dat.Join())
|
||||
browser.open()
|
||||
|
||||
/datum/admins/proc/create_or_modify_area()
|
||||
set category = "Debug"
|
||||
|
||||
@@ -4,13 +4,15 @@
|
||||
var/F = file("[GLOB.log_directory]/[subject].html")
|
||||
WRITE_FILE(F, "<small>[time_stamp()] [REF(src)] ([x],[y],[z])</small> || [src] [message]<br>")
|
||||
|
||||
/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_EXONET, INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS, INVESTIGATE_RADIATION) )
|
||||
/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_RESEARCH, INVESTIGATE_EXONET, INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS, INVESTIGATE_RADIATION) )
|
||||
set name = "Investigate"
|
||||
set category = "Admin"
|
||||
if(!holder)
|
||||
return
|
||||
switch(subject)
|
||||
if("notes, memos, watchlist")
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
browse_messages()
|
||||
else
|
||||
var/F = file("[GLOB.log_directory]/[subject].html")
|
||||
|
||||
@@ -3,7 +3,7 @@ GLOBAL_PROTECT(admin_ranks)
|
||||
|
||||
/datum/admin_rank
|
||||
var/name = "NoRank"
|
||||
var/rights = 0
|
||||
var/rights = R_DEFAULT
|
||||
var/list/adds
|
||||
var/list/subs
|
||||
|
||||
@@ -56,11 +56,13 @@ GLOBAL_PROTECT(admin_ranks)
|
||||
if("varedit")
|
||||
flag = R_VAREDIT
|
||||
if("everything","host","all")
|
||||
flag = 65535
|
||||
flag = ALL
|
||||
if("sound","sounds")
|
||||
flag = R_SOUNDS
|
||||
if("spawn","create")
|
||||
flag = R_SPAWN
|
||||
if("autologin", "autoadmin")
|
||||
flag = R_AUTOLOGIN
|
||||
if("@","prev")
|
||||
flag = previous_rights
|
||||
if("rejuv","rejuvinate")
|
||||
@@ -171,21 +173,19 @@ GLOBAL_PROTECT(admin_ranks)
|
||||
#endif
|
||||
|
||||
|
||||
/proc/load_admins(target = null)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
to_chat(usr, "<span class='admin prefix'>Admin Reload blocked: Advanced ProcCall detected.</span>")
|
||||
return
|
||||
/proc/load_admins()
|
||||
//clear the datums references
|
||||
if(!target)
|
||||
GLOB.admin_datums.Cut()
|
||||
for(var/client/C in GLOB.admins)
|
||||
C.remove_admin_verbs()
|
||||
C.holder = null
|
||||
GLOB.admins.Cut()
|
||||
load_admin_ranks()
|
||||
//Clear profile access
|
||||
for(var/A in world.GetConfig("admin"))
|
||||
world.SetConfig("APP/admin", A, null)
|
||||
|
||||
GLOB.admin_datums.Cut()
|
||||
for(var/client/C in GLOB.admins)
|
||||
C.remove_admin_verbs()
|
||||
C.holder = null
|
||||
GLOB.admins.Cut()
|
||||
GLOB.deadmins.Cut()
|
||||
load_admin_ranks()
|
||||
//Clear profile access
|
||||
for(var/A in world.GetConfig("admin"))
|
||||
world.SetConfig("APP/admin", A, null)
|
||||
|
||||
var/list/rank_names = list()
|
||||
for(var/datum/admin_rank/R in GLOB.admin_ranks)
|
||||
@@ -208,13 +208,11 @@ GLOBAL_PROTECT(admin_ranks)
|
||||
|
||||
var/ckey = ckey(entry[1])
|
||||
var/rank = ckeyEx(entry[2])
|
||||
if(!ckey || !rank || (target && ckey != target))
|
||||
if(!ckey || !rank)
|
||||
continue
|
||||
|
||||
var/datum/admins/D = new(rank_names[rank], ckey) //create the admin datum and store it for later use
|
||||
if(!D)
|
||||
continue //will occur if an invalid rank is provided
|
||||
D.associate(GLOB.directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
|
||||
new /datum/admins(rank_names[rank], ckey)
|
||||
|
||||
else
|
||||
if(!SSdbcore.Connect())
|
||||
log_world("Failed to connect to database in load_admins(). Reverting to legacy system.")
|
||||
@@ -229,19 +227,12 @@ GLOBAL_PROTECT(admin_ranks)
|
||||
while(query_load_admins.NextRow())
|
||||
var/ckey = ckey(query_load_admins.item[1])
|
||||
var/rank = ckeyEx(query_load_admins.item[2])
|
||||
if(target && ckey != target)
|
||||
continue
|
||||
|
||||
if(rank_names[rank] == null)
|
||||
WARNING("Admin rank ([rank]) does not exist.")
|
||||
continue
|
||||
|
||||
var/datum/admins/D = new(rank_names[rank], ckey) //create the admin datum and store it for later use
|
||||
if(!D)
|
||||
continue //will occur if an invalid rank is provided
|
||||
if(D.rank.rights & R_DEBUG) //grant profile access
|
||||
world.SetConfig("APP/admin", ckey, "role=admin")
|
||||
D.associate(GLOB.directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
|
||||
new /datum/admins(rank_names[rank], ckey)
|
||||
|
||||
#ifdef TESTING
|
||||
var/msg = "Admins Built:\n"
|
||||
@@ -298,6 +289,8 @@ GLOBAL_PROTECT(admin_ranks)
|
||||
return
|
||||
|
||||
var/datum/admins/D = GLOB.admin_datums[adm_ckey]
|
||||
if (!D)
|
||||
D = GLOB.deadmins[adm_ckey]
|
||||
|
||||
switch(task)
|
||||
if("remove")
|
||||
@@ -309,6 +302,7 @@ GLOBAL_PROTECT(admin_ranks)
|
||||
log_admin("[key_name(usr)] attempted to remove [adm_ckey] from the admins list without sufficient rights.")
|
||||
return
|
||||
GLOB.admin_datums -= adm_ckey
|
||||
GLOB.deadmins -= adm_ckey
|
||||
D.disassociate()
|
||||
|
||||
updateranktodb(adm_ckey, "player")
|
||||
@@ -350,11 +344,9 @@ GLOBAL_PROTECT(admin_ranks)
|
||||
if(D) //they were previously an admin
|
||||
D.disassociate() //existing admin needs to be disassociated
|
||||
D.rank = R //set the admin_rank as our rank
|
||||
D.associate()
|
||||
else
|
||||
D = new(R,adm_ckey) //new admin
|
||||
|
||||
var/client/C = GLOB.directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
|
||||
D.associate(C) //link up with the client and add verbs
|
||||
D = new(R, adm_ckey, TRUE) //new admin
|
||||
|
||||
updateranktodb(adm_ckey, new_rank)
|
||||
message_admins("[key_name_admin(usr)] edited the admin rank of [adm_ckey] to [new_rank]")
|
||||
@@ -387,6 +379,22 @@ GLOBAL_PROTECT(admin_ranks)
|
||||
message_admins("[key_name(usr)] added keyword [keyword] to permission of [adm_ckey]")
|
||||
log_admin("[key_name(usr)] added keyword [keyword] to permission of [adm_ckey]")
|
||||
log_admin_permission_modification(adm_ckey, D.rank.rights)
|
||||
if("activate") //forcefully readmin
|
||||
if(!D || !D.deadmined)
|
||||
return
|
||||
|
||||
D.activate()
|
||||
|
||||
message_admins("[key_name_admin(usr)] forcefully readmined [adm_ckey]")
|
||||
log_admin("[key_name(usr)] forcefully readmined [adm_ckey]")
|
||||
if("deactivate") //forcefully deadmin
|
||||
if(!D || D.deadmined)
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(usr)] forcefully deadmined [adm_ckey]")
|
||||
log_admin("[key_name(usr)] forcefully deadmined [adm_ckey]")
|
||||
|
||||
D.deactivate() //after logs so the deadmined admin can see the message.
|
||||
|
||||
edit_admin_permissions()
|
||||
|
||||
|
||||
@@ -638,12 +638,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
|
||||
if(has_antag_hud())
|
||||
toggle_antag_hud()
|
||||
|
||||
holder.disassociate()
|
||||
qdel(holder)
|
||||
|
||||
GLOB.deadmins += ckey
|
||||
GLOB.admin_datums -= ckey
|
||||
verbs += /client/proc/readmin
|
||||
holder.deactivate()
|
||||
|
||||
to_chat(src, "<span class='interface'>You are now a normal player.</span>")
|
||||
log_admin("[src] deadmined themself.")
|
||||
@@ -655,13 +650,20 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
|
||||
set category = "Admin"
|
||||
set desc = "Regain your admin powers."
|
||||
|
||||
load_admins(ckey)
|
||||
var/datum/admins/A = GLOB.deadmins[ckey]
|
||||
|
||||
if(!holder) // Something went wrong...
|
||||
return
|
||||
if(!A)
|
||||
A = GLOB.admin_datums[ckey]
|
||||
if (!A)
|
||||
var/msg = " is trying to readmin but they have no deadmin entry"
|
||||
message_admins("[key_name_admin(src)][msg]")
|
||||
log_admin_private("[key_name(src)][msg]")
|
||||
return
|
||||
|
||||
GLOB.deadmins -= ckey
|
||||
verbs -= /client/proc/readmin
|
||||
A.associate(src)
|
||||
|
||||
if (!holder)
|
||||
return //This can happen if an admin attempts to vv themself into somebody elses's deadmin datum by getting ref via brute force
|
||||
|
||||
to_chat(src, "<span class='interface'>You are now an admin.</span>")
|
||||
message_admins("[src] re-adminned themselves.")
|
||||
|
||||
@@ -47,7 +47,9 @@
|
||||
target = AH.initiator_ckey
|
||||
else
|
||||
return "Ticket #[id] not found!"
|
||||
return IrcPm(target, all_params.Join(" "), sender)
|
||||
var/res = IrcPm(target, all_params.Join(" "), sender)
|
||||
if(res != "Message Successful")
|
||||
return res
|
||||
|
||||
/datum/server_tools_command/namecheck
|
||||
name = "namecheck"
|
||||
@@ -81,3 +83,29 @@ GLOBAL_LIST(round_end_notifiees)
|
||||
LAZYINITLIST(GLOB.round_end_notifiees)
|
||||
GLOB.round_end_notifiees[sender] = TRUE
|
||||
return "I will notify [sender] when the round ends."
|
||||
|
||||
/datum/server_tools_command/sdql
|
||||
name = "sdql"
|
||||
help_text = "Runs an SDQL query"
|
||||
admin_only = TRUE
|
||||
|
||||
/datum/server_tools_command/sdql/Run(sender, params)
|
||||
if(GLOB.AdminProcCaller)
|
||||
return "Unable to run query, another admin proc call is in progress. Try again later."
|
||||
GLOB.AdminProcCaller = "CHAT_[sender]" //_ won't show up in ckeys so it'll never match with a real admin
|
||||
var/list/results = world.SDQL2_query(params, GLOB.AdminProcCaller, GLOB.AdminProcCaller)
|
||||
if(!results)
|
||||
return "Query produced no output"
|
||||
var/list/text_res = results.Copy(1, 3)
|
||||
var/list/refs = results.len > 3 ? results.Copy(4) : null
|
||||
. = "[text_res.Join("\n")][refs ? "\nRefs: [refs.Join(" ")]" : ""]"
|
||||
|
||||
/datum/server_tools_command/reload_admins
|
||||
name = "reload_admins"
|
||||
help_text = "Forces the server to reload admins."
|
||||
admin_only = TRUE
|
||||
|
||||
/datum/server_tools_command/reload_admins/Run(sender, params)
|
||||
load_admins()
|
||||
log_admin("[sender] reloaded admins via chat command.")
|
||||
return "Admins reloaded."
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
var/obj/docking_port/stationary/SM = S
|
||||
if(SM.id == "emergency_home")
|
||||
var/new_dir = turn(SM.dir, 180)
|
||||
SM.loc = get_ranged_target_turf(SM, new_dir, rand(3,15))
|
||||
SM.forceMove(get_ranged_target_turf(SM, new_dir, rand(3,15)))
|
||||
break
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ GLOBAL_PROTECT(href_token)
|
||||
/datum/admins
|
||||
var/datum/admin_rank/rank
|
||||
|
||||
var/target
|
||||
var/name = "nobody's admin datum (no rank)" //Makes for better runtimes
|
||||
var/client/owner = null
|
||||
var/fakekey = null
|
||||
|
||||
@@ -19,9 +21,12 @@ GLOBAL_PROTECT(href_token)
|
||||
var/datum/newscaster/wanted_message/admincaster_wanted_message = new /datum/newscaster/wanted_message
|
||||
var/datum/newscaster/feed_channel/admincaster_feed_channel = new /datum/newscaster/feed_channel
|
||||
var/admin_signature
|
||||
|
||||
var/href_token
|
||||
|
||||
/datum/admins/New(datum/admin_rank/R, ckey)
|
||||
var/deadmined
|
||||
|
||||
/datum/admins/New(datum/admin_rank/R, ckey, force_active = FALSE)
|
||||
if(!ckey)
|
||||
QDEL_IN(src, 0)
|
||||
throw EXCEPTION("Admin datum created without a ckey")
|
||||
@@ -30,34 +35,36 @@ GLOBAL_PROTECT(href_token)
|
||||
QDEL_IN(src, 0)
|
||||
throw EXCEPTION("Admin datum created without a rank")
|
||||
return
|
||||
target = ckey
|
||||
name = "[ckey]'s admin datum ([R])"
|
||||
rank = R
|
||||
admin_signature = "Nanotrasen Officer #[rand(0,9)][rand(0,9)][rand(0,9)]"
|
||||
href_token = GenerateToken()
|
||||
GLOB.admin_datums[ckey] = src
|
||||
if(R.rights & R_DEBUG) //grant profile access
|
||||
world.SetConfig("APP/admin", ckey, "role=admin")
|
||||
//only admins with +ADMIN start admined
|
||||
if (force_active || (R.rights & R_AUTOLOGIN))
|
||||
activate()
|
||||
else
|
||||
deactivate()
|
||||
|
||||
/proc/GenerateToken()
|
||||
. = ""
|
||||
for(var/I in 1 to 32)
|
||||
. += "[rand(10)]"
|
||||
|
||||
/proc/RawHrefToken(forceGlobal = FALSE)
|
||||
var/tok = GLOB.href_token
|
||||
if(!forceGlobal && usr)
|
||||
var/client/C = usr.client
|
||||
if(!C)
|
||||
CRASH("No client for HrefToken()!")
|
||||
var/datum/admins/holder = C.holder
|
||||
if(holder)
|
||||
tok = holder.href_token
|
||||
return tok
|
||||
/datum/admins/proc/activate()
|
||||
GLOB.deadmins -= target
|
||||
GLOB.admin_datums[target] = src
|
||||
deadmined = FALSE
|
||||
if (GLOB.directory[target])
|
||||
associate(GLOB.directory[target]) //find the client for a ckey if they are connected and associate them with us
|
||||
|
||||
/proc/HrefToken(forceGlobal = FALSE)
|
||||
return "admin_token=[RawHrefToken(forceGlobal)]"
|
||||
|
||||
/proc/HrefTokenFormField(forceGlobal = FALSE)
|
||||
return "<input type='hidden' name='admin_token' value='[RawHrefToken(forceGlobal)]'>"
|
||||
/datum/admins/proc/deactivate()
|
||||
GLOB.deadmins[target] = src
|
||||
GLOB.admin_datums -= target
|
||||
deadmined = TRUE
|
||||
var/client/C
|
||||
if ((C = owner) || (C = GLOB.directory[target]))
|
||||
disassociate()
|
||||
C.verbs += /client/proc/readmin
|
||||
|
||||
/datum/admins/proc/associate(client/C)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
@@ -65,10 +72,18 @@ GLOBAL_PROTECT(href_token)
|
||||
message_admins("[key_name_admin(usr)][msg]")
|
||||
log_admin_private("[key_name(usr)][msg]")
|
||||
return
|
||||
|
||||
if(istype(C))
|
||||
if(C.ckey != target)
|
||||
var/msg = " has attempted to associate with [target]'s admin datum"
|
||||
message_admins("[key_name_admin(C)][msg]")
|
||||
log_admin_private("[key_name(C)][msg]")
|
||||
return
|
||||
if (deadmined)
|
||||
activate()
|
||||
owner = C
|
||||
owner.holder = src
|
||||
owner.add_admin_verbs() //TODO
|
||||
owner.add_admin_verbs() //TODO <--- todo what? the proc clearly exists and works since its the backbone to our entire admin system
|
||||
owner.verbs -= /client/proc/readmin
|
||||
GLOB.admins |= C
|
||||
|
||||
@@ -79,6 +94,12 @@ GLOBAL_PROTECT(href_token)
|
||||
owner.holder = null
|
||||
owner = null
|
||||
|
||||
/datum/admins/proc/check_for_rights(rights_required)
|
||||
if(rights_required && !(rights_required & rank.rights))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/datum/admins/proc/check_if_greater_rights_than_holder(datum/admins/other)
|
||||
if(!other)
|
||||
return 1 //they have no rights
|
||||
@@ -128,8 +149,28 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
|
||||
|
||||
//This proc checks whether subject has at least ONE of the rights specified in rights_required.
|
||||
/proc/check_rights_for(client/subject, rights_required)
|
||||
if(subject && subject.holder && subject.holder.rank)
|
||||
if(rights_required && !(rights_required & subject.holder.rank.rights))
|
||||
return 0
|
||||
return 1
|
||||
if(subject && subject.holder)
|
||||
return subject.holder.check_for_rights(rights_required)
|
||||
return 0
|
||||
|
||||
/proc/GenerateToken()
|
||||
. = ""
|
||||
for(var/I in 1 to 32)
|
||||
. += "[rand(10)]"
|
||||
|
||||
/proc/RawHrefToken(forceGlobal = FALSE)
|
||||
var/tok = GLOB.href_token
|
||||
if(!forceGlobal && usr)
|
||||
var/client/C = usr.client
|
||||
if(!C)
|
||||
CRASH("No client for HrefToken()!")
|
||||
var/datum/admins/holder = C.holder
|
||||
if(holder)
|
||||
tok = holder.href_token
|
||||
return tok
|
||||
|
||||
/proc/HrefToken(forceGlobal = FALSE)
|
||||
return "admin_token=[RawHrefToken(forceGlobal)]"
|
||||
|
||||
/proc/HrefTokenFormField(forceGlobal = FALSE)
|
||||
return "<input type='hidden' name='admin_token' value='[RawHrefToken(forceGlobal)]'>"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
if(!check_rights(R_PERMISSIONS))
|
||||
return
|
||||
|
||||
var/output = {"<!DOCTYPE html>
|
||||
var/list/output = list({"<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Permissions Panel</title>
|
||||
@@ -25,18 +25,26 @@
|
||||
<th style='width:375px;'>PERMISSIONS</th>
|
||||
<th style='width:100%;'>VERB-OVERRIDES</th>
|
||||
</tr>
|
||||
"}
|
||||
"})
|
||||
|
||||
for(var/adm_ckey in GLOB.admin_datums)
|
||||
for(var/adm_ckey in GLOB.admin_datums+GLOB.deadmins)
|
||||
var/datum/admins/D = GLOB.admin_datums[adm_ckey]
|
||||
if(!D)
|
||||
continue
|
||||
D = GLOB.deadmins[adm_ckey]
|
||||
if (!D)
|
||||
continue
|
||||
|
||||
var/rights = rights2text(D.rank.rights," ")
|
||||
if(!rights) rights = "*none*"
|
||||
if(!rights)
|
||||
rights = "*none*"
|
||||
var/deadminlink = ""
|
||||
if (D.deadmined)
|
||||
deadminlink = " <a class='small' href='?src=[REF(src)];[HrefToken()];editrights=activate;ckey=[adm_ckey]'>\[RA\]</a>"
|
||||
else
|
||||
deadminlink = " <a class='small' href='?src=[REF(src)];[HrefToken()];editrights=deactivate;ckey=[adm_ckey]'>\[DA\]</a>"
|
||||
|
||||
output += "<tr>"
|
||||
output += "<td style='text-align:right;'>[adm_ckey] <a class='small' href='?src=[REF(src)];[HrefToken()];editrights=remove;ckey=[adm_ckey]'>\[-\]</a></td>"
|
||||
output += "<td style='text-align:right;'>[adm_ckey] [deadminlink]<a class='small' href='?src=[REF(src)];[HrefToken()];editrights=remove;ckey=[adm_ckey]'>\[-\]</a></td>"
|
||||
output += "<td><a href='?src=[REF(src)];[HrefToken()];editrights=rank;ckey=[adm_ckey]'>[D.rank.name]</a></td>"
|
||||
output += "<td><a class='small' href='?src=[REF(src)];[HrefToken()];editrights=permissions;ckey=[adm_ckey]'>[rights]</a></td>"
|
||||
output += "<td><a class='small' href='?src=[REF(src)];[HrefToken()];editrights=permissions;ckey=[adm_ckey]'>[rights2text(0," ",D.rank.adds,D.rank.subs)]</a></td>"
|
||||
@@ -48,7 +56,7 @@
|
||||
</body>
|
||||
</html>"}
|
||||
|
||||
usr << browse(output,"window=editrights;size=900x650")
|
||||
usr << browse(jointext(output, ""),"window=editrights;size=900x650")
|
||||
|
||||
/datum/admins/proc/log_admin_rank_modification(adm_ckey, new_rank)
|
||||
if(CONFIG_GET(flag/admin_legacy_system))
|
||||
|
||||
@@ -384,9 +384,10 @@
|
||||
dat += "<BR><span class='userdanger'>[other_players] players in invalid state or the statistics code is bugged!</span>"
|
||||
dat += "<BR>"
|
||||
|
||||
if(SSticker.mode.syndicates.len)
|
||||
var/list/nukeops = get_antagonists(/datum/antagonist/nukeop)
|
||||
if(nukeops.len)
|
||||
dat += "<br><table cellspacing=5><tr><td><B>Syndicates</B></td><td></td></tr>"
|
||||
for(var/datum/mind/N in SSticker.mode.syndicates)
|
||||
for(var/datum/mind/N in nukeops)
|
||||
var/mob/M = N.current
|
||||
if(M)
|
||||
dat += "<tr><td><a href='?_src_=holder;[HrefToken()];adminplayeropts=[REF(M)]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == DEAD ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
var/new_volume = input(user, "Choose a volume.", "Sound Emitter", sound_volume) as null|num
|
||||
if(isnull(new_volume))
|
||||
return
|
||||
new_volume = Clamp(new_volume, 0, 100)
|
||||
new_volume = CLAMP(new_volume, 0, 100)
|
||||
sound_volume = new_volume
|
||||
to_chat(user, "<span class='notice'>Volume set to [sound_volume]%.</span>")
|
||||
if(href_list["edit_mode"])
|
||||
@@ -115,7 +115,7 @@
|
||||
var/new_radius = input(user, "Choose a radius.", "Sound Emitter", sound_volume) as null|num
|
||||
if(isnull(new_radius))
|
||||
return
|
||||
new_radius = Clamp(new_radius, 0, 127)
|
||||
new_radius = CLAMP(new_radius, 0, 127)
|
||||
play_radius = new_radius
|
||||
to_chat(user, "<span class='notice'>Audible radius set to [play_radius].</span>")
|
||||
if(href_list["play"])
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
var/nsd = CONFIG_GET(number/note_stale_days)
|
||||
var/nfd = CONFIG_GET(number/note_fresh_days)
|
||||
if (agegate && type == "note" && isnum(nsd) && isnum(nfd) && nsd > nfd)
|
||||
var/alpha = Clamp(100 - (age - nfd) * (85 / (nsd - nfd)), 15, 100)
|
||||
var/alpha = CLAMP(100 - (age - nfd) * (85 / (nsd - nfd)), 15, 100)
|
||||
if (alpha < 100)
|
||||
if (alpha <= 15)
|
||||
if (skipped)
|
||||
|
||||
+123
-3
@@ -58,6 +58,8 @@
|
||||
toggle_exempt_status(C)
|
||||
|
||||
else if(href_list["makeAntag"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
if (!SSticker.mode)
|
||||
to_chat(usr, "<span class='danger'>Not until the round starts!</span>")
|
||||
return
|
||||
@@ -201,7 +203,8 @@
|
||||
return
|
||||
|
||||
else if(href_list["dbbanaddtype"])
|
||||
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
var/bantype = text2num(href_list["dbbanaddtype"])
|
||||
var/banckey = href_list["dbbanaddckey"]
|
||||
var/banip = href_list["dbbanaddip"]
|
||||
@@ -599,6 +602,8 @@
|
||||
return
|
||||
|
||||
else if(href_list["jobban2"])
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
var/mob/M = locate(href_list["jobban2"])
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
@@ -1029,6 +1034,8 @@
|
||||
return 0 //we didn't do anything!
|
||||
|
||||
else if(href_list["boot2"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/mob/M = locate(href_list["boot2"])
|
||||
if (ismob(M))
|
||||
if(!check_if_greater_rights_than(M.client))
|
||||
@@ -1041,72 +1048,110 @@
|
||||
qdel(M.client)
|
||||
|
||||
else if(href_list["addmessage"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/target_ckey = href_list["addmessage"]
|
||||
create_message("message", target_ckey, secret = 0)
|
||||
|
||||
else if(href_list["addnote"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/target_ckey = href_list["addnote"]
|
||||
create_message("note", target_ckey)
|
||||
|
||||
else if(href_list["addwatch"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/target_ckey = href_list["addwatch"]
|
||||
create_message("watchlist entry", target_ckey, secret = 1)
|
||||
|
||||
else if(href_list["addmemo"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
create_message("memo", secret = 0, browse = 1)
|
||||
|
||||
else if(href_list["addmessageempty"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
create_message("message", secret = 0)
|
||||
|
||||
else if(href_list["addnoteempty"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
create_message("note")
|
||||
|
||||
else if(href_list["addwatchempty"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
create_message("watchlist entry", secret = 1)
|
||||
|
||||
else if(href_list["deletemessage"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/message_id = href_list["deletemessage"]
|
||||
delete_message(message_id)
|
||||
|
||||
else if(href_list["deletemessageempty"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/message_id = href_list["deletemessageempty"]
|
||||
delete_message(message_id, browse = 1)
|
||||
|
||||
else if(href_list["editmessage"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/message_id = href_list["editmessage"]
|
||||
edit_message(message_id)
|
||||
|
||||
else if(href_list["editmessageempty"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/message_id = href_list["editmessageempty"]
|
||||
edit_message(message_id, browse = 1)
|
||||
|
||||
else if(href_list["secretmessage"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/message_id = href_list["secretmessage"]
|
||||
toggle_message_secrecy(message_id)
|
||||
|
||||
else if(href_list["searchmessages"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/target = href_list["searchmessages"]
|
||||
browse_messages(index = target)
|
||||
|
||||
else if(href_list["nonalpha"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/target = href_list["nonalpha"]
|
||||
target = text2num(target)
|
||||
browse_messages(index = target)
|
||||
|
||||
else if(href_list["showmessages"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/target = href_list["showmessages"]
|
||||
browse_messages(index = target)
|
||||
|
||||
else if(href_list["showmemo"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
browse_messages("memo")
|
||||
|
||||
else if(href_list["showwatch"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
browse_messages("watchlist entry")
|
||||
|
||||
else if(href_list["showwatchfilter"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
browse_messages("watchlist entry", filter = 1)
|
||||
|
||||
else if(href_list["showmessageckey"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/target = href_list["showmessageckey"]
|
||||
var/agegate = TRUE
|
||||
if (href_list["showall"])
|
||||
@@ -1118,6 +1163,8 @@
|
||||
browse_messages(target_ckey = target, linkless = 1)
|
||||
|
||||
else if(href_list["messageedits"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/message_id = sanitizeSQL("[href_list["messageedits"]]")
|
||||
var/datum/DBQuery/query_get_message_edits = SSdbcore.NewQuery("SELECT edits FROM [format_table_name("messages")] WHERE id = '[message_id]'")
|
||||
if(!query_get_message_edits.warn_execute())
|
||||
@@ -1307,7 +1354,7 @@
|
||||
if(alert(usr, "Send [key_name(M)] to Prison?", "Message", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
M.loc = pick(GLOB.prisonwarp)
|
||||
M.forceMove(pick(GLOB.prisonwarp))
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to Prison!</span>")
|
||||
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to Prison!")
|
||||
@@ -1544,6 +1591,15 @@
|
||||
var/mob/dead/observer/A = C.mob
|
||||
A.ManualFollow(AM)
|
||||
|
||||
else if(href_list["admingetmovable"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/atom/movable/AM = locate(href_list["admingetmovable"])
|
||||
if(QDELETED(AM))
|
||||
return
|
||||
AM.forceMove(get_turf(usr))
|
||||
|
||||
else if(href_list["adminplayerobservecoodjump"])
|
||||
if(!isobserver(usr) && !check_rights(R_ADMIN))
|
||||
return
|
||||
@@ -1559,9 +1615,13 @@
|
||||
C.jumptocoord(x,y,z)
|
||||
|
||||
else if(href_list["adminchecklaws"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
output_ai_laws()
|
||||
|
||||
else if(href_list["admincheckdevilinfo"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/mob/M = locate(href_list["admincheckdevilinfo"])
|
||||
output_devil_info(M)
|
||||
|
||||
@@ -1883,7 +1943,7 @@
|
||||
return
|
||||
|
||||
var/list/offset = splittext(href_list["offset"],",")
|
||||
var/number = Clamp(text2num(href_list["object_count"]), 1, 100)
|
||||
var/number = CLAMP(text2num(href_list["object_count"]), 1, 100)
|
||||
var/X = offset.len > 0 ? text2num(offset[1]) : 0
|
||||
var/Y = offset.len > 1 ? text2num(offset[2]) : 0
|
||||
var/Z = offset.len > 2 ? text2num(offset[3]) : 0
|
||||
@@ -1970,20 +2030,28 @@
|
||||
Secrets_topic(href_list["secrets"],href_list)
|
||||
|
||||
else if(href_list["ac_view_wanted"]) //Admin newscaster Topic() stuff be here
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
src.admincaster_screen = 18 //The ac_ prefix before the hrefs stands for AdminCaster.
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_channel_name"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
src.admincaster_feed_channel.channel_name = stripped_input(usr, "Provide a Feed Channel Name.", "Network Channel Handler", "")
|
||||
while (findtext(src.admincaster_feed_channel.channel_name," ") == 1)
|
||||
src.admincaster_feed_channel.channel_name = copytext(src.admincaster_feed_channel.channel_name,2,lentext(src.admincaster_feed_channel.channel_name)+1)
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_channel_lock"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
src.admincaster_feed_channel.locked = !src.admincaster_feed_channel.locked
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_submit_new_channel"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/check = 0
|
||||
for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
|
||||
if(FC.channel_name == src.admincaster_feed_channel.channel_name)
|
||||
@@ -2001,6 +2069,8 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_channel_receiving"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/list/available_channels = list()
|
||||
for(var/datum/newscaster/feed_channel/F in GLOB.news_network.network_channels)
|
||||
available_channels += F.channel_name
|
||||
@@ -2008,12 +2078,16 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_new_message"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
src.admincaster_feed_message.body = adminscrub(input(usr, "Write your Feed story.", "Network Channel Handler", ""))
|
||||
while (findtext(src.admincaster_feed_message.returnBody(-1)," ") == 1)
|
||||
src.admincaster_feed_message.body = copytext(src.admincaster_feed_message.returnBody(-1),2,lentext(src.admincaster_feed_message.returnBody(-1))+1)
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_submit_new_message"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
if(src.admincaster_feed_message.returnBody(-1) =="" || src.admincaster_feed_message.returnBody(-1) =="\[REDACTED\]" || src.admincaster_feed_channel.channel_name == "" )
|
||||
src.admincaster_screen = 6
|
||||
else
|
||||
@@ -2028,22 +2102,32 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_create_channel"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
src.admincaster_screen=2
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_create_feed_story"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
src.admincaster_screen=3
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_menu_censor_story"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
src.admincaster_screen=10
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_menu_censor_channel"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
src.admincaster_screen=11
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_menu_wanted"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/already_wanted = 0
|
||||
if(GLOB.news_network.wanted_issue.active)
|
||||
already_wanted = 1
|
||||
@@ -2055,18 +2139,24 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_wanted_name"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
src.admincaster_wanted_message.criminal = adminscrub(input(usr, "Provide the name of the Wanted person.", "Network Security Handler", ""))
|
||||
while(findtext(src.admincaster_wanted_message.criminal," ") == 1)
|
||||
src.admincaster_wanted_message.criminal = copytext(admincaster_wanted_message.criminal,2,lentext(admincaster_wanted_message.criminal)+1)
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_wanted_desc"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
src.admincaster_wanted_message.body = adminscrub(input(usr, "Provide the a description of the Wanted person and any other details you deem important.", "Network Security Handler", ""))
|
||||
while (findtext(src.admincaster_wanted_message.body," ") == 1)
|
||||
src.admincaster_wanted_message.body = copytext(src.admincaster_wanted_message.body,2,lentext(src.admincaster_wanted_message.body)+1)
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_submit_wanted"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/input_param = text2num(href_list["ac_submit_wanted"])
|
||||
if(src.admincaster_wanted_message.criminal == "" || src.admincaster_wanted_message.body == "")
|
||||
src.admincaster_screen = 16
|
||||
@@ -2083,6 +2173,8 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_cancel_wanted"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/choice = alert("Please confirm Wanted Issue removal.","Network Security Handler","Confirm","Cancel")
|
||||
if(choice=="Confirm")
|
||||
GLOB.news_network.deleteWanted()
|
||||
@@ -2090,36 +2182,50 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_censor_channel_author"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/newscaster/feed_channel/FC = locate(href_list["ac_censor_channel_author"])
|
||||
FC.toggleCensorAuthor()
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_censor_channel_story_author"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/newscaster/feed_message/MSG = locate(href_list["ac_censor_channel_story_author"])
|
||||
MSG.toggleCensorAuthor()
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_censor_channel_story_body"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/newscaster/feed_message/MSG = locate(href_list["ac_censor_channel_story_body"])
|
||||
MSG.toggleCensorBody()
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_pick_d_notice"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/newscaster/feed_channel/FC = locate(href_list["ac_pick_d_notice"])
|
||||
src.admincaster_feed_channel = FC
|
||||
src.admincaster_screen=13
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_toggle_d_notice"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/newscaster/feed_channel/FC = locate(href_list["ac_toggle_d_notice"])
|
||||
FC.toggleCensorDclass()
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_view"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
src.admincaster_screen=1
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_setScreen"]) //Brings us to the main menu and resets all fields~
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
src.admincaster_screen = text2num(href_list["ac_setScreen"])
|
||||
if (src.admincaster_screen == 0)
|
||||
if(src.admincaster_feed_channel)
|
||||
@@ -2131,25 +2237,35 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_show_channel"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/newscaster/feed_channel/FC = locate(href_list["ac_show_channel"])
|
||||
src.admincaster_feed_channel = FC
|
||||
src.admincaster_screen = 9
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_pick_censor_channel"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/newscaster/feed_channel/FC = locate(href_list["ac_pick_censor_channel"])
|
||||
src.admincaster_feed_channel = FC
|
||||
src.admincaster_screen = 12
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_refresh"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_signature"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
src.admin_signature = adminscrub(input(usr, "Provide your desired signature.", "Network Identity Handler", ""))
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_del_comment"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/newscaster/feed_comment/FC = locate(href_list["ac_del_comment"])
|
||||
var/datum/newscaster/feed_message/FM = locate(href_list["ac_del_comment_msg"])
|
||||
FM.comments -= FC
|
||||
@@ -2157,6 +2273,8 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_lock_comment"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/newscaster/feed_message/FM = locate(href_list["ac_lock_comment"])
|
||||
FM.locked ^= 1
|
||||
src.access_news_network()
|
||||
@@ -2253,6 +2371,8 @@
|
||||
error_viewer.show_to(owner, null, href_list["viewruntime_linear"])
|
||||
|
||||
else if(href_list["showrelatedacc"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/client/C = locate(href_list["client"]) in GLOB.clients
|
||||
var/thing_to_check
|
||||
if(href_list["showrelatedacc"] == "cid")
|
||||
|
||||
@@ -24,10 +24,14 @@
|
||||
message_admins("<span class='danger'>ERROR: Non-admin [key_name(usr, usr.client)] attempted to execute a SDQL query!</span>")
|
||||
log_admin("Non-admin [usr.ckey]([usr]) attempted to execute a SDQL query!")
|
||||
return FALSE
|
||||
var/list/results = world.SDQL2_query(query_text, key_name_admin(usr), "[usr.ckey]([usr])")
|
||||
for(var/I in 1 to 3)
|
||||
to_chat(usr, results[I])
|
||||
|
||||
/world/proc/SDQL2_query(query_text, log_entry1, log_entry2)
|
||||
var/query_log = "executed SDQL query: \"[query_text]\"."
|
||||
message_admins("[key_name_admin(usr)] [query_log]")
|
||||
query_log = "[usr.ckey]([usr]) [query_log]"
|
||||
message_admins("[log_entry1] [query_log]")
|
||||
query_log = "[log_entry2] [query_log]"
|
||||
log_game(query_log)
|
||||
NOTICE(query_log)
|
||||
var/objs_all = 0
|
||||
@@ -49,6 +53,7 @@
|
||||
if(!querys || querys.len < 1)
|
||||
return
|
||||
|
||||
var/list/refs = list()
|
||||
for(var/list/query_tree in querys)
|
||||
var/list/from_objs = list()
|
||||
var/list/select_types = list()
|
||||
@@ -100,6 +105,7 @@
|
||||
var/text = ""
|
||||
for(var/datum/t in objs)
|
||||
text += SDQL_gen_vv_href(t)
|
||||
refs[REF(t)] = TRUE
|
||||
CHECK_TICK
|
||||
usr << browse(text, "window=SDQL-result")
|
||||
|
||||
@@ -112,9 +118,9 @@
|
||||
|
||||
var/end_time = REALTIMEOFDAY
|
||||
end_time -= start_time
|
||||
to_chat(usr, "<span class='admin'>SDQL query results: [query_text]</span>")
|
||||
to_chat(usr, "<span class='admin'>SDQL query completed: [objs_all] objects selected by path, and [objs_eligible] objects executed on after WHERE filtering if applicable.</span>")
|
||||
to_chat(usr, "<span class='admin'>SDQL query took [DisplayTimeText(end_time)] to complete.</span>")
|
||||
return list("<span class='admin'>SDQL query results: [query_text]</span>",\
|
||||
"<span class='admin'>SDQL query completed: [objs_all] objects selected by path, and [objs_eligible] objects executed on after WHERE filtering if applicable.</span>",\
|
||||
"<span class='admin'>SDQL query took [DisplayTimeText(end_time)] to complete.</span>") + refs
|
||||
|
||||
/proc/SDQL_qdel_datum(datum/d)
|
||||
qdel(d)
|
||||
@@ -429,7 +435,7 @@
|
||||
else if(expression[start + 1] == "\[" && islist(v))
|
||||
var/list/L = v
|
||||
var/index = SDQL_expression(source, expression[start + 2])
|
||||
if(isnum(index) && (!IsInteger(index) || L.len < index))
|
||||
if(isnum(index) && (!ISINTEGER(index) || L.len < index))
|
||||
to_chat(usr, "<span class='danger'>Invalid list index: [index]</span>")
|
||||
return null
|
||||
return L[index]
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
|
||||
usr.loc = T
|
||||
usr.forceMove(T)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Turf") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
admin_ticket_log(M, msg)
|
||||
if(M)
|
||||
M.forceMove(get_turf(usr))
|
||||
usr.loc = M.loc
|
||||
usr.forceMove(M.loc)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Get Key") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/sendmob(mob/M in sortmobs())
|
||||
|
||||
@@ -110,7 +110,9 @@ GLOBAL_PROTECT(LastAdminCalledProc)
|
||||
|
||||
/proc/WrapAdminProcCall(target, procname, list/arguments)
|
||||
var/current_caller = GLOB.AdminProcCaller
|
||||
var/ckey = usr.client.ckey
|
||||
var/ckey = usr ? usr.client.ckey : GLOB.AdminProcCaller
|
||||
if(!ckey)
|
||||
CRASH("WrapAdminProcCall with no ckey: [target] [procname] [english_list(arguments)]")
|
||||
if(current_caller && current_caller != ckey)
|
||||
to_chat(usr, "<span class='adminnotice'>Another set of admin called procs are still running, your proc will be run after theirs finish.</span>")
|
||||
UNTIL(!GLOB.AdminProcCaller)
|
||||
@@ -737,7 +739,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
|
||||
Plasma.air_contents.gases[/datum/gas/plasma][MOLES] = 70
|
||||
Rad.drainratio = 0
|
||||
Rad.loaded_tank = Plasma
|
||||
Plasma.loc = Rad
|
||||
Plasma.forceMove(Rad)
|
||||
|
||||
if(!Rad.active)
|
||||
Rad.toggle_power()
|
||||
|
||||
@@ -55,5 +55,5 @@
|
||||
else if(I) // Put the implant in case.
|
||||
var/obj/item/implantcase/case = new(get_turf(C))
|
||||
case.imp = I
|
||||
I.loc = case
|
||||
I.forceMove(case)
|
||||
case.update_icon()
|
||||
|
||||
@@ -238,26 +238,18 @@
|
||||
if(agentcount < 3)
|
||||
return 0
|
||||
|
||||
var/nuke_code = random_nukecode()
|
||||
|
||||
var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in GLOB.nuke_list
|
||||
if(nuke)
|
||||
nuke.r_code = nuke_code
|
||||
|
||||
//Let's find the spawn locations
|
||||
var/leader_chosen = FALSE
|
||||
var/spawnpos = 1 //Decides where they'll spawn. 1=leader.
|
||||
|
||||
|
||||
var/datum/objective_team/nuclear/nuke_team
|
||||
for(var/mob/c in chosen)
|
||||
if(spawnpos > GLOB.nukeop_start.len)
|
||||
spawnpos = 1 //Ran out of spawns. Let's loop back to the first non-leader position
|
||||
var/mob/living/carbon/human/new_character=makeBody(c)
|
||||
if(!leader_chosen)
|
||||
leader_chosen = TRUE
|
||||
new_character.mind.make_Nuke(pick(GLOB.nukeop_leader_start), nuke_code, TRUE)
|
||||
var/datum/antagonist/nukeop/N = new_character.mind.add_antag_datum(/datum/antagonist/nukeop/leader)
|
||||
nuke_team = N.nuke_team
|
||||
else
|
||||
new_character.mind.make_Nuke(GLOB.nukeop_start[spawnpos], nuke_code)
|
||||
spawnpos++
|
||||
new_character.mind.add_antag_datum(/datum/antagonist/nukeop,nuke_team)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/vol = input(usr, "What volume would you like the sound to play at?",, 100) as null|num
|
||||
if(!vol)
|
||||
return
|
||||
vol = Clamp(vol, 1, 100)
|
||||
vol = CLAMP(vol, 1, 100)
|
||||
|
||||
var/sound/admin_sound = new()
|
||||
admin_sound.file = S
|
||||
|
||||
@@ -386,7 +386,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
A.equip_wizard()
|
||||
if("Syndicate")
|
||||
new_character.forceMove(pick(GLOB.nukeop_start))
|
||||
call(/datum/game_mode/proc/equip_syndicate)(new_character)
|
||||
var/datum/antagonist/nukeop/N = new_character.mind.has_antag_datum(/datum/antagonist/nukeop,TRUE)
|
||||
N.equip_op()
|
||||
if("Space Ninja")
|
||||
var/list/ninja_spawn = list()
|
||||
for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list)
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
throwforce = 2
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
|
||||
var/secured = TRUE
|
||||
var/list/attached_overlays = null
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
var/status = FALSE //0 - not readied //1 - bomb finished with welder
|
||||
var/obj/item/device/assembly_holder/bombassembly = null //The first part of the bomb is an assembly holder, holding an igniter+some device
|
||||
var/obj/item/tank/bombtank = null //the second part of the bomb is a plasma tank
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
|
||||
|
||||
/obj/item/device/onetankbomb/examine(mob/user)
|
||||
@@ -116,13 +115,16 @@
|
||||
air_contents.assert_gases(/datum/gas/plasma, /datum/gas/oxygen)
|
||||
var/fuel_moles = air_contents.gases[/datum/gas/plasma][MOLES] + air_contents.gases[/datum/gas/oxygen][MOLES]/6
|
||||
air_contents.garbage_collect()
|
||||
|
||||
var/datum/gas_mixture/bomb_mixture = air_contents.copy()
|
||||
var/strength = 1
|
||||
|
||||
var/turf/ground_zero = get_turf(loc)
|
||||
loc = null
|
||||
|
||||
if(air_contents.temperature > (T0C + 400))
|
||||
if(master)
|
||||
qdel(master)
|
||||
qdel(src)
|
||||
|
||||
if(bomb_mixture.temperature > (T0C + 400))
|
||||
strength = (fuel_moles/15)
|
||||
|
||||
if(strength >=1)
|
||||
@@ -132,10 +134,10 @@
|
||||
else if(strength >=0.2)
|
||||
explosion(ground_zero, -1, 0, 1, 2)
|
||||
else
|
||||
ground_zero.assume_air(air_contents)
|
||||
ground_zero.assume_air(bomb_mixture)
|
||||
ground_zero.hotspot_expose(1000, 125)
|
||||
|
||||
else if(air_contents.temperature > (T0C + 250))
|
||||
else if(bomb_mixture.temperature > (T0C + 250))
|
||||
strength = (fuel_moles/20)
|
||||
|
||||
if(strength >=1)
|
||||
@@ -143,26 +145,23 @@
|
||||
else if (strength >=0.5)
|
||||
explosion(ground_zero, -1, 0, 1, 2)
|
||||
else
|
||||
ground_zero.assume_air(air_contents)
|
||||
ground_zero.assume_air(bomb_mixture)
|
||||
ground_zero.hotspot_expose(1000, 125)
|
||||
|
||||
else if(air_contents.temperature > (T0C + 100))
|
||||
else if(bomb_mixture.temperature > (T0C + 100))
|
||||
strength = (fuel_moles/25)
|
||||
|
||||
if (strength >=1)
|
||||
explosion(ground_zero, -1, 0, round(strength,1), round(strength*3,1))
|
||||
else
|
||||
ground_zero.assume_air(air_contents)
|
||||
ground_zero.assume_air(bomb_mixture)
|
||||
ground_zero.hotspot_expose(1000, 125)
|
||||
|
||||
else
|
||||
ground_zero.assume_air(air_contents)
|
||||
ground_zero.assume_air(bomb_mixture)
|
||||
ground_zero.hotspot_expose(1000, 125)
|
||||
|
||||
air_update_turf()
|
||||
if(master)
|
||||
qdel(master)
|
||||
qdel(src)
|
||||
ground_zero.air_update_turf()
|
||||
|
||||
/obj/item/tank/proc/release() //This happens when the bomb is not welded. Tank contents are just spat out.
|
||||
var/datum/gas_mixture/removed = air_contents.remove(air_contents.total_moles())
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
name = "blast door controller"
|
||||
desc = "A small electronic device able to control a blast door remotely."
|
||||
icon_state = "control"
|
||||
origin_tech = "magnets=1;programming=2"
|
||||
attachable = 1
|
||||
var/id = null
|
||||
var/can_change_id = 0
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL = 300, MAT_GLASS = 300)
|
||||
origin_tech = "magnets=2;combat=1"
|
||||
|
||||
crit_fail = 0 //Is the flash burnt out?
|
||||
var/times_used = 0 //Number of times it's been used.
|
||||
@@ -158,7 +157,6 @@
|
||||
|
||||
|
||||
/obj/item/device/assembly/flash/cyborg
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/device/assembly/flash/cyborg/attack(mob/living/M, mob/user)
|
||||
..()
|
||||
@@ -224,7 +222,6 @@
|
||||
throw_range = 3
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
materials = list(MAT_GLASS=7500, MAT_METAL=1000)
|
||||
origin_tech = "materials=3;combat=4"
|
||||
attack_verb = list("shoved", "bashed")
|
||||
block_chance = 50
|
||||
armor = list(melee = 50, bullet = 50, laser = 50, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 80, acid = 70)
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "Used for scanning and monitoring health."
|
||||
icon_state = "health"
|
||||
materials = list(MAT_METAL=800, MAT_GLASS=200)
|
||||
origin_tech = "magnets=1;biotech=1"
|
||||
attachable = 1
|
||||
secured = 0
|
||||
|
||||
|
||||
@@ -88,10 +88,10 @@
|
||||
return 0
|
||||
if(a_left)
|
||||
a_left.holder = null
|
||||
a_left.loc = T
|
||||
a_left.forceMove(T)
|
||||
if(a_right)
|
||||
a_right.holder = null
|
||||
a_right.loc = T
|
||||
a_right.forceMove(T)
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "A small electronic device able to ignite combustible substances."
|
||||
icon_state = "igniter"
|
||||
materials = list(MAT_METAL=500, MAT_GLASS=50)
|
||||
origin_tech = "magnets=1"
|
||||
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
||||
heat = 1000
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted.\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
|
||||
icon_state = "infrared"
|
||||
materials = list(MAT_METAL=1000, MAT_GLASS=500)
|
||||
origin_tech = "magnets=2;materials=2"
|
||||
|
||||
var/on = FALSE
|
||||
var/visible = FALSE
|
||||
|
||||
+142
-142
@@ -1,142 +1,142 @@
|
||||
/obj/item/device/assembly/mousetrap
|
||||
name = "mousetrap"
|
||||
desc = "A handy little spring-loaded trap for catching pesty rodents."
|
||||
icon_state = "mousetrap"
|
||||
materials = list(MAT_METAL=100)
|
||||
attachable = 1
|
||||
var/armed = 0
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/examine(mob/user)
|
||||
..()
|
||||
if(armed)
|
||||
to_chat(user, "The mousetrap is armed!")
|
||||
else
|
||||
to_chat(user, "The mousetrap is not armed.")
|
||||
|
||||
/obj/item/device/assembly/mousetrap/activate()
|
||||
if(..())
|
||||
armed = !armed
|
||||
if(!armed)
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if((user.disabilities & (CLUMSY | DUMB)) && prob(50))
|
||||
to_chat(user, "<span class='warning'>Your hand slips, setting off the trigger!</span>")
|
||||
pulse(0)
|
||||
update_icon()
|
||||
if(usr)
|
||||
playsound(usr.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||
|
||||
/obj/item/device/assembly/mousetrap/describe()
|
||||
return "The pressure switch is [armed?"primed":"safe"]."
|
||||
|
||||
/obj/item/device/assembly/mousetrap/update_icon()
|
||||
if(armed)
|
||||
icon_state = "mousetraparmed"
|
||||
else
|
||||
icon_state = "mousetrap"
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
|
||||
/obj/item/device/assembly/mousetrap/proc/triggered(mob/target, type = "feet")
|
||||
if(!armed)
|
||||
return
|
||||
var/obj/item/bodypart/affecting = null
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(PIERCEIMMUNE in H.dna.species.species_traits)
|
||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
armed = 0
|
||||
update_icon()
|
||||
pulse(0)
|
||||
return 0
|
||||
switch(type)
|
||||
if("feet")
|
||||
if(!H.shoes)
|
||||
affecting = H.get_bodypart(pick("l_leg", "r_leg"))
|
||||
H.Knockdown(60)
|
||||
if("l_hand", "r_hand")
|
||||
if(!H.gloves)
|
||||
affecting = H.get_bodypart(type)
|
||||
H.Stun(60)
|
||||
if(affecting)
|
||||
if(affecting.receive_damage(1, 0))
|
||||
H.update_damage_overlays()
|
||||
else if(ismouse(target))
|
||||
var/mob/living/simple_animal/mouse/M = target
|
||||
visible_message("<span class='boldannounce'>SPLAT!</span>")
|
||||
M.splat()
|
||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
armed = 0
|
||||
update_icon()
|
||||
pulse(0)
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/attack_self(mob/living/carbon/human/user)
|
||||
if(!armed)
|
||||
to_chat(user, "<span class='notice'>You arm [src].</span>")
|
||||
else
|
||||
if((user.disabilities & (CLUMSY | DUMB)) && prob(50))
|
||||
var/which_hand = "l_hand"
|
||||
if(!(user.active_hand_index % 2))
|
||||
which_hand = "r_hand"
|
||||
triggered(user, which_hand)
|
||||
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You disarm [src].</span>")
|
||||
armed = !armed
|
||||
update_icon()
|
||||
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/attack_hand(mob/living/carbon/human/user)
|
||||
if(armed)
|
||||
if((user.disabilities & (CLUMSY | DUMB)) && prob(50))
|
||||
var/which_hand = "l_hand"
|
||||
if(!(user.active_hand_index % 2))
|
||||
which_hand = "r_hand"
|
||||
triggered(user, which_hand)
|
||||
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/Crossed(atom/movable/AM as mob|obj)
|
||||
if(armed)
|
||||
if(ismob(AM))
|
||||
var/mob/MM = AM
|
||||
if(!(MM.movement_type & FLYING))
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == MOVE_INTENT_RUN)
|
||||
triggered(H)
|
||||
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
|
||||
"<span class='warning'>You accidentally step on [src]</span>")
|
||||
else if(ismouse(MM))
|
||||
triggered(MM)
|
||||
else if(AM.density) // For mousetrap grenades, set off by anything heavy
|
||||
triggered(AM)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/on_found(mob/finder)
|
||||
if(armed)
|
||||
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
triggered(finder, (finder.active_hand_index % 2 == 0) ? "r_hand" : "l_hand")
|
||||
return 1 //end the search!
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/hitby(A as mob|obj)
|
||||
if(!armed)
|
||||
return ..()
|
||||
visible_message("<span class='warning'>[src] is triggered by [A].</span>")
|
||||
triggered(null)
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/armed
|
||||
icon_state = "mousetraparmed"
|
||||
armed = 1
|
||||
/obj/item/device/assembly/mousetrap
|
||||
name = "mousetrap"
|
||||
desc = "A handy little spring-loaded trap for catching pesty rodents."
|
||||
icon_state = "mousetrap"
|
||||
materials = list(MAT_METAL=100)
|
||||
attachable = 1
|
||||
var/armed = 0
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/examine(mob/user)
|
||||
..()
|
||||
if(armed)
|
||||
to_chat(user, "The mousetrap is armed!")
|
||||
else
|
||||
to_chat(user, "The mousetrap is not armed.")
|
||||
|
||||
/obj/item/device/assembly/mousetrap/activate()
|
||||
if(..())
|
||||
armed = !armed
|
||||
if(!armed)
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if((user.getBrainLoss() >= 60) || user.disabilities & CLUMSY && prob(50))
|
||||
to_chat(user, "<span class='warning'>Your hand slips, setting off the trigger!</span>")
|
||||
pulse(0)
|
||||
update_icon()
|
||||
if(usr)
|
||||
playsound(usr.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||
|
||||
/obj/item/device/assembly/mousetrap/describe()
|
||||
return "The pressure switch is [armed?"primed":"safe"]."
|
||||
|
||||
/obj/item/device/assembly/mousetrap/update_icon()
|
||||
if(armed)
|
||||
icon_state = "mousetraparmed"
|
||||
else
|
||||
icon_state = "mousetrap"
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
|
||||
/obj/item/device/assembly/mousetrap/proc/triggered(mob/target, type = "feet")
|
||||
if(!armed)
|
||||
return
|
||||
var/obj/item/bodypart/affecting = null
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(PIERCEIMMUNE in H.dna.species.species_traits)
|
||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
armed = 0
|
||||
update_icon()
|
||||
pulse(0)
|
||||
return 0
|
||||
switch(type)
|
||||
if("feet")
|
||||
if(!H.shoes)
|
||||
affecting = H.get_bodypart(pick("l_leg", "r_leg"))
|
||||
H.Knockdown(60)
|
||||
if("l_hand", "r_hand")
|
||||
if(!H.gloves)
|
||||
affecting = H.get_bodypart(type)
|
||||
H.Stun(60)
|
||||
if(affecting)
|
||||
if(affecting.receive_damage(1, 0))
|
||||
H.update_damage_overlays()
|
||||
else if(ismouse(target))
|
||||
var/mob/living/simple_animal/mouse/M = target
|
||||
visible_message("<span class='boldannounce'>SPLAT!</span>")
|
||||
M.splat()
|
||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
armed = 0
|
||||
update_icon()
|
||||
pulse(0)
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/attack_self(mob/living/carbon/human/user)
|
||||
if(!armed)
|
||||
to_chat(user, "<span class='notice'>You arm [src].</span>")
|
||||
else
|
||||
if(((user.getBrainLoss() >= 60) || user.disabilities & CLUMSY) && prob(50))
|
||||
var/which_hand = "l_hand"
|
||||
if(!(user.active_hand_index % 2))
|
||||
which_hand = "r_hand"
|
||||
triggered(user, which_hand)
|
||||
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You disarm [src].</span>")
|
||||
armed = !armed
|
||||
update_icon()
|
||||
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/attack_hand(mob/living/carbon/human/user)
|
||||
if(armed)
|
||||
if(((user.getBrainLoss() >= 60) || user.disabilities & CLUMSY) && prob(50))
|
||||
var/which_hand = "l_hand"
|
||||
if(!(user.active_hand_index % 2))
|
||||
which_hand = "r_hand"
|
||||
triggered(user, which_hand)
|
||||
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/Crossed(atom/movable/AM as mob|obj)
|
||||
if(armed)
|
||||
if(ismob(AM))
|
||||
var/mob/MM = AM
|
||||
if(!(MM.movement_type & FLYING))
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == MOVE_INTENT_RUN)
|
||||
triggered(H)
|
||||
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
|
||||
"<span class='warning'>You accidentally step on [src]</span>")
|
||||
else if(ismouse(MM))
|
||||
triggered(MM)
|
||||
else if(AM.density) // For mousetrap grenades, set off by anything heavy
|
||||
triggered(AM)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/on_found(mob/finder)
|
||||
if(armed)
|
||||
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
triggered(finder, (finder.active_hand_index % 2 == 0) ? "r_hand" : "l_hand")
|
||||
return 1 //end the search!
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/hitby(A as mob|obj)
|
||||
if(!armed)
|
||||
return ..()
|
||||
visible_message("<span class='warning'>[src] is triggered by [A].</span>")
|
||||
triggered(null)
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/armed
|
||||
icon_state = "mousetraparmed"
|
||||
armed = TRUE
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "Used for scanning and alerting when someone enters a certain proximity."
|
||||
icon_state = "prox"
|
||||
materials = list(MAT_METAL=800, MAT_GLASS=200)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
attachable = 1
|
||||
|
||||
var/scanning = 0
|
||||
|
||||
@@ -1,42 +1,39 @@
|
||||
/obj/item/assembly/shock_kit
|
||||
name = "electrohelmet assembly"
|
||||
desc = "This appears to be made from both an electropack and a helmet."
|
||||
icon = 'icons/obj/assemblies.dmi'
|
||||
icon_state = "shock_kit"
|
||||
var/obj/item/clothing/head/helmet/part1 = null
|
||||
var/obj/item/device/electropack/part2 = null
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
/obj/item/assembly/shock_kit
|
||||
name = "electrohelmet assembly"
|
||||
desc = "This appears to be made from both an electropack and a helmet."
|
||||
icon = 'icons/obj/assemblies.dmi'
|
||||
icon_state = "shock_kit"
|
||||
var/obj/item/clothing/head/helmet/part1 = null
|
||||
var/obj/item/device/electropack/part2 = null
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
flags_1 = CONDUCT_1
|
||||
|
||||
/obj/item/assembly/shock_kit/Destroy()
|
||||
qdel(part1)
|
||||
qdel(part2)
|
||||
return ..()
|
||||
|
||||
/obj/item/assembly/shock_kit/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
var/turf/T = loc
|
||||
if(ismob(T))
|
||||
T = T.loc
|
||||
part1.loc = T
|
||||
part2.loc = T
|
||||
part1.master = null
|
||||
part2.master = null
|
||||
part1 = null
|
||||
part2 = null
|
||||
qdel(src)
|
||||
return
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/assembly/shock_kit/attack_self(mob/user)
|
||||
part1.attack_self(user)
|
||||
part2.attack_self(user)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/assembly/shock_kit/receive_signal()
|
||||
if(istype(loc, /obj/structure/chair/e_chair))
|
||||
var/obj/structure/chair/e_chair/C = loc
|
||||
C.shock()
|
||||
return
|
||||
|
||||
/obj/item/assembly/shock_kit/Destroy()
|
||||
qdel(part1)
|
||||
qdel(part2)
|
||||
return ..()
|
||||
|
||||
/obj/item/assembly/shock_kit/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
part1.forceMove(drop_location())
|
||||
part2.forceMove(drop_location())
|
||||
part1.master = null
|
||||
part2.master = null
|
||||
part1 = null
|
||||
part2 = null
|
||||
qdel(src)
|
||||
return
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/assembly/shock_kit/attack_self(mob/user)
|
||||
part1.attack_self(user)
|
||||
part2.attack_self(user)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/assembly/shock_kit/receive_signal()
|
||||
if(istype(loc, /obj/structure/chair/e_chair))
|
||||
var/obj/structure/chair/e_chair/C = loc
|
||||
C.shock()
|
||||
return
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
materials = list(MAT_METAL=400, MAT_GLASS=120)
|
||||
origin_tech = "magnets=1;bluespace=1"
|
||||
wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE
|
||||
attachable = 1
|
||||
|
||||
@@ -185,7 +184,6 @@ Code:
|
||||
return
|
||||
|
||||
/obj/item/device/assembly/signaler/cyborg
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/device/assembly/signaler/cyborg/attackby(obj/item/W, mob/user, params)
|
||||
return
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "Used to time things. Works well with contraptions which has to count down. Tick tock."
|
||||
icon_state = "timer"
|
||||
materials = list(MAT_METAL=500, MAT_GLASS=50)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
attachable = 1
|
||||
|
||||
var/timing = 0
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "A small electronic device able to record a voice sample, and send a signal when that sample is repeated."
|
||||
icon_state = "voice"
|
||||
materials = list(MAT_METAL=500, MAT_GLASS=50)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
flags_1 = HEAR_1
|
||||
attachable = 1
|
||||
verb_say = "beeps"
|
||||
|
||||
@@ -185,13 +185,13 @@ Acts like a normal vent, but has an input AND output.
|
||||
pump_direction = 1
|
||||
|
||||
if("set_input_pressure" in signal.data)
|
||||
input_pressure_min = Clamp(text2num(signal.data["set_input_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
input_pressure_min = CLAMP(text2num(signal.data["set_input_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
output_pressure_max = Clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
output_pressure_max = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("set_external_pressure" in signal.data)
|
||||
external_pressure_bound = Clamp(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
external_pressure_bound = CLAMP(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("status" in signal.data)
|
||||
spawn(2)
|
||||
|
||||
@@ -127,7 +127,7 @@ Passive gate is similar to the regular pump except:
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_pressure = Clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
|
||||
@@ -149,7 +149,7 @@ Passive gate is similar to the regular pump except:
|
||||
on = !on
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
target_pressure = Clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
target_pressure = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if(on != old_on)
|
||||
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
|
||||
|
||||
@@ -133,9 +133,8 @@ Thus, the two variables affect pump operation are set in New():
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_pressure = Clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
investigate_log("Pump, [src.name], was set to [target_pressure] kPa by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
|
||||
message_admins("Pump, [src.name], was set to [target_pressure] kPa by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")
|
||||
target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/atmosinit()
|
||||
@@ -156,7 +155,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
on = !on
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
target_pressure = Clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
target_pressure = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if(on != old_on)
|
||||
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
|
||||
|
||||
@@ -133,9 +133,8 @@ Thus, the two variables affect pump operation are set in New():
|
||||
rate = text2num(rate)
|
||||
. = TRUE
|
||||
if(.)
|
||||
transfer_rate = Clamp(rate, 0, MAX_TRANSFER_RATE)
|
||||
investigate_log("Volume Pump, [src.name], was set to [transfer_rate] L/s by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
|
||||
message_admins("Volume Pump, [src.name], was set to [transfer_rate] L/s by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")
|
||||
transfer_rate = CLAMP(rate, 0, MAX_TRANSFER_RATE)
|
||||
investigate_log("was set to [transfer_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/receive_signal(datum/signal/signal)
|
||||
@@ -152,7 +151,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
if("set_transfer_rate" in signal.data)
|
||||
var/datum/gas_mixture/air1 = AIR1
|
||||
transfer_rate = Clamp(text2num(signal.data["set_transfer_rate"]),0,air1.volume)
|
||||
transfer_rate = CLAMP(text2num(signal.data["set_transfer_rate"]),0,air1.volume)
|
||||
|
||||
if(on != old_on)
|
||||
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_pressure = Clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
if("filter")
|
||||
filter_type = null
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_pressure = Clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
if("node1")
|
||||
var/value = text2num(params["concentration"])
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
if("set_volume_rate" in signal.data)
|
||||
var/number = text2num(signal.data["set_volume_rate"])
|
||||
var/datum/gas_mixture/air_contents = AIR1
|
||||
volume_rate = Clamp(number, 0, air_contents.volume)
|
||||
volume_rate = CLAMP(number, 0, air_contents.volume)
|
||||
|
||||
if("status" in signal.data)
|
||||
spawn(2)
|
||||
@@ -180,7 +180,7 @@
|
||||
rate = text2num(rate)
|
||||
. = TRUE
|
||||
if(.)
|
||||
volume_rate = Clamp(rate, 0, MAX_TRANSFER_RATE)
|
||||
volume_rate = CLAMP(rate, 0, MAX_TRANSFER_RATE)
|
||||
investigate_log("was set to [volume_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
broadcast_status()
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
target = text2num(target)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_temperature = Clamp(target, min_temperature, max_temperature)
|
||||
target_temperature = CLAMP(target, min_temperature, max_temperature)
|
||||
investigate_log("was set to [target_temperature] K by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -244,10 +244,10 @@
|
||||
pump_direction = text2num(signal.data["direction"])
|
||||
|
||||
if("set_internal_pressure" in signal.data)
|
||||
internal_pressure_bound = Clamp(text2num(signal.data["set_internal_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
internal_pressure_bound = CLAMP(text2num(signal.data["set_internal_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("set_external_pressure" in signal.data)
|
||||
external_pressure_bound = Clamp(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
external_pressure_bound = CLAMP(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("reset_external_pressure" in signal.data)
|
||||
external_pressure_bound = ONE_ATMOSPHERE
|
||||
@@ -256,10 +256,10 @@
|
||||
internal_pressure_bound = 0
|
||||
|
||||
if("adjust_internal_pressure" in signal.data)
|
||||
internal_pressure_bound = Clamp(internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
internal_pressure_bound = CLAMP(internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("adjust_external_pressure" in signal.data)
|
||||
external_pressure_bound = Clamp(external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
external_pressure_bound = CLAMP(external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("init" in signal.data)
|
||||
name = signal.data["init"]
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
if(initialize_directions & dir)
|
||||
return ..()
|
||||
if((NORTH|EAST) & dir)
|
||||
user.ventcrawl_layer = Clamp(user.ventcrawl_layer + 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
|
||||
user.ventcrawl_layer = CLAMP(user.ventcrawl_layer + 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
|
||||
if((SOUTH|WEST) & dir)
|
||||
user.ventcrawl_layer = Clamp(user.ventcrawl_layer - 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
|
||||
user.ventcrawl_layer = CLAMP(user.ventcrawl_layer - 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
|
||||
to_chat(user, "You align yourself with the [user.ventcrawl_layer]\th output.")
|
||||
|
||||
@@ -411,7 +411,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
release_pressure = Clamp(round(pressure), can_min_release_pressure, can_max_release_pressure)
|
||||
release_pressure = CLAMP(round(pressure), can_min_release_pressure, can_max_release_pressure)
|
||||
investigate_log("was set to [release_pressure] kPa by [key_name(usr)].", INVESTIGATE_ATMOS)
|
||||
if("valve")
|
||||
var/logmsg
|
||||
@@ -455,7 +455,7 @@
|
||||
var/N = text2num(user_input)
|
||||
if(!N)
|
||||
return
|
||||
timer_set = Clamp(N,minimum_timer_set,maximum_timer_set)
|
||||
timer_set = CLAMP(N,minimum_timer_set,maximum_timer_set)
|
||||
log_admin("[key_name(usr)] has activated a prototype valve timer")
|
||||
. = TRUE
|
||||
if("toggle_timer")
|
||||
|
||||
@@ -131,11 +131,11 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
pump.target_pressure = Clamp(round(pressure), PUMP_MIN_PRESSURE, PUMP_MAX_PRESSURE)
|
||||
pump.target_pressure = CLAMP(round(pressure), PUMP_MIN_PRESSURE, PUMP_MAX_PRESSURE)
|
||||
investigate_log("was set to [pump.target_pressure] kPa by [key_name(usr)].", INVESTIGATE_ATMOS)
|
||||
if("eject")
|
||||
if(holding)
|
||||
holding.loc = get_turf(src)
|
||||
holding.forceMove(drop_location())
|
||||
holding = null
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
. = TRUE
|
||||
if("eject")
|
||||
if(holding)
|
||||
holding.loc = get_turf(src)
|
||||
holding.forceMove(drop_location())
|
||||
holding = null
|
||||
. = TRUE
|
||||
if("toggle_filter")
|
||||
|
||||
@@ -199,9 +199,9 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation)
|
||||
active = 1
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/gateway/centeraway/proc/check_exile_implant(mob/living/carbon/C)
|
||||
for(var/obj/item/implant/exile/E in C.implants)//Checking that there is an exile implant
|
||||
to_chat(C, "\black The station gate has detected your exile implant and is blocking your entry.")
|
||||
/obj/machinery/gateway/centeraway/proc/check_exile_implant(mob/living/L)
|
||||
for(var/obj/item/implant/exile/E in L.implants)//Checking that there is an exile implant
|
||||
to_chat(L, "\black The station gate has detected your exile implant and is blocking your entry.")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -212,17 +212,17 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation)
|
||||
return
|
||||
if(!stationgate || QDELETED(stationgate))
|
||||
return
|
||||
if(istype(AM, /mob/living/carbon))
|
||||
if(isliving(AM))
|
||||
if(check_exile_implant(AM))
|
||||
return
|
||||
else
|
||||
for(var/mob/living/carbon/C in AM.contents)
|
||||
if(check_exile_implant(C))
|
||||
for(var/mob/living/L in AM.contents)
|
||||
if(check_exile_implant(L))
|
||||
say("Rejecting [AM]: Exile implant detected in contained lifeform.")
|
||||
return
|
||||
if(AM.has_buckled_mobs())
|
||||
for(var/mob/living/carbon/C in AM.buckled_mobs)
|
||||
if(check_exile_implant(C))
|
||||
for(var/mob/living/L in AM.buckled_mobs)
|
||||
if(check_exile_implant(L))
|
||||
say("Rejecting [AM]: Exile implant detected in close proximity lifeform.")
|
||||
return
|
||||
AM.forceMove(get_step(stationgate.loc, SOUTH))
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
//Swarm of creatures
|
||||
for(var/direction in GLOB.alldirs)
|
||||
var/turf/T = get_turf(src)
|
||||
new /mob/living/simple_animal/hostile/creature(get_step(T,direction))
|
||||
new /mob/living/simple_animal/hostile/netherworld(get_step(T,direction))
|
||||
if(4)
|
||||
//Destroy Equipment
|
||||
for (var/obj/item/I in user)
|
||||
|
||||
@@ -86,7 +86,7 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
|
||||
|
||||
/datum/export/process()
|
||||
..()
|
||||
cost *= GLOB.E**(k_elasticity * (1/30))
|
||||
cost *= NUM_E**(k_elasticity * (1/30))
|
||||
if(cost > init_cost)
|
||||
cost = init_cost
|
||||
|
||||
@@ -94,7 +94,7 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
|
||||
/datum/export/proc/get_cost(obj/O, contr = 0, emag = 0)
|
||||
var/amount = get_amount(O, contr, emag)
|
||||
if(k_elasticity!=0)
|
||||
return round((cost/k_elasticity) * (1 - GLOB.E**(-1 * k_elasticity * amount))) //anti-derivative of the marginal cost function
|
||||
return round((cost/k_elasticity) * (1 - NUM_E**(-1 * k_elasticity * amount))) //anti-derivative of the marginal cost function
|
||||
else
|
||||
return round(cost * amount) //alternative form derived from L'Hopital to avoid division by 0
|
||||
|
||||
@@ -131,7 +131,7 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
|
||||
else
|
||||
total_amount += amount
|
||||
|
||||
cost *= GLOB.E**(-1*k_elasticity*amount) //marginal cost modifier
|
||||
cost *= NUM_E**(-1*k_elasticity*amount) //marginal cost modifier
|
||||
SSblackbox.record_feedback("nested tally", "export_sold_cost", 1, list("[O.type]", "[the_cost]"))
|
||||
|
||||
// Total printout for the cargo console.
|
||||
|
||||
@@ -3,23 +3,20 @@
|
||||
cost = 500
|
||||
unit_name = "technology data disk"
|
||||
export_types = list(/obj/item/disk/tech_disk)
|
||||
var/list/techLevels = list()
|
||||
var/list/datum/techweb_node/sold_nodes = list()
|
||||
|
||||
/datum/export/tech/get_cost(obj/O)
|
||||
var/obj/item/disk/tech_disk/D = O
|
||||
var/cost = 0
|
||||
for(var/V in D.tech_stored)
|
||||
if(!V)
|
||||
for(var/V in D.stored_research.researched_nodes)
|
||||
if(sold_nodes[V]) //Already sold before, don't want it.
|
||||
continue
|
||||
var/datum/tech/tech = V
|
||||
cost += tech.getCost(techLevels[tech.id])
|
||||
var/datum/techweb_node/TWN = D.stored_research.researched_nodes[V]
|
||||
cost += TWN
|
||||
return ..() * cost
|
||||
|
||||
/datum/export/tech/sell_object(obj/O)
|
||||
..()
|
||||
var/obj/item/disk/tech_disk/D = O
|
||||
for(var/V in D.tech_stored)
|
||||
if(!V)
|
||||
continue
|
||||
var/datum/tech/tech = V
|
||||
techLevels[tech.id] = max(techLevels[tech.id], tech.level)
|
||||
for(var/V in D.stored_research.researched_nodes)
|
||||
sold_nodes[V] = D.stored_research.researched_nodes[V]
|
||||
|
||||
+91
-91
@@ -1,97 +1,97 @@
|
||||
/obj/item/paper/fluff/jobs/cargo/manifest
|
||||
var/order_cost = 0
|
||||
var/order_id = 0
|
||||
var/errors = 0
|
||||
|
||||
var/order_cost = 0
|
||||
var/order_id = 0
|
||||
var/errors = 0
|
||||
|
||||
/obj/item/paper/fluff/jobs/cargo/manifest/New(atom/A, id, cost)
|
||||
..()
|
||||
order_id = id
|
||||
order_cost = cost
|
||||
|
||||
if(prob(MANIFEST_ERROR_CHANCE))
|
||||
errors |= MANIFEST_ERROR_NAME
|
||||
if(prob(MANIFEST_ERROR_CHANCE))
|
||||
errors |= MANIFEST_ERROR_CONTENTS
|
||||
if(prob(MANIFEST_ERROR_CHANCE))
|
||||
errors |= MANIFEST_ERROR_ITEM
|
||||
|
||||
..()
|
||||
order_id = id
|
||||
order_cost = cost
|
||||
|
||||
if(prob(MANIFEST_ERROR_CHANCE))
|
||||
errors |= MANIFEST_ERROR_NAME
|
||||
if(prob(MANIFEST_ERROR_CHANCE))
|
||||
errors |= MANIFEST_ERROR_CONTENTS
|
||||
if(prob(MANIFEST_ERROR_CHANCE))
|
||||
errors |= MANIFEST_ERROR_ITEM
|
||||
|
||||
/obj/item/paper/fluff/jobs/cargo/manifest/proc/is_approved()
|
||||
return stamped && stamped.len && !is_denied()
|
||||
|
||||
return stamped && stamped.len && !is_denied()
|
||||
|
||||
/obj/item/paper/fluff/jobs/cargo/manifest/proc/is_denied()
|
||||
return stamped && ("stamp-deny" in stamped)
|
||||
|
||||
/datum/supply_order
|
||||
var/id
|
||||
var/orderer
|
||||
var/orderer_rank
|
||||
var/orderer_ckey
|
||||
var/reason
|
||||
var/datum/supply_pack/pack
|
||||
|
||||
/datum/supply_order/New(datum/supply_pack/pack, orderer, orderer_rank, orderer_ckey, reason)
|
||||
id = SSshuttle.ordernum++
|
||||
src.pack = pack
|
||||
src.orderer = orderer
|
||||
src.orderer_rank = orderer_rank
|
||||
src.orderer_ckey = orderer_ckey
|
||||
src.reason = reason
|
||||
|
||||
/datum/supply_order/proc/generateRequisition(turf/T)
|
||||
var/obj/item/paper/P = new(T)
|
||||
|
||||
P.name = "requisition form - #[id] ([pack.name])"
|
||||
P.info += "<h2>[station_name()] Supply Requisition</h2>"
|
||||
P.info += "<hr/>"
|
||||
P.info += "Order #[id]<br/>"
|
||||
P.info += "Item: [pack.name]<br/>"
|
||||
P.info += "Access Restrictions: [get_access_desc(pack.access)]<br/>"
|
||||
P.info += "Requested by: [orderer]<br/>"
|
||||
P.info += "Rank: [orderer_rank]<br/>"
|
||||
P.info += "Comment: [reason]<br/>"
|
||||
|
||||
P.update_icon()
|
||||
return P
|
||||
|
||||
/datum/supply_order/proc/generateManifest(obj/structure/closet/crate/C)
|
||||
return stamped && ("stamp-deny" in stamped)
|
||||
|
||||
/datum/supply_order
|
||||
var/id
|
||||
var/orderer
|
||||
var/orderer_rank
|
||||
var/orderer_ckey
|
||||
var/reason
|
||||
var/datum/supply_pack/pack
|
||||
|
||||
/datum/supply_order/New(datum/supply_pack/pack, orderer, orderer_rank, orderer_ckey, reason)
|
||||
id = SSshuttle.ordernum++
|
||||
src.pack = pack
|
||||
src.orderer = orderer
|
||||
src.orderer_rank = orderer_rank
|
||||
src.orderer_ckey = orderer_ckey
|
||||
src.reason = reason
|
||||
|
||||
/datum/supply_order/proc/generateRequisition(turf/T)
|
||||
var/obj/item/paper/P = new(T)
|
||||
|
||||
P.name = "requisition form - #[id] ([pack.name])"
|
||||
P.info += "<h2>[station_name()] Supply Requisition</h2>"
|
||||
P.info += "<hr/>"
|
||||
P.info += "Order #[id]<br/>"
|
||||
P.info += "Item: [pack.name]<br/>"
|
||||
P.info += "Access Restrictions: [get_access_desc(pack.access)]<br/>"
|
||||
P.info += "Requested by: [orderer]<br/>"
|
||||
P.info += "Rank: [orderer_rank]<br/>"
|
||||
P.info += "Comment: [reason]<br/>"
|
||||
|
||||
P.update_icon()
|
||||
return P
|
||||
|
||||
/datum/supply_order/proc/generateManifest(obj/structure/closet/crate/C)
|
||||
var/obj/item/paper/fluff/jobs/cargo/manifest/P = new(C, id, pack.cost)
|
||||
|
||||
var/station_name = (P.errors & MANIFEST_ERROR_NAME) ? new_station_name() : station_name()
|
||||
|
||||
P.name = "shipping manifest - #[id] ([pack.name])"
|
||||
P.info += "<h2>[command_name()] Shipping Manifest</h2>"
|
||||
P.info += "<hr/>"
|
||||
P.info += "Order #[id]<br/>"
|
||||
P.info += "Destination: [station_name]<br/>"
|
||||
P.info += "Item: [pack.name]<br/>"
|
||||
P.info += "Contents: <br/>"
|
||||
P.info += "<ul>"
|
||||
for(var/atom/movable/AM in C.contents - P)
|
||||
if((P.errors & MANIFEST_ERROR_CONTENTS))
|
||||
if(prob(50))
|
||||
P.info += "<li>[AM.name]</li>"
|
||||
else
|
||||
continue
|
||||
P.info += "<li>[AM.name]</li>"
|
||||
P.info += "</ul>"
|
||||
P.info += "<h4>Stamp below to confirm receipt of goods:</h4>"
|
||||
|
||||
P.update_icon()
|
||||
P.loc = C
|
||||
C.manifest = P
|
||||
C.update_icon()
|
||||
|
||||
return P
|
||||
|
||||
/datum/supply_order/proc/generate(turf/T)
|
||||
var/obj/structure/closet/crate/C = pack.generate(T)
|
||||
|
||||
var/station_name = (P.errors & MANIFEST_ERROR_NAME) ? new_station_name() : station_name()
|
||||
|
||||
P.name = "shipping manifest - #[id] ([pack.name])"
|
||||
P.info += "<h2>[command_name()] Shipping Manifest</h2>"
|
||||
P.info += "<hr/>"
|
||||
P.info += "Order #[id]<br/>"
|
||||
P.info += "Destination: [station_name]<br/>"
|
||||
P.info += "Item: [pack.name]<br/>"
|
||||
P.info += "Contents: <br/>"
|
||||
P.info += "<ul>"
|
||||
for(var/atom/movable/AM in C.contents - P)
|
||||
if((P.errors & MANIFEST_ERROR_CONTENTS))
|
||||
if(prob(50))
|
||||
P.info += "<li>[AM.name]</li>"
|
||||
else
|
||||
continue
|
||||
P.info += "<li>[AM.name]</li>"
|
||||
P.info += "</ul>"
|
||||
P.info += "<h4>Stamp below to confirm receipt of goods:</h4>"
|
||||
|
||||
P.update_icon()
|
||||
P.forceMove(C)
|
||||
C.manifest = P
|
||||
C.update_icon()
|
||||
|
||||
return P
|
||||
|
||||
/datum/supply_order/proc/generate(turf/T)
|
||||
var/obj/structure/closet/crate/C = pack.generate(T)
|
||||
var/obj/item/paper/fluff/jobs/cargo/manifest/M = generateManifest(C)
|
||||
|
||||
if(M.errors & MANIFEST_ERROR_ITEM)
|
||||
if(istype(C, /obj/structure/closet/crate/secure) || istype(C, /obj/structure/closet/crate/large))
|
||||
M.errors &= ~MANIFEST_ERROR_ITEM
|
||||
else
|
||||
var/lost = max(round(C.contents.len / 10), 1)
|
||||
while(--lost >= 0)
|
||||
qdel(pick(C.contents))
|
||||
return C
|
||||
|
||||
if(M.errors & MANIFEST_ERROR_ITEM)
|
||||
if(istype(C, /obj/structure/closet/crate/secure) || istype(C, /obj/structure/closet/crate/large))
|
||||
M.errors &= ~MANIFEST_ERROR_ITEM
|
||||
else
|
||||
var/lost = max(round(C.contents.len / 10), 1)
|
||||
while(--lost >= 0)
|
||||
qdel(pick(C.contents))
|
||||
return C
|
||||
|
||||
@@ -152,7 +152,7 @@ GLOBAL_LIST(external_rsc_urls)
|
||||
#if (PRELOAD_RSC == 0)
|
||||
var/static/next_external_rsc = 0
|
||||
if(external_rsc_urls && external_rsc_urls.len)
|
||||
next_external_rsc = Wrap(next_external_rsc+1, 1, external_rsc_urls.len+1)
|
||||
next_external_rsc = WRAP(next_external_rsc+1, 1, external_rsc_urls.len+1)
|
||||
preload_rsc = external_rsc_urls[next_external_rsc]
|
||||
#endif
|
||||
|
||||
@@ -160,7 +160,7 @@ GLOBAL_LIST(external_rsc_urls)
|
||||
GLOB.directory[ckey] = src
|
||||
|
||||
GLOB.ahelp_tickets.ClientLogin(src)
|
||||
|
||||
var/connecting_admin = FALSE //because de-admined admins connecting should be treated like admins.
|
||||
//Admin Authorisation
|
||||
var/localhost_addresses = list("127.0.0.1", "::1")
|
||||
if(address && (address in localhost_addresses))
|
||||
@@ -184,6 +184,11 @@ GLOBAL_LIST(external_rsc_urls)
|
||||
if(holder)
|
||||
GLOB.admins |= src
|
||||
holder.owner = src
|
||||
connecting_admin = TRUE
|
||||
|
||||
else if(GLOB.deadmins[ckey])
|
||||
verbs += /client/proc/readmin
|
||||
connecting_admin = TRUE
|
||||
|
||||
//preferences datum - also holds some persistent data for the client (because we may as well keep these datums to a minimum)
|
||||
prefs = GLOB.preferences_datums[ckey]
|
||||
@@ -234,8 +239,8 @@ GLOBAL_LIST(external_rsc_urls)
|
||||
chatOutput.start() // Starts the chat
|
||||
|
||||
if(alert_mob_dupe_login)
|
||||
set waitfor = FALSE
|
||||
alert(mob, "You have logged in already with another key this round, please log out of this one NOW or risk being banned!")
|
||||
spawn()
|
||||
alert(mob, "You have logged in already with another key this round, please log out of this one NOW or risk being banned!")
|
||||
|
||||
connection_time = world.time
|
||||
connection_realtime = world.realtime
|
||||
@@ -249,7 +254,7 @@ GLOBAL_LIST(external_rsc_urls)
|
||||
to_chat(src, "Your version: [byond_version]")
|
||||
to_chat(src, "Required version: [cev] or later")
|
||||
to_chat(src, "Visit http://www.byond.com/download/ to get the latest version of byond.")
|
||||
if (holder)
|
||||
if (connecting_admin)
|
||||
to_chat(src, "Because you are an admin, you are being allowed to walk past this limitation, But it is still STRONGLY suggested you upgrade")
|
||||
else
|
||||
qdel(src)
|
||||
@@ -269,7 +274,7 @@ GLOBAL_LIST(external_rsc_urls)
|
||||
to_chat(src, "Required version to remove this message: [cwv] or later")
|
||||
to_chat(src, "Visit http://www.byond.com/download/ to get the latest version of byond.")
|
||||
|
||||
if (connection == "web" && !holder)
|
||||
if (connection == "web" && !connecting_admin)
|
||||
if (!CONFIG_GET(flag/allow_webclient))
|
||||
to_chat(src, "Web client is disabled")
|
||||
qdel(src)
|
||||
@@ -434,7 +439,7 @@ GLOBAL_LIST(external_rsc_urls)
|
||||
if (src.holder && src.holder.rank)
|
||||
admin_rank = src.holder.rank.name
|
||||
else
|
||||
if (check_randomizer(connectiontopic))
|
||||
if (!GLOB.deadmins[ckey] && check_randomizer(connectiontopic))
|
||||
return
|
||||
var/sql_ip = sanitizeSQL(address)
|
||||
var/sql_computerid = sanitizeSQL(computer_id)
|
||||
@@ -444,7 +449,7 @@ GLOBAL_LIST(external_rsc_urls)
|
||||
if(!query_client_in_db.Execute())
|
||||
return
|
||||
if(!query_client_in_db.NextRow())
|
||||
if (CONFIG_GET(flag/panic_bunker) && !holder && !(ckey in GLOB.deadmins))
|
||||
if (CONFIG_GET(flag/panic_bunker) && !holder && !GLOB.deadmins[ckey])
|
||||
log_access("Failed Login: [key] - New account attempting to connect during panic bunker")
|
||||
message_admins("<span class='adminnotice'>Failed Login: [key] - New account attempting to connect during panic bunker</span>")
|
||||
to_chat(src, "Sorry but the server is currently not accepting connections from never before seen players.")
|
||||
@@ -675,6 +680,13 @@ GLOBAL_LIST(external_rsc_urls)
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
/client/proc/rescale_view(change, min, max)
|
||||
var/viewscale = getviewsize(view)
|
||||
var/x = viewscale[1]
|
||||
var/y = viewscale[2]
|
||||
x = CLAMP(x+change, min, max)
|
||||
y = CLAMP(y+change, min,max)
|
||||
change_view("[x]x[y]")
|
||||
|
||||
/client/proc/change_view(new_size)
|
||||
if (isnull(new_size))
|
||||
|
||||
@@ -1596,12 +1596,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
toggles ^= MIDROUND_ANTAG
|
||||
|
||||
if("parallaxup")
|
||||
parallax = Wrap(parallax + 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1)
|
||||
parallax = WRAP(parallax + 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1)
|
||||
if (parent && parent.mob && parent.mob.hud_used)
|
||||
parent.mob.hud_used.update_parallax_pref(parent.mob)
|
||||
|
||||
if("parallaxdown")
|
||||
parallax = Wrap(parallax - 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1)
|
||||
parallax = WRAP(parallax - 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1)
|
||||
if (parent && parent.mob && parent.mob.hud_used)
|
||||
parent.mob.hud_used.update_parallax_pref(parent.mob)
|
||||
|
||||
|
||||
@@ -203,7 +203,6 @@
|
||||
item_state = "bl_suit"
|
||||
item_color = "black"
|
||||
desc = "It's a plain jumpsuit. It has a small dial on the wrist."
|
||||
origin_tech = "syndicate=2"
|
||||
sensor_mode = SENSOR_OFF //Hey who's this guy on the Syndicate Shuttle??
|
||||
random_sensor = FALSE
|
||||
resistance_flags = NONE
|
||||
@@ -235,7 +234,6 @@
|
||||
icon_state = "armor"
|
||||
item_state = "armor"
|
||||
blood_overlay_type = "armor"
|
||||
origin_tech = "syndicate=2"
|
||||
resistance_flags = NONE
|
||||
armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
|
||||
|
||||
@@ -257,7 +255,6 @@
|
||||
desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting condition."
|
||||
icon_state = "meson"
|
||||
item_state = "meson"
|
||||
origin_tech = "syndicate=2"
|
||||
resistance_flags = NONE
|
||||
armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
|
||||
|
||||
@@ -392,7 +389,6 @@
|
||||
desc = "A pair of black shoes."
|
||||
permeability_coefficient = 0.05
|
||||
flags_1 = NOSLIP_1
|
||||
origin_tech = "syndicate=2"
|
||||
resistance_flags = NONE
|
||||
pockets = /obj/item/storage/internal/pocket/shoes
|
||||
armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting conditions."
|
||||
icon_state = "meson"
|
||||
item_state = "meson"
|
||||
origin_tech = "magnets=1;engineering=2"
|
||||
darkness_view = 2
|
||||
vision_flags = SEE_TURFS
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
@@ -65,7 +64,6 @@
|
||||
desc = "An optical meson scanner fitted with an amplified visible light spectrum overlay, providing greater visual clarity in darkness."
|
||||
icon_state = "nvgmeson"
|
||||
item_state = "nvgmeson"
|
||||
origin_tech = "magnets=4;engineering=5;plasmatech=4"
|
||||
darkness_view = 8
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
glass_colour_type = /datum/client_colour/glass_colour/green
|
||||
@@ -87,7 +85,6 @@
|
||||
desc = "A pair of snazzy goggles used to protect against chemical spills. Fitted with an analyzer for scanning items and reagents."
|
||||
icon_state = "purple"
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=2;engineering=1"
|
||||
scan_reagents = 1 //You can see reagents while wearing science goggles
|
||||
actions_types = list(/datum/action/item_action/toggle_research_scanner)
|
||||
glass_colour_type = /datum/client_colour/glass_colour/purple
|
||||
@@ -103,7 +100,6 @@
|
||||
desc = "You can totally see in the dark now!"
|
||||
icon_state = "night"
|
||||
item_state = "glasses"
|
||||
origin_tech = "materials=4;magnets=4;plasmatech=4;engineering=4"
|
||||
darkness_view = 8
|
||||
vision_flags = SEE_BLACKNESS
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
@@ -126,7 +122,6 @@
|
||||
desc = "Very confusing glasses."
|
||||
icon_state = "material"
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=3;engineering=3"
|
||||
vision_flags = SEE_OBJS
|
||||
glass_colour_type = /datum/client_colour/glass_colour/lightblue
|
||||
|
||||
@@ -135,7 +130,6 @@
|
||||
desc = "Used by miners to detect ores deep within the rock."
|
||||
icon_state = "material"
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=3;engineering=3"
|
||||
darkness_view = 0
|
||||
|
||||
/obj/item/clothing/glasses/material/mining/gar
|
||||
@@ -186,7 +180,6 @@
|
||||
/obj/item/clothing/glasses/sunglasses/reagent
|
||||
name = "beer goggles"
|
||||
desc = "A pair of sunglasses outfitted with apparatus to scan reagents."
|
||||
origin_tech = "magnets=2;engineering=2"
|
||||
scan_reagents = 1
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/garb
|
||||
@@ -267,7 +260,6 @@
|
||||
desc = "Thermals in the shape of glasses."
|
||||
icon_state = "thermal"
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=3"
|
||||
vision_flags = SEE_MOBS
|
||||
invis_view = 2
|
||||
flash_protect = 0
|
||||
@@ -280,7 +272,6 @@
|
||||
/obj/item/clothing/glasses/thermal/syndi //These are now a traitor item, concealed as mesons. -Pete
|
||||
name = "chameleon thermals"
|
||||
desc = "A pair of thermal optic goggles with an onboard chameleon generator."
|
||||
origin_tech = "magnets=3;syndicate=4"
|
||||
flash_protect = -1
|
||||
|
||||
var/datum/action/item_action/chameleon/change/chameleon_action
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
icon_state = "trayson-meson"
|
||||
item_state = "trayson-meson"
|
||||
actions_types = list(/datum/action/item_action/toggle_mode)
|
||||
origin_tech = "materials=3;magnets=3;engineering=3;plasmatech=3"
|
||||
|
||||
vision_flags = NONE
|
||||
darkness_view = 2
|
||||
@@ -135,8 +134,6 @@
|
||||
icon_state = "trayson-t-ray"
|
||||
item_state = "trayson-t-ray"
|
||||
desc = "Used by engineering staff to see underfloor objects such as cables and pipes."
|
||||
origin_tech = "materials=3;magnets=2;engineering=2"
|
||||
|
||||
range = 2
|
||||
|
||||
modes = list(MODE_NONE = MODE_TRAY, MODE_TRAY = MODE_NONE)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
name = "HUD"
|
||||
desc = "A heads-up display that provides important info in (almost) real time."
|
||||
flags_1 = null //doesn't protect eyes because it's a monocle, duh
|
||||
origin_tech = "magnets=3;biotech=2"
|
||||
var/hud_type = null
|
||||
|
||||
/obj/item/clothing/glasses/hud/equipped(mob/living/carbon/human/user, slot)
|
||||
@@ -34,7 +33,6 @@
|
||||
name = "health scanner HUD"
|
||||
desc = "A heads-up display that scans the humans in view and provides accurate data about their health status."
|
||||
icon_state = "healthhud"
|
||||
origin_tech = "magnets=3;biotech=2"
|
||||
hud_type = DATA_HUD_MEDICAL_ADVANCED
|
||||
glass_colour_type = /datum/client_colour/glass_colour/lightblue
|
||||
|
||||
@@ -43,7 +41,6 @@
|
||||
desc = "An advanced medical head-up display that allows doctors to find patients in complete darkness."
|
||||
icon_state = "healthhudnight"
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=4;biotech=4;plasmatech=4;engineering=5"
|
||||
darkness_view = 8
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
glass_colour_type = /datum/client_colour/glass_colour/green
|
||||
@@ -52,7 +49,6 @@
|
||||
name = "medical HUDSunglasses"
|
||||
desc = "Sunglasses with a medical HUD."
|
||||
icon_state = "sunhudmed"
|
||||
origin_tech = "magnets=3;biotech=3;engineering=3"
|
||||
darkness_view = 1
|
||||
flash_protect = 1
|
||||
tint = 1
|
||||
@@ -62,7 +58,6 @@
|
||||
name = "diagnostic HUD"
|
||||
desc = "A heads-up display capable of analyzing the integrity and status of robotics and exosuits."
|
||||
icon_state = "diagnostichud"
|
||||
origin_tech = "magnets=2;engineering=2"
|
||||
hud_type = DATA_HUD_DIAGNOSTIC_BASIC
|
||||
glass_colour_type = /datum/client_colour/glass_colour/lightorange
|
||||
|
||||
@@ -71,7 +66,6 @@
|
||||
desc = "A robotics diagnostic HUD fitted with a light amplifier."
|
||||
icon_state = "diagnostichudnight"
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=4;powerstorage=4;plasmatech=4;engineering=5"
|
||||
darkness_view = 8
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
glass_colour_type = /datum/client_colour/glass_colour/green
|
||||
@@ -80,7 +74,6 @@
|
||||
name = "security HUD"
|
||||
desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status and security records."
|
||||
icon_state = "securityhud"
|
||||
origin_tech = "magnets=3;combat=2"
|
||||
hud_type = DATA_HUD_SECURITY_ADVANCED
|
||||
glass_colour_type = /datum/client_colour/glass_colour/red
|
||||
|
||||
@@ -115,7 +108,6 @@
|
||||
name = "security HUDSunglasses"
|
||||
desc = "Sunglasses with a security HUD."
|
||||
icon_state = "sunhudsec"
|
||||
origin_tech = "magnets=3;combat=3;engineering=3"
|
||||
darkness_view = 1
|
||||
flash_protect = 1
|
||||
tint = 1
|
||||
@@ -125,7 +117,6 @@
|
||||
name = "night vision security HUD"
|
||||
desc = "An advanced heads-up display which provides id data and vision in complete darkness."
|
||||
icon_state = "securityhudnight"
|
||||
origin_tech = "magnets=4;combat=4;plasmatech=4;engineering=5"
|
||||
darkness_view = 8
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
glass_colour_type = /datum/client_colour/glass_colour/green
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
for(var/obj/item/device/flashlight/seclite/S in src)
|
||||
to_chat(user, "<span class='notice'>You unscrew the seclite from [src].</span>")
|
||||
F = null
|
||||
S.loc = get_turf(user)
|
||||
S.forceMove(user.drop_location())
|
||||
update_helmlight(user)
|
||||
S.update_brightness(user)
|
||||
update_icon()
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
flash_protect = 2
|
||||
tint = 2
|
||||
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 55)
|
||||
origin_tech = "materials=2;engineering=3"
|
||||
actions_types = list(/datum/action/item_action/toggle)
|
||||
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE
|
||||
flags_cover = MASKCOVERSEYES
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
strip_delay = 70
|
||||
equip_delay_other = 70
|
||||
resistance_flags = FIRE_PROOF
|
||||
origin_tech = "materials=3;magnets=4;engineering=4"
|
||||
|
||||
/obj/item/clothing/shoes/magboots/verb/toggle()
|
||||
set name = "Toggle Magboots"
|
||||
@@ -51,7 +50,6 @@
|
||||
icon_state = "advmag0"
|
||||
magboot_state = "advmag"
|
||||
slowdown_active = SHOES_SLOWDOWN
|
||||
origin_tech = null
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/clothing/shoes/magboots/syndie
|
||||
@@ -59,4 +57,3 @@
|
||||
name = "blood-red magboots"
|
||||
icon_state = "syndiemag0"
|
||||
magboot_state = "syndiemag"
|
||||
origin_tech = "magnets=4;syndicate=2"
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
magboot_state = "DS-magboots"
|
||||
icon = 'icons/obj/clothing/vg_clothes.dmi'
|
||||
icon_override = 'icons/mob/citadel/head.dmi'
|
||||
origin_tech = null
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/clothing/shoes/magboots/atmos
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
I.flags_1 &= ~NODROP_1
|
||||
if(camera)
|
||||
camera.remove_target_ui()
|
||||
camera.loc = user
|
||||
camera.forceMove(user)
|
||||
teleport_now.UpdateButtonIcon()
|
||||
|
||||
/obj/item/clothing/suit/space/chronos/proc/chronowalk(atom/location)
|
||||
@@ -271,29 +271,29 @@
|
||||
target_ui = null
|
||||
|
||||
/obj/effect/chronos_cam/relaymove(var/mob/user, direction)
|
||||
if(holder)
|
||||
if(user == holder)
|
||||
if(loc == user)
|
||||
loc = get_turf(user)
|
||||
if(user.client && user.client.eye != src)
|
||||
src.loc = get_turf(user)
|
||||
user.reset_perspective(src)
|
||||
user.set_machine(src)
|
||||
var/atom/step = get_step(src, direction)
|
||||
if(step)
|
||||
if((step.x <= TRANSITIONEDGE) || (step.x >= (world.maxx - TRANSITIONEDGE - 1)) || (step.y <= TRANSITIONEDGE) || (step.y >= (world.maxy - TRANSITIONEDGE - 1)))
|
||||
if(!src.Move(step))
|
||||
src.loc = step
|
||||
else
|
||||
src.loc = step
|
||||
if((x == holder.x) && (y == holder.y) && (z == holder.z))
|
||||
remove_target_ui()
|
||||
loc = user
|
||||
else if(!target_ui)
|
||||
create_target_ui()
|
||||
phase_time = world.time + phase_time_length
|
||||
else
|
||||
if(!holder)
|
||||
qdel(src)
|
||||
return
|
||||
if(user == holder)
|
||||
if(loc == user)
|
||||
forceMove(get_turf(user))
|
||||
if(user.client && user.client.eye != src)
|
||||
src.forceMove(user.drop_location())
|
||||
user.reset_perspective(src)
|
||||
user.set_machine(src)
|
||||
var/atom/step = get_step(src, direction)
|
||||
if(step)
|
||||
if((step.x <= TRANSITIONEDGE) || (step.x >= (world.maxx - TRANSITIONEDGE - 1)) || (step.y <= TRANSITIONEDGE) || (step.y >= (world.maxy - TRANSITIONEDGE - 1)))
|
||||
if(!src.Move(step))
|
||||
src.forceMove(step)
|
||||
else
|
||||
src.forceMove(step)
|
||||
if((x == holder.x) && (y == holder.y) && (z == holder.z))
|
||||
remove_target_ui()
|
||||
forceMove(user)
|
||||
else if(!target_ui)
|
||||
create_target_ui()
|
||||
phase_time = world.time + phase_time_length
|
||||
|
||||
/obj/effect/chronos_cam/check_eye(mob/user)
|
||||
if(user != holder)
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
assembled = TRUE
|
||||
boost_chargerate *= cap
|
||||
boost_drain -= manip
|
||||
powersetting_high = Clamp(laser, 0, 3)
|
||||
powersetting_high = CLAMP(laser, 0, 3)
|
||||
emp_disable_threshold = bin*1.25
|
||||
stabilizer_decay_amount = scan*3.5
|
||||
airbrake_decay_amount = manip*8
|
||||
@@ -194,15 +194,15 @@
|
||||
/obj/item/device/flightpack/proc/adjust_momentum(amountx, amounty, reduce_amount_total = 0)
|
||||
if(reduce_amount_total != 0)
|
||||
if(momentum_x > 0)
|
||||
momentum_x = Clamp(momentum_x - reduce_amount_total, 0, momentum_max)
|
||||
momentum_x = CLAMP(momentum_x - reduce_amount_total, 0, momentum_max)
|
||||
else if(momentum_x < 0)
|
||||
momentum_x = Clamp(momentum_x + reduce_amount_total, -momentum_max, 0)
|
||||
momentum_x = CLAMP(momentum_x + reduce_amount_total, -momentum_max, 0)
|
||||
if(momentum_y > 0)
|
||||
momentum_y = Clamp(momentum_y - reduce_amount_total, 0, momentum_max)
|
||||
momentum_y = CLAMP(momentum_y - reduce_amount_total, 0, momentum_max)
|
||||
else if(momentum_y < 0)
|
||||
momentum_y = Clamp(momentum_y + reduce_amount_total, -momentum_max, 0)
|
||||
momentum_x = Clamp(momentum_x + amountx, -momentum_max, momentum_max)
|
||||
momentum_y = Clamp(momentum_y + amounty, -momentum_max, momentum_max)
|
||||
momentum_y = CLAMP(momentum_y + reduce_amount_total, -momentum_max, 0)
|
||||
momentum_x = CLAMP(momentum_x + amountx, -momentum_max, momentum_max)
|
||||
momentum_y = CLAMP(momentum_y + amounty, -momentum_max, momentum_max)
|
||||
calculate_momentum_speed()
|
||||
|
||||
/obj/item/device/flightpack/intercept_user_move(dir, mob, newLoc, oldLoc)
|
||||
@@ -314,7 +314,7 @@
|
||||
|
||||
/obj/item/device/flightpack/proc/handle_damage()
|
||||
if(emp_damage)
|
||||
emp_damage = Clamp(emp_damage-emp_heal_amount, 0, emp_disable_threshold * 10)
|
||||
emp_damage = CLAMP(emp_damage-emp_heal_amount, 0, emp_disable_threshold * 10)
|
||||
if(emp_damage >= emp_disable_threshold)
|
||||
emp_disabled = TRUE
|
||||
if(emp_disabled && (emp_damage <= 0.5))
|
||||
@@ -347,11 +347,11 @@
|
||||
|
||||
/obj/item/device/flightpack/proc/handle_boost()
|
||||
if(boost)
|
||||
boost_charge = Clamp(boost_charge-boost_drain, 0, boost_maxcharge)
|
||||
boost_charge = CLAMP(boost_charge-boost_drain, 0, boost_maxcharge)
|
||||
if(boost_charge < 1)
|
||||
deactivate_booster()
|
||||
if(boost_charge < boost_maxcharge)
|
||||
boost_charge = Clamp(boost_charge+boost_chargerate, 0, boost_maxcharge)
|
||||
boost_charge = CLAMP(boost_charge+boost_chargerate, 0, boost_maxcharge)
|
||||
|
||||
/obj/item/device/flightpack/proc/cycle_power()
|
||||
powersetting < powersetting_high? (powersetting++) : (powersetting = 1)
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
return
|
||||
|
||||
jetpack.turn_off()
|
||||
jetpack.loc = get_turf(src)
|
||||
jetpack.forceMove(drop_location())
|
||||
jetpack = null
|
||||
to_chat(user, "<span class='notice'>You successfully remove the jetpack from [src].</span>")
|
||||
|
||||
@@ -654,7 +654,7 @@
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/process()
|
||||
if(world.time > recharge_cooldown && current_charges < max_charges)
|
||||
current_charges = Clamp((current_charges + recharge_rate), 0, max_charges)
|
||||
current_charges = CLAMP((current_charges + recharge_rate), 0, max_charges)
|
||||
playsound(loc, 'sound/magic/charge.ogg', 50, 1)
|
||||
if(current_charges == max_charges)
|
||||
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
if(U.pockets) // storage items conflict
|
||||
return FALSE
|
||||
|
||||
pockets.loc = U
|
||||
pockets.forceMove(U)
|
||||
U.pockets = pockets
|
||||
|
||||
U.attached_accessory = src
|
||||
loc = U
|
||||
forceMove(U)
|
||||
layer = FLOAT_LAYER
|
||||
plane = FLOAT_PLANE
|
||||
if(minimize_when_attached)
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/obj/item/clothing/accessory/proc/detach(obj/item/clothing/under/U, user)
|
||||
if(pockets && pockets == U.pockets)
|
||||
pockets.loc = src
|
||||
pockets.forceMove(src)
|
||||
U.pockets = null
|
||||
|
||||
for(var/armor_type in armor)
|
||||
|
||||
@@ -662,7 +662,6 @@
|
||||
name = "envirosuit extinguisher cartridge"
|
||||
desc = "A cartridge loaded with a compressed extinguisher mix, used to refill the automatic extinguisher on plasma envirosuits."
|
||||
icon_state = "plasmarefill"
|
||||
origin_tech = "materials=2;plasmatech=3;biotech=1"
|
||||
|
||||
/obj/item/clothing/under/rank/security/navyblue/russian
|
||||
name = "russian officer's uniform"
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
slot_flags = SLOT_BELT
|
||||
var/scanning = 0
|
||||
var/list/log = list()
|
||||
origin_tech = "engineering=4;biotech=2;programming=5"
|
||||
var/range = 8
|
||||
var/view_check = TRUE
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
/datum/round_event_control/New()
|
||||
if(config && !wizardevent) // Magic is unaffected by configs
|
||||
earliest_start = Ceiling(earliest_start * CONFIG_GET(number/events_min_time_mul))
|
||||
min_players = Ceiling(min_players * CONFIG_GET(number/events_min_players_mul))
|
||||
earliest_start = CEILING(earliest_start * CONFIG_GET(number/events_min_time_mul), 1)
|
||||
min_players = CEILING(min_players * CONFIG_GET(number/events_min_players_mul), 1)
|
||||
|
||||
/datum/round_event_control/wizard
|
||||
wizardevent = 1
|
||||
|
||||
@@ -67,12 +67,12 @@
|
||||
|
||||
kill()
|
||||
return
|
||||
if(IsMultiple(activeFor, 4))
|
||||
if(ISMULTIPLE(activeFor, 4))
|
||||
var/obj/machinery/vending/rebel = pick(vendingMachines)
|
||||
vendingMachines.Remove(rebel)
|
||||
infectedMachines.Add(rebel)
|
||||
rebel.shut_up = 0
|
||||
rebel.shoot_inventory = 1
|
||||
|
||||
if(IsMultiple(activeFor, 8))
|
||||
if(ISMULTIPLE(activeFor, 8))
|
||||
originMachine.speak(pick(rampant_speeches))
|
||||
@@ -10,22 +10,30 @@
|
||||
|
||||
var/virus_type
|
||||
|
||||
var/max_severity = 3
|
||||
|
||||
/datum/round_event/disease_outbreak/announce(fake)
|
||||
|
||||
/datum/round_event/disease_outbreak/announce()
|
||||
priority_announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/ai/outbreak7.ogg')
|
||||
|
||||
/datum/round_event/disease_outbreak/setup()
|
||||
announceWhen = rand(15, 30)
|
||||
|
||||
|
||||
/datum/round_event/disease_outbreak/start()
|
||||
if(!virus_type)
|
||||
var/advanced_virus = FALSE
|
||||
max_severity = 3 + max(FLOOR((world.time - control.earliest_start)/6000, 1),0) //3 symptoms at 20 minutes, plus 1 per 10 minutes
|
||||
if(prob(20 + (10 * max_severity)))
|
||||
advanced_virus = TRUE
|
||||
|
||||
if(!virus_type && !advanced_virus)
|
||||
virus_type = pick(/datum/disease/dnaspread, /datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis)
|
||||
|
||||
for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
continue
|
||||
if(!(T.z in GLOB.station_z_levels))
|
||||
if(T.z != ZLEVEL_STATION_PRIMARY)
|
||||
continue
|
||||
if(!H.client)
|
||||
continue
|
||||
@@ -41,16 +49,48 @@
|
||||
continue
|
||||
|
||||
var/datum/disease/D
|
||||
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
|
||||
if(!H.dna || (H.disabilities & BLIND)) //A blindness disease would be the worst.
|
||||
continue
|
||||
D = new virus_type()
|
||||
var/datum/disease/dnaspread/DS = D
|
||||
DS.strain_data["name"] = H.real_name
|
||||
DS.strain_data["UI"] = H.dna.uni_identity
|
||||
DS.strain_data["SE"] = H.dna.struc_enzymes
|
||||
if(!advanced_virus)
|
||||
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
|
||||
if(!H.dna || (H.disabilities & BLIND)) //A blindness disease would be the worst.
|
||||
continue
|
||||
D = new virus_type()
|
||||
var/datum/disease/dnaspread/DS = D
|
||||
DS.strain_data["name"] = H.real_name
|
||||
DS.strain_data["UI"] = H.dna.uni_identity
|
||||
DS.strain_data["SE"] = H.dna.struc_enzymes
|
||||
else
|
||||
D = new virus_type()
|
||||
else
|
||||
D = new virus_type()
|
||||
D = make_virus(max_severity, max_severity)
|
||||
D.carrier = TRUE
|
||||
H.AddDisease(D)
|
||||
break
|
||||
|
||||
if(advanced_virus)
|
||||
var/datum/disease/advance/A = D
|
||||
var/list/name_symptoms = list() //for feedback
|
||||
for(var/datum/symptom/S in A.symptoms)
|
||||
name_symptoms += S.name
|
||||
message_admins("An event has triggered a random advanced virus outbreak on [key_name_admin(H)]! It has these symptoms: [english_list(name_symptoms)]")
|
||||
log_game("An event has triggered a random advanced virus outbreak on [key_name(H)]! It has these symptoms: [english_list(name_symptoms)]")
|
||||
break
|
||||
|
||||
/datum/round_event/disease_outbreak/proc/make_virus(max_symptoms, max_level)
|
||||
if(max_symptoms > SYMPTOM_LIMIT)
|
||||
max_symptoms = SYMPTOM_LIMIT
|
||||
var/datum/disease/advance/A = new(FALSE, null)
|
||||
A.symptoms = list()
|
||||
var/list/datum/symptom/possible_symptoms = list()
|
||||
for(var/symptom in subtypesof(/datum/symptom))
|
||||
var/datum/symptom/S = symptom
|
||||
if(initial(S.level) > max_level)
|
||||
continue
|
||||
if(initial(S.level) <= 0) //unobtainable symptoms
|
||||
continue
|
||||
possible_symptoms += S
|
||||
for(var/i in 1 to max_symptoms)
|
||||
var/datum/symptom/chosen_symptom = pick_n_take(possible_symptoms)
|
||||
if(chosen_symptom)
|
||||
var/datum/symptom/S = new chosen_symptom
|
||||
A.symptoms += S
|
||||
A.Refresh() //just in case someone already made and named the same disease
|
||||
return A
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
priority_announce("Meteors have been detected on collision course with the station.", "Meteor Alert", 'sound/ai/meteors.ogg')
|
||||
|
||||
/datum/round_event/meteor_wave/tick()
|
||||
if(IsMultiple(activeFor, 3))
|
||||
if(ISMULTIPLE(activeFor, 3))
|
||||
spawn_meteors(5, wave_type) //meteor list types defined in gamemode/meteor/meteors.dm
|
||||
|
||||
/datum/round_event_control/meteor_wave/threatening
|
||||
|
||||
@@ -27,31 +27,13 @@
|
||||
A.copy_to(operative)
|
||||
operative.dna.update_dna_identity()
|
||||
|
||||
operative.equipOutfit(/datum/outfit/syndicate/full)
|
||||
|
||||
var/datum/mind/Mind = new /datum/mind(selected.key)
|
||||
Mind.assigned_role = "Lone Operative"
|
||||
Mind.special_role = "Lone Operative"
|
||||
SSticker.mode.traitors |= Mind
|
||||
Mind.active = 1
|
||||
|
||||
var/obj/machinery/nuclearbomb/selfdestruct/nuke = locate() in GLOB.machines
|
||||
if(nuke)
|
||||
var/nuke_code
|
||||
if(!nuke.r_code || nuke.r_code == "ADMIN")
|
||||
nuke_code = random_nukecode()
|
||||
nuke.r_code = nuke_code
|
||||
else
|
||||
nuke_code = nuke.r_code
|
||||
|
||||
Mind.store_memory("<B>Station Self-Destruct Device Code</B>: [nuke_code]", 0, 0)
|
||||
to_chat(Mind.current, "The nuclear authorization code is: <B>[nuke_code]</B>")
|
||||
|
||||
var/datum/objective/nuclear/O = new()
|
||||
O.owner = Mind
|
||||
Mind.objectives += O
|
||||
|
||||
Mind.transfer_to(operative)
|
||||
Mind.add_antag_datum(/datum/antagonist/nukeop/lone)
|
||||
|
||||
message_admins("[key_name_admin(operative)] has been made into lone operative by an event.")
|
||||
log_game("[key_name(operative)] was spawned as a lone operative by an event.")
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/datum/round_event/pirates/announce()
|
||||
priority_announce("Incoming subspace communication. Secure channel opened at all communication consoles.", "Incoming Message", 'sound/ai/commandreport.ogg')
|
||||
|
||||
|
||||
if(!control) //Means this is false alarm, todo : explicit checks instead of using announceWhen
|
||||
return
|
||||
threat = new
|
||||
@@ -45,7 +45,7 @@
|
||||
if(!shuttle_spawned)
|
||||
spawn_shuttle()
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/round_event/pirates/start()
|
||||
if(!paid_off && !shuttle_spawned)
|
||||
@@ -64,7 +64,7 @@
|
||||
var/turf/T = locate(x,y,z)
|
||||
if(!T)
|
||||
CRASH("Pirate event found no turf to load in")
|
||||
|
||||
|
||||
if(!ship.load(T))
|
||||
CRASH("Loading pirate ship failed!")
|
||||
for(var/turf/A in ship.get_affected_turfs(T))
|
||||
@@ -75,7 +75,7 @@
|
||||
candidates -= M
|
||||
else
|
||||
notify_ghosts("Space pirates are waking up!", source = spawner, action=NOTIFY_ATTACK, flashwindow = FALSE)
|
||||
|
||||
|
||||
priority_announce("Unidentified armed ship detected near the station.")
|
||||
|
||||
//Shuttle equipment
|
||||
@@ -104,7 +104,7 @@
|
||||
var/siphoned = min(SSshuttle.points,siphon_per_tick)
|
||||
SSshuttle.points -= siphoned
|
||||
credits_stored += siphoned
|
||||
steal_tech()
|
||||
interrupt_research()
|
||||
else
|
||||
return
|
||||
else
|
||||
@@ -130,23 +130,12 @@
|
||||
else
|
||||
dump_loot(user)
|
||||
|
||||
//20% to sap tech levels on unlocked consoles
|
||||
/obj/machinery/shuttle_scrambler/proc/steal_tech()
|
||||
if(!prob(20))
|
||||
return
|
||||
var/datum/tech/target_tech = pick(subtypesof(/datum/tech))
|
||||
var/target_id = initial(target_tech.id)
|
||||
for(var/obj/machinery/computer/rdconsole/C in GLOB.machines)
|
||||
if(C.screen == RD_CONSOLE_LOCKED_SCREEN || C.stat & (NOPOWER|BROKEN))
|
||||
continue
|
||||
var/datum/research/files = C.files
|
||||
files.LowerTech(target_id,1)
|
||||
new /obj/effect/temp_visual/emp(get_turf(C))
|
||||
for(var/obj/machinery/r_n_d/server/S in GLOB.machines)
|
||||
//interrupt_research
|
||||
/obj/machinery/shuttle_scrambler/proc/interrupt_research()
|
||||
for(var/obj/machinery/rnd/server/S in GLOB.machines)
|
||||
if(S.stat & (NOPOWER|BROKEN))
|
||||
continue
|
||||
var/datum/research/files = S.files
|
||||
files.LowerTech(target_id,1)
|
||||
S.emp_act(1)
|
||||
new /obj/effect/temp_visual/emp(get_turf(S))
|
||||
|
||||
/obj/machinery/shuttle_scrambler/proc/dump_loot(mob/user)
|
||||
@@ -157,7 +146,7 @@
|
||||
new /obj/item/stack/spacecash/c200(drop_location())
|
||||
credits_stored -= 200
|
||||
to_chat(user,"<span class='notice'>You retrieve the siphoned credits!</span>")
|
||||
|
||||
|
||||
|
||||
/obj/machinery/shuttle_scrambler/proc/send_notification()
|
||||
priority_announce("Data theft signal detected, source registered on local gps units.")
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
T = safepick(get_area_turfs(pick(station_areas)))
|
||||
hostiles_spawn += T
|
||||
|
||||
next_boss_spawn = startWhen + Ceiling(2 * number_of_hostiles / number_of_bosses)
|
||||
next_boss_spawn = startWhen + CEILING(2 * number_of_hostiles / number_of_bosses, 1)
|
||||
|
||||
/datum/round_event/portal_storm/announce(fake)
|
||||
set waitfor = 0
|
||||
@@ -117,14 +117,14 @@
|
||||
/datum/round_event/portal_storm/proc/spawn_hostile()
|
||||
if(!hostile_types || !hostile_types.len)
|
||||
return 0
|
||||
return IsMultiple(activeFor, 2)
|
||||
return ISMULTIPLE(activeFor, 2)
|
||||
|
||||
/datum/round_event/portal_storm/proc/spawn_boss()
|
||||
if(!boss_types || !boss_types.len)
|
||||
return 0
|
||||
|
||||
if(activeFor == next_boss_spawn)
|
||||
next_boss_spawn += Ceiling(number_of_hostiles / number_of_bosses)
|
||||
next_boss_spawn += CEILING(number_of_hostiles / number_of_bosses, 1)
|
||||
return 1
|
||||
|
||||
/datum/round_event/portal_storm/proc/time_to_end()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
for(var/speciestype in subtypesof(/datum/species))
|
||||
var/datum/species/S = new speciestype()
|
||||
if(!S.dangerous_existence)
|
||||
if(!S.dangerous_existence && !S.blacklisted)
|
||||
all_species += speciestype
|
||||
|
||||
var/datum/species/new_species = pick(all_species)
|
||||
|
||||
@@ -393,6 +393,7 @@
|
||||
container_type = NONE
|
||||
spillable = FALSE
|
||||
isGlass = FALSE
|
||||
grind_results = list("aluminum" = 10)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/attack(mob/M, mob/user)
|
||||
if(M == user && !src.reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_selected == "head")
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
unique_rename = 1
|
||||
grind_results = list() //To let them be ground up to transfer their reagents
|
||||
var/bitesize = 2
|
||||
var/bitecount = 0
|
||||
var/trash = null
|
||||
@@ -276,7 +277,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/Destroy()
|
||||
if(contents)
|
||||
for(var/atom/movable/something in contents)
|
||||
something.loc = get_turf(src)
|
||||
something.forceMove(drop_location())
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/attack_animal(mob/M)
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
filling_color = "#F0E68C"
|
||||
tastes = list("egg" = 1)
|
||||
foodtype = MEAT
|
||||
grind_results = list("eggyolk" = 5)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom)
|
||||
if(!..()) //was it caught by a mob?
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
filling_color = "#FF1493"
|
||||
tastes = list("watermelon" = 1)
|
||||
foodtype = FRUIT
|
||||
juice_results = list("watermelonjuice" = 5)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/candy_corn
|
||||
name = "candy corn"
|
||||
|
||||
@@ -119,11 +119,11 @@
|
||||
else
|
||||
for(var/obj/O in contents)
|
||||
if(sanitize(O.name) == href_list["dispense"])
|
||||
O.loc = src.loc
|
||||
O.forceMove(drop_location())
|
||||
break
|
||||
|
||||
if(href_list["portion"])
|
||||
portion = Clamp(input("How much drink do you want to dispense per glass?") as num, 0, 50)
|
||||
portion = CLAMP(input("How much drink do you want to dispense per glass?") as num, 0, 50)
|
||||
|
||||
if(href_list["pour"] || href_list["m_pour"])
|
||||
if(glasses-- <= 0)
|
||||
|
||||
@@ -277,14 +277,14 @@
|
||||
operating = FALSE // Turn it off again aferwards
|
||||
icon_state = "mw"
|
||||
updateUsrDialog()
|
||||
soundloop.stop()
|
||||
|
||||
/obj/machinery/microwave/proc/stop()
|
||||
soundloop.stop()
|
||||
abort()
|
||||
|
||||
/obj/machinery/microwave/proc/dispose()
|
||||
for (var/obj/O in contents)
|
||||
O.loc = src.loc
|
||||
O.forceMove(drop_location())
|
||||
to_chat(usr, "<span class='notice'>You dispose of the microwave contents.</span>")
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -293,7 +293,6 @@
|
||||
icon_state = "mwbloody1" // Make it look dirty!!
|
||||
|
||||
/obj/machinery/microwave/proc/muck_finish()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
visible_message("<span class='warning'>The microwave gets covered in muck!</span>")
|
||||
dirty = 100 // Make it dirty so it can't be used util cleaned
|
||||
icon_state = "mwbloody" // Make it look dirty too
|
||||
@@ -303,6 +302,7 @@
|
||||
if(prob(50))
|
||||
new /obj/item/reagent_containers/food/snacks/badrecipe(src)
|
||||
qdel(S)
|
||||
soundloop.stop()
|
||||
|
||||
/obj/machinery/microwave/proc/broke()
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
@@ -314,6 +314,7 @@
|
||||
flags_1 = null //So you can't add condiments
|
||||
operating = FALSE // Turn it off again aferwards
|
||||
updateUsrDialog()
|
||||
soundloop.stop()
|
||||
|
||||
/obj/machinery/microwave/Topic(href, href_list)
|
||||
if(..() || panel_open)
|
||||
|
||||
@@ -178,9 +178,9 @@
|
||||
|
||||
/obj/machinery/processor/proc/empty()
|
||||
for (var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
O.forceMove(drop_location())
|
||||
for (var/mob/M in src)
|
||||
M.loc = src.loc
|
||||
M.forceMove(drop_location())
|
||||
return
|
||||
|
||||
/obj/machinery/processor/slime
|
||||
|
||||
@@ -301,10 +301,10 @@
|
||||
if(S.dried_type == S.type)//if the dried type is the same as the object's type, don't bother creating a whole new item...
|
||||
S.add_atom_colour("#ad7257", FIXED_COLOUR_PRIORITY)
|
||||
S.dry = TRUE
|
||||
S.loc = get_turf(src)
|
||||
S.forceMove(drop_location())
|
||||
else
|
||||
var/dried = S.dried_type
|
||||
new dried(src.loc)
|
||||
new dried(drop_location())
|
||||
qdel(S)
|
||||
return TRUE
|
||||
for(var/obj/item/stack/sheet/wetleather/WL in contents)
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
item_state = "eshield0"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
origin_tech = "syndicate=3;engineering=3"
|
||||
|
||||
/obj/item/pizzabox
|
||||
name = "pizza box"
|
||||
@@ -125,7 +124,7 @@
|
||||
return
|
||||
else
|
||||
bomb_timer = input(user, "Set the [bomb] timer from [BOMB_TIMER_MIN] to [BOMB_TIMER_MAX].", bomb, bomb_timer) as num
|
||||
bomb_timer = Clamp(Ceiling(bomb_timer / 2), BOMB_TIMER_MIN, BOMB_TIMER_MAX)
|
||||
bomb_timer = CLAMP(CEILING(bomb_timer / 2, 1), BOMB_TIMER_MIN, BOMB_TIMER_MAX)
|
||||
bomb_defused = FALSE
|
||||
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)] has trapped a [src] with [bomb] set to [bomb_timer * 2] seconds."
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
ASSERT(H)
|
||||
|
||||
usr.visible_message("\The [usr] plays \the [card.name].")
|
||||
H.loc = get_step(usr,usr.dir)
|
||||
H.forceMove(get_step(usr,usr.dir))
|
||||
|
||||
src.update_icon()
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
decksize = 50
|
||||
card_text_file = "strings/cas_black.txt"
|
||||
|
||||
/obj/item/toy/cards/deck/cas/New()
|
||||
/obj/item/toy/cards/deck/cas/Initialize()
|
||||
. = ..()
|
||||
var/static/list/cards_against_space = list("cas_white" = world.file2list("strings/cas_white.txt"),"cas_black" = world.file2list("strings/cas_black.txt"))
|
||||
allcards = cards_against_space[card_face]
|
||||
var/list/possiblecards = allcards.Copy()
|
||||
@@ -52,7 +53,6 @@
|
||||
P.card_icon = "cas_white"
|
||||
cards += P
|
||||
shuffle_inplace(cards) // distribute blank cards throughout deck
|
||||
..()
|
||||
|
||||
/obj/item/toy/cards/deck/cas/attack_hand(mob/user)
|
||||
if(user.lying)
|
||||
|
||||
@@ -104,7 +104,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
|
||||
sendClientData()
|
||||
|
||||
//do not convert to to_chat()
|
||||
SEND_TEXT(owner, "<span class=\"userdanger\">If you can see this, update byond.</span>")
|
||||
SEND_TEXT(owner, "<span class=\"userdanger\">Failed to load fancy chat, reverting to old chat. Certain features won't work.</span>")
|
||||
|
||||
pingLoop()
|
||||
|
||||
@@ -132,7 +132,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
|
||||
|
||||
/datum/chatOutput/proc/setMusicVolume(volume = "")
|
||||
if(volume)
|
||||
adminMusicVolume = Clamp(text2num(volume), 0, 100)
|
||||
adminMusicVolume = CLAMP(text2num(volume), 0, 100)
|
||||
|
||||
//Sends client connection details to the chat to handle and save
|
||||
/datum/chatOutput/proc/sendClientData()
|
||||
|
||||
@@ -38,6 +38,19 @@ img.icon {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
|
||||
.r:before { /* "repeated" badge class for combined messages */
|
||||
content: 'x';
|
||||
}
|
||||
.r {
|
||||
display: inline;
|
||||
padding: .2em .6em .3em;
|
||||
font-size: 75%;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
a {color: #0000ff;}
|
||||
a.visited {color: #ff00ff;}
|
||||
a:visited {color: #ff00ff;}
|
||||
@@ -377,6 +390,7 @@ h1.alert, h2.alert {color: #000000;}
|
||||
.memo {color: #638500; text-align: center;}
|
||||
.memoedit {text-align: center; font-size: 16px;}
|
||||
.abductor {color: #800080; font-style: italic;}
|
||||
.mind_control {color: #A00D6F; font-size: 3; font-weight: bold; font-style: italic;}
|
||||
.slime {color: #00CED1;}
|
||||
.drone {color: #848482;}
|
||||
.monkey {color: #975032;}
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<a href="#" class="subCell togglePing" id="togglePing"><span>Toggle ping display</span> <i class="icon-circle"></i></a>
|
||||
<a href="#" class="subCell highlightTerm" id="highlightTerm"><span>Highlight string</span> <i class="icon-tag"></i></a>
|
||||
<a href="#" class="subCell saveLog" id="saveLog"><span>Save chat log</span> <i class="icon-save"></i></a>
|
||||
<a href="#" class="subCell toggleCombine" id="toggleCombine"><span>Toggle line combining</span> <i class="icon-filter"></i></a>
|
||||
<a href="#" class="subCell clearMessages" id="clearMessages"><span>Clear all messages</span> <i class="icon-eraser"></i></a>
|
||||
</div>
|
||||
<div class="sub" id="subAudio">
|
||||
|
||||
@@ -22,7 +22,7 @@ window.onerror = function(msg, url, line, col, error) {
|
||||
|
||||
//Globals
|
||||
window.status = 'Output';
|
||||
var $messages, $subOptions, $subAudio, $selectedSub, $contextMenu, $filterMessages;
|
||||
var $messages, $subOptions, $subAudio, $selectedSub, $contextMenu, $filterMessages, $last_message;
|
||||
var opts = {
|
||||
//General
|
||||
'messageCount': 0, //A count...of messages...
|
||||
@@ -68,6 +68,8 @@ var opts = {
|
||||
|
||||
'defaultMusicVolume': 25,
|
||||
|
||||
'messageCombining': true,
|
||||
|
||||
};
|
||||
|
||||
function clamp(val, min, max) {
|
||||
@@ -294,27 +296,54 @@ function output(message, flag) {
|
||||
opts.messageCount--; //I guess the count should only ever equal the limit
|
||||
}
|
||||
|
||||
//Actually append the message
|
||||
var entry = document.createElement('div');
|
||||
entry.className = 'entry';
|
||||
|
||||
if (filteredOut) {
|
||||
entry.className += ' hidden';
|
||||
entry.setAttribute('data-filter', filteredOut);
|
||||
var handled = false;
|
||||
var trimmed_message = message.trim()
|
||||
var lastmessages = $messages.children('div.entry:last-child');
|
||||
if (opts.messageCombining && lastmessages.length && $last_message)
|
||||
{
|
||||
if($last_message == trimmed_message)
|
||||
{
|
||||
if(lastmessages.children('span.r').length)
|
||||
{
|
||||
var current_value = parseInt(lastmessages.children('span.r').text())
|
||||
lastmessages.children('span.r').text(current_value+1)
|
||||
}
|
||||
else
|
||||
{
|
||||
lastmessages.append($('<span/>', { 'class': 'r', 'text': 2}));
|
||||
}
|
||||
if(parseInt(lastmessages.css("font-size")) < 24) //Completely arbitrary max size
|
||||
lastmessages.css("font-size","+=2")
|
||||
opts.messageCount--;
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!handled)
|
||||
{
|
||||
//Actually append the message
|
||||
var entry = document.createElement('div');
|
||||
entry.className = 'entry';
|
||||
|
||||
if (filteredOut) {
|
||||
entry.className += ' hidden';
|
||||
entry.setAttribute('data-filter', filteredOut);
|
||||
}
|
||||
|
||||
$last_message = trimmed_message;
|
||||
entry.innerHTML = trimmed_message;
|
||||
$messages[0].appendChild(entry);
|
||||
$(entry).find("img.icon").error(iconError);
|
||||
//Actually do the snap
|
||||
//Stuff we can do after the message shows can go here, in the interests of responsiveness
|
||||
if (opts.highlightTerms && opts.highlightTerms.length > 0) {
|
||||
highlightTerms(entry);
|
||||
}
|
||||
}
|
||||
|
||||
entry.innerHTML = message.trim();
|
||||
$messages[0].appendChild(entry);
|
||||
$(entry).find("img.icon").error(iconError);
|
||||
//Actually do the snap
|
||||
if (!filteredOut && atBottom) {
|
||||
$('body,html').scrollTop($messages.outerHeight());
|
||||
}
|
||||
|
||||
//Stuff we can do after the message shows can go here, in the interests of responsiveness
|
||||
if (opts.highlightTerms && opts.highlightTerms.length > 0) {
|
||||
highlightTerms(entry);
|
||||
}
|
||||
}
|
||||
|
||||
function internalOutput(message, flag)
|
||||
@@ -568,6 +597,7 @@ $(function() {
|
||||
'shighlightTerms': getCookie('highlightterms'),
|
||||
'shighlightColor': getCookie('highlightcolor'),
|
||||
'smusicVolume': getCookie('musicVolume'),
|
||||
'smessagecombining': getCookie('messagecombining'),
|
||||
};
|
||||
|
||||
if (savedConfig.sfontSize) {
|
||||
@@ -606,7 +636,15 @@ $(function() {
|
||||
opts.updatedVolume = newVolume;
|
||||
sendVolumeUpdate();
|
||||
internalOutput('<span class="internal boldnshit">Loaded music volume of: '+savedConfig.smusicVolume+'</span>', 'internal');
|
||||
} else {
|
||||
}
|
||||
if (savedConfig.smessagecombining) {
|
||||
if (savedConfig.smessagecombining == 'false') {
|
||||
opts.messageCombining = false;
|
||||
} else {
|
||||
opts.messageCombining = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$('#adminMusic').prop('volume', opts.defaultMusicVolume / 100);
|
||||
}
|
||||
|
||||
@@ -922,6 +960,11 @@ $(function() {
|
||||
}
|
||||
});
|
||||
|
||||
$('#toggleCombine').click(function(e) {
|
||||
opts.messageCombining = !opts.messageCombining;
|
||||
setCookie('messagecombining', (opts.messageCombining ? 'true' : 'false'), 365);
|
||||
});
|
||||
|
||||
$('img.icon').error(iconError);
|
||||
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
timer = rand(1,15)
|
||||
|
||||
/mob/living/simple_animal/shade/howling_ghost/proc/EtherealMove(direction)
|
||||
loc = get_step(src, direction)
|
||||
forceMove(get_step(src, direction))
|
||||
setDir(direction)
|
||||
|
||||
/mob/living/simple_animal/shade/howling_ghost/proc/roam()
|
||||
@@ -220,7 +220,7 @@
|
||||
timer = rand(5,15)
|
||||
playsound(M.loc, pick('sound/spookoween/scary_horn.ogg','sound/spookoween/scary_horn2.ogg', 'sound/spookoween/scary_horn3.ogg'), 300, 1)
|
||||
spawn(12)
|
||||
loc = M.loc
|
||||
forceMove(M.loc)
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/insane/MoveToTarget()
|
||||
stalk(target)
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
if(user.grab_state < GRAB_AGGRESSIVE)
|
||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||
return
|
||||
L.loc = src.loc
|
||||
L.forceMove(loc)
|
||||
L.Knockdown(100)
|
||||
visible_message("<span class='danger'>[user] dunks [L] into \the [src]!</span>")
|
||||
user.stop_pulling()
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
if((bee_resources >= BEE_RESOURCE_NEW_BEE_COST && prob(BEE_PROB_NEW_BEE)) || freebee)
|
||||
if(!freebee)
|
||||
bee_resources = max(bee_resources - BEE_RESOURCE_NEW_BEE_COST, 0)
|
||||
var/mob/living/simple_animal/hostile/poison/bees/B = new(src)
|
||||
var/mob/living/simple_animal/hostile/poison/bees/B = new(get_turf(src))
|
||||
B.beehome = src
|
||||
B.assign_reagent(queen_bee.beegent)
|
||||
bees += B
|
||||
@@ -178,7 +178,7 @@
|
||||
bees -= B
|
||||
B.beehome = null
|
||||
if(B.loc == src)
|
||||
B.loc = get_turf(src)
|
||||
B.forceMove(drop_location())
|
||||
relocated++
|
||||
if(relocated)
|
||||
to_chat(user, "<span class='warning'>This queen has a different reagent to some of the bees who live here, those bees will not return to this apiary!</span>")
|
||||
@@ -201,7 +201,7 @@
|
||||
if(B.isqueen)
|
||||
continue
|
||||
if(B.loc == src)
|
||||
B.loc = get_turf(src)
|
||||
B.forceMove(drop_location())
|
||||
B.target = user
|
||||
bees = TRUE
|
||||
if(bees)
|
||||
@@ -221,7 +221,7 @@
|
||||
var/obj/item/honey_frame/HF = pick_n_take(honey_frames)
|
||||
if(HF)
|
||||
if(!user.put_in_active_hand(HF))
|
||||
HF.loc = get_turf(src)
|
||||
HF.forceMove(drop_location())
|
||||
visible_message("<span class='notice'>[user] removes a frame from the apiary.</span>")
|
||||
|
||||
var/amtH = HF.honeycomb_capacity
|
||||
@@ -229,7 +229,7 @@
|
||||
while(honeycombs.len && amtH) //let's pretend you always grab the frame with the most honeycomb on it
|
||||
var/obj/item/reagent_containers/honeycomb/HC = pick_n_take(honeycombs)
|
||||
if(HC)
|
||||
HC.loc = get_turf(user)
|
||||
HC.forceMove(drop_location())
|
||||
amtH--
|
||||
fallen++
|
||||
if(fallen)
|
||||
@@ -241,12 +241,12 @@
|
||||
to_chat(user, "<span class='warning'>There is no queen bee to remove!</span>")
|
||||
return
|
||||
var/obj/item/queen_bee/QB = new()
|
||||
queen_bee.loc = QB
|
||||
queen_bee.forceMove(QB)
|
||||
bees -= queen_bee
|
||||
QB.queen = queen_bee
|
||||
QB.name = queen_bee.name
|
||||
if(!user.put_in_active_hand(QB))
|
||||
QB.loc = get_turf(src)
|
||||
QB.forceMove(drop_location())
|
||||
visible_message("<span class='notice'>[user] removes the queen from the apiary.</span>")
|
||||
queen_bee = null
|
||||
|
||||
@@ -254,8 +254,8 @@
|
||||
new /obj/item/stack/sheet/mineral/wood (loc, 20)
|
||||
for(var/mob/living/simple_animal/hostile/poison/bees/B in bees)
|
||||
if(B.loc == src)
|
||||
B.loc = get_turf(src)
|
||||
B.forceMove(drop_location())
|
||||
for(var/obj/item/honey_frame/HF in honey_frames)
|
||||
if(HF.loc == src)
|
||||
HF.loc = get_turf(src)
|
||||
qdel(src)
|
||||
HF.forceMove(drop_location())
|
||||
qdel(src)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
volume = 10
|
||||
amount_per_transfer_from_this = 0
|
||||
list_reagents = list("honey" = 5)
|
||||
grind_results = list()
|
||||
var/honey_color = ""
|
||||
|
||||
/obj/item/reagent_containers/honeycomb/New()
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
var/efficiency = 0
|
||||
var/productivity = 0
|
||||
var/max_items = 40
|
||||
var/datum/research/files
|
||||
var/datum/techweb/stored_research
|
||||
var/list/show_categories = list("Food", "Botany Chemicals", "Leather and Cloth")
|
||||
var/list/timesFiveCategories = list("Food", "Botany Chemicals")
|
||||
|
||||
/obj/machinery/biogenerator/Initialize()
|
||||
. = ..()
|
||||
files = new /datum/research/biogenerator(src)
|
||||
stored_research = new /datum/techweb/specialized/autounlocking/biogenerator
|
||||
create_reagents(1000)
|
||||
|
||||
/obj/machinery/biogenerator/Destroy()
|
||||
@@ -78,7 +78,7 @@
|
||||
if(default_deconstruction_screwdriver(user, "biogen-empty-o", "biogen-empty", O))
|
||||
if(beaker)
|
||||
var/obj/item/reagent_containers/glass/B = beaker
|
||||
B.loc = loc
|
||||
B.forceMove(drop_location())
|
||||
beaker = null
|
||||
update_icon()
|
||||
return
|
||||
@@ -124,7 +124,7 @@
|
||||
to_chat(user, "<span class='info'>You empty the plant bag into the biogenerator, filling it to its capacity.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>You fill the biogenerator to its capacity.</span>")
|
||||
return 1 //no afterattack
|
||||
return TRUE //no afterattack
|
||||
|
||||
else if(istype(O, /obj/item/reagent_containers/food/snacks/grown))
|
||||
var/i = 0
|
||||
@@ -135,7 +135,7 @@
|
||||
else
|
||||
if(user.transferItemToLoc(O, src))
|
||||
to_chat(user, "<span class='info'>You put [O.name] in [src.name]</span>")
|
||||
return 1 //no afterattack
|
||||
return TRUE //no afterattack
|
||||
else if (istype(O, /obj/item/disk/design_disk))
|
||||
user.visible_message("[user] begins to load \the [O] in \the [src]...",
|
||||
"You begin to load a design from \the [O]...",
|
||||
@@ -145,9 +145,9 @@
|
||||
if(do_after(user, 10, target = src))
|
||||
for(var/B in D.blueprints)
|
||||
if(B)
|
||||
files.AddDesign2Known(B)
|
||||
stored_research.add_design(B)
|
||||
processing = FALSE
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot put this in [src.name]!</span>")
|
||||
|
||||
@@ -176,8 +176,8 @@
|
||||
var/categories = show_categories.Copy()
|
||||
for(var/V in categories)
|
||||
categories[V] = list()
|
||||
for(var/V in files.known_designs)
|
||||
var/datum/design/D = files.known_designs[V]
|
||||
for(var/V in stored_research.researched_designs)
|
||||
var/datum/design/D = stored_research.researched_designs[V]
|
||||
for(var/C in categories)
|
||||
if(C in D.category)
|
||||
categories[C] += D
|
||||
@@ -237,16 +237,16 @@
|
||||
|
||||
/obj/machinery/biogenerator/proc/check_cost(list/materials, multiplier = 1, remove_points = 1)
|
||||
if(materials.len != 1 || materials[1] != MAT_BIOMASS)
|
||||
return 0
|
||||
return FALSE
|
||||
if (materials[MAT_BIOMASS]*multiplier/efficiency > points)
|
||||
menustat = "nopoints"
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
if(remove_points)
|
||||
points -= materials[MAT_BIOMASS]*multiplier/efficiency
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/biogenerator/proc/check_container_volume(list/reagents, multiplier = 1)
|
||||
var/sum_reagents = 0
|
||||
@@ -256,19 +256,19 @@
|
||||
|
||||
if(beaker.reagents.total_volume + sum_reagents > beaker.reagents.maximum_volume)
|
||||
menustat = "nobeakerspace"
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/biogenerator/proc/create_product(datum/design/D, amount)
|
||||
if(!beaker || !loc)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(ispath(D.build_path, /obj/item/stack))
|
||||
if(!check_container_volume(D.make_reagents, amount))
|
||||
return 0
|
||||
return FALSE
|
||||
if(!check_cost(D.materials, amount))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
var/obj/item/stack/product = new D.build_path(loc)
|
||||
product.amount = amount
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
for(var/obj/item/stock_parts/micro_laser/ML in component_parts)
|
||||
var/wratemod = ML.rating * 2.5
|
||||
min_wrate = Floor(10-wratemod,1) // 7,5,2,0 Clamps at 0 and 10 You want this low
|
||||
min_wrate = FLOOR(10-wratemod,1) // 7,5,2,0 Clamps at 0 and 10 You want this low
|
||||
min_wchance = 67-(ML.rating*16) // 48,35,19,3 Clamps at 0 and 67 You want this low
|
||||
for(var/obj/item/circuitboard/machine/plantgenes/vaultcheck in component_parts)
|
||||
if(istype(vaultcheck, /obj/item/circuitboard/machine/plantgenes/vault)) // DUMB BOTANY TUTS
|
||||
@@ -260,7 +260,7 @@
|
||||
|
||||
if(href_list["eject_seed"] && !operation)
|
||||
if (seed)
|
||||
seed.loc = src.loc
|
||||
seed.forceMove(drop_location())
|
||||
seed.verb_pickup()
|
||||
seed = null
|
||||
update_genes()
|
||||
@@ -275,7 +275,7 @@
|
||||
update_icon()
|
||||
else if(href_list["eject_disk"] && !operation)
|
||||
if (disk)
|
||||
disk.loc = src.loc
|
||||
disk.forceMove(drop_location())
|
||||
disk.verb_pickup()
|
||||
disk = null
|
||||
update_genes()
|
||||
@@ -368,7 +368,7 @@
|
||||
/obj/machinery/plantgenes/proc/insert_seed(obj/item/seeds/S)
|
||||
if(!istype(S) || seed)
|
||||
return
|
||||
S.loc = src
|
||||
S.forceMove(src)
|
||||
seed = S
|
||||
update_genes()
|
||||
update_icon()
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// Saves us from having to define each stupid grown's dried_type as itself.
|
||||
// If you don't want a plant to be driable (watermelons) set this to null in the time definition.
|
||||
resistance_flags = FLAMMABLE
|
||||
origin_tech = "biotech=1"
|
||||
var/dry_grind = FALSE //If TRUE, this object needs to be dry to be ground up
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/Initialize(mapload, obj/item/seeds/new_seed)
|
||||
. = ..()
|
||||
@@ -37,7 +37,7 @@
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_new(src, loc)
|
||||
seed.prepare_result(src)
|
||||
transform *= TransformUsingVariable(seed.potency, 100, 0.5) //Makes the resulting produce's sprite larger or smaller based on potency!
|
||||
transform *= TRANSFORM_USING_VARIABLE(seed.potency, 100) + 0.5 //Makes the resulting produce's sprite larger or smaller based on potency!
|
||||
add_juice()
|
||||
|
||||
|
||||
@@ -138,6 +138,28 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/grind_requirements()
|
||||
if(dry_grind && !dry)
|
||||
to_chat(usr, "<span class='warning'>[src] needs to be dry before it can be ground up!</span>")
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/on_grind()
|
||||
var/nutriment = reagents.get_reagent_amount("nutriment")
|
||||
if(grind_results.len)
|
||||
for(var/i in 1 to grind_results.len)
|
||||
grind_results[grind_results[i]] = nutriment
|
||||
reagents.del_reagent("nutriment")
|
||||
reagents.del_reagent("vitamin")
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/on_juice()
|
||||
var/nutriment = reagents.get_reagent_amount("nutriment")
|
||||
if(juice_results.len)
|
||||
for(var/i in 1 to juice_results.len)
|
||||
juice_results[juice_results[i]] = nutriment
|
||||
reagents.del_reagent("nutriment")
|
||||
reagents.del_reagent("vitamin")
|
||||
|
||||
// For item-containing growns such as eggy or gatfruit
|
||||
/obj/item/reagent_containers/food/snacks/grown/shell/attack_self(mob/user)
|
||||
var/obj/item/T
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
seed = /obj/item/seeds/ambrosia
|
||||
name = "ambrosia vulgaris branch"
|
||||
desc = "This is a plant containing various healing chemicals."
|
||||
origin_tech = "biotech=2"
|
||||
|
||||
// Ambrosia Deus
|
||||
/obj/item/seeds/ambrosia/deus
|
||||
@@ -50,7 +49,6 @@
|
||||
desc = "Eating this makes you feel immortal!"
|
||||
icon_state = "ambrosiadeus"
|
||||
filling_color = "#008B8B"
|
||||
origin_tech = "biotech=4;materials=3"
|
||||
|
||||
//Ambrosia Gaia
|
||||
/obj/item/seeds/ambrosia/gaia
|
||||
@@ -72,6 +70,5 @@
|
||||
desc = "Eating this <i>makes</i> you immortal."
|
||||
icon_state = "ambrosia_gaia"
|
||||
filling_color = rgb(255, 175, 0)
|
||||
origin_tech = "biotech=6;materials=5"
|
||||
light_range = 3
|
||||
seed = /obj/item/seeds/ambrosia/gaia
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user