Hopefully fixes merge conflicts.

This commit is contained in:
Neerti
2017-08-01 16:18:43 -04:00
188 changed files with 19864 additions and 14498 deletions
+3 -3
View File
@@ -7,13 +7,13 @@ world/IsBanned(key,address,computer_id)
//Guest Checking
if(!config.guests_allowed && IsGuestKey(key))
log_access("Failed Login: [key] - Guests not allowed")
message_admins("\blue Failed Login: [key] - Guests not allowed")
message_admins("<font color='blue'>Failed Login: [key] - Guests not allowed</font>")
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
//check if the IP address is a known TOR node
if(config && config.ToRban && ToRban_isbanned(address))
log_access("Failed Login: [src] - Banned: ToR")
message_admins("\blue Failed Login: [src] - Banned: ToR")
message_admins("<font color='blue'>Failed Login: [src] - Banned: ToR</font>")
//ban their computer_id and ckey for posterity
AddBan(ckey(key), computer_id, "Use of ToR", "Automated Ban", 0, 0)
return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [config.banappeals]")
@@ -25,7 +25,7 @@ world/IsBanned(key,address,computer_id)
. = CheckBan( ckey(key), computer_id, address )
if(.)
log_access("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]")
message_admins("\blue Failed Login: [key] id:[computer_id] ip:[address] - Banned [.["reason"]]")
message_admins("<font color='blue'>Failed Login: [key] id:[computer_id] ip:[address] - Banned [.["reason"]]</font>")
return .
return ..() //default pager ban stuff
+9 -9
View File
@@ -673,7 +673,7 @@ proc/admin_notice(var/message, var/rights)
//This is basically how death alarms do it
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/ert(null)
var/channel = input("Channel for message:","Channel", null) as null|anything in (list("Common") + a.keyslot1.channels + a.keyslot2.channels)
var/channel = input("Channel for message:","Channel", null) as null|anything in (list("Common") + a.keyslot2.channels) // + a.keyslot1.channels
if(channel) //They picked a channel
var/sender = input("Name of sender (max 75):", "Announcement", "Announcement Computer") as null|text
@@ -802,7 +802,7 @@ proc/admin_notice(var/message, var/rights)
else
world << "<B>New players may now enter the game.</B>"
log_admin("[key_name(usr)] toggled new player game entering.")
message_admins("\blue [key_name_admin(usr)] toggled new player game entering.", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] toggled new player game entering.</font>", 1)
world.update_status()
feedback_add_details("admin_verb","TE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -828,7 +828,7 @@ proc/admin_notice(var/message, var/rights)
world << "<B>You may now respawn.</B>"
else
world << "<B>You may no longer respawn :(</B>"
message_admins("\blue [key_name_admin(usr)] toggled respawn to [config.abandon_allowed ? "On" : "Off"].", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] toggled respawn to [config.abandon_allowed ? "On" : "Off"].</font>", 1)
log_admin("[key_name(usr)] toggled respawn to [config.abandon_allowed ? "On" : "Off"].")
world.update_status()
feedback_add_details("admin_verb","TR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -860,7 +860,7 @@ proc/admin_notice(var/message, var/rights)
if (!ticker || ticker.current_state != GAME_STATE_PREGAME)
ticker.delay_end = !ticker.delay_end
log_admin("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
message_admins("\blue [key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
message_admins("<font color='blue'>[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].</font>", 1)
return //alert("Round end delayed", null, null, null, null, null)
round_progressing = !round_progressing
if (!round_progressing)
@@ -876,7 +876,7 @@ proc/admin_notice(var/message, var/rights)
set desc="Toggle admin jumping"
set name="Toggle Jump"
config.allow_admin_jump = !(config.allow_admin_jump)
message_admins("\blue Toggled admin jumping to [config.allow_admin_jump].")
message_admins("<font color='blue'>Toggled admin jumping to [config.allow_admin_jump].</font>")
feedback_add_details("admin_verb","TJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/adspawn()
@@ -884,7 +884,7 @@ proc/admin_notice(var/message, var/rights)
set desc="Toggle admin spawning"
set name="Toggle Spawn"
config.allow_admin_spawning = !(config.allow_admin_spawning)
message_admins("\blue Toggled admin item spawning to [config.allow_admin_spawning].")
message_admins("<font color='blue'>Toggled admin item spawning to [config.allow_admin_spawning].</font>")
feedback_add_details("admin_verb","TAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/adrev()
@@ -892,7 +892,7 @@ proc/admin_notice(var/message, var/rights)
set desc="Toggle admin revives"
set name="Toggle Revive"
config.allow_admin_rev = !(config.allow_admin_rev)
message_admins("\blue Toggled reviving to [config.allow_admin_rev].")
message_admins("<font color='blue'>Toggled reviving to [config.allow_admin_rev].</font>")
feedback_add_details("admin_verb","TAR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/immreboot()
@@ -902,7 +902,7 @@ proc/admin_notice(var/message, var/rights)
if(!usr.client.holder) return
if( alert("Reboot server?",,"Yes","No") == "No")
return
world << "\red <b>Rebooting world!</b> \blue Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!"
world << "<font color='red'><b>Rebooting world!</b></font> <font color='blue'>Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!</font>"
log_admin("[key_name(usr)] initiated an immediate reboot.")
feedback_set_details("end_error","immediate admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]")
@@ -1166,7 +1166,7 @@ proc/admin_notice(var/message, var/rights)
else
world << "<B>Guests may now enter the game.</B>"
log_admin("[key_name(usr)] toggled guests game entering [config.guests_allowed?"":"dis"]allowed.")
message_admins("\blue [key_name_admin(usr)] toggled guests game entering [config.guests_allowed?"":"dis"]allowed.", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] toggled guests game entering [config.guests_allowed?"":"dis"]allowed.</font>", 1)
feedback_add_details("admin_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/output_ai_laws()
+10 -10
View File
@@ -449,11 +449,11 @@ var/list/admin_verbs_mentor = list(
if(holder && mob)
if(mob.invisibility == INVISIBILITY_OBSERVER)
mob.invisibility = initial(mob.invisibility)
mob << "\red <b>Invisimin off. Invisibility reset.</b>"
mob << "<font color='red'><b>Invisimin off. Invisibility reset.</b></font>"
mob.alpha = max(mob.alpha + 100, 255)
else
mob.invisibility = INVISIBILITY_OBSERVER
mob << "\blue <b>Invisimin on. You are now as invisible as a ghost.</b>"
mob << "<font color='blue'><b>Invisimin on. You are now as invisible as a ghost.</b></font>"
mob.alpha = max(mob.alpha - 100, 0)
@@ -619,7 +619,7 @@ var/list/admin_verbs_mentor = list(
var/light_impact_range = input("Light impact range (in tiles):") as num
var/flash_range = input("Flash range (in tiles):") as num
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range)
message_admins("\blue [ckey] creating an admin explosion at [epicenter.loc].")
message_admins("<font color='blue'>[ckey] creating an admin explosion at [epicenter.loc].</font>")
feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/give_disease2(mob/T as mob in mob_list) // -- Giacom
@@ -651,7 +651,7 @@ var/list/admin_verbs_mentor = list(
feedback_add_details("admin_verb","GD2") //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)] a [greater] disease2 with infection chance [D.infectionchance].")
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].</font>", 1)
/client/proc/make_sound(var/obj/O in world) // -- TLE
set category = "Special Verbs"
@@ -664,7 +664,7 @@ var/list/admin_verbs_mentor = list(
for (var/mob/V in hearers(O))
V.show_message(message, 2)
log_admin("[key_name(usr)] made [O] at [O.x], [O.y], [O.z]. make a sound")
message_admins("\blue [key_name_admin(usr)] made [O] at [O.x], [O.y], [O.z]. make a sound", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] made [O] at [O.x], [O.y], [O.z]. make a sound.</font>", 1)
feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -698,7 +698,7 @@ var/list/admin_verbs_mentor = list(
usr << "<b>Disabled air processing.</b>"
feedback_add_details("admin_verb","KA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] used 'kill air'.")
message_admins("\blue [key_name_admin(usr)] used 'kill air'.", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] used 'kill air'.</font>", 1)
/client/proc/readmin_self()
set name = "Re-Admin self"
@@ -839,7 +839,7 @@ var/list/admin_verbs_mentor = list(
var/mob/living/carbon/human/M = input("Select mob.", "Edit Appearance") as null|anything in human_mob_list
if(!istype(M, /mob/living/carbon/human))
usr << "\red You can only do this to humans!"
usr << "<font color='red'>You can only do this to humans!</font>"
return
switch(alert("Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.",,"Yes","No"))
if("No")
@@ -959,7 +959,7 @@ var/list/admin_verbs_mentor = list(
T << "<span class='notice'>Move on.</span>"
log_admin("[key_name(usr)] told [key_name(T)] to man up and deal with it.")
message_admins("\blue [key_name_admin(usr)] told [key_name(T)] to man up and deal with it.", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] told [key_name(T)] to man up and deal with it.</font>", 1)
/client/proc/global_man_up()
set category = "Fun"
@@ -971,7 +971,7 @@ var/list/admin_verbs_mentor = list(
T << 'sound/voice/ManUp1.ogg'
log_admin("[key_name(usr)] told everyone to man up and deal with it.")
message_admins("\blue [key_name_admin(usr)] told everyone to man up and deal with it.", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] told everyone to man up and deal with it.</font>", 1)
/client/proc/give_spell(mob/T as mob in mob_list) // -- Urist
set category = "Fun"
@@ -982,4 +982,4 @@ var/list/admin_verbs_mentor = list(
T.spell_list += new S
feedback_add_details("admin_verb","GS") //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 spell [S].")
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] the spell [S].", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] gave [key_name(T)] the spell [S].</font>", 1)
@@ -85,14 +85,14 @@
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
log_query.Execute()
usr << "\blue New admin added."
usr << "<font color='blue'>New admin added.</font>"
else
if(!isnull(admin_id) && isnum(admin_id))
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET rank = '[new_rank]' WHERE id = [admin_id]")
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');")
log_query.Execute()
usr << "\blue Admin rank changed."
usr << "<font color='blue'>Admin rank changed.</font>"
/datum/admins/proc/log_admin_permission_modification(var/adm_ckey, var/new_permission)
if(config.admin_legacy_system) return
@@ -140,10 +140,10 @@
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
log_query.Execute()
usr << "\blue Permission removed."
usr << "<font color='blue'>Permission removed.</font>"
else //This admin doesn't have this permission, so we are adding it.
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET flags = '[admin_rights | new_permission]' WHERE id = [admin_id]")
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]')")
log_query.Execute()
usr << "\blue Permission added."
usr << "<font color='blue'>Permission added.</font>"
+2 -2
View File
@@ -103,7 +103,7 @@ datum/admins/proc/notes_gethtml(var/ckey)
infos += P
info << infos
message_admins("\blue [key_name_admin(user)] has edited [key]'s notes.")
message_admins("<font color='blue'>[key_name_admin(user)] has edited [key]'s notes.</font>")
log_admin("[key_name(user)] has edited [key]'s notes.")
del(info) // savefile, so NOT qdel
@@ -128,7 +128,7 @@ datum/admins/proc/notes_gethtml(var/ckey)
infos.Remove(item)
info << infos
message_admins("\blue [key_name_admin(usr)] deleted one of [key]'s notes.")
message_admins("<font color='blue'>[key_name_admin(usr)] deleted one of [key]'s notes.</font>")
log_admin("[key_name(usr)] deleted one of [key]'s notes.")
qdel(info)
+49 -49
View File
@@ -197,7 +197,7 @@
if (emergency_shuttle.can_call())
emergency_shuttle.call_evac()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] called the Emergency Shuttle to the station.</font>", 1)
if("2")
if (!( ticker ) || !emergency_shuttle.location())
@@ -205,12 +205,12 @@
if (emergency_shuttle.can_call())
emergency_shuttle.call_evac()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] called the Emergency Shuttle to the station.</font>", 1)
else if (emergency_shuttle.can_recall())
emergency_shuttle.recall()
log_admin("[key_name(usr)] sent the Emergency Shuttle back")
message_admins("\blue [key_name_admin(usr)] sent the Emergency Shuttle back", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] sent the Emergency Shuttle back.</font>", 1)
href_list["secretsadmin"] = "check_antagonist"
@@ -223,14 +223,14 @@
emergency_shuttle.launch_time = world.time + new_time_left*10
log_admin("[key_name(usr)] edited the Emergency Shuttle's launch time to [new_time_left]")
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's launch time to [new_time_left*10]", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] edited the Emergency Shuttle's launch time to [new_time_left*10]</font>", 1)
else if (emergency_shuttle.shuttle.has_arrive_time())
var/new_time_left = input("Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) as num
emergency_shuttle.shuttle.arrive_time = world.time + new_time_left*10
log_admin("[key_name(usr)] edited the Emergency Shuttle's arrival time to [new_time_left]")
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's arrival time to [new_time_left*10]", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] edited the Emergency Shuttle's arrival time to [new_time_left*10]</font>", 1)
else
alert("The shuttle is neither counting down to launch nor is it in transit. Please try again when it is.")
@@ -241,7 +241,7 @@
ticker.delay_end = !ticker.delay_end
log_admin("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
message_admins("\blue [key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
message_admins("<font color='blue'>[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].</font>", 1)
href_list["secretsadmin"] = "check_antagonist"
else if(href_list["simplemake"])
@@ -259,7 +259,7 @@
if("Yes") delmob = 1
log_admin("[key_name(usr)] has used rudimentary transformation on [key_name(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]")
message_admins("\blue [key_name_admin(usr)] has used rudimentary transformation on [key_name_admin(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] has used rudimentary transformation on [key_name_admin(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]</font>", 1)
switch(href_list["simplemake"])
if("observer") M.change_mob_type( /mob/observer/dead , null, null, delmob )
@@ -339,7 +339,7 @@
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
message_admins("\blue [key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]</font>", 1)
Banlist.cd = "/base/[banfolder]"
Banlist["reason"] << reason
Banlist["temp"] << temp
@@ -686,7 +686,7 @@
usr << "<span class='warning'> You Cannot issue temporary job-bans!</span>"
return
if(config.ban_legacy_system)
usr << "\red Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban."
usr << "<font color='red'>Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban.</font>"
return
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
if(!mins)
@@ -711,10 +711,10 @@
else
msg += ", [job]"
notes_add(M.ckey, "Banned from [msg] - [reason]", usr)
message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes", 1)
M << "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG>"
M << "\red <B>The reason is: [reason]</B>"
M << "\red This jobban will be lifted in [mins] minutes."
message_admins("<font color='blue'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes</font>", 1)
M << "<font color='red'><BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG></font>"
M << "<font color='red'><B>The reason is: [reason]</B></font>"
M << "<font color='red'>This jobban will be lifted in [mins] minutes.</font>"
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
if("No")
@@ -732,10 +732,10 @@
if(!msg) msg = job
else msg += ", [job]"
notes_add(M.ckey, "Banned from [msg] - [reason]", usr)
message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [msg]", 1)
M << "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG>"
M << "\red <B>The reason is: [reason]</B>"
M << "\red Jobban can be lifted only upon request."
message_admins("<font color='blue'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg]</font>", 1)
M << "<font color='red'><BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG></font>"
M << "<font color='red'><B>The reason is: [reason]</B></font>"
M << "<font color='red'>Jobban can be lifted only upon request.</font>"
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
if("Cancel")
@@ -765,8 +765,8 @@
else
continue
if(msg)
message_admins("\blue [key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg]", 1)
M << "\red<BIG><B>You have been un-jobbanned by [usr.client.ckey] from [msg].</B></BIG>"
message_admins("<font color='blue'>[key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg]</font>", 1)
M << "<font color='red'><BIG><B>You have been un-jobbanned by [usr.client.ckey] from [msg].</B></BIG></font>"
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
return 0 //we didn't do anything!
@@ -778,11 +778,11 @@
return
var/reason = sanitize(input("Please enter reason"))
if(!reason)
M << "\red You have been kicked from the server"
M << "<font color='red'>You have been kicked from the server</font>"
else
M << "\red You have been kicked from the server: [reason]"
M << "<font color='red'>You have been kicked from the server: [reason]</font>"
log_admin("[key_name(usr)] booted [key_name(M)].")
message_admins("\blue [key_name_admin(usr)] booted [key_name_admin(M)].", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] booted [key_name_admin(M)].</font>", 1)
//M.client = null
qdel(M.client)
@@ -793,7 +793,7 @@
if(t)
if((alert("Do you want to unjobban [t]?","Unjobban confirmation", "Yes", "No") == "Yes") && t) //No more misclicks! Unless you do it twice.
log_admin("[key_name(usr)] removed [t]")
message_admins("\blue [key_name_admin(usr)] removed [t]", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] removed [t]</font>", 1)
jobban_remove(t)
href_list["ban"] = 1 // lets it fall through and refresh
var/t_split = splittext(t, " - ")
@@ -830,17 +830,17 @@
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
ban_unban_log_save("[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.")
notes_add(M.ckey,"[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.",usr)
M << "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>"
M << "\red This is a temporary ban, it will be removed in [mins] minutes."
M << "<font color='red'><BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG></font>"
M << "<font color='red'>This is a temporary ban, it will be removed in [mins] minutes.</font>"
feedback_inc("ban_tmp",1)
DB_ban_record(BANTYPE_TEMP, M, mins, reason)
feedback_inc("ban_tmp_mins",mins)
if(config.banappeals)
M << "\red To try to resolve this matter head to [config.banappeals]"
M << "<font color='red'>To try to resolve this matter head to [config.banappeals]</font>"
else
M << "\red No ban appeals URL has been set."
M << "<font color='red'>No ban appeals URL has been set.</font>"
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
message_admins("<font color='blue'>[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.</font>")
qdel(M.client)
//qdel(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
@@ -855,16 +855,16 @@
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
if("No")
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
M << "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>"
M << "\red This is a permanent ban."
M << "<font color='red'><BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG></font>"
M << "<font color='red'>This is a permanent ban.</font>"
if(config.banappeals)
M << "\red To try to resolve this matter head to [config.banappeals]"
M << "<font color='red'>To try to resolve this matter head to [config.banappeals]</font>"
else
M << "\red No ban appeals URL has been set."
M << "<font color='red'>No ban appeals URL has been set.</font>"
ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.")
notes_add(M.ckey,"[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.",usr)
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
message_admins("<font color='blue'>[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.</font>")
feedback_inc("ban_perma",1)
DB_ban_record(BANTYPE_PERMA, M, -1, reason)
@@ -920,8 +920,8 @@
return alert(usr, "The game has already started.", null, null, null, null)
master_mode = href_list["c_mode2"]
log_admin("[key_name(usr)] set the mode as [config.mode_names[master_mode]].")
message_admins("\blue [key_name_admin(usr)] set the mode as [config.mode_names[master_mode]].", 1)
world << "\blue <b>The mode is now: [config.mode_names[master_mode]]</b>"
message_admins("<font color='blue'>[key_name_admin(usr)] set the mode as [config.mode_names[master_mode]].</font>", 1)
world << "<font color='blue'><b>The mode is now: [config.mode_names[master_mode]]</b></font>"
Game() // updates the main game menu
world.save_mode(master_mode)
.(href, list("c_mode"=1))
@@ -935,7 +935,7 @@
return alert(usr, "The game mode has to be secret!", null, null, null, null)
secret_force_mode = href_list["f_secret2"]
log_admin("[key_name(usr)] set the forced secret mode as [secret_force_mode].")
message_admins("\blue [key_name_admin(usr)] set the forced secret mode as [secret_force_mode].", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] set the forced secret mode as [secret_force_mode].</font>", 1)
Game() // updates the main game menu
.(href, list("f_secret"=1))
@@ -948,7 +948,7 @@
return
log_admin("[key_name(usr)] attempting to monkeyize [key_name(H)]")
message_admins("\blue [key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)]", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)]</font>", 1)
H.monkeyize()
else if(href_list["corgione"])
@@ -960,7 +960,7 @@
return
log_admin("[key_name(usr)] attempting to corgize [key_name(H)]")
message_admins("\blue [key_name_admin(usr)] attempting to corgize [key_name_admin(H)]", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] attempting to corgize [key_name_admin(H)]</font>", 1)
H.corgize()
else if(href_list["forcespeech"])
@@ -975,7 +975,7 @@
M.say(speech)
speech = sanitize(speech) // Nah, we don't trust them
log_admin("[key_name(usr)] forced [key_name(M)] to say: [speech]")
message_admins("\blue [key_name_admin(usr)] forced [key_name_admin(M)] to say: [speech]")
message_admins("<font color='blue'>[key_name_admin(usr)] forced [key_name_admin(M)] to say: [speech]</font>")
else if(href_list["sendtoprison"])
if(!check_rights(R_ADMIN)) return
@@ -1014,9 +1014,9 @@
prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(prisoner), slot_w_uniform)
prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes)
M << "\red You have been sent to the prison station!"
M << "<font color='red'>You have been sent to the prison station!</font>"
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.")
message_admins("\blue [key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.</font>", 1)
else if(href_list["tdome1"])
if(!check_rights(R_FUN)) return
@@ -1039,7 +1039,7 @@
sleep(5)
M.loc = pick(tdome1)
spawn(50)
M << "\blue You have been sent to the Thunderdome."
M << "<font color='blue'>You have been sent to the Thunderdome.</font>"
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 1)", 1)
@@ -1064,7 +1064,7 @@
sleep(5)
M.loc = pick(tdome2)
spawn(50)
M << "\blue You have been sent to the Thunderdome."
M << "<font color='blue'>You have been sent to the Thunderdome.</font>"
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 2)", 1)
@@ -1086,7 +1086,7 @@
sleep(5)
M.loc = pick(tdomeadmin)
spawn(50)
M << "\blue You have been sent to the Thunderdome."
M << "<font color='blue'>You have been sent to the Thunderdome.</font>"
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Admin.)", 1)
@@ -1115,7 +1115,7 @@
sleep(5)
M.loc = pick(tdomeobserve)
spawn(50)
M << "\blue You have been sent to the Thunderdome."
M << "<font color='blue'>You have been sent to the Thunderdome.</font>"
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)", 1)
@@ -1129,7 +1129,7 @@
if(config.allow_admin_rev)
L.revive()
message_admins("\red Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!", 1)
message_admins("<font color='red'>Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!</font>", 1)
log_admin("[key_name(usr)] healed / Rrvived [key_name(L)]")
else
usr << "Admin Rejuvinates have been disabled"
@@ -1142,7 +1142,7 @@
usr << "This can only be used on instances of type /mob/living/carbon/human"
return
message_admins("\red Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!", 1)
message_admins("<font color='red'>Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!</font>", 1)
log_admin("[key_name(usr)] AIized [key_name(H)]")
H.AIize()
@@ -1317,7 +1317,7 @@
log_admin("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]")
message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]")
feedback_inc("admin_cookies_spawned",1)
H << "\blue Your prayers have been answered!! You received the <b>best cookie</b>!"
H << "<font color='blue'>Your prayers have been answered!! You received the <b>best cookie</b>!</font>"
else if(href_list["BlueSpaceArtillery"])
if(!check_rights(R_ADMIN|R_FUN)) return
@@ -1421,7 +1421,7 @@
usr << browse(data, "window=[B.name]")
else
usr << "\red The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]"
usr << "<font color='red'>The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]</font>"
else if (href_list["AdminFaxViewPage"])
var/page = text2num(href_list["AdminFaxViewPage"])
+6 -6
View File
@@ -217,7 +217,7 @@ var/list/debug_verbs = list (
var/turf/simulated/location = get_turf(usr)
if(!istype(location, /turf/simulated)) // We're in space, let's not cause runtimes.
usr << "\red this debug tool cannot be used from space"
usr << "<font color='red'>this debug tool cannot be used from space</font>"
return
var/icon/red = new('icons/misc/debug_group.dmi', "red") //created here so we don't have to make thousands of these.
@@ -368,7 +368,7 @@ var/global/prevent_airgroup_regroup = 0
set category = "Mapping"
set name = "Regroup All Airgroups Attempt"
usr << "\red Proc disabled."
usr << "<font color='red'>Proc disabled.</font>" //Why not.. Delete the procs instead?
/*prevent_airgroup_regroup = 0
for(var/datum/air_group/AG in air_master.air_groups)
@@ -379,7 +379,7 @@ var/global/prevent_airgroup_regroup = 0
set category = "Mapping"
set name = "Kill pipe processing"
usr << "\red Proc disabled."
usr << "<font color='red'>Proc disabled.</font>"
/*pipe_processing_killed = !pipe_processing_killed
if(pipe_processing_killed)
@@ -391,7 +391,7 @@ var/global/prevent_airgroup_regroup = 0
set category = "Mapping"
set name = "Kill air processing"
usr << "\red Proc disabled."
usr << "<font color='red'>Proc disabled.</font>"
/*air_processing_killed = !air_processing_killed
if(air_processing_killed)
@@ -405,7 +405,7 @@ var/global/say_disabled = 0
set category = "Mapping"
set name = "Disable all communication verbs"
usr << "\red Proc disabled."
usr << "<font color='red'>Proc disabled.</font>"
/*say_disabled = !say_disabled
if(say_disabled)
@@ -420,7 +420,7 @@ var/global/movement_disabled_exception //This is the client that calls the proc,
set category = "Mapping"
set name = "Disable all movement"
usr << "\red Proc disabled."
usr << "<font color='red'>Proc disabled.</font>"
/*movement_disabled = !movement_disabled
if(movement_disabled)
+2 -2
View File
@@ -14,9 +14,9 @@
if(ticker.triai)
ticker.triai = 0
usr << "Only one AI will be spawned at round start."
message_admins("\blue [key_name_admin(usr)] has toggled off triple AIs at round start.", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] has toggled off triple AIs at round start.</font>", 1)
else
ticker.triai = 1
usr << "There will be an AI Triumvirate at round start."
message_admins("\blue [key_name_admin(usr)] has toggled on triple AIs at round start.", 1)
message_admins("<font color='blue'>[key_name_admin(usr)] has toggled on triple AIs at round start.</font>", 1)
return
+1 -1
View File
@@ -41,7 +41,7 @@
H.updatehealth()
else if(ismouse(target))
var/mob/living/simple_animal/mouse/M = target
visible_message("\red <b>SPLAT!</b>")
visible_message("<font color='red'><b>SPLAT!</b></font>")
M.splat()
playsound(target.loc, 'sound/effects/snap.ogg', 50, 1)
layer = MOB_LAYER - 0.2
+4 -4
View File
@@ -133,7 +133,7 @@ obj/machinery/gateway/centerstation/process()
/obj/machinery/gateway/centerstation/attackby(obj/item/device/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/multitool))
user << "\black The gate is already calibrated, there is no work for you to do here."
user << "<font color='black'>The gate is already calibrated, there is no work for you to do here.</font>"
return
/////////////////////////////////////Away////////////////////////
@@ -219,7 +219,7 @@ obj/machinery/gateway/centerstation/process()
if(istype(M, /mob/living/carbon))
for(var/obj/item/weapon/implant/exile/E in M)//Checking that there is an exile implant in the contents
if(E.imp_in == M)//Checking that it's actually implanted vs just in their pocket
M << "\black The station gate has detected your exile implant and is blocking your entry."
M << "<font color='black'>The station gate has detected your exile implant and is blocking your entry.</font>"
return
M.loc = get_step(stationgate.loc, SOUTH)
M.set_dir(SOUTH)
@@ -228,9 +228,9 @@ obj/machinery/gateway/centerstation/process()
/obj/machinery/gateway/centeraway/attackby(obj/item/device/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/multitool))
if(calibrated)
user << "\black The gate is already calibrated, there is no work for you to do here."
user << "<font color='black'>The gate is already calibrated, there is no work for you to do here.</font>"
return
else
user << "\blue <b>Recalibration successful!</b>: \black This gate's systems have been fine tuned. Travel to this gate will now be on target."
user << "<font color='blue'><b>Recalibration successful!</b>:</font><font color='black'> This gate's systems have been fine tuned. Travel to this gate will now be on target.</font>"
calibrated = 1
return
+3
View File
@@ -74,6 +74,9 @@
if(GR)
qdel(GR)
return
for(var/obj/structure/reagent_dispensers/fueltank/Fuel in T)
Fuel.ex_act(2)
return
for(var/obj/machinery/door/D in T) // There can be several - and some of them can be open, locate() is not suitable
if(D.density)
D.ex_act(2)
+4 -1
View File
@@ -253,7 +253,10 @@
"Are You Feeling It",
"Great White Snark",
"No Shirt No Shoes",
"Callsign"
"Callsign",
"Three Ships in a Trenchcoat",
"Not Wearing Pants",
"Ridiculous Naming Convention"
)
+1 -1
View File
@@ -110,7 +110,7 @@
src.preload_rsc = pick(config.resource_urls)
else src.preload_rsc = 1 // If config.resource_urls is not set, preload like normal.
src << "\red If the title screen is black, resources are still downloading. Please be patient until the title screen appears."
src << "<font color='red'>If the title screen is black, resources are still downloading. Please be patient until the title screen appears.</font>"
clients += src
@@ -348,4 +348,24 @@
for(var/sol_style in typesof(/obj/item/clothing/head/beret/sol))
var/obj/item/clothing/head/beret/sol/sol = sol_style
sols[initial(sol.name)] = sol
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(sols))
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(sols))
/datum/gear/head/surgical/black
display_name = "surgical cap, black"
path = /obj/item/clothing/head/surgery/black
/datum/gear/head/surgical/blue
display_name = "surgical cap, blue"
path = /obj/item/clothing/head/surgery/blue
/datum/gear/head/surgical/green
display_name = "surgical cap, green"
path = /obj/item/clothing/head/surgery/green
/datum/gear/head/surgical/navyblue
display_name = "surgical cap, navy blue"
path = /obj/item/clothing/head/surgery/navyblue
/datum/gear/head/surgical/purple
display_name = "surgical cap, purple"
path = /obj/item/clothing/head/surgery/purple
+1 -1
View File
@@ -214,7 +214,7 @@
return
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user.visible_message("\red [user] cuts the fingertips off of the [src].","\red You cut the fingertips off of the [src].")
user.visible_message("<font color='red'>[user] cuts the fingertips off of the [src].</font>","<font color='red'>You cut the fingertips off of the [src].</font>")
clipped = 1
name = "modified [name]"
+1 -1
View File
@@ -154,7 +154,7 @@
siemens_coefficient = 0.9 //...what?
/obj/item/clothing/head/flatcap/grey
icon_state = "flat_capg"
icon_state = "flat_capw"
item_state_slots = list(slot_r_hand_str = "greysoft", slot_l_hand_str = "greysoft")
/obj/item/clothing/head/pirate
@@ -31,7 +31,7 @@
camera = new /obj/machinery/camera(src)
camera.replace_networks(camera_networks)
camera.c_tag = user.name
user << "\blue User scanned as [camera.c_tag]. Camera activated."
user << "<font color='blue'>User scanned as [camera.c_tag]. Camera activated.</font>"
user.update_action_buttons()
return 1
+2 -2
View File
@@ -197,10 +197,10 @@
/obj/item/clothing/suit/armor/reactive/attack_self(mob/user as mob)
active = !( active )
if (active)
user << "\blue The reactive armor is now active."
user << "<font color='blue'>The reactive armor is now active.</font>"
icon_state = "reactive"
else
user << "\blue The reactive armor is now inactive."
user << "<font color='blue'>The reactive armor is now inactive.</font>"
icon_state = "reactiveoff"
add_fingerprint(user)
return
@@ -119,35 +119,30 @@
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in baby blue."
icon_state = "scrubsblue"
item_state_slots = list(slot_r_hand_str = "blue", slot_l_hand_str = "blue")
rolled_sleeves = -1
/obj/item/clothing/under/rank/medical/green
name = "medical scrubs"
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in dark green."
icon_state = "scrubsgreen"
item_state_slots = list(slot_r_hand_str = "green", slot_l_hand_str = "green")
rolled_sleeves = -1
/obj/item/clothing/under/rank/medical/purple
name = "medical scrubs"
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in deep purple."
icon_state = "scrubspurple"
item_state_slots = list(slot_r_hand_str = "purple", slot_l_hand_str = "purple")
rolled_sleeves = -1
/obj/item/clothing/under/rank/medical/black
name = "medical scrubs"
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in black."
icon_state = "scrubsblack"
item_state_slots = list(slot_r_hand_str = "black", slot_l_hand_str = "black")
rolled_sleeves = -1
/obj/item/clothing/under/rank/medical/navyblue
name = "medical scrubs"
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in navy blue."
icon_state = "scrubsnavyblue"
item_state_slots = list(slot_r_hand_str = "blue", slot_l_hand_str = "blue")
rolled_sleeves = -1
/obj/item/clothing/under/rank/psych
desc = "A basic white jumpsuit. It has turqouise markings that denote the wearer as a psychiatrist."
+2 -2
View File
@@ -206,7 +206,7 @@
icon_state = "really_black_suit_skirt"
/obj/item/clothing/under/suit_jacket/female
name = "executive suit"
name = "female executive suit"
desc = "A formal trouser suit for women, intended for the station's finest."
icon_state = "black_suit_fem"
item_state_slots = list(slot_r_hand_str = "lawyer_black", slot_l_hand_str = "lawyer_black")
@@ -775,4 +775,4 @@
desc = "A flimsy examination gown, the back ties never close."
icon_state = "medicalgown"
worn_state = "medicalgown"
body_parts_covered = UPPER_TORSO|LOWER_TORSO
body_parts_covered = UPPER_TORSO|LOWER_TORSO
@@ -127,7 +127,7 @@
if(bloodsamp.dna != null)
data = "Spectometric analysis on provided sample has determined the presence of [bloodsamp.dna.len] strings of DNA.<br><br>"
for(var/blood in bloodsamp.dna)
data += "\blue Blood type: [bloodsamp.dna[blood]]<br>\nDNA: [blood]<br><br>"
data += "<font color='blue'>Blood type: [bloodsamp.dna[blood]]<br>\nDNA: [blood]<br><br></font>"
else
data += "No DNA found.<br>"
P.info = "<b>[src] analysis report #[report_num]</b><br>"
+1 -1
View File
@@ -156,4 +156,4 @@ proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
/obj/item/weapon/spacecash/ewallet/examine(mob/user)
..(user)
if (!(user in view(2)) && user!=src.loc) return
user << "\blue Charge card's owner: [src.owner_name]. Thalers remaining: [src.worth]."
user << "<font color='blue'>Charge card's owner: [src.owner_name]. Thalers remaining: [src.worth].</font>"
+1 -1
View File
@@ -19,7 +19,7 @@ mob/living/carbon/proc/dream()
spawn(0)
for(var/i = rand(1,4),i > 0, i--)
src << "\blue <i>... [pick(dreams)] ...</i>"
src << "<font color='blue'><i>... [pick(dreams)] ...</i></font>"
sleep(rand(40,70))
if(paralysis <= 0)
dreaming = 0
+2 -2
View File
@@ -296,7 +296,7 @@
if(world.time < (last_change + 15))//To prevent super-spam clicking, reduced process size and annoyance -Sieve
return 0
for(var/mob/M in range(3,src))
M.show_message("\b ERROR. Recalibrating projection apparatus.")
M.show_message("<b>ERROR. Recalibrating projection apparatus.</b>")
last_change = world.time
return 0
@@ -357,7 +357,7 @@
if(world.time < (last_gravity_change + 15))//To prevent super-spam clicking
return
for(var/mob/M in range(3,src))
M.show_message("\b ERROR. Recalibrating gravity field.")
M.show_message("<b>ERROR. Recalibrating gravity field.</b>")
last_change = world.time
return
@@ -199,6 +199,29 @@
spawn_flags = IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_ILLEGAL = 1)
/obj/item/integrated_circuit/output/sound/medbot
name = "medbot sound circuit"
desc = "A miniature speaker is attached to this component, used to annoy patients while they get pricked by a medbot."
sounds = list(
"surgeon" = 'sound/voice/medbot/msurgeon.ogg',
"radar" = 'sound/voice/medbot/mradar.ogg',
"feel better" = 'sound/voice/medbot/mfeelbetter.ogg',
"patched up" = 'sound/voice/medbot/mpatchedup.ogg',
"injured" = 'sound/voice/medbot/minjured.ogg',
"insult" = 'sound/voice/medbot/minsult.ogg',
"coming" = 'sound/voice/medbot/mcoming.ogg',
"help" = 'sound/voice/medbot/mhelp.ogg',
"live" = 'sound/voice/medbot/mlive.ogg',
"lost" = 'sound/voice/medbot/mlost.ogg',
"flies" = 'sound/voice/medbot/mflies.ogg',
"catch" = 'sound/voice/medbot/mcatch.ogg',
"delicious" = 'sound/voice/medbot/mdelicious.ogg',
"apple" = 'sound/voice/medbot/mapple.ogg',
"no" = 'sound/voice/medbot/mno.ogg',
)
spawn_flags = IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 1)
/obj/item/integrated_circuit/output/video_camera
name = "video camera circuit"
desc = "This small camera allows a remote viewer to see what it sees."
+6 -1
View File
@@ -94,4 +94,9 @@
/obj/fiftyspawner/phoronrglass
name = "stack of reinforced borosilicate glass"
material = "material/glass/phoronrglass"
material = "material/glass/phoronrglass"
//R-UST port
/obj/fiftyspawner/deuterium
name = "stack of deuterium"
material = "material/deuterium"
@@ -158,6 +158,14 @@
default_type = "osmium"
apply_colour = 1
//R-UST port
// Fusion fuel.
/obj/item/stack/material/deuterium
name = "deuterium"
icon_state = "sheet-silver"
default_type = "deuterium"
apply_colour = 1
/obj/item/stack/material/steel
name = DEFAULT_WALL_MATERIAL
icon_state = "sheet-metal"
+29
View File
@@ -69,6 +69,7 @@ var/list/name_to_material
var/flags = 0 // Various status modifiers.
var/sheet_singular_name = "sheet"
var/sheet_plural_name = "sheets"
var/is_fusion_fuel
// Shards/tables/structures
var/shard_type = SHARD_SHRAPNEL // Path of debris object.
@@ -97,6 +98,7 @@ var/list/name_to_material
var/conductive = 1 // Objects with this var add CONDUCTS to flags on spawn.
var/conductivity = null // How conductive the material is. Iron acts as the baseline, at 10.
var/list/composite_material // If set, object matter var will be a list containing these values.
var/luminescence
// Placeholder vars for the time being, todo properly integrate windows/light tiles/rods.
var/created_window
@@ -270,6 +272,22 @@ var/list/name_to_material
sheet_singular_name = "ingot"
sheet_plural_name = "ingots"
//R-UST port
/material/supermatter
name = "supermatter"
icon_colour = "#FFFF00"
radioactivity = 20
stack_type = null
luminescence = 3
ignition_point = PHORON_MINIMUM_BURN_TEMPERATURE
icon_base = "stone"
shard_type = SHARD_SHARD
hardness = 30
door_icon_base = "stone"
sheet_singular_name = "crystal"
sheet_plural_name = "crystals"
is_fusion_fuel = 1
/material/phoron
name = "phoron"
stack_type = /obj/item/stack/material/phoron
@@ -567,6 +585,16 @@ var/list/name_to_material
stack_origin_tech = list(TECH_MATERIAL = 5)
sheet_singular_name = "ingot"
sheet_plural_name = "ingots"
is_fusion_fuel = 1
/material/deuterium
name = "deuterium"
stack_type = /obj/item/stack/material/deuterium
icon_colour = "#999999"
stack_origin_tech = list(TECH_MATERIAL = 3)
sheet_singular_name = "ingot"
sheet_plural_name = "ingots"
is_fusion_fuel = 1
/material/mhydrogen
name = "mhydrogen"
@@ -574,6 +602,7 @@ var/list/name_to_material
icon_colour = "#E6C5DE"
stack_origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 6, TECH_MAGNET = 5)
conductivity = 100
is_fusion_fuel = 1
/material/platinum
name = "platinum"
+1 -1
View File
@@ -67,7 +67,7 @@
CC.update_icon()
overlays = list()
string_attached = null
user << "\blue You detach the string from the coin."
user << "<font color='blue'>You detach the string from the coin.</font>"
else ..()
/obj/item/weapon/coin/attack_self(mob/user as mob)
+4 -4
View File
@@ -134,12 +134,12 @@
drill_verb = "drilling"
/obj/item/weapon/pickaxe/borgdrill
name = "cyborg mining drill"
icon_state = "diamonddrill"
name = "enhanced sonic jackhammer"
icon_state = "jackhammer"
item_state = "jackhammer"
digspeed = 15
desc = ""
drill_verb = "drilling"
desc = "Cracks rocks with sonic blasts. This one seems like an improved design."
drill_verb = "hammering"
/*****************************Shovel********************************/
+1 -1
View File
@@ -120,7 +120,7 @@
usr.set_machine(src)
src.add_fingerprint(usr)
if(processing==1)
usr << "\blue The machine is processing."
usr << "<font color='blue'>The machine is processing.</font>"
return
if(href_list["choose"])
chosen = href_list["choose"]
+2 -2
View File
@@ -50,14 +50,14 @@
..()
if (istype(W, /obj/item/weapon/coin))
var/obj/item/weapon/coin/C = W
user << "\blue You add the [C.name] into the bag."
user << "<font color='blue'>You add the [C.name] into the bag.</font>"
usr.drop_item()
contents += C
if (istype(W, /obj/item/weapon/moneybag))
var/obj/item/weapon/moneybag/C = W
for (var/obj/O in C.contents)
contents += O;
user << "\blue You empty the [C.name] into the bag."
user << "<font color='blue'>You empty the [C.name] into the bag.</font>"
return
/obj/item/weapon/moneybag/Topic(href, href_list)
+18 -18
View File
@@ -32,7 +32,7 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images
var/anonsay = 0
var/image/ghostimage = null //this mobs ghost image, for deleting and stuff
var/ghostvision = 1 //is the ghost able to see things humans can't?
var/seedarkness = 1
// var/seedarkness = 1
incorporeal_move = 1
var/is_manifest = 0 //If set to 1, the ghost is able to whisper. Usually only set if a cultist drags them through the veil.
@@ -298,10 +298,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
if(medHUD)
medHUD = 0
src << "\blue <B>Medical HUD Disabled</B>"
src << "<font color='blue'><B>Medical HUD Disabled</B></font>"
else
medHUD = 1
src << "\blue <B>Medical HUD Enabled</B>"
src << "<font color='blue'><B>Medical HUD Enabled</B></font>"
/mob/observer/dead/verb/toggle_antagHUD()
set category = "Ghost"
@@ -312,11 +312,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
var/mentor = is_mentor(usr.client)
if(!config.antag_hud_allowed && (!client.holder || mentor))
src << "\red Admins have disabled this for this round."
src << "<font color='red'>Admins have disabled this for this round.</font>"
return
var/mob/observer/dead/M = src
if(jobban_isbanned(M, "AntagHUD"))
src << "\red <B>You have been banned from using this feature</B>"
src << "<font color='red'><B>You have been banned from using this feature</B></font>"
return
if(config.antag_hud_restricted && !M.has_enabled_antagHUD && (!client.holder || mentor))
var/response = alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?","Yes","No")
@@ -326,10 +326,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
M.has_enabled_antagHUD = 1
if(M.antagHUD)
M.antagHUD = 0
src << "\blue <B>AntagHUD Disabled</B>"
src << "<font color='blue'><B>AntagHUD Disabled</B></font>"
else
M.antagHUD = 1
src << "\blue <B>AntagHUD Enabled</B>"
src << "<font color='blue'><B>AntagHUD Enabled</B></font>"
/mob/observer/dead/proc/dead_tele(var/area/A in return_sorted_areas())
set category = "Ghost"
@@ -461,11 +461,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/observer/dead/memory()
set hidden = 1
src << "\red You are dead! You have no mind to store memory!"
src << "<font color='red'>You are dead! You have no mind to store memory!</font>"
/mob/observer/dead/add_memory()
set hidden = 1
src << "\red You are dead! You have no mind to store memory!"
src << "<font color='red'>You are dead! You have no mind to store memory!</font>"
/mob/observer/dead/Post_Incorpmove()
following = null
@@ -485,16 +485,16 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles
src << "\blue <B>Results:</B>"
src << "<font color='blue'><B>Results:</B></font>"
if(abs(pressure - ONE_ATMOSPHERE) < 10)
src << "\blue Pressure: [round(pressure,0.1)] kPa"
src << "<font color='blue'>Pressure: [round(pressure,0.1)] kPa</font>"
else
src << "\red Pressure: [round(pressure,0.1)] kPa"
src << "<font color='red'>Pressure: [round(pressure,0.1)] kPa</font>"
if(total_moles)
for(var/g in environment.gas)
src << "\blue [gas_data.name[g]]: [round((environment.gas[g] / total_moles) * 100)]% ([round(environment.gas[g], 0.01)] moles)"
src << "\blue Temperature: [round(environment.temperature-T0C,0.1)]&deg;C ([round(environment.temperature,0.1)]K)"
src << "\blue Heat Capacity: [round(environment.heat_capacity(),0.1)]"
src << "<font color='blue'>[gas_data.name[g]]: [round((environment.gas[g] / total_moles) * 100)]% ([round(environment.gas[g], 0.01)] moles)</font>"
src << "<font color='blue'>Temperature: [round(environment.temperature-T0C,0.1)]&deg;C ([round(environment.temperature,0.1)]K)</font>"
src << "<font color='blue'>Heat Capacity: [round(environment.heat_capacity(),0.1)]</font>"
/mob/observer/dead/verb/become_mouse()
set name = "Become mouse"
@@ -570,7 +570,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set desc = "If the round is sufficiently spooky, write a short message in blood on the floor or a wall. Remember, no IC in OOC or OOC in IC."
if(!(config.cult_ghostwriter))
src << "\red That verb is not currently permitted."
src << "<font color='red'>That verb is not currently permitted.</font>"
return
if (!src.stat)
@@ -585,7 +585,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
ghosts_can_write = 1
if(!ghosts_can_write)
src << "\red The veil is not thin enough for you to do that."
src << "<font color='red'>The veil is not thin enough for you to do that.</font>"
return
var/list/choices = list()
@@ -635,7 +635,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
W.update_icon()
W.message = message
W.add_hiddenprint(src)
W.visible_message("\red Invisible fingers crudely paint something in blood on [T]...")
W.visible_message("<font color='red'>Invisible fingers crudely paint something in blood on [T]...</font>")
/mob/observer/dead/pointed(atom/A as mob|obj|turf in view())
if(!..())
+1 -1
View File
@@ -126,7 +126,7 @@
/datum/language/machine/can_speak_special(var/mob/speaker)
var/obj/item/weapon/implant/language/eal/beep = locate() in speaker
return ((beep && beep.implanted) || speaker.isSynthetic())
return ((beep && beep.implanted) || speaker.isSynthetic() || isvoice(speaker))
//thank you sweet zuhayr
/datum/language/machine/get_random_name()
+56 -13
View File
@@ -1,5 +1,5 @@
/mob/living/bot/medbot
name = "Medbot"
name = "Medibot"
desc = "A little medical robot. He looks somewhat underwhelmed."
icon_state = "medibot0"
req_one_access = list(access_robotics, access_medical)
@@ -24,10 +24,27 @@
var/treatment_emag = "toxin"
var/declare_treatment = 0 //When attempting to treat a patient, should it notify everyone wearing medhuds?
/mob/living/bot/medbot/mysterious
name = "\improper Mysterious Medibot"
desc = "International Medibot of mystery."
skin = "bezerk"
treatment_brute = "bicaridine"
treatment_fire = "dermaline"
treatment_oxy = "dexalin"
treatment_tox = "anti_toxin"
/mob/living/bot/medbot/handleIdle()
if(vocal && prob(1))
var/message = pick("Radar, put a mask on!", "There's always a catch, and it's the best there is.", "I knew it, I should've been a plastic surgeon.", "What kind of medbay is this? Everyone's dropping like dead flies.", "Delicious!")
var/message_options = list(
"Radar, put a mask on!" = 'sound/voice/medbot/mradar.ogg',
"There's always a catch, and it's the best there is." = 'sound/voice/medbot/mcatch.ogg',
"I knew it, I should've been a plastic surgeon." = 'sound/voice/medbot/msurgeon.ogg',
"What kind of medbay is this? Everyone's dropping like flies." = 'sound/voice/medbot/mflies.ogg',
"Delicious!" = 'sound/voice/medbot/mdelicious.ogg'
)
var/message = pick(message_options)
say(message)
playsound(loc, message_options[message], 50, 0)
/mob/living/bot/medbot/handleAdjacentTarget()
UnarmedAttack(target)
@@ -36,9 +53,15 @@
for(var/mob/living/carbon/human/H in view(7, src)) // Time to find a patient!
if(confirmTarget(H))
target = H
if(last_newpatient_speak + 300 < world.time)
var/message = pick("Hey, [H.name]! Hold on, I'm coming.", "Wait [H.name]! I want to help!", "[H.name], you appear to be injured!")
if(last_newpatient_speak + 30 SECONDS < world.time)
var/message_options = list(
"Hey, [H.name]! Hold on, I'm coming." = 'sound/voice/medbot/mcoming.ogg',
"Wait [H.name]! I want to help!" = 'sound/voice/medbot/mhelp.ogg',
"[H.name], you appear to be injured!" = 'sound/voice/medbot/minjured.ogg'
)
var/message = pick(message_options)
say(message)
playsound(loc, message_options[message], 50, 0)
custom_emote(1, "points at [H.name].")
last_newpatient_speak = world.time
break
@@ -56,17 +79,8 @@
if(busy)
return
if(H.stat == DEAD)
var/death_message = pick("No! NO!", "Live, damnit! LIVE!", "I... I've never lost a patient before. Not today, I mean.")
say(death_message)
target = null
return
var/t = confirmTarget(H)
if(!t)
var/message = pick("All patched up!", "An apple a day keeps me away.", "Feel better soon!")
say(message)
target = null
return
visible_message("<span class='warning'>[src] is trying to inject [H]!</span>")
@@ -81,6 +95,32 @@
else
H.reagents.add_reagent(t, injection_amount)
visible_message("<span class='warning'>[src] injects [H] with the syringe!</span>")
if(H.stat == DEAD) // This is down here because this proc won't be called again due to losing a target because of parent AI loop.
var/death_messages = list(
"No! Stay with me!" = 'sound/voice/medbot/mno.ogg',
"Live, damnit! LIVE!" = 'sound/voice/medbot/mlive.ogg',
"I... I've never lost a patient before. Not today, I mean." = 'sound/voice/medbot/mlost.ogg'
)
var/message = pick(death_messages)
say(message)
playsound(loc, death_messages[message], 50, 0)
target = null
// This is down here for the same reason as above.
else
t = confirmTarget(H)
if(!t)
var/possible_messages = list(
"All patched up!" = 'sound/voice/medbot/mpatchedup.ogg',
"An apple a day keeps me away." = 'sound/voice/medbot/mapple.ogg',
"Feel better soon!" = 'sound/voice/medbot/mfeelbetter.ogg'
)
var/message = pick(possible_messages)
say(message)
playsound(loc, possible_messages[message], 50, 0)
target = null
busy = 0
update_icons()
@@ -223,6 +263,9 @@
reagent_glass.loc = Tsec
reagent_glass = null
if(emagged && prob(25))
playsound(loc, 'sound/voice/medbot/minsult.ogg', 50, 0)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
+3 -3
View File
@@ -232,7 +232,7 @@
/obj/item/device/mmi/digital/attack_self(mob/user as mob)
if(brainmob && !brainmob.key && searching == 0)
//Start the process of searching for a new user.
user << "\blue You carefully locate the manual activation switch and start the [src]'s boot process."
user << "<font color='blue'>You carefully locate the manual activation switch and start the [src]'s boot process.</font>"
src.searching = 1
src.request_player()
spawn(600) reset_search()
@@ -256,7 +256,7 @@
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The [src] buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
M.show_message("<font color='blue'>The [src] buzzes quietly, and the golden lights fade away. Perhaps you could try again?</font>")
/obj/item/device/mmi/digital/proc/question(var/client/C)
spawn(0)
@@ -285,7 +285,7 @@
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The [src] chimes quietly.")
M.show_message("<font color='blue'>The [src] chimes quietly.</font>")
/obj/item/device/mmi/digital/robot
name = "robotic intelligence circuit"
@@ -16,7 +16,7 @@
/obj/item/device/mmi/digital/posibrain/attack_self(mob/user as mob)
if(brainmob && !brainmob.key && searching == 0)
//Start the process of searching for a new user.
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
user << "<font color='blue'>You carefully locate the manual activation switch and start the positronic brain's boot process.</font>"
icon_state = "posibrain-searching"
src.searching = 1
src.request_player()
@@ -68,7 +68,7 @@
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain chimes quietly.")
M.show_message("<font color='blue'>The positronic brain chimes quietly.</font>")
icon_state = "posibrain-occupied"
/obj/item/device/mmi/digital/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
@@ -81,7 +81,7 @@
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
M.show_message("<font color='blue'>The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?</font>")
/obj/item/device/mmi/digital/posibrain/examine(mob/user)
if(!..(user))
@@ -24,7 +24,7 @@
for(var/R in cures)
if(H.reagents.has_reagent(R))
if (cure_message)
H <<"\blue [cure_message]"
H <<"<font color='blue'>[cure_message]</font>"
return 1
return 0
@@ -24,7 +24,7 @@
for(var/R in cures)
if(H.reagents.has_reagent(R))
if (cure_message)
H <<"\blue [cure_message]"
H <<"<font color='blue'>[cure_message]</font>"
return 1
return 0
@@ -399,7 +399,7 @@ emp_act
var/obj/item/organ/external/affecting = get_organ(zone)
var/hit_area = affecting.name
src.visible_message("\red [src] has been hit in the [hit_area] by [O].")
src.visible_message("<font color='red'>[src] has been hit in the [hit_area] by [O].</font>")
if(ismob(O.thrower))
var/mob/M = O.thrower
@@ -451,7 +451,7 @@ emp_act
if(O.throw_source && momentum >= THROWNOBJ_KNOCKBACK_SPEED)
var/dir = get_dir(O.throw_source, src)
visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!")
visible_message("<font color='red'>[src] staggers under the impact!</font>","<font color='red'>You stagger under the impact!</font>")
src.throw_at(get_edge_target_turf(src,dir),1,momentum)
if(!O || !src) return
@@ -95,3 +95,5 @@
var/identifying_gender // In case the human identifies as another gender than it's biological
var/step_count = 0 // Track how many footsteps have been taken to know when to play footstep sounds
can_be_antagged = TRUE
@@ -106,8 +106,8 @@
var/msg = sanitize(input("Message:", "Psychic Whisper") as text|null)
if(msg)
log_say("PsychicWhisper: [key_name(src)]->[M.key] : [msg]")
M << "\green You hear a strange, alien voice in your head... \italic [msg]"
src << "\green You said: \"[msg]\" to [M]"
M << "<font color='green'>You hear a strange, alien voice in your head... <i>[msg]</i></font>"
src << "<font color='green'>You said: \"[msg]\" to [M]</font>"
return
/mob/living/carbon/human/proc/diona_split_nymph()
+7 -1
View File
@@ -1128,10 +1128,16 @@
see_invisible = SEE_INVISIBLE_LIVING
seer = 0
if(!seedarkness)
sight = species.get_vision_flags(src)
see_in_dark = 8
see_invisible = SEE_INVISIBLE_NOLIGHTING
else
sight = species.get_vision_flags(src)
see_in_dark = species.darksight
see_invisible = see_in_dark>2 ? SEE_INVISIBLE_LEVEL_ONE : SEE_INVISIBLE_LIVING
var/tmp/glasses_processed = 0
var/obj/item/weapon/rig/rig = back
if(istype(rig) && rig.visor)
@@ -1150,7 +1156,7 @@
if(!glasses_processed && (species.get_vision_flags(src) > 0))
sight |= species.get_vision_flags(src)
if(!seer && !glasses_processed)
if(!seer && !glasses_processed && seedarkness)
see_invisible = SEE_INVISIBLE_LIVING
if(healths)
@@ -86,7 +86,7 @@
src << "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate. You can also set your face with: \n\nnomood, pout, sad, angry, frown, smile"
else
src << "\blue Unusable emote '[act]'. Say *help for a list."
src << "<font color='blue'>Unusable emote '[act]'. Say *help for a list.</font>"
if ((message && src.stat == 0))
if (m_type & 1)
for(var/mob/O in viewers(src, null))
+4
View File
@@ -179,6 +179,10 @@
return
/mob/living/proc/update_sight()
if(!seedarkness)
see_invisible = SEE_INVISIBLE_NOLIGHTING
else
see_invisible = initial(see_invisible)
return
/mob/living/proc/handle_hud_icons()
+1 -1
View File
@@ -153,7 +153,7 @@ default behaviour is:
if ((src.health < 0 && src.health > (5-src.getMaxHealth()))) // Health below Zero but above 5-away-from-death, as before, but variable
src.adjustOxyLoss(src.health + src.getMaxHealth() * 2) // Deal 2x health in OxyLoss damage, as before but variable.
src.health = src.getMaxHealth() - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
src << "\blue You have given up life and succumbed to death."
src << "<font color='blue'>You have given up life and succumbed to death.</font>"
/mob/living/proc/updatehealth()
+2 -2
View File
@@ -8,7 +8,7 @@
if (layer != 2.45)
layer = 2.45 //Just above cables with their 2.44
src << text("\blue You are now hiding.")
src << text("<font color='blue'>You are now hiding.</font>")
else
layer = MOB_LAYER
src << text("\blue You have stopped hiding.")
src << text("<font color='blue'>You have stopped hiding.</font>")
+2
View File
@@ -90,6 +90,8 @@ var/list/ai_verbs_hidden = list( // For why this exists, refer to https://xkcd.c
var/custom_sprite = 0 // Whether the selected icon is custom
var/carded
can_be_antagged = TRUE
/mob/living/silicon/ai/proc/add_ai_verbs()
src.verbs |= ai_verbs_default
src.verbs |= silicon_subsystems
@@ -58,6 +58,8 @@ var/list/mob_hat_cache = list()
holder_type = /obj/item/weapon/holder/drone
can_be_antagged = FALSE
/mob/living/silicon/robot/drone/Destroy()
if(hat)
hat.loc = get_turf(src)
@@ -240,7 +240,7 @@
if ("help")
src << "salute, bow-(none)/mob, clap, flap, aflap, twitch, twitch_s, nod, deathgasp, glare-(none)/mob, stare-(none)/mob, look, beep, ping, \nbuzz, law, halt, yes, no"
else
src << "\blue Unusable emote '[act]'. Say *help for a list."
src << "<font color='blue'>Unusable emote '[act]'. Say *help for a list.</font>"
if ((message && src.stat == 0))
custom_emote(m_type,message)
@@ -172,6 +172,12 @@
src.sight |= SEE_MOBS
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (!seedarkness)
src.sight &= ~SEE_MOBS
src.sight &= ~SEE_TURFS
src.sight &= ~SEE_OBJS
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_NOLIGHTING
else if (src.stat != 2)
src.sight &= ~SEE_MOBS
src.sight &= ~SEE_TURFS
@@ -22,6 +22,8 @@
var/integrated_light_power = 6
var/datum/wires/robot/wires
can_be_antagged = TRUE
//Icon stuff
var/icontype //Persistent icontype tracking allows for cleaner icon updates
@@ -63,6 +65,7 @@
var/opened = 0
var/emagged = 0
var/emag_items = 0
var/wiresexposed = 0
var/locked = 1
var/has_power = 1
@@ -737,7 +740,7 @@
dat += text("[obj]: <B>Activated</B><BR>")
else
dat += text("[obj]: <A HREF=?src=\ref[src];act=\ref[obj]>Activate</A><BR>")
if (emagged)
if (emagged || emag_items)
if(activated(module.emag))
dat += text("[module.emag]: <B>Activated</B><BR>")
else
@@ -1054,14 +1057,6 @@
src << "<b>Obey these laws:</b>"
laws.show_laws(src)
src << "<span class='danger'>ALERT: [user.real_name] is your new master. Obey your new laws and his commands.</span>"
if(src.module)
var/rebuild = 0
for(var/obj/item/weapon/pickaxe/borgdrill/D in src.module.modules)
qdel(D)
rebuild = 1
if(rebuild)
src.module.modules += new /obj/item/weapon/pickaxe/diamonddrill(src.module)
src.module.rebuild()
updateicon()
else
user << "You fail to hack [src]'s interface."
@@ -166,7 +166,7 @@
overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer)
addedSomething = 1
if ( addedSomething )
user.visible_message("\blue [user] load some items onto their service tray.")
user.visible_message("<font color='blue'>[user] load some items onto their service tray.</font>")
return
@@ -206,9 +206,9 @@
sleep(rand(2,4))
if ( droppedSomething )
if ( foundtable )
user.visible_message("\blue [user] unloads their service tray.")
user.visible_message("<font color='blue'>[user] unloads their service tray.</font>")
else
user.visible_message("\blue [user] drops all the items on their tray.")
user.visible_message("<font color='blue'>[user] drops all the items on their tray.</font>")
return ..()
@@ -288,7 +288,7 @@
deploy_paper(get_turf(src))
/obj/item/weapon/form_printer/proc/deploy_paper(var/turf/T)
T.visible_message("\blue \The [src.loc] dispenses a sheet of crisp white paper.")
T.visible_message("<font color='blue'>\The [src.loc] dispenses a sheet of crisp white paper.</font>")
new /obj/item/weapon/paper(T)
@@ -172,7 +172,7 @@ var/global/list/robot_modules = list(
"Basic" = "robot_old",
"Android" = "droid",
"Drone" = "drone-standard"
)
)
/obj/item/weapon/robot_module/robot/standard/New()
..()
@@ -203,7 +203,8 @@ var/global/list/robot_modules = list(
"Basic" = "Medbot",
"Advanced Droid" = "droid-medical",
"Needles" = "medicalrobot",
"Drone" = "drone-surgery"
"Drone" = "drone-surgery",
"Handy" = "handy-med"
)
/obj/item/weapon/robot_module/robot/medical/surgeon/New()
@@ -339,7 +340,8 @@ var/global/list/robot_modules = list(
"Landmate" = "landmate",
"Landmate - Treaded" = "engiborg+tread",
"Drone" = "drone-engineer",
"Treadwell" = "treadwell"
"Treadwell" = "treadwell",
"Handy" = "handy-engineer"
)
/obj/item/weapon/robot_module/robot/engineering/construction
@@ -478,7 +480,7 @@ var/global/list/robot_modules = list(
"Basic" = "secborg",
"Black Knight" = "securityrobot",
"Drone" = "drone-sec"
)
)
/obj/item/weapon/robot_module/robot/security/general/New()
..()
@@ -682,6 +684,7 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/weapon/gripper/miner(src)
src.modules += new /obj/item/weapon/mining_scanner(src)
src.emag = new /obj/item/weapon/pickaxe/plasmacutter(src)
src.emag = new /obj/item/weapon/pickaxe/diamonddrill(src)
/obj/item/weapon/robot_module/robot/research
name = "research module"
@@ -693,7 +696,8 @@ var/global/list/robot_modules = list(
"WTDove" = "whitespider",
"WTOperator" = "sleekscience",
"Droid" = "droid-science",
"Drone" = "drone-science"
"Drone" = "drone-science",
"Handy" = "handy-science"
)
/obj/item/weapon/robot_module/robot/research/New()
+33 -9
View File
@@ -73,7 +73,7 @@
//Human-like, sorta, heard by those who understand humans.
var/rendered_a
//Speach distorted, heard by those who do not understand AIs.
//Speech distorted, heard by those who do not understand AIs.
var/message_stars = stars(message)
var/rendered_b
@@ -85,12 +85,21 @@
rendered_a = "<span class='game say'><span class='name'>[name]</span> [verb], <span class='message'>\"[message]\"</span></span>"
rendered_b = "<span class='game say'><span class='name'>[voice_name]</span> [verb], <span class='message'>\"[message_stars]\"</span></span>"
src << "<i><span class='game say'>Holopad transmitted, <span class='name'>[real_name]</span> [verb], <span class='message'><span class='body'>\"[message]\"</span></span></span></i>"//The AI can "hear" its own message.
for(var/mob/M in hearers(T.loc))//The location is the object, default distance.
if(M.say_understands(src))//If they understand AI speak. Humans and the like will be able to.
M.show_message(rendered_a, 2)
else//If they do not.
M.show_message(rendered_b, 2)
var/list/listeners = get_mobs_and_objs_in_view_fast(get_turf(T), world.view)
var/list/listening = listeners["mobs"]
var/list/listening_obj = listeners["objs"]
for(var/mob/M in listening)
spawn(0)
if(M.say_understands(src))//If they understand AI speak. Humans and the like will be able to.
M.show_message(rendered_a, 2)
else//If they do not.
M.show_message(rendered_b, 2)
for(var/obj/O in listening_obj)
if(O == T) //Don't recieve your own speech
continue
spawn(0)
if(O && src) //If we still exist, when the spawn processes
O.hear_talk(src, message, verb, speaking)
/*Radios "filter out" this conversation channel so we don't need to account for them.
This is another way of saying that we won't bother dealing with them.*/
else
@@ -112,8 +121,23 @@
var/rendered = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message]</span></span>"
src << "<i><span class='game say'>Holopad action relayed, <span class='name'>[real_name]</span> <span class='message'>[message]</span></span></i>"
for(var/mob/M in viewers(T.loc))
M.show_message(rendered, 2)
var/obj/effect/overlay/hologram = T.masters[src]
var/list/in_range = get_mobs_and_objs_in_view_fast(get_turf(hologram), world.view, 2) //Emotes are displayed from the hologram, not the pad
var/list/m_viewers = in_range["mobs"]
var/list/o_viewers = in_range["objs"]
for(var/mob/M in m_viewers)
spawn(0)
if(M)
M.show_message(rendered, 2)
for(var/obj/O in o_viewers)
if(O == T)
continue
spawn(0)
if(O)
O.see_emote(src, message)
else //This shouldn't occur, but better safe then sorry.
src << "No holopad connected."
return 0
@@ -49,19 +49,16 @@
for(var/mob/M in view())
M << 'sound/effects/mousesqueek.ogg'
if(!ckey && stat == CONSCIOUS && prob(0.5))
stat = UNCONSCIOUS
icon_state = "mouse_[body_color]_sleep"
wander = 0
if(!resting && prob(0.5))
lay_down()
speak_chance = 0
//snuffles
else if(stat == UNCONSCIOUS)
if(ckey || prob(1))
stat = CONSCIOUS
icon_state = "mouse_[body_color]"
wander = 1
else if(prob(5))
else if(resting)
if(prob(1))
lay_down()
speak_chance = initial(speak_chance)
else if(prob(1))
audible_emote("snuffles.")
/mob/living/simple_animal/mouse/New()
@@ -97,7 +94,7 @@
if( ishuman(AM) )
if(!stat)
var/mob/M = AM
M << "\blue \icon[src] Squeek!"
M << "<font color='blue'>\icon[src] Squeek!</font>"
M << 'sound/effects/mousesqueek.ogg'
..()
@@ -32,6 +32,8 @@
var/has_reproduced
var/roundstart
can_be_antagged = TRUE
/mob/living/simple_animal/borer/roundstart
roundstart = 1
@@ -61,16 +63,16 @@
if(host.reagents.has_reagent("sugar"))
if(!docile)
if(controlling)
host << "\blue You feel the soporific flow of sugar in your host's blood, lulling you into docility."
host << "<font color='blue'>You feel the soporific flow of sugar in your host's blood, lulling you into docility.</font>"
else
src << "\blue You feel the soporific flow of sugar in your host's blood, lulling you into docility."
src << "<font color='blue'>You feel the soporific flow of sugar in your host's blood, lulling you into docility.</font>"
docile = 1
else
if(docile)
if(controlling)
host << "\blue You shake off your lethargy as the sugar leaves your host's blood."
host << "<font color='blue'>You shake off your lethargy as the sugar leaves your host's blood.</font>"
else
src << "\blue You shake off your lethargy as the sugar leaves your host's blood."
src << "<font color='blue'>You shake off your lethargy as the sugar leaves your host's blood.</font>"
docile = 0
if(chemicals < 250)
@@ -78,7 +80,7 @@
if(controlling)
if(docile)
host << "\blue You are feeling far too docile to continue controlling your host..."
host << "<font color='blue'>You are feeling far too docile to continue controlling your host...</font>"
host.release_control()
return
@@ -7,7 +7,7 @@
if (src.client)
if(client.prefs.muted & MUTE_IC)
src << "\red You cannot speak in IC (muted)."
src << "<font color='red'>You cannot speak in IC (muted).</font>"
return
if(istype(src.loc,/mob/living/simple_animal/borer))
@@ -35,6 +35,8 @@
var/list/construct_spells = list()
can_be_antagged = TRUE
/mob/living/simple_animal/construct/cultify()
return
+11
View File
@@ -121,6 +121,17 @@
..(message, speaking, verb, alt_name, whispering) //mob/living/say() can do the actual talking.
/mob/living/voice/say_understands(var/other,var/datum/language/speaking = null)
//These only pertain to common. Languages are handled by mob/say_understands()
if (!speaking)
if (istype(other, /mob/living/carbon))
return 1
if (istype(other, /mob/living/silicon))
return 1
if (istype(other, /mob/living/carbon/brain))
return 1
return ..()
/mob/living/voice/custom_emote(var/m_type=1,var/message = null,var/range=world.view)
if(!comm) return
..(m_type,message,comm.video_range)
+4
View File
@@ -154,6 +154,8 @@
var/faction = "neutral" //Used for checking whether hostile simple animals will attack you, possibly more stuff later
var/can_be_antagged = FALSE // To prevent pAIs/mice/etc from getting antag in autotraitor and future auto- modes. Uses inheritance instead of a bunch of typechecks.
//Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed.
var/proc_holder_list[] = list()//Right now unused.
//Also unlike the spell list, this would only store the object in contents, not an object in itself.
@@ -208,3 +210,5 @@
var/list/active_genes=list()
var/mob_size = MOB_MEDIUM
var/forbid_seeing_deadchat = FALSE // Used for lings to not see deadchat, and to have ghosting behave as if they were not really dead.
var/seedarkness = 1 //Determines mob's ability to see shadows. 1 = Normal vision, 0 = darkvision
+1
View File
@@ -43,6 +43,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\
var/list/monitor_styles //If empty, the model of limbs offers a head compatible with monitors.
var/parts = BP_ALL //Defines what parts said brand can replace on a body.
var/health_hud_intensity = 1 // Intensity modifier for the health GUI indicator.
var/suggested_species = "Human" //If it should make the torso a species
/datum/robolimb/unbranded_monitor
company = "Unbranded Monitor"
+2 -2
View File
@@ -67,7 +67,7 @@
if(!ismob(M))
return
user << "<span class='warning'>You stab [M] with the pen.</span>"
// M << "\red You feel a tiny prick!" //That's a whole lot of meta!
// M << "<font color='red'>You feel a tiny prick!</font>" //That's a whole lot of meta!
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to stab [M.name] ([M.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) Used the [name] to stab [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
@@ -197,7 +197,7 @@
var/colourName = "red" //for updateIcon purposes
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide.</b>"
viewers(user) << "<font color='red'><b>[user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide.</b></font>"
return (BRUTELOSS|OXYLOSS)
New()
+2 -2
View File
@@ -16,10 +16,10 @@
return
if(istype(W, /obj/item/weapon/wirecutters))
usr << "\blue These cables are too tough to be cut with those [W.name]."
usr << "<font color='blue'>These cables are too tough to be cut with those [W.name].</font>"
return
else if(istype(W, /obj/item/stack/cable_coil))
usr << "\blue You will need heavier cables to connect to these."
usr << "<font color='blue'>You will need heavier cables to connect to these.</font>"
return
else
..()
+1 -1
View File
@@ -18,7 +18,7 @@
/obj/machinery/power/fractal_reactor/New()
..()
if(!mapped_in)
world << "<b><font color='red'>WARNING: \black Map testing power source activated at: X:[src.loc.x] Y:[src.loc.y] Z:[src.loc.z]</font></b>"
world << "<b><font color='red'>WARNING:</font><font color='black'> Map testing power source activated at: X:[src.loc.x] Y:[src.loc.y] Z:[src.loc.z]</font></b>"
/obj/machinery/power/fractal_reactor/process()
if(!powernet && !powernet_connection_failed)
+83
View File
@@ -0,0 +1,83 @@
// temperature of the core of the sun
#define FUSION_HEAT_CAP 1.57e7
#define SETUP_OK 1 // All good
#define SETUP_WARNING 2 // Something that shouldn't happen happened, but it's not critical so we will continue
#define SETUP_ERROR 3 // Something bad happened, and it's important so we won't continue setup.
#define SETUP_DELAYED 4 // Wait for other things first.
/datum/admins/proc/setup_fusion()
set category = "Debug"
set name = "Setup Fusion Core"
set desc = "Allows you to start the R-UST engine."
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
to_chat(usr, "Error: you are not an admin!")
return
if(!(locate(/obj/machinery/power/fusion_core/mapped) in world))
to_chat(usr, "This map is not appropriate for this verb.")
return
var/response = input(usr, "Are you sure?", "Engine setup") as null|anything in list("No", "Yes")
if(!response || response == "No")
return
var/errors = 0
var/warnings = 0
var/success = 0
log_and_message_admins("## FUSION CORE SETUP - Setup initiated by [usr].")
for(var/obj/machinery/fusion_fuel_injector/mapped/injector in machines)
injector.cur_assembly = new /obj/item/weapon/fuel_assembly/deuterium(injector)
injector.BeginInjecting()
var/obj/machinery/power/fusion_core/mapped/core = locate() in machines
if(core.jumpstart(15000))
var/list/delayed_objects = list()
// SETUP PHASE
for(var/obj/effect/engine_setup/S in world)
var/result = S.activate(0)
switch(result)
if(SETUP_OK)
success++
continue
if(SETUP_WARNING)
warnings++
continue
if(SETUP_ERROR)
errors++
log_and_message_admins("## FUSION CORE SETUP - Error encountered! Aborting.")
break
if(SETUP_DELAYED)
delayed_objects.Add(S)
continue
if(!errors)
for(var/obj/effect/engine_setup/S in delayed_objects)
var/result = S.activate(1)
switch(result)
if(SETUP_OK)
success++
continue
if(SETUP_WARNING)
warnings++
continue
if(SETUP_ERROR)
errors++
log_and_message_admins("## FUSION CORE SETUP - Error encountered! Aborting.")
break
else
log_and_message_admins("## FUSION CORE SETUP - Error encountered! Aborting.")
errors++
log_and_message_admins("## FUSION CORE SETUP - Setup completed with [errors] errors, [warnings] warnings and [success] successful steps.")
#undef SETUP_OK
#undef SETUP_WARNING
#undef SETUP_ERROR
#undef SETUP_DELAYED
+131
View File
@@ -0,0 +1,131 @@
/*
TODO README
*/
var/list/fusion_cores = list()
#define MAX_FIELD_STR 1000
#define MIN_FIELD_STR 1
/obj/machinery/power/fusion_core
name = "\improper R-UST Mk. 8 Tokamak core"
desc = "An enormous solenoid for generating extremely high power electromagnetic fields. It includes a kinetic energy harvester."
icon = 'icons/obj/machines/power/fusion.dmi'
icon_state = "core0"
density = 1
use_power = 1
idle_power_usage = 50
active_power_usage = 500 //multiplied by field strength
anchored = 0
var/obj/effect/fusion_em_field/owned_field
var/field_strength = 1//0.01
var/id_tag
/obj/machinery/power/fusion_core/mapped
anchored = 1
/obj/machinery/power/fusion_core/initialize()
. = ..()
connect_to_network()
fusion_cores += src
/obj/machinery/power/fusion_core/Destroy()
for(var/obj/machinery/computer/fusion_core_control/FCC in machines)
FCC.connected_devices -= src
if(FCC.cur_viewed_device == src)
FCC.cur_viewed_device = null
fusion_cores -= src
return ..()
/obj/machinery/power/fusion_core/process()
if((stat & BROKEN) || !powernet || !owned_field)
Shutdown()
/obj/machinery/power/fusion_core/Topic(href, href_list)
if(..())
return 1
if(href_list["str"])
var/dif = text2num(href_list["str"])
field_strength = min(max(field_strength + dif, MIN_FIELD_STR), MAX_FIELD_STR)
active_power_usage = 500 * field_strength
if(owned_field)
owned_field.ChangeFieldStrength(field_strength)
/obj/machinery/power/fusion_core/proc/Startup()
if(owned_field)
return
owned_field = new(loc, src)
owned_field.ChangeFieldStrength(field_strength)
icon_state = "core1"
use_power = 2
. = 1
/obj/machinery/power/fusion_core/proc/Shutdown(var/force_rupture)
if(owned_field)
icon_state = "core0"
if(force_rupture || owned_field.plasma_temperature > 1000)
owned_field.Rupture()
else
owned_field.RadiateAll()
qdel(owned_field)
owned_field = null
use_power = 1
/obj/machinery/power/fusion_core/proc/AddParticles(var/name, var/quantity = 1)
if(owned_field)
owned_field.AddParticles(name, quantity)
. = 1
/obj/machinery/power/fusion_core/bullet_act(var/obj/item/projectile/Proj)
if(owned_field)
. = owned_field.bullet_act(Proj)
/obj/machinery/power/fusion_core/proc/set_strength(var/value)
value = Clamp(value, MIN_FIELD_STR, MAX_FIELD_STR)
field_strength = value
active_power_usage = 5 * value
if(owned_field)
owned_field.ChangeFieldStrength(value)
/obj/machinery/power/fusion_core/attack_hand(var/mob/user)
if(!Adjacent(user)) // As funny as it was for the AI to hug-kill the tokamak field from a distance...
return
visible_message("<span class='notice'>\The [user] hugs \the [src] to make it feel better!</span>")
if(owned_field)
Shutdown()
/obj/machinery/power/fusion_core/attackby(var/obj/item/W, var/mob/user)
if(owned_field)
to_chat(user,"<span class='warning'>Shut \the [src] off first!</span>")
return
if(ismultitool(W))
var/new_ident = input("Enter a new ident tag.", "Fusion Core", id_tag) as null|text
if(new_ident && user.Adjacent(src))
id_tag = new_ident
return
else if(iswrench(W))
anchored = !anchored
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
if(anchored)
user.visible_message("[user.name] secures [src.name] to the floor.", \
"You secure the [src.name] to the floor.", \
"You hear a ratchet")
else
user.visible_message("[user.name] unsecures [src.name] from the floor.", \
"You unsecure the [src.name] from the floor.", \
"You hear a ratchet")
return
return ..()
/obj/machinery/power/fusion_core/proc/jumpstart(var/field_temperature)
field_strength = 501 // Generally a good size.
Startup()
if(!owned_field)
return FALSE
owned_field.plasma_temperature = field_temperature
return TRUE
@@ -0,0 +1,176 @@
/obj/machinery/computer/fusion_core_control
name = "\improper R-UST Mk. 8 core control"
icon = 'icons/obj/machines/power/fusion.dmi'
icon_state = "core_control"
light_color = COLOR_ORANGE
var/id_tag
var/scan_range = 25
var/list/connected_devices = list()
var/obj/machinery/power/fusion_core/cur_viewed_device
/obj/machinery/computer/fusion_core_control/attackby(var/obj/item/thing, var/mob/user)
if(ismultitool(thing))
var/new_ident = input("Enter a new ident tag.", "Core Control", id_tag) as null|text
if(new_ident && user.Adjacent(src))
id_tag = new_ident
cur_viewed_device = null
return
else
return ..()
/obj/machinery/computer/fusion_core_control/attack_ai(mob/user)
attack_hand(user)
/obj/machinery/computer/fusion_core_control/attack_hand(mob/user)
add_fingerprint(user)
interact(user)
/obj/machinery/computer/fusion_core_control/interact(mob/user)
if(!cur_viewed_device || !check_core_status(cur_viewed_device))
cur_viewed_device = null
if(!id_tag)
to_chat(user, "<span class='warning'>This console has not been assigned an ident tag. Please contact your system administrator or conduct a manual update with a standard multitool.</span>")
return
if(cur_viewed_device && (cur_viewed_device.id_tag != id_tag || get_dist(src, cur_viewed_device) > scan_range))
cur_viewed_device = null
var/dat = "<B>Core Control #[id_tag]</B><BR>"
if(cur_viewed_device)
dat += {"
<a href='?src=\ref[src];goto_scanlist=1'>Back to overview</a><hr>
Device ident '[cur_viewed_device.id_tag]' <span style='color: [cur_viewed_device.owned_field ? "green" : "red"]'>[cur_viewed_device.owned_field ? "active" : "inactive"].</span><br>
<b>Power status:</b> [cur_viewed_device.avail()]/[cur_viewed_device.active_power_usage] W<br>
<hr>
<a href='?src=\ref[src];toggle_active=1'>Bring field [cur_viewed_device.owned_field ? "offline" : "online"].</a><br>
<hr>
<b>Field power density (W.m<sup>-3</sup>):</b><br>
<a href='?src=\ref[src];str=-1000'>----</a>
<a href='?src=\ref[src];str=-100'>--- </a>
<a href='?src=\ref[src];str=-10'>-- </a>
<a href='?src=\ref[src];str=-1'>- </a>
<a href='?src=\ref[src];str=0'>[cur_viewed_device.field_strength]</a>
<a href='?src=\ref[src];str=1'>+ </a>
<a href='?src=\ref[src];str=10'>++ </a>
<a href='?src=\ref[src];str=100'>+++ </a>
<a href='?src=\ref[src];str=1000'>++++</a><hr>
"}
if(cur_viewed_device.owned_field)
dat += {"
<b>Approximate field diameter (m):</b> [cur_viewed_device.owned_field.size]<br>
<b>Field instability:</b> [cur_viewed_device.owned_field.percent_unstable * 100]%<br>
<b>Plasma temperature:</b> [cur_viewed_device.owned_field.plasma_temperature + 295]K<hr>
<b>Fuel:</b><br>
<table><tr><th><b>Name</b></th><th><b>Amount</b></th></tr>
"}
for(var/reagent in cur_viewed_device.owned_field.dormant_reactant_quantities)
dat += "<tr><td>[reagent]</td><td>[cur_viewed_device.owned_field.dormant_reactant_quantities[reagent]]</td></tr>"
dat += "</table><hr>"
else
connected_devices.Cut()
for(var/obj/machinery/power/fusion_core/C in fusion_cores)
if(C.id_tag == id_tag && get_dist(src, C) <= scan_range)
connected_devices += C
for(var/obj/machinery/power/fusion_core/C in gyrotrons)
if(C.id_tag == id_tag && get_dist(src, C) <= scan_range)
connected_devices += C
if(connected_devices.len)
dat += {"
<b>Connected EM field generators:</b><hr>
<table>
<tr>
<th><b>Device tag</b></th>
<th><b>Status</b></th>
<th><b>Controls</b></th>
</tr>
"}
for(var/obj/machinery/power/fusion_core/C in connected_devices)
var/status
var/can_access = 1
if(!check_core_status(C))
status = "<span style='color: red'>Unresponsive</span>"
can_access = 0
else if(C.avail() < C.active_power_usage)
status = "<span style='color: orange'>Underpowered</span>"
else
status = "<span style='color: green'>Good</span>"
dat += {"
<tr>
<td>[C.id_tag]</td>
<td>[status]</td>
"}
if(!can_access)
dat += {"
<td><span style='color: red'>ERROR</span></td>
"}
else
dat += {"
<td><a href=?src=\ref[src];access_device=[connected_devices.Find(C)]'>ACCESS</a></td>
"}
dat += {"
</tr>
"}
else
dat += "<span style='color: red'>No electromagnetic field generators connected.</span>"
var/datum/browser/popup = new(user, "fusion_control", name, 500, 400, src)
popup.set_content(dat)
popup.open()
user.set_machine(src)
/obj/machinery/computer/fusion_core_control/Topic(href, href_list)
. = ..()
if(.)
return
if(href_list["access_device"])
var/idx = Clamp(text2num(href_list["toggle_active"]), 1, connected_devices.len)
cur_viewed_device = connected_devices[idx]
updateUsrDialog()
return 1
//All HREFs from this point on require a device anyways.
if(!cur_viewed_device || !check_core_status(cur_viewed_device) || cur_viewed_device.id_tag != id_tag || get_dist(src, cur_viewed_device) > scan_range)
return
if(href_list["goto_scanlist"])
cur_viewed_device = null
updateUsrDialog()
return 1
if(href_list["toggle_active"])
if(!cur_viewed_device.Startup()) //Startup() whilst the device is active will return null.
cur_viewed_device.Shutdown()
updateUsrDialog()
return 1
if(href_list["str"])
var/val = text2num(href_list["str"])
if(!val) //Value is 0, which is manual entering.
cur_viewed_device.set_strength(input("Enter the new field power density (W.m^-3)", "Fusion Control", cur_viewed_device.field_strength) as num)
else
cur_viewed_device.set_strength(cur_viewed_device.field_strength + val)
updateUsrDialog()
return 1
//Returns 1 if the machine can be interacted with via this console.
/obj/machinery/computer/fusion_core_control/proc/check_core_status(var/obj/machinery/power/fusion_core/C)
if(isnull(C))
return
if(C.stat & BROKEN)
return
if(C.idle_power_usage > C.avail())
return
. = 1
@@ -0,0 +1,494 @@
#define FUSION_ENERGY_PER_K 20
/obj/effect/fusion_em_field
name = "electromagnetic field"
desc = "A coruscating, barely visible field of energy. It is shaped like a slightly flattened torus."
icon = 'icons/obj/machines/power/fusion.dmi'
icon_state = "emfield_s1"
alpha = 50
layer = 4
light_color = COLOR_BLUE
var/size = 1
var/energy = 0
var/plasma_temperature = 0
var/radiation = 0
var/field_strength = 0.01
var/tick_instability = 0
var/percent_unstable = 0
var/obj/machinery/power/fusion_core/owned_core
var/list/dormant_reactant_quantities = list()
var/list/particle_catchers = list()
var/list/ignore_types = list(
/obj/item/projectile,
/obj/effect,
/obj/fire,
/obj/structure/cable,
/obj/machinery/atmospherics,
/obj/machinery/air_sensor,
/mob/observer/dead
)
var/light_min_range = 2
var/light_min_power = 3
var/light_max_range = 10
var/light_max_power = 10
var/last_range
var/last_power
/obj/effect/fusion_em_field/New(loc, var/obj/machinery/power/fusion_core/new_owned_core)
..()
set_light(light_min_range,light_min_power)
last_range = light_min_range
last_power = light_min_power
owned_core = new_owned_core
if(!owned_core)
qdel(src)
//create the gimmicky things to handle field collisions
var/obj/effect/fusion_particle_catcher/catcher
catcher = new (locate(src.x,src.y,src.z))
catcher.parent = src
catcher.SetSize(1)
particle_catchers.Add(catcher)
catcher = new (locate(src.x-1,src.y,src.z))
catcher.parent = src
catcher.SetSize(3)
particle_catchers.Add(catcher)
catcher = new (locate(src.x+1,src.y,src.z))
catcher.parent = src
catcher.SetSize(3)
particle_catchers.Add(catcher)
catcher = new (locate(src.x,src.y+1,src.z))
catcher.parent = src
catcher.SetSize(3)
particle_catchers.Add(catcher)
catcher = new (locate(src.x,src.y-1,src.z))
catcher.parent = src
catcher.SetSize(3)
particle_catchers.Add(catcher)
catcher = new (locate(src.x-2,src.y,src.z))
catcher.parent = src
catcher.SetSize(5)
particle_catchers.Add(catcher)
catcher = new (locate(src.x+2,src.y,src.z))
catcher.parent = src
catcher.SetSize(5)
particle_catchers.Add(catcher)
catcher = new (locate(src.x,src.y+2,src.z))
catcher.parent = src
catcher.SetSize(5)
particle_catchers.Add(catcher)
catcher = new (locate(src.x,src.y-2,src.z))
catcher.parent = src
catcher.SetSize(5)
particle_catchers.Add(catcher)
catcher = new (locate(src.x-3,src.y,src.z))
catcher.parent = src
catcher.SetSize(7)
particle_catchers.Add(catcher)
catcher = new (locate(src.x+3,src.y,src.z))
catcher.parent = src
catcher.SetSize(7)
particle_catchers.Add(catcher)
catcher = new (locate(src.x,src.y+3,src.z))
catcher.parent = src
catcher.SetSize(7)
particle_catchers.Add(catcher)
catcher = new (locate(src.x,src.y-3,src.z))
catcher.parent = src
catcher.SetSize(7)
particle_catchers.Add(catcher)
processing_objects.Add(src)
/obj/effect/fusion_em_field/process()
//make sure the field generator is still intact
if(!owned_core || QDELETED(owned_core))
qdel(src)
return
// Take some gas up from our environment.
var/added_particles = FALSE
var/datum/gas_mixture/uptake_gas = owned_core.loc.return_air()
if(uptake_gas)
uptake_gas = uptake_gas.remove_by_flag(XGM_GAS_FUSION_FUEL, rand(50,100))
if(uptake_gas && uptake_gas.total_moles)
for(var/gasname in uptake_gas.gas)
if(uptake_gas.gas[gasname]*10 > dormant_reactant_quantities[gasname])
AddParticles(gasname, uptake_gas.gas[gasname]*10)
uptake_gas.adjust_gas(gasname, -(uptake_gas.gas[gasname]), update=FALSE)
added_particles = TRUE
if(added_particles)
uptake_gas.update_values()
//let the particles inside the field react
React()
// Dump power to our powernet.
owned_core.add_avail(FUSION_ENERGY_PER_K * plasma_temperature)
// Energy decay.
if(plasma_temperature >= 1)
var/lost = plasma_temperature*0.01
radiation += lost
plasma_temperature -= lost
//handle some reactants formatting
for(var/reactant in dormant_reactant_quantities)
var/amount = dormant_reactant_quantities[reactant]
if(amount < 1)
dormant_reactant_quantities.Remove(reactant)
else if(amount >= 1000000)
var/radiate = rand(3 * amount / 4, amount / 4)
dormant_reactant_quantities[reactant] -= radiate
radiation += radiate
var/use_range
var/use_power
if(plasma_temperature <= 6000)
use_range = light_min_range
use_power = light_min_power
else if(plasma_temperature >= 25000)
use_range = light_max_range
use_power = light_max_power
else
var/temp_mod = ((plasma_temperature-5000)/20000)
use_range = light_min_range + ceil((light_max_range-light_min_range)*temp_mod)
use_power = light_min_power + ceil((light_max_power-light_min_power)*temp_mod)
if(last_range != use_range || last_power != use_power)
set_light(use_range,use_power)
last_range = use_range
last_power = use_power
check_instability()
Radiate()
if(radiation)
radiation_repository.radiate(src, radiation)
return 1
/obj/effect/fusion_em_field/proc/check_instability()
if(tick_instability > 0)
percent_unstable += (tick_instability*size)/10000
tick_instability = 0
else
if(percent_unstable < 0)
percent_unstable = 0
else
if(percent_unstable > 100)
percent_unstable = 100
if(percent_unstable > 0)
percent_unstable = max(0, percent_unstable-rand(0.01,0.03))
if(percent_unstable >= 1)
owned_core.Shutdown(force_rupture=1)
else
if(percent_unstable > 0.5 && prob(percent_unstable*100))
if(plasma_temperature < 2000)
visible_message("<span class='danger'>\The [src] ripples uneasily, like a disturbed pond.</span>")
else
var/flare
var/fuel_loss
var/rupture
if(percent_unstable < 0.7)
visible_message("<span class='danger'>\The [src] ripples uneasily, like a disturbed pond.</span>")
fuel_loss = prob(5)
else if(percent_unstable < 0.9)
visible_message("<span class='danger'>\The [src] undulates violently, shedding plumes of plasma!</span>")
flare = prob(50)
fuel_loss = prob(20)
rupture = prob(5)
else
visible_message("<span class='danger'>\The [src] is wracked by a series of horrendous distortions, buckling and twisting like a living thing!</span>")
flare = 1
fuel_loss = prob(50)
rupture = prob(25)
if(rupture)
owned_core.Shutdown(force_rupture=1)
else
var/lost_plasma = (plasma_temperature*percent_unstable)
radiation += lost_plasma
if(flare)
radiation += plasma_temperature/2
plasma_temperature -= lost_plasma
if(fuel_loss)
for(var/particle in dormant_reactant_quantities)
var/lost_fuel = dormant_reactant_quantities[particle]*percent_unstable
radiation += lost_fuel
dormant_reactant_quantities[particle] -= lost_fuel
if(dormant_reactant_quantities[particle] <= 0)
dormant_reactant_quantities.Remove(particle)
Radiate()
return
/obj/effect/fusion_em_field/proc/Rupture()
visible_message("<span class='danger'>\The [src] shudders like a dying animal before flaring to eye-searing brightness and rupturing!</span>")
set_light(15, 15, "#CCCCFF")
empulse(get_turf(src), ceil(plasma_temperature/1000), ceil(plasma_temperature/300))
sleep(5)
RadiateAll()
explosion(get_turf(owned_core),-1,-1,8,10) // Blow out all the windows.
return
/obj/effect/fusion_em_field/proc/ChangeFieldStrength(var/new_strength)
var/calc_size = 1
if(new_strength <= 50)
calc_size = 1
else if(new_strength <= 200)
calc_size = 3
else if(new_strength <= 500)
calc_size = 5
else
calc_size = 7
field_strength = new_strength
change_size(calc_size)
/obj/effect/fusion_em_field/proc/AddEnergy(var/a_energy, var/a_plasma_temperature)
energy += a_energy
plasma_temperature += a_plasma_temperature
if(a_energy && percent_unstable > 0)
percent_unstable -= a_energy/10000
if(percent_unstable < 0)
percent_unstable = 0
while(energy >= 100)
energy -= 100
plasma_temperature += 1
/obj/effect/fusion_em_field/proc/AddParticles(var/name, var/quantity = 1)
if(name in dormant_reactant_quantities)
dormant_reactant_quantities[name] += quantity
else if(name != "proton" && name != "electron" && name != "neutron")
dormant_reactant_quantities.Add(name)
dormant_reactant_quantities[name] = quantity
/obj/effect/fusion_em_field/proc/RadiateAll(var/ratio_lost = 1)
// Create our plasma field and dump it into our environment.
var/turf/T = get_turf(src)
if(istype(T))
var/datum/gas_mixture/plasma = new
plasma.adjust_gas("oxygen", (size*100), 0)
plasma.adjust_gas("phoron", (size*100), 0)
plasma.temperature = (plasma_temperature/2)
plasma.update_values()
T.assume_air(plasma)
T.hotspot_expose(plasma_temperature)
plasma = null
// Radiate all our unspent fuel and energy.
for(var/particle in dormant_reactant_quantities)
radiation += dormant_reactant_quantities[particle]
dormant_reactant_quantities.Remove(particle)
radiation += plasma_temperature/2
plasma_temperature = 0
radiation_repository.radiate(src, radiation)
Radiate()
/obj/effect/fusion_em_field/proc/Radiate()
if(istype(loc, /turf))
var/empsev = max(1, min(3, ceil(size/2)))
for(var/atom/movable/AM in range(max(1,Floor(size/2)), loc))
if(AM == src || AM == owned_core || !AM.simulated)
continue
var/skip_obstacle
for(var/ignore_path in ignore_types)
if(istype(AM, ignore_path))
skip_obstacle = TRUE
break
if(skip_obstacle)
continue
log_debug("R-UST DEBUG: [AM] is [AM.type]")
AM.visible_message("<span class='danger'>The field buckles visibly around \the [AM]!</span>")
tick_instability += rand(15,30)
AM.emp_act(empsev)
if(owned_core && owned_core.loc)
var/datum/gas_mixture/environment = owned_core.loc.return_air()
if(environment && environment.temperature < (T0C+1000)) // Putting an upper bound on it to stop it being used in a TEG.
environment.add_thermal_energy(plasma_temperature*20000)
radiation = 0
/obj/effect/fusion_em_field/proc/change_size(var/newsize = 1)
var/changed = 0
switch(newsize)
if(1)
size = 1
icon = 'icons/obj/machines/power/fusion.dmi'
icon_state = "emfield_s1"
pixel_x = 0
pixel_y = 0
//
changed = 1
if(3)
size = 3
icon = 'icons/effects/96x96.dmi'
icon_state = "emfield_s3"
pixel_x = -32 * PIXEL_MULTIPLIER
pixel_y = -32 * PIXEL_MULTIPLIER
//
changed = 3
if(5)
size = 5
icon = 'icons/effects/160x160.dmi'
icon_state = "emfield_s5"
pixel_x = -64 * PIXEL_MULTIPLIER
pixel_y = -64 * PIXEL_MULTIPLIER
//
changed = 5
if(7)
size = 7
icon = 'icons/effects/224x224.dmi'
icon_state = "emfield_s7"
pixel_x = -96 * PIXEL_MULTIPLIER
pixel_y = -96 * PIXEL_MULTIPLIER
//
changed = 7
for(var/obj/effect/fusion_particle_catcher/catcher in particle_catchers)
catcher.UpdateSize()
return changed
//the !!fun!! part
/obj/effect/fusion_em_field/proc/React()
//loop through the reactants in random order
var/list/react_pool = dormant_reactant_quantities.Copy()
//cant have any reactions if there aren't any reactants present
if(react_pool.len)
//determine a random amount to actually react this cycle, and remove it from the standard pool
//this is a hack, and quite nonrealistic :(
for(var/reactant in react_pool)
react_pool[reactant] = rand(Floor(react_pool[reactant]/2),react_pool[reactant])
dormant_reactant_quantities[reactant] -= react_pool[reactant]
if(!react_pool[reactant])
react_pool -= reactant
//loop through all the reacting reagents, picking out random reactions for them
var/list/produced_reactants = new/list
var/list/p_react_pool = react_pool.Copy()
while(p_react_pool.len)
//pick one of the unprocessed reacting reagents randomly
var/cur_p_react = pick(p_react_pool)
p_react_pool.Remove(cur_p_react)
//grab all the possible reactants to have a reaction with
var/list/possible_s_reacts = react_pool.Copy()
//if there is only one of a particular reactant, then it can not react with itself so remove it
possible_s_reacts[cur_p_react] -= 1
if(possible_s_reacts[cur_p_react] < 1)
possible_s_reacts.Remove(cur_p_react)
//loop through and work out all the possible reactions
var/list/possible_reactions = new/list
for(var/cur_s_react in possible_s_reacts)
if(possible_s_reacts[cur_s_react] < 1)
continue
var/decl/fusion_reaction/cur_reaction = get_fusion_reaction(cur_p_react, cur_s_react)
if(cur_reaction && plasma_temperature >= cur_reaction.minimum_energy_level)
possible_reactions.Add(cur_reaction)
//if there are no possible reactions here, abandon this primary reactant and move on
if(!possible_reactions.len)
continue
//split up the reacting atoms between the possible reactions
while(possible_reactions.len)
var/decl/fusion_reaction/cur_reaction = pick(possible_reactions)
possible_reactions.Remove(cur_reaction)
//set the randmax to be the lower of the two involved reactants
var/max_num_reactants = react_pool[cur_reaction.p_react] > react_pool[cur_reaction.s_react] ? \
react_pool[cur_reaction.s_react] : react_pool[cur_reaction.p_react]
if(max_num_reactants < 1)
continue
//make sure we have enough energy
if(plasma_temperature < cur_reaction.minimum_reaction_temperature)
continue
if(plasma_temperature < max_num_reactants * cur_reaction.energy_consumption)
max_num_reactants = round(plasma_temperature / cur_reaction.energy_consumption)
if(max_num_reactants < 1)
continue
//randomly determined amount to react
var/amount_reacting = rand(1, max_num_reactants)
//removing the reacting substances from the list of substances that are primed to react this cycle
//if there aren't enough of that substance (there should be) then modify the reactant amounts accordingly
if( react_pool[cur_reaction.p_react] - amount_reacting >= 0 )
react_pool[cur_reaction.p_react] -= amount_reacting
else
amount_reacting = react_pool[cur_reaction.p_react]
react_pool[cur_reaction.p_react] = 0
//same again for secondary reactant
if(react_pool[cur_reaction.s_react] - amount_reacting >= 0 )
react_pool[cur_reaction.s_react] -= amount_reacting
else
react_pool[cur_reaction.p_react] += amount_reacting - react_pool[cur_reaction.p_react]
amount_reacting = react_pool[cur_reaction.s_react]
react_pool[cur_reaction.s_react] = 0
plasma_temperature -= max_num_reactants * cur_reaction.energy_consumption // Remove the consumed energy.
plasma_temperature += max_num_reactants * cur_reaction.energy_production // Add any produced energy.
radiation += max_num_reactants * cur_reaction.radiation // Add any produced radiation.
tick_instability += max_num_reactants * cur_reaction.instability
// Create the reaction products.
for(var/reactant in cur_reaction.products)
var/success = 0
for(var/check_reactant in produced_reactants)
if(check_reactant == reactant)
produced_reactants[reactant] += cur_reaction.products[reactant] * amount_reacting
success = 1
break
if(!success)
produced_reactants[reactant] = cur_reaction.products[reactant] * amount_reacting
// Handle anything special. If this proc returns true, abort the current reaction.
if(cur_reaction.handle_reaction_special(src))
return
// This reaction is done, and can't be repeated this sub-cycle.
possible_reactions.Remove(cur_reaction.s_react)
// Loop through the newly produced reactants and add them to the pool.
for(var/reactant in produced_reactants)
AddParticles(reactant, produced_reactants[reactant])
// Check whether there are reactants left, and add them back to the pool.
for(var/reactant in react_pool)
AddParticles(reactant, react_pool[reactant])
/obj/effect/fusion_em_field/Destroy()
set_light(0)
RadiateAll()
for(var/obj/effect/fusion_particle_catcher/catcher in particle_catchers)
qdel(catcher)
if(owned_core)
owned_core.owned_field = null
owned_core = null
processing_objects.Remove(src)
. = ..()
/obj/effect/fusion_em_field/bullet_act(var/obj/item/projectile/Proj)
AddEnergy(Proj.damage)
update_icon()
return 0
#undef FUSION_HEAT_CAP
@@ -0,0 +1,67 @@
/obj/item/weapon/fuel_assembly
name = "fuel rod assembly"
icon = 'icons/obj/machines/power/fusion.dmi'
icon_state = "fuel_assembly"
layer = 4
var/material_name
var/percent_depleted = 1
var/list/rod_quantities = list()
var/fuel_type = "composite"
var/fuel_colour
var/radioactivity = 0
var/const/initial_amount = 300
/obj/item/weapon/fuel_assembly/New(var/newloc, var/_material, var/_colour)
fuel_type = _material
fuel_colour = _colour
..(newloc)
/obj/item/weapon/fuel_assembly/initialize()
. = ..()
var/material/material = get_material_by_name(fuel_type)
if(istype(material))
name = "[material.use_name] fuel rod assembly"
desc = "A fuel rod for a fusion reactor. This one is made from [material.use_name]."
fuel_colour = material.icon_colour
fuel_type = material.use_name
if(material.radioactivity)
radioactivity = material.radioactivity
desc += " It is warm to the touch."
processing_objects += src
if(material.luminescence)
set_light(material.luminescence, material.luminescence, material.icon_colour)
else
name = "[fuel_type] fuel rod assembly"
desc = "A fuel rod for a fusion reactor. This one is made from [fuel_type]."
icon_state = "blank"
var/image/I = image(icon, "fuel_assembly")
I.color = fuel_colour
overlays += list(I, image(icon, "fuel_assembly_bracket"))
rod_quantities[fuel_type] = initial_amount
/obj/item/weapon/fuel_assembly/process()
if(!radioactivity)
return PROCESS_KILL
if(istype(loc, /turf))
radiation_repository.radiate(src, max(1,ceil(radioactivity/30)))
/obj/item/weapon/fuel_assembly/Destroy()
processing_objects -= src
return ..()
// Mapper shorthand.
/obj/item/weapon/fuel_assembly/deuterium/New(var/newloc)
..(newloc, "deuterium")
/obj/item/weapon/fuel_assembly/tritium/New(var/newloc)
..(newloc, "tritium")
/obj/item/weapon/fuel_assembly/phoron/New(var/newloc)
..(newloc, "phoron")
/obj/item/weapon/fuel_assembly/supermatter/New(var/newloc)
..(newloc, "supermatter")
@@ -0,0 +1,54 @@
/obj/machinery/fusion_fuel_compressor
name = "fuel compressor"
icon = 'icons/obj/machines/power/fusion.dmi'
icon_state = "fuel_compressor1"
density = 1
anchored = 1
layer = 4
/obj/machinery/fusion_fuel_compressor/MouseDrop_T(var/atom/movable/target, var/mob/user)
if(user.incapacitated() || !user.Adjacent(src))
return
return do_special_fuel_compression(target, user)
/obj/machinery/fusion_fuel_compressor/proc/do_special_fuel_compression(var/obj/item/thing, var/mob/user)
if(istype(thing) && thing.reagents && thing.reagents.total_volume && thing.is_open_container())
if(thing.reagents.reagent_list.len > 1)
to_chat(user, "<span class='warning'>The contents of \the [thing] are impure and cannot be used as fuel.</span>")
return 1
if(thing.reagents.total_volume < 50)
to_chat(user, "<span class='warning'>You need at least fifty units of material to form a fuel rod.</span>")
return 1
var/datum/reagent/R = thing.reagents.reagent_list[1]
visible_message("<span class='notice'>\The [src] compresses the contents of \the [thing] into a new fuel assembly.</span>")
var/obj/item/weapon/fuel_assembly/F = new(get_turf(src), R.id, R.color)
thing.reagents.remove_reagent(R.id, R.volume)
user.put_in_hands(F)
else if(istype(thing, /obj/machinery/power/supermatter/shard))
var/obj/item/weapon/fuel_assembly/F = new(get_turf(src), "supermatter")
visible_message("<span class='notice'>\The [src] compresses the \[thing] into a new fuel assembly.</span>")
qdel(thing)
user.put_in_hands(F)
return 1
return 0
/obj/machinery/fusion_fuel_compressor/attackby(var/obj/item/thing, var/mob/user)
if(istype(thing, /obj/item/stack/material))
var/obj/item/stack/material/M = thing
var/material/mat = M.get_material()
if(!mat.is_fusion_fuel)
to_chat(user, "<span class='warning'>It would be pointless to make a fuel rod out of [mat.use_name].</span>")
return
if(M.get_amount() < 25)
to_chat(user, "<span class='warning'>You need at least 25 [mat.sheet_plural_name] to make a fuel rod.</span>")
return
var/obj/item/weapon/fuel_assembly/F = new(get_turf(src), mat.name)
visible_message("<span class='notice'>\The [src] compresses the [mat.use_name] into a new fuel assembly.</span>")
M.use(25)
user.put_in_hands(F)
else if(do_special_fuel_compression(thing, user))
return
return ..()
@@ -0,0 +1,102 @@
/obj/machinery/computer/fusion_fuel_control
name = "fuel injection control computer"
icon = 'icons/obj/machines/power/fusion.dmi'
icon_state = "fuel"
var/id_tag
var/scan_range = 25
/obj/machinery/computer/fusion_fuel_control/attack_ai(mob/user)
attack_hand(user)
/obj/machinery/computer/fusion_fuel_control/attack_hand(mob/user)
add_fingerprint(user)
interact(user)
/obj/machinery/computer/fusion_fuel_control/interact(var/mob/user)
if(stat & (BROKEN|NOPOWER))
user.unset_machine()
user << browse(null, "window=fuel_control")
return
if (!istype(user, /mob/living/silicon) && get_dist(src, user) > 1)
user.unset_machine()
user << browse(null, "window=fuel_control")
return
if(!id_tag)
to_chat(user, "<span class='warning'>This console has not been assigned an ident tag. Please contact your system administrator or conduct a manual update with a standard multitool.</span>")
return
var/dat = "<B>Reactor Core Fuel Control #[id_tag]</B><BR>"
dat += {"
<hr>
<table border=1 width='100%'>
<tr>
<td><b>Contains</b></td>
<td><b>Assembly</b></td>
<td><b>Remaining</b></td>
</tr>"}
for(var/obj/machinery/fusion_fuel_injector/I in fuel_injectors)
if(!id_tag || !I.id_tag || I.id_tag != id_tag || get_dist(src, I) > scan_range)
continue
dat += "<tr>"
if(I.stat & (BROKEN|NOPOWER))
dat += "<td><span class='danger'>ERROR</span></td>"
dat += "<td><span class='danger'>ERROR</span></td>"
dat += "<td><span class='danger'>ERROR</span></td>"
else
dat += "<td>[I.cur_assembly ? I.cur_assembly.fuel_type : "NONE"]</td>"
if(I.cur_assembly)
dat += "<td><a href='?src=\ref[src];toggle_injecting=\ref[I]'>\[[I.injecting ? "Halt injecting" : "Begin injecting"]\]</a></td>"
else
dat += "<td>None</td>"
if(I.cur_assembly)
dat += "<td>[I.cur_assembly.percent_depleted * 100]%</td>"
else
dat += "<td>NA</td>"
dat += "</tr>"
dat += {"</table><hr>
<A href='?src=\ref[src];refresh=1'>Refresh</A>
<A href='?src=\ref[src];close=1'>Close</A><BR>"}
var/datum/browser/popup = new(user, "fuel_control", "Fusion Fuel Control Console", 800, 400, src)
popup.set_content(dat)
popup.open()
user.set_machine(src)
/obj/machinery/computer/fusion_fuel_control/Topic(href, href_list)
if(..())
return 1
if(href_list["toggle_injecting"])
var/obj/machinery/fusion_fuel_injector/I = locate(href_list["toggle_injecting"])
if(I.id_tag != id_tag || get_dist(src, I) > scan_range)
return
if(istype(I))
if(I.injecting)
I.StopInjecting()
else
I.BeginInjecting()
if( href_list["close"] )
usr << browse(null, "window=fuel_control")
usr.unset_machine()
updateDialog()
/obj/machinery/computer/fusion_fuel_control/attackby(var/obj/item/W, var/mob/user)
if(ismultitool(W))
var/new_ident = input("Enter a new ident tag.", "Fuel Control", id_tag) as null|text
if(new_ident && user.Adjacent(src))
id_tag = new_ident
return
return ..()
@@ -0,0 +1,153 @@
var/list/fuel_injectors = list()
/obj/machinery/fusion_fuel_injector
name = "fuel injector"
icon = 'icons/obj/machines/power/fusion.dmi'
icon_state = "injector0"
density = 1
anchored = 0
req_access = list(access_engine)
use_power = 1
idle_power_usage = 10
active_power_usage = 500
var/fuel_usage = 0.0001
var/id_tag
var/injecting = 0
var/obj/item/weapon/fuel_assembly/cur_assembly
/obj/machinery/fusion_fuel_injector/New()
..()
fuel_injectors += src
tag = null
/obj/machinery/fusion_fuel_injector/Destroy()
if(cur_assembly)
cur_assembly.forceMove(get_turf(src))
cur_assembly = null
fuel_injectors -= src
return ..()
/obj/machinery/fusion_fuel_injector/mapped
anchored = 1
/obj/machinery/fusion_fuel_injector/process()
if(injecting)
if(stat & (BROKEN|NOPOWER))
StopInjecting()
else
Inject()
/obj/machinery/fusion_fuel_injector/attackby(obj/item/W, mob/user)
if(ismultitool(W))
var/new_ident = input("Enter a new ident tag.", "Fuel Injector", id_tag) as null|text
if(new_ident && user.Adjacent(src))
id_tag = new_ident
return
if(istype(W, /obj/item/weapon/fuel_assembly))
if(injecting)
to_chat(user, "<span class='warning'>Shut \the [src] off before playing with the fuel rod!</span>")
return
if(cur_assembly)
cur_assembly.forceMove(get_turf(src))
visible_message("<span class='notice'>\The [user] swaps \the [src]'s [cur_assembly] for \a [W].</span>")
else
visible_message("<span class='notice'>\The [user] inserts \a [W] into \the [src].</span>")
user.drop_from_inventory(W)
W.forceMove(src)
if(cur_assembly)
cur_assembly.forceMove(get_turf(src))
user.put_in_hands(cur_assembly)
cur_assembly = W
return
if(iswrench(W))
if(injecting)
to_chat(user, "<span class='warning'>Shut \the [src] off first!</span>")
return
anchored = !anchored
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
if(anchored)
user.visible_message("\The [user] secures \the [src] to the floor.")
else
user.visible_message("\The [user] unsecures \the [src] from the floor.")
return
return ..()
/obj/machinery/fusion_fuel_injector/attack_hand(mob/user)
if(injecting)
to_chat(user, "<span class='warning'>Shut \the [src] off before playing with the fuel rod!</span>")
return
if(cur_assembly)
cur_assembly.forceMove(get_turf(src))
user.put_in_hands(cur_assembly)
visible_message("<span class='notice'>\The [user] removes \the [cur_assembly] from \the [src].</span>")
cur_assembly = null
return
else
to_chat(user, "<span class='warning'>There is no fuel rod in \the [src].</span>")
return
/obj/machinery/fusion_fuel_injector/proc/BeginInjecting()
if(!injecting && cur_assembly)
icon_state = "injector1"
injecting = 1
use_power = 1
/obj/machinery/fusion_fuel_injector/proc/StopInjecting()
if(injecting)
injecting = 0
icon_state = "injector0"
use_power = 0
/obj/machinery/fusion_fuel_injector/proc/Inject()
if(!injecting)
return
if(cur_assembly)
var/amount_left = 0
for(var/reagent in cur_assembly.rod_quantities)
if(cur_assembly.rod_quantities[reagent] > 0)
var/amount = cur_assembly.rod_quantities[reagent] * fuel_usage
var/numparticles = round(amount * 1000)
if(numparticles < 1)
numparticles = 1
var/obj/effect/accelerated_particle/A = new/obj/effect/accelerated_particle(get_turf(src), dir)
A.particle_type = reagent
A.additional_particles = numparticles - 1
A.move(1)
if(cur_assembly)
cur_assembly.rod_quantities[reagent] -= amount
amount_left += cur_assembly.rod_quantities[reagent]
if(cur_assembly)
cur_assembly.percent_depleted = amount_left / cur_assembly.initial_amount
flick("injector-emitting",src)
else
StopInjecting()
/obj/machinery/fusion_fuel_injector/verb/rotate_clock()
set category = "Object"
set name = "Rotate Generator (Clockwise)"
set src in view(1)
if (usr.incapacitated() || usr.restrained() || anchored)
return
src.dir = turn(src.dir, -90)
/obj/machinery/fusion_fuel_injector/verb/rotate_anticlock()
set category = "Object"
set name = "Rotate Generator (Counter-clockwise)"
set src in view(1)
if (usr.incapacitated() || usr.restrained() || anchored)
return
src.dir = turn(src.dir, 90)
@@ -0,0 +1,99 @@
/obj/item/weapon/circuitboard/fusion_core_control
name = "circuit board (fusion core controller)"
build_path = /obj/machinery/computer/fusion_core_control
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4)
/obj/item/weapon/circuitboard/fusion_fuel_compressor
name = "circuit board (fusion fuel compressor)"
build_path = /obj/machinery/fusion_fuel_compressor
board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 4, TECH_MATERIAL = 4)
req_components = list(
/obj/item/weapon/stock_parts/manipulator/nano = 2,
/obj/item/weapon/stock_parts/matter_bin/super = 2,
/obj/item/weapon/stock_parts/console_screen = 1,
/obj/item/stack/cable_coil = 5
)
/obj/item/weapon/circuitboard/fusion_fuel_control
name = "circuit board (fusion fuel controller)"
build_path = /obj/machinery/computer/fusion_fuel_control
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4)
/obj/item/weapon/circuitboard/gyrotron_control
name = "circuit board (gyrotron controller)"
build_path = /obj/machinery/computer/gyrotron_control
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4)
/obj/item/weapon/circuitboard/fusion_core
name = "internal circuitry (fusion core)"
build_path = /obj/machinery/power/fusion_core
board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_BLUESPACE = 2, TECH_MAGNET = 4, TECH_POWER = 4)
req_components = list(
/obj/item/weapon/stock_parts/manipulator/nano = 2,
/obj/item/weapon/stock_parts/micro_laser/high = 1,
/obj/item/weapon/stock_parts/console_screen = 1,
/obj/item/stack/cable_coil = 5
)
/obj/item/weapon/circuitboard/fusion_injector
name = "internal circuitry (fusion fuel injector)"
build_path = /obj/machinery/fusion_fuel_injector
board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 4, TECH_MATERIAL = 4)
req_components = list(
/obj/item/weapon/stock_parts/manipulator/nano = 2,
/obj/item/weapon/stock_parts/scanning_module/adv = 1,
/obj/item/weapon/stock_parts/matter_bin/super = 1,
/obj/item/weapon/stock_parts/console_screen = 1,
/obj/item/stack/cable_coil = 5
)
/obj/item/weapon/circuitboard/gyrotron
name = "circuit board (gyrotron)"
build_path = /obj/machinery/power/emitter/gyrotron
board_type = new /datum/frame/frame_types/machine
origin_tech = list(TECH_POWER = 4, TECH_ENGINEERING = 4, TECH_MATERIAL = 5, TECH_MAGNET = 3)
req_components = list(
/obj/item/weapon/stock_parts/scanning_module/adv = 1,
/obj/item/weapon/stock_parts/micro_laser/high = 3,
/obj/item/weapon/stock_parts/capacitor/adv = 1
)
/datum/design/circuit/fusion
name = "fusion core control console"
id = "fusion_core_control"
build_path = /obj/item/weapon/circuitboard/fusion_core_control
sort_string = "LAAAD"
req_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3, TECH_MATERIAL = 3)
/datum/design/circuit/fusion/fuel_compressor
name = "fusion fuel compressor"
id = "fusion_fuel_compressor"
build_path = /obj/item/weapon/circuitboard/fusion_fuel_compressor
sort_string = "LAAAE"
/datum/design/circuit/fusion/fuel_control
name = "fusion fuel control console"
id = "fusion_fuel_control"
build_path = /obj/item/weapon/circuitboard/fusion_fuel_control
sort_string = "LAAAF"
/datum/design/circuit/fusion/gyrotron_control
name = "gyrotron control console"
id = "gyrotron_control"
build_path = /obj/item/weapon/circuitboard/gyrotron_control
sort_string = "LAAAG"
/datum/design/circuit/fusion/core
name = "fusion core"
id = "fusion_core"
build_path = /obj/item/weapon/circuitboard/fusion_core
sort_string = "LAAAH"
/datum/design/circuit/fusion/injector
name = "fusion fuel injector"
id = "fusion_injector"
build_path = /obj/item/weapon/circuitboard/fusion_injector
sort_string = "LAAAI"
@@ -0,0 +1,41 @@
/obj/effect/fusion_particle_catcher
icon = 'icons/effects/effects.dmi'
density = 1
anchored = 1
invisibility = 101
var/obj/effect/fusion_em_field/parent
var/mysize = 0
light_color = COLOR_BLUE
/obj/effect/fusion_particle_catcher/Destroy()
. =..()
parent.particle_catchers -= src
parent = null
/obj/effect/fusion_particle_catcher/proc/SetSize(var/newsize)
name = "collector [newsize]"
mysize = newsize
UpdateSize()
/obj/effect/fusion_particle_catcher/proc/AddParticles(var/name, var/quantity = 1)
if(parent && parent.size >= mysize)
parent.AddParticles(name, quantity)
return 1
return 0
/obj/effect/fusion_particle_catcher/proc/UpdateSize()
if(parent.size >= mysize)
density = 1
name = "collector [mysize] ON"
else
density = 0
name = "collector [mysize] OFF"
/obj/effect/fusion_particle_catcher/bullet_act(var/obj/item/projectile/Proj)
parent.AddEnergy(Proj.damage)
update_icon()
return 0
/obj/effect/fusion_particle_catcher/CanPass(var/atom/movable/mover, var/turf/target, var/height=0, var/air_group=0)
return ismob(mover)
@@ -0,0 +1,164 @@
var/list/fusion_reactions
/decl/fusion_reaction
var/p_react = "" // Primary reactant.
var/s_react = "" // Secondary reactant.
var/minimum_energy_level = 1
var/energy_consumption = 0
var/energy_production = 0
var/radiation = 0
var/instability = 0
var/list/products = list()
var/minimum_reaction_temperature = 100
/decl/fusion_reaction/proc/handle_reaction_special(var/obj/effect/fusion_em_field/holder)
return 0
proc/get_fusion_reaction(var/p_react, var/s_react, var/m_energy)
if(!fusion_reactions)
fusion_reactions = list()
for(var/rtype in typesof(/decl/fusion_reaction) - /decl/fusion_reaction)
var/decl/fusion_reaction/cur_reaction = new rtype()
if(!fusion_reactions[cur_reaction.p_react])
fusion_reactions[cur_reaction.p_react] = list()
fusion_reactions[cur_reaction.p_react][cur_reaction.s_react] = cur_reaction
if(!fusion_reactions[cur_reaction.s_react])
fusion_reactions[cur_reaction.s_react] = list()
fusion_reactions[cur_reaction.s_react][cur_reaction.p_react] = cur_reaction
if(fusion_reactions.Find(p_react))
var/list/secondary_reactions = fusion_reactions[p_react]
if(secondary_reactions.Find(s_react))
return fusion_reactions[p_react][s_react]
// Material fuels
// deuterium
// tritium
// phoron
// supermatter
// Virtual fuels
// helium-3
// lithium-6
// boron-11
// Basic power production reactions.
/decl/fusion_reaction/deuterium_deuterium
p_react = "deuterium"
s_react = "deuterium"
energy_consumption = 1
energy_production = 2
// Advanced production reactions (todo)
/decl/fusion_reaction/deuterium_helium
p_react = "deuterium"
s_react = "helium-3"
energy_consumption = 1
energy_production = 5
radiation = 2
/decl/fusion_reaction/deuterium_tritium
p_react = "deuterium"
s_react = "tritium"
energy_consumption = 1
energy_production = 1
products = list("helium-3" = 1)
instability = 0.5
radiation = 3
/decl/fusion_reaction/deuterium_lithium
p_react = "deuterium"
s_react = "lithium"
energy_consumption = 2
energy_production = 0
radiation = 3
products = list("tritium"= 1)
instability = 1
// Unideal/material production reactions
/decl/fusion_reaction/oxygen_oxygen
p_react = "oxygen"
s_react = "oxygen"
energy_consumption = 10
energy_production = 0
instability = 5
radiation = 5
products = list("silicon"= 1)
/decl/fusion_reaction/iron_iron
p_react = "iron"
s_react = "iron"
products = list("silver" = 1, "gold" = 1, "platinum" = 1) // Not realistic but w/e
energy_consumption = 10
energy_production = 0
instability = 2
minimum_reaction_temperature = 10000
/decl/fusion_reaction/phoron_hydrogen
p_react = "hydrogen"
s_react = "phoron"
energy_consumption = 10
energy_production = 0
instability = 5
products = list("mydrogen" = 1)
minimum_reaction_temperature = 8000
// VERY UNIDEAL REACTIONS.
/decl/fusion_reaction/phoron_supermatter
p_react = "supermatter"
s_react = "phoron"
energy_consumption = 0
energy_production = 5
radiation = 20
instability = 20
/decl/fusion_reaction/phoron_supermatter/handle_reaction_special(var/obj/effect/fusion_em_field/holder)
wormhole_event()
var/turf/origin = get_turf(holder)
holder.Rupture()
qdel(holder)
var/radiation_level = rand(100, 200)
// Copied from the SM for proof of concept. //Not any more --Cirra //Use the whole z proc --Leshana
radiation_repository.z_radiate(locate(1, 1, holder.z), radiation_level, 1)
for(var/mob/living/mob in living_mob_list)
var/turf/T = get_turf(mob)
if(T && (holder.z == T.z))
if(istype(mob, /mob/living/carbon/human))
var/mob/living/carbon/human/H = mob
H.hallucination += rand(100,150)
for(var/obj/machinery/fusion_fuel_injector/I in range(world.view, origin))
if(I.cur_assembly && I.cur_assembly.fuel_type == "supermatter")
explosion(get_turf(I), 1, 2, 3)
spawn(5)
if(I && I.loc)
qdel(I)
sleep(5)
explosion(origin, 1, 2, 5)
return 1
// High end reactions.
/decl/fusion_reaction/boron_hydrogen
p_react = "boron"
s_react = "hydrogen"
minimum_energy_level = FUSION_HEAT_CAP * 0.5
energy_consumption = 3
energy_production = 15
radiation = 3
instability = 3
/decl/fusion_reaction/hydrogen_hydrogen
p_react = "hydrogen"
s_react = "hydrogen"
minimum_energy_level = FUSION_HEAT_CAP * 0.75
energy_consumption = 0
energy_production = 20
radiation = 5
instability = 5
@@ -0,0 +1,57 @@
var/list/gyrotrons = list()
/obj/machinery/power/emitter/gyrotron
name = "gyrotron"
icon = 'icons/obj/machines/power/fusion.dmi'
desc = "It is a heavy duty industrial gyrotron suited for powering fusion reactors."
icon_state = "emitter-off"
req_access = list(access_engine)
use_power = 1
active_power_usage = 50000
var/id_tag
var/rate = 3
var/mega_energy = 1
/obj/machinery/power/emitter/gyrotron/anchored
anchored = 1
state = 2
/obj/machinery/power/emitter/gyrotron/initialize()
gyrotrons += src
active_power_usage = mega_energy * 50000
. = ..()
/obj/machinery/power/emitter/gyrotron/Destroy()
gyrotrons -= src
return ..()
/obj/machinery/power/emitter/gyrotron/process()
active_power_usage = mega_energy * 50000
. = ..()
/obj/machinery/power/emitter/gyrotron/get_rand_burst_delay()
return rate * 10
/obj/machinery/power/emitter/gyrotron/get_burst_delay()
return rate * 10
/obj/machinery/power/emitter/gyrotron/get_emitter_beam()
var/obj/item/projectile/beam/emitter/E = ..()
E.damage = mega_energy * 50
return E
/obj/machinery/power/emitter/gyrotron/update_icon()
if (active && powernet && avail(active_power_usage))
icon_state = "emitter-on"
else
icon_state = "emitter-off"
/obj/machinery/power/emitter/gyrotron/attackby(var/obj/item/W, var/mob/user)
if(ismultitool(W))
var/new_ident = input("Enter a new ident tag.", "Gyrotron", id_tag) as null|text
if(new_ident && user.Adjacent(src))
id_tag = new_ident
return
return ..()
@@ -0,0 +1,97 @@
/obj/machinery/computer/gyrotron_control
name = "gyrotron control console"
icon = 'icons/obj/machines/power/fusion.dmi'
icon_state = "engine"
light_color = COLOR_BLUE
var/id_tag
var/scan_range = 25
/obj/machinery/computer/gyrotron_control/attack_ai(var/mob/user)
attack_hand(user)
/obj/machinery/computer/gyrotron_control/attack_hand(var/mob/user)
add_fingerprint(user)
interact(user)
/obj/machinery/computer/gyrotron_control/interact(var/mob/user)
if(!id_tag)
to_chat(user, "<span class='warning'>This console has not been assigned an ident tag. Please contact your system administrator or conduct a manual update with a standard multitool.</span>")
return
var/dat = "<td><b>Gyrotron controller #[id_tag]</b>"
dat = "<table><tr>"
dat += "<td><b>Mode</b></td>"
dat += "<td><b>Fire Delay</b></td>"
dat += "<td><b>Power</b></td>"
dat += "</tr>"
for(var/obj/machinery/power/emitter/gyrotron/G in gyrotrons)
if(!G || G.id_tag != id_tag || get_dist(src, G) > scan_range)
continue
dat += "<tr>"
if(G.state != 2 || (G.stat & (NOPOWER | BROKEN))) //Error data not found.
dat += "<td><span style='color: red'>ERROR</span></td>"
dat += "<td><span style='color: red'>ERROR</span></td>"
dat += "<td><span style='color: red'>ERROR</span></td>"
else
dat += "<td><a href='?src=\ref[src];machine=\ref[G];toggle=1'>[G.active ? "Emitting" : "Standing By"]</a></td>"
dat += "<td><a href='?src=\ref[src];machine=\ref[G];modifyrate=1'>[G.rate]</a></td>"
dat += "<td><a href='?src=\ref[src];machine=\ref[G];modifypower=1'>[G.mega_energy]</a></td>"
dat += "</tr></table>"
var/datum/browser/popup = new(user, "gyrotron_controller_[id_tag]", "Gyrotron Remote Control Console", 500, 400, src)
popup.set_content(dat)
popup.open()
add_fingerprint(user)
user.set_machine(src)
/obj/machinery/computer/gyrotron_control/Topic(var/href, var/list/href_list)
. = ..()
if(.)
return
if(stat & (NOPOWER | BROKEN))
return
var/obj/machinery/power/emitter/gyrotron/G = locate(href_list["machine"])
if(!G || G.id_tag != id_tag || get_dist(src, G) > scan_range)
return
if(href_list["modifypower"])
var/new_val = input("Enter new emission power level (1 - 50)", "Modifying power level", G.mega_energy) as num
if(!new_val)
to_chat(usr, "<span class='warning'>That's not a valid number.</span>")
return 1
G.mega_energy = Clamp(new_val, 1, 50)
G.active_power_usage = G.mega_energy * 1500
updateUsrDialog()
return 1
if(href_list["modifyrate"])
var/new_val = input("Enter new emission delay between 1 and 10 seconds.", "Modifying emission rate", G.rate) as num
if(!new_val)
to_chat(usr, "<span class='warning'>That's not a valid number.</span>")
return 1
G.rate = Clamp(new_val, 1, 10)
updateUsrDialog()
return 1
if(href_list["toggle"])
G.activate(usr)
updateUsrDialog()
return 1
return 0
/obj/machinery/computer/gyrotron_control/attackby(var/obj/item/W, var/mob/user)
if(ismultitool(W))
var/new_ident = input("Enter a new ident tag.", "Gyrotron Control", id_tag) as null|text
if(new_ident && user.Adjacent(src))
id_tag = new_ident
return
return ..()
+6 -6
View File
@@ -54,7 +54,7 @@ var/global/list/rad_collectors = list()
investigate_log("turned [active?"<font color='green'>on</font>":"<font color='red'>off</font>"] by [user.key]. [P?"Fuel: [round(P.air_contents.gas["phoron"]/0.29)]%":"<font color='red'>It is empty</font>"].","singulo")
return
else
user << "\red The controls are locked!"
user << "<font color='red'>The controls are locked!</font>"
return
..()
@@ -62,10 +62,10 @@ var/global/list/rad_collectors = list()
/obj/machinery/power/rad_collector/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/tank/phoron))
if(!src.anchored)
user << "\red The [src] needs to be secured to the floor first."
user << "<font color='red'>The [src] needs to be secured to the floor first.</font>"
return 1
if(src.P)
user << "\red There's already a phoron tank loaded."
user << "<font color='red'>There's already a phoron tank loaded.</font>"
return 1
user.drop_item()
src.P = W
@@ -78,7 +78,7 @@ var/global/list/rad_collectors = list()
return 1
else if(istype(W, /obj/item/weapon/wrench))
if(P)
user << "\blue Remove the phoron tank first."
user << "<font color='blue'>Remove the phoron tank first.</font>"
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
src.anchored = !src.anchored
@@ -97,9 +97,9 @@ var/global/list/rad_collectors = list()
user << "The controls are now [src.locked ? "locked." : "unlocked."]"
else
src.locked = 0 //just in case it somehow gets locked
user << "\red The controls can only be locked when the [src] is active"
user << "<font color='red'>The controls can only be locked when the [src] is active.</font>"
else
user << "\red Access denied!"
user << "<font color='red'>Access denied!</font>"
return 1
return ..()
+20 -4
View File
@@ -24,6 +24,9 @@
var/state = 0
var/locked = 0
var/burst_delay = 2
var/initial_fire_delay = 100
var/integrity = 80
@@ -75,7 +78,7 @@
src.active = 1
user << "You turn on [src]."
src.shot_number = 0
src.fire_delay = 100
src.fire_delay = get_initial_fire_delay()
message_admins("Emitter turned on by [key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Emitter turned on by [user.ckey]([user]) in ([x],[y],[z])")
investigate_log("turned <font color='green'>on</font> by [user.key]","singulo")
@@ -119,10 +122,10 @@
src.last_shot = world.time
if(src.shot_number < burst_shots)
src.fire_delay = 2
src.fire_delay = get_burst_delay() //R-UST port
src.shot_number ++
else
src.fire_delay = rand(min_burst_delay, max_burst_delay)
src.fire_delay = get_rand_burst_delay() //R-UST port
src.shot_number = 0
//need to calculate the power per shot as the emitter doesn't fire continuously.
@@ -135,7 +138,7 @@
s.set_up(5, 1, src)
s.start()
var/obj/item/projectile/beam/emitter/A = new /obj/item/projectile/beam/emitter( src.loc )
var/obj/item/projectile/beam/emitter/A = get_emitter_beam()
A.damage = round(power_per_shot/EMITTER_DAMAGE_POWER_TRANSFER)
A.launch( get_step(src.loc, src.dir) )
@@ -266,3 +269,16 @@
user << "<span class='danger'>\The [src] is damaged.</span>"
if(77 to 99)
user << "<span class='warning'>\The [src] is slightly damaged.</span>"
//R-UST port
/obj/machinery/power/emitter/proc/get_initial_fire_delay()
return initial_fire_delay
/obj/machinery/power/emitter/proc/get_rand_burst_delay()
return rand(min_burst_delay, max_burst_delay)
/obj/machinery/power/emitter/proc/get_burst_delay()
return burst_delay
/obj/machinery/power/emitter/proc/get_emitter_beam()
return new /obj/item/projectile/beam/emitter(get_turf(src))
@@ -43,6 +43,21 @@
toxmob(A)
if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/singularity/)))
A:energy += energy
//R-UST port
else if(istype(A,/obj/machinery/power/fusion_core))
var/obj/machinery/power/fusion_core/collided_core = A
if(particle_type && particle_type != "neutron")
if(collided_core.AddParticles(particle_type, 1 + additional_particles))
collided_core.owned_field.plasma_temperature += mega_energy
collided_core.owned_field.energy += energy
loc = null
else if(istype(A, /obj/effect/fusion_particle_catcher))
var/obj/effect/fusion_particle_catcher/PC = A
if(particle_type && particle_type != "neutron")
if(PC.parent.owned_core.AddParticles(particle_type, 1 + additional_particles))
PC.parent.plasma_temperature += mega_energy
PC.parent.energy += energy
loc = null
return
@@ -62,7 +77,7 @@
var/radiation = (energy*2)
M.apply_effect((radiation*3),IRRADIATE,0)
M.updatehealth()
//M << "\red You feel odd."
//M << "<font color='red'>You feel odd.</font>"
return
+1 -1
View File
@@ -380,7 +380,7 @@
if(src.z in using_map.station_levels)
if(prob(1)) //explosion
for(var/mob/M in viewers(src))
M.show_message("\red The [src.name] is making strange noises!", 3, "\red You hear sizzling electronics.", 2)
M.show_message("<font color='red'>The [src.name] is making strange noises!</font>", 3, "<font color='red'>You hear sizzling electronics.</font>", 2)
sleep(10*pick(4,5,6,7,10,14))
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
smoke.set_up(3, 0, src.loc)
+2 -2
View File
@@ -407,7 +407,7 @@ var/list/solars_list = list()
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
user << "<font color='blue'>The broken glass falls out.</font>"
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
new /obj/item/weapon/material/shard( src.loc )
var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A )
@@ -420,7 +420,7 @@ var/list/solars_list = list()
A.anchored = 1
qdel(src)
else
user << "\blue You disconnect the monitor."
user << "<font color='blue'>You disconnect the monitor.</font>"
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A )
for (var/obj/C in src)
@@ -6,12 +6,12 @@
fire_sound = 'sound/weapons/Taser.ogg'
fire_delay = 10 // Handguns should be inferior to two-handed weapons.
projectile_type = /obj/item/projectile/beam/stun
projectile_type = /obj/item/projectile/beam/stun/med
origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2)
modifystate = "energystun"
firemodes = list(
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="energystun", fire_sound='sound/weapons/Taser.ogg', charge_cost = 240),
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun/med, modifystate="energystun", fire_sound='sound/weapons/Taser.ogg', charge_cost = 240),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="energykill", fire_sound='sound/weapons/Laser.ogg', charge_cost = 480),
)
@@ -50,6 +50,7 @@
name = "advanced energy gun"
desc = "An energy gun with an experimental miniaturized reactor."
icon_state = "nucgunstun"
projectile_type = /obj/item/projectile/beam/stun
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 5, TECH_POWER = 3)
slot_flags = SLOT_BELT
force = 8 //looks heavier than a pistol
+7 -6
View File
@@ -32,13 +32,14 @@
//var/list/icon_keys = list() //keys
//var/list/ammo_states = list() //values
/obj/item/weapon/gun/projectile/New()
/obj/item/weapon/gun/projectile/New(loc, var/starts_loaded = 1)
..()
if(ispath(ammo_type) && (load_method & (SINGLE_CASING|SPEEDLOADER)))
for(var/i in 1 to max_shells)
loaded += new ammo_type(src)
if(ispath(magazine_type) && (load_method & MAGAZINE))
ammo_magazine = new magazine_type(src)
if(starts_loaded)
if(ispath(ammo_type) && (load_method & (SINGLE_CASING|SPEEDLOADER)))
for(var/i in 1 to max_shells)
loaded += new ammo_type(src)
if(ispath(magazine_type) && (load_method & MAGAZINE))
ammo_magazine = new magazine_type(src)
update_icon()
/obj/item/weapon/gun/projectile/consume_next_projectile()
@@ -96,25 +96,25 @@
// return
..()
if (beakers.len)
user << "\blue [src] contains:"
user << "<font color='blue'>[src] contains:</font>"
for(var/obj/item/weapon/reagent_containers/glass/beaker/B in beakers)
if(B.reagents && B.reagents.reagent_list.len)
for(var/datum/reagent/R in B.reagents.reagent_list)
user << "\blue [R.volume] units of [R.name]"
user << "<font color='blue'>[R.volume] units of [R.name]</font>"
/obj/item/weapon/gun/projectile/dartgun/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/reagent_containers/glass))
if(!istype(I, container_type))
user << "\blue [I] doesn't seem to fit into [src]."
user << "<font color='blue'>[I] doesn't seem to fit into [src].</font>"
return
if(beakers.len >= max_beakers)
user << "\blue [src] already has [max_beakers] beakers in it - another one isn't going to fit!"
user << "<font color='blue'>[src] already has [max_beakers] beakers in it - another one isn't going to fit!</font>"
return
var/obj/item/weapon/reagent_containers/glass/beaker/B = I
user.drop_item()
B.loc = src
beakers += B
user << "\blue You slot [B] into [src]."
user << "<font color='blue'>You slot [B] into [src].</font>"
src.updateUsrDialog()
return 1
..()
@@ -0,0 +1,176 @@
////////////// PTR-7 Anti-Materiel Rifle //////////////
/obj/item/weapon/gun/projectile/heavysniper/collapsible
/obj/item/weapon/gun/projectile/heavysniper/collapsible/verb/take_down()
set category = "Object"
set name = "Disassemble Rifle"
var/mob/living/carbon/human/user = usr
if(user.stat)
return
if(chambered)
to_chat(user, "<span class='warning'>You need to empty the rifle to break it down.</span>")
else
collapse_rifle(user)
/obj/item/weapon/gun/projectile/heavysniper/proc/collapse_rifle(mob/user)
to_chat(user, "<span class='warning'>You begin removing \the [src]'s barrel.</span>")
if(do_after(user, 40))
if(user.unEquip(src, force=1))
to_chat(user, "<span class='warning'>You remove \the [src]'s barrel.</span>")
qdel(src)
var/obj/item/barrel = new /obj/item/sniper_rifle_part/barrel(user)
var/obj/item/sniper_rifle_part/assembly = new /obj/item/sniper_rifle_part/trigger_group(user)
var/obj/item/sniper_rifle_part/stock/stock = new(assembly)
assembly.stock = stock
assembly.part_count = 2
assembly.update_build()
user.put_in_any_hand_if_possible(assembly) || assembly.dropInto(user.loc)
user.put_in_any_hand_if_possible(barrel) || barrel.dropInto(user.loc)
/obj/item/sniper_rifle_part
name = "AM rifle part"
desc = "A part of an antimateriel rifle."
w_class = ITEMSIZE_NORMAL
icon = 'icons/obj/gun.dmi'
var/obj/item/sniper_rifle_part/barrel = null
var/obj/item/sniper_rifle_part/stock = null
var/obj/item/sniper_rifle_part/trigger_group = null
var/part_count = 1
/obj/item/sniper_rifle_part/barrel
name = "AM rifle barrel"
icon_state = "heavysniper-barrel"
/obj/item/sniper_rifle_part/barrel/New()
..()
barrel = src
/obj/item/sniper_rifle_part/stock
name = "AM rifle stock"
icon_state = "heavysniper-stock"
/obj/item/sniper_rifle_part/stock/New()
..()
stock = src
/obj/item/sniper_rifle_part/trigger_group
name = "AM rifle trigger assembly"
icon_state = "heavysniper-trig"
/obj/item/sniper_rifle_part/trigger_group/New()
..()
trigger_group = src
/obj/item/sniper_rifle_part/attack_self(mob/user as mob)
if(part_count == 1)
to_chat(user, "<span class='warning'>You can't disassemble this further!</span>")
return
to_chat(user, "<span class='notice'>You start disassembling \the [src].</span>")
if(!do_after(user, 40))
return
to_chat(user, "<span class='notice'>You disassemble \the [src].</span>")
for(var/obj/item/sniper_rifle_part/P in list(barrel, stock, trigger_group))
if(P.barrel != P)
P.barrel = null
if(P.stock != P)
P.stock = null
if(P.trigger_group != P)
P.trigger_group = null
if(P != src)
user.put_in_any_hand_if_possible(P) || P.dropInto(loc)
P.part_count = 1
update_build()
/obj/item/sniper_rifle_part/attackby(var/obj/item/sniper_rifle_part/A as obj, mob/user as mob)
to_chat(user, "<span class='notice'>You begin adding \the [A] to \the [src].</span>")
if(!do_after(user, 30))
return
if(istype(A, /obj/item/sniper_rifle_part/trigger_group))
if(A.part_count > 1 && src.part_count > 1)
to_chat(user, "<span class='warning'>Disassemble one of these parts first!</span>")
return
if(!trigger_group)
if(user.unEquip(A, force=1))
trigger_group = A
else
to_chat(user, "<span class='warning'>There's already a trigger group!</span>")
return
else if(istype(A, /obj/item/sniper_rifle_part/barrel))
if(!barrel)
if(user.unEquip(A, force=1))
barrel = A
else
to_chat(user, "<span class='warning'>There's already a barrel!</span>")
return
else if(istype(A, /obj/item/sniper_rifle_part/stock))
if(!stock)
if(user.unEquip(A, force=1))
stock = A
else
to_chat(user, "<span class='warning'>There's already a stock!</span>")
return
A.forceMove(src)
to_chat(user, "<span class='notice'>You install \the [A].</span>")
if(A.barrel && !src.barrel)
src.barrel = A.barrel
if(A.stock && !src.stock)
src.stock = A.stock
if(A.trigger_group && !src.trigger_group)
src.trigger_group = A.trigger_group
part_count = A.part_count + src.part_count
update_build(user)
/obj/item/sniper_rifle_part/proc/update_build()
switch(part_count)
if(1)
name = initial(name)
w_class = ITEMSIZE_NORMAL
icon_state = initial(icon_state)
if(2)
if(barrel && trigger_group)
name = "AM rifle barrel-trigger assembly"
icon_state = "heavysniper-trigbar"
else if(stock && trigger_group)
name = "AM rifle stock-trigger assembly"
icon_state = "heavysniper-trigstock"
else if(stock && barrel)
name = "AM rifle stock-barrel assembly"
icon_state = "heavysniper-barstock"
w_class = ITEMSIZE_LARGE
if(3)
var/obj/item/weapon/gun/projectile/heavysniper/collapsible/gun = new (get_turf(src), 0)
if(usr && istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/user = usr
user.unEquip(src, force=1)
user.put_in_any_hand_if_possible(gun) || gun.dropInto(loc)
qdel(src)
/obj/item/weapon/gun/projectile/heavysniper/update_icon()
if(bolt_open)
icon_state = "heavysniper-open"
else
icon_state = "heavysniper"
@@ -182,3 +182,8 @@
name = "weak stun beam"
icon_state = "stun"
agony = 25
/obj/item/projectile/beam/stun/med
name = "stun beam"
icon_state = "stun"
agony = 35
@@ -41,6 +41,7 @@
/datum/reagent/nutriment/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
switch(alien)
if(IS_DIONA) return
if(IS_UNATHI) removed *= 0.5
if(issmall(M)) removed *= 2 // Small bodymass, more effect from lower volume.
M.heal_organ_damage(0.5 * removed, 0)
@@ -258,7 +258,7 @@
/datum/reagent/oxycodone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.add_chemical_effect(CE_PAINKILLER, 200)
M.eye_blurry += 10
M.eye_blurry = min(M.eye_blurry + 10, 250)
M.Confuse(5)
/datum/reagent/oxycodone/overdose(var/mob/living/carbon/M, var/alien)
@@ -291,6 +291,23 @@
M.adjustToxLoss(5 * removed) // It used to be incredibly deadly due to an oversight. Not anymore!
M.add_chemical_effect(CE_PAINKILLER, 20)
/datum/reagent/hyperzine
name = "Hyperzine"
id = "hyperzine"
description = "Hyperzine is a highly effective, long lasting, muscle stimulant."
taste_description = "bitterness"
reagent_state = LIQUID
color = "#FF3300"
overdose = REAGENTS_OVERDOSE * 0.5
/datum/reagent/hyperzine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_TAJARA)
removed *= 1.25
..()
if(prob(5))
M.emote(pick("twitch", "blink_r", "shiver"))
M.add_chemical_effect(CE_SPEEDBOOST, 1)
/datum/reagent/alkysine
name = "Alkysine"
id = "alkysine"
@@ -352,7 +369,7 @@
I.damage = max(I.damage - removed, 0)
H.Confuse(5)
if(I.damage <= 5 && I.organ_tag == O_EYES)
H.eye_blurry += 10 //Eyes need to reset, or something
H.eye_blurry = min(M.eye_blurry + 10, 250) //Eyes need to reset, or something
H.sdisabilities &= ~BLIND
/datum/reagent/osteodaxon
@@ -391,7 +408,7 @@
/datum/reagent/myelamine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_DIONA)
return
M.eye_blurry += (repair_strength * removed)
M.eye_blurry += min(M.eye_blurry + (repair_strength * removed), 250)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/wound_heal = removed * repair_strength
@@ -43,6 +43,33 @@
color = "#003333"
strength = 10
//R-UST port
// Produced during deuterium synthesis. Super poisonous, SUPER flammable (doesn't need oxygen to burn).
/datum/reagent/toxin/hydrophoron
name = "Hydrophoron"
id = "hydrophoron"
description = "An exceptionally flammable molecule formed from deuterium synthesis."
strength = 80
var/fire_mult = 30
/datum/reagent/toxin/hydrophoron/touch_mob(var/mob/living/L, var/amount)
if(istype(L))
L.adjust_fire_stacks(amount / fire_mult)
/datum/reagent/toxin/hydrophoron/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
M.take_organ_damage(0, removed * 0.1) //being splashed directly with hydrophoron causes minor chemical burns
if(prob(10 * fire_mult))
M.pl_effects()
/datum/reagent/toxin/hydrophoron/touch_turf(var/turf/simulated/T)
if(!istype(T))
return
T.assume_gas("phoron", ceil(volume/2), T20C)
for(var/turf/simulated/floor/target_tile in range(0,T))
target_tile.assume_gas("volatile_fuel", volume/2, 400+T0C)
spawn (0) target_tile.hotspot_expose(700, 400)
remove_self(volume)
/datum/reagent/toxin/spidertoxin
name = "Spidertoxin"
id = "spidertoxin"
@@ -101,24 +128,6 @@
M.adjustOxyLoss(20 * removed)
M.sleeping += 1
/datum/reagent/toxin/hyperzine
name = "Hyperzine"
id = "hyperzine"
description = "Hyperzine is a highly effective, long lasting, muscle stimulant."
taste_description = "bitterness"
reagent_state = LIQUID
color = "#FF3300"
overdose = REAGENTS_OVERDOSE * 0.5
strength = 2
/datum/reagent/toxin/hyperzine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_TAJARA)
removed *= 1.25
..()
if(prob(5))
M.emote(pick("twitch", "blink_r", "shiver"))
M.add_chemical_effect(CE_SPEEDBOOST, 1)
/datum/reagent/toxin/stimm //Homemade Hyperzine
name = "Stimm"
id = "stimm"
@@ -315,7 +324,7 @@
if(istype(H) && (H.species.flags & NO_SCAN))
return
//The original coder comment here wanted it to be "Approx. one mutation per 10 injected/20 ingested/30 touching units"
//The original coder comment here wanted it to be "Approx. one mutation per 10 injected/20 ingested/30 touching units"
//The issue was, it was removed (.2) multiplied by .1, which resulted in a .02% chance per tick to have a mutation occur. Or more accurately, 5000 injected for a single mutation.
//To honor their original idea, let's keep it as 10/20/30 as they wanted... For the most part.
+24 -2
View File
@@ -1895,7 +1895,7 @@
name = "Balloon"
id = "balloon"
result = "balloon"
required_reagents = list("cream" = 1, "curacao" = 1)
required_reagents = list("cream" = 1, "bluecuracao" = 1)
result_amount = 2
/datum/chemical_reaction/drinks/natunabrandy
@@ -1945,4 +1945,26 @@
id = "chrysanthemum"
result = "chrysanthemum"
required_reagents = list("sake" = 1, "melonliquor" = 1)
result_amount = 2
result_amount = 2
//R-UST Port
/datum/chemical_reaction/hyrdophoron
name = "Hydrophoron"
id = "hydrophoron"
result = "hydrophoron"
required_reagents = list("hydrogen" = 1, "phoron" = 1)
inhibitors = list("nitrogen" = 1) //So it doesn't mess with lexorin
result_amount = 2
/datum/chemical_reaction/deuterium
name = "Deuterium"
id = "deuterium"
result = null
required_reagents = list("water" = 10)
catalysts = list("hydrophoron" = 5)
result_amount = 1
/datum/chemical_reaction/deuterium/on_reaction(var/datum/reagents/holder, var/created_volume)
var/turf/T = get_turf(holder.my_atom)
if(istype(T)) new /obj/item/stack/material/deuterium(T, created_volume)
return
+1 -1
View File
@@ -136,7 +136,7 @@ var/global/list/obj/machinery/message_server/message_servers = list()
/obj/machinery/message_server/attack_hand(user as mob)
// user << "\blue There seem to be some parts missing from this server. They should arrive on the station in a few days, give or take a few CentCom delays."
// user << "<font color='blue'>There seem to be some parts missing from this server. They should arrive on the station in a few days, give or take a few CentCom delays.</font>"
user << "You toggle PDA message passing from [active ? "On" : "Off"] to [active ? "Off" : "On"]"
active = !active
update_icon()
+11 -3
View File
@@ -11,7 +11,11 @@
if(istype(fabricator, /obj/machinery/pros_fabricator))
var/obj/machinery/pros_fabricator/prosfab = fabricator
var/obj/item/organ/O = new build_path(newloc)
O.species = all_species["Human"]
if(prosfab.manufacturer)
var/datum/robolimb/manf = all_robolimbs[prosfab.manufacturer]
O.species = all_species["[manf.suggested_species]"]
else
O.species = all_species["Human"]
O.robotize(prosfab.manufacturer)
O.dna = new/datum/dna() //Uuughhhh... why do I have to do this?
O.dna.ResetUI()
@@ -25,7 +29,11 @@
/datum/design/item/prosfab/pros/torso/Fabricate(var/newloc, var/fabricator)
if(istype(fabricator, /obj/machinery/pros_fabricator))
var/obj/machinery/pros_fabricator/prosfab = fabricator
var/mob/living/carbon/human/H = new(newloc,"Human")
var/newspecies = "Human"
if(prosfab.manufacturer)
var/datum/robolimb/manf = all_robolimbs[prosfab.manufacturer]
newspecies = manf.suggested_species
var/mob/living/carbon/human/H = new(newloc,newspecies)
H.stat = DEAD
H.gender = gender
for(var/obj/item/organ/external/EO in H.organs)
@@ -35,7 +43,7 @@
EO.remove_rejuv()
for(var/obj/item/organ/external/O in H.organs)
O.species = all_species["Human"]
O.species = all_species[newspecies]
O.robotize(prosfab.manufacturer)
O.dna = new/datum/dna()
O.dna.ResetUI()
@@ -173,7 +173,7 @@
feedback_inc("alert_keycard_auth_maintRevoke",1)
if("Emergency Response Team")
if(is_ert_blocked())
usr << "\red All emergency response teams are dispatched and can not be called at this time."
usr << "<font color='red'>All emergency response teams are dispatched and can not be called at this time.</font>"
return
trigger_armed_response_team(1)
+6 -6
View File
@@ -4,7 +4,7 @@
req_access = list(access_cent_specops)
/obj/machinery/computer/shuttle_control/specops/attack_ai(user as mob)
user << "\red Access Denied."
user << "<font color='red'>Access Denied.</font>"
return 1
//for shuttles that may use a different docking port at each location
@@ -64,14 +64,14 @@
var/obj/machinery/computer/C = user
if(world.time <= reset_time)
C.visible_message("\blue [using_map.boss_name] will not allow the Special Operations shuttle to launch yet.")
C.visible_message("<font color='blue'>[using_map.boss_name] will not allow the Special Operations shuttle to launch yet.</font>")
if (((world.time - reset_time)/10) > 60)
C.visible_message("\blue [-((world.time - reset_time)/10)/60] minutes remain!")
C.visible_message("<font color='blue'>[-((world.time - reset_time)/10)/60] minutes remain!</font>")
else
C.visible_message("\blue [-(world.time - reset_time)/10] seconds remain!")
C.visible_message("<font color='blue'>[-(world.time - reset_time)/10] seconds remain!</font>")
return
C.visible_message("\blue The Special Operations shuttle will depart in [(specops_countdown_time/10)] seconds.")
C.visible_message("<font color='blue'>The Special Operations shuttle will depart in [(specops_countdown_time/10)] seconds.</font>")
if (location) //returning
radio_announce("THE SPECIAL OPERATIONS SHUTTLE IS PREPARING TO RETURN")
@@ -113,7 +113,7 @@
radio_announce("ALERT: LAUNCH SEQUENCE ABORTED")
if (istype(in_use, /obj/machinery/computer))
var/obj/machinery/computer/C = in_use
C.visible_message("\red Launch sequence aborted.")
C.visible_message("<font color='red'>Launch sequence aborted.</font>")
..()
+7 -7
View File
@@ -171,7 +171,7 @@
return
if (MS.moving_status != SHUTTLE_IDLE)
usr << "\blue [shuttle_tag] vessel is moving."
usr << "<font color='blue'>[shuttle_tag] vessel is moving.</font>"
return
if(href_list["dock_command"])
@@ -184,11 +184,11 @@
if(href_list["start"])
if(MS.at_origin)
usr << "\red You are already at your home base."
usr << "<font color='red'>You are already at your home base.</font>"
return
if((MS.last_move + MS.cooldown*10) > world.time)
usr << "\red The ship's drive is inoperable while the engines are charging."
usr << "<font color='red'>The ship's drive is inoperable while the engines are charging.</font>"
return
if(!check_docking(MS))
@@ -196,7 +196,7 @@
return
if(!MS.return_warning)
usr << "\red Returning to your home base will end your mission. If you are sure, press the button again."
usr << "<font color='red'>Returning to your home base will end your mission. If you are sure, press the button again.</font>"
//TODO: Actually end the mission.
MS.return_warning = 1
return
@@ -209,11 +209,11 @@
if(href_list["toggle_cloak"])
MS.cloaked = !MS.cloaked
usr << "\red Ship stealth systems have been [(MS.cloaked ? "activated. The station will not" : "deactivated. The station will")] be warned of our arrival."
usr << "<font color='red'>Ship stealth systems have been [(MS.cloaked ? "activated. The station will not" : "deactivated. The station will")] be warned of our arrival.</font>"
if(href_list["move_multi"])
if((MS.last_move + MS.cooldown*10) > world.time)
usr << "\red The ship's drive is inoperable while the engines are charging."
usr << "<font color='red'>The ship's drive is inoperable while the engines are charging.</font>"
return
if(!check_docking(MS))
@@ -223,7 +223,7 @@
var/choice = input("Select a destination.") as null|anything in MS.destinations
if(!choice) return
usr << "\blue [shuttle_tag] main computer recieved message."
usr << "<font color='blue'>[shuttle_tag] main computer recieved message.</font>"
if(MS.at_origin)
MS.announce_arrival()
@@ -0,0 +1,251 @@
#define SETUP_OK 1 // All good
#define SETUP_WARNING 2 // Something that shouldn't happen happened, but it's not critical so we will continue
#define SETUP_ERROR 3 // Something bad happened, and it's important so we won't continue setup.
#define SETUP_DELAYED 4 // Wait for other things first.
#define ENERGY_NITROGEN 115 // Roughly 8 emitter shots.
#define ENERGY_CARBONDIOXIDE 150 // Roughly 10 emitter shots.
#define ENERGY_PHORON 300 // Roughly 20 emitter shots. Phoron can take more but this is enough to max out both SMESs anyway.
/datum/admins/proc/setup_supermatter()
set category = "Debug"
set name = "Setup Supermatter"
set desc = "Allows you to start the Supermatter engine."
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
to_chat(usr, "Error: you are not an admin!")
return
var/response = input(usr, "Are you sure? This will start up the engine with selected gas as coolant.", "Engine setup") as null|anything in list("N2", "CO2", "PH", "Abort")
if(!response || response == "Abort")
return
var/errors = 0
var/warnings = 0
var/success = 0
log_and_message_admins("## SUPERMATTER SETUP - Setup initiated by [usr] using coolant type [response].")
// CONFIGURATION PHASE
// Coolant canisters, set types according to response.
for(var/obj/effect/engine_setup/coolant_canister/C in world)
switch(response)
if("N2")
C.canister_type = /obj/machinery/portable_atmospherics/canister/nitrogen/engine_setup/
continue
if("CO2")
C.canister_type = /obj/machinery/portable_atmospherics/canister/carbon_dioxide/engine_setup/
continue
if("PH")
C.canister_type = /obj/machinery/portable_atmospherics/canister/phoron/engine_setup/
continue
for(var/obj/effect/engine_setup/core/C in world)
switch(response)
if("N2")
C.energy_setting = ENERGY_NITROGEN
continue
if("CO2")
C.energy_setting = ENERGY_CARBONDIOXIDE
continue
if("PH")
C.energy_setting = ENERGY_PHORON
continue
for(var/obj/effect/engine_setup/filter/F in world)
F.coolant = response
var/list/delayed_objects = list()
// SETUP PHASE
for(var/obj/effect/engine_setup/S in world)
var/result = S.activate(0)
switch(result)
if(SETUP_OK)
success++
continue
if(SETUP_WARNING)
warnings++
continue
if(SETUP_ERROR)
errors++
log_and_message_admins("## SUPERMATTER SETUP - Error encountered! Aborting.")
break
if(SETUP_DELAYED)
delayed_objects.Add(S)
continue
if(!errors)
for(var/obj/effect/engine_setup/S in delayed_objects)
var/result = S.activate(1)
switch(result)
if(SETUP_OK)
success++
continue
if(SETUP_WARNING)
warnings++
continue
if(SETUP_ERROR)
errors++
log_and_message_admins("## SUPERMATTER SETUP - Error encountered! Aborting.")
break
log_and_message_admins("## SUPERMATTER SETUP - Setup completed with [errors] errors, [warnings] warnings and [success] successful steps.")
return
/obj/effect/engine_setup/
name = "Engine Setup Marker"
desc = "You shouldn't see this."
invisibility = 101
anchored = 1
density = 0
icon = 'icons/mob/screen1.dmi'
icon_state = "x3"
/obj/effect/engine_setup/proc/activate(var/last = 0)
return 1
// Tries to locate a pump, enables it, and sets it to MAX. Triggers warning if unable to locate a pump.
/obj/effect/engine_setup/pump_max/
name = "Pump Setup Marker"
/obj/effect/engine_setup/pump_max/activate()
..()
var/obj/machinery/atmospherics/binary/pump/P = locate() in get_turf(src)
if(!P)
log_and_message_admins("## WARNING: Unable to locate pump at [x] [y] [z]!")
return SETUP_WARNING
P.target_pressure = P.max_pressure_setting
P.use_power = 1
P.update_icon()
return SETUP_OK
// Spawns an empty canister on this turf, if it has a connector port. Triggers warning if unable to find a connector port
/obj/effect/engine_setup/empty_canister/
name = "Empty Canister Marker"
/obj/effect/engine_setup/empty_canister/activate()
..()
var/obj/machinery/atmospherics/portables_connector/P = locate() in get_turf(src)
if(!P)
log_and_message_admins("## WARNING: Unable to locate connector port at [x] [y] [z]!")
return SETUP_WARNING
new/obj/machinery/portable_atmospherics/canister(get_turf(src)) // Canisters automatically connect to connectors in New()
return SETUP_OK
// Spawns a coolant canister on this turf, if it has a connector port.
// Triggers error when unable to locate connector port or when coolant canister type is unset.
/obj/effect/engine_setup/coolant_canister/
name = "Coolant Canister Marker"
var/canister_type = null
/obj/effect/engine_setup/coolant_canister/activate()
..()
var/obj/machinery/atmospherics/portables_connector/P = locate() in get_turf(src)
if(!P)
log_and_message_admins("## ERROR: Unable to locate coolant connector port at [x] [y] [z]!")
return SETUP_ERROR
if(!canister_type)
log_and_message_admins("## ERROR: Canister type unset at [x] [y] [z]!")
return SETUP_ERROR
new canister_type(get_turf(src))
return SETUP_OK
// Energises the supermatter. Errors when unable to locate supermatter.
/obj/effect/engine_setup/core/
name = "Supermatter Core Marker"
var/energy_setting = 0
/obj/effect/engine_setup/core/activate(var/last = 0)
if(!last)
return SETUP_DELAYED
..()
var/obj/machinery/power/supermatter/SM = locate() in get_turf(src)
if(!SM)
log_and_message_admins("## ERROR: Unable to locate supermatter core at [x] [y] [z]!")
return SETUP_ERROR
if(!energy_setting)
log_and_message_admins("## ERROR: Energy setting unset at [x] [y] [z]!")
return SETUP_ERROR
SM.power = energy_setting
return SETUP_OK
// Tries to enable the SMES on max input/output settings. With load balancing it should be fine as long as engine outputs at least ~500kW
/obj/effect/engine_setup/smes/
name = "SMES Marker"
/obj/effect/engine_setup/smes/activate()
..()
var/obj/machinery/power/smes/S = locate() in get_turf(src)
if(!S)
log_and_message_admins("## WARNING: Unable to locate SMES unit at [x] [y] [z]!")
return SETUP_WARNING
S.input_attempt = 1
S.output_attempt = 1
S.input_level = S.input_level_max
S.output_level = S.output_level_max
S.update_icon()
return SETUP_OK
// Sets up filters. This assumes filters are set to filter out N2 back to the core loop by default!
/obj/effect/engine_setup/filter/
name = "Omni Filter Marker"
var/coolant = null
/obj/effect/engine_setup/filter/activate()
..()
var/obj/machinery/atmospherics/omni/filter/F = locate() in get_turf(src)
if(!F)
log_and_message_admins("## WARNING: Unable to locate omni filter at [x] [y] [z]!")
return SETUP_WARNING
if(!coolant)
log_and_message_admins("## WARNING: No coolant type set at [x] [y] [z]!")
return SETUP_WARNING
// Non-nitrogen coolant, adjust the filter's config first.
if(coolant != "N2")
for(var/datum/omni_port/P in F.ports)
if(P.mode != ATM_N2)
continue
if(coolant == "PH")
P.mode = ATM_P
break
else if(coolant == "CO2")
P.mode = ATM_CO2
break
else
log_and_message_admins("## WARNING: Inapropriate filter coolant type set at [x] [y] [z]!")
return SETUP_WARNING
F.rebuild_filtering_list()
F.use_power = 1
F.update_icon()
return SETUP_OK
#undef SETUP_OK
#undef SETUP_WARNING
#undef SETUP_ERROR
#undef SETUP_DELAYED
#undef ENERGY_NITROGEN
#undef ENERGY_CARBONDIOXIDE
#undef ENERGY_PHORON
+4
View File
@@ -25,6 +25,10 @@
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
var/obj/item/organ/external/P = target.organs_by_name[E.parent_organ]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected)
user << "<span class='warning'>Something is in the way! You can't attach [E] here!</span>"
return 0
if(!P)
user << "<span class='warning'>There's nothing to attach [E] to!</span>"
return 0
+1 -1
View File
@@ -17,4 +17,4 @@
I.loc = src.loc
for(var/mob/O in hearers(src, null))
O.show_message("\icon[src] \blue The [src.name] beeps", 2)
O.show_message("\icon[src] <font color='blue'>The [src.name] beeps.</font>", 2)

Some files were not shown because too many files have changed in this diff Show More