mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge branch 'incremental_tg' r4967 (27/10/2012) into bs12_with_tgport
Conflicts: baystation12.dme code/__HELPERS/game.dm code/__HELPERS/type2type.dm code/datums/helper_datums/getrev.dm code/game/atoms.dm code/game/gamemodes/events.dm code/game/machinery/atmo_control.dm code/game/machinery/atmoalter/area_atmos_computer.dm code/game/machinery/computer/HolodeckControl.dm code/game/machinery/computer/atmos_alert.dm code/game/machinery/computer/card.dm code/game/machinery/computer/cloning.dm code/game/machinery/computer/computer.dm code/game/machinery/computer/pod.dm code/game/machinery/computer/prisoner.dm code/game/machinery/computer/syndicate_shuttle.dm code/game/machinery/newscaster.dm code/game/machinery/spaceheater.dm code/game/machinery/telecomms/broadcaster.dm code/game/machinery/telecomms/logbrowser.dm code/game/machinery/telecomms/machine_interactions.dm code/game/machinery/telecomms/telemonitor.dm code/game/machinery/telecomms/traffic_control.dm code/game/machinery/wishgranter.dm code/game/objects/items/devices/uplinks.dm code/game/objects/items/stacks/stack.dm code/game/objects/objs.dm code/modules/DetectiveWork/detective_work.dm code/modules/admin/IsBanned.dm code/modules/admin/admin.dm code/modules/admin/verbs/adminsay.dm code/modules/admin/verbs/getlogs.dm code/modules/awaymissions/zlevel.dm code/modules/client/client procs.dm code/modules/clothing/masks/miscellaneous.dm code/modules/clothing/spacesuits/miscellaneous.dm code/modules/flufftext/TextFilters.dm code/modules/mining/machine_processing.dm code/modules/mining/machine_stacking.dm code/modules/mining/mine_items.dm code/modules/mining/mint.dm code/modules/mining/satchel_ore_boxdm.dm code/modules/mob/living/carbon/monkey/life.dm code/modules/mob/living/living_defense.dm code/modules/mob/living/simple_animal/friendly/corgi.dm code/modules/mob/mob.dm code/modules/paperwork/filingcabinet.dm code/modules/paperwork/photocopier.dm code/modules/power/gravitygenerator.dm html/changelog.html icons/mob/head.dmi icons/mob/human_face.dmi icons/mob/mask.dmi icons/mob/suit.dmi icons/obj/clothing/hats.dmi icons/obj/clothing/masks.dmi icons/obj/clothing/suits.dmi Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -92,7 +92,7 @@ obj/machinery/computer/forensic_scanning
|
||||
attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = ""
|
||||
var/isai = 0
|
||||
if(istype(usr,/mob/living/silicon))
|
||||
|
||||
@@ -53,17 +53,15 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
a_computerid = src.owner:computer_id
|
||||
a_ip = src.owner:address
|
||||
|
||||
// var/list/client/clients = get_all_clients()
|
||||
var/who
|
||||
for(var/client/C in client_list)
|
||||
for(var/client/C in clients)
|
||||
if(!who)
|
||||
who = "[C]"
|
||||
else
|
||||
who += ", [C]"
|
||||
|
||||
var/list/client/admin_clients = get_all_admin_clients()
|
||||
var/adminwho
|
||||
for(var/client/C in admin_clients)
|
||||
for(var/client/C in admins)
|
||||
if(!adminwho)
|
||||
adminwho = "[C]"
|
||||
else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//Blocks an attempt to connect before even creating our client datum thing.
|
||||
world/IsBanned(key,address,computer_id)
|
||||
if(ckey(key) in admins)
|
||||
if(ckey(key) in admin_datums)
|
||||
return ..()
|
||||
|
||||
//Guest Checking
|
||||
|
||||
@@ -25,22 +25,20 @@
|
||||
diary << "Downloading updated ToR data..."
|
||||
var/http[] = world.Export("http://exitlist.torproject.org/exit-addresses")
|
||||
|
||||
var/rawtext = file2text(http["CONTENT"])
|
||||
if(rawtext)
|
||||
var/list/rawlist = tg_text2list(rawtext,"\n")
|
||||
if(rawlist.len)
|
||||
fdel(TORFILE)
|
||||
var/savefile/F = new(TORFILE)
|
||||
for( var/line in rawlist )
|
||||
if(!line) continue
|
||||
if( copytext(line,1,12) == "ExitAddress" )
|
||||
var/cleaned = copytext(line,13,length(line)-19)
|
||||
if(!cleaned) continue
|
||||
F[cleaned] << 1
|
||||
F["last_update"] << world.realtime
|
||||
diary << "ToR data updated!"
|
||||
if(usr) usr << "ToRban updated."
|
||||
return 1
|
||||
var/list/rawlist = file2list(http["CONTENT"])
|
||||
if(rawlist.len)
|
||||
fdel(TORFILE)
|
||||
var/savefile/F = new(TORFILE)
|
||||
for( var/line in rawlist )
|
||||
if(!line) continue
|
||||
if( copytext(line,1,12) == "ExitAddress" )
|
||||
var/cleaned = copytext(line,13,length(line)-19)
|
||||
if(!cleaned) continue
|
||||
F[cleaned] << 1
|
||||
F["last_update"] << world.realtime
|
||||
diary << "ToR data updated!"
|
||||
if(usr) usr << "ToRban updated."
|
||||
return 1
|
||||
diary << "ToR data update aborted: no data."
|
||||
return 0
|
||||
|
||||
|
||||
@@ -7,26 +7,22 @@ var/global/floorIsLava = 0
|
||||
/proc/message_admins(var/text, var/admin_ref = 0, var/admin_holder_ref = 0)
|
||||
var/rendered = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[text]</span></span>"
|
||||
log_adminwarn(rendered)
|
||||
for (var/client/C in admin_list)
|
||||
if (C)
|
||||
if (C.holder.level >= 1)
|
||||
var/msg = rendered
|
||||
if (admin_ref)
|
||||
msg = dd_replacetext(msg, "%admin_ref%", "\ref[C]")
|
||||
if (admin_holder_ref && C.holder)
|
||||
msg = dd_replacetext(msg, "%holder_ref%", "\ref[C.holder]")
|
||||
C << msg
|
||||
|
||||
for(var/client/C in admins)
|
||||
var/msg = rendered
|
||||
if(admin_ref)
|
||||
msg = dd_replacetext(msg, "%admin_ref%", "\ref[C]")
|
||||
if(admin_holder_ref && C.holder)
|
||||
msg = dd_replacetext(msg, "%holder_ref%", "\ref[C.holder]")
|
||||
C << msg
|
||||
|
||||
/proc/msg_admin_attack(var/text) //Toggleable Attack Messages
|
||||
var/rendered = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[text]</span></span>"
|
||||
log_adminwarn(rendered)
|
||||
for (var/client/C in admin_list)
|
||||
if (C)
|
||||
if (C.holder.level >= 1)
|
||||
if(!C.STFU_atklog)
|
||||
var/msg = rendered
|
||||
C << msg
|
||||
for(var/client/C in admins)
|
||||
if (C.holder.level >= 1)
|
||||
if(!C.STFU_atklog)
|
||||
var/msg = rendered
|
||||
C << msg
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////Panels
|
||||
|
||||
@@ -1151,4 +1147,4 @@ proc/move_alien_ship()
|
||||
alien_ship_location = 0
|
||||
else
|
||||
alien_ship_location = 1
|
||||
return
|
||||
return
|
||||
@@ -25,8 +25,8 @@
|
||||
/client/proc/update_admins(var/rank)
|
||||
if(!holder)
|
||||
holder = new /datum/admins(rank)
|
||||
admin_list |= src
|
||||
admins[ckey] = holder
|
||||
admins |= src
|
||||
admin_datums[ckey] = holder
|
||||
|
||||
var/need_update = 0
|
||||
//check if our rank has changed
|
||||
@@ -294,7 +294,6 @@
|
||||
verbs += /datum/admins/proc/adjump
|
||||
verbs += /client/proc/callproc
|
||||
verbs += /client/proc/triple_ai
|
||||
verbs += /client/proc/get_admin_state
|
||||
verbs += /client/proc/reload_admins
|
||||
verbs += /client/proc/cmd_debug_make_powernets
|
||||
verbs += /client/proc/object_talk
|
||||
@@ -341,7 +340,6 @@
|
||||
/client/proc/show_verbs,
|
||||
/client/proc/colorooc,
|
||||
/client/proc/triple_ai,
|
||||
/client/proc/get_admin_state,
|
||||
/client/proc/reload_admins,
|
||||
/client/proc/kill_air,
|
||||
/client/proc/cmd_debug_make_powernets,
|
||||
@@ -474,11 +472,11 @@
|
||||
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
|
||||
feedback_add_details("admin_verb","O") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/*
|
||||
/client/proc/get_admin_state()
|
||||
set name = "Get Admin State"
|
||||
set category = "Debug"
|
||||
for(var/client/C in admin_list)
|
||||
for(var/client/C in admins)
|
||||
if(C.holder.state == 1)
|
||||
src << "[C.key] is playing - [C.holder.state]"
|
||||
else if(C.holder.state == 2)
|
||||
@@ -486,6 +484,7 @@
|
||||
else
|
||||
src << "[C.key] is undefined - [C.holder.state]"
|
||||
feedback_add_details("admin_verb","GAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
*/
|
||||
|
||||
/client/proc/invisimin()
|
||||
set name = "Invisimin"
|
||||
@@ -652,6 +651,17 @@
|
||||
log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].")
|
||||
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] the spell [S].", 1)
|
||||
|
||||
/client/proc/give_disease(mob/T as mob in mob_list) // -- Giacom
|
||||
set category = "Fun"
|
||||
set name = "Give Disease"
|
||||
set desc = "Gives a Disease to a mob."
|
||||
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in diseases
|
||||
if(!D) return
|
||||
T.contract_disease(new D, 1)
|
||||
feedback_add_details("admin_verb","GD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")
|
||||
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] the disease [D].", 1)
|
||||
|
||||
/client/proc/make_sound(var/obj/O in world) // -- TLE
|
||||
set category = "Special Verbs"
|
||||
set name = "Make Sound"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/client/proc/deadmin()
|
||||
admins.Remove(ckey)
|
||||
admin_datums -= ckey
|
||||
if(holder) del(holder)
|
||||
src.clear_admin_verbs()
|
||||
admin_list -= src
|
||||
clear_admin_verbs()
|
||||
admins -= src
|
||||
return 1
|
||||
|
||||
var/list/admin_datums = list()
|
||||
@@ -702,7 +702,7 @@ var/list/admin_datums = list()
|
||||
message_admins("\blue [key_name_admin(usr)] removed [t]", 1)
|
||||
jobban_remove(t)
|
||||
href_list["ban"] = 1 // lets it fall through and refresh
|
||||
var/t_split = dd_text2list(t, " - ")
|
||||
var/t_split = text2list(t, " - ")
|
||||
var/key = t_split[1]
|
||||
var/job = t_split[2]
|
||||
DB_ban_unban(ckey(key), BANTYPE_JOB_PERMA, job)
|
||||
@@ -1641,7 +1641,7 @@ var/list/admin_datums = list()
|
||||
else if (length(removed_paths))
|
||||
alert("Removed:\n" + dd_list2text(removed_paths, "\n"))
|
||||
|
||||
var/list/offset = dd_text2list(href_list["offset"],",")
|
||||
var/list/offset = text2list(href_list["offset"],",")
|
||||
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
|
||||
var/X = offset.len > 0 ? text2num(offset[1]) : 0
|
||||
var/Y = offset.len > 1 ? text2num(offset[2]) : 0
|
||||
|
||||
@@ -30,7 +30,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an", "monkey", "ali
|
||||
msg = dd_replacetext(msg, "HOLDERREF", "HOLDER-REF") //HOLDERREF is a key word which gets replaced with the admin's holder ref later on, so it mustn't be in the original message
|
||||
msg = dd_replacetext(msg, "ADMINREF", "ADMIN-REF") //ADMINREF is a key word which gets replaced with the admin's client's ref. So it mustn't be in the original message.
|
||||
|
||||
var/list/msglist = dd_text2list(msg, " ")
|
||||
var/list/msglist = text2list(msg, " ")
|
||||
|
||||
var/list/mob/mobs = list()
|
||||
|
||||
@@ -65,7 +65,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an", "monkey", "ali
|
||||
ai_found = 1
|
||||
continue
|
||||
for(var/mob/M in mobs)
|
||||
var/list/namelist = dd_text2list("[M.name] [M.real_name] [(M.mind)?"[M.mind.name]":""] [M.ckey] [M.key]", " ")
|
||||
var/list/namelist = text2list("[M.name] [M.real_name] [(M.mind)?"[M.mind.name]":""] [M.ckey] [M.key]", " ")
|
||||
var/word_is_match = 0 //Used to break from this mob for loop if a match is found
|
||||
for(var/namepart in namelist)
|
||||
if( lowertext(word) == lowertext(namepart) )
|
||||
|
||||
@@ -22,10 +22,11 @@
|
||||
return
|
||||
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
for (var/client/C in admin_list)
|
||||
if (src.holder.rank == "Admin Observer")
|
||||
if(holder.rank == "Admin Observer")
|
||||
for(var/client/C in admins)
|
||||
C << "<span class='adminobserver'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, C)]:</EM> <span class='message'>[msg]</span></span>"
|
||||
else if(C.holder && C.holder.level != 0)
|
||||
else
|
||||
for(var/client/C in admins)
|
||||
C << "<span class='admin'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, C)]</EM> (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
||||
|
||||
/client/proc/cmd_mod_say(msg as text)
|
||||
|
||||
@@ -937,7 +937,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if("Players")
|
||||
usr << dd_list2text(player_list,",")
|
||||
if("Admins")
|
||||
usr << dd_list2text(admin_list,",")
|
||||
usr << dd_list2text(admins,",")
|
||||
if("Mobs")
|
||||
usr << dd_list2text(mob_list,",")
|
||||
if("Living Mobs")
|
||||
@@ -945,4 +945,4 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if("Dead Mobs")
|
||||
usr << dd_list2text(dead_mob_list,",")
|
||||
if("Clients")
|
||||
usr << dd_list2text(client_list,",")
|
||||
usr << dd_list2text(clients,",")
|
||||
|
||||
@@ -35,10 +35,6 @@
|
||||
src << "<font color='red'>Only Game Masters may use this command.</font>"
|
||||
return
|
||||
|
||||
var/list/clients = list()
|
||||
for(var/client/C)
|
||||
clients += C
|
||||
|
||||
var/client/target = input(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions",null) as null|anything in clients
|
||||
if( !target || !istype(target,/client) )
|
||||
src << "<font color='red'>Error: giveruntimelog(): Client not found.</font>"
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
var/icon/cross = icon('icons/obj/storage.dmi',"bible")
|
||||
|
||||
for (var/client/C in admin_list)
|
||||
if (C.seeprayers)
|
||||
for(var/client/C in admins)
|
||||
if(C.seeprayers)
|
||||
C << "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, C)] (<A HREF='?src=\ref[C.holder];adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?src=\ref[C.holder];adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?src=\ref[C.holder];adminplayervars=\ref[src]'>VV</A>) (<A HREF='?src=\ref[C.holder];adminplayersubtlemessage=\ref[src]'>SM</A>) (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?src=\ref[C.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[C.holder];adminspawncookie=\ref[src]'>SC</a>):</b> [msg]"
|
||||
|
||||
usr << "Your prayers have been received by the gods."
|
||||
@@ -27,20 +27,12 @@
|
||||
|
||||
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender)
|
||||
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
|
||||
// log_admin("[key_name(Sender)] sent a message to Centcomm! The message was [msg]") // Handled somewhere else
|
||||
|
||||
for (var/client/C in admin_list)
|
||||
for(var/client/C in admins)
|
||||
C << "\blue <b><font color=orange>CENTCOMM:</font>[key_name(Sender, C)] (<A HREF='?src=\ref[C.holder];adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?src=\ref[C.holder];adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?src=\ref[C.holder];adminplayersubtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?src=\ref[C.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[C.holder];BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?src=\ref[C.holder];CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
//
|
||||
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
|
||||
// log_admin("[key_name(Sender)] sent a message to the Syndicate! The message was [msg]") // Handled somewhere else
|
||||
|
||||
for (var/client/C in admin_list)
|
||||
for(var/client/C in admins)
|
||||
C << "\blue <b><font color=crimson>SYNDICATE:</font>[key_name(Sender, C)] (<A HREF='?src=\ref[C.holder];adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?src=\ref[C.holder];adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?src=\ref[C.holder];adminplayersubtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?src=\ref[C.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[C.holder];BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?src=\ref[C.holder];SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
//
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
if(!user) return 0
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
interact(mob/user as mob)//TODO: change this this to the wire control panel
|
||||
if(!secured) return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>Infrared Laser</B>\n<B>Status</B>: []<BR>\n<B>Visibility</B>: []<BR>\n</TT>", (on ? text("<A href='?src=\ref[];state=0'>On</A>", src) : text("<A href='?src=\ref[];state=1'>Off</A>", src)), (src.visible ? text("<A href='?src=\ref[];visible=0'>Visible</A>", src) : text("<A href='?src=\ref[];visible=1'>Invisible</A>", src)))
|
||||
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
density = 0
|
||||
|
||||
/obj/machinery/artillerycontrol/attack_hand(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = "<B>Bluespace Artillery Control:</B><BR>"
|
||||
dat += "Locked on<BR>"
|
||||
dat += "<B>Charge progress: [reload]/180:</B><BR>"
|
||||
|
||||
@@ -3,17 +3,10 @@ proc/createRandomZlevel()
|
||||
return
|
||||
|
||||
var/list/potentialRandomZlevels = list()
|
||||
|
||||
var/text = file2text("maps/RandomZLevels/fileList.txt")
|
||||
|
||||
if (!text) // No random Z-levels for you.
|
||||
return
|
||||
|
||||
world << "\red \b Searching for away missions..."
|
||||
|
||||
var/list/CL = dd_text2list(text, "\n")
|
||||
|
||||
for (var/t in CL)
|
||||
var/list/Lines = file2list("maps/RandomZLevels/fileList.txt")
|
||||
if(!Lines.len) return
|
||||
for (var/t in Lines)
|
||||
if (!t)
|
||||
continue
|
||||
|
||||
@@ -58,4 +51,4 @@ proc/createRandomZlevel()
|
||||
|
||||
else
|
||||
world << "\red \b No away missions found."
|
||||
return
|
||||
return
|
||||
@@ -95,36 +95,32 @@
|
||||
if(byond_version < MIN_CLIENT_VERSION) //Out of date client.
|
||||
return null
|
||||
|
||||
|
||||
if(IsGuestKey(key))
|
||||
alert(src,"Baystation12 doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK")
|
||||
del(src)
|
||||
return
|
||||
|
||||
client_list += src
|
||||
if ( (world.address == address || !address) && !host )
|
||||
host = key
|
||||
world.update_status()
|
||||
clients += src
|
||||
directory[ckey] = src
|
||||
|
||||
//Admin Authorisation
|
||||
var/datum/admins/Admin_Obj = admins[ckey]
|
||||
if(istype(Admin_Obj))
|
||||
admin_list += src
|
||||
holder = Admin_Obj
|
||||
holder = admin_datums[ckey]
|
||||
if(holder)
|
||||
admins += src
|
||||
holder.owner = src
|
||||
holder.state = null
|
||||
|
||||
. = ..() //calls mob.Login()
|
||||
|
||||
//makejson()
|
||||
|
||||
if(custom_event_msg && custom_event_msg != "")
|
||||
src << "<h1 class='alert'>Custom Event</h1>"
|
||||
src << "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
|
||||
src << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
|
||||
src << "<br>"
|
||||
|
||||
..() //calls mob.Login()
|
||||
if( (world.address == address || !address) && !host )
|
||||
host = key
|
||||
world.update_status()
|
||||
|
||||
if(holder)
|
||||
admin_memo_show()
|
||||
@@ -138,8 +134,10 @@
|
||||
/client/Del()
|
||||
if(holder)
|
||||
holder.state = null
|
||||
admin_list -= src
|
||||
client_list -= src
|
||||
holder.owner = null
|
||||
admins -= src
|
||||
directory -= ckey
|
||||
clients -= src
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
@@ -76,3 +76,12 @@
|
||||
flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH
|
||||
w_class = 2
|
||||
gas_transfer_coefficient = 0.90
|
||||
|
||||
/obj/item/clothing/mask/pig
|
||||
name = "pig mask"
|
||||
desc = "A rubber pig mask."
|
||||
icon_state = "pig"
|
||||
item_state = "pig"
|
||||
flags = FPRINT|TABLEPASS|BLOCKHAIR
|
||||
flags_inv = HIDEFACE
|
||||
w_class = 2
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
//Captain's Spacesuit
|
||||
/obj/item/clothing/head/helmet/space/capspace
|
||||
name = "space helmet"
|
||||
icon_state = "capspace"
|
||||
item_state = "capspacehelmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Only for the most fashionable of military figureheads."
|
||||
flags_inv = HIDEFACE
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(melee = 65, bullet = 50, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 50)
|
||||
|
||||
//Captain's space suit This is not the proper path but I don't currently know enough about how this all works to mess with it.
|
||||
/obj/item/clothing/suit/armor/captain
|
||||
name = "Captain's armor"
|
||||
desc = "A bulky, heavy-duty piece of exclusive Nanotrasen armor. YOU are in charge!"
|
||||
icon_state = "caparmor"
|
||||
item_state = "capspacesuit"
|
||||
w_class = 4
|
||||
gas_transfer_coefficient = 0.01
|
||||
permeability_coefficient = 0.02
|
||||
flags = FPRINT | TABLEPASS
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
|
||||
slowdown = 1.5
|
||||
armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50)
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
|
||||
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECITON_TEMPERATURE
|
||||
|
||||
//Deathsquad suit
|
||||
/obj/item/clothing/head/helmet/space/deathsquad
|
||||
name = "deathsquad helmet"
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
/proc/EquipCustomItems(mob/living/carbon/human/M)
|
||||
// load lines
|
||||
var/file = file2text("config/custom_items.txt")
|
||||
var/lines = dd_text2list(file, "\n")
|
||||
var/lines = text2list(file, "\n")
|
||||
|
||||
for(var/line in lines)
|
||||
// split & clean up
|
||||
var/list/Entry = dd_text2list(line, ":")
|
||||
var/list/Entry = text2list(line, ":")
|
||||
for(var/i = 1 to Entry.len)
|
||||
Entry[i] = trim(Entry[i])
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
continue;
|
||||
|
||||
if(Entry[1] == M.ckey && Entry[2] == M.real_name)
|
||||
var/list/Paths = dd_text2list(Entry[3], ",")
|
||||
var/list/Paths = text2list(Entry[3], ",")
|
||||
for(var/P in Paths)
|
||||
var/ok = 0 // 1 if the item was placed successfully
|
||||
P = trim(P)
|
||||
|
||||
@@ -26,7 +26,7 @@ proc/Intoxicated(phrase)
|
||||
proc/NewStutter(phrase,stunned)
|
||||
phrase = html_decode(phrase)
|
||||
|
||||
var/list/split_phrase = dd_text2list(phrase," ") //Split it up into words.
|
||||
var/list/split_phrase = text2list(phrase," ") //Split it up into words.
|
||||
|
||||
var/list/unstuttered_words = split_phrase.Copy()
|
||||
var/i = rand(1,3)
|
||||
@@ -67,7 +67,7 @@ proc/Ellipsis(original_msg, chance = 50)
|
||||
if(chance >= 100) return original_msg
|
||||
|
||||
var/list
|
||||
words = dd_text2list(original_msg," ")
|
||||
words = text2list(original_msg," ")
|
||||
new_words = list()
|
||||
|
||||
var/new_msg = ""
|
||||
|
||||
@@ -33,7 +33,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
var/SQLquery
|
||||
|
||||
/obj/machinery/librarypubliccomp/attack_hand(var/mob/user as mob)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
var/dat = "<HEAD><TITLE>Library Visitor</TITLE></HEAD><BODY>\n" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
|
||||
switch(screenstate)
|
||||
if(0)
|
||||
@@ -135,7 +135,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
var/bibledelay = 0 // LOL NO SPAM (1 minute delay) -- Doohl
|
||||
|
||||
/obj/machinery/librarycomp/attack_hand(var/mob/user as mob)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
var/dat = "<HEAD><TITLE>Book Inventory Management</TITLE></HEAD><BODY>\n" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
|
||||
switch(screenstate)
|
||||
if(0)
|
||||
@@ -411,7 +411,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
O.loc = src
|
||||
|
||||
/obj/machinery/libraryscanner/attack_hand(var/mob/user as mob)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
var/dat = "<HEAD><TITLE>Scanner Control Interface</TITLE></HEAD><BODY>\n" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
|
||||
if(cache)
|
||||
dat += "<FONT color=#005500>Data stored in memory.</FONT><BR>"
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
/obj/machinery/mineral/processing_unit_console/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["sel_iron"])
|
||||
if (href_list["sel_iron"] == "yes")
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
/obj/machinery/mineral/stacking_unit_console/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["release"])
|
||||
switch(href_list["release"])
|
||||
|
||||
@@ -112,7 +112,7 @@ proc/move_mining_shuttle()
|
||||
/obj/machinery/computer/mining_shuttle/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["move"])
|
||||
if(ticker.mode.name == "blob")
|
||||
@@ -287,7 +287,3 @@ proc/move_mining_shuttle()
|
||||
density = 1
|
||||
icon_opened = "miningcaropen"
|
||||
icon_closed = "miningcar"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
/obj/machinery/mineral/mint/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(processing==1)
|
||||
usr << "\blue The machine is processing."
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
/obj/item/weapon/moneybag/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["remove"])
|
||||
var/obj/item/weapon/coin/COIN
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
/obj/structure/ore_box/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["removeall"])
|
||||
for (var/obj/item/weapon/ore/O in contents)
|
||||
|
||||
@@ -25,10 +25,7 @@
|
||||
verbs += /mob/dead/observer/proc/dead_tele
|
||||
stat = DEAD
|
||||
|
||||
dead_mob_list += src
|
||||
add_to_mob_list(src)
|
||||
var/turf/T
|
||||
|
||||
if(ismob(body))
|
||||
T = get_turf(body) //Where is the body located?
|
||||
attack_log = body.attack_log //preserve our attack logs by copying them to our ghost
|
||||
@@ -53,7 +50,7 @@
|
||||
if(!name) //To prevent nameless ghosts
|
||||
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
real_name = name
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
return 1
|
||||
|
||||
@@ -76,29 +76,37 @@ Doesn't work on other aliens/AI.*/
|
||||
src << "\green You need to be closer."
|
||||
return
|
||||
|
||||
/*Xenos now have a proc and a verb for drenching stuff in acid. I couldn't get them to work right when combined so this was the next best solution.
|
||||
The first proc defines the acid throw function while the other two work in the game itself. Probably a good idea to revise this later.
|
||||
I kind of like the right click only--the window version can get a little confusing. Perhaps something telling the alien they need to right click?
|
||||
/N*/
|
||||
/obj/proc/acid(user as mob)
|
||||
var/obj/effect/alien/acid/A = new(src.loc)
|
||||
A.target = src
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\green <B>[user] vomits globs of vile stuff all over [src]. It begins to sizzle and melt under the bubbling mess of acid!</B>"), 1)
|
||||
A.tick()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/corrosive_acid(obj/O as obj in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
|
||||
/mob/living/carbon/alien/humanoid/proc/corrosive_acid(O as obj|turf in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
|
||||
set name = "Corrossive Acid (200)"
|
||||
set desc = "Drench an object in acid, destroying it over time."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(200))
|
||||
if(O in oview(1))
|
||||
if(O.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
|
||||
src << "\green You cannot dissolve this object."
|
||||
else
|
||||
adjustToxLoss(-200)
|
||||
O.acid(src)
|
||||
// OBJ CHECK
|
||||
if(isobj(O))
|
||||
var/obj/I = O
|
||||
if(I.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
|
||||
src << "\green You cannot dissolve this object."
|
||||
return
|
||||
// TURF CHECK
|
||||
else if(istype(O, /turf/simulated))
|
||||
var/turf/T = O
|
||||
// R WALL
|
||||
if(istype(T, /turf/simulated/wall/r_wall))
|
||||
src << "\green You cannot dissolve this object."
|
||||
return
|
||||
// R FLOOR
|
||||
if(istype(T, /turf/simulated/floor/engine))
|
||||
src << "\green You cannot dissolve this object."
|
||||
return
|
||||
else// Not a type we can acid.
|
||||
return
|
||||
|
||||
adjustToxLoss(-200)
|
||||
new /obj/effect/alien/acid(get_turf(O), O)
|
||||
visible_message("\green <B>[src] vomits globs of vile stuff all over [O]. It begins to sizzle and melt under the bubbling mess of acid!</B>")
|
||||
else
|
||||
src << "\green Target is too far away."
|
||||
return
|
||||
@@ -143,14 +151,14 @@ I kind of like the right click only--the window version can get a little confusi
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/resin() // -- TLE
|
||||
set name = "Secrete Resin (100)"
|
||||
set name = "Secrete Resin (75)"
|
||||
set desc = "Secrete tough malleable resin."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(100))
|
||||
if(powerc(75))
|
||||
var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin door","resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
|
||||
if(!choice || !powerc(100)) return
|
||||
adjustToxLoss(-100)
|
||||
if(!choice || !powerc(75)) return
|
||||
adjustToxLoss(-75)
|
||||
src << "\green You shape a [choice]."
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[src] vomits up a thick purple substance and begins to shape it!</B>"), 1)
|
||||
@@ -164,3 +172,18 @@ I kind of like the right click only--the window version can get a little confusi
|
||||
if("resin nest")
|
||||
new /obj/structure/stool/bed/nest(loc)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/verb/regurgitate()
|
||||
set name = "Regurgitate"
|
||||
set desc = "Empties the contents of your stomach"
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc())
|
||||
if(stomach_contents.len)
|
||||
for(var/mob/M in src)
|
||||
if(M in stomach_contents)
|
||||
stomach_contents.Remove(M)
|
||||
M.loc = loc
|
||||
//Paralyse(10)
|
||||
src.visible_message("\green <B>[src] hurls out the contents of their stomach!</B>")
|
||||
return
|
||||
@@ -14,8 +14,7 @@
|
||||
src.name = text("alien drone ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/resin,/mob/living/carbon/alien/humanoid/proc/corrosive_acid)
|
||||
//verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers //<-- pointless
|
||||
add_to_mob_list(src)
|
||||
..()
|
||||
//Drones use the same base as generic humanoids.
|
||||
//Drone verbs
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
if(name == "alien hunter")
|
||||
name = text("alien hunter ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
add_to_mob_list(src)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter
|
||||
|
||||
@@ -73,19 +73,4 @@
|
||||
update_icons()
|
||||
src << "\green You are no longer invisible."
|
||||
return
|
||||
*/
|
||||
/mob/living/carbon/alien/humanoid/hunter/verb/regurgitate()
|
||||
set name = "Regurgitate"
|
||||
set desc = "Empties the contents of your stomach"
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc())
|
||||
if(stomach_contents.len)
|
||||
for(var/mob/M in src)
|
||||
if(M in stomach_contents)
|
||||
stomach_contents.Remove(M)
|
||||
M.loc = loc
|
||||
Paralyse(10)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] hurls out the contents of their stomach!</B>"), 1)
|
||||
return
|
||||
*/
|
||||
@@ -16,7 +16,7 @@
|
||||
name = text("alien sentinel ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin)
|
||||
add_to_mob_list(src)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel
|
||||
|
||||
|
||||
@@ -500,7 +500,7 @@ In all, this is a lot like the monkey code. /N
|
||||
|
||||
/mob/living/carbon/alien/humanoid/show_inv(mob/user as mob)
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
real_name = src.name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin,/mob/living/carbon/alien/humanoid/proc/resin)
|
||||
verbs -= /mob/living/carbon/alien/verb/ventcrawl
|
||||
add_to_mob_list(src)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
//Queen verbs
|
||||
/mob/living/carbon/alien/humanoid/queen/verb/lay_egg()
|
||||
|
||||
set name = "Lay Egg (50)"
|
||||
set name = "Lay Egg (75)"
|
||||
set desc = "Lay an egg to produce huggers to impregnate prey with."
|
||||
set category = "Alien"
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
src << "There's already an egg here."
|
||||
return
|
||||
|
||||
if(powerc(50,1))//Can't plant eggs on spess tiles. That's silly.
|
||||
adjustToxLoss(-50)
|
||||
if(powerc(75,1))//Can't plant eggs on spess tiles. That's silly.
|
||||
adjustToxLoss(-75)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
|
||||
new /obj/effect/alien/egg(loc)
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
|
||||
/mob/living/carbon/alien/larva/show_inv(mob/user as mob)
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR><BR>
|
||||
|
||||
@@ -16,6 +16,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
item_state = "facehugger"
|
||||
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
|
||||
flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH|MASKCOVERSEYES
|
||||
throw_range = 5
|
||||
|
||||
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
|
||||
|
||||
|
||||
@@ -547,7 +547,7 @@
|
||||
|
||||
/mob/living/carbon/human/show_inv(mob/user as mob)
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
@@ -671,7 +671,7 @@
|
||||
|
||||
if (href_list["mach_close"])
|
||||
var/t1 = text("window=[]", href_list["mach_close"])
|
||||
machine = null
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
|
||||
if ((href_list["item"] && !( usr.stat ) && usr.canmove && !( usr.restrained() ) && in_range(src, usr) && ticker)) //if game hasn't started, can't make an equip_e
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
var/randn = rand(1, 100)
|
||||
if (randn <= 90)
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
Weaken(rand(10,15))
|
||||
Weaken(10)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
if(stat != DEAD)
|
||||
for(var/datum/disease/pierrot_throat/D in viruses)
|
||||
var/list/temp_message = dd_text2list(message, " ") //List each word in the message
|
||||
var/list/temp_message = text2list(message, " ") //List each word in the message
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++) //Create a second list for excluding words down the line
|
||||
pick_list += i
|
||||
@@ -74,7 +74,7 @@
|
||||
//Would make it more global but it's sort of ninja specific.
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
var/list/temp_message = dd_text2list(message, " ")
|
||||
var/list/temp_message = text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++)
|
||||
pick_list += i
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
var/list/temp_message = dd_text2list(message, " ")
|
||||
var/list/temp_message = text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++)
|
||||
pick_list += i
|
||||
|
||||
@@ -50,465 +50,474 @@
|
||||
var/Tempstun = 0 // temporary temperature stuns
|
||||
var/Discipline = 0 // if a metroid has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
|
||||
var/SStun = 0 // stun variable
|
||||
proc
|
||||
|
||||
AIprocess() // the master AI process
|
||||
/mob/living/carbon/metroid/proc/AIprocess() // the master AI process
|
||||
|
||||
if(AIproc || stat == DEAD || client) return
|
||||
//world << "AI proc started."
|
||||
if(AIproc || stat == DEAD || client) return
|
||||
|
||||
var/hungry = 0
|
||||
var/starving = 0
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
switch(nutrition)
|
||||
if(400 to 1100) hungry = 1
|
||||
if(0 to 399)
|
||||
starving = 1
|
||||
else
|
||||
switch(nutrition)
|
||||
if(150 to 900) hungry = 1
|
||||
if(0 to 149) starving = 1
|
||||
AIproc = 1
|
||||
while(AIproc && stat != 2 && (attacked > 0 || starving || hungry || rabid || Victim))
|
||||
if(Victim) // can't eat AND have this little process at the same time
|
||||
break
|
||||
var/hungry = 0
|
||||
var/starving = 0
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
switch(nutrition)
|
||||
if(400 to 1100) hungry = 1
|
||||
if(0 to 399)
|
||||
starving = 1
|
||||
else
|
||||
switch(nutrition)
|
||||
if(150 to 900) hungry = 1
|
||||
if(0 to 149) starving = 1
|
||||
AIproc = 1
|
||||
//world << "AIproc [AIproc] && stat != 2 [stat] && (attacked > 0 [attacked] || starving [starving] || hungry [hungry] || rabid [rabid] || Victim [Victim] || Target [Target]"
|
||||
while(AIproc && stat != 2 && (attacked > 0 || starving || hungry || rabid || Victim))
|
||||
if(Victim) // can't eat AND have this little process at the same time
|
||||
//world << "break 1"
|
||||
break
|
||||
|
||||
if(!Target || client)
|
||||
break
|
||||
if(!Target || client)
|
||||
//world << "break 2"
|
||||
break
|
||||
|
||||
|
||||
if(Target.health <= -70 || Target.stat == 2)
|
||||
if(Target.health <= -70 || Target.stat == 2)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
//world << "break 3"
|
||||
break
|
||||
|
||||
if(Target)
|
||||
//world << "[Target] Target Found"
|
||||
for(var/mob/living/carbon/metroid/M in view(1,Target))
|
||||
if(M.Victim == Target)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
//world << "break 4"
|
||||
break
|
||||
if(!AIproc)
|
||||
//world << "break 5"
|
||||
break
|
||||
|
||||
if(Target in view(1,src))
|
||||
|
||||
if(istype(Target, /mob/living/silicon))
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(15)
|
||||
Atkcool = 0
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
Target.attack_metroid(src)
|
||||
//world << "retrun 1"
|
||||
return
|
||||
if(!Target.lying && prob(80))
|
||||
|
||||
if(Target.client && Target.health >= 20)
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(25)
|
||||
Atkcool = 0
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
Target.attack_metroid(src)
|
||||
|
||||
|
||||
if(prob(30))
|
||||
step_to(src, Target)
|
||||
|
||||
else
|
||||
if(!Atkcool && get_obstacle_ok(Target))
|
||||
Feedon(Target)
|
||||
|
||||
else
|
||||
if(!Atkcool && get_obstacle_ok(Target))
|
||||
Feedon(Target)
|
||||
|
||||
else
|
||||
if(Target in view(7, src))
|
||||
if(get_obstacle_ok(Target))
|
||||
step_to(src, Target)
|
||||
|
||||
else
|
||||
Target = null
|
||||
AIproc = 0
|
||||
//world << "break 6"
|
||||
break
|
||||
|
||||
if(Target)
|
||||
for(var/mob/living/carbon/metroid/M in view(1,Target))
|
||||
if(M.Victim == Target)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
break
|
||||
if(!AIproc)
|
||||
break
|
||||
var/sleeptime = movement_delay()
|
||||
if(sleeptime <= 0) sleeptime = 1
|
||||
|
||||
if(Target in view(1,src))
|
||||
sleep(sleeptime + 2) // this is about as fast as a player Metroid can go
|
||||
|
||||
if(istype(Target, /mob/living/silicon))
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(15)
|
||||
Atkcool = 0
|
||||
AIproc = 0
|
||||
//world << "AI proc ended."
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
Target.attack_metroid(src)
|
||||
return
|
||||
if(!Target.lying && prob(80))
|
||||
/mob/living/carbon/metroid/proc/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
adjustFireLoss(rand(10,20))
|
||||
return
|
||||
|
||||
if(Target.client && Target.health >= 20)
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(25)
|
||||
Atkcool = 0
|
||||
//var/environment_heat_capacity = environment.heat_capacity()
|
||||
var/loc_temp = T0C
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
//environment_heat_capacity = loc:heat_capacity
|
||||
var/turf/heat_turf = get_turf(src)
|
||||
loc_temp = heat_turf.temperature
|
||||
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
loc_temp = loc:air_contents.temperature
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
Target.attack_metroid(src)
|
||||
/*
|
||||
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
|
||||
var/transfer_coefficient
|
||||
|
||||
transfer_coefficient = 1
|
||||
if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature))
|
||||
transfer_coefficient *= wear_mask.heat_transfer_coefficient
|
||||
|
||||
// handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
|
||||
*/
|
||||
|
||||
|
||||
if(prob(30))
|
||||
step_to(src, Target)
|
||||
if(loc_temp < 310.15) // a cold place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
else // a hot place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
|
||||
else
|
||||
if(!Atkcool && get_obstacle_ok(Target))
|
||||
Feedon(Target)
|
||||
/*
|
||||
if(stat==2)
|
||||
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
|
||||
|
||||
else
|
||||
if(!Atkcool && get_obstacle_ok(Target))
|
||||
Feedon(Target)
|
||||
*/
|
||||
//Account for massive pressure differences
|
||||
|
||||
else
|
||||
if(Target in view(7, src))
|
||||
if(get_obstacle_ok(Target))
|
||||
step_to(src, Target)
|
||||
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
|
||||
if(bodytemperature <= (T0C - 40)) // stun temperature
|
||||
Tempstun = 1
|
||||
|
||||
else
|
||||
Target = null
|
||||
AIproc = 0
|
||||
break
|
||||
|
||||
var/sleeptime = movement_delay()
|
||||
if(sleeptime <= 0) sleeptime = 1
|
||||
|
||||
sleep(sleeptime + 2) // this is about as fast as a player Metroid can go
|
||||
|
||||
AIproc = 0
|
||||
|
||||
handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
adjustFireLoss(rand(10,20))
|
||||
return
|
||||
|
||||
//var/environment_heat_capacity = environment.heat_capacity()
|
||||
var/loc_temp = T0C
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
//environment_heat_capacity = loc:heat_capacity
|
||||
var/turf/heat_turf = get_turf(src)
|
||||
loc_temp = heat_turf.temperature
|
||||
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
loc_temp = loc:air_contents.temperature
|
||||
if(bodytemperature <= (T0C - 50)) // hurt temperature
|
||||
if(bodytemperature <= 50) // sqrting negative numbers is bad
|
||||
adjustFireLoss(200)
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
adjustFireLoss(round(sqrt(bodytemperature)) * 2)
|
||||
|
||||
/*
|
||||
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
|
||||
var/transfer_coefficient
|
||||
else
|
||||
Tempstun = 0
|
||||
|
||||
transfer_coefficient = 1
|
||||
if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature))
|
||||
transfer_coefficient *= wear_mask.heat_transfer_coefficient
|
||||
updatehealth()
|
||||
|
||||
// handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
|
||||
*/
|
||||
return //TODO: DEFERRED
|
||||
|
||||
|
||||
if(loc_temp < 310.15) // a cold place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
else // a hot place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
/mob/living/carbon/metroid/proc/adjust_body_temperature(current, loc_temp, boost)
|
||||
var/temperature = current
|
||||
var/difference = abs(current-loc_temp) //get difference
|
||||
var/increments// = difference/10 //find how many increments apart they are
|
||||
if(difference > 50)
|
||||
increments = difference/5
|
||||
else
|
||||
increments = difference/10
|
||||
var/change = increments*boost // Get the amount to change by (x per increment)
|
||||
var/temp_change
|
||||
if(current < loc_temp)
|
||||
temperature = min(loc_temp, temperature+change)
|
||||
else if(current > loc_temp)
|
||||
temperature = max(loc_temp, temperature-change)
|
||||
temp_change = (temperature - current)
|
||||
return temp_change
|
||||
|
||||
/*
|
||||
if(stat==2)
|
||||
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
|
||||
/mob/living/carbon/metroid/proc/handle_chemicals_in_body()
|
||||
|
||||
*/
|
||||
//Account for massive pressure differences
|
||||
|
||||
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
|
||||
if(bodytemperature <= (T0C - 40)) // stun temperature
|
||||
Tempstun = 1
|
||||
|
||||
if(bodytemperature <= (T0C - 50)) // hurt temperature
|
||||
if(bodytemperature <= 50) // sqrting negative numbers is bad
|
||||
adjustFireLoss(200)
|
||||
else
|
||||
adjustFireLoss(round(sqrt(bodytemperature)) * 2)
|
||||
|
||||
else
|
||||
Tempstun = 0
|
||||
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
|
||||
adjust_body_temperature(current, loc_temp, boost)
|
||||
var/temperature = current
|
||||
var/difference = abs(current-loc_temp) //get difference
|
||||
var/increments// = difference/10 //find how many increments apart they are
|
||||
if(difference > 50)
|
||||
increments = difference/5
|
||||
else
|
||||
increments = difference/10
|
||||
var/change = increments*boost // Get the amount to change by (x per increment)
|
||||
var/temp_change
|
||||
if(current < loc_temp)
|
||||
temperature = min(loc_temp, temperature+change)
|
||||
else if(current > loc_temp)
|
||||
temperature = max(loc_temp, temperature-change)
|
||||
temp_change = (temperature - current)
|
||||
return temp_change
|
||||
src.updatehealth()
|
||||
|
||||
handle_chemicals_in_body()
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
return //TODO: DEFERRED
|
||||
|
||||
|
||||
src.updatehealth()
|
||||
/mob/living/carbon/metroid/proc/handle_regular_status_updates()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
else
|
||||
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
else
|
||||
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
|
||||
|
||||
|
||||
|
||||
if(health < config.health_threshold_dead && stat != 2)
|
||||
death()
|
||||
return
|
||||
if(health < config.health_threshold_dead && stat != 2)
|
||||
death()
|
||||
return
|
||||
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
// if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
// if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(10)
|
||||
//if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(10)
|
||||
|
||||
if(src.stat != DEAD) src.stat = UNCONSCIOUS
|
||||
if(src.stat != DEAD) src.stat = UNCONSCIOUS
|
||||
|
||||
if(prob(30))
|
||||
adjustOxyLoss(-1)
|
||||
adjustToxLoss(-1)
|
||||
adjustFireLoss(-1)
|
||||
adjustCloneLoss(-1)
|
||||
adjustBruteLoss(-1)
|
||||
if(prob(30))
|
||||
adjustOxyLoss(-1)
|
||||
adjustToxLoss(-1)
|
||||
adjustFireLoss(-1)
|
||||
adjustCloneLoss(-1)
|
||||
adjustBruteLoss(-1)
|
||||
|
||||
|
||||
if (src.stat == DEAD)
|
||||
if (src.stat == DEAD)
|
||||
|
||||
src.lying = 1
|
||||
src.blinded = 1
|
||||
src.lying = 1
|
||||
src.blinded = 1
|
||||
|
||||
else
|
||||
if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
src.stat = 0
|
||||
if (src.weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
if (src.paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
src.blinded = 0
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
else
|
||||
if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
src.stat = 0
|
||||
if (src.weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
if (src.paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
src.blinded = 0
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
|
||||
else
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
else
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
|
||||
if (src.stuttering) src.stuttering = 0
|
||||
if (src.stuttering) src.stuttering = 0
|
||||
|
||||
if (src.eye_blind)
|
||||
src.eye_blind = 0
|
||||
src.blinded = 1
|
||||
if (src.eye_blind)
|
||||
src.eye_blind = 0
|
||||
src.blinded = 1
|
||||
|
||||
if (src.ear_deaf > 0) src.ear_deaf = 0
|
||||
if (src.ear_damage < 25)
|
||||
src.ear_damage = 0
|
||||
if (src.ear_deaf > 0) src.ear_deaf = 0
|
||||
if (src.ear_damage < 25)
|
||||
src.ear_damage = 0
|
||||
|
||||
src.density = !( src.lying )
|
||||
src.density = !( src.lying )
|
||||
|
||||
if (src.sdisabilities & BLIND)
|
||||
src.blinded = 1
|
||||
if (src.sdisabilities & DEAF)
|
||||
src.ear_deaf = 1
|
||||
if (src.sdisabilities & BLIND)
|
||||
src.blinded = 1
|
||||
if (src.sdisabilities & DEAF)
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
src.eye_blurry = 0
|
||||
if (src.eye_blurry > 0)
|
||||
src.eye_blurry = 0
|
||||
|
||||
if (src.druggy > 0)
|
||||
src.druggy = 0
|
||||
if (src.druggy > 0)
|
||||
src.druggy = 0
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
|
||||
handle_nutrition()
|
||||
/mob/living/carbon/metroid/proc/handle_nutrition()
|
||||
|
||||
if(prob(20))
|
||||
if(istype(src, /mob/living/carbon/metroid/adult)) nutrition-=rand(4,6)
|
||||
else nutrition-=rand(2,3)
|
||||
if(prob(20))
|
||||
if(istype(src, /mob/living/carbon/metroid/adult)) nutrition-=rand(4,6)
|
||||
else nutrition-=rand(2,3)
|
||||
|
||||
if(nutrition <= 0)
|
||||
nutrition = 0
|
||||
if(prob(75))
|
||||
if(nutrition <= 0)
|
||||
nutrition = 0
|
||||
if(prob(75))
|
||||
|
||||
adjustToxLoss(rand(0,5))
|
||||
adjustToxLoss(rand(0,5))
|
||||
|
||||
else
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(nutrition >= 1000)
|
||||
if(prob(40)) amount_grown++
|
||||
else
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(nutrition >= 1000)
|
||||
if(prob(40)) amount_grown++
|
||||
|
||||
else
|
||||
if(nutrition >= 800)
|
||||
if(prob(40)) amount_grown++
|
||||
|
||||
//lay eggs or grow
|
||||
if(amount_grown >= 10 && !Victim && !Target)
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!client && nutrition >= 1000)
|
||||
var/number = pick(1,1,1,1,1,1,2,2,2,3) //number of eggs laid
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/roro_egg/E
|
||||
for(var/i=1,i<=number,i++)
|
||||
E = new/obj/item/weapon/reagent_containers/food/snacks/roro_egg(loc)
|
||||
src.nutrition -= 200
|
||||
step_away(E,src)
|
||||
|
||||
else
|
||||
if(!client)
|
||||
var/mob/living/carbon/metroid/adult/A = new/mob/living/carbon/metroid/adult(src.loc)
|
||||
A.nutrition = nutrition
|
||||
A.nutrition += 100
|
||||
A.powerlevel = max(0, powerlevel-1)
|
||||
A.Friends = Friends
|
||||
A.tame = tame
|
||||
A.rabid = rabid
|
||||
del(src)
|
||||
|
||||
|
||||
handle_virus_updates()
|
||||
if(bodytemperature > 406)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
return
|
||||
|
||||
handle_targets()
|
||||
if(Tempstun)
|
||||
if(!Victim) // not while they're eating!
|
||||
canmove = 0
|
||||
else
|
||||
canmove = 1
|
||||
|
||||
if(attacked > 50) attacked = 50
|
||||
|
||||
if(attacked > 0)
|
||||
if(prob(85))
|
||||
attacked--
|
||||
|
||||
if(Discipline > 0)
|
||||
|
||||
if(Discipline >= 5 && rabid)
|
||||
if(prob(60)) rabid = 0
|
||||
|
||||
if(prob(10))
|
||||
Discipline--
|
||||
else
|
||||
if(nutrition >= 800)
|
||||
if(prob(40)) amount_grown++
|
||||
|
||||
//lay eggs or grow
|
||||
if(amount_grown >= 10 && !Victim && !Target)
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!client && nutrition >= 1000)
|
||||
var/number = pick(1,1,1,1,1,1,2,2,2,3) //number of eggs laid
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/egg/roro/E
|
||||
for(var/i=1,i<=number,i++)
|
||||
E = new(loc)
|
||||
src.nutrition -= 200
|
||||
step_away(E,src)
|
||||
|
||||
else
|
||||
if(!client)
|
||||
var/mob/living/carbon/metroid/adult/A = new/mob/living/carbon/metroid/adult(src.loc)
|
||||
A.nutrition = nutrition
|
||||
A.nutrition += 100
|
||||
A.powerlevel = max(0, powerlevel-1)
|
||||
A.Friends = Friends
|
||||
A.tame = tame
|
||||
A.rabid = rabid
|
||||
del(src)
|
||||
|
||||
if(!canmove) return
|
||||
/mob/living/carbon/metroid/proc/handle_virus_updates()
|
||||
if(bodytemperature > 406)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
return
|
||||
|
||||
// DO AI STUFF HERE
|
||||
/mob/living/carbon/metroid/proc/handle_targets()
|
||||
if(Tempstun)
|
||||
if(!Victim) // not while they're eating!
|
||||
canmove = 0
|
||||
else
|
||||
canmove = 1
|
||||
|
||||
if(Target)
|
||||
if(attacked <= 0)
|
||||
Target = null
|
||||
if(attacked > 50) attacked = 50
|
||||
|
||||
if(Victim) return // if it's eating someone already, continue eating!
|
||||
if(attacked > 0)
|
||||
if(prob(85))
|
||||
attacked--
|
||||
|
||||
if(Discipline > 0)
|
||||
|
||||
if(Discipline >= 5 && rabid)
|
||||
if(prob(60)) rabid = 0
|
||||
|
||||
if(prob(10))
|
||||
Discipline--
|
||||
|
||||
|
||||
if(prob(5))
|
||||
emote(pick("click","chatter","sway","light","vibrate","chatter","shriek"))
|
||||
if(!client)
|
||||
|
||||
if(AIproc && SStun) return
|
||||
if(!canmove) return
|
||||
|
||||
// DO AI STUFF HERE
|
||||
|
||||
if(Target)
|
||||
if(attacked <= 0)
|
||||
Target = null
|
||||
|
||||
if(Victim) return // if it's eating someone already, continue eating!
|
||||
|
||||
|
||||
var/hungry = 0 // determines if the metroid is hungry
|
||||
var/starving = 0 // determines if the metroid is starving-hungry
|
||||
if(istype(src, /mob/living/carbon/metroid/adult)) // 1200 max nutrition
|
||||
switch(nutrition)
|
||||
if(601 to 900)
|
||||
if(prob(25)) hungry = 1//Ensures they continue eating, but aren't as aggressive at the same time
|
||||
if(301 to 600) hungry = 1
|
||||
if(0 to 300)
|
||||
starving = 1
|
||||
if(prob(5))
|
||||
emote(pick("click","chatter","sway","light","vibrate","chatter","shriek"))
|
||||
|
||||
else
|
||||
switch(nutrition) // 1000 max nutrition
|
||||
if(501 to 700)
|
||||
if(prob(25)) hungry = 1
|
||||
if(201 to 500) hungry = 1
|
||||
if(0 to 200) starving = 1
|
||||
if(AIproc && SStun) return
|
||||
|
||||
|
||||
if(starving && !client) // if a metroid is starving, it starts losing its friends
|
||||
if(Friends.len > 0 && prob(1))
|
||||
var/mob/nofriend = pick(Friends)
|
||||
Friends -= nofriend
|
||||
var/hungry = 0 // determines if the metroid is hungry
|
||||
var/starving = 0 // determines if the metroid is starving-hungry
|
||||
if(istype(src, /mob/living/carbon/metroid/adult)) // 1200 max nutrition
|
||||
switch(nutrition)
|
||||
if(601 to 900)
|
||||
if(prob(25)) hungry = 1//Ensures they continue eating, but aren't as aggressive at the same time
|
||||
if(301 to 600) hungry = 1
|
||||
if(0 to 300)
|
||||
starving = 1
|
||||
|
||||
if(!Target)
|
||||
var/list/targets = list()
|
||||
else
|
||||
switch(nutrition) // 1000 max nutrition
|
||||
if(501 to 700)
|
||||
if(prob(25)) hungry = 1
|
||||
if(201 to 500) hungry = 1
|
||||
if(0 to 200) starving = 1
|
||||
|
||||
if(hungry || starving) //Only add to the list if we need to
|
||||
for(var/mob/living/L in view(7,src))
|
||||
|
||||
//Ignore other metroids, dead mobs and simple_animals
|
||||
if(ismetroid(L) || L.stat == DEAD || isanimal(L))
|
||||
if(starving && !client) // if a metroid is starving, it starts losing its friends
|
||||
if(Friends.len > 0 && prob(1))
|
||||
var/mob/nofriend = pick(Friends)
|
||||
Friends -= nofriend
|
||||
|
||||
if(!Target)
|
||||
var/list/targets = list()
|
||||
|
||||
if(hungry || starving) //Only add to the list if we need to
|
||||
for(var/mob/living/L in view(7,src))
|
||||
|
||||
//Ignore other metroids, dead mobs and simple_animals
|
||||
if(ismetroid(L) || L.stat != CONSCIOUS || isanimal(L))
|
||||
continue
|
||||
|
||||
if(issilicon(L))
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids wont eat things
|
||||
if(!starving && Discipline > 0)
|
||||
continue
|
||||
|
||||
if(issilicon(L))
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids wont eat things
|
||||
if(!starving && Discipline > 0)
|
||||
continue
|
||||
if(tame) //Tame metroids ignore electronic life
|
||||
continue
|
||||
|
||||
if(tame) //Tame metroids ignore electronic life
|
||||
targets += L //Possible target found!
|
||||
|
||||
else if(iscarbon(L))
|
||||
|
||||
if(istype(L, /mob/living/carbon/human)) //Ignore metroid(wo)men
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.dna)
|
||||
if(H.dna.mutantrace == "metroid")
|
||||
continue
|
||||
|
||||
targets += L //Possible target found!
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids wont eat things
|
||||
if(!starving && Discipline > 0)
|
||||
continue
|
||||
|
||||
else if(iscarbon(L))
|
||||
if(L in Friends) //No eating friends!
|
||||
continue
|
||||
|
||||
if(istype(L, /mob/living/carbon/human)) //Ignore metroid(wo)men
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.dna)
|
||||
if(H.dna.mutantrace == "metroid")
|
||||
continue
|
||||
if(tame && ishuman(L)) //Tame metroids dont eat people.
|
||||
continue
|
||||
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids wont eat things
|
||||
if(!starving && Discipline > 0)
|
||||
continue
|
||||
if(!L.canmove) //Only one metroid can latch on at a time.
|
||||
|
||||
if(L in Friends) //No eating friends!
|
||||
continue
|
||||
var/notarget = 0
|
||||
for(var/mob/living/carbon/metroid/M in view(1,L))
|
||||
if(M.Victim == L)
|
||||
notarget = 1
|
||||
if(notarget)
|
||||
continue
|
||||
|
||||
if(tame && ishuman(L)) //Tame metroids dont eat people.
|
||||
continue
|
||||
|
||||
if(!L.canmove) //Only one metroid can latch on at a time.
|
||||
|
||||
var/notarget = 0
|
||||
for(var/mob/living/carbon/metroid/M in view(1,L))
|
||||
if(M.Victim == L)
|
||||
notarget = 1
|
||||
if(notarget)
|
||||
continue
|
||||
|
||||
targets += L //Possible target found!
|
||||
targets += L //Possible target found!
|
||||
|
||||
|
||||
|
||||
if((hungry || starving) && targets.len > 0)
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!starving)
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
if(!Discipline && prob(5))
|
||||
if(ishuman(C))
|
||||
Target = C
|
||||
break
|
||||
if(isalienadult(C))
|
||||
Target = C
|
||||
break
|
||||
|
||||
if(islarva(C))
|
||||
Target = C
|
||||
break
|
||||
if(ismonkey(C))
|
||||
Target = C
|
||||
break
|
||||
else
|
||||
Target = targets[1]
|
||||
else
|
||||
Target = targets[1] // closest target
|
||||
|
||||
if(targets.len > 0)
|
||||
if(attacked > 0 || rabid)
|
||||
Target = targets[1] //closest mob probably attacked it, so override Target and attack the nearest!
|
||||
|
||||
|
||||
if(!Target)
|
||||
if(hungry || starving)
|
||||
if(canmove && isturf(loc) && prob(50))
|
||||
step(src, pick(cardinal))
|
||||
if((hungry || starving) && targets.len > 0)
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!starving)
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
if(!Discipline && prob(5))
|
||||
if(ishuman(C))
|
||||
Target = C
|
||||
break
|
||||
if(isalienadult(C))
|
||||
Target = C
|
||||
break
|
||||
|
||||
if(islarva(C))
|
||||
Target = C
|
||||
break
|
||||
if(ismonkey(C))
|
||||
Target = C
|
||||
break
|
||||
else
|
||||
if(canmove && isturf(loc) && prob(33))
|
||||
step(src, pick(cardinal))
|
||||
Target = targets[1]
|
||||
else
|
||||
if(!AIproc)
|
||||
spawn() AIprocess()
|
||||
Target = targets[1] // closest target
|
||||
|
||||
if(targets.len > 0)
|
||||
if(attacked > 0 || rabid)
|
||||
Target = targets[1] //closest mob probably attacked it, so override Target and attack the nearest!
|
||||
|
||||
|
||||
if(!Target)
|
||||
if(hungry || starving)
|
||||
if(canmove && isturf(loc) && prob(50))
|
||||
step(src, pick(cardinal))
|
||||
|
||||
else
|
||||
if(canmove && isturf(loc) && prob(33))
|
||||
step(src, pick(cardinal))
|
||||
else
|
||||
if(!AIproc)
|
||||
spawn() AIprocess()
|
||||
|
||||
@@ -189,6 +189,10 @@
|
||||
stat(null,"Power Level: [powerlevel]")
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/adjustFireLoss(amount)
|
||||
..(-abs(amount)) // Heals them
|
||||
return
|
||||
|
||||
/mob/living/carbon/metroid/bullet_act(var/obj/item/projectile/Proj)
|
||||
attacked += 10
|
||||
..(Proj)
|
||||
@@ -659,7 +663,7 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
|
||||
/mob/living/carbon/metroid/show_inv(mob/user as mob)
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR><BR>
|
||||
@@ -783,7 +787,7 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
var/Flush = 30
|
||||
var/Uses = 5 // uses before it goes inert
|
||||
|
||||
New()
|
||||
/obj/item/metroid_core/New()
|
||||
..()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
@@ -791,7 +795,7 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
POWERFLAG = rand(1,10)
|
||||
Uses = rand(7, 25)
|
||||
//flags |= NOREACT
|
||||
|
||||
/*
|
||||
spawn()
|
||||
Life()
|
||||
|
||||
@@ -802,8 +806,9 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
if(Flush <= 0)
|
||||
reagents.clear_reagents()
|
||||
Flush = 30
|
||||
*/
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/roro_egg
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/roro
|
||||
name = "roro egg"
|
||||
desc = "A small, gelatinous egg."
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
@@ -812,32 +817,37 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
origin_tech = "biotech=4"
|
||||
var/grown = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 5)
|
||||
spawn(rand(1200,1500))//the egg takes a while to "ripen"
|
||||
Grow()
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/roro/New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 4)
|
||||
reagents.add_reagent("rorojelly", 1)
|
||||
spawn(rand(1200,1500))//the egg takes a while to "ripen"
|
||||
Grow()
|
||||
|
||||
proc/Grow()
|
||||
grown = 1
|
||||
icon_state = "roro egg-grown"
|
||||
processing_objects.Add(src)
|
||||
return
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/roro/proc/Grow()
|
||||
grown = 1
|
||||
icon_state = "roro egg-grown"
|
||||
processing_objects.Add(src)
|
||||
return
|
||||
|
||||
proc/Hatch()
|
||||
processing_objects.Remove(src)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/O in hearers(T))
|
||||
O.show_message("\blue The [name] pulsates and quivers!")
|
||||
spawn(rand(50,100))
|
||||
for(var/mob/O in hearers(T))
|
||||
O.show_message("\blue The [name] bursts open!")
|
||||
new/mob/living/carbon/metroid(T)
|
||||
del(src)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/roro/proc/Hatch()
|
||||
processing_objects.Remove(src)
|
||||
var/turf/T = get_turf(src)
|
||||
src.visible_message("\blue The [name] pulsates and quivers!")
|
||||
spawn(rand(50,100))
|
||||
src.visible_message("\blue The [name] bursts open!")
|
||||
new/mob/living/carbon/metroid(T)
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/roro_egg/process()
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/roro/process()
|
||||
var/turf/location = get_turf(src)
|
||||
var/datum/gas_mixture/environment = location.return_air()
|
||||
if (environment.toxins > MOLES_PLASMA_VISIBLE)//plasma exposure causes the egg to hatch
|
||||
src.Hatch()
|
||||
src.Hatch()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/roro/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype( W, /obj/item/toy/crayon ))
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(amount_grown >= 10)
|
||||
if(src.nutrition >= 300)
|
||||
new/obj/item/weapon/reagent_containers/food/snacks/roro_egg(loc)
|
||||
new/obj/item/weapon/reagent_containers/food/snacks/egg/roro(loc)
|
||||
src.nutrition -= 200
|
||||
else
|
||||
src << "<i>I have not fed enough...</i>"
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
if(!client && !stat)
|
||||
if(!client && stat == CONSCIOUS)
|
||||
if(prob(33) && canmove && isturf(loc))
|
||||
step(src, pick(cardinal))
|
||||
if(prob(1))
|
||||
@@ -158,7 +158,8 @@
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/gas_mixture/breath
|
||||
|
||||
if(health < 0)
|
||||
losebreath++
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
losebreath--
|
||||
if (prob(75)) //High chance of gasping for air
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
..()
|
||||
if (href_list["mach_close"])
|
||||
var/t1 = text("window=[]", href_list["mach_close"])
|
||||
machine = null
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
if ((href_list["item"] && !( usr.stat ) && !( usr.restrained() ) && in_range(src, usr) ))
|
||||
var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( )
|
||||
@@ -309,7 +309,7 @@
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
var/damage = 5
|
||||
if(prob(95))
|
||||
Weaken(rand(10,15))
|
||||
Weaken(15)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
|
||||
|
||||
@@ -60,3 +60,26 @@
|
||||
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, used_weapon = "Projectile([P.name])")
|
||||
P.on_hit(src, absorb)
|
||||
return absorb
|
||||
|
||||
/mob/living/hitby(atom/movable/AM as mob|obj)//Standardization and logging -Sieve
|
||||
if(istype(AM,/obj/))
|
||||
var/obj/O = AM
|
||||
var/zone = ran_zone("chest",75)//Hits a random part of the body, geared towards the chest
|
||||
var/dtype = BRUTE
|
||||
if(istype(O,/obj/item/weapon))
|
||||
var/obj/item/weapon/W = O
|
||||
dtype = W.damtype
|
||||
src.visible_message("\red [src] has been hit by [O].")
|
||||
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [zone].", "Your armor has softened hit to your [zone].")
|
||||
if(armor < 2)
|
||||
apply_damage(O.throwforce, dtype, zone, armor, O)
|
||||
if(!O.fingerprintslast)
|
||||
return
|
||||
var/mob/assailant = null
|
||||
for(var/mob/living/M in player_list)//Finds the name of whoever threw it (This is required unless thrown objects are COMPLETELY reworked
|
||||
if(M.key == O.fingerprintslast)
|
||||
assailant = M
|
||||
continue
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with [O], last touched by [assailant.name] ([assailant.ckey])</font>")
|
||||
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [src.name] ([src.ckey]) with [O]</font>")
|
||||
log_attack("<font color='red'>[src.name] ([src.ckey]) was hit by [O], last touched by [assailant.name] ([assailant.ckey])</font>")
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
var/list/ai_list = list()
|
||||
|
||||
//Not sure why this is necessary...
|
||||
/proc/AutoUpdateAI(obj/subject)
|
||||
var/is_in_use = 0
|
||||
if (subject!=null)
|
||||
for(var/mob/living/silicon/ai/M in player_list)
|
||||
for(var/A in ai_list)
|
||||
var/mob/living/silicon/ai/M = A
|
||||
if ((M.client && M.machine == subject))
|
||||
is_in_use = 1
|
||||
subject.attack_ai(M)
|
||||
return is_in_use
|
||||
|
||||
|
||||
/mob/living/silicon/ai
|
||||
@@ -105,10 +111,14 @@
|
||||
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
|
||||
|
||||
job = "AI"
|
||||
|
||||
add_to_mob_list(src)
|
||||
ai_list += src
|
||||
..()
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/Del()
|
||||
ai_list -= src
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/silicon/ai/verb/pick_icon()
|
||||
set category = "AI Commands"
|
||||
@@ -321,7 +331,7 @@
|
||||
if (href_list["mach_close"] == "aialerts")
|
||||
viewalerts = 0
|
||||
var/t1 = text("window=[]", href_list["mach_close"])
|
||||
machine = null
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
if (href_list["switchcamera"])
|
||||
switchCamera(locate(href_list["switchcamera"])) in cameranet.cameras
|
||||
@@ -550,7 +560,7 @@
|
||||
/mob/living/silicon/ai/proc/ai_network_change()
|
||||
set category = "AI Commands"
|
||||
set name = "Jump To Network"
|
||||
machine = null
|
||||
unset_machine()
|
||||
src.cameraFollow = null
|
||||
var/cameralist[0]
|
||||
|
||||
@@ -729,4 +739,4 @@
|
||||
anchored = 1
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define UPDATE_BUFFER 20 // 2 seconds
|
||||
#define UPDATE_BUFFER 25 // 2.5 seconds
|
||||
|
||||
// CAMERA CHUNK
|
||||
//
|
||||
|
||||
@@ -116,8 +116,8 @@
|
||||
user.cameraFollow = null
|
||||
src.eye = user.eyeobj
|
||||
|
||||
//user.machine = null //Uncomment this if it causes problems.
|
||||
user.lightNearbyCamera()
|
||||
//user.unset_machine() //Uncomment this if it causes problems.
|
||||
//user.lightNearbyCamera()
|
||||
|
||||
|
||||
// Return to the Core.
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
current = null
|
||||
cameraFollow = null
|
||||
machine = null
|
||||
unset_machine()
|
||||
|
||||
if(src.eyeobj && src.loc)
|
||||
src.eyeobj.loc = src.loc
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
if (src.stat!=0)
|
||||
src.cameraFollow = null
|
||||
src.reset_view(null)
|
||||
src.machine = null
|
||||
src.unset_machine()
|
||||
|
||||
src.updatehealth()
|
||||
|
||||
|
||||
@@ -216,14 +216,14 @@
|
||||
/mob/living/silicon/pai/proc/switchCamera(var/obj/machinery/camera/C)
|
||||
usr:cameraFollow = null
|
||||
if (!C)
|
||||
src.machine = null
|
||||
src.unset_machine()
|
||||
src.reset_view(null)
|
||||
return 0
|
||||
if (stat == 2 || !C.status || C.network != src.network) return 0
|
||||
|
||||
// ok, we're alive, camera is good and in our network...
|
||||
|
||||
src.machine = src
|
||||
src.set_machine(src)
|
||||
src:current = C
|
||||
src.reset_view(C)
|
||||
return 1
|
||||
@@ -233,7 +233,7 @@
|
||||
set category = "pAI Commands"
|
||||
set name = "Cancel Camera View"
|
||||
src.reset_view(null)
|
||||
src.machine = null
|
||||
src.unset_machine()
|
||||
src:cameraFollow = null
|
||||
|
||||
//Addition by Mord_Sith to define AI's network change ability
|
||||
@@ -242,7 +242,7 @@
|
||||
set category = "pAI Commands"
|
||||
set name = "Change Camera Network"
|
||||
src.reset_view(null)
|
||||
src.machine = null
|
||||
src.unset_machine()
|
||||
src:cameraFollow = null
|
||||
var/cameralist[0]
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
var/dat = ""
|
||||
var/left_part = ""
|
||||
var/right_part = softwareMenu()
|
||||
src.machine = src
|
||||
src.set_machine(src)
|
||||
|
||||
if(temp)
|
||||
left_part = temp
|
||||
|
||||
@@ -106,7 +106,6 @@
|
||||
//Improved /N
|
||||
/mob/living/silicon/robot/Del()
|
||||
if(mmi)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside.
|
||||
add_to_mob_list(mmi.brainmob)
|
||||
var/turf/T = get_turf(loc)//To hopefully prevent run time errors.
|
||||
if(T) mmi.loc = T
|
||||
if(mind) mind.transfer_to(mmi.brainmob)
|
||||
@@ -621,7 +620,7 @@
|
||||
if ("disarm")
|
||||
if(!(lying))
|
||||
if (rand(1,100) <= 85)
|
||||
Stun(10)
|
||||
Stun(7)
|
||||
step(src,get_dir(M,src))
|
||||
spawn(5) step(src,get_dir(M,src))
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1)
|
||||
@@ -838,7 +837,7 @@
|
||||
..()
|
||||
if (href_list["mach_close"])
|
||||
var/t1 = text("window=[href_list["mach_close"]]")
|
||||
machine = null
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
return
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
/mob/living/silicon/robot/proc/interact(mob/user)
|
||||
if(wiresexposed && (!istype(user, /mob/living/silicon)))
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/t1 = text("<B>Access Panel</B><br>\n")
|
||||
var/list/Borgwires = list(
|
||||
"Orange" = 1,
|
||||
@@ -116,7 +116,7 @@
|
||||
/mob/living/silicon/robot/Topic(href, href_list)
|
||||
..()
|
||||
if (((in_range(src, usr) && istype(src.loc, /turf))) && !istype(usr, /mob/living/silicon))
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
if (href_list["borgwires"])
|
||||
var/t1 = text2num(href_list["borgwires"])
|
||||
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
||||
@@ -138,7 +138,7 @@
|
||||
src.pulse(t1)
|
||||
else if (href_list["close2"])
|
||||
usr << browse(null, "window=borgwires")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
#undef BORG_WIRE_LAWCHECK
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/mob/living/simple_animal/corgi/show_inv(mob/user as mob)
|
||||
/*
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
if(user.stat) return
|
||||
|
||||
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
|
||||
@@ -406,4 +406,4 @@
|
||||
if(href_list["remove_inv"] || href_list["add_inv"])
|
||||
usr << "\red You can't fit this on [src]"
|
||||
return
|
||||
..()
|
||||
..()
|
||||
@@ -36,7 +36,7 @@
|
||||
minbodytemp = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/Process_Spacemove(var/check_drift = 0)
|
||||
return //No drifting in space for space carp! //original comments do not steal
|
||||
return 1 //No drifting in space for space carp! //original comments do not steal
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/FindTarget()
|
||||
. = ..()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/mob/living/simple_animal/parrot
|
||||
name = "\improper Parrot"
|
||||
desc = "The parrot squacks, \"It's a Parrot! BAWWK!\""
|
||||
desc = "The parrot squaks, \"It's a Parrot! BAWWK!\""
|
||||
icon = 'icons/mob/animal.dmi'
|
||||
icon_state = "parrot_fly"
|
||||
icon_living = "parrot_fly"
|
||||
@@ -78,28 +78,28 @@
|
||||
/obj/machinery/suit_storage_unit, /obj/machinery/telecomms, \
|
||||
/obj/machinery/teleport)
|
||||
|
||||
//Parrots are kleptomaniacs. These vars a used for just that.. holding items and storing a list of items the parrot wants to steal.
|
||||
//Parrots are kleptomaniacs. This variable ... stores the item a parrot is holding.
|
||||
var/obj/item/held_item = null
|
||||
var/list/desired_items = list(/obj/item/weapon/reagent_containers/food/snacks/cracker/, \
|
||||
/obj/item/smallDelivery, /obj/item/weapon/gift, \
|
||||
/obj/item/weapon/soap, /obj/item/toy, \
|
||||
/obj/item/weapon/coin, /obj/item/weapon/stamp, \
|
||||
/obj/item/weapon/grenade, /obj/item/device/radio/headset, \
|
||||
/obj/item/device/flash, /obj/item/device/soulstone, \
|
||||
/obj/item/device/assembly, /obj/item/weapon/bananapeel, \
|
||||
/obj/item/weapon/book, /obj/item/weapon/caution, \
|
||||
/obj/item/weapon/cigpacket, /obj/item/weapon/handcuffs,\
|
||||
/obj/item/weapon/pen, /obj/item/weapon/pinpointer)
|
||||
|
||||
|
||||
/mob/living/simple_animal/parrot/New()
|
||||
..()
|
||||
if(!ears)
|
||||
var/headset = pick(/obj/item/device/radio/headset/headset_sec, \
|
||||
/obj/item/device/radio/headset/headset_eng, \
|
||||
/obj/item/device/radio/headset/headset_med, \
|
||||
/obj/item/device/radio/headset/headset_sci, \
|
||||
/obj/item/device/radio/headset/heads/qm)
|
||||
ears = new headset(src)
|
||||
|
||||
parrot_sleep_dur = parrot_sleep_max //In case someone decides to change the max without changing the duration var
|
||||
|
||||
verbs.Add(/mob/living/simple_animal/parrot/proc/steal_from_ground, \
|
||||
/mob/living/simple_animal/parrot/proc/steal_from_mob, \
|
||||
/mob/living/simple_animal/parrot/verb/drop_held_item_player, \
|
||||
/mob/living/simple_animal/parrot/proc/perch_player)
|
||||
|
||||
|
||||
/mob/living/simple_animal/parrot/Die()
|
||||
if(held_item)
|
||||
held_item.loc = src.loc
|
||||
@@ -110,7 +110,7 @@
|
||||
* Inventory
|
||||
*/
|
||||
/mob/living/simple_animal/parrot/show_inv(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
if(user.stat) return
|
||||
|
||||
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
|
||||
@@ -518,17 +518,19 @@
|
||||
|
||||
/mob/living/simple_animal/parrot/proc/search_for_item()
|
||||
for(var/atom/movable/AM in view(src))
|
||||
for(var/path in desired_items)
|
||||
if(parrot_perch && AM.loc == parrot_perch.loc || AM.loc == src) //Skip items we already stole or are wearing
|
||||
continue
|
||||
//Skip items we already stole or are wearing or are too big
|
||||
if(parrot_perch && AM.loc == parrot_perch.loc || AM.loc == src)
|
||||
continue
|
||||
|
||||
if(istype(AM, path))
|
||||
return AM
|
||||
if(istype(AM, /obj/item))
|
||||
var/obj/item/I = AM
|
||||
if(I.w_class < 2)
|
||||
return I
|
||||
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/C = AM
|
||||
if(istype(C.l_hand, path) || istype(C.r_hand, path))
|
||||
return C
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/C = AM
|
||||
if(C.l_hand.w_class <= 2 || C.r_hand.w_class <= 2)
|
||||
return C
|
||||
return null
|
||||
|
||||
/mob/living/simple_animal/parrot/proc/search_for_perch()
|
||||
@@ -545,17 +547,19 @@
|
||||
if(istype(AM, perch_path))
|
||||
return AM
|
||||
|
||||
for(var/item_path in desired_items)
|
||||
if(parrot_perch && AM.loc == parrot_perch.loc || AM.loc == src) //Skip items we already stole or are wearing
|
||||
continue
|
||||
//Skip items we already stole or are wearing or are too big
|
||||
if(parrot_perch && AM.loc == parrot_perch.loc || AM.loc == src)
|
||||
continue
|
||||
|
||||
if(istype(AM, item_path))
|
||||
return AM
|
||||
if(istype(AM, /obj/item))
|
||||
var/obj/item/I = AM
|
||||
if(I.w_class <= 2)
|
||||
return I
|
||||
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/C = AM
|
||||
if(istype(C.l_hand, item_path) || istype(C.r_hand, item_path))
|
||||
return AM
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/C = AM
|
||||
if(C.l_hand.w_class <= 2 || C.r_hand.w_class <= 2)
|
||||
return C
|
||||
return null
|
||||
|
||||
|
||||
@@ -575,18 +579,17 @@
|
||||
return 1
|
||||
|
||||
for(var/obj/item/I in view(1,src))
|
||||
for(var/path in desired_items)
|
||||
//Make sure it's the proper item and we're not holding it
|
||||
if(istype(I, path) && I.loc != src)
|
||||
//Make sure we're not already holding it and it's small enough
|
||||
if(I.loc != src && I.w_class <= 2)
|
||||
|
||||
//If we have a perch and the item is sitting on it, continue
|
||||
if(!client && parrot_perch && I.loc == parrot_perch)
|
||||
continue
|
||||
//If we have a perch and the item is sitting on it, continue
|
||||
if(!client && parrot_perch && I.loc == parrot_perch)
|
||||
continue
|
||||
|
||||
held_item = I
|
||||
I.loc = src
|
||||
visible_message("[src] grabs the [held_item]!", "\blue You grab the [held_item]!", "You hear the sounds of wings flapping furiously.")
|
||||
return held_item
|
||||
held_item = I
|
||||
I.loc = src
|
||||
visible_message("[src] grabs the [held_item]!", "\blue You grab the [held_item]!", "You hear the sounds of wings flapping furiously.")
|
||||
return held_item
|
||||
|
||||
src << "\red There is nothing of interest to take."
|
||||
return 0
|
||||
@@ -606,19 +609,18 @@
|
||||
var/obj/item/stolen_item = null
|
||||
|
||||
for(var/mob/living/carbon/C in view(1,src))
|
||||
for(var/path in desired_items)
|
||||
if(istype(C.l_hand, path))
|
||||
stolen_item = C.l_hand
|
||||
if(C.l_hand.w_class <= 2)
|
||||
stolen_item = C.l_hand
|
||||
|
||||
if(istype(C.r_hand, path))
|
||||
stolen_item = C.r_hand
|
||||
if(C.r_hand.w_class <= 2)
|
||||
stolen_item = C.r_hand
|
||||
|
||||
if(stolen_item)
|
||||
C.u_equip(stolen_item)
|
||||
held_item = stolen_item
|
||||
stolen_item.loc = src
|
||||
visible_message("[src] grabs the [held_item] out of [C]'s hand!", "\blue You snag the [held_item] out of [C]'s hand!", "You hear the sounds of wings flapping furiously.")
|
||||
return held_item
|
||||
if(stolen_item)
|
||||
C.u_equip(stolen_item)
|
||||
held_item = stolen_item
|
||||
stolen_item.loc = src
|
||||
visible_message("[src] grabs the [held_item] out of [C]'s hand!", "\blue You snag the [held_item] out of [C]'s hand!", "You hear the sounds of wings flapping furiously.")
|
||||
return held_item
|
||||
|
||||
src << "\red There is nothing of interest to take."
|
||||
return 0
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/mob/Logout()
|
||||
player_list -= src
|
||||
log_access("Logout: [key_name(src)]")
|
||||
if(admins[src.ckey])
|
||||
if(admin_datums[src.ckey])
|
||||
if (ticker && ticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
|
||||
var/admins_number = admin_list.len
|
||||
var/admins_number = admins.len
|
||||
|
||||
message_admins("Admin logout: [key_name(src)]")
|
||||
if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
/mob/Del()//This makes sure that mobs with clients/keys are not just deleted from the game.
|
||||
mob_list -= src
|
||||
dead_mob_list -= src
|
||||
living_mob_list -= src
|
||||
ghostize()
|
||||
remove_from_mob_list(src)
|
||||
..()
|
||||
|
||||
/mob/New()
|
||||
add_to_mob_list(src)
|
||||
mob_list += src
|
||||
if(stat == DEAD)
|
||||
dead_mob_list += src
|
||||
else
|
||||
living_mob_list += src
|
||||
..()
|
||||
|
||||
/mob/proc/Cell()
|
||||
@@ -213,7 +219,7 @@ var/list/slot_equipment_priority = list( \
|
||||
|
||||
|
||||
/mob/proc/show_inv(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
@@ -550,7 +556,7 @@ var/list/slot_equipment_priority = list( \
|
||||
set name = "Cancel Camera View"
|
||||
set category = "OOC"
|
||||
reset_view(null)
|
||||
machine = null
|
||||
unset_machine()
|
||||
if(istype(src, /mob/living))
|
||||
if(src:cameraFollow)
|
||||
src:cameraFollow = null
|
||||
@@ -558,7 +564,7 @@ var/list/slot_equipment_priority = list( \
|
||||
/mob/Topic(href, href_list)
|
||||
if(href_list["mach_close"])
|
||||
var/t1 = text("window=[href_list["mach_close"]]")
|
||||
machine = null
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
|
||||
if(href_list["flavor_more"])
|
||||
@@ -713,18 +719,19 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
if(statpanel("Status")) //not looking at that panel
|
||||
|
||||
if(client && client.holder)
|
||||
stat(null,"Location: \t ([x], [y], [z])")
|
||||
stat(null,"CPU: \t [world.cpu]")
|
||||
stat(null,"Location:\t([x], [y], [z])")
|
||||
stat(null,"CPU:\t[world.cpu]")
|
||||
stat(null,"Instances:\t[world.contents.len]")
|
||||
|
||||
if(master_controller)
|
||||
stat(null,"MasterController-[last_tick_duration] ([master_controller.processing?"On":"Off"]-[controller_iteration])")
|
||||
stat(null,"Air-[master_controller.air_cost]\t Sun-[master_controller.sun_cost]")
|
||||
stat(null,"Mob-[master_controller.mobs_cost]\t #[mob_list.len]")
|
||||
stat(null,"Dis-[master_controller.diseases_cost]\t #[active_diseases.len]")
|
||||
stat(null,"Mch-[master_controller.machines_cost]\t #[machines.len]")
|
||||
stat(null,"Obj-[master_controller.objects_cost]\t #[processing_objects.len]")
|
||||
stat(null,"Net-[master_controller.networks_cost]\t Pnet-[master_controller.powernets_cost]")
|
||||
stat(null,"Tick-[master_controller.ticker_cost]\t ALL-[master_controller.total_cost]")
|
||||
stat(null,"Air-[master_controller.air_cost]\tSun-[master_controller.sun_cost]")
|
||||
stat(null,"Mob-[master_controller.mobs_cost]\t#[mob_list.len]")
|
||||
stat(null,"Dis-[master_controller.diseases_cost]\t#[active_diseases.len]")
|
||||
stat(null,"Mch-[master_controller.machines_cost]\t#[machines.len]")
|
||||
stat(null,"Obj-[master_controller.objects_cost]\t#[processing_objects.len]")
|
||||
stat(null,"Net-[master_controller.networks_cost]\tPnet-[master_controller.powernets_cost]")
|
||||
stat(null,"Tick-[master_controller.ticker_cost]\tALL-[master_controller.total_cost]")
|
||||
else
|
||||
stat(null,"MasterController-ERROR")
|
||||
|
||||
@@ -898,18 +905,8 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
resting = max(resting + amount,0)
|
||||
return
|
||||
|
||||
/*
|
||||
* Sends resource files to client cache
|
||||
*/
|
||||
/mob/proc/getFiles()
|
||||
if(!isemptylist(args))
|
||||
for(var/file in args)
|
||||
src << browse_rsc(file)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/proc/get_species()
|
||||
return ""
|
||||
|
||||
/mob/proc/flash_weak_pain()
|
||||
flick("weak_pain",pain)
|
||||
flick("weak_pain",pain)
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
|
||||
anchored = 1 // don't get pushed around
|
||||
|
||||
New()
|
||||
mob_list += src
|
||||
|
||||
verb/new_player_panel()
|
||||
set src = usr
|
||||
new_player_panel_proc()
|
||||
|
||||
@@ -112,6 +112,20 @@
|
||||
name = "Ponytail 3"
|
||||
icon_state = "hair_ponytail3"
|
||||
|
||||
parted
|
||||
name = "Parted"
|
||||
icon_state = "hair_parted"
|
||||
|
||||
pompadour
|
||||
name = "Pompadour"
|
||||
icon_state = "hair_pompadour"
|
||||
choose_female = 0
|
||||
|
||||
quiff
|
||||
name = "Quiff"
|
||||
icon_state = "hair_quiff"
|
||||
choose_female = 0
|
||||
|
||||
bedhead
|
||||
name = "Bedhead"
|
||||
icon_state = "hair_bedhead"
|
||||
@@ -124,6 +138,45 @@
|
||||
name = "Bedhead 3"
|
||||
icon_state = "hair_bedheadv3"
|
||||
|
||||
beehive
|
||||
name = "Beehive"
|
||||
icon_state = "hair_beehive"
|
||||
choose_male = 0
|
||||
|
||||
bobcurl
|
||||
name = "Bobcurl"
|
||||
icon_state = "hair_bobcurl"
|
||||
choose_male = 0
|
||||
|
||||
bob
|
||||
name = "Bob"
|
||||
icon_state = "hair_bobcut"
|
||||
choose_male = 0
|
||||
|
||||
bowl
|
||||
name = "Bowl"
|
||||
icon_state = "hair_bowlcut"
|
||||
choose_female = 0
|
||||
|
||||
buzz
|
||||
name = "Buzzcut"
|
||||
icon_state = "hair_buzzcut"
|
||||
choose_female = 0
|
||||
|
||||
crew
|
||||
name = "Crewcut"
|
||||
icon_state = "hair_crewcut"
|
||||
choose_female = 0
|
||||
|
||||
combover
|
||||
name = "Combover"
|
||||
icon_state = "hair_combover"
|
||||
choose_female = 0
|
||||
|
||||
devillock
|
||||
name = "Devil Lock"
|
||||
icon_state = "hair_devilock"
|
||||
|
||||
dreadlocks
|
||||
name = "Dreadlocks"
|
||||
icon_state = "hair_dreads"
|
||||
@@ -137,6 +190,10 @@
|
||||
name = "Afro"
|
||||
icon_state = "hair_afro"
|
||||
|
||||
afro2
|
||||
name = "Afro 2"
|
||||
icon_state = "hair_afro2"
|
||||
|
||||
afro_large
|
||||
name = "Big Afro"
|
||||
icon_state = "hair_bigafro"
|
||||
@@ -147,10 +204,23 @@
|
||||
icon_state = "hair_sargeant"
|
||||
choose_female = 0
|
||||
|
||||
emo
|
||||
name = "Emo"
|
||||
icon_state = "hair_emo"
|
||||
|
||||
fag
|
||||
name = "Flow Hair"
|
||||
icon_state = "hair_f"
|
||||
|
||||
feather
|
||||
name = "Feather"
|
||||
icon_state = "hair_feather"
|
||||
|
||||
hitop
|
||||
name = "Hitop"
|
||||
icon_state = "hair_hitop"
|
||||
choose_female = 0
|
||||
|
||||
mohawk
|
||||
name = "Mohawk"
|
||||
icon_state = "hair_d"
|
||||
@@ -190,6 +260,21 @@
|
||||
icon_state = "hair_braid"
|
||||
choose_male = 0
|
||||
|
||||
odango
|
||||
name = "Odango"
|
||||
icon_state = "hair_odango"
|
||||
choose_male = 0
|
||||
|
||||
ombre
|
||||
name = "Ombre"
|
||||
icon_state = "hair_ombre"
|
||||
choose_male = 0
|
||||
|
||||
updo
|
||||
name = "Updo"
|
||||
icon_state = "hair_updo"
|
||||
choose_male = 0
|
||||
|
||||
skinhead
|
||||
name = "Skinhead"
|
||||
icon_state = "hair_skinhead"
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
usr.m_intent = "run"
|
||||
usr.m_int = "13,14"
|
||||
if("Reset Machine")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
if("internal")
|
||||
if (( !usr.stat && !usr.stunned && !usr.paralysis && !usr.restrained() ))
|
||||
if (usr.internal)
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/* Filing cabinets!
|
||||
* Contains:
|
||||
* Filing Cabinets
|
||||
* Security Record Cabinets
|
||||
* Medical Record Cabinets
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Filing Cabinets
|
||||
*/
|
||||
/obj/structure/filingcabinet
|
||||
name = "filing cabinet"
|
||||
desc = "A large cabinet with drawers."
|
||||
@@ -6,18 +17,22 @@
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
|
||||
/obj/structure/filingcabinet/chestdrawer
|
||||
name = "chest drawer"
|
||||
icon_state = "chestdrawer"
|
||||
|
||||
/obj/structure/filingcabinet/filingcabinet //not changing the path to avoid unecessary map issues, but please don't name stuff like this in future -Pete
|
||||
|
||||
/obj/structure/filingcabinet/filingcabinet //not changing the path to avoid unecessary map issues, but please don't name stuff like this in the future -Pete
|
||||
icon_state = "tallcabinet"
|
||||
|
||||
|
||||
/obj/structure/filingcabinet/initialize()
|
||||
for(var/obj/item/I in loc)
|
||||
if(istype(I, /obj/item/weapon/paper) || istype(I, /obj/item/weapon/folder) || istype(I, /obj/item/weapon/photo))
|
||||
I.loc = src
|
||||
|
||||
|
||||
/obj/structure/filingcabinet/attackby(obj/item/P as obj, mob/user as mob)
|
||||
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo))
|
||||
user << "<span class='notice'>You put [P] in [src].</span>"
|
||||
@@ -34,12 +49,13 @@
|
||||
else
|
||||
user << "<span class='notice'>You can't put [P] in [src]!</span>"
|
||||
|
||||
|
||||
/obj/structure/filingcabinet/attack_hand(mob/user as mob)
|
||||
if(contents.len <= 0)
|
||||
user << "<span class='notice'>\The [src] is empty.</span>"
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = "<center><table>"
|
||||
var/i
|
||||
for(i=contents.len, i>=1, i--)
|
||||
@@ -50,6 +66,7 @@
|
||||
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/filingcabinet/Topic(href, href_list)
|
||||
if(href_list["retrieve"])
|
||||
usr << browse("", "window=filingcabinet") // Close the menu
|
||||
@@ -63,3 +80,61 @@
|
||||
sleep(5)
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
|
||||
/*
|
||||
* Security Record Cabinets
|
||||
*/
|
||||
/obj/structure/filingcabinet/security
|
||||
var/virgin = 1
|
||||
|
||||
|
||||
/obj/structure/filingcabinet/security/attack_hand(mob/user as mob)
|
||||
if(virgin)
|
||||
for(var/datum/data/record/G in data_core.general)
|
||||
var/datum/data/record/S
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
if((R.fields["name"] == G.fields["name"] || R.fields["id"] == G.fields["id"]))
|
||||
S = R
|
||||
break
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
|
||||
P.info = "<CENTER><B>Security Record</B></CENTER><BR>"
|
||||
P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]<BR>\nSex: [G.fields["sex"]]<BR>\nAge: [G.fields["age"]]<BR>\nFingerprint: [G.fields["fingerprint"]]<BR>\nPhysical Status: [G.fields["p_stat"]]<BR>\nMental Status: [G.fields["m_stat"]]<BR>"
|
||||
P.info += "<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: [S.fields["criminal"]]<BR>\n<BR>\nMinor Crimes: [S.fields["mi_crim"]]<BR>\nDetails: [S.fields["mi_crim_d"]]<BR>\n<BR>\nMajor Crimes: [S.fields["ma_crim"]]<BR>\nDetails: [S.fields["ma_crim_d"]]<BR>\n<BR>\nImportant Notes:<BR>\n\t[S.fields["notes"]]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>"
|
||||
var/counter = 1
|
||||
while(S.fields["com_[counter]"])
|
||||
P.info += "[S.fields["com_[counter]"]]<BR>"
|
||||
counter++
|
||||
P.info += "</TT>"
|
||||
P.name = "paper - '[G.fields["name"]]'"
|
||||
virgin = 0 //tabbing here is correct- it's possible for people to try and use it
|
||||
//before the records have been generated, so we do this inside the loop.
|
||||
..()
|
||||
|
||||
|
||||
/*
|
||||
* Medical Record Cabinets
|
||||
*/
|
||||
/obj/structure/filingcabinet/medical
|
||||
var/virgin = 1
|
||||
|
||||
/obj/structure/filingcabinet/medical/attack_hand(mob/user as mob)
|
||||
if(virgin)
|
||||
for(var/datum/data/record/G in data_core.general)
|
||||
var/datum/data/record/M
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
if((R.fields["name"] == G.fields["name"] || R.fields["id"] == G.fields["id"]))
|
||||
M = R
|
||||
break
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
|
||||
P.info = "<CENTER><B>Medical Record</B></CENTER><BR>"
|
||||
P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]<BR>\nSex: [G.fields["sex"]]<BR>\nAge: [G.fields["age"]]<BR>\nFingerprint: [G.fields["fingerprint"]]<BR>\nPhysical Status: [G.fields["p_stat"]]<BR>\nMental Status: [G.fields["m_stat"]]<BR>"
|
||||
P.info += "<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: [M.fields["b_type"]]<BR>\nDNA: [M.fields["b_dna"]]<BR>\n<BR>\nMinor Disabilities: [M.fields["mi_dis"]]<BR>\nDetails: [M.fields["mi_dis_d"]]<BR>\n<BR>\nMajor Disabilities: [M.fields["ma_dis"]]<BR>\nDetails: [M.fields["ma_dis_d"]]<BR>\n<BR>\nAllergies: [M.fields["alg"]]<BR>\nDetails: [M.fields["alg_d"]]<BR>\n<BR>\nCurrent Diseases: [M.fields["cdi"]] (per disease info placed in log/comment section)<BR>\nDetails: [M.fields["cdi_d"]]<BR>\n<BR>\nImportant Notes:<BR>\n\t[M.fields["notes"]]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>"
|
||||
var/counter = 1
|
||||
while(M.fields["com_[counter]"])
|
||||
P.info += "[M.fields["com_[counter]"]]<BR>"
|
||||
counter++
|
||||
P.info += "</TT>"
|
||||
P.name = "paper - '[G.fields["name"]]'"
|
||||
virgin = 0 //tabbing here is correct- it's possible for people to try and use it
|
||||
//before the records have been generated, so we do this inside the loop.
|
||||
..()
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
/obj/machinery/photocopier
|
||||
name = "photocopier"
|
||||
icon = 'icons/obj/library.dmi'
|
||||
@@ -23,7 +21,7 @@
|
||||
return attack_hand(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = "Photocopier<BR><BR>"
|
||||
if(copy || photocopy)
|
||||
|
||||
@@ -263,10 +263,10 @@
|
||||
/obj/machinery/power/am_control_unit/proc/interact(mob/user)
|
||||
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
|
||||
if(!istype(user, /mob/living/silicon/ai))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=AMcontrol")
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = ""
|
||||
dat += "AntiMatter Control Panel<BR>"
|
||||
@@ -303,13 +303,13 @@
|
||||
..()
|
||||
//Ignore input if we are broken or guy is not touching us, AI can control from a ways away
|
||||
if(stat & (BROKEN|NOPOWER) || (get_dist(src, usr) > 1 && !istype(usr, /mob/living/silicon/ai)))
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=AMcontrol")
|
||||
return
|
||||
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=AMcontrol")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
if(href_list["togglestatus"])
|
||||
|
||||
@@ -86,11 +86,7 @@
|
||||
/obj/machinery/power/apc/updateDialog()
|
||||
if (stat & (BROKEN|MAINT))
|
||||
return
|
||||
var/list/nearby = viewers(1, src)
|
||||
for(var/mob/M in nearby)
|
||||
if (M.client && M.machine == src)
|
||||
src.interact(M)
|
||||
AutoUpdateAI(src)
|
||||
..()
|
||||
|
||||
/obj/machinery/power/apc/New(turf/loc, var/ndir, var/building=0)
|
||||
..()
|
||||
@@ -463,7 +459,7 @@
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("APC",src,user:wear_suit)
|
||||
return
|
||||
// do APC interaction
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
src.interact(user)
|
||||
|
||||
/obj/machinery/power/apc/attack_alien(mob/living/carbon/alien/humanoid/user)
|
||||
@@ -513,24 +509,24 @@
|
||||
user << browse(t1, "window=apcwires")
|
||||
onclose(user, "apcwires")
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/t = "<html><head><title>[area.name] APC</title></head><body><TT><B>Area Power Controller</B> ([area.name])<HR>"
|
||||
|
||||
//This goes after the wire stuff. They should be able to fix a physical problem when a wire is cut
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=apc")
|
||||
return
|
||||
else if (istype(user, /mob/living/silicon) && src.aidisabled && !src.malfhack)
|
||||
user << "AI control for this APC interface has been disabled."
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=apc")
|
||||
return
|
||||
else if (src.malfai)
|
||||
if ((src.malfai != user && src.malfai != user:parent) && !islinked(user, malfai))
|
||||
user << "AI control for this APC interface has been disabled."
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=apc")
|
||||
return
|
||||
|
||||
@@ -748,7 +744,7 @@
|
||||
istype(user, /mob/living/carbon/monkey) /*&& ticker && ticker.mode.name == "monkey"*/) )
|
||||
user << "\red You don't have the dexterity to use this [src]!"
|
||||
user << browse(null, "window=apc")
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
return 0
|
||||
if(user.restrained())
|
||||
user << "\red You must have free hands to use this [src]"
|
||||
@@ -770,12 +766,12 @@
|
||||
if(!loud)
|
||||
user << "\red \The [src] have AI control disabled!"
|
||||
user << browse(null, "window=apc")
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
return 0
|
||||
else
|
||||
if ((!in_range(src, user) || !istype(src.loc, /turf)))
|
||||
user << browse(null, "window=apc")
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
@@ -794,7 +790,7 @@
|
||||
if(!can_use(usr, 1))
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
if (href_list["apcwires"])
|
||||
var/t1 = text2num(href_list["apcwires"])
|
||||
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
||||
@@ -857,11 +853,11 @@
|
||||
update()
|
||||
else if( href_list["close"] )
|
||||
usr << browse(null, "window=apc")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
else if (href_list["close2"])
|
||||
usr << browse(null, "window=apcwires")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
else if (href_list["overload"])
|
||||
|
||||
@@ -123,11 +123,11 @@
|
||||
|
||||
/obj/machinery/power/generator/proc/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) && (!istype(user, /mob/living/silicon/ai)))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=teg")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/t = "<PRE><B>Thermo-Electric Generator</B><HR>"
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=teg")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -100,11 +100,11 @@
|
||||
|
||||
/obj/machinery/power/generator_type2/proc/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) && (!istype(user, /mob/living/silicon/ai)))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=teg")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/t = "<PRE><B>Thermo-Electric Generator</B><HR>"
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=teg")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/gravity_control_computer/attack_hand(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
if ( (get_dist(src, usr) > 1 ))
|
||||
if (!istype(usr, /mob/living/silicon))
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=air_alarm")
|
||||
return
|
||||
|
||||
|
||||
@@ -249,11 +249,11 @@ display round(lastgen) and plasmatank amount
|
||||
/obj/machinery/power/port_gen/pacman/proc/interact(mob/user)
|
||||
if (get_dist(src, user) > 1 )
|
||||
if (!istype(user, /mob/living/silicon/ai))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=port_gen")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = text("<b>[name]</b><br>")
|
||||
if (active)
|
||||
@@ -294,7 +294,7 @@ display round(lastgen) and plasmatank amount
|
||||
src.updateUsrDialog()
|
||||
if (href_list["action"] == "close")
|
||||
usr << browse(null, "window=port_gen")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/super
|
||||
name = "S.U.P.E.R.P.A.C.M.A.N.-type Portable Generator"
|
||||
|
||||
@@ -70,13 +70,13 @@
|
||||
..()
|
||||
//Ignore input if we are broken, !silicon guy cant touch us, or nonai controlling from super far away
|
||||
if(stat & (BROKEN|NOPOWER) || (get_dist(src, usr) > 1 && !istype(usr, /mob/living/silicon)) || (get_dist(src, usr) > 8 && !istype(usr, /mob/living/silicon/ai)))
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=pacontrol")
|
||||
return
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=pacontrol")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
if(href_list["togglep"])
|
||||
src.toggle_power()
|
||||
@@ -205,10 +205,10 @@
|
||||
/obj/machinery/particle_accelerator/control_box/proc/interact(mob/user)
|
||||
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
|
||||
if(!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=pacontrol")
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = ""
|
||||
dat += "Particle Accelerator Control Panel<BR>"
|
||||
|
||||
@@ -180,11 +180,11 @@
|
||||
|
||||
/obj/machinery/power/smes/proc/interact(mob/user)
|
||||
if(get_dist(src, user) > 1 && !istype(user, /mob/living/silicon/ai))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=smes")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/t = "<TT><B>SMES Power Storage Unit</B> [n_tag? "([n_tag])" : null]<HR><PRE>"
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=smes")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
else if( href_list["cmode"] )
|
||||
@@ -299,7 +299,7 @@
|
||||
|
||||
else
|
||||
usr << browse(null, "window=smes")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -276,12 +276,12 @@
|
||||
if(stat & (BROKEN | NOPOWER)) return
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
if (!istype(user, /mob/living/silicon/ai))
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=solcon")
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/t = "<TT><B>Solar Generator Control</B><HR><PRE>"
|
||||
t += "Generated power : [round(lastgen)] W<BR><BR>"
|
||||
@@ -306,11 +306,11 @@
|
||||
Topic(href, href_list)
|
||||
if(..())
|
||||
usr << browse(null, "window=solcon")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
if(href_list["close"] )
|
||||
usr << browse(null, "window=solcon")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
if(href_list["dir"])
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
O.emp_act(severity)
|
||||
|
||||
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)//TODO: go over this
|
||||
afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params)//TODO: go over this
|
||||
if(flag) return //we're placing gun on a table or in backpack
|
||||
if(istype(target, /obj/machinery/recharger) && istype(src, /obj/item/weapon/gun/energy)) return//Shouldnt flag take care of this?
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
user.visible_message("\red [user.name] fires the [src.name]!", "\red You fire the [src.name]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
||||
|
||||
in_chamber.original = targloc
|
||||
in_chamber.original = target
|
||||
in_chamber.loc = get_turf(user)
|
||||
in_chamber.starting = get_turf(user)
|
||||
user.next_move = world.time + 4
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/temp_text = ""
|
||||
if(temperature > (T0C - 50))
|
||||
temp_text = "<FONT color=black>[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°F)</FONT>"
|
||||
@@ -43,7 +43,7 @@
|
||||
Topic(href, href_list)
|
||||
if (..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
var/yo = null
|
||||
var/xo = null
|
||||
var/current = null
|
||||
var/turf/original = null // the original turf clicked
|
||||
var/atom/original = null // the original target clicked
|
||||
var/turf/starting = null // the projectile's starting turf
|
||||
var/list/permutated = list() // we've passed through these atoms, don't try to hit them again
|
||||
|
||||
@@ -146,10 +146,9 @@
|
||||
return
|
||||
step_towards(src, current)
|
||||
sleep(1)
|
||||
if(!bumped)
|
||||
if(loc == original)
|
||||
for(var/mob/living/M in original)
|
||||
if(!(M in permutated))
|
||||
Bump(M)
|
||||
sleep(1)
|
||||
if(!bumped && !isturf(original))
|
||||
if(loc == get_turf(original))
|
||||
if(!(original in permutated))
|
||||
Bump(original)
|
||||
sleep(1)
|
||||
return
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
|
||||
if (data == "amountc")
|
||||
var/num = input("Enter desired output amount", "Amount", "30") as num
|
||||
@@ -162,7 +162,7 @@
|
||||
/obj/machinery/chem_dispenser/attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
initWindow(user)
|
||||
updateWindow(user)
|
||||
@@ -254,7 +254,7 @@
|
||||
if(!in_range(src, usr)) return
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
|
||||
|
||||
if (href_list["ejectp"])
|
||||
@@ -263,7 +263,7 @@
|
||||
loaded_pill_bottle = null
|
||||
else if(href_list["close"])
|
||||
usr << browse(null, "window=chemmaster")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
if(beaker)
|
||||
@@ -407,7 +407,7 @@
|
||||
usr << browse_rsc(icon('chemical.dmi', "bottle" + num2text(i)), "bottle[i].png")
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = ""
|
||||
if(!beaker)
|
||||
dat = "Please insert beaker.<BR>"
|
||||
@@ -521,7 +521,7 @@
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
if(!beaker) return
|
||||
|
||||
if (href_list["create_vaccine"])
|
||||
@@ -601,7 +601,7 @@
|
||||
/obj/machinery/computer/pandemic/attack_hand(mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = ""
|
||||
if(src.temphtml)
|
||||
dat = "[src.temphtml]<BR><BR><A href='?src=\ref[src];clear=1'>Main Menu</A>"
|
||||
@@ -824,7 +824,7 @@
|
||||
return 0
|
||||
|
||||
/obj/machinery/reagentgrinder/attack_hand(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/interact(mob/user as mob) // The microwave Menu
|
||||
@@ -876,7 +876,7 @@
|
||||
/obj/machinery/reagentgrinder/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
switch(href_list["action"])
|
||||
if ("grind")
|
||||
grind()
|
||||
|
||||
@@ -102,9 +102,11 @@ datum
|
||||
src = null
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
var/datum/disease/virus = new D.type
|
||||
// We don't spread.
|
||||
if(virus.spread_type == SPECIAL || virus.spread_type == NON_CONTAGIOUS) continue
|
||||
|
||||
if(method == TOUCH)
|
||||
M.contract_disease(virus)
|
||||
|
||||
else //injected
|
||||
M.contract_disease(virus, 1, 0)
|
||||
|
||||
@@ -1166,8 +1168,8 @@ datum
|
||||
return
|
||||
reaction_obj(var/obj/O, var/volume)
|
||||
src = null
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/roro_egg))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/roro_egg/egg = O
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg/roro))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/egg/roro/egg = O
|
||||
if (egg.grown)
|
||||
egg.Hatch()
|
||||
if((!O) || (!volume)) return 0
|
||||
|
||||
@@ -425,6 +425,7 @@
|
||||
throw_impact(atom/hit_atom)
|
||||
..()
|
||||
new/obj/effect/decal/cleanable/egg_smudge(src.loc)
|
||||
src.reagents.reaction(hit_atom, TOUCH)
|
||||
src.visible_message("\red [src.name] has been squashed.","\red You hear a smack.")
|
||||
del(src)
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
|
||||
src.add_fingerprint(user)
|
||||
if(stat & BROKEN)
|
||||
user.machine = null
|
||||
user.unset_machine()
|
||||
return
|
||||
|
||||
var/dat = "<head><title>Waste Disposal Unit</title></head><body><TT><B>Waste Disposal Unit</B><HR>"
|
||||
@@ -250,7 +250,7 @@
|
||||
dat += "Pressure: [round(per, 1)]%<BR></body>"
|
||||
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
user << browse(dat, "window=disposal;size=360x170")
|
||||
onclose(user, "disposal")
|
||||
|
||||
@@ -272,10 +272,10 @@
|
||||
return
|
||||
|
||||
if (in_range(src, usr) && istype(src.loc, /turf))
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
|
||||
if(href_list["close"])
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=disposal")
|
||||
return
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
eject()
|
||||
else
|
||||
usr << browse(null, "window=disposal")
|
||||
usr.machine = null
|
||||
usr.unset_machine()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -1332,4 +1332,4 @@
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'drip.dmi'
|
||||
icon_state = "1"
|
||||
icon_state = "1"
|
||||
|
||||
@@ -195,7 +195,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
if(href_list["menu"]) //Switches menu screens. Converts a sent text string into a number. Saves a LOT of code.
|
||||
var/temp_screen = text2num(href_list["menu"])
|
||||
if(temp_screen <= 1.1 || (3 <= temp_screen && 4.9 >= temp_screen) || src.allowed(usr) || emagged) //Unless you are making something, you need access.
|
||||
@@ -548,7 +548,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("RESEARCH",src,user:wear_suit)
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = ""
|
||||
files.RefreshResearch()
|
||||
switch(screen) //A quick check to make sure you get the right screen when a device is disconnected.
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
/obj/machinery/r_n_d/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["pulse"])
|
||||
var/temp_wire = href_list["wire"]
|
||||
|
||||
@@ -39,12 +39,12 @@
|
||||
var/list/temp_list
|
||||
if(!id_with_upload.len)
|
||||
temp_list = list()
|
||||
temp_list = dd_text2list(id_with_upload_string, ";")
|
||||
temp_list = text2list(id_with_upload_string, ";")
|
||||
for(var/N in temp_list)
|
||||
id_with_upload += text2num(N)
|
||||
if(!id_with_download.len)
|
||||
temp_list = list()
|
||||
temp_list = dd_text2list(id_with_download_string, ";")
|
||||
temp_list = text2list(id_with_download_string, ";")
|
||||
for(var/N in temp_list)
|
||||
id_with_download += text2num(N)
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
return
|
||||
|
||||
add_fingerprint(usr)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
if(!src.allowed(usr) && !emagged)
|
||||
usr << "\red You do not have the required access level"
|
||||
return
|
||||
@@ -276,7 +276,7 @@
|
||||
/obj/machinery/computer/rdservercontrol/attack_hand(mob/user as mob)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = ""
|
||||
|
||||
switch(screen)
|
||||
|
||||
@@ -167,7 +167,7 @@ Just found out there was already a string explode function, did some benchmarkin
|
||||
*/
|
||||
proc/string_explode(var/string, var/separator)
|
||||
if(istext(string) && istext(separator))
|
||||
return dd_text2list(string, separator)
|
||||
return text2list(string, separator)
|
||||
|
||||
proc/n_repeat(var/string, var/amount)
|
||||
if(istext(string) && isnum(amount))
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
user << "This device is busy"
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = "<h1>Keycard Authentication Device</h1>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user