mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-14 08:35:39 +01:00
Merge branch 'dev' into ofBotsAndMobs
Conflicts: code/game/machinery/bots/cleanbot.dm code/game/machinery/bots/ed209bot.dm code/game/machinery/bots/farmbot.dm code/game/machinery/bots/floorbot.dm code/game/machinery/bots/medbot.dm code/game/machinery/bots/secbot.dm code/game/objects/items/robot/robot_parts.dm
This commit is contained in:
@@ -1256,6 +1256,8 @@ var/global/floorIsLava = 0
|
||||
//*********************************************************************************************************
|
||||
//
|
||||
|
||||
//Returns 1 to let the dragdrop code know we are trapping this event
|
||||
//Returns 0 if we don't plan to trap the event
|
||||
/datum/admins/proc/cmd_ghost_drag(var/mob/dead/observer/frommob, var/mob/living/tomob)
|
||||
if(!istype(frommob))
|
||||
return //Extra sanity check to make sure only observers are shoved into things
|
||||
@@ -1272,6 +1274,8 @@ var/global/floorIsLava = 0
|
||||
var/ask = alert(question, "Place ghost in control of mob?", "Yes", "No")
|
||||
if (ask != "Yes")
|
||||
return 1
|
||||
if (!frommob || !tomob) //make sure the mobs don't go away while we waited for a response
|
||||
return 1
|
||||
if(tomob.client) //No need to ghostize if there is no client
|
||||
tomob.ghostize(0)
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has put [frommob.ckey] in control of [tomob.name].</span>")
|
||||
|
||||
@@ -523,7 +523,7 @@ var/list/admin_verbs_mentor = list(
|
||||
if(C)
|
||||
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban.")
|
||||
C << "<font color='red'><BIG><B>You have been autobanned due to a warning by [ckey].</B></BIG><br>This is a temporary ban, it will be removed in [AUTOBANTIME] minutes."
|
||||
del(C)
|
||||
qdel(C)
|
||||
else
|
||||
message_admins("[key_name_admin(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban.")
|
||||
AddBan(warned_ckey, D.last_id, "Autobanning due to too many formal warnings", ckey, 1, AUTOBANTIME)
|
||||
|
||||
@@ -16,7 +16,7 @@ var/list/admin_datums = list()
|
||||
/datum/admins/New(initial_rank = "Temporary Admin", initial_rights = 0, ckey)
|
||||
if(!ckey)
|
||||
error("Admin datum created without a ckey argument. Datum has been deleted")
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
admincaster_signature = "Nanotrasen Officer #[rand(0,9)][rand(0,9)][rand(0,9)]"
|
||||
rank = initial_rank
|
||||
@@ -55,8 +55,7 @@ proc/admin_proc()
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
world << "you have enough rights!"
|
||||
|
||||
NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call
|
||||
you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
|
||||
NOTE: It checks usr by default. Supply the "user" argument if you wish to check for a specific mob.
|
||||
*/
|
||||
/proc/check_rights(rights_required, show_msg=1, var/mob/user = usr)
|
||||
if(user && user.client)
|
||||
@@ -92,5 +91,5 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
|
||||
/client/proc/deadmin()
|
||||
if(holder)
|
||||
holder.disassociate()
|
||||
//del(holder)
|
||||
//qdel(holder)
|
||||
return 1
|
||||
|
||||
+167
-167
@@ -1,167 +1,167 @@
|
||||
//This stuff was originally intended to be integrated into the ban-system I was working on
|
||||
//but it's safe to say that'll never be finished. So I've merged it into the current player panel.
|
||||
//enjoy ~Carn
|
||||
/*
|
||||
#define NOTESFILE "data/player_notes.sav" //where the player notes are saved
|
||||
|
||||
datum/admins/proc/notes_show(var/ckey)
|
||||
usr << browse("<head><title>Player Notes</title></head><body>[notes_gethtml(ckey)]</body>","window=player_notes;size=700x400")
|
||||
|
||||
|
||||
datum/admins/proc/notes_gethtml(var/ckey)
|
||||
var/savefile/notesfile = new(NOTESFILE)
|
||||
if(!notesfile) return "<font color='red'>Error: Cannot access [NOTESFILE]</font>"
|
||||
if(ckey)
|
||||
. = "<b>Notes for <a href='?src=\ref[src];notes=show'>[ckey]</a>:</b> <a href='?src=\ref[src];notes=add;ckey=[ckey]'>\[+\]</a> <a href='?src=\ref[src];notes=remove;ckey=[ckey]'>\[-\]</a><br>"
|
||||
notesfile.cd = "/[ckey]"
|
||||
var/index = 1
|
||||
while( !notesfile.eof )
|
||||
var/note
|
||||
notesfile >> note
|
||||
. += "[note] <a href='?src=\ref[src];notes=remove;ckey=[ckey];from=[index]'>\[-\]</a><br>"
|
||||
index++
|
||||
else
|
||||
. = "<b>All Notes:</b> <a href='?src=\ref[src];notes=add'>\[+\]</a> <a href='?src=\ref[src];notes=remove'>\[-\]</a><br>"
|
||||
notesfile.cd = "/"
|
||||
for(var/dir in notesfile.dir)
|
||||
. += "<a href='?src=\ref[src];notes=show;ckey=[dir]'>[dir]</a><br>"
|
||||
return
|
||||
|
||||
|
||||
//handles adding notes to the end of a ckey's buffer
|
||||
//originally had seperate entries such as var/by to record who left the note and when
|
||||
//but the current bansystem is a heap of dung.
|
||||
/proc/notes_add(var/ckey, var/note)
|
||||
if(!ckey)
|
||||
ckey = ckey(input(usr,"Who would you like to add notes for?","Enter a ckey",null) as text|null)
|
||||
if(!ckey) return
|
||||
|
||||
if(!note)
|
||||
note = html_encode(input(usr,"Enter your note:","Enter some text",null) as message|null)
|
||||
if(!note) return
|
||||
|
||||
var/savefile/notesfile = new(NOTESFILE)
|
||||
if(!notesfile) return
|
||||
notesfile.cd = "/[ckey]"
|
||||
notesfile.eof = 1 //move to the end of the buffer
|
||||
notesfile << "[time2text(world.realtime,"DD-MMM-YYYY")] | [note][(usr && usr.ckey)?" ~[usr.ckey]":""]"
|
||||
return
|
||||
|
||||
//handles removing entries from the buffer, or removing the entire directory if no start_index is given
|
||||
/proc/notes_remove(var/ckey, var/start_index, var/end_index)
|
||||
var/savefile/notesfile = new(NOTESFILE)
|
||||
if(!notesfile) return
|
||||
|
||||
if(!ckey)
|
||||
notesfile.cd = "/"
|
||||
ckey = ckey(input(usr,"Who would you like to remove notes for?","Enter a ckey",null) as null|anything in notesfile.dir)
|
||||
if(!ckey) return
|
||||
|
||||
if(start_index)
|
||||
notesfile.cd = "/[ckey]"
|
||||
var/list/noteslist = list()
|
||||
if(!end_index) end_index = start_index
|
||||
var/index = 0
|
||||
while( !notesfile.eof )
|
||||
index++
|
||||
var/temp
|
||||
notesfile >> temp
|
||||
if( (start_index <= index) && (index <= end_index) )
|
||||
continue
|
||||
noteslist += temp
|
||||
|
||||
notesfile.eof = -2 //Move to the start of the buffer and then erase.
|
||||
|
||||
for( var/note in noteslist )
|
||||
notesfile << note
|
||||
else
|
||||
notesfile.cd = "/"
|
||||
if(alert(usr,"Are you sure you want to remove all their notes?","Confirmation","No","Yes - Remove all notes") == "Yes - Remove all notes")
|
||||
notesfile.dir.Remove(ckey)
|
||||
return
|
||||
|
||||
#undef NOTESFILE
|
||||
*/
|
||||
|
||||
//Hijacking this file for BS12 playernotes functions. I like this ^ one systemm alright, but converting sounds too bothersome~ Chinsky.
|
||||
|
||||
/proc/notes_add(var/key, var/note, var/mob/usr)
|
||||
if (!key || !note)
|
||||
return
|
||||
|
||||
//Loading list of notes for this key
|
||||
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
|
||||
var/list/infos
|
||||
info >> infos
|
||||
if(!infos) infos = list()
|
||||
|
||||
//Overly complex timestamp creation
|
||||
var/modifyer = "th"
|
||||
switch(time2text(world.timeofday, "DD"))
|
||||
if("01","21","31")
|
||||
modifyer = "st"
|
||||
if("02","22",)
|
||||
modifyer = "nd"
|
||||
if("03","23")
|
||||
modifyer = "rd"
|
||||
var/day_string = "[time2text(world.timeofday, "DD")][modifyer]"
|
||||
if(copytext(day_string,1,2) == "0")
|
||||
day_string = copytext(day_string,2)
|
||||
var/full_date = time2text(world.timeofday, "DDD, Month DD of YYYY")
|
||||
var/day_loc = findtext(full_date, time2text(world.timeofday, "DD"))
|
||||
|
||||
var/datum/player_info/P = new
|
||||
if (usr)
|
||||
P.author = usr.key
|
||||
P.rank = usr.client.holder.rank
|
||||
else
|
||||
P.author = "Adminbot"
|
||||
P.rank = "Friendly Robot"
|
||||
P.content = note
|
||||
P.timestamp = "[copytext(full_date,1,day_loc)][day_string][copytext(full_date,day_loc+2)]"
|
||||
|
||||
infos += P
|
||||
info << infos
|
||||
|
||||
message_admins("\blue [key_name_admin(usr)] has edited [key]'s notes.")
|
||||
log_admin("[key_name(usr)] has edited [key]'s notes.")
|
||||
|
||||
del info
|
||||
|
||||
//Updating list of keys with notes on them
|
||||
var/savefile/note_list = new("data/player_notes.sav")
|
||||
var/list/note_keys
|
||||
note_list >> note_keys
|
||||
if(!note_keys) note_keys = list()
|
||||
if(!note_keys.Find(key)) note_keys += key
|
||||
note_list << note_keys
|
||||
del note_list
|
||||
|
||||
|
||||
/proc/notes_del(var/key, var/index)
|
||||
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
|
||||
var/list/infos
|
||||
info >> infos
|
||||
if(!infos || infos.len < index) return
|
||||
|
||||
var/datum/player_info/item = infos[index]
|
||||
infos.Remove(item)
|
||||
info << infos
|
||||
|
||||
message_admins("\blue [key_name_admin(usr)] deleted one of [key]'s notes.")
|
||||
log_admin("[key_name(usr)] deleted one of [key]'s notes.")
|
||||
|
||||
del info
|
||||
|
||||
/proc/show_player_info_irc(var/key as text)
|
||||
var/dat = " Info on [key]%0D%0A"
|
||||
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
|
||||
var/list/infos
|
||||
info >> infos
|
||||
if(!infos)
|
||||
dat = "No information found on the given key."
|
||||
else
|
||||
for(var/datum/player_info/I in infos)
|
||||
dat += "[I.content]%0D%0Aby [I.author] ([I.rank]) on [I.timestamp]%0D%0A%0D%0A"
|
||||
|
||||
return dat
|
||||
//This stuff was originally intended to be integrated into the ban-system I was working on
|
||||
//but it's safe to say that'll never be finished. So I've merged it into the current player panel.
|
||||
//enjoy ~Carn
|
||||
/*
|
||||
#define NOTESFILE "data/player_notes.sav" //where the player notes are saved
|
||||
|
||||
datum/admins/proc/notes_show(var/ckey)
|
||||
usr << browse("<head><title>Player Notes</title></head><body>[notes_gethtml(ckey)]</body>","window=player_notes;size=700x400")
|
||||
|
||||
|
||||
datum/admins/proc/notes_gethtml(var/ckey)
|
||||
var/savefile/notesfile = new(NOTESFILE)
|
||||
if(!notesfile) return "<font color='red'>Error: Cannot access [NOTESFILE]</font>"
|
||||
if(ckey)
|
||||
. = "<b>Notes for <a href='?src=\ref[src];notes=show'>[ckey]</a>:</b> <a href='?src=\ref[src];notes=add;ckey=[ckey]'>\[+\]</a> <a href='?src=\ref[src];notes=remove;ckey=[ckey]'>\[-\]</a><br>"
|
||||
notesfile.cd = "/[ckey]"
|
||||
var/index = 1
|
||||
while( !notesfile.eof )
|
||||
var/note
|
||||
notesfile >> note
|
||||
. += "[note] <a href='?src=\ref[src];notes=remove;ckey=[ckey];from=[index]'>\[-\]</a><br>"
|
||||
index++
|
||||
else
|
||||
. = "<b>All Notes:</b> <a href='?src=\ref[src];notes=add'>\[+\]</a> <a href='?src=\ref[src];notes=remove'>\[-\]</a><br>"
|
||||
notesfile.cd = "/"
|
||||
for(var/dir in notesfile.dir)
|
||||
. += "<a href='?src=\ref[src];notes=show;ckey=[dir]'>[dir]</a><br>"
|
||||
return
|
||||
|
||||
|
||||
//handles adding notes to the end of a ckey's buffer
|
||||
//originally had seperate entries such as var/by to record who left the note and when
|
||||
//but the current bansystem is a heap of dung.
|
||||
/proc/notes_add(var/ckey, var/note)
|
||||
if(!ckey)
|
||||
ckey = ckey(input(usr,"Who would you like to add notes for?","Enter a ckey",null) as text|null)
|
||||
if(!ckey) return
|
||||
|
||||
if(!note)
|
||||
note = html_encode(input(usr,"Enter your note:","Enter some text",null) as message|null)
|
||||
if(!note) return
|
||||
|
||||
var/savefile/notesfile = new(NOTESFILE)
|
||||
if(!notesfile) return
|
||||
notesfile.cd = "/[ckey]"
|
||||
notesfile.eof = 1 //move to the end of the buffer
|
||||
notesfile << "[time2text(world.realtime,"DD-MMM-YYYY")] | [note][(usr && usr.ckey)?" ~[usr.ckey]":""]"
|
||||
return
|
||||
|
||||
//handles removing entries from the buffer, or removing the entire directory if no start_index is given
|
||||
/proc/notes_remove(var/ckey, var/start_index, var/end_index)
|
||||
var/savefile/notesfile = new(NOTESFILE)
|
||||
if(!notesfile) return
|
||||
|
||||
if(!ckey)
|
||||
notesfile.cd = "/"
|
||||
ckey = ckey(input(usr,"Who would you like to remove notes for?","Enter a ckey",null) as null|anything in notesfile.dir)
|
||||
if(!ckey) return
|
||||
|
||||
if(start_index)
|
||||
notesfile.cd = "/[ckey]"
|
||||
var/list/noteslist = list()
|
||||
if(!end_index) end_index = start_index
|
||||
var/index = 0
|
||||
while( !notesfile.eof )
|
||||
index++
|
||||
var/temp
|
||||
notesfile >> temp
|
||||
if( (start_index <= index) && (index <= end_index) )
|
||||
continue
|
||||
noteslist += temp
|
||||
|
||||
notesfile.eof = -2 //Move to the start of the buffer and then erase.
|
||||
|
||||
for( var/note in noteslist )
|
||||
notesfile << note
|
||||
else
|
||||
notesfile.cd = "/"
|
||||
if(alert(usr,"Are you sure you want to remove all their notes?","Confirmation","No","Yes - Remove all notes") == "Yes - Remove all notes")
|
||||
notesfile.dir.Remove(ckey)
|
||||
return
|
||||
|
||||
#undef NOTESFILE
|
||||
*/
|
||||
|
||||
//Hijacking this file for BS12 playernotes functions. I like this ^ one systemm alright, but converting sounds too bothersome~ Chinsky.
|
||||
|
||||
/proc/notes_add(var/key, var/note, var/mob/usr)
|
||||
if (!key || !note)
|
||||
return
|
||||
|
||||
//Loading list of notes for this key
|
||||
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
|
||||
var/list/infos
|
||||
info >> infos
|
||||
if(!infos) infos = list()
|
||||
|
||||
//Overly complex timestamp creation
|
||||
var/modifyer = "th"
|
||||
switch(time2text(world.timeofday, "DD"))
|
||||
if("01","21","31")
|
||||
modifyer = "st"
|
||||
if("02","22",)
|
||||
modifyer = "nd"
|
||||
if("03","23")
|
||||
modifyer = "rd"
|
||||
var/day_string = "[time2text(world.timeofday, "DD")][modifyer]"
|
||||
if(copytext(day_string,1,2) == "0")
|
||||
day_string = copytext(day_string,2)
|
||||
var/full_date = time2text(world.timeofday, "DDD, Month DD of YYYY")
|
||||
var/day_loc = findtext(full_date, time2text(world.timeofday, "DD"))
|
||||
|
||||
var/datum/player_info/P = new
|
||||
if (usr)
|
||||
P.author = usr.key
|
||||
P.rank = usr.client.holder.rank
|
||||
else
|
||||
P.author = "Adminbot"
|
||||
P.rank = "Friendly Robot"
|
||||
P.content = note
|
||||
P.timestamp = "[copytext(full_date,1,day_loc)][day_string][copytext(full_date,day_loc+2)]"
|
||||
|
||||
infos += P
|
||||
info << infos
|
||||
|
||||
message_admins("\blue [key_name_admin(usr)] has edited [key]'s notes.")
|
||||
log_admin("[key_name(usr)] has edited [key]'s notes.")
|
||||
|
||||
qdel(info)
|
||||
|
||||
//Updating list of keys with notes on them
|
||||
var/savefile/note_list = new("data/player_notes.sav")
|
||||
var/list/note_keys
|
||||
note_list >> note_keys
|
||||
if(!note_keys) note_keys = list()
|
||||
if(!note_keys.Find(key)) note_keys += key
|
||||
note_list << note_keys
|
||||
qdel(note_list)
|
||||
|
||||
|
||||
/proc/notes_del(var/key, var/index)
|
||||
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
|
||||
var/list/infos
|
||||
info >> infos
|
||||
if(!infos || infos.len < index) return
|
||||
|
||||
var/datum/player_info/item = infos[index]
|
||||
infos.Remove(item)
|
||||
info << infos
|
||||
|
||||
message_admins("\blue [key_name_admin(usr)] deleted one of [key]'s notes.")
|
||||
log_admin("[key_name(usr)] deleted one of [key]'s notes.")
|
||||
|
||||
qdel(info)
|
||||
|
||||
/proc/show_player_info_irc(var/key as text)
|
||||
var/dat = " Info on [key]%0D%0A"
|
||||
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
|
||||
var/list/infos
|
||||
info >> infos
|
||||
if(!infos)
|
||||
dat = "No information found on the given key."
|
||||
else
|
||||
for(var/datum/player_info/I in infos)
|
||||
dat += "[I.content]%0D%0Aby [I.author] ([I.rank]) on [I.timestamp]%0D%0A%0D%0A"
|
||||
|
||||
return dat
|
||||
|
||||
+15
-15
@@ -745,7 +745,7 @@
|
||||
log_admin("[key_name(usr)] booted [key_name(M)].")
|
||||
message_admins("\blue [key_name_admin(usr)] booted [key_name_admin(M)].", 1)
|
||||
//M.client = null
|
||||
del(M.client)
|
||||
qdel(M.client)
|
||||
/*
|
||||
//Player Notes
|
||||
else if(href_list["notes"])
|
||||
@@ -811,8 +811,8 @@
|
||||
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
||||
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
||||
|
||||
del(M.client)
|
||||
//del(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
|
||||
qdel(M.client)
|
||||
//qdel(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
|
||||
if("No")
|
||||
if(!check_rights(R_BAN)) return
|
||||
var/reason = sanitize(input(usr,"Reason?","reason","Griefer") as text|null)
|
||||
@@ -836,8 +836,8 @@
|
||||
feedback_inc("ban_perma",1)
|
||||
DB_ban_record(BANTYPE_PERMA, M, -1, reason)
|
||||
|
||||
del(M.client)
|
||||
//del(M)
|
||||
qdel(M.client)
|
||||
//qdel(M)
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
@@ -1301,7 +1301,7 @@
|
||||
S.victim = M
|
||||
S.loc = M.loc
|
||||
spawn(20)
|
||||
del(S)
|
||||
qdel(S)
|
||||
|
||||
var/turf/simulated/floor/T = get_turf(M)
|
||||
if(istype(T))
|
||||
@@ -1323,7 +1323,7 @@
|
||||
return
|
||||
|
||||
if(L.can_centcom_reply())
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(L)] via their headset.","Outgoing message from Centcomm", "")
|
||||
var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(L)] via their headset.","Outgoing message from Centcomm", ""))
|
||||
if(!input) return
|
||||
|
||||
src.owner << "You sent [input] to [L] via a secure channel."
|
||||
@@ -1424,7 +1424,7 @@
|
||||
src.owner << "\red Message reply failed."
|
||||
|
||||
spawn(100)
|
||||
del(P)
|
||||
qdel(P)
|
||||
return
|
||||
|
||||
else if(href_list["SolGovFaxReply"])
|
||||
@@ -1669,28 +1669,28 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SC")
|
||||
for(var/obj/item/clothing/under/O in world)
|
||||
del(O)
|
||||
qdel(O)
|
||||
ok = 1
|
||||
if("sec_all_clothes")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SAC")
|
||||
for(var/obj/item/clothing/O in world)
|
||||
del(O)
|
||||
qdel(O)
|
||||
ok = 1
|
||||
if("sec_classic1")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SC1")
|
||||
for(var/obj/item/clothing/suit/fire/O in world)
|
||||
del(O)
|
||||
qdel(O)
|
||||
for(var/obj/structure/grille/O in world)
|
||||
del(O)
|
||||
qdel(O)
|
||||
/* for(var/obj/machinery/vehicle/pod/O in world)
|
||||
for(var/mob/M in src)
|
||||
M.loc = src.loc
|
||||
if (M.client)
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
M.client.eye = M
|
||||
del(O)
|
||||
qdel(O)
|
||||
ok = 1*/
|
||||
if("monkey")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
@@ -2044,7 +2044,7 @@
|
||||
var/turf/T = pick(blobstart)
|
||||
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
|
||||
spawn(rand(100, 600))
|
||||
del(bh)
|
||||
qdel(bh)
|
||||
|
||||
if("timeanomalies") //dear god this code was awful :P Still needs further optimisation
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
@@ -2273,7 +2273,7 @@
|
||||
feedback_add_details("admin_secrets_fun_used","NS")
|
||||
var/choice = input("You sure you want to end the round and summon narsie at your location? Misuse of this could result in removal of flags or halarity.") in list("PRAISE SATAN", "Cancel")
|
||||
if(choice == "PRAISE SATAN")
|
||||
new /obj/machinery/singularity/narsie/large(get_turf(usr))
|
||||
new /obj/singularity/narsie/large(get_turf(usr))
|
||||
message_admins("[key_name_admin(usr)] has summoned narsie and brought about a new realm of suffering.")
|
||||
if("supermattercascade")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// if(!istates.Find(O.item_state))
|
||||
// text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.item_state]\" IN \"[O.icon]\"\n"
|
||||
//text+="\n"
|
||||
del(O)
|
||||
qdel(O)
|
||||
if(text)
|
||||
var/F = file("broken_icons.txt")
|
||||
fdel(F)
|
||||
|
||||
+497
-497
@@ -1,497 +1,497 @@
|
||||
|
||||
//Structured Datum Query Language. Basically SQL meets BYOND objects.
|
||||
|
||||
//Note: For use in BS12, need text_starts_with proc, and to modify the action on select to use BS12's object edit command(s).
|
||||
|
||||
/client/proc/SDQL_query(query_text as message)
|
||||
set category = "Admin"
|
||||
if(!check_rights(R_DEBUG)) //Shouldn't happen... but just to be safe.
|
||||
message_admins("\red ERROR: Non-admin [usr.key] attempted to execute a SDQL query!")
|
||||
log_admin("Non-admin [usr.key] attempted to execute a SDQL query!")
|
||||
|
||||
var/list/query_list = SDQL_tokenize(query_text)
|
||||
|
||||
if(query_list.len < 2)
|
||||
if(query_list.len > 0)
|
||||
usr << "\red SDQL: Too few discrete tokens in query \"[query_text]\". Please check your syntax and try again."
|
||||
return
|
||||
|
||||
if(!(lowertext(query_list[1]) in list("select", "delete", "update")))
|
||||
usr << "\red SDQL: Unknown query type: \"[query_list[1]]\" in query \"[query_text]\". Please check your syntax and try again."
|
||||
return
|
||||
|
||||
var/list/types = list()
|
||||
|
||||
var/i
|
||||
for(i = 2; i <= query_list.len; i += 2)
|
||||
types += query_list[i]
|
||||
|
||||
if(i + 1 >= query_list.len || query_list[i + 1] != ",")
|
||||
break
|
||||
|
||||
i++
|
||||
|
||||
var/list/from = list()
|
||||
|
||||
if(i <= query_list.len)
|
||||
if(lowertext(query_list[i]) in list("from", "in"))
|
||||
for(i++; i <= query_list.len; i += 2)
|
||||
from += query_list[i]
|
||||
|
||||
if(i + 1 >= query_list.len || query_list[i + 1] != ",")
|
||||
break
|
||||
|
||||
i++
|
||||
|
||||
if(from.len < 1)
|
||||
from += "world"
|
||||
|
||||
var/list/set_vars = list()
|
||||
|
||||
if(lowertext(query_list[1]) == "update")
|
||||
if(i <= query_list.len && lowertext(query_list[i]) == "set")
|
||||
for(i++; i <= query_list.len; i++)
|
||||
if(i + 2 <= query_list.len && query_list[i + 1] == "=")
|
||||
set_vars += query_list[i]
|
||||
set_vars[query_list[i]] = query_list[i + 2]
|
||||
|
||||
else
|
||||
usr << "\red SDQL: Invalid set parameter in query \"[query_text]\". Please check your syntax and try again."
|
||||
return
|
||||
|
||||
i += 3
|
||||
|
||||
if(i >= query_list.len || query_list[i] != ",")
|
||||
break
|
||||
|
||||
if(set_vars.len < 1)
|
||||
usr << "\red SDQL: Invalid or missing set in query \"[query_text]\". Please check your syntax and try again."
|
||||
return
|
||||
|
||||
var/list/where = list()
|
||||
|
||||
if(i <= query_list.len && lowertext(query_list[i]) == "where")
|
||||
where = query_list.Copy(i + 1)
|
||||
|
||||
var/list/from_objs = list()
|
||||
if("world" in from)
|
||||
from_objs += world
|
||||
else
|
||||
for(var/f in from)
|
||||
if(copytext(f, 1, 2) == "'" || copytext(f, 1, 2) == "\"")
|
||||
from_objs += locate(copytext(f, 2, length(f)))
|
||||
else if(copytext(f, 1, 2) != "/")
|
||||
from_objs += locate(f)
|
||||
else
|
||||
var/f2 = text2path(f)
|
||||
if(text_starts_with(f, "/mob"))
|
||||
for(var/mob/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf/space"))
|
||||
for(var/turf/space/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf/simulated"))
|
||||
for(var/turf/simulated/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf/unsimulated"))
|
||||
for(var/turf/unsimulated/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf"))
|
||||
for(var/turf/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/area"))
|
||||
for(var/area/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/obj/item"))
|
||||
for(var/obj/item/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/obj/machinery"))
|
||||
for(var/obj/machinery/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/obj"))
|
||||
for(var/obj/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/atom"))
|
||||
for(var/atom/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
/*
|
||||
else
|
||||
for(var/datum/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
*/
|
||||
|
||||
var/list/objs = list()
|
||||
|
||||
for(var/from_obj in from_objs)
|
||||
if("*" in types)
|
||||
objs += from_obj:contents
|
||||
else
|
||||
for(var/f in types)
|
||||
if(copytext(f, 1, 2) == "'" || copytext(f, 1, 2) == "\"")
|
||||
objs += locate(copytext(f, 2, length(f))) in from_obj
|
||||
else if(copytext(f, 1, 2) != "/")
|
||||
objs += locate(f) in from_obj
|
||||
else
|
||||
var/f2 = text2path(f)
|
||||
if(text_starts_with(f, "/mob"))
|
||||
for(var/mob/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf/space"))
|
||||
for(var/turf/space/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf/simulated"))
|
||||
for(var/turf/simulated/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf/unsimulated"))
|
||||
for(var/turf/unsimulated/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf"))
|
||||
for(var/turf/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/area"))
|
||||
for(var/area/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/obj/item"))
|
||||
for(var/obj/item/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/obj/machinery"))
|
||||
for(var/obj/machinery/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/obj"))
|
||||
for(var/obj/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/atom"))
|
||||
for(var/atom/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else
|
||||
for(var/datum/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
|
||||
for(var/datum/t in objs)
|
||||
var/currently_false = 0
|
||||
for(i = 1, i - 1 < where.len, i++)
|
||||
var/v = where[i++]
|
||||
var/compare_op = where[i++]
|
||||
if(!(compare_op in list("==", "=", "<>", "<", ">", "<=", ">=", "!=")))
|
||||
usr << "\red SDQL: Unknown comparison operator [compare_op] in where clause following [v] in query \"[query_text]\". Please check your syntax and try again."
|
||||
return
|
||||
|
||||
var/j
|
||||
for(j = i, j <= where.len, j++)
|
||||
if(lowertext(where[j]) in list("and", "or", ";"))
|
||||
break
|
||||
|
||||
if(!currently_false)
|
||||
var/value = SDQL_text2value(t, v)
|
||||
var/result = SDQL_evaluate(t, where.Copy(i, j))
|
||||
|
||||
switch(compare_op)
|
||||
if("=", "==")
|
||||
currently_false = !(value == result)
|
||||
|
||||
if("!=", "<>")
|
||||
currently_false = !(value != result)
|
||||
|
||||
if("<")
|
||||
currently_false = !(value < result)
|
||||
|
||||
if(">")
|
||||
currently_false = !(value > result)
|
||||
|
||||
if("<=")
|
||||
currently_false = !(value <= result)
|
||||
|
||||
if(">=")
|
||||
currently_false = !(value >= result)
|
||||
|
||||
|
||||
if(j > where.len || lowertext(where[j]) == ";")
|
||||
break
|
||||
else if(lowertext(where[j]) == "or")
|
||||
if(currently_false)
|
||||
currently_false = 0
|
||||
else
|
||||
break
|
||||
|
||||
i = j
|
||||
|
||||
if(currently_false)
|
||||
objs -= t
|
||||
|
||||
|
||||
|
||||
usr << "\blue SQDL Query: [query_text]"
|
||||
message_admins("[usr] executed SDQL query: \"[query_text]\".")
|
||||
/*
|
||||
for(var/t in types)
|
||||
usr << "Type: [t]"
|
||||
|
||||
for(var/t in from)
|
||||
usr << "From: [t]"
|
||||
|
||||
for(var/t in set_vars)
|
||||
usr << "Set: [t] = [set_vars[t]]"
|
||||
|
||||
if(where.len)
|
||||
var/where_str = ""
|
||||
for(var/t in where)
|
||||
where_str += "[t] "
|
||||
|
||||
usr << "Where: [where_str]"
|
||||
|
||||
usr << "From objects:"
|
||||
for(var/datum/t in from_objs)
|
||||
usr << t
|
||||
|
||||
usr << "Objects:"
|
||||
for(var/datum/t in objs)
|
||||
usr << t
|
||||
*/
|
||||
switch(lowertext(query_list[1]))
|
||||
if("delete")
|
||||
for(var/datum/t in objs)
|
||||
del t
|
||||
|
||||
if("update")
|
||||
for(var/datum/t in objs)
|
||||
objs[t] = list()
|
||||
for(var/v in set_vars)
|
||||
if(v in t.vars)
|
||||
objs[t][v] = SDQL_text2value(t, set_vars[v])
|
||||
|
||||
for(var/datum/t in objs)
|
||||
for(var/v in objs[t])
|
||||
t.vars[v] = objs[t][v]
|
||||
|
||||
if("select")
|
||||
var/text = ""
|
||||
for(var/datum/t in objs)
|
||||
if(istype(t, /atom))
|
||||
var/atom/a = t
|
||||
|
||||
if(a.x)
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t] at ([a.x], [a.y], [a.z])<br>"
|
||||
|
||||
else if(a.loc && a.loc.x)
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t] in [a.loc] at ([a.loc.x], [a.loc.y], [a.loc.z])<br>"
|
||||
|
||||
else
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t]<br>"
|
||||
|
||||
else
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t]<br>"
|
||||
|
||||
//text += "[t]<br>"
|
||||
usr << browse(text, "window=sdql_result")
|
||||
|
||||
|
||||
/client/Topic(href,href_list[],hsrc)
|
||||
if(href_list["SDQL_select"])
|
||||
debug_variables(locate(href_list["SDQL_select"]))
|
||||
|
||||
..()
|
||||
|
||||
|
||||
/proc/SDQL_evaluate(datum/object, list/equation)
|
||||
if(equation.len == 0)
|
||||
return null
|
||||
|
||||
else if(equation.len == 1)
|
||||
return SDQL_text2value(object, equation[1])
|
||||
|
||||
else if(equation[1] == "!")
|
||||
return !SDQL_evaluate(object, equation.Copy(2))
|
||||
|
||||
else if(equation[1] == "-")
|
||||
return -SDQL_evaluate(object, equation.Copy(2))
|
||||
|
||||
|
||||
else
|
||||
usr << "\red SDQL: Sorry, equations not yet supported :("
|
||||
return null
|
||||
|
||||
|
||||
/proc/SDQL_text2value(datum/object, text)
|
||||
if(text2num(text) != null)
|
||||
return text2num(text)
|
||||
else if(text == "null")
|
||||
return null
|
||||
else if(copytext(text, 1, 2) == "'" || copytext(text, 1, 2) == "\"" )
|
||||
return copytext(text, 2, length(text))
|
||||
else if(copytext(text, 1, 2) == "/")
|
||||
return text2path(text)
|
||||
else
|
||||
if(findtext(text, "."))
|
||||
var/split = findtext(text, ".")
|
||||
var/v = copytext(text, 1, split)
|
||||
|
||||
if((v in object.vars) && istype(object.vars[v], /datum))
|
||||
return SDQL_text2value(object.vars[v], copytext(text, split + 1))
|
||||
else
|
||||
return null
|
||||
|
||||
else
|
||||
if(text in object.vars)
|
||||
return object.vars[text]
|
||||
else
|
||||
return null
|
||||
|
||||
|
||||
/proc/text_starts_with(text, start)
|
||||
if(copytext(text, 1, length(start) + 1) == start)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/proc/SDQL_tokenize(query_text)
|
||||
|
||||
var/list/whitespace = list(" ", "\n", "\t")
|
||||
var/list/single = list("(", ")", ",", "+", "-")
|
||||
var/list/multi = list(
|
||||
"=" = list("", "="),
|
||||
"<" = list("", "=", ">"),
|
||||
">" = list("", "="),
|
||||
"!" = list("", "="))
|
||||
|
||||
var/word = ""
|
||||
var/list/query_list = list()
|
||||
var/len = length(query_text)
|
||||
|
||||
for(var/i = 1, i <= len, i++)
|
||||
var/char = copytext(query_text, i, i + 1)
|
||||
|
||||
if(char in whitespace)
|
||||
if(word != "")
|
||||
query_list += word
|
||||
word = ""
|
||||
|
||||
else if(char in single)
|
||||
if(word != "")
|
||||
query_list += word
|
||||
word = ""
|
||||
|
||||
query_list += char
|
||||
|
||||
else if(char in multi)
|
||||
if(word != "")
|
||||
query_list += word
|
||||
word = ""
|
||||
|
||||
var/char2 = copytext(query_text, i + 1, i + 2)
|
||||
|
||||
if(char2 in multi[char])
|
||||
query_list += "[char][char2]"
|
||||
i++
|
||||
|
||||
else
|
||||
query_list += char
|
||||
|
||||
else if(char == "'")
|
||||
if(word != "")
|
||||
usr << "\red SDQL: You have an error in your SDQL syntax, unexpected ' in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
word = "'"
|
||||
|
||||
for(i++, i <= len, i++)
|
||||
char = copytext(query_text, i, i + 1)
|
||||
|
||||
if(char == "'")
|
||||
if(copytext(query_text, i + 1, i + 2) == "'")
|
||||
word += "'"
|
||||
i++
|
||||
|
||||
else
|
||||
break
|
||||
|
||||
else
|
||||
word += char
|
||||
|
||||
if(i > len)
|
||||
usr << "\red SDQL: You have an error in your SDQL syntax, unmatched ' in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
query_list += "[word]'"
|
||||
word = ""
|
||||
|
||||
else if(char == "\"")
|
||||
if(word != "")
|
||||
usr << "\red SDQL: You have an error in your SDQL syntax, unexpected \" in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
word = "\""
|
||||
|
||||
for(i++, i <= len, i++)
|
||||
char = copytext(query_text, i, i + 1)
|
||||
|
||||
if(char == "\"")
|
||||
if(copytext(query_text, i + 1, i + 2) == "'")
|
||||
word += "\""
|
||||
i++
|
||||
|
||||
else
|
||||
break
|
||||
|
||||
else
|
||||
word += char
|
||||
|
||||
if(i > len)
|
||||
usr << "\red SDQL: You have an error in your SDQL syntax, unmatched \" in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
query_list += "[word]\""
|
||||
word = ""
|
||||
|
||||
else
|
||||
word += char
|
||||
|
||||
if(word != "")
|
||||
query_list += word
|
||||
|
||||
return query_list
|
||||
|
||||
//Structured Datum Query Language. Basically SQL meets BYOND objects.
|
||||
|
||||
//Note: For use in BS12, need text_starts_with proc, and to modify the action on select to use BS12's object edit command(s).
|
||||
|
||||
/client/proc/SDQL_query(query_text as message)
|
||||
set category = "Admin"
|
||||
if(!check_rights(R_DEBUG)) //Shouldn't happen... but just to be safe.
|
||||
message_admins("\red ERROR: Non-admin [usr.key] attempted to execute a SDQL query!")
|
||||
log_admin("Non-admin [usr.key] attempted to execute a SDQL query!")
|
||||
|
||||
var/list/query_list = SDQL_tokenize(query_text)
|
||||
|
||||
if(query_list.len < 2)
|
||||
if(query_list.len > 0)
|
||||
usr << "\red SDQL: Too few discrete tokens in query \"[query_text]\". Please check your syntax and try again."
|
||||
return
|
||||
|
||||
if(!(lowertext(query_list[1]) in list("select", "delete", "update")))
|
||||
usr << "\red SDQL: Unknown query type: \"[query_list[1]]\" in query \"[query_text]\". Please check your syntax and try again."
|
||||
return
|
||||
|
||||
var/list/types = list()
|
||||
|
||||
var/i
|
||||
for(i = 2; i <= query_list.len; i += 2)
|
||||
types += query_list[i]
|
||||
|
||||
if(i + 1 >= query_list.len || query_list[i + 1] != ",")
|
||||
break
|
||||
|
||||
i++
|
||||
|
||||
var/list/from = list()
|
||||
|
||||
if(i <= query_list.len)
|
||||
if(lowertext(query_list[i]) in list("from", "in"))
|
||||
for(i++; i <= query_list.len; i += 2)
|
||||
from += query_list[i]
|
||||
|
||||
if(i + 1 >= query_list.len || query_list[i + 1] != ",")
|
||||
break
|
||||
|
||||
i++
|
||||
|
||||
if(from.len < 1)
|
||||
from += "world"
|
||||
|
||||
var/list/set_vars = list()
|
||||
|
||||
if(lowertext(query_list[1]) == "update")
|
||||
if(i <= query_list.len && lowertext(query_list[i]) == "set")
|
||||
for(i++; i <= query_list.len; i++)
|
||||
if(i + 2 <= query_list.len && query_list[i + 1] == "=")
|
||||
set_vars += query_list[i]
|
||||
set_vars[query_list[i]] = query_list[i + 2]
|
||||
|
||||
else
|
||||
usr << "\red SDQL: Invalid set parameter in query \"[query_text]\". Please check your syntax and try again."
|
||||
return
|
||||
|
||||
i += 3
|
||||
|
||||
if(i >= query_list.len || query_list[i] != ",")
|
||||
break
|
||||
|
||||
if(set_vars.len < 1)
|
||||
usr << "\red SDQL: Invalid or missing set in query \"[query_text]\". Please check your syntax and try again."
|
||||
return
|
||||
|
||||
var/list/where = list()
|
||||
|
||||
if(i <= query_list.len && lowertext(query_list[i]) == "where")
|
||||
where = query_list.Copy(i + 1)
|
||||
|
||||
var/list/from_objs = list()
|
||||
if("world" in from)
|
||||
from_objs += world
|
||||
else
|
||||
for(var/f in from)
|
||||
if(copytext(f, 1, 2) == "'" || copytext(f, 1, 2) == "\"")
|
||||
from_objs += locate(copytext(f, 2, length(f)))
|
||||
else if(copytext(f, 1, 2) != "/")
|
||||
from_objs += locate(f)
|
||||
else
|
||||
var/f2 = text2path(f)
|
||||
if(text_starts_with(f, "/mob"))
|
||||
for(var/mob/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf/space"))
|
||||
for(var/turf/space/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf/simulated"))
|
||||
for(var/turf/simulated/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf/unsimulated"))
|
||||
for(var/turf/unsimulated/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf"))
|
||||
for(var/turf/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/area"))
|
||||
for(var/area/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/obj/item"))
|
||||
for(var/obj/item/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/obj/machinery"))
|
||||
for(var/obj/machinery/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/obj"))
|
||||
for(var/obj/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
|
||||
else if(text_starts_with(f, "/atom"))
|
||||
for(var/atom/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
/*
|
||||
else
|
||||
for(var/datum/m in world)
|
||||
if(istype(m, f2))
|
||||
from_objs += m
|
||||
*/
|
||||
|
||||
var/list/objs = list()
|
||||
|
||||
for(var/from_obj in from_objs)
|
||||
if("*" in types)
|
||||
objs += from_obj:contents
|
||||
else
|
||||
for(var/f in types)
|
||||
if(copytext(f, 1, 2) == "'" || copytext(f, 1, 2) == "\"")
|
||||
objs += locate(copytext(f, 2, length(f))) in from_obj
|
||||
else if(copytext(f, 1, 2) != "/")
|
||||
objs += locate(f) in from_obj
|
||||
else
|
||||
var/f2 = text2path(f)
|
||||
if(text_starts_with(f, "/mob"))
|
||||
for(var/mob/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf/space"))
|
||||
for(var/turf/space/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf/simulated"))
|
||||
for(var/turf/simulated/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf/unsimulated"))
|
||||
for(var/turf/unsimulated/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/turf"))
|
||||
for(var/turf/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/area"))
|
||||
for(var/area/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/obj/item"))
|
||||
for(var/obj/item/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/obj/machinery"))
|
||||
for(var/obj/machinery/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/obj"))
|
||||
for(var/obj/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else if(text_starts_with(f, "/atom"))
|
||||
for(var/atom/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
else
|
||||
for(var/datum/m in from_obj)
|
||||
if(istype(m, f2))
|
||||
objs += m
|
||||
|
||||
|
||||
for(var/datum/t in objs)
|
||||
var/currently_false = 0
|
||||
for(i = 1, i - 1 < where.len, i++)
|
||||
var/v = where[i++]
|
||||
var/compare_op = where[i++]
|
||||
if(!(compare_op in list("==", "=", "<>", "<", ">", "<=", ">=", "!=")))
|
||||
usr << "\red SDQL: Unknown comparison operator [compare_op] in where clause following [v] in query \"[query_text]\". Please check your syntax and try again."
|
||||
return
|
||||
|
||||
var/j
|
||||
for(j = i, j <= where.len, j++)
|
||||
if(lowertext(where[j]) in list("and", "or", ";"))
|
||||
break
|
||||
|
||||
if(!currently_false)
|
||||
var/value = SDQL_text2value(t, v)
|
||||
var/result = SDQL_evaluate(t, where.Copy(i, j))
|
||||
|
||||
switch(compare_op)
|
||||
if("=", "==")
|
||||
currently_false = !(value == result)
|
||||
|
||||
if("!=", "<>")
|
||||
currently_false = !(value != result)
|
||||
|
||||
if("<")
|
||||
currently_false = !(value < result)
|
||||
|
||||
if(">")
|
||||
currently_false = !(value > result)
|
||||
|
||||
if("<=")
|
||||
currently_false = !(value <= result)
|
||||
|
||||
if(">=")
|
||||
currently_false = !(value >= result)
|
||||
|
||||
|
||||
if(j > where.len || lowertext(where[j]) == ";")
|
||||
break
|
||||
else if(lowertext(where[j]) == "or")
|
||||
if(currently_false)
|
||||
currently_false = 0
|
||||
else
|
||||
break
|
||||
|
||||
i = j
|
||||
|
||||
if(currently_false)
|
||||
objs -= t
|
||||
|
||||
|
||||
|
||||
usr << "\blue SQDL Query: [query_text]"
|
||||
message_admins("[usr] executed SDQL query: \"[query_text]\".")
|
||||
/*
|
||||
for(var/t in types)
|
||||
usr << "Type: [t]"
|
||||
|
||||
for(var/t in from)
|
||||
usr << "From: [t]"
|
||||
|
||||
for(var/t in set_vars)
|
||||
usr << "Set: [t] = [set_vars[t]]"
|
||||
|
||||
if(where.len)
|
||||
var/where_str = ""
|
||||
for(var/t in where)
|
||||
where_str += "[t] "
|
||||
|
||||
usr << "Where: [where_str]"
|
||||
|
||||
usr << "From objects:"
|
||||
for(var/datum/t in from_objs)
|
||||
usr << t
|
||||
|
||||
usr << "Objects:"
|
||||
for(var/datum/t in objs)
|
||||
usr << t
|
||||
*/
|
||||
switch(lowertext(query_list[1]))
|
||||
if("delete")
|
||||
for(var/datum/t in objs)
|
||||
qdel(t)
|
||||
|
||||
if("update")
|
||||
for(var/datum/t in objs)
|
||||
objs[t] = list()
|
||||
for(var/v in set_vars)
|
||||
if(v in t.vars)
|
||||
objs[t][v] = SDQL_text2value(t, set_vars[v])
|
||||
|
||||
for(var/datum/t in objs)
|
||||
for(var/v in objs[t])
|
||||
t.vars[v] = objs[t][v]
|
||||
|
||||
if("select")
|
||||
var/text = ""
|
||||
for(var/datum/t in objs)
|
||||
if(istype(t, /atom))
|
||||
var/atom/a = t
|
||||
|
||||
if(a.x)
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t] at ([a.x], [a.y], [a.z])<br>"
|
||||
|
||||
else if(a.loc && a.loc.x)
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t] in [a.loc] at ([a.loc.x], [a.loc.y], [a.loc.z])<br>"
|
||||
|
||||
else
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t]<br>"
|
||||
|
||||
else
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t]<br>"
|
||||
|
||||
//text += "[t]<br>"
|
||||
usr << browse(text, "window=sdql_result")
|
||||
|
||||
|
||||
/client/Topic(href,href_list[],hsrc)
|
||||
if(href_list["SDQL_select"])
|
||||
debug_variables(locate(href_list["SDQL_select"]))
|
||||
|
||||
..()
|
||||
|
||||
|
||||
/proc/SDQL_evaluate(datum/object, list/equation)
|
||||
if(equation.len == 0)
|
||||
return null
|
||||
|
||||
else if(equation.len == 1)
|
||||
return SDQL_text2value(object, equation[1])
|
||||
|
||||
else if(equation[1] == "!")
|
||||
return !SDQL_evaluate(object, equation.Copy(2))
|
||||
|
||||
else if(equation[1] == "-")
|
||||
return -SDQL_evaluate(object, equation.Copy(2))
|
||||
|
||||
|
||||
else
|
||||
usr << "\red SDQL: Sorry, equations not yet supported :("
|
||||
return null
|
||||
|
||||
|
||||
/proc/SDQL_text2value(datum/object, text)
|
||||
if(text2num(text) != null)
|
||||
return text2num(text)
|
||||
else if(text == "null")
|
||||
return null
|
||||
else if(copytext(text, 1, 2) == "'" || copytext(text, 1, 2) == "\"" )
|
||||
return copytext(text, 2, length(text))
|
||||
else if(copytext(text, 1, 2) == "/")
|
||||
return text2path(text)
|
||||
else
|
||||
if(findtext(text, "."))
|
||||
var/split = findtext(text, ".")
|
||||
var/v = copytext(text, 1, split)
|
||||
|
||||
if((v in object.vars) && istype(object.vars[v], /datum))
|
||||
return SDQL_text2value(object.vars[v], copytext(text, split + 1))
|
||||
else
|
||||
return null
|
||||
|
||||
else
|
||||
if(text in object.vars)
|
||||
return object.vars[text]
|
||||
else
|
||||
return null
|
||||
|
||||
|
||||
/proc/text_starts_with(text, start)
|
||||
if(copytext(text, 1, length(start) + 1) == start)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/proc/SDQL_tokenize(query_text)
|
||||
|
||||
var/list/whitespace = list(" ", "\n", "\t")
|
||||
var/list/single = list("(", ")", ",", "+", "-")
|
||||
var/list/multi = list(
|
||||
"=" = list("", "="),
|
||||
"<" = list("", "=", ">"),
|
||||
">" = list("", "="),
|
||||
"!" = list("", "="))
|
||||
|
||||
var/word = ""
|
||||
var/list/query_list = list()
|
||||
var/len = length(query_text)
|
||||
|
||||
for(var/i = 1, i <= len, i++)
|
||||
var/char = copytext(query_text, i, i + 1)
|
||||
|
||||
if(char in whitespace)
|
||||
if(word != "")
|
||||
query_list += word
|
||||
word = ""
|
||||
|
||||
else if(char in single)
|
||||
if(word != "")
|
||||
query_list += word
|
||||
word = ""
|
||||
|
||||
query_list += char
|
||||
|
||||
else if(char in multi)
|
||||
if(word != "")
|
||||
query_list += word
|
||||
word = ""
|
||||
|
||||
var/char2 = copytext(query_text, i + 1, i + 2)
|
||||
|
||||
if(char2 in multi[char])
|
||||
query_list += "[char][char2]"
|
||||
i++
|
||||
|
||||
else
|
||||
query_list += char
|
||||
|
||||
else if(char == "'")
|
||||
if(word != "")
|
||||
usr << "\red SDQL: You have an error in your SDQL syntax, unexpected ' in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
word = "'"
|
||||
|
||||
for(i++, i <= len, i++)
|
||||
char = copytext(query_text, i, i + 1)
|
||||
|
||||
if(char == "'")
|
||||
if(copytext(query_text, i + 1, i + 2) == "'")
|
||||
word += "'"
|
||||
i++
|
||||
|
||||
else
|
||||
break
|
||||
|
||||
else
|
||||
word += char
|
||||
|
||||
if(i > len)
|
||||
usr << "\red SDQL: You have an error in your SDQL syntax, unmatched ' in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
query_list += "[word]'"
|
||||
word = ""
|
||||
|
||||
else if(char == "\"")
|
||||
if(word != "")
|
||||
usr << "\red SDQL: You have an error in your SDQL syntax, unexpected \" in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
word = "\""
|
||||
|
||||
for(i++, i <= len, i++)
|
||||
char = copytext(query_text, i, i + 1)
|
||||
|
||||
if(char == "\"")
|
||||
if(copytext(query_text, i + 1, i + 2) == "'")
|
||||
word += "\""
|
||||
i++
|
||||
|
||||
else
|
||||
break
|
||||
|
||||
else
|
||||
word += char
|
||||
|
||||
if(i > len)
|
||||
usr << "\red SDQL: You have an error in your SDQL syntax, unmatched \" in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
query_list += "[word]\""
|
||||
word = ""
|
||||
|
||||
else
|
||||
word += char
|
||||
|
||||
if(word != "")
|
||||
query_list += word
|
||||
|
||||
return query_list
|
||||
|
||||
+426
-426
@@ -1,426 +1,426 @@
|
||||
|
||||
|
||||
/client/proc/SDQL2_query(query_text as message)
|
||||
set category = "Admin"
|
||||
if(!check_rights(R_DEBUG)) //Shouldn't happen... but just to be safe.
|
||||
message_admins("\red ERROR: Non-admin [usr.key] attempted to execute a SDQL query!")
|
||||
log_admin("Non-admin [usr.key] attempted to execute a SDQL query!")
|
||||
|
||||
if(!query_text || length(query_text) < 1)
|
||||
return
|
||||
|
||||
//world << query_text
|
||||
|
||||
var/list/query_list = SDQL2_tokenize(query_text)
|
||||
|
||||
if(!query_list || query_list.len < 1)
|
||||
return
|
||||
|
||||
var/list/query_tree = SDQL_parse(query_list)
|
||||
|
||||
if(query_tree.len < 1)
|
||||
return
|
||||
|
||||
var/list/from_objs = list()
|
||||
var/list/select_types = list()
|
||||
|
||||
switch(query_tree[1])
|
||||
if("explain")
|
||||
SDQL_testout(query_tree["explain"])
|
||||
return
|
||||
|
||||
if("call")
|
||||
if("on" in query_tree)
|
||||
select_types = query_tree["on"]
|
||||
else
|
||||
return
|
||||
|
||||
if("select", "delete", "update")
|
||||
select_types = query_tree[query_tree[1]]
|
||||
|
||||
from_objs = SDQL_from_objs(query_tree["from"])
|
||||
|
||||
var/list/objs = list()
|
||||
|
||||
for(var/type in select_types)
|
||||
var/char = copytext(type, 1, 2)
|
||||
|
||||
if(char == "/" || char == "*")
|
||||
for(var/from in from_objs)
|
||||
objs += SDQL_get_all(type, from)
|
||||
|
||||
else if(char == "'" || char == "\"")
|
||||
objs += locate(copytext(type, 2, length(type)))
|
||||
|
||||
if("where" in query_tree)
|
||||
var/objs_temp = objs
|
||||
objs = list()
|
||||
for(var/datum/d in objs_temp)
|
||||
if(SDQL_expression(d, query_tree["where"]))
|
||||
objs += d
|
||||
|
||||
//usr << "Query: [query_text]"
|
||||
message_admins("[usr] executed SDQL query: \"[query_text]\".")
|
||||
|
||||
switch(query_tree[1])
|
||||
if("delete")
|
||||
for(var/datum/d in objs)
|
||||
del d
|
||||
|
||||
if("select")
|
||||
var/text = ""
|
||||
for(var/datum/t in objs)
|
||||
if(istype(t, /atom))
|
||||
var/atom/a = t
|
||||
|
||||
if(a.x)
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t] at ([a.x], [a.y], [a.z])<br>"
|
||||
|
||||
else if(a.loc && a.loc.x)
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t] in [a.loc] at ([a.loc.x], [a.loc.y], [a.loc.z])<br>"
|
||||
|
||||
else
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t]<br>"
|
||||
|
||||
else
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t]<br>"
|
||||
|
||||
usr << browse(text, "window=SDQL-result")
|
||||
|
||||
if("update")
|
||||
if("set" in query_tree)
|
||||
var/list/set_list = query_tree["set"]
|
||||
for(var/datum/d in objs)
|
||||
var/list/vals = list()
|
||||
for(var/v in set_list)
|
||||
if(v in d.vars)
|
||||
vals += v
|
||||
vals[v] = SDQL_expression(d, set_list[v])
|
||||
|
||||
if(istype(d, /turf))
|
||||
for(var/v in vals)
|
||||
if(v == "x" || v == "y" || v == "z")
|
||||
continue
|
||||
|
||||
d.vars[v] = vals[v]
|
||||
|
||||
else
|
||||
for(var/v in vals)
|
||||
d.vars[v] = vals[v]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/proc/SDQL_parse(list/query_list)
|
||||
var/datum/SDQL_parser/parser = new(query_list)
|
||||
var/list/query_tree = parser.parse()
|
||||
|
||||
del(parser)
|
||||
|
||||
return query_tree
|
||||
|
||||
|
||||
|
||||
/proc/SDQL_testout(list/query_tree, indent = 0)
|
||||
var/spaces = ""
|
||||
for(var/s = 0, s < indent, s++)
|
||||
spaces += " "
|
||||
|
||||
for(var/item in query_tree)
|
||||
if(istype(item, /list))
|
||||
world << "[spaces]("
|
||||
SDQL_testout(item, indent + 1)
|
||||
world << "[spaces])"
|
||||
|
||||
else
|
||||
world << "[spaces][item]"
|
||||
|
||||
if(!isnum(item) && query_tree[item])
|
||||
|
||||
if(istype(query_tree[item], /list))
|
||||
world << "[spaces] ("
|
||||
SDQL_testout(query_tree[item], indent + 2)
|
||||
world << "[spaces] )"
|
||||
|
||||
else
|
||||
world << "[spaces] [query_tree[item]]"
|
||||
|
||||
|
||||
|
||||
/proc/SDQL_from_objs(list/tree)
|
||||
if("world" in tree)
|
||||
return list(world)
|
||||
|
||||
var/list/out = list()
|
||||
|
||||
for(var/type in tree)
|
||||
var/char = copytext(type, 1, 2)
|
||||
|
||||
if(char == "/")
|
||||
out += SDQL_get_all(type, world)
|
||||
|
||||
else if(char == "'" || char == "\"")
|
||||
out += locate(copytext(type, 2, length(type)))
|
||||
|
||||
return out
|
||||
|
||||
|
||||
/proc/SDQL_get_all(type, location)
|
||||
var/list/out = list()
|
||||
|
||||
if(type == "*")
|
||||
for(var/datum/d in location)
|
||||
out += d
|
||||
|
||||
return out
|
||||
|
||||
type = text2path(type)
|
||||
|
||||
if(ispath(type, /mob))
|
||||
for(var/mob/d in location)
|
||||
if(istype(d, type))
|
||||
out += d
|
||||
|
||||
else if(ispath(type, /turf))
|
||||
for(var/turf/d in location)
|
||||
if(istype(d, type))
|
||||
out += d
|
||||
|
||||
else if(ispath(type, /obj))
|
||||
for(var/obj/d in location)
|
||||
if(istype(d, type))
|
||||
out += d
|
||||
|
||||
else if(ispath(type, /area))
|
||||
for(var/area/d in location)
|
||||
if(istype(d, type))
|
||||
out += d
|
||||
|
||||
else if(ispath(type, /atom))
|
||||
for(var/atom/d in location)
|
||||
if(istype(d, type))
|
||||
out += d
|
||||
|
||||
else
|
||||
for(var/datum/d in location)
|
||||
if(istype(d, type))
|
||||
out += d
|
||||
|
||||
return out
|
||||
|
||||
|
||||
/proc/SDQL_expression(datum/object, list/expression, start = 1)
|
||||
var/result = 0
|
||||
var/val
|
||||
|
||||
for(var/i = start, i <= expression.len, i++)
|
||||
var/op = ""
|
||||
|
||||
if(i > start)
|
||||
op = expression[i]
|
||||
i++
|
||||
|
||||
var/list/ret = SDQL_value(object, expression, i)
|
||||
val = ret["val"]
|
||||
i = ret["i"]
|
||||
|
||||
if(op != "")
|
||||
switch(op)
|
||||
if("+")
|
||||
result += val
|
||||
if("-")
|
||||
result -= val
|
||||
if("*")
|
||||
result *= val
|
||||
if("/")
|
||||
result /= val
|
||||
if("&")
|
||||
result &= val
|
||||
if("|")
|
||||
result |= val
|
||||
if("^")
|
||||
result ^= val
|
||||
if("=", "==")
|
||||
result = (result == val)
|
||||
if("!=", "<>")
|
||||
result = (result != val)
|
||||
if("<")
|
||||
result = (result < val)
|
||||
if("<=")
|
||||
result = (result <= val)
|
||||
if(">")
|
||||
result = (result > val)
|
||||
if(">=")
|
||||
result = (result >= val)
|
||||
if("and", "&&")
|
||||
result = (result && val)
|
||||
if("or", "||")
|
||||
result = (result || val)
|
||||
else
|
||||
usr << "\red SDQL2: Unknown op [op]"
|
||||
result = null
|
||||
else
|
||||
result = val
|
||||
|
||||
return result
|
||||
|
||||
/proc/SDQL_value(datum/object, list/expression, start = 1)
|
||||
var/i = start
|
||||
var/val = null
|
||||
|
||||
if(i > expression.len)
|
||||
return list("val" = null, "i" = i)
|
||||
|
||||
if(istype(expression[i], /list))
|
||||
val = SDQL_expression(object, expression[i])
|
||||
|
||||
else if(expression[i] == "!")
|
||||
var/list/ret = SDQL_value(object, expression, i + 1)
|
||||
val = !ret["val"]
|
||||
i = ret["i"]
|
||||
|
||||
else if(expression[i] == "~")
|
||||
var/list/ret = SDQL_value(object, expression, i + 1)
|
||||
val = ~ret["val"]
|
||||
i = ret["i"]
|
||||
|
||||
else if(expression[i] == "-")
|
||||
var/list/ret = SDQL_value(object, expression, i + 1)
|
||||
val = -ret["val"]
|
||||
i = ret["i"]
|
||||
|
||||
else if(expression[i] == "null")
|
||||
val = null
|
||||
|
||||
else if(isnum(expression[i]))
|
||||
val = expression[i]
|
||||
|
||||
else if(copytext(expression[i], 1, 2) in list("'", "\""))
|
||||
val = copytext(expression[i], 2, length(expression[i]))
|
||||
|
||||
else
|
||||
val = SDQL_var(object, expression, i)
|
||||
i = expression.len
|
||||
|
||||
return list("val" = val, "i" = i)
|
||||
|
||||
/proc/SDQL_var(datum/object, list/expression, start = 1)
|
||||
|
||||
if(expression[start] in object.vars)
|
||||
|
||||
if(start < expression.len && expression[start + 1] == ".")
|
||||
return SDQL_var(object.vars[expression[start]], expression[start + 2])
|
||||
|
||||
else
|
||||
return object.vars[expression[start]]
|
||||
|
||||
else
|
||||
return null
|
||||
|
||||
/proc/SDQL2_tokenize(query_text)
|
||||
|
||||
var/list/whitespace = list(" ", "\n", "\t")
|
||||
var/list/single = list("(", ")", ",", "+", "-", ".")
|
||||
var/list/multi = list(
|
||||
"=" = list("", "="),
|
||||
"<" = list("", "=", ">"),
|
||||
">" = list("", "="),
|
||||
"!" = list("", "="))
|
||||
|
||||
var/word = ""
|
||||
var/list/query_list = list()
|
||||
var/len = length(query_text)
|
||||
|
||||
for(var/i = 1, i <= len, i++)
|
||||
var/char = copytext(query_text, i, i + 1)
|
||||
|
||||
if(char in whitespace)
|
||||
if(word != "")
|
||||
query_list += word
|
||||
word = ""
|
||||
|
||||
else if(char in single)
|
||||
if(word != "")
|
||||
query_list += word
|
||||
word = ""
|
||||
|
||||
query_list += char
|
||||
|
||||
else if(char in multi)
|
||||
if(word != "")
|
||||
query_list += word
|
||||
word = ""
|
||||
|
||||
var/char2 = copytext(query_text, i + 1, i + 2)
|
||||
|
||||
if(char2 in multi[char])
|
||||
query_list += "[char][char2]"
|
||||
i++
|
||||
|
||||
else
|
||||
query_list += char
|
||||
|
||||
else if(char == "'")
|
||||
if(word != "")
|
||||
usr << "\red SDQL2: You have an error in your SDQL syntax, unexpected ' in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
word = "'"
|
||||
|
||||
for(i++, i <= len, i++)
|
||||
char = copytext(query_text, i, i + 1)
|
||||
|
||||
if(char == "'")
|
||||
if(copytext(query_text, i + 1, i + 2) == "'")
|
||||
word += "'"
|
||||
i++
|
||||
|
||||
else
|
||||
break
|
||||
|
||||
else
|
||||
word += char
|
||||
|
||||
if(i > len)
|
||||
usr << "\red SDQL2: You have an error in your SDQL syntax, unmatched ' in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
query_list += "[word]'"
|
||||
word = ""
|
||||
|
||||
else if(char == "\"")
|
||||
if(word != "")
|
||||
usr << "\red SDQL2: You have an error in your SDQL syntax, unexpected \" in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
word = "\""
|
||||
|
||||
for(i++, i <= len, i++)
|
||||
char = copytext(query_text, i, i + 1)
|
||||
|
||||
if(char == "\"")
|
||||
if(copytext(query_text, i + 1, i + 2) == "'")
|
||||
word += "\""
|
||||
i++
|
||||
|
||||
else
|
||||
break
|
||||
|
||||
else
|
||||
word += char
|
||||
|
||||
if(i > len)
|
||||
usr << "\red SDQL2: You have an error in your SDQL syntax, unmatched \" in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
query_list += "[word]\""
|
||||
word = ""
|
||||
|
||||
else
|
||||
word += char
|
||||
|
||||
if(word != "")
|
||||
query_list += word
|
||||
|
||||
return query_list
|
||||
|
||||
|
||||
/client/proc/SDQL2_query(query_text as message)
|
||||
set category = "Admin"
|
||||
if(!check_rights(R_DEBUG)) //Shouldn't happen... but just to be safe.
|
||||
message_admins("\red ERROR: Non-admin [usr.key] attempted to execute a SDQL query!")
|
||||
log_admin("Non-admin [usr.key] attempted to execute a SDQL query!")
|
||||
|
||||
if(!query_text || length(query_text) < 1)
|
||||
return
|
||||
|
||||
//world << query_text
|
||||
|
||||
var/list/query_list = SDQL2_tokenize(query_text)
|
||||
|
||||
if(!query_list || query_list.len < 1)
|
||||
return
|
||||
|
||||
var/list/query_tree = SDQL_parse(query_list)
|
||||
|
||||
if(query_tree.len < 1)
|
||||
return
|
||||
|
||||
var/list/from_objs = list()
|
||||
var/list/select_types = list()
|
||||
|
||||
switch(query_tree[1])
|
||||
if("explain")
|
||||
SDQL_testout(query_tree["explain"])
|
||||
return
|
||||
|
||||
if("call")
|
||||
if("on" in query_tree)
|
||||
select_types = query_tree["on"]
|
||||
else
|
||||
return
|
||||
|
||||
if("select", "delete", "update")
|
||||
select_types = query_tree[query_tree[1]]
|
||||
|
||||
from_objs = SDQL_from_objs(query_tree["from"])
|
||||
|
||||
var/list/objs = list()
|
||||
|
||||
for(var/type in select_types)
|
||||
var/char = copytext(type, 1, 2)
|
||||
|
||||
if(char == "/" || char == "*")
|
||||
for(var/from in from_objs)
|
||||
objs += SDQL_get_all(type, from)
|
||||
|
||||
else if(char == "'" || char == "\"")
|
||||
objs += locate(copytext(type, 2, length(type)))
|
||||
|
||||
if("where" in query_tree)
|
||||
var/objs_temp = objs
|
||||
objs = list()
|
||||
for(var/datum/d in objs_temp)
|
||||
if(SDQL_expression(d, query_tree["where"]))
|
||||
objs += d
|
||||
|
||||
//usr << "Query: [query_text]"
|
||||
message_admins("[usr] executed SDQL query: \"[query_text]\".")
|
||||
|
||||
switch(query_tree[1])
|
||||
if("delete")
|
||||
for(var/datum/d in objs)
|
||||
qdel(d)
|
||||
|
||||
if("select")
|
||||
var/text = ""
|
||||
for(var/datum/t in objs)
|
||||
if(istype(t, /atom))
|
||||
var/atom/a = t
|
||||
|
||||
if(a.x)
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t] at ([a.x], [a.y], [a.z])<br>"
|
||||
|
||||
else if(a.loc && a.loc.x)
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t] in [a.loc] at ([a.loc.x], [a.loc.y], [a.loc.z])<br>"
|
||||
|
||||
else
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t]<br>"
|
||||
|
||||
else
|
||||
text += "<a href='?src=\ref[t];SDQL_select=\ref[t]'>\ref[t]</a>: [t]<br>"
|
||||
|
||||
usr << browse(text, "window=SDQL-result")
|
||||
|
||||
if("update")
|
||||
if("set" in query_tree)
|
||||
var/list/set_list = query_tree["set"]
|
||||
for(var/datum/d in objs)
|
||||
var/list/vals = list()
|
||||
for(var/v in set_list)
|
||||
if(v in d.vars)
|
||||
vals += v
|
||||
vals[v] = SDQL_expression(d, set_list[v])
|
||||
|
||||
if(istype(d, /turf))
|
||||
for(var/v in vals)
|
||||
if(v == "x" || v == "y" || v == "z")
|
||||
continue
|
||||
|
||||
d.vars[v] = vals[v]
|
||||
|
||||
else
|
||||
for(var/v in vals)
|
||||
d.vars[v] = vals[v]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/proc/SDQL_parse(list/query_list)
|
||||
var/datum/SDQL_parser/parser = new(query_list)
|
||||
var/list/query_tree = parser.parse()
|
||||
|
||||
qdel(parser)
|
||||
|
||||
return query_tree
|
||||
|
||||
|
||||
|
||||
/proc/SDQL_testout(list/query_tree, indent = 0)
|
||||
var/spaces = ""
|
||||
for(var/s = 0, s < indent, s++)
|
||||
spaces += " "
|
||||
|
||||
for(var/item in query_tree)
|
||||
if(istype(item, /list))
|
||||
world << "[spaces]("
|
||||
SDQL_testout(item, indent + 1)
|
||||
world << "[spaces])"
|
||||
|
||||
else
|
||||
world << "[spaces][item]"
|
||||
|
||||
if(!isnum(item) && query_tree[item])
|
||||
|
||||
if(istype(query_tree[item], /list))
|
||||
world << "[spaces] ("
|
||||
SDQL_testout(query_tree[item], indent + 2)
|
||||
world << "[spaces] )"
|
||||
|
||||
else
|
||||
world << "[spaces] [query_tree[item]]"
|
||||
|
||||
|
||||
|
||||
/proc/SDQL_from_objs(list/tree)
|
||||
if("world" in tree)
|
||||
return list(world)
|
||||
|
||||
var/list/out = list()
|
||||
|
||||
for(var/type in tree)
|
||||
var/char = copytext(type, 1, 2)
|
||||
|
||||
if(char == "/")
|
||||
out += SDQL_get_all(type, world)
|
||||
|
||||
else if(char == "'" || char == "\"")
|
||||
out += locate(copytext(type, 2, length(type)))
|
||||
|
||||
return out
|
||||
|
||||
|
||||
/proc/SDQL_get_all(type, location)
|
||||
var/list/out = list()
|
||||
|
||||
if(type == "*")
|
||||
for(var/datum/d in location)
|
||||
out += d
|
||||
|
||||
return out
|
||||
|
||||
type = text2path(type)
|
||||
|
||||
if(ispath(type, /mob))
|
||||
for(var/mob/d in location)
|
||||
if(istype(d, type))
|
||||
out += d
|
||||
|
||||
else if(ispath(type, /turf))
|
||||
for(var/turf/d in location)
|
||||
if(istype(d, type))
|
||||
out += d
|
||||
|
||||
else if(ispath(type, /obj))
|
||||
for(var/obj/d in location)
|
||||
if(istype(d, type))
|
||||
out += d
|
||||
|
||||
else if(ispath(type, /area))
|
||||
for(var/area/d in location)
|
||||
if(istype(d, type))
|
||||
out += d
|
||||
|
||||
else if(ispath(type, /atom))
|
||||
for(var/atom/d in location)
|
||||
if(istype(d, type))
|
||||
out += d
|
||||
|
||||
else
|
||||
for(var/datum/d in location)
|
||||
if(istype(d, type))
|
||||
out += d
|
||||
|
||||
return out
|
||||
|
||||
|
||||
/proc/SDQL_expression(datum/object, list/expression, start = 1)
|
||||
var/result = 0
|
||||
var/val
|
||||
|
||||
for(var/i = start, i <= expression.len, i++)
|
||||
var/op = ""
|
||||
|
||||
if(i > start)
|
||||
op = expression[i]
|
||||
i++
|
||||
|
||||
var/list/ret = SDQL_value(object, expression, i)
|
||||
val = ret["val"]
|
||||
i = ret["i"]
|
||||
|
||||
if(op != "")
|
||||
switch(op)
|
||||
if("+")
|
||||
result += val
|
||||
if("-")
|
||||
result -= val
|
||||
if("*")
|
||||
result *= val
|
||||
if("/")
|
||||
result /= val
|
||||
if("&")
|
||||
result &= val
|
||||
if("|")
|
||||
result |= val
|
||||
if("^")
|
||||
result ^= val
|
||||
if("=", "==")
|
||||
result = (result == val)
|
||||
if("!=", "<>")
|
||||
result = (result != val)
|
||||
if("<")
|
||||
result = (result < val)
|
||||
if("<=")
|
||||
result = (result <= val)
|
||||
if(">")
|
||||
result = (result > val)
|
||||
if(">=")
|
||||
result = (result >= val)
|
||||
if("and", "&&")
|
||||
result = (result && val)
|
||||
if("or", "||")
|
||||
result = (result || val)
|
||||
else
|
||||
usr << "\red SDQL2: Unknown op [op]"
|
||||
result = null
|
||||
else
|
||||
result = val
|
||||
|
||||
return result
|
||||
|
||||
/proc/SDQL_value(datum/object, list/expression, start = 1)
|
||||
var/i = start
|
||||
var/val = null
|
||||
|
||||
if(i > expression.len)
|
||||
return list("val" = null, "i" = i)
|
||||
|
||||
if(istype(expression[i], /list))
|
||||
val = SDQL_expression(object, expression[i])
|
||||
|
||||
else if(expression[i] == "!")
|
||||
var/list/ret = SDQL_value(object, expression, i + 1)
|
||||
val = !ret["val"]
|
||||
i = ret["i"]
|
||||
|
||||
else if(expression[i] == "~")
|
||||
var/list/ret = SDQL_value(object, expression, i + 1)
|
||||
val = ~ret["val"]
|
||||
i = ret["i"]
|
||||
|
||||
else if(expression[i] == "-")
|
||||
var/list/ret = SDQL_value(object, expression, i + 1)
|
||||
val = -ret["val"]
|
||||
i = ret["i"]
|
||||
|
||||
else if(expression[i] == "null")
|
||||
val = null
|
||||
|
||||
else if(isnum(expression[i]))
|
||||
val = expression[i]
|
||||
|
||||
else if(copytext(expression[i], 1, 2) in list("'", "\""))
|
||||
val = copytext(expression[i], 2, length(expression[i]))
|
||||
|
||||
else
|
||||
val = SDQL_var(object, expression, i)
|
||||
i = expression.len
|
||||
|
||||
return list("val" = val, "i" = i)
|
||||
|
||||
/proc/SDQL_var(datum/object, list/expression, start = 1)
|
||||
|
||||
if(expression[start] in object.vars)
|
||||
|
||||
if(start < expression.len && expression[start + 1] == ".")
|
||||
return SDQL_var(object.vars[expression[start]], expression[start + 2])
|
||||
|
||||
else
|
||||
return object.vars[expression[start]]
|
||||
|
||||
else
|
||||
return null
|
||||
|
||||
/proc/SDQL2_tokenize(query_text)
|
||||
|
||||
var/list/whitespace = list(" ", "\n", "\t")
|
||||
var/list/single = list("(", ")", ",", "+", "-", ".")
|
||||
var/list/multi = list(
|
||||
"=" = list("", "="),
|
||||
"<" = list("", "=", ">"),
|
||||
">" = list("", "="),
|
||||
"!" = list("", "="))
|
||||
|
||||
var/word = ""
|
||||
var/list/query_list = list()
|
||||
var/len = length(query_text)
|
||||
|
||||
for(var/i = 1, i <= len, i++)
|
||||
var/char = copytext(query_text, i, i + 1)
|
||||
|
||||
if(char in whitespace)
|
||||
if(word != "")
|
||||
query_list += word
|
||||
word = ""
|
||||
|
||||
else if(char in single)
|
||||
if(word != "")
|
||||
query_list += word
|
||||
word = ""
|
||||
|
||||
query_list += char
|
||||
|
||||
else if(char in multi)
|
||||
if(word != "")
|
||||
query_list += word
|
||||
word = ""
|
||||
|
||||
var/char2 = copytext(query_text, i + 1, i + 2)
|
||||
|
||||
if(char2 in multi[char])
|
||||
query_list += "[char][char2]"
|
||||
i++
|
||||
|
||||
else
|
||||
query_list += char
|
||||
|
||||
else if(char == "'")
|
||||
if(word != "")
|
||||
usr << "\red SDQL2: You have an error in your SDQL syntax, unexpected ' in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
word = "'"
|
||||
|
||||
for(i++, i <= len, i++)
|
||||
char = copytext(query_text, i, i + 1)
|
||||
|
||||
if(char == "'")
|
||||
if(copytext(query_text, i + 1, i + 2) == "'")
|
||||
word += "'"
|
||||
i++
|
||||
|
||||
else
|
||||
break
|
||||
|
||||
else
|
||||
word += char
|
||||
|
||||
if(i > len)
|
||||
usr << "\red SDQL2: You have an error in your SDQL syntax, unmatched ' in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
query_list += "[word]'"
|
||||
word = ""
|
||||
|
||||
else if(char == "\"")
|
||||
if(word != "")
|
||||
usr << "\red SDQL2: You have an error in your SDQL syntax, unexpected \" in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
word = "\""
|
||||
|
||||
for(i++, i <= len, i++)
|
||||
char = copytext(query_text, i, i + 1)
|
||||
|
||||
if(char == "\"")
|
||||
if(copytext(query_text, i + 1, i + 2) == "'")
|
||||
word += "\""
|
||||
i++
|
||||
|
||||
else
|
||||
break
|
||||
|
||||
else
|
||||
word += char
|
||||
|
||||
if(i > len)
|
||||
usr << "\red SDQL2: You have an error in your SDQL syntax, unmatched \" in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again."
|
||||
return null
|
||||
|
||||
query_list += "[word]\""
|
||||
word = ""
|
||||
|
||||
else
|
||||
word += char
|
||||
|
||||
if(word != "")
|
||||
query_list += word
|
||||
|
||||
return query_list
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
M.client.show_popup_menus = 1
|
||||
for(var/obj/effect/bmode/buildholder/H)
|
||||
if(H.cl == M.client)
|
||||
del(H)
|
||||
qdel(H)
|
||||
else
|
||||
log_admin("[key_name(usr)] has entered build mode.")
|
||||
M.client.buildmode = 1
|
||||
@@ -220,7 +220,7 @@
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
return
|
||||
else if(istype(object,/obj))
|
||||
del(object)
|
||||
qdel(object)
|
||||
return
|
||||
else if(istype(object,/turf) && pa.Find("alt") && pa.Find("left"))
|
||||
new/obj/machinery/door/airlock(get_turf(object))
|
||||
@@ -250,7 +250,7 @@
|
||||
var/obj/A = new holder.buildmode.objholder (get_turf(object))
|
||||
A.set_dir(holder.builddir.dir)
|
||||
else if(pa.Find("right"))
|
||||
if(isobj(object)) del(object)
|
||||
if(isobj(object)) qdel(object)
|
||||
if(pa.Find("middle"))
|
||||
holder.buildmode.objholder = text2path("[object.type]")
|
||||
if(holder.buildmode.objsay) usr << "[object.type]"
|
||||
|
||||
@@ -350,7 +350,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(hsbitem)
|
||||
for(var/atom/O in world)
|
||||
if(istype(O, hsbitem))
|
||||
del(O)
|
||||
qdel(O)
|
||||
log_admin("[key_name(src)] has deleted all instances of [hsbitem].")
|
||||
message_admins("[key_name_admin(src)] has deleted all instances of [hsbitem].", 0)
|
||||
feedback_add_details("admin_verb","DELA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -420,7 +420,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
var/mob/adminmob = src.mob
|
||||
M.ckey = src.ckey
|
||||
if( isobserver(adminmob) )
|
||||
del(adminmob)
|
||||
qdel(adminmob)
|
||||
feedback_add_details("admin_verb","ADC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -555,7 +555,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
for (var/obj/item/I in M)
|
||||
if (istype(I, /obj/item/weapon/implant))
|
||||
continue
|
||||
del(I)
|
||||
qdel(I)
|
||||
switch(dresscode)
|
||||
if ("strip")
|
||||
//do nothing
|
||||
@@ -614,7 +614,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
|
||||
var/obj/item/weapon/storage/backpack/backpack = new(M)
|
||||
for(var/obj/item/I in backpack)
|
||||
del(I)
|
||||
qdel(I)
|
||||
M.equip_to_slot_or_del(backpack, slot_back)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/mop(M), slot_r_hand)
|
||||
@@ -705,7 +705,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
var/obj/item/weapon/storage/secure/briefcase/sec_briefcase = new(M)
|
||||
for(var/obj/item/briefcase_item in sec_briefcase)
|
||||
del(briefcase_item)
|
||||
qdel(briefcase_item)
|
||||
for(var/i=3, i>0, i--)
|
||||
sec_briefcase.contents += new /obj/item/weapon/spacecash/c1000
|
||||
sec_briefcase.contents += new /obj/item/weapon/gun/energy/crossbow
|
||||
@@ -927,9 +927,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
spawn(30)
|
||||
for(var/obj/machinery/the_singularitygen/G in world)
|
||||
if(G.anchored)
|
||||
var/obj/machinery/singularity/S = new /obj/machinery/singularity(get_turf(G), 50)
|
||||
var/obj/singularity/S = new /obj/singularity(get_turf(G), 50)
|
||||
spawn(0)
|
||||
del(G)
|
||||
qdel(G)
|
||||
S.energy = 1750
|
||||
S.current_size = 7
|
||||
S.icon = 'icons/effects/224x224.dmi'
|
||||
|
||||
@@ -55,7 +55,7 @@ var/intercom_range_display_status = 0
|
||||
|
||||
|
||||
for(var/obj/effect/debugging/camera_range/C in world)
|
||||
del(C)
|
||||
qdel(C)
|
||||
|
||||
if(camera_range_display_status)
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
@@ -114,14 +114,14 @@ var/intercom_range_display_status = 0
|
||||
intercom_range_display_status = 1
|
||||
|
||||
for(var/obj/effect/debugging/marker/M in world)
|
||||
del(M)
|
||||
qdel(M)
|
||||
|
||||
if(intercom_range_display_status)
|
||||
for(var/obj/item/device/radio/intercom/I in world)
|
||||
for(var/turf/T in orange(7,I))
|
||||
var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T)
|
||||
if (!(F in view(7,I.loc)))
|
||||
del(F)
|
||||
qdel(F)
|
||||
feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
var/list/debug_verbs = list (
|
||||
@@ -276,7 +276,7 @@ var/list/debug_verbs = list (
|
||||
var/datum/controller/air_system/old_air = air_master
|
||||
for(var/zone/zone in old_air.zones)
|
||||
zone.c_invalidate()
|
||||
del old_air
|
||||
qdel(old_air)
|
||||
air_master = new
|
||||
air_master.Setup()
|
||||
spawn air_master.Start()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set name = "Possess Obj"
|
||||
set category = "Object"
|
||||
|
||||
if(istype(O,/obj/machinery/singularity))
|
||||
if(istype(O,/obj/singularity))
|
||||
if(config.forbid_singulo_possession)
|
||||
usr << "It is forbidden to possess singularities."
|
||||
return
|
||||
|
||||
@@ -28,15 +28,13 @@
|
||||
feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
//log_admin("HELP: [key_name(src)]: [msg]")
|
||||
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender , var/iamessage)
|
||||
var/msg = sanitize(text)
|
||||
/proc/Centcomm_announce(var/msg, var/mob/Sender, var/iamessage)
|
||||
msg = "\blue <b><font color=orange>CENTCOMM[iamessage ? " IA" : ""]:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
C << msg
|
||||
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(text)
|
||||
/proc/Syndicate_announce(var/msg, var/mob/Sender)
|
||||
msg = "\blue <b><font color=crimson>ILLEGAL:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
|
||||
@@ -527,7 +527,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
switch(alert("Should this be announced to the general population?",,"Yes","No"))
|
||||
if("Yes")
|
||||
command_announcement.Announce(input, customname, new_sound = 'sound/AI/commandreport.ogg');
|
||||
command_announcement.Announce(input, customname, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1);
|
||||
if("No")
|
||||
world << "\red New NanoTrasen Update available at all communication consoles."
|
||||
world << sound('sound/AI/commandreport.ogg')
|
||||
@@ -548,7 +548,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
log_admin("[key_name(usr)] deleted [O] at ([O.x],[O.y],[O.z])")
|
||||
message_admins("[key_name_admin(usr)] deleted [O] at ([O.x],[O.y],[O.z])", 1)
|
||||
feedback_add_details("admin_verb","DEL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
del(O)
|
||||
qdel(O)
|
||||
|
||||
/client/proc/cmd_admin_list_open_jobs()
|
||||
set category = "Admin"
|
||||
@@ -686,7 +686,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
||||
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=[mins]&server=[replacetext(config.server_name, "#", "")]")
|
||||
del(M.client)
|
||||
del(M)
|
||||
qdel(M)
|
||||
else
|
||||
|
||||
if("No")
|
||||
@@ -701,7 +701,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
|
||||
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=perma&server=[replacetext(config.server_name, "#", "")]")
|
||||
del(M.client)
|
||||
del(M)
|
||||
qdel(M)
|
||||
*/
|
||||
|
||||
/client/proc/update_world()
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
bombtank.master = null
|
||||
bombtank = null
|
||||
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
if((istype(W, /obj/item/weapon/weldingtool) && W:welding))
|
||||
if(!status)
|
||||
@@ -144,8 +144,8 @@
|
||||
ground_zero.hotspot_expose(1000, 125)
|
||||
|
||||
if(master)
|
||||
del(master)
|
||||
del(src)
|
||||
qdel(master)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/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)
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
a_right:holder = null
|
||||
a_right.loc = T
|
||||
spawn(0)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
processing_objects.Add(src)
|
||||
else
|
||||
on = 0
|
||||
if(first) del(first)
|
||||
if(first) qdel(first)
|
||||
processing_objects.Remove(src)
|
||||
update_icon()
|
||||
return secured
|
||||
@@ -53,7 +53,7 @@
|
||||
process()//Old code
|
||||
if(!on)
|
||||
if(first)
|
||||
del(first)
|
||||
qdel(first)
|
||||
return
|
||||
|
||||
if((!(first) && (secured && (istype(loc, /turf) || (holder && istype(holder.loc, /turf))))))
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
|
||||
attack_hand()
|
||||
del(first)
|
||||
qdel(first)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -86,14 +86,14 @@
|
||||
var/t = dir
|
||||
..()
|
||||
set_dir(t)
|
||||
del(first)
|
||||
qdel(first)
|
||||
return
|
||||
|
||||
|
||||
holder_movement()
|
||||
if(!holder) return 0
|
||||
// set_dir(holder.dir)
|
||||
del(first)
|
||||
qdel(first)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
if(master)
|
||||
//world << "beam hit \ref[src]: calling master \ref[master].hit"
|
||||
master.trigger_beam()
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/proc/vis_spread(v)
|
||||
@@ -193,7 +193,7 @@
|
||||
|
||||
if((loc.density || !(master)))
|
||||
// world << "beam hit loc [loc] or no master [master], deleting"
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
//world << "proccess: [src.left] left"
|
||||
|
||||
@@ -233,17 +233,17 @@
|
||||
return
|
||||
else
|
||||
//world << "is a next: \ref[next], deleting beam \ref[I]"
|
||||
del(I)
|
||||
qdel(I)
|
||||
else
|
||||
//world << "step failed, deleting \ref[next]"
|
||||
del(next)
|
||||
qdel(next)
|
||||
spawn(10)
|
||||
process()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/Bump()
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/Bumped()
|
||||
@@ -258,7 +258,10 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/Del()
|
||||
del(next)
|
||||
/obj/effect/beam/i_beam/Destroy()
|
||||
if(master.first == src)
|
||||
master.first = null
|
||||
if(next)
|
||||
qdel(next)
|
||||
next = null
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
w_class = 5.0
|
||||
flags = CONDUCT
|
||||
|
||||
/obj/item/assembly/shock_kit/Del()
|
||||
del(part1)
|
||||
del(part2)
|
||||
/obj/item/assembly/shock_kit/Destroy()
|
||||
qdel(part1)
|
||||
qdel(part2)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
part2.master = null
|
||||
part1 = null
|
||||
part2 = null
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
status = !status
|
||||
|
||||
@@ -141,6 +141,8 @@
|
||||
|
||||
|
||||
proc/set_frequency(new_frequency)
|
||||
if(!frequency)
|
||||
return
|
||||
if(!radio_controller)
|
||||
sleep(20)
|
||||
if(!radio_controller)
|
||||
@@ -169,4 +171,11 @@
|
||||
set desc = "BOOOOM!"
|
||||
deadman = 1
|
||||
processing_objects.Add(src)
|
||||
log_and_message_admins("is threatening to trigger a signaler deadman's switch")
|
||||
usr.visible_message("\red [usr] moves their finger over [src]'s signal button...")
|
||||
|
||||
/obj/item/device/assembly/signaler/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
frequency = 0
|
||||
..()
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
W.assignment = corpseidjob
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
continue
|
||||
|
||||
new loot_path(get_turf(src))
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
if(M.client)
|
||||
M << "<span class='info'>[message]</span>"
|
||||
if(once)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/step_trigger/teleport_fancy
|
||||
var/locationx
|
||||
@@ -41,4 +41,4 @@
|
||||
|
||||
uses--
|
||||
if(uses == 0)
|
||||
del(src)
|
||||
qdel(src)
|
||||
@@ -3,7 +3,7 @@ proc/createRandomZlevel()
|
||||
return
|
||||
|
||||
var/list/potentialRandomZlevels = list()
|
||||
world << "\red \b Searching for away missions..."
|
||||
admin_notice("\red \b Searching for away missions...", R_DEBUG)
|
||||
var/list/Lines = file2list("maps/RandomZLevels/fileList.txt")
|
||||
if(!Lines.len) return
|
||||
for (var/t in Lines)
|
||||
@@ -35,7 +35,7 @@ proc/createRandomZlevel()
|
||||
|
||||
|
||||
if(potentialRandomZlevels.len)
|
||||
world << "\red \b Loading away mission..."
|
||||
admin_notice("\red \b Loading away mission...", R_DEBUG)
|
||||
|
||||
var/map = pick(potentialRandomZlevels)
|
||||
var/file = file(map)
|
||||
@@ -48,8 +48,8 @@ proc/createRandomZlevel()
|
||||
continue
|
||||
awaydestinations.Add(L)
|
||||
|
||||
world << "\red \b Away mission loaded."
|
||||
admin_notice("\red \b Away mission loaded.", R_DEBUG)
|
||||
|
||||
else
|
||||
world << "\red \b No away missions found."
|
||||
admin_notice("\red \b No away missions found.", R_DEBUG)
|
||||
return
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
if( findtext(href,"<script",1,0) )
|
||||
world.log << "Attempted use of scripts within a topic call, by [src]"
|
||||
message_admins("Attempted use of scripts within a topic call, by [src]")
|
||||
//del(usr)
|
||||
//qdel(usr)
|
||||
return
|
||||
|
||||
//Admin PM
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
if(!config.guests_allowed && IsGuestKey(key))
|
||||
alert(src,"This server doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK")
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// Change the way they should download resources.
|
||||
@@ -162,7 +162,11 @@
|
||||
nanomanager.send_resources(src)
|
||||
|
||||
if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates.
|
||||
winset(src, "rpane.changelog", "background-color=#eaeaea;font-style=bold")
|
||||
src << "<span class='info'>You have unread updates in the changelog.</span>"
|
||||
winset(src, "rpane.changelogb", "background-color=#eaeaea;font-style=bold")
|
||||
if(config.aggressive_changelog)
|
||||
src.changes()
|
||||
|
||||
|
||||
|
||||
//////////////
|
||||
@@ -259,8 +263,9 @@
|
||||
getFiles(
|
||||
'html/search.js',
|
||||
'html/panels.css',
|
||||
'html/painew.png',
|
||||
'html/loading.gif',
|
||||
'html/images/loading.gif',
|
||||
'html/images/ntlogo.png',
|
||||
'html/images/talisman.png',
|
||||
'icons/pda_icons/pda_atmos.png',
|
||||
'icons/pda_icons/pda_back.png',
|
||||
'icons/pda_icons/pda_bell.png',
|
||||
@@ -298,7 +303,5 @@
|
||||
'icons/spideros_icons/sos_11.png',
|
||||
'icons/spideros_icons/sos_12.png',
|
||||
'icons/spideros_icons/sos_13.png',
|
||||
'icons/spideros_icons/sos_14.png',
|
||||
'html/images/ntlogo.png',
|
||||
'html/images/talisman.png'
|
||||
'icons/spideros_icons/sos_14.png'
|
||||
)
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
O = (H.l_ear == src ? H.r_ear : H.l_ear)
|
||||
user.u_equip(O)
|
||||
if(!istype(src,/obj/item/clothing/ears/offear))
|
||||
del(O)
|
||||
qdel(O)
|
||||
O = src
|
||||
else
|
||||
O = src
|
||||
@@ -129,7 +129,7 @@
|
||||
O.add_fingerprint(user)
|
||||
|
||||
if(istype(src,/obj/item/clothing/ears/offear))
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/clothing/ears/update_clothing_icon()
|
||||
if (ismob(src.loc))
|
||||
|
||||
@@ -155,7 +155,7 @@ var/global/list/breach_burn_descriptors = list(
|
||||
for(var/datum/breach/B in breaches)
|
||||
if(!B.class)
|
||||
src.breaches -= B
|
||||
del(B)
|
||||
qdel(B)
|
||||
else
|
||||
damage += B.class
|
||||
if(B.damtype == BRUTE)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
user << "<font color='blue'><b>You slot \the [input_device] into the suit module.</b></font>"
|
||||
user.drop_from_inventory(input_device)
|
||||
del(input_device)
|
||||
qdel(input_device)
|
||||
accepted_item.charges++
|
||||
return 1
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
for(var/obj/item/weapon/melee/energy/blade/blade in M.contents)
|
||||
M.drop_from_inventory(blade)
|
||||
del(blade)
|
||||
qdel(blade)
|
||||
|
||||
/obj/item/rig_module/fabricator
|
||||
|
||||
|
||||
@@ -46,6 +46,10 @@
|
||||
var/obj/item/ai_card // Reference to the MMI, posibrain, intellicard or pAI card previously holding the AI.
|
||||
var/obj/item/ai_verbs/verb_holder
|
||||
|
||||
/obj/item/rig_module/ai_container/process()
|
||||
if(integrated_ai && loc)
|
||||
integrated_ai.SetupStat(loc.get_rig())
|
||||
|
||||
/obj/item/rig_module/ai_container/proc/update_verb_holder()
|
||||
if(!verb_holder)
|
||||
verb_holder = new(src)
|
||||
@@ -153,8 +157,8 @@
|
||||
user << "<span class='danger'>You purge the remaining scraps of data from your previous AI, freeing it for use.</span>"
|
||||
if(integrated_ai)
|
||||
integrated_ai.ghostize()
|
||||
del(integrated_ai)
|
||||
if(ai_card) del(ai_card)
|
||||
qdel(integrated_ai)
|
||||
if(ai_card) qdel(ai_card)
|
||||
else if(user)
|
||||
user.put_in_hands(ai_card)
|
||||
else
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
var/activate_string = "Activate"
|
||||
var/deactivate_string = "Deactivate"
|
||||
|
||||
var/list/stat_rig_module/stat_modules = new()
|
||||
|
||||
/obj/item/rig_module/examine()
|
||||
..()
|
||||
switch(damage)
|
||||
@@ -126,7 +128,11 @@
|
||||
|
||||
charges = processed_charges
|
||||
|
||||
..()
|
||||
stat_modules += new/stat_rig_module/activate(src)
|
||||
stat_modules += new/stat_rig_module/deactivate(src)
|
||||
stat_modules += new/stat_rig_module/engage(src)
|
||||
stat_modules += new/stat_rig_module/select(src)
|
||||
stat_modules += new/stat_rig_module/charge(src)
|
||||
|
||||
// Called when the module is installed into a suit.
|
||||
/obj/item/rig_module/proc/installed(var/obj/item/weapon/rig/new_holder)
|
||||
@@ -218,4 +224,111 @@
|
||||
// Called by holder rigsuit attackby()
|
||||
// Checks if an item is usable with this module and handles it if it is
|
||||
/obj/item/rig_module/proc/accepts_item(var/obj/item/input_device)
|
||||
return 0
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/Stat()
|
||||
..()
|
||||
|
||||
if(istype(back,/obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/R = back
|
||||
SetupStat(R)
|
||||
|
||||
/mob/proc/SetupStat(var/obj/item/weapon/rig/R)
|
||||
if(R && !R.canremove && R.installed_modules.len && statpanel("Hardsuit Modules"))
|
||||
var/cell_status = R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "ERROR"
|
||||
statpanel("Hardsuit Modules", "Suit charge", cell_status)
|
||||
for(var/obj/item/rig_module/module in R.installed_modules)
|
||||
{
|
||||
for(var/stat_rig_module/SRM in module.stat_modules)
|
||||
if(SRM.CanUse())
|
||||
statpanel("Hardsuit Modules",SRM.module.interface_name,SRM)
|
||||
}
|
||||
|
||||
/stat_rig_module
|
||||
parent_type = /atom/movable
|
||||
var/module_mode = ""
|
||||
var/obj/item/rig_module/module
|
||||
|
||||
/stat_rig_module/New(var/obj/item/rig_module/module)
|
||||
..()
|
||||
src.module = module
|
||||
|
||||
/stat_rig_module/proc/AddHref(var/list/href_list)
|
||||
return
|
||||
|
||||
/stat_rig_module/proc/CanUse()
|
||||
return 0
|
||||
|
||||
/stat_rig_module/Click()
|
||||
..()
|
||||
if(CanUse())
|
||||
var/list/href_list = list(
|
||||
"interact_module" = module.holder.installed_modules.Find(module),
|
||||
"module_mode" = module_mode
|
||||
)
|
||||
AddHref(href_list)
|
||||
module.holder.Topic(usr, href_list)
|
||||
|
||||
/stat_rig_module/activate/New(var/obj/item/rig_module/module)
|
||||
..()
|
||||
name = module.activate_string
|
||||
if(module.active_power_cost)
|
||||
name += " ([module.active_power_cost*10]A)"
|
||||
module_mode = "activate"
|
||||
|
||||
/stat_rig_module/activate/CanUse()
|
||||
return module.toggleable && !module.active
|
||||
|
||||
/stat_rig_module/deactivate/New(var/obj/item/rig_module/module)
|
||||
..()
|
||||
name = module.deactivate_string
|
||||
// Show cost despite being 0, if it means changing from an active cost.
|
||||
if(module.active_power_cost || module.passive_power_cost)
|
||||
name += " ([module.passive_power_cost*10]P)"
|
||||
|
||||
module_mode = "deactivate"
|
||||
|
||||
/stat_rig_module/deactivate/CanUse()
|
||||
return module.toggleable && module.active
|
||||
|
||||
/stat_rig_module/engage/New(var/obj/item/rig_module/module)
|
||||
..()
|
||||
name = module.engage_string
|
||||
if(module.use_power_cost)
|
||||
name += " ([module.use_power_cost*10]E)"
|
||||
module_mode = "engage"
|
||||
|
||||
/stat_rig_module/engage/CanUse()
|
||||
return module.usable
|
||||
|
||||
/stat_rig_module/select/New()
|
||||
..()
|
||||
name = "Select"
|
||||
module_mode = "select"
|
||||
|
||||
/stat_rig_module/select/CanUse()
|
||||
if(module.selectable)
|
||||
name = module.holder.selected_module == module ? "Selected" : "Select"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/stat_rig_module/charge/New()
|
||||
..()
|
||||
name = "Change Charge"
|
||||
module_mode = "select_charge_type"
|
||||
|
||||
/stat_rig_module/charge/AddHref(var/list/href_list)
|
||||
var/charge_index = module.charges.Find(module.charge_selected)
|
||||
if(!charge_index)
|
||||
charge_index = 0
|
||||
else
|
||||
charge_index = charge_index == module.charges.len ? 1 : charge_index+1
|
||||
|
||||
href_list["charge_type"] = module.charges[charge_index]
|
||||
|
||||
/stat_rig_module/charge/CanUse()
|
||||
if(module.charges && module.charges.len)
|
||||
var/datum/rig_charge/charge = module.charges[module.charge_selected]
|
||||
name = "[charge.display_name] ([charge.charges]C) - Change"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -179,12 +179,12 @@
|
||||
explosion(get_turf(src), 1, 2, 4, 5)
|
||||
if(holder && holder.wearer)
|
||||
holder.wearer.drop_from_inventory(src)
|
||||
del(holder)
|
||||
del(src)
|
||||
qdel(holder)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/rig_module/self_destruct/small/engage()
|
||||
explosion(get_turf(src), 0, 0, 3, 4)
|
||||
if(holder && holder.wearer)
|
||||
holder.wearer.drop_from_inventory(src)
|
||||
del(holder)
|
||||
del(src)
|
||||
qdel(holder)
|
||||
qdel(src)
|
||||
@@ -149,12 +149,12 @@
|
||||
|
||||
update_icon(1)
|
||||
|
||||
/obj/item/weapon/rig/Del()
|
||||
/obj/item/weapon/rig/Destroy()
|
||||
for(var/obj/item/piece in list(gloves,boots,helmet,chest))
|
||||
var/mob/living/M = piece.loc
|
||||
if(istype(M))
|
||||
M.drop_from_inventory(piece)
|
||||
del(piece)
|
||||
qdel(piece)
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
@@ -659,25 +659,25 @@
|
||||
var/obj/item/garbage = H.head
|
||||
H.drop_from_inventory(garbage)
|
||||
H.head = null
|
||||
del(garbage)
|
||||
qdel(garbage)
|
||||
|
||||
if(H.gloves)
|
||||
var/obj/item/garbage = H.gloves
|
||||
H.drop_from_inventory(garbage)
|
||||
H.gloves = null
|
||||
del(garbage)
|
||||
qdel(garbage)
|
||||
|
||||
if(H.shoes)
|
||||
var/obj/item/garbage = H.shoes
|
||||
H.drop_from_inventory(garbage)
|
||||
H.shoes = null
|
||||
del(garbage)
|
||||
qdel(garbage)
|
||||
|
||||
if(H.wear_suit)
|
||||
var/obj/item/garbage = H.wear_suit
|
||||
H.drop_from_inventory(garbage)
|
||||
H.wear_suit = null
|
||||
del(garbage)
|
||||
qdel(garbage)
|
||||
|
||||
for(var/piece in list("helmet","gauntlets","chest","boots"))
|
||||
toggle_piece(piece, H, ONLY_DEPLOY)
|
||||
@@ -776,6 +776,14 @@
|
||||
return 0
|
||||
wearer.Move(null,dir)*/
|
||||
|
||||
/atom/proc/get_rig()
|
||||
if(loc)
|
||||
return loc.get_rig()
|
||||
return null
|
||||
|
||||
/obj/item/weapon/rig/get_rig()
|
||||
return src
|
||||
|
||||
#undef ONLY_DEPLOY
|
||||
#undef ONLY_RETRACT
|
||||
#undef SEAL_DELAY
|
||||
|
||||
@@ -21,130 +21,130 @@
|
||||
|
||||
//Green syndicate space suit
|
||||
/obj/item/clothing/head/helmet/space/syndicate/green
|
||||
name = "Green Space Helmet"
|
||||
name = "green space helmet"
|
||||
icon_state = "syndicate-helm-green"
|
||||
item_state = "syndicate-helm-green"
|
||||
|
||||
/obj/item/clothing/suit/space/syndicate/green
|
||||
name = "Green Space Suit"
|
||||
name = "green space suit"
|
||||
icon_state = "syndicate-green"
|
||||
item_state = "syndicate-green"
|
||||
|
||||
|
||||
//Dark green syndicate space suit
|
||||
/obj/item/clothing/head/helmet/space/syndicate/green/dark
|
||||
name = "Dark Green Space Helmet"
|
||||
name = "dark green space helmet"
|
||||
icon_state = "syndicate-helm-green-dark"
|
||||
item_state = "syndicate-helm-green-dark"
|
||||
|
||||
/obj/item/clothing/suit/space/syndicate/green/dark
|
||||
name = "Dark Green Space Suit"
|
||||
name = "dark green space suit"
|
||||
icon_state = "syndicate-green-dark"
|
||||
item_state = "syndicate-green-dark"
|
||||
|
||||
|
||||
//Orange syndicate space suit
|
||||
/obj/item/clothing/head/helmet/space/syndicate/orange
|
||||
name = "Orange Space Helmet"
|
||||
name = "orange space helmet"
|
||||
icon_state = "syndicate-helm-orange"
|
||||
item_state = "syndicate-helm-orange"
|
||||
|
||||
/obj/item/clothing/suit/space/syndicate/orange
|
||||
name = "Orange Space Suit"
|
||||
name = "orange space suit"
|
||||
icon_state = "syndicate-orange"
|
||||
item_state = "syndicate-orange"
|
||||
|
||||
|
||||
//Blue syndicate space suit
|
||||
/obj/item/clothing/head/helmet/space/syndicate/blue
|
||||
name = "Blue Space Helmet"
|
||||
name = "blue space helmet"
|
||||
icon_state = "syndicate-helm-blue"
|
||||
item_state = "syndicate-helm-blue"
|
||||
|
||||
/obj/item/clothing/suit/space/syndicate/blue
|
||||
name = "Blue Space Suit"
|
||||
name = "blue space suit"
|
||||
icon_state = "syndicate-blue"
|
||||
item_state = "syndicate-blue"
|
||||
|
||||
|
||||
//Black syndicate space suit
|
||||
/obj/item/clothing/head/helmet/space/syndicate/black
|
||||
name = "Black Space Helmet"
|
||||
name = "black space helmet"
|
||||
icon_state = "syndicate-helm-black"
|
||||
item_state = "syndicate-helm-black"
|
||||
|
||||
/obj/item/clothing/suit/space/syndicate/black
|
||||
name = "Black Space Suit"
|
||||
name = "black space suit"
|
||||
icon_state = "syndicate-black"
|
||||
item_state = "syndicate-black"
|
||||
|
||||
|
||||
//Black-green syndicate space suit
|
||||
/obj/item/clothing/head/helmet/space/syndicate/black/green
|
||||
name = "Black Space Helmet"
|
||||
name = "black and green space helmet"
|
||||
icon_state = "syndicate-helm-black-green"
|
||||
item_state = "syndicate-helm-black-green"
|
||||
|
||||
/obj/item/clothing/suit/space/syndicate/black/green
|
||||
name = "Black and Green Space Suit"
|
||||
name = "black and green space suit"
|
||||
icon_state = "syndicate-black-green"
|
||||
item_state = "syndicate-black-green"
|
||||
|
||||
|
||||
//Black-blue syndicate space suit
|
||||
/obj/item/clothing/head/helmet/space/syndicate/black/blue
|
||||
name = "Black Space Helmet"
|
||||
name = "black and blue space helmet"
|
||||
icon_state = "syndicate-helm-black-blue"
|
||||
item_state = "syndicate-helm-black-blue"
|
||||
|
||||
/obj/item/clothing/suit/space/syndicate/black/blue
|
||||
name = "Black and Blue Space Suit"
|
||||
name = "black and blue space suit"
|
||||
icon_state = "syndicate-black-blue"
|
||||
item_state = "syndicate-black-blue"
|
||||
|
||||
|
||||
//Black medical syndicate space suit
|
||||
/obj/item/clothing/head/helmet/space/syndicate/black/med
|
||||
name = "Black Space Helmet"
|
||||
name = "black medical space helmet"
|
||||
icon_state = "syndicate-helm-black-med"
|
||||
item_state = "syndicate-helm-black"
|
||||
|
||||
/obj/item/clothing/suit/space/syndicate/black/med
|
||||
name = "Green Space Suit"
|
||||
name = "black medical space suit"
|
||||
icon_state = "syndicate-black-med"
|
||||
item_state = "syndicate-black"
|
||||
|
||||
|
||||
//Black-orange syndicate space suit
|
||||
/obj/item/clothing/head/helmet/space/syndicate/black/orange
|
||||
name = "Black Space Helmet"
|
||||
name = "black and orange space helmet"
|
||||
icon_state = "syndicate-helm-black-orange"
|
||||
item_state = "syndicate-helm-black"
|
||||
|
||||
/obj/item/clothing/suit/space/syndicate/black/orange
|
||||
name = "Black and Orange Space Suit"
|
||||
name = "black and orange space suit"
|
||||
icon_state = "syndicate-black-orange"
|
||||
item_state = "syndicate-black"
|
||||
|
||||
|
||||
//Black-red syndicate space suit
|
||||
/obj/item/clothing/head/helmet/space/syndicate/black/red
|
||||
name = "Black Space Helmet"
|
||||
name = "black and red space helmet"
|
||||
icon_state = "syndicate-helm-black-red"
|
||||
item_state = "syndicate-helm-black-red"
|
||||
|
||||
/obj/item/clothing/suit/space/syndicate/black/red
|
||||
name = "Black and Red Space Suit"
|
||||
name = "black and red space suit"
|
||||
icon_state = "syndicate-black-red"
|
||||
item_state = "syndicate-black-red"
|
||||
|
||||
//Black with yellow/red engineering syndicate space suit
|
||||
/obj/item/clothing/head/helmet/space/syndicate/black/engie
|
||||
name = "Black Space Helmet"
|
||||
name = "black engineering space helmet"
|
||||
icon_state = "syndicate-helm-black-engie"
|
||||
item_state = "syndicate-helm-black"
|
||||
|
||||
/obj/item/clothing/suit/space/syndicate/black/engie
|
||||
name = "Black Engineering Space Suit"
|
||||
name = "black engineering space suit"
|
||||
icon_state = "syndicate-black-engie"
|
||||
item_state = "syndicate-black"
|
||||
@@ -8,6 +8,11 @@
|
||||
pockets.max_w_class = 2 //fit only pocket sized items
|
||||
pockets.max_storage_space = 4
|
||||
|
||||
/obj/item/clothing/suit/storage/Destroy()
|
||||
qdel(pockets)
|
||||
pockets = null
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
|
||||
if (pockets.handle_attack_hand(user))
|
||||
..(user)
|
||||
@@ -59,7 +64,6 @@
|
||||
pockets.max_w_class = 2
|
||||
pockets.max_storage_space = 8
|
||||
|
||||
|
||||
/obj/item/clothing/suit/storage/vest
|
||||
var/icon_badge
|
||||
var/icon_nobadge
|
||||
|
||||
@@ -555,7 +555,7 @@
|
||||
kit.uses--
|
||||
if(kit.uses<1)
|
||||
user.drop_item()
|
||||
del(O)
|
||||
qdel(O)
|
||||
|
||||
/obj/item/clothing/suit/space/void/attackby(var/obj/item/O as obj, mob/user as mob)
|
||||
..()
|
||||
@@ -574,7 +574,7 @@
|
||||
kit.uses--
|
||||
if(kit.uses<1)
|
||||
user.drop_item()
|
||||
del(O)
|
||||
qdel(O)
|
||||
|
||||
///////// Salvage crew hardsuit - Cybele Petit - solaruin ///////////////
|
||||
/obj/item/device/kit/suit/fluff/salvage
|
||||
@@ -1131,6 +1131,8 @@
|
||||
icon_state = "parker_eliza_arms"
|
||||
item_state = "parker_eliza_arms"
|
||||
item_color = "parker_eliza_arms"
|
||||
body_parts_covered = 0 //technicially it's underneath everything
|
||||
canremove = 0
|
||||
|
||||
|
||||
////////////// Accessories /////
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if(M.ckey == "nerezza" && M.real_name == "Asher Spock" && M.mind.role_alt_title && M.mind.role_alt_title != "Emergency Physician")
|
||||
//only spawn ID if asher is joining as an emergency physician
|
||||
ok = 1
|
||||
del(Item)
|
||||
qdel(Item)
|
||||
goto skip
|
||||
var/obj/item/weapon/card/id/I = Item
|
||||
for(var/obj/item/weapon/card/id/C in M)
|
||||
@@ -59,18 +59,18 @@
|
||||
I.name = "[M.real_name]'s Technician ID ([M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role])"
|
||||
|
||||
//replace old ID
|
||||
del(C)
|
||||
qdel(C)
|
||||
ok = M.equip_to_slot_if_possible(I, slot_wear_id, 0) //if 1, last argument deletes on fail
|
||||
break
|
||||
else if(istype(Item,/obj/item/weapon/storage/belt))
|
||||
if(M.ckey == "jakksergal" && M.real_name == "Nashi Ra'hal" && M.mind.role_alt_title && M.mind.role_alt_title != "Nurse" && M.mind.role_alt_title != "Chemist")
|
||||
ok = 1
|
||||
del(Item)
|
||||
qdel(Item)
|
||||
goto skip
|
||||
var/obj/item/weapon/storage/belt/medical/fluff/nashi_belt/I = Item
|
||||
if(istype(M.belt,/obj/item/weapon/storage/belt))
|
||||
for(var/obj/item/weapon/storage/belt/B in M)
|
||||
del(B)
|
||||
qdel(B)
|
||||
M.belt=null
|
||||
ok = M.equip_to_slot_if_possible(I, slot_belt, 0)
|
||||
break
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
if(istype(I, /obj/item/weapon/f_card))
|
||||
if(process_card(I))
|
||||
M.drop_item()
|
||||
del(I)
|
||||
qdel(I)
|
||||
else
|
||||
usr << "<spawn class='warning'>Invalid fingerprint card, rejected.</span>"
|
||||
if("print")
|
||||
|
||||
@@ -109,7 +109,7 @@ log transactions
|
||||
|
||||
user << "<span class='info'>You insert [I] into [src].</span>"
|
||||
src.attack_hand(user)
|
||||
del I
|
||||
qdel(I)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
user.drop_from_inventory(cash)
|
||||
bundle = new (src.loc)
|
||||
bundle.worth += cash.worth
|
||||
del(cash)
|
||||
qdel(cash)
|
||||
else //is bundle
|
||||
bundle = W
|
||||
bundle.worth += src.worth
|
||||
@@ -37,7 +37,7 @@
|
||||
h_user.drop_from_inventory(bundle)
|
||||
h_user.put_in_hands(bundle)
|
||||
user << "<span class='notice'>You add [src.worth] Thalers worth of money to the bundles.<br>It holds [bundle.worth] Thalers now.</span>"
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/spacecash/bundle
|
||||
name = "pile of thalers"
|
||||
@@ -87,7 +87,7 @@
|
||||
bundle.update_icon()
|
||||
usr.put_in_hands(bundle)
|
||||
if(!worth)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/spacecash/c1
|
||||
name = "1 Thaler"
|
||||
|
||||
@@ -45,4 +45,4 @@
|
||||
if(!C.stat)
|
||||
var/turf/T = get_turf(C)
|
||||
if(istype(T, /turf/space))
|
||||
del(C)
|
||||
qdel(C)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
D.z = config.admin_levels[1]
|
||||
D.has_loot = 0
|
||||
|
||||
del(D)
|
||||
qdel(D)
|
||||
num_recovered++
|
||||
|
||||
if(num_recovered > drones_list.len * 0.75)
|
||||
|
||||
@@ -4,12 +4,12 @@ datum/event/viral_infection
|
||||
datum/event/viral_infection/setup()
|
||||
announceWhen = rand(0, 3000)
|
||||
endWhen = announceWhen + 1
|
||||
|
||||
|
||||
//generate 1-3 viruses. This way there's an upper limit on how many individual diseases need to be cured if many people are initially infected
|
||||
var/num_diseases = rand(1,3)
|
||||
for (var/i=0, i < num_diseases, i++)
|
||||
var/datum/disease2/disease/D = new /datum/disease2/disease
|
||||
|
||||
|
||||
var/strength = 1 //whether the disease is of the greater or lesser variety
|
||||
if (severity >= EVENT_LEVEL_MAJOR && prob(75))
|
||||
strength = 2
|
||||
@@ -24,7 +24,7 @@ datum/event/viral_infection/announce()
|
||||
level = pick("one", "two", "three", "four")
|
||||
else
|
||||
level = "five"
|
||||
|
||||
|
||||
if (severity == EVENT_LEVEL_MAJOR || prob(60))
|
||||
command_announcement.Announce("Confirmed outbreak of level [level] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg')
|
||||
|
||||
@@ -33,8 +33,10 @@ datum/event/viral_infection/start()
|
||||
|
||||
var/list/candidates = list() //list of candidate keys
|
||||
for(var/mob/living/carbon/human/G in player_list)
|
||||
if(G.client && G.stat != DEAD)
|
||||
candidates += G
|
||||
if(G.stat != DEAD && G.is_client_active(5))
|
||||
var/turf/T = get_turf(G)
|
||||
if(T.z in config.station_levels)
|
||||
candidates += G
|
||||
if(!candidates.len) return
|
||||
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
|
||||
|
||||
|
||||
@@ -264,26 +264,26 @@ proc/check_panel(mob/M)
|
||||
spawn(300)
|
||||
if(my_target)
|
||||
my_target.hallucinations -= src
|
||||
del(src)
|
||||
qdel(src)
|
||||
step_away(src,my_target,2)
|
||||
spawn attack_loop()
|
||||
|
||||
|
||||
proc/updateimage()
|
||||
// del src.currentimage
|
||||
// qdel(src.currentimage)
|
||||
|
||||
|
||||
if(src.dir == NORTH)
|
||||
del src.currentimage
|
||||
qdel(src.currentimage)
|
||||
src.currentimage = new /image(up,src)
|
||||
else if(src.dir == SOUTH)
|
||||
del src.currentimage
|
||||
qdel(src.currentimage)
|
||||
src.currentimage = new /image(down,src)
|
||||
else if(src.dir == EAST)
|
||||
del src.currentimage
|
||||
qdel(src.currentimage)
|
||||
src.currentimage = new /image(right,src)
|
||||
else if(src.dir == WEST)
|
||||
del src.currentimage
|
||||
qdel(src.currentimage)
|
||||
src.currentimage = new /image(left,src)
|
||||
my_target << currentimage
|
||||
|
||||
@@ -329,7 +329,7 @@ proc/check_panel(mob/M)
|
||||
var/image/I = image('icons/effects/blood.dmi',O,"floor[rand(1,7)]",O.dir,1)
|
||||
target << I
|
||||
spawn(300)
|
||||
del(O)
|
||||
qdel(O)
|
||||
return
|
||||
|
||||
var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/item/ammo_magazine/a357,\
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
var/obj/item/weapon/hand/H = O
|
||||
for(var/datum/playingcard/P in H.cards)
|
||||
cards += P
|
||||
del(O)
|
||||
qdel(O)
|
||||
user << "You place your cards on the bottom of the deck."
|
||||
return
|
||||
..()
|
||||
@@ -131,7 +131,7 @@
|
||||
for(var/datum/playingcard/P in H.cards)
|
||||
cards += P
|
||||
src.concealed = H.concealed
|
||||
del(O)
|
||||
qdel(O)
|
||||
user.put_in_hands(src)
|
||||
update_icon()
|
||||
return
|
||||
@@ -183,7 +183,7 @@
|
||||
if(!discarding || !to_discard[discarding] || !usr || !src) return
|
||||
|
||||
var/datum/playingcard/card = to_discard[discarding]
|
||||
del(to_discard)
|
||||
qdel(to_discard)
|
||||
|
||||
var/obj/item/weapon/hand/H = new(src.loc)
|
||||
H.cards += card
|
||||
@@ -195,7 +195,7 @@
|
||||
H.loc = get_step(usr,usr.dir)
|
||||
|
||||
if(!cards.len)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/hand/attack_self(var/mob/user as mob)
|
||||
concealed = !concealed
|
||||
@@ -212,7 +212,7 @@
|
||||
/obj/item/weapon/hand/update_icon(var/direction = 0)
|
||||
|
||||
if(!cards.len)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
else if(cards.len > 1)
|
||||
name = "hand of cards"
|
||||
|
||||
@@ -178,7 +178,7 @@ var/global/list/holodeck_programs = list(
|
||||
// loadProgram(target)
|
||||
|
||||
//This could all be done better, but it works for now.
|
||||
/obj/machinery/computer/HolodeckControl/Del()
|
||||
/obj/machinery/computer/HolodeckControl/Destroy()
|
||||
emergencyShutdown()
|
||||
..()
|
||||
|
||||
@@ -257,7 +257,7 @@ var/global/list/holodeck_programs = list(
|
||||
if(!silent)
|
||||
var/obj/oldobj = obj
|
||||
visible_message("The [oldobj.name] fades away!")
|
||||
del(obj)
|
||||
qdel(obj)
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/proc/checkInteg(var/area/A)
|
||||
for(var/turf/T in A)
|
||||
@@ -321,7 +321,7 @@ var/global/list/holodeck_programs = list(
|
||||
C.derez()
|
||||
|
||||
for(var/obj/effect/decal/cleanable/blood/B in linkedholodeck)
|
||||
del(B)
|
||||
qdel(B)
|
||||
|
||||
holographic_objs = A.copy_contents_to(linkedholodeck , 1)
|
||||
for(var/obj/holo_obj in holographic_objs)
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
icon_state = "boxing"
|
||||
item_state = "boxing"
|
||||
|
||||
/obj/structure/window/reinforced/holowindow/Del()
|
||||
/obj/structure/window/reinforced/holowindow/Destroy()
|
||||
..()
|
||||
|
||||
/obj/structure/window/reinforced/holowindow/attackby(obj/item/W as obj, mob/user as mob)
|
||||
@@ -95,7 +95,7 @@
|
||||
if(istype(G.affecting,/mob/living))
|
||||
var/mob/living/M = G.affecting
|
||||
var/state = G.state
|
||||
del(W) //gotta delete it here because if window breaks, it won't get deleted
|
||||
qdel(W) //gotta delete it here because if window breaks, it won't get deleted
|
||||
switch (state)
|
||||
if(1)
|
||||
M.visible_message("<span class='warning'>[user] slams [M] against \the [src]!</span>")
|
||||
@@ -138,13 +138,13 @@
|
||||
playsound(src, "shatter", 70, 1)
|
||||
if(display_message)
|
||||
visible_message("[src] fades away as it shatters!")
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/window/reinforced/holowindow/disappearing/Del()
|
||||
/obj/structure/window/reinforced/holowindow/disappearing/Destroy()
|
||||
..()
|
||||
|
||||
/obj/machinery/door/window/holowindoor/Del()
|
||||
/obj/machinery/door/window/holowindoor/Destroy()
|
||||
..()
|
||||
|
||||
/obj/machinery/door/window/holowindoor/attackby(obj/item/weapon/I as obj, mob/user as mob)
|
||||
@@ -180,9 +180,9 @@
|
||||
playsound(src, "shatter", 70, 1)
|
||||
if(display_message)
|
||||
visible_message("[src] fades away as it shatters!")
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/bed/chair/holochair/Del()
|
||||
/obj/structure/bed/chair/holochair/Destroy()
|
||||
..()
|
||||
|
||||
/obj/structure/bed/chair/holochair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -274,7 +274,7 @@
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.Weaken(5)
|
||||
visible_message("<span class='warning'>[G.assailant] dunks [G.affecting] into the [src]!</span>", 3)
|
||||
del(W)
|
||||
qdel(W)
|
||||
return
|
||||
else if (istype(W, /obj/item) && get_dist(src,user)<2)
|
||||
user.drop_item(src.loc)
|
||||
@@ -333,7 +333,7 @@
|
||||
|
||||
currentarea = get_area(src.loc)
|
||||
if(!currentarea)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
if(eventstarted)
|
||||
usr << "The event has already begun!"
|
||||
@@ -364,7 +364,7 @@
|
||||
eventstarted = 1
|
||||
|
||||
for(var/obj/structure/window/reinforced/holowindow/disappearing/W in currentarea)
|
||||
del(W)
|
||||
qdel(W)
|
||||
|
||||
for(var/mob/M in currentarea)
|
||||
M << "FIGHT!"
|
||||
@@ -424,4 +424,4 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/holodeck/proc/derez()
|
||||
visible_message("<span class='notice'>\The [src] fades away!</span>")
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
sleep(250) // ugly hack, should mean roundstart plants are fine.
|
||||
if(!plant_controller)
|
||||
world << "<span class='danger'>Plant controller does not exist and [src] requires it. Aborting.</span>"
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
seed = plant_controller.seeds[plantname]
|
||||
@@ -65,7 +65,7 @@
|
||||
sleep(250) // ugly hack, should mean roundstart plants are fine.
|
||||
if(!plant_controller)
|
||||
world << "<span class='danger'>Plant controller does not exist and [src] requires it. Aborting.</span>"
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(plant_controller.product_descs["[seed.uid]"])
|
||||
@@ -163,7 +163,7 @@
|
||||
M.Weaken(5)
|
||||
seed.thrown_at(src,M)
|
||||
sleep(-1)
|
||||
if(src) del(src)
|
||||
if(src) qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/throw_impact(atom/hit_atom)
|
||||
@@ -183,13 +183,13 @@
|
||||
user.put_in_hands(pocell)
|
||||
pocell.maxcharge = src.potency * 10
|
||||
pocell.charge = pocell.maxcharge
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
else if(W.sharp)
|
||||
if(seed.kitchen_tag == "pumpkin") // Ugggh these checks are awful.
|
||||
user.show_message("<span class='notice'>You carve a face into [src]!</span>", 1)
|
||||
new /obj/item/clothing/head/pumpkinhead (user.loc)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
else if(seed.chems)
|
||||
if(istype(W,/obj/item/weapon/hatchet) && !isnull(seed.chems["woodpulp"]))
|
||||
@@ -204,22 +204,22 @@
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
user << "You add the newly-formed wood to the stack. It now contains [NG.amount] planks."
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
else if(!isnull(seed.chems["potato"]))
|
||||
user << "You slice \the [src] into sticks."
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/rawsticks(get_turf(src))
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
else if(!isnull(seed.chems["carrotjuice"]))
|
||||
user << "You slice \the [src] into sticks."
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/carrotfries(get_turf(src))
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
else if(!isnull(seed.chems["soymilk"]))
|
||||
user << "You roughly chop up \the [src]."
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/soydope(get_turf(src))
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
if(user)
|
||||
user << "<span class='danger'>\The [src] has fallen to bits.</span>"
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
@@ -296,7 +296,7 @@
|
||||
user.visible_message("<span class='danger'>\The [user] squashes \the [src]!</span>")
|
||||
seed.thrown_at(src,user)
|
||||
sleep(-1)
|
||||
if(src) del(src)
|
||||
if(src) qdel(src)
|
||||
return
|
||||
|
||||
if(seed.kitchen_tag == "grass")
|
||||
@@ -311,13 +311,13 @@
|
||||
continue
|
||||
NG.attackby(G, user)
|
||||
user << "You add the newly-formed grass to the stack. It now contains [G.amount] tiles."
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(seed.get_trait(TRAIT_SPREAD) > 0)
|
||||
user << "<span class='notice'>You plant the [src.name].</span>"
|
||||
new /obj/machinery/portable_atmospherics/hydroponics/soil/invisible(get_turf(user),src.seed)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -327,13 +327,13 @@
|
||||
var/obj/item/stack/medical/bruise_pack/tajaran/poultice = new /obj/item/stack/medical/bruise_pack/tajaran(user.loc)
|
||||
poultice.heal_brute = potency
|
||||
user << "<span class='notice'>You mash the leaves into a poultice.</span>"
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
if("mtear")
|
||||
var/obj/item/stack/medical/ointment/tajaran/poultice = new /obj/item/stack/medical/ointment/tajaran(user.loc)
|
||||
poultice.heal_burn = potency
|
||||
user << "<span class='notice'>You mash the petals into a poultice.</span>"
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
*/
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/kitchenknife/ritual))
|
||||
user << "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>"
|
||||
new /obj/item/clothing/mask/smokable/pipe/cobpipe (user.loc)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/bananapeel
|
||||
|
||||
@@ -102,10 +102,10 @@
|
||||
if(!istype(target))
|
||||
if(istype(target, /mob/living/simple_animal/mouse))
|
||||
new /obj/effect/decal/remains/mouse(get_turf(target))
|
||||
del(target)
|
||||
qdel(target)
|
||||
else if(istype(target, /mob/living/simple_animal/lizard))
|
||||
new /obj/effect/decal/remains/lizard(get_turf(target))
|
||||
del(target)
|
||||
qdel(target)
|
||||
return
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
apply_special_effect(M)
|
||||
splatter(T,thrown)
|
||||
origin_turf.visible_message("<span class='danger'>The [thrown.name] explodes!</span>")
|
||||
del(thrown)
|
||||
qdel(thrown)
|
||||
return
|
||||
|
||||
if(istype(target,/mob/living))
|
||||
@@ -242,7 +242,7 @@
|
||||
if(get_trait(TRAIT_JUICY) && splatted)
|
||||
splatter(origin_turf,thrown)
|
||||
origin_turf.visible_message("<span class='danger'>The [thrown.name] splatters against [target]!</span>")
|
||||
del(thrown)
|
||||
qdel(thrown)
|
||||
|
||||
/datum/seed/proc/handle_environment(var/turf/current_turf, var/datum/gas_mixture/environment, var/light_supplied, var/check_only)
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ var/global/datum/controller/plants/plant_controller // Set in New().
|
||||
/datum/controller/plants/New()
|
||||
if(plant_controller && plant_controller != src)
|
||||
log_debug("Rebuilding plant controller.")
|
||||
del(plant_controller)
|
||||
qdel(plant_controller)
|
||||
plant_controller = src
|
||||
setup()
|
||||
process()
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
seed_name = "berry"
|
||||
display_name = "berry bush"
|
||||
mutants = list("glowberries","poisonberries")
|
||||
chems = list("nutriment" = list(1,10), "berryjuice" = list(1,10))
|
||||
chems = list("nutriment" = list(1,10), "berryjuice" = list(10,10))
|
||||
kitchen_tag = "berries"
|
||||
|
||||
/datum/seed/berry/New()
|
||||
@@ -76,7 +76,7 @@
|
||||
seed_name = "poison berry"
|
||||
display_name = "poison berry bush"
|
||||
mutants = list("deathberries")
|
||||
chems = list("nutriment" = list(1), "toxin" = list(3,5), "poisonberryjuice" = list(3,5))
|
||||
chems = list("nutriment" = list(1), "toxin" = list(3,5), "poisonberryjuice" = list(10,5))
|
||||
|
||||
/datum/seed/berry/poison/New()
|
||||
..()
|
||||
@@ -138,7 +138,7 @@
|
||||
seed_name = "tomato"
|
||||
display_name = "tomato plant"
|
||||
mutants = list("bluetomato","bloodtomato")
|
||||
chems = list("nutriment" = list(1,10), "tomatojuice" = list(1,10))
|
||||
chems = list("nutriment" = list(1,10), "tomatojuice" = list(10,10))
|
||||
kitchen_tag = "tomato"
|
||||
|
||||
/datum/seed/tomato/New()
|
||||
@@ -196,7 +196,7 @@
|
||||
seed_name = "bluespace tomato"
|
||||
display_name = "bluespace tomato plant"
|
||||
mutants = null
|
||||
chems = list("nutriment" = list(1,20), "singulo" = list(1,5))
|
||||
chems = list("nutriment" = list(1,20), "singulo" = list(10,5))
|
||||
|
||||
/datum/seed/tomato/blue/teleport/New()
|
||||
..()
|
||||
@@ -544,7 +544,7 @@
|
||||
seed_name = "grape"
|
||||
display_name = "grapevines"
|
||||
mutants = list("greengrapes")
|
||||
chems = list("nutriment" = list(1,10), "sugar" = list(1,5), "grapejuice" = list(1,10))
|
||||
chems = list("nutriment" = list(1,10), "sugar" = list(1,5), "grapejuice" = list(10,10))
|
||||
|
||||
/datum/seed/grapes/New()
|
||||
..()
|
||||
@@ -563,7 +563,7 @@
|
||||
seed_name = "green grape"
|
||||
display_name = "green grapevines"
|
||||
mutants = null
|
||||
chems = list("nutriment" = list(1,10), "kelotane" = list(3,5), "grapejuice" = list(1,10))
|
||||
chems = list("nutriment" = list(1,10), "kelotane" = list(3,5), "grapejuice" = list(10,10))
|
||||
|
||||
/datum/seed/grapes/green/New()
|
||||
..()
|
||||
@@ -610,7 +610,7 @@
|
||||
name = "banana"
|
||||
seed_name = "banana"
|
||||
display_name = "banana tree"
|
||||
chems = list("banana" = list(1,10))
|
||||
chems = list("banana" = list(10,10))
|
||||
trash_type = /obj/item/weapon/bananapeel
|
||||
kitchen_tag = "banana"
|
||||
|
||||
@@ -648,7 +648,7 @@
|
||||
name = "potato"
|
||||
seed_name = "potato"
|
||||
display_name = "potatoes"
|
||||
chems = list("nutriment" = list(1,10), "potato" = list(1,10))
|
||||
chems = list("nutriment" = list(1,10), "potato" = list(10,10))
|
||||
kitchen_tag = "potato"
|
||||
|
||||
/datum/seed/potato/New()
|
||||
@@ -666,7 +666,7 @@
|
||||
name = "soybean"
|
||||
seed_name = "soybean"
|
||||
display_name = "soybeans"
|
||||
chems = list("nutriment" = list(1,20), "soymilk" = list(1,20))
|
||||
chems = list("nutriment" = list(1,20), "soymilk" = list(10,20))
|
||||
kitchen_tag = "soybeans"
|
||||
|
||||
/datum/seed/soybean/New()
|
||||
@@ -720,7 +720,7 @@
|
||||
name = "carrot"
|
||||
seed_name = "carrot"
|
||||
display_name = "carrots"
|
||||
chems = list("nutriment" = list(1,20), "imidazoline" = list(3,5), "carrotjuice" = list(1,20))
|
||||
chems = list("nutriment" = list(1,20), "imidazoline" = list(3,5), "carrotjuice" = list(10,20))
|
||||
kitchen_tag = "carrot"
|
||||
|
||||
/datum/seed/carrots/New()
|
||||
@@ -790,7 +790,7 @@
|
||||
name = "watermelon"
|
||||
seed_name = "watermelon"
|
||||
display_name = "watermelon vine"
|
||||
chems = list("nutriment" = list(1,6), "watermelonjuice" = list(1,6))
|
||||
chems = list("nutriment" = list(1,6), "watermelonjuice" = list(10,6))
|
||||
|
||||
/datum/seed/watermelon/New()
|
||||
..()
|
||||
@@ -828,7 +828,7 @@
|
||||
name = "lime"
|
||||
seed_name = "lime"
|
||||
display_name = "lime trees"
|
||||
chems = list("nutriment" = list(1,20), "limejuice" = list(1,20))
|
||||
chems = list("nutriment" = list(1,20), "limejuice" = list(10,20))
|
||||
kitchen_tag = "lime"
|
||||
|
||||
/datum/seed/citrus/New()
|
||||
@@ -847,7 +847,7 @@
|
||||
name = "lemon"
|
||||
seed_name = "lemon"
|
||||
display_name = "lemon trees"
|
||||
chems = list("nutriment" = list(1,20), "lemonjuice" = list(1,20))
|
||||
chems = list("nutriment" = list(1,20), "lemonjuice" = list(10,20))
|
||||
kitchen_tag = "lemon"
|
||||
|
||||
/datum/seed/citrus/lemon/New()
|
||||
@@ -860,7 +860,7 @@
|
||||
seed_name = "orange"
|
||||
display_name = "orange trees"
|
||||
kitchen_tag = "orange"
|
||||
chems = list("nutriment" = list(1,20), "orangejuice" = list(1,20))
|
||||
chems = list("nutriment" = list(1,20), "orangejuice" = list(10,20))
|
||||
|
||||
/datum/seed/citrus/orange/New()
|
||||
..()
|
||||
@@ -906,7 +906,7 @@
|
||||
seed_name = "cherry"
|
||||
seed_noun = "pits"
|
||||
display_name = "cherry tree"
|
||||
chems = list("nutriment" = list(1,15), "sugar" = list(1,15), "cherryjelly" = list(1,15))
|
||||
chems = list("nutriment" = list(1,15), "sugar" = list(1,15), "cherryjelly" = list(10,15))
|
||||
kitchen_tag = "cherries"
|
||||
|
||||
/datum/seed/cherries/New()
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
genetics = seed.seed
|
||||
degradation = 0
|
||||
|
||||
del(seed)
|
||||
qdel(seed)
|
||||
seed = null
|
||||
|
||||
if(href_list["get_gene"])
|
||||
|
||||
@@ -188,16 +188,16 @@
|
||||
N.seeds -= O
|
||||
if (N.amount <= 0 || N.seeds.len <= 0)
|
||||
piles -= N
|
||||
del(N)
|
||||
qdel(N)
|
||||
O.loc = src.loc
|
||||
else
|
||||
piles -= N
|
||||
del(N)
|
||||
qdel(N)
|
||||
else if (task == "purge")
|
||||
for (var/obj/O in N.seeds)
|
||||
del(O)
|
||||
qdel(O)
|
||||
piles -= N
|
||||
del(N)
|
||||
qdel(N)
|
||||
break
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
color = DEAD_PLANT_COLOUR
|
||||
|
||||
/obj/effect/dead_plant/attack_hand()
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/dead_plant/attackby()
|
||||
..()
|
||||
for(var/obj/effect/plant/neighbor in range(1))
|
||||
neighbor.update_neighbors()
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/plant
|
||||
name = "plant"
|
||||
@@ -60,7 +60,7 @@
|
||||
var/last_tick = 0
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/plant
|
||||
|
||||
/obj/effect/plant/Del()
|
||||
/obj/effect/plant/Destroy()
|
||||
if(plant_controller)
|
||||
plant_controller.remove_plant(src)
|
||||
for(var/obj/effect/plant/neighbor in range(1,src))
|
||||
@@ -81,14 +81,14 @@
|
||||
sleep(250) // ugly hack, should mean roundstart plants are fine.
|
||||
if(!plant_controller)
|
||||
world << "<span class='danger'>Plant controller does not exist and [src] requires it. Aborting.</span>"
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(!istype(newseed))
|
||||
newseed = plant_controller.seeds[DEFAULT_SEED]
|
||||
seed = newseed
|
||||
if(!seed)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
name = seed.display_name
|
||||
|
||||
@@ -99,6 +99,6 @@
|
||||
for(var/obj/effect/plant/neighbor in check_turf.contents)
|
||||
neighbor.neighbors |= check_turf
|
||||
plant_controller.add_plant(neighbor)
|
||||
spawn(1) if(src) del(src)
|
||||
spawn(1) if(src) qdel(src)
|
||||
|
||||
#undef NEIGHBOR_REFRESH_TIME
|
||||
@@ -457,7 +457,7 @@
|
||||
|
||||
if(!S.seed)
|
||||
user << "The packet seems to be empty. You throw it away."
|
||||
del(O)
|
||||
qdel(O)
|
||||
return
|
||||
|
||||
user << "You plant the [S.seed.seed_name] [S.seed.seed_noun]."
|
||||
@@ -468,7 +468,7 @@
|
||||
health = (istype(S, /obj/item/seeds/cutting) ? round(seed.get_trait(TRAIT_ENDURANCE)/rand(2,5)) : seed.get_trait(TRAIT_ENDURANCE))
|
||||
lastcycle = world.time
|
||||
|
||||
del(O)
|
||||
qdel(O)
|
||||
|
||||
check_health()
|
||||
|
||||
@@ -503,7 +503,7 @@
|
||||
weedlevel -= spray.weed_kill_str
|
||||
user << "You spray [src] with [O]."
|
||||
playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6)
|
||||
del(O)
|
||||
qdel(O)
|
||||
check_health()
|
||||
|
||||
else if(mechanical && istype(O, /obj/item/weapon/wrench))
|
||||
@@ -522,13 +522,13 @@
|
||||
user << "<span class='danger'>[src] is already occupied!</span>"
|
||||
else
|
||||
user.drop_item()
|
||||
del(O)
|
||||
qdel(O)
|
||||
|
||||
var/obj/machinery/apiary/A = new(src.loc)
|
||||
A.icon = src.icon
|
||||
A.icon_state = src.icon_state
|
||||
A.hydrotray_type = src.type
|
||||
del(src)
|
||||
qdel(src)
|
||||
else if(O.force && seed)
|
||||
user.visible_message("<span class='danger'>\The [seed.display_name] has been attacked by [user] with \the [O]!</span>")
|
||||
if(!dead)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
health = 10
|
||||
nutrilevel += 10
|
||||
user.drop_item()
|
||||
del(O)
|
||||
qdel(O)
|
||||
user << "\blue You carefully insert the queen into [src], she gets busy making a hive."
|
||||
bees_in_hive = 0
|
||||
else if(istype(O, /obj/item/beezeez))
|
||||
@@ -62,7 +62,7 @@
|
||||
user << "\blue You insert [O] into [src]. A relaxed humming appears to pick up."
|
||||
else
|
||||
user << "\blue You insert [O] into [src]. Now it just needs some bees."
|
||||
del(O)
|
||||
qdel(O)
|
||||
else if(istype(O, /obj/item/weapon/minihoe))
|
||||
if(health > 0)
|
||||
user << "\red <b>You begin to dislodge the apiary from the tray, the bees don't like that.</b>"
|
||||
@@ -73,7 +73,7 @@
|
||||
new hydrotray_type(src.loc)
|
||||
new /obj/item/apiary(src.loc)
|
||||
user << "\red You dislodge the apiary from the tray."
|
||||
del(src)
|
||||
qdel(src)
|
||||
else if(istype(O, /obj/item/weapon/bee_net))
|
||||
var/obj/item/weapon/bee_net/N = O
|
||||
if(N.caught_bees > 0)
|
||||
@@ -115,11 +115,11 @@
|
||||
if(swarming <= 0)
|
||||
for(var/mob/living/simple_animal/bee/B in src.loc)
|
||||
bees_in_hive += B.strength
|
||||
del(B)
|
||||
qdel(B)
|
||||
else if(bees_in_hive < 10)
|
||||
for(var/mob/living/simple_animal/bee/B in src.loc)
|
||||
bees_in_hive += B.strength
|
||||
del(B)
|
||||
qdel(B)
|
||||
|
||||
if(world.time > (lastcycle + cycledelay))
|
||||
lastcycle = world.time
|
||||
@@ -199,7 +199,7 @@
|
||||
B.target_turf = get_turf(src)
|
||||
B.strength -= 1
|
||||
if(B.strength <= 0)
|
||||
del(B)
|
||||
qdel(B)
|
||||
else if(B.strength <= 5)
|
||||
B.icon_state = "bees[B.strength]"
|
||||
bees_in_hive = 0
|
||||
|
||||
@@ -41,25 +41,25 @@
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/remove_dead()
|
||||
..()
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/harvest()
|
||||
..()
|
||||
if(!seed) // Repeat harvests are a thing.
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/die()
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/process()
|
||||
if(!seed)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
else if(name=="plant")
|
||||
name = seed.display_name
|
||||
..()
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/Del()
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/Destroy()
|
||||
// Check if we're masking a decal that needs to be visible again.
|
||||
for(var/obj/effect/plant/plant in get_turf(src))
|
||||
if(plant.invisibility == INVISIBILITY_MAXIMUM)
|
||||
|
||||
@@ -277,4 +277,4 @@
|
||||
for(var/obj/effect/plant/B in orange(A,1))
|
||||
if(prob(80))
|
||||
B.die_off(1)
|
||||
del A
|
||||
qdel(A)
|
||||
@@ -56,20 +56,20 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/obj/item/weapon/book/b in contents)
|
||||
del(b)
|
||||
del(src)
|
||||
qdel(b)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
for(var/obj/item/weapon/book/b in contents)
|
||||
if (prob(50)) b.loc = (get_turf(src))
|
||||
else del(b)
|
||||
del(src)
|
||||
else qdel(b)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(50))
|
||||
for(var/obj/item/weapon/book/b in contents)
|
||||
b.loc = (get_turf(src))
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
@@ -463,6 +463,6 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
b.dat = O:info
|
||||
b.name = "Print Job #" + "[rand(100, 999)]"
|
||||
b.icon_state = "book[rand(1,7)]"
|
||||
del(O)
|
||||
qdel(O)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -16,16 +16,16 @@ datum/puddle/proc/process()
|
||||
L.apply_calculated_effect()
|
||||
|
||||
if(liquid_objects.len == 0)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
datum/puddle/New()
|
||||
..()
|
||||
puddles += src
|
||||
|
||||
datum/puddle/Del()
|
||||
datum/puddle/Destroy()
|
||||
puddles -= src
|
||||
for(var/obj/O in liquid_objects)
|
||||
del(O)
|
||||
qdel(O)
|
||||
..()
|
||||
|
||||
client/proc/splash()
|
||||
@@ -63,11 +63,11 @@ obj/effect/liquid
|
||||
obj/effect/liquid/New()
|
||||
..()
|
||||
if( !isturf(loc) )
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
for( var/obj/effect/liquid/L in loc )
|
||||
if(L != src)
|
||||
del(L)
|
||||
qdel(L)
|
||||
|
||||
obj/effect/liquid/proc/spread()
|
||||
|
||||
@@ -124,14 +124,14 @@ obj/effect/liquid/proc/apply_calculated_effect()
|
||||
volume += new_volume
|
||||
|
||||
if(volume < LIQUID_TRANSFER_THRESHOLD)
|
||||
del(src)
|
||||
qdel(src)
|
||||
new_volume = 0
|
||||
update_icon2()
|
||||
|
||||
obj/effect/liquid/Move()
|
||||
return 0
|
||||
|
||||
obj/effect/liquid/Del()
|
||||
obj/effect/liquid/Destroy()
|
||||
src.controller.liquid_objects.Remove(src)
|
||||
..()
|
||||
|
||||
@@ -140,7 +140,7 @@ obj/effect/liquid/proc/update_icon2()
|
||||
|
||||
switch(volume)
|
||||
if(0 to 0.1)
|
||||
del(src)
|
||||
qdel(src)
|
||||
if(0.1 to 5)
|
||||
icon_state = "1"
|
||||
if(5 to 10)
|
||||
|
||||
+678
-678
File diff suppressed because it is too large
Load Diff
@@ -164,7 +164,7 @@
|
||||
user << "<span class='danger'>The crate's anti-tamper system activates!</span>"
|
||||
var/turf/T = get_turf(src.loc)
|
||||
explosion(T, 0, 0, 0, 1)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
user << "<span class='notice'>You attempt to interact with the device using a hand gesture, but it appears this crate is from before the DECANECT came out.</span>"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
if (machine)
|
||||
machine.console = src
|
||||
else
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
if (machine)
|
||||
machine.console = src
|
||||
else
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
@@ -85,7 +85,7 @@
|
||||
var/obj/item/stack/S = new stacktype(src)
|
||||
stack_storage[S.name] = 0
|
||||
stack_paths[S.name] = stacktype
|
||||
del(S)
|
||||
qdel(S)
|
||||
|
||||
stack_storage["glass"] = 0
|
||||
stack_paths["glass"] = /obj/item/stack/sheet/glass
|
||||
|
||||
@@ -319,7 +319,7 @@
|
||||
if(!S || S.field_type != get_responsive_reagent(F.find_type))
|
||||
if(X)
|
||||
visible_message("\red<b>[pick("[display_name] crumbles away into dust","[display_name] breaks apart")].</b>")
|
||||
del(X)
|
||||
qdel(X)
|
||||
|
||||
finds.Remove(F)
|
||||
|
||||
|
||||
@@ -42,22 +42,22 @@
|
||||
if(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/gold))
|
||||
amt_gold += 100 * O.get_amount()
|
||||
del(O)
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/silver))
|
||||
amt_silver += 100 * O.get_amount()
|
||||
del(O)
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/diamond))
|
||||
amt_diamond += 100 * O.get_amount()
|
||||
del(O)
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/phoron))
|
||||
amt_phoron += 100 * O.get_amount()
|
||||
del(O)
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/uranium))
|
||||
amt_uranium += 100 * O.get_amount()
|
||||
del(O)
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/metal))
|
||||
amt_iron += 100 * O.get_amount()
|
||||
del(O)
|
||||
qdel(O)
|
||||
|
||||
/obj/machinery/mineral/mint/attack_hand(user as mob)
|
||||
|
||||
|
||||
@@ -97,5 +97,5 @@
|
||||
for (var/obj/item/weapon/ore/O in contents)
|
||||
O.loc = src.loc
|
||||
O.ex_act(severity++)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -2,4 +2,4 @@
|
||||
..()
|
||||
spawn(0)
|
||||
if(src && !key) //we've transferred to another mob. This ghost should be deleted.
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -81,10 +81,10 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images
|
||||
real_name = name
|
||||
..()
|
||||
|
||||
/mob/dead/observer/Del()
|
||||
/mob/dead/observer/Destroy()
|
||||
if (ghostimage)
|
||||
ghost_darkness_images -= ghostimage
|
||||
del(ghostimage)
|
||||
qdel(ghostimage)
|
||||
ghostimage = null
|
||||
updateallghostimages()
|
||||
..()
|
||||
@@ -484,6 +484,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
//This is called when a ghost is drag clicked to something.
|
||||
/mob/dead/observer/MouseDrop(atom/over)
|
||||
if(!usr || !over) return
|
||||
if (isobserver(usr) && usr.client && usr.client.holder && isliving(over))
|
||||
if (usr.client.holder.cmd_ghost_drag(src,over))
|
||||
return
|
||||
@@ -597,7 +598,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
for(var/image/I in client.images)
|
||||
if(I.icon_state == icon)
|
||||
iconRemoved = 1
|
||||
del(I)
|
||||
qdel(I)
|
||||
|
||||
if(!iconRemoved)
|
||||
var/image/J = image('icons/mob/mob.dmi', loc = src, icon_state = icon)
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
if(do_gibs) gibs(loc, viruses, dna)
|
||||
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
//This is the proc for turning a mob into ash. Mostly a copy of gib code (above).
|
||||
//Originally created for wizard disintegrate. I've removed the virus code since it's irrelevant here.
|
||||
@@ -43,8 +43,8 @@
|
||||
|
||||
dead_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
|
||||
/mob/proc/death(gibbed,deathmessage="seizes up and falls limp...")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// The datum containing all the chunks.
|
||||
|
||||
/datum/visualnet/camera
|
||||
// The cameras on the map, no matter if they work or not. Updated in obj/machinery/camera.dm by New() and Del().
|
||||
// The cameras on the map, no matter if they work or not. Updated in obj/machinery/camera.dm by New() and Destroy().
|
||||
var/list/cameras = list()
|
||||
var/cameras_unsorted = 1
|
||||
chunk_type = /datum/chunk/camera
|
||||
|
||||
@@ -39,10 +39,11 @@
|
||||
if(eyeobj)
|
||||
eyeobj.loc = src.loc
|
||||
|
||||
/mob/living/silicon/ai/Del()
|
||||
/mob/living/silicon/ai/Destroy()
|
||||
if(eyeobj)
|
||||
eyeobj.owner = null
|
||||
del(eyeobj) // No AI, no Eye
|
||||
qdel(eyeobj) // No AI, no Eye
|
||||
eyeobj = null
|
||||
..()
|
||||
|
||||
/atom/proc/move_camera_by_click()
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
dd_insertObjectList(cameranet.cameras, src)
|
||||
update_coverage(1)
|
||||
|
||||
/obj/machinery/camera/Del()
|
||||
/obj/machinery/camera/Destroy()
|
||||
cameranet.cameras -= src
|
||||
clear_all_networks()
|
||||
..()
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
updateallghostimages()
|
||||
..()
|
||||
|
||||
mob/eye/Del()
|
||||
mob/eye/Destroy()
|
||||
if (ghostimage)
|
||||
ghost_darkness_images -= ghostimage
|
||||
ghost_sightless_images -= ghostimage
|
||||
del(ghostimage)
|
||||
qdel(ghostimage)
|
||||
ghostimage = null
|
||||
updateallghostimages()
|
||||
..()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
..()
|
||||
cultnet.updateVisibility(src, 0)
|
||||
|
||||
/mob/living/Del()
|
||||
/mob/living/Destroy()
|
||||
cultnet.updateVisibility(src, 0)
|
||||
..()
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
HOW IT WORKS
|
||||
|
||||
It works by first creating a camera network datum. Inside of this camera network are "chunks" (which will be
|
||||
explained later) and "cameras". The cameras list is kept up to date by obj/machinery/camera/New() and Del().
|
||||
explained later) and "cameras". The cameras list is kept up to date by obj/machinery/camera/New() and Destroy().
|
||||
|
||||
Next the camera network has chunks. These chunks are a 16x16 tile block of turfs and cameras contained inside the chunk.
|
||||
These turfs are then sorted out based on what the cameras can and cannot see. If none of the cameras can see the turf, inside
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/turf/drain_power()
|
||||
return -1
|
||||
|
||||
/turf/simulated/Del()
|
||||
/turf/simulated/Destroy()
|
||||
updateVisibility(src)
|
||||
..()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
// STRUCTURES
|
||||
|
||||
/obj/structure/Del()
|
||||
/obj/structure/Destroy()
|
||||
updateVisibility(src)
|
||||
..()
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
|
||||
// EFFECTS
|
||||
|
||||
/obj/effect/Del()
|
||||
/obj/effect/Destroy()
|
||||
updateVisibility(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/effect/New()
|
||||
..()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
..()
|
||||
visual_nets += src
|
||||
|
||||
/datum/visualnet/Del()
|
||||
/datum/visualnet/Destroy()
|
||||
visual_nets -= src
|
||||
..()
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/item/weapon/holder/Del()
|
||||
/obj/item/weapon/holder/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
mob_container.forceMove(get_turf(src))
|
||||
M.reset_view()
|
||||
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/holder/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
for(var/mob/M in src.contents)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
if(!W.mob_can_equip(src, slot))
|
||||
if(del_on_fail)
|
||||
del(W)
|
||||
qdel(W)
|
||||
else
|
||||
if(!disable_warning)
|
||||
src << "\red You are unable to equip that." //Only print if del_on_fail is false
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
B << "To create this node you will have to be on a normal blob tile and far enough away from any other node."
|
||||
B << "Check your Blob verbs and hit Create Node to build a node."
|
||||
spawn(10)
|
||||
del(G_found)
|
||||
qdel(G_found)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -120,4 +120,4 @@
|
||||
update_icons()
|
||||
|
||||
/mob/living/bot/proc/explode()
|
||||
del(src)
|
||||
qdel(src)
|
||||
@@ -154,7 +154,7 @@
|
||||
f.dirt = 0
|
||||
if(!D)
|
||||
return
|
||||
del(D)
|
||||
qdel(D)
|
||||
cleaning = 0
|
||||
update_icons()
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/mob/living/bot/cleanbot/update_icons()
|
||||
@@ -289,13 +289,13 @@
|
||||
..()
|
||||
if(istype(O, /obj/item/robot_parts/l_arm) || istype(O, /obj/item/robot_parts/r_arm))
|
||||
user.drop_item()
|
||||
del(O)
|
||||
qdel(O)
|
||||
var/turf/T = get_turf(loc)
|
||||
var/mob/living/bot/cleanbot/A = new /mob/living/bot/cleanbot(T)
|
||||
A.name = created_name
|
||||
user << "<span class='notice'>You add the robot arm to the bucket and sensor assembly. Beep boop!</span>"
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(O, /obj/item/weapon/pen))
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
s.start()
|
||||
|
||||
new /obj/effect/decal/cleanable/blood/oil(Tsec)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/bot/secbot/ed209/RangedAttack(var/atom/A)
|
||||
if(last_shot + shot_delay > world.time)
|
||||
@@ -97,7 +97,7 @@
|
||||
if(0, 1)
|
||||
if(istype(W, /obj/item/robot_parts/l_leg) || istype(W, /obj/item/robot_parts/r_leg))
|
||||
user.drop_item()
|
||||
del(W)
|
||||
qdel(W)
|
||||
build_step++
|
||||
user << "<span class='notice'>You add the robot leg to [src].</span>"
|
||||
name = "legs/frame assembly"
|
||||
@@ -111,7 +111,7 @@
|
||||
if(2)
|
||||
if(istype(W, /obj/item/clothing/suit/storage/vest))
|
||||
user.drop_item()
|
||||
del(W)
|
||||
qdel(W)
|
||||
build_step++
|
||||
user << "<span class='notice'>You add the armor to [src].</span>"
|
||||
name = "vest/legs/frame assembly"
|
||||
@@ -128,7 +128,7 @@
|
||||
if(4)
|
||||
if(istype(W, /obj/item/clothing/head/helmet))
|
||||
user.drop_item()
|
||||
del(W)
|
||||
qdel(W)
|
||||
build_step++
|
||||
user << "<span class='notice'>You add the helmet to [src].</span>"
|
||||
name = "covered and shielded frame assembly"
|
||||
@@ -138,7 +138,7 @@
|
||||
if(5)
|
||||
if(isprox(W))
|
||||
user.drop_item()
|
||||
del(W)
|
||||
qdel(W)
|
||||
build_step++
|
||||
user << "<span class='notice'>You add the prox sensor to [src].</span>"
|
||||
name = "covered, shielded and sensored frame assembly"
|
||||
@@ -167,7 +167,7 @@
|
||||
item_state = "ed209_taser"
|
||||
icon_state = "ed209_taser"
|
||||
user.drop_item()
|
||||
del(W)
|
||||
qdel(W)
|
||||
|
||||
if(8)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
@@ -187,6 +187,6 @@
|
||||
var/turf/T = get_turf(src)
|
||||
new /mob/living/bot/secbot/ed209(T,created_name,lasercolor)
|
||||
user.drop_item()
|
||||
del(W)
|
||||
qdel(W)
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/mob/living/bot/farmbot/proc/process_tray(var/obj/machinery/portable_atmospherics/hydroponics/tray)
|
||||
@@ -308,7 +308,7 @@
|
||||
user << "You add the robot arm to [src]."
|
||||
loc = A //Place the water tank into the assembly, it will be needed for the finished bot
|
||||
user.drop_from_inventory(S)
|
||||
del(S)
|
||||
qdel(S)
|
||||
|
||||
/obj/item/weapon/farmbot_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
@@ -317,21 +317,21 @@
|
||||
user << "You add the plant analyzer to [src]."
|
||||
name = "farmbot assembly"
|
||||
user.remove_from_mob(W)
|
||||
del(W)
|
||||
qdel(W)
|
||||
|
||||
else if((istype(W, /obj/item/weapon/reagent_containers/glass/bucket)) && (build_step == 1))
|
||||
build_step++
|
||||
user << "You add a bucket to [src]."
|
||||
name = "farmbot assembly with bucket"
|
||||
user.remove_from_mob(W)
|
||||
del(W)
|
||||
qdel(W)
|
||||
|
||||
else if((istype(W, /obj/item/weapon/minihoe)) && (build_step == 2))
|
||||
build_step++
|
||||
user << "You add a minihoe to [src]."
|
||||
name = "farmbot assembly with bucket and minihoe"
|
||||
user.remove_from_mob(W)
|
||||
del(W)
|
||||
qdel(W)
|
||||
|
||||
else if((isprox(W)) && (build_step == 3))
|
||||
build_step++
|
||||
@@ -342,8 +342,8 @@
|
||||
S.tank = wTank
|
||||
S.name = created_name
|
||||
user.remove_from_mob(W)
|
||||
del(W)
|
||||
del(src)
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", name, created_name) as text
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/bot/floorbot/proc/addTiles(var/am)
|
||||
amount += am
|
||||
@@ -299,7 +299,7 @@
|
||||
user.put_in_hands(B)
|
||||
user << "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>"
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='warning'>You need 10 floor tiles for a floorbot.</span>"
|
||||
return
|
||||
@@ -319,13 +319,13 @@
|
||||
/obj/item/weapon/toolbox_tiles/attackby(var/obj/item/W, mob/user as mob)
|
||||
..()
|
||||
if(isprox(W))
|
||||
del(W)
|
||||
qdel(W)
|
||||
var/obj/item/weapon/toolbox_tiles_sensor/B = new /obj/item/weapon/toolbox_tiles_sensor()
|
||||
B.created_name = created_name
|
||||
user.put_in_hands(B)
|
||||
user << "<span class='notice'>You add the sensor to the toolbox and tiles!</span>"
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN)
|
||||
if(!t)
|
||||
@@ -349,13 +349,13 @@
|
||||
/obj/item/weapon/toolbox_tiles_sensor/attackby(var/obj/item/W, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm))
|
||||
del(W)
|
||||
qdel(W)
|
||||
var/turf/T = get_turf(user.loc)
|
||||
var/mob/living/bot/floorbot/A = new /mob/living/bot/floorbot(T)
|
||||
A.name = created_name
|
||||
user << "<span class='notice'>You add the robot arm to the odd looking toolbox assembly! Boop beep!</span>"
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN)
|
||||
if(!t)
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/mob/living/bot/medbot/proc/valid_healing_target(var/mob/living/carbon/human/H)
|
||||
@@ -310,11 +310,11 @@
|
||||
else if(istype(src, /obj/item/weapon/storage/firstaid/o2))
|
||||
A.skin = "o2"
|
||||
|
||||
del(S)
|
||||
qdel(S)
|
||||
user.put_in_hands(A)
|
||||
user << "<span class='notice'>You add the robot arm to the first aid kit.</span>"
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/firstaid_arm_assembly
|
||||
name = "first aid/robot arm assembly"
|
||||
@@ -346,7 +346,7 @@
|
||||
if(0)
|
||||
if(istype(W, /obj/item/device/healthanalyzer))
|
||||
user.drop_item()
|
||||
del(W)
|
||||
qdel(W)
|
||||
build_step++
|
||||
user << "<span class='notice'>You add the health sensor to [src].</span>"
|
||||
name = "First aid/robot arm/health analyzer assembly"
|
||||
@@ -355,11 +355,11 @@
|
||||
if(1)
|
||||
if(isprox(W))
|
||||
user.drop_item()
|
||||
del(W)
|
||||
qdel(W)
|
||||
user << "<span class='notice'>You complete the Medibot! Beep boop.</span>"
|
||||
var/turf/T = get_turf(src)
|
||||
var/mob/living/bot/medbot/S = new /mob/living/bot/medbot(T)
|
||||
S.skin = skin
|
||||
S.name = created_name
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -309,7 +309,7 @@
|
||||
s.start()
|
||||
|
||||
new /obj/effect/decal/cleanable/blood/oil(Tsec)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/bot/secbot/proc/scan_view()
|
||||
for(var/mob/living/M in view(7, src))
|
||||
@@ -519,12 +519,12 @@
|
||||
return
|
||||
|
||||
if(S.secured)
|
||||
del(S)
|
||||
qdel(S)
|
||||
var/obj/item/weapon/secbot_assembly/A = new /obj/item/weapon/secbot_assembly
|
||||
user.put_in_hands(A)
|
||||
user << "You add the signaler to the helmet."
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
return
|
||||
|
||||
@@ -552,7 +552,7 @@
|
||||
user << "You add \the [O] to [src]."
|
||||
overlays += image('icons/obj/aibots.dmi', "hs_eye")
|
||||
name = "helmet/signaler/prox sensor assembly"
|
||||
del(O)
|
||||
qdel(O)
|
||||
|
||||
else if((istype(O, /obj/item/robot_parts/l_arm) || istype(O, /obj/item/robot_parts/r_arm)) && build_step == 2)
|
||||
user.drop_item()
|
||||
@@ -560,15 +560,15 @@
|
||||
user << "You add \the [O] to [src]."
|
||||
name = "helmet/signaler/prox sensor/robot arm assembly"
|
||||
overlays += image('icons/obj/aibots.dmi', "hs_arm")
|
||||
del(O)
|
||||
qdel(O)
|
||||
|
||||
else if(istype(O, /obj/item/weapon/melee/baton) && build_step == 3)
|
||||
user.drop_item()
|
||||
user << "You complete the Securitron! Beep boop."
|
||||
var/mob/living/bot/secbot/S = new /mob/living/bot/secbot(get_turf(src))
|
||||
S.name = created_name
|
||||
del(O)
|
||||
del(src)
|
||||
qdel(O)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(O, /obj/item/weapon/pen))
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
if(istype(loc,/obj/item/weapon/holder/diona))
|
||||
var/obj/item/weapon/holder/diona/L = loc
|
||||
src.loc = L.loc
|
||||
del(L)
|
||||
qdel(L)
|
||||
|
||||
src.visible_message("\red [src] begins to shift and quiver, and erupts in a shower of shed bark as it splits into a tangle of nearly a dozen new dionaea.","\red You begin to shift and quiver, feeling your awareness splinter. All at once, we consume our stored nutrients to surge with growth, splitting into a tangle of at least a dozen new dionaea. We have attained our gestalt form.")
|
||||
return "Diona"
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
for(var/datum/language/L in languages)
|
||||
adult.add_language(L.name)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/carbon/alien/proc/update_progression()
|
||||
if(amount_grown < max_grown)
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
var/locked = 0
|
||||
var/mob/living/carbon/brain/brainmob = null//The current occupant.
|
||||
var/mob/living/silicon/robot = null//Appears unused.
|
||||
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
@@ -61,7 +60,7 @@
|
||||
living_mob_list += brainmob
|
||||
|
||||
user.drop_item()
|
||||
del(O)
|
||||
qdel(O)
|
||||
|
||||
name = "Man-Machine Interface: [brainmob.real_name]"
|
||||
icon_state = "mmi_full"
|
||||
@@ -115,6 +114,15 @@
|
||||
locked = 1
|
||||
return
|
||||
|
||||
/obj/item/device/mmi/Destroy()
|
||||
if(isrobot(loc))
|
||||
var/mob/living/silicon/robot/borg = loc
|
||||
borg.mmi = null
|
||||
if(brainmob)
|
||||
qdel(brainmob)
|
||||
brainmob = null
|
||||
..()
|
||||
|
||||
/obj/item/device/mmi/radio_enabled
|
||||
name = "radio-enabled man-machine interface"
|
||||
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity. This one comes with a built-in radio."
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
R.my_atom = src
|
||||
..()
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
|
||||
if(stat!=DEAD) //If not dead.
|
||||
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
if(brainmob && brainmob.client)
|
||||
brainmob.client.screen.len = null //clear the hud
|
||||
|
||||
/obj/item/organ/brain/Destroy()
|
||||
if(brainmob)
|
||||
qdel(brainmob)
|
||||
brainmob = null
|
||||
..()
|
||||
|
||||
/obj/item/organ/brain/proc/transfer_identity(var/mob/living/carbon/H)
|
||||
name = "\the [H]'s [initial(src.name)]"
|
||||
brainmob = new(src)
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
/mob/living/carbon/brain/gib()
|
||||
if(istype(container, /obj/item/device/mmi))
|
||||
del(container)//Gets rid of the MMI if there is one
|
||||
qdel(container)//Gets rid of the MMI if there is one
|
||||
if(loc)
|
||||
if(istype(loc,/obj/item/organ/brain))
|
||||
del(loc)//Gets rid of the brain item
|
||||
qdel(loc)//Gets rid of the brain item
|
||||
..(null,1)
|
||||
@@ -7,6 +7,13 @@
|
||||
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
|
||||
germ_level++
|
||||
|
||||
/mob/living/carbon/Destroy()
|
||||
for(var/guts in internal_organs)
|
||||
qdel(guts)
|
||||
for(var/food in stomach_contents)
|
||||
qdel(food)
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/Move(NewLoc, direct)
|
||||
. = ..()
|
||||
if(.)
|
||||
|
||||
@@ -119,14 +119,14 @@
|
||||
m_type = 1
|
||||
if ("flap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> flaps his wings."
|
||||
message = "<B>[src]</B> flaps \his wings."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if ("aflap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> flaps his wings ANGRILY!"
|
||||
message = "<B>[src]</B> flaps \his wings ANGRILY!"
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
@@ -618,4 +618,4 @@
|
||||
HTML += "<hr />"
|
||||
HTML +="<a href='?src=\ref[src];flavor_change=done'>\[Done\]</a>"
|
||||
HTML += "<tt>"
|
||||
src << browse(HTML, "window=flavor_changes;size=430x300")
|
||||
src << browse(HTML, "window=flavor_changes;size=430x300")
|
||||
|
||||
@@ -47,6 +47,11 @@
|
||||
dna.real_name = real_name
|
||||
make_blood()
|
||||
|
||||
/mob/living/carbon/human/Destroy()
|
||||
for(var/organ in organs)
|
||||
qdel(organ)
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
@@ -65,7 +70,7 @@
|
||||
|
||||
if (internal)
|
||||
if (!internal.air_contents)
|
||||
del(internal)
|
||||
qdel(internal)
|
||||
else
|
||||
stat("Internal Atmosphere Info", internal.name)
|
||||
stat("Tank Pressure", internal.air_contents.return_pressure())
|
||||
@@ -818,7 +823,7 @@
|
||||
for(var/x in all_hairs)
|
||||
var/datum/sprite_accessory/hair/H = new x // create new hair datum based on type x
|
||||
hairs.Add(H.name) // add hair name to hairs
|
||||
del(H) // delete the hair after it's all done
|
||||
qdel(H) // delete the hair after it's all done
|
||||
|
||||
var/new_style = input("Please select hair style", "Character Generation",h_style) as null|anything in hairs
|
||||
|
||||
@@ -833,7 +838,7 @@
|
||||
for(var/x in all_fhairs)
|
||||
var/datum/sprite_accessory/facial_hair/H = new x
|
||||
fhairs.Add(H.name)
|
||||
del(H)
|
||||
qdel(H)
|
||||
|
||||
new_style = input("Please select facial style", "Character Generation",f_style) as null|anything in fhairs
|
||||
|
||||
@@ -944,7 +949,7 @@
|
||||
if(H.brainmob.real_name == src.real_name)
|
||||
if(H.brainmob.mind)
|
||||
H.brainmob.mind.transfer_to(src)
|
||||
del(H)
|
||||
qdel(H)
|
||||
|
||||
for (var/datum/disease/virus in viruses)
|
||||
virus.cure()
|
||||
@@ -1017,7 +1022,7 @@
|
||||
.=..()
|
||||
if(clean_feet && !shoes && istype(feet_blood_DNA, /list) && feet_blood_DNA.len)
|
||||
feet_blood_color = null
|
||||
del(feet_blood_DNA)
|
||||
qdel(feet_blood_DNA)
|
||||
update_inv_shoes(1)
|
||||
return 1
|
||||
|
||||
@@ -1143,7 +1148,7 @@
|
||||
if(client && client.screen)
|
||||
client.screen.len = null
|
||||
if(hud_used)
|
||||
del(hud_used)
|
||||
qdel(hud_used)
|
||||
hud_used = new /datum/hud(src)
|
||||
|
||||
if(species)
|
||||
@@ -1358,4 +1363,4 @@
|
||||
/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
|
||||
if(W in organs)
|
||||
return
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -337,12 +337,12 @@
|
||||
visible_message("<span class='danger'>[user] has broken [src]'s grip on [lgrab.affecting]!</span>")
|
||||
success = 1
|
||||
spawn(1)
|
||||
del(lgrab)
|
||||
qdel(lgrab)
|
||||
if(istype(r_hand, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/rgrab = r_hand
|
||||
if(rgrab.affecting)
|
||||
visible_message("<span class='danger'>[user] has broken [src]'s grip on [rgrab.affecting]!</span>")
|
||||
success = 1
|
||||
spawn(1)
|
||||
del(rgrab)
|
||||
qdel(rgrab)
|
||||
return success
|
||||
|
||||
@@ -319,7 +319,7 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t
|
||||
This function restores the subjects blood to max.
|
||||
*/
|
||||
/mob/living/carbon/human/proc/restore_blood()
|
||||
if(!species.flags & NO_BLOOD)
|
||||
if(!(species.flags & NO_BLOOD))
|
||||
var/blood_volume = vessel.get_reagent_amount("blood")
|
||||
vessel.add_reagent("blood",560.0-blood_volume)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user