Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into xenoarch

Conflicts:
	baystation12.dme
	code/WorkInProgress/Cael_Aislinn/ShieldGen/energy_field.dm
	icons/obj/device.dmi

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2013-02-25 14:30:00 +10:00
141 changed files with 10412 additions and 8264 deletions
@@ -2,6 +2,7 @@ var/global/current_date_string
var/global/num_financial_terminals = 1
var/global/datum/money_account/station_account
var/global/next_account_number = 0
var/global/obj/machinery/account_database/centcomm_account_db
/proc/create_station_account()
if(!station_account)
@@ -11,13 +12,13 @@ var/global/next_account_number = 0
station_account.owner_name = "[station_name()] Station Account"
station_account.account_number = rand(111111, 999999)
station_account.remote_access_pin = rand(1111, 111111)
station_account.money = 10000
station_account.money = 75000
//create an entry in the account transaction log for when it was created
var/datum/transaction/T = new()
T.target_name = station_account.owner_name
T.purpose = "Account creation"
T.amount = 10000
T.amount = 75000
T.date = "2nd April, 2555"
T.time = "11:24"
T.source_terminal = "Biesel GalaxyNet Terminal #277"
@@ -266,11 +267,12 @@ var/global/next_account_number = 0
R.overlays += stampoverlay
R.stamps += "<HR><i>This paper has been stamped by the Accounts Database.</i>"
//add the account
M.transaction_log.Add(T)
accounts.Add(M)
return M
/obj/machinery/account_database/proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount)
for(var/datum/money_account/D in accounts)
if(D.account_number == attempt_account_number)
@@ -1,8 +1,8 @@
/obj/item/weapon/eftpos
/obj/item/device/eftpos
name = "EFTPOS scanner"
desc = "Swipe your ID card to pay electronically."
icon = 'icons/obj/library.dmi'
icon_state = "scanner"
desc = "Swipe your ID card to make purchases electronically."
icon = 'icons/obj/device.dmi'
icon_state = "eftpos"
var/machine_id = ""
var/eftpos_name = "Default EFTPOS scanner"
var/transaction_locked = 0
@@ -13,23 +13,24 @@
var/obj/machinery/account_database/linked_db
var/datum/money_account/linked_account
/obj/item/weapon/eftpos/New()
/obj/item/device/eftpos/New()
..()
machine_id = "[station_name()] EFTPOS #[num_financial_terminals++]"
access_code = rand(1111,111111)
reconnect_database()
print_reference()
spawn(0)
print_reference()
//by default, connect to the station account
//the user of the EFTPOS device can change the target account though, and no-one will be the wiser (except whoever's being charged)
linked_account = station_account
/obj/item/weapon/eftpos/proc/print_reference()
var/obj/item/weapon/paper/R = new(get_turf(src))
/obj/item/device/eftpos/proc/print_reference()
var/obj/item/weapon/paper/R = new(src.loc)
R.name = "Reference: [eftpos_name]"
R.info = "<b>[eftpos_name] reference</b><br><br>"
R.info += "Access code: [access_code]<br><br>"
R.info += "<b>Do not lose this code, or the device will have to be replaced.</b><br>"
R.info += "<b>Do not lose or misplace this code.</b><br>"
//stamp the paper
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
@@ -39,14 +40,18 @@
R.stamped += /obj/item/weapon/stamp
R.overlays += stampoverlay
R.stamps += "<HR><i>This paper has been stamped by the EFTPOS device.</i>"
var/obj/item/smallDelivery/D = new(R.loc)
R.loc = D
D.wrapped = R
D.name = "small parcel - 'EFTPOS access code'"
/obj/item/weapon/eftpos/proc/reconnect_database()
/obj/item/device/eftpos/proc/reconnect_database()
for(var/obj/machinery/account_database/DB in world)
if(DB.z == src.z)
linked_db = DB
break
/obj/item/weapon/eftpos/attack_self(mob/user as mob)
/obj/item/device/eftpos/attack_self(mob/user as mob)
if(get_dist(src,user) <= 1)
var/dat = "<b>[eftpos_name]</b><br>"
dat += "<i>This terminal is</i> [machine_id]. <i>Report this code when contacting NanoTrasen IT Support</i><br>"
@@ -67,48 +72,62 @@
dat += "Transaction purpose: <a href='?src=\ref[src];choice=trans_purpose'>[transaction_purpose]</a><br>"
dat += "Value: <a href='?src=\ref[src];choice=trans_value'>$[transaction_amount]</a><br>"
dat += "Linked account: <a href='?src=\ref[src];choice=link_account'>[linked_account ? linked_account.owner_name : "None"]</a><hr>"
dat += "<a href='?src=\ref[src];choice=change_code'>Change access code</a>"
dat += "<a href='?src=\ref[src];choice=change_code'>Change access code</a><br>"
dat += "<a href='?src=\ref[src];choice=change_id'>Change EFTPOS ID</a><br>"
dat += "Scan card to reset access code <a href='?src=\ref[src];choice=reset'>\[------\]</a>"
user << browse(dat,"window=eftpos")
else
user << browse(null,"window=eftpos")
/obj/item/weapon/eftpos/attackby(O as obj, user as mob)
/obj/item/device/eftpos/attackby(O as obj, user as mob)
if(istype(O, /obj/item/weapon/card))
//attempt to connect to a new db, and if that doesn't work then fail
if(!linked_db)
reconnect_database()
if(linked_db && linked_account)
var/obj/item/weapon/card/I = O
scan_card(I)
if(linked_db)
if(linked_account)
var/obj/item/weapon/card/I = O
scan_card(I)
else
usr << "\icon[src]<span class='warning'>Unable to connect to linked account.</span>"
else
usr << "\icon[src]<span class='warning'>Unable to connect to accounts database.</span>"
else
..()
/obj/item/weapon/eftpos/Topic(var/href, var/href_list)
/obj/item/device/eftpos/Topic(var/href, var/href_list)
if(href_list["choice"])
switch(href_list["choice"])
if("change_code")
var/attempt_code = text2num(input("Re-enter the current EFTPOS access code", "Confirm old EFTPOS code"))
var/attempt_code = input("Re-enter the current EFTPOS access code", "Confirm old EFTPOS code") as num
if(attempt_code == access_code)
access_code = text2num(input("Enter a new access code for this device", "Enter new EFTPOS code"))
access_code = input("Enter a new access code for this device", "Enter new EFTPOS code") as num
print_reference()
else
usr << "\icon[src]<span class='warning'>Incorrect code entered.</span>"
if("change_id")
var/attempt_code = text2num(input("Re-enter the current EFTPOS access code", "Confirm EFTPOS code"))
if(attempt_code == access_code)
eftpos_name = input("Enter a new terminal ID for this device", "Enter new EFTPOS ID") + " EFTPOS scanner"
print_reference()
else
usr << "\icon[src]<span class='warning'>Incorrect code entered.</span>"
if("link_account")
if(!linked_db)
reconnect_database()
if(linked_db)
var/attempt_account_num = text2num(input("Enter account number to pay EFTPOS charges into", "New account number"))
var/attempt_pin = text2num(input("Enter pin code", "Account pin"))
var/attempt_account_num = input("Enter account number to pay EFTPOS charges into", "New account number") as num
var/attempt_pin = input("Enter pin code", "Account pin") as num
linked_account = linked_db.attempt_account_access(attempt_account_num, attempt_pin, 1)
else
usr << "<span class='warning'>Unable to connect to accounts database.</span>"
usr << "\icon[src]<span class='warning'>Unable to connect to accounts database.</span>"
if("trans_purpose")
transaction_purpose = input("Enter reason for EFTPOS transaction", "Transaction purpose")
if("trans_value")
transaction_amount = max(text2num(input("Enter amount for EFTPOS transaction", "Transaction amount")),0)
transaction_amount = input("Enter amount for EFTPOS transaction", "Transaction amount") as num
if("toggle_lock")
if(transaction_locked)
var/attempt_code = text2num(input("Enter EFTPOS access code", "Reset Transaction"))
var/attempt_code = input("Enter EFTPOS access code", "Reset Transaction") as num
if(attempt_code == access_code)
transaction_locked = 0
transaction_paid = 0
@@ -126,16 +145,27 @@
scan_card(I)
else
usr << "\icon[src]<span class='warning'>Unable to link accounts.</span>"
if("reset")
//reset the access code - requires HoP/captain access
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card))
var/obj/item/weapon/card/id/C = I
if(access_cent_captain in C.access || access_hop in C.access || access_captain in C.access)
access_code = 0
usr << "\icon[src]<span class='info'>Access code reset to 0.</span>"
else if (istype(I, /obj/item/weapon/card/emag))
access_code = 0
usr << "\icon[src]<span class='info'>Access code reset to 0.</span>"
src.attack_self(usr)
/obj/item/weapon/eftpos/proc/scan_card(var/obj/item/weapon/card/I)
/obj/item/device/eftpos/proc/scan_card(var/obj/item/weapon/card/I)
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
if(transaction_locked && !transaction_paid)
if(linked_account)
var/attempt_pin = text2num(input("Enter pin code", "EFTPOS transaction"))
var/attempt_pin = input("Enter pin code", "EFTPOS transaction") as num
var/datum/money_account/D = linked_db.attempt_account_access(C.associated_account_number, attempt_pin, 2)
if(D)
if(transaction_amount <= D.money)
@@ -149,9 +179,12 @@
//create entries in the two account transaction logs
var/datum/transaction/T = new()
T.target_name = "[linked_account.owner_name] ([eftpos_name])"
T.target_name = "[linked_account.owner_name] (via [eftpos_name])"
T.purpose = transaction_purpose
T.amount = "([transaction_amount])"
if(transaction_amount > 0)
T.amount = "([transaction_amount])"
else
T.amount = "[transaction_amount]"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
@@ -168,9 +201,9 @@
else
usr << "\icon[src]<span class='warning'>You don't have that much money!<span>"
else
usr << "\icon[src]<span class='warning'>EFTPOS is not connected to an account.<span>"
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
else
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
usr << "\icon[src]<span class='warning'>EFTPOS is not connected to an account.<span>"
else
..()
@@ -0,0 +1,120 @@
//////////////////////////////////////
// RUST Core Control computer
/obj/item/weapon/circuitboard/rust_core_control
name = "Circuit board (RUST core controller)"
build_path = "/obj/machinery/computer/rust_core_control"
origin_tech = "programming=3;engineering=4"
datum/design/rust_core_control
name = "Circuit Design (RUST core controller)"
desc = "Allows for the construction of circuit boards used to build a core control console for the RUST fusion engine."
id = "rust_core_control"
req_tech = list("programming" = 3, "engineering" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20)
build_path = "/obj/item/weapon/circuitboard/rust_core_control"
//////////////////////////////////////
// RUST Fuel Control computer
/obj/item/weapon/circuitboard/rust_fuel_control
name = "Circuit board (RUST fuel controller)"
build_path = "/obj/machinery/computer/rust_fuel_control"
origin_tech = "programming=3;engineering=4"
datum/design/rust_fuel_control
name = "Circuit Design (RUST fuel controller)"
desc = "Allows for the construction of circuit boards used to build a fuel injector control console for the RUST fusion engine."
id = "rust_fuel_control"
req_tech = list("programming" = 3, "engineering" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20)
build_path = "/obj/item/weapon/circuitboard/rust_fuel_control"
//////////////////////////////////////
// RUST Fuel Port board
/obj/item/weapon/module/rust_fuel_port
name = "Internal circuitry (RUST fuel port)"
icon_state = "card_mod"
origin_tech = "engineering=4;materials=5"
datum/design/rust_fuel_port
name = "Internal circuitry (RUST fuel port)"
desc = "Allows for the construction of circuit boards used to build a fuel injection port for the RUST fusion engine."
id = "rust_fuel_port"
req_tech = list("engineering" = 4, "materials" = 5)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20, "$uranium" = 3000)
build_path = "/obj/item/weapon/module/rust_fuel_port"
//////////////////////////////////////
// RUST Fuel Compressor board
/obj/item/weapon/module/rust_fuel_compressor
name = "Internal circuitry (RUST fuel compressor)"
icon_state = "card_mod"
origin_tech = "materials=7;plasmatech=4"
datum/design/rust_fuel_compressor
name = "Circuit Design (RUST fuel compressor)"
desc = "Allows for the construction of circuit boards used to build a fuel compressor of the RUST fusion engine."
id = "rust_fuel_compressor"
req_tech = list("materials" = 7, "plasmatech" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$diamond" = 1000)
build_path = "/obj/item/weapon/module/rust_fuel_compressor"
//////////////////////////////////////
// RUST Tokamak Core board
/obj/item/weapon/circuitboard/rust_core
name = "Internal circuitry (RUST tokamak core)"
build_path = "/obj/machinery/power/rust_core"
board_type = "machine"
origin_tech = "bluespace=3;plasmatech=4;magnets=5;materials=6;powerstorage=6"
frame_desc = "Requires 2 Pico Manipulators, 1 Ultra Micro-Laser, 5 Pieces of Cable, 1 Subspace Crystal and 1 Console Screen."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
"/obj/item/weapon/stock_parts/micro_laser/ultra" = 1,
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/cable_coil" = 5)
datum/design/rust_core
name = "Internal circuitry (RUST tokamak core)"
desc = "The circuit board that for a RUST-pattern tokamak fusion core."
id = "pacman"
req_tech = list(bluespace = 3, plasmatech = 4, magnets = 5, materials = 6, powerstorage = 6)
build_type = IMPRINTER
reliability_base = 79
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$diamond" = 2000)
build_path = "/obj/item/weapon/circuitboard/rust_core"
//////////////////////////////////////
// RUST Fuel Injector board
/obj/item/weapon/circuitboard/rust_injector
name = "Internal circuitry (RUST fuel injector)"
build_path = "/obj/machinery/power/rust_fuel_injector"
board_type = "machine"
origin_tech = "powerstorage=3;engineering=4;plasmatech=4;materials=6"
frame_desc = "Requires 2 Pico Manipulators, 1 Phasic Scanning Module, 1 Super Matter Bin, 1 Console Screen and 5 Pieces of Cable."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
"/obj/item/weapon/stock_parts/scanning_module/phasic" = 1,
"/obj/item/weapon/stock_parts/matter_bin/super" = 1,
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/cable_coil" = 5)
datum/design/rust_injector
name = "Internal circuitry (RUST tokamak core)"
desc = "The circuit board that for a RUST-pattern particle accelerator."
id = "pacman"
req_tech = list(powerstorage = 3, engineering = 4, plasmatech = 4, materials = 6)
build_type = IMPRINTER
reliability_base = 79
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$uranium" = 2000)
build_path = "/obj/item/weapon/circuitboard/rust_core"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

@@ -0,0 +1,142 @@
/obj/machinery/computer/rust_core_control
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
icon_state = "core"
var/list/connected_devices = list()
var/id_tag = "allan remember to update this before you leave"
var/scan_range = 25
//currently viewed
var/obj/machinery/power/rust_core/cur_viewed_device
/obj/machinery/computer/rust_core_control/process()
if(stat & (BROKEN|NOPOWER))
return
/obj/machinery/computer/rust_core_control/attack_ai(mob/user)
attack_hand(user)
/obj/machinery/computer/rust_core_control/attack_hand(mob/user)
add_fingerprint(user)
interact(user)
/obj/machinery/computer/rust_core_control/interact(mob/user)
if(stat & BROKEN)
user.unset_machine()
user << browse(null, "window=core_control")
return
if (!istype(user, /mob/living/silicon) && (get_dist(src, user) > 1 ))
user.unset_machine()
user << browse(null, "window=core_control")
return
var/dat = ""
if(stat & NOPOWER)
dat += "<i>The console is dark and nonresponsive.</i>"
else
dat += "<B>Reactor Core Primary Monitor</B><BR>"
if(cur_viewed_device && cur_viewed_device.stat & (BROKEN|NOPOWER))
cur_viewed_device = null
if(cur_viewed_device && !cur_viewed_device.remote_access_enabled)
cur_viewed_device = null
if(cur_viewed_device)
dat += "<b>Device tag:</b> [cur_viewed_device.id_tag ? cur_viewed_device.id_tag : "UNSET"]<br>"
dat += "<font color=blue>Device [cur_viewed_device.owned_field ? "activated" : "deactivated"].</font><br>"
dat += "<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];toggle_active=1'>\[Bring field [cur_viewed_device.owned_field ? "offline" : "online"]\]</a><br>"
dat += "<b>Device [cur_viewed_device.anchored ? "secured" : "unsecured"].</b><br>"
dat += "<hr>"
dat += "<b>Field encumbrance:</b> [cur_viewed_device.owned_field ? 0 : "NA"]<br>"
dat += "<b>Field strength:</b> [cur_viewed_device.field_strength] Wm^3<br>"
dat += "<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=-1000'>\[----\]</a> \
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=-100'>\[--- \]</a> \
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=-10'>\[-- \]</a> \
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=-1'>\[- \]</a> \
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=1'>\[+ \]</a> \
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=10'>\[++ \]</a> \
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=100'>\[+++ \]</a> \
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];str=1000'>\[++++\]</a><br>"
dat += "<b>Field frequency:</b> [cur_viewed_device.field_frequency] MHz<br>"
dat += "<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=-1000'>\[----\]</a> \
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=-100'>\[--- \]</a> \
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=-10'>\[-- \]</a> \
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=-1'>\[- \]</a> \
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=1'>\[+ \]</a> \
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=10'>\[++ \]</a> \
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=100'>\[+++ \]</a> \
<a href='?src=\ref[cur_viewed_device];extern_update=\ref[src];freq=1000'>\[++++\]</a><br>"
var/power_stat = "Good"
if(cur_viewed_device.cached_power_avail < cur_viewed_device.active_power_usage)
power_stat = "Insufficient"
else if(cur_viewed_device.cached_power_avail < cur_viewed_device.active_power_usage * 2)
power_stat = "Check"
dat += "<b>Power status:</b> [power_stat]<br>"
else
dat += "<a href='?src=\ref[src];scan=1'>\[Refresh device list\]</a><br><br>"
if(connected_devices.len)
dat += "<table width='100%' border=1>"
dat += "<tr>"
dat += "<td><b>Device tag</b></td>"
dat += "<td></td>"
dat += "</tr>"
for(var/obj/machinery/power/rust_core/C in connected_devices)
if(!check_core_status(C))
connected_devices.Remove(C)
continue
dat += "<tr>"
dat += "<td>[C.id_tag]</td>"
dat += "<td><a href='?src=\ref[src];manage_individual=\ref[C]'>\[Manage\]</a></td>"
dat += "</tr>"
dat += "</table>"
else
dat += "No devices connected.<br>"
dat += "<hr>"
dat += "<a href='?src=\ref[src];refresh=1'>Refresh</a> "
dat += "<a href='?src=\ref[src];close=1'>Close</a>"
user << browse(dat, "window=core_control;size=500x400")
onclose(user, "core_control")
user.set_machine(src)
/obj/machinery/computer/rust_core_control/Topic(href, href_list)
..()
if( href_list["goto_scanlist"] )
cur_viewed_device = null
if( href_list["manage_individual"] )
cur_viewed_device = locate(href_list["manage_individual"])
if( href_list["scan"] )
connected_devices = list()
for(var/obj/machinery/power/rust_core/C in range(scan_range, src))
if(check_core_status(C))
connected_devices.Add(C)
if( href_list["startup"] )
if(cur_viewed_device)
cur_viewed_device.Startup()
if( href_list["shutdown"] )
if(cur_viewed_device)
cur_viewed_device.Shutdown()
if( href_list["close"] )
usr << browse(null, "window=core_control")
usr.unset_machine()
updateDialog()
/obj/machinery/computer/rust_core_control/proc/check_core_status(var/obj/machinery/power/rust_core/C)
if(!C)
return 0
if(C.stat & (BROKEN|NOPOWER) || !C.remote_access_enabled || !C.id_tag)
if(connected_devices.Find(C))
connected_devices.Remove(C)
return 0
return 1
File diff suppressed because it is too large Load Diff
+226 -59
View File
@@ -40,80 +40,247 @@ max volume of plasma storeable by the field = the total volume of a number of ti
*/
/obj/machinery/rust/core
name = "Tokamak core"
#define MAX_FIELD_FREQ 1000
#define MIN_FIELD_FREQ 1
#define MAX_FIELD_STR 1000
#define MIN_FIELD_STR 1
/obj/machinery/power/rust_core
name = "RUST Tokamak core"
desc = "Enormous solenoid for generating extremely high power electromagnetic fields"
icon = 'core.dmi'
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
icon_state = "core0"
anchored = 1
var/on = 0
var/obj/machinery/rust/em_field/owned_field
var/field_strength = 0.01
//
density = 1
var/obj/effect/rust_em_field/owned_field
var/field_strength = 1//0.01
var/field_frequency = 1
var/id_tag = "allan, don't forget to set the ID of this one too"
req_access = list(access_engine)
//
use_power = 1
idle_power_usage = 10
active_power_usage = 300
idle_power_usage = 50
active_power_usage = 500 //multiplied by field strength
var/cached_power_avail = 0
directwired = 1
var/state = 0
var/locked = 0
var/remote_access_enabled = 1
Topic(href, href_list)
..()
if( href_list["startup"] )
Startup()
return
if( href_list["shutdown"] )
Shutdown()
return
if( href_list["modify_field_strength"] )
var/new_field_str = text2num(input("Enter new field strength", "Modifying field strength", owned_field.field_strength))
if(!new_field_str)
usr << "\red That's not a valid number."
return
field_strength = max(new_field_str,0.1)
field_strength = min(new_field_str,50)
if(owned_field)
owned_field.ChangeFieldStrength(field_strength)
return
/obj/machinery/power/rust_core/process()
if(stat & BROKEN || !powernet)
Shutdown()
proc/Startup()
cached_power_avail = avail()
//luminosity = round(owned_field.field_strength/10)
//luminosity = max(luminosity,1)
/obj/machinery/power/rust_core/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/wrench))
if(owned_field)
user << "Turn off [src] first."
return
on = 1
owned_field = new(src.loc)
switch(state)
if(0)
state = 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user.visible_message("[user.name] secures [src.name] to the floor.", \
"You secure the external reinforcing bolts to the floor.", \
"You hear a ratchet")
src.anchored = 1
if(1)
state = 0
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \
"You undo the external reinforcing bolts.", \
"You hear a ratchet")
src.anchored = 0
if(2)
user << "\red The [src.name] needs to be unwelded from the floor."
return
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(owned_field)
user << "Turn off the [src] first."
return
switch(state)
if(0)
user << "\red The [src.name] needs to be wrenched to the floor."
if(1)
if (WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
"You start to weld the [src] to the floor.", \
"You hear welding")
if (do_after(user,20))
if(!src || !WT.isOn()) return
state = 2
user << "You weld the [src] to the floor."
connect_to_network()
src.directwired = 1
else
user << "\red You need more welding fuel to complete this task."
if(2)
if (WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
"You start to cut the [src] free from the floor.", \
"You hear welding")
if (do_after(user,20))
if(!src || !WT.isOn()) return
state = 1
user << "You cut the [src] free from the floor."
disconnect_from_network()
src.directwired = 0
else
user << "\red You need more welding fuel to complete this task."
return
if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))
if(emagged)
user << "\red The lock seems to be broken"
return
if(src.allowed(user))
if(owned_field)
src.locked = !src.locked
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 online"
else
user << "\red Access denied."
return
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
locked = 0
emagged = 1
user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.")
return
..()
return
/obj/machinery/power/rust_core/attack_ai(mob/user)
attack_hand(user)
/obj/machinery/power/rust_core/attack_hand(mob/user)
add_fingerprint(user)
interact(user)
/obj/machinery/power/rust_core/interact(mob/user)
if(stat & BROKEN)
user.unset_machine()
user << browse(null, "window=core_gen")
return
if(!istype(user, /mob/living/silicon) && get_dist(src, user) > 1)
user.unset_machine()
user << browse(null, "window=core_gen")
return
var/dat = ""
if(!powernet || locked)
dat += "<i>The console is dark and nonresponsive.</i>"
else
dat += "<b>RUST Tokamak pattern Electromagnetic Field Generator</b><br>"
dat += "<b>Device ID tag: </b> [id_tag ? id_tag : "UNSET"] <a href='?src=\ref[src];new_id_tag=1'>\[Modify\]</a><br>"
dat += "<a href='?src=\ref[src];toggle_active=1'>\[[owned_field ? "Deactivate" : "Activate"]\]</a><br>"
dat += "<a href='?src=\ref[src];toggle_remote=1'>\[[remote_access_enabled ? "Disable remote access to this device" : "Enable remote access to this device"]\]</a><br>"
dat += "<hr>"
dat += "<b>Field strength:</b> [field_strength]Wm^3<br>"
dat += "<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=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><br>"
dat += "<b>Field frequency:</b> [field_frequency]MHz<br>"
dat += "<a href='?src=\ref[src];freq=-1000'>\[----\]</a> \
<a href='?src=\ref[src];freq=-100'>\[--- \]</a> \
<a href='?src=\ref[src];freq=-10'>\[-- \]</a> \
<a href='?src=\ref[src];freq=-1'>\[- \]</a> \
<a href='?src=\ref[src];freq=1'>\[+ \]</a> \
<a href='?src=\ref[src];freq=10'>\[++ \]</a> \
<a href='?src=\ref[src];freq=100'>\[+++ \]</a> \
<a href='?src=\ref[src];freq=1000'>\[++++\]</a><br>"
var/font_colour = "green"
if(cached_power_avail < active_power_usage)
font_colour = "red"
else if(cached_power_avail < active_power_usage * 2)
font_colour = "orange"
dat += "<b>Power status:</b> <font color=[font_colour]>[active_power_usage]/[cached_power_avail] W</font><br>"
user << browse(dat, "window=core_gen;size=500x300")
onclose(user, "core_gen")
user.set_machine(src)
/obj/machinery/power/rust_core/Topic(href, href_list)
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 = 5 * field_strength //change to 500 later
if(owned_field)
owned_field.ChangeFieldStrength(field_strength)
icon_state = "core1"
luminosity = 1
return 1
proc/Shutdown()
if(href_list["freq"])
var/dif = text2num(href_list["freq"])
field_frequency = min(max(field_frequency + dif, MIN_FIELD_FREQ), MAX_FIELD_FREQ)
if(owned_field)
owned_field.ChangeFieldFrequency(field_frequency)
if(href_list["toggle_active"])
if(!Startup())
Shutdown()
if( href_list["toggle_remote"] )
remote_access_enabled = !remote_access_enabled
if(href_list["new_id_tag"])
if(usr)
id_tag = input("Enter a new ID tag", "Tokamak core ID tag", id_tag) as text|null
if(href_list["close"])
usr << browse(null, "window=core_gen")
usr.unset_machine()
if(href_list["extern_update"])
var/obj/machinery/computer/rust_core_control/C = locate(href_list["extern_update"])
if(C)
C.updateDialog()
src.updateDialog()
/obj/machinery/power/rust_core/proc/Startup()
if(owned_field)
return
owned_field = new(src.loc)
owned_field.ChangeFieldStrength(field_strength)
owned_field.ChangeFieldFrequency(field_frequency)
icon_state = "core1"
luminosity = 1
use_power = 2
return 1
/obj/machinery/power/rust_core/proc/Shutdown()
//todo: safety checks for field status
if(owned_field)
icon_state = "core0"
on = 0
del(owned_field)
luminosity = 0
use_power = 1
proc/AddParticles(var/name, var/quantity = 1)
if(owned_field)
owned_field.AddParticles(name, quantity)
return 1
return 0
/obj/machinery/power/rust_core/proc/AddParticles(var/name, var/quantity = 1)
if(owned_field)
owned_field.AddParticles(name, quantity)
return 1
return 0
process()
..()
use_power(100 * field_strength + 500)
if(on && !owned_field)
Shutdown()
return
//
luminosity = round(owned_field.field_strength/10)
luminosity = max(luminosity,1)
//
if(stat & (NOPOWER|BROKEN))
Shutdown()
bullet_act(var/obj/item/projectile/Proj)
if(Proj.flag != "bullet" && owned_field)
var/obj/item/projectile/beam/laserbeam = Proj
owned_field.AddEnergy(0, laserbeam.damage / 5000, laserbeam.frequency)
return 0
/obj/machinery/power/rust_core/bullet_act(var/obj/item/projectile/Proj)
if(Proj.flag != "bullet" && owned_field)
owned_field.AddEnergy(Proj.damage, 0, 1)
return 0
@@ -1,77 +0,0 @@
/obj/machinery/computer/rust/radiation_monitor
name = "Core Radiation Monitor"
/obj/machinery/computer/rust/energy_monitor
name = "Core Primary Monitor"
icon_state = "power"
var/obj/machinery/rust/core/core_generator = null
var/updating = 1
New()
..()
spawn(0)
core_generator = locate() in world
Topic(href, href_list)
..()
if( href_list["shutdown"] )
updating = 0
core_generator.Topic(href, href_list)
updateDialog()
updating = 1
return
if( href_list["startup"] )
updating = 0
core_generator.Topic(href, href_list)
updateDialog()
updating = 1
return
if( href_list["modify_field_strength"] )
updating = 0
core_generator.Topic(href, href_list)
updateDialog()
updating = 1
return
if( href_list["close"] )
usr << browse(null, "window=core_monitor")
usr.machine = null
return
process()
..()
if(updating)
src.updateDialog()
interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=core_monitor")
return
var/t = "<B>Reactor Core Primary Monitor</B><BR>"
if(core_generator)
t += "<font color=blue>[core_generator.on ? "Core Generator connected" : "Core Generator operational"]</font><br>"
if(core_generator.owned_field)
t += "<font color=green>Core suspension field online</font> <a href='?src=\ref[src];shutdown=1'>\[Bring field offline\]</a><br>"
t += "Electromagnetic plasma suspension field status:<br>"
t += " <font color=blue>Strength (T): [core_generator.owned_field.field_strength]</font> <a href='?src=\ref[src];modify_field_strength=1'>\[Modify\]</a><br>"
t += " <font color=blue>Energy levels (MeV): [core_generator.owned_field.mega_energy]</font><br>"
t += " <font color=blue>Core frequency: [core_generator.owned_field.frequency]</font><br>"
t += " <font color=blue>Moles of plasma: [core_generator.owned_field.held_plasma.toxins]</font><br>"
t += " <font color=blue>Core temperature: [core_generator.owned_field.held_plasma.temperature]</font><br>"
t += "<hr>"
t += "<b>Core atomic and subatomic constituents:</font></b><br>"
if(core_generator.owned_field.dormant_reactant_quantities && core_generator.owned_field.dormant_reactant_quantities.len)
for(var/reagent in core_generator.owned_field.dormant_reactant_quantities)
t += " <font color=green>[reagent]:</font> [core_generator.owned_field.dormant_reactant_quantities[reagent]]<br>"
else
t += " <font color=blue>No reactants present.</font><br>"
else
t += "<font color=red>Core suspension field offline</font> <a href='?src=\ref[src];startup=1'>\[Bring field online\]</a><br>"
else
t += "<b><font color=red>Core Generator unresponsive</font></b><br>"
t += "<hr>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=core_monitor;size=500x400")
user.machine = src
Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

@@ -1,10 +1,10 @@
/obj/item/weapon/fuel_assembly
icon = 'fuel_assembly.dmi'
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
icon_state = "fuel_assembly"
name = "Fuel Rod Assembly"
var/list/rod_quantities
var/percent_depleted = 0
var/percent_depleted = 1
//
New()
rod_quantities = new/list
Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

@@ -1,31 +1,130 @@
/obj/machinery/rust/fuel_assembly_port
/obj/machinery/rust_fuel_assembly_port
name = "Fuel Assembly Port"
icon = 'fuel_assembly_port.dmi'
icon_state = "port0"
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
icon_state = "port2"
density = 0
var/obj/item/weapon/fuel_assembly/cur_assembly = null
var/obj/item/weapon/fuel_assembly/cur_assembly
layer = 4
var/busy = 0
anchored = 1
attackby(var/obj/item/I, var/mob/user)
if(istype(I,/obj/item/weapon/fuel_assembly))
if(cur_assembly)
del cur_assembly
var/opened = 1 //0=closed, 1=opened
var/has_electronics = 0 // 0 - none, bit 1 - circuitboard, bit 2 - wires
/obj/machinery/rust_fuel_assembly_port/attackby(var/obj/item/I, var/mob/user)
if(istype(I,/obj/item/weapon/fuel_assembly) && !opened)
if(cur_assembly)
user << "\red There is already a fuel rod assembly in there!"
else
cur_assembly = I
user.drop_item()
I.loc = src
icon_state = "port1"
attack_hand(mob/user)
add_fingerprint(user)
/*if(stat & (BROKEN|NOPOWER))
return*/
/obj/machinery/rust_fuel_assembly_port/attack_hand(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER) || opened)
return
if(!busy)
busy = 1
if(cur_assembly)
cur_assembly.loc = src.loc
spawn(30)
if(!try_insert_assembly())
spawn(30)
eject_assembly()
busy = 0
else
busy = 0
else
spawn(30)
try_draw_assembly()
busy = 0
/obj/machinery/rust_fuel_assembly_port/proc/try_insert_assembly()
var/success = 0
if(cur_assembly)
var/turf/check_turf = get_step(get_turf(src), src.dir)
check_turf = get_step(check_turf, src.dir)
for(var/obj/machinery/power/rust_fuel_injector/I in check_turf)
if(I.stat & (BROKEN|NOPOWER))
break
if(I.cur_assembly)
break
I.cur_assembly = cur_assembly
cur_assembly.loc = I
cur_assembly = null
icon_state = "port0"
success = 1
New()
//embed the fuel port into a wall
pixel_x = (dir & 3)? 0 : (dir == 4 ? 24 : -24)
pixel_y = (dir & 3)? (dir ==1 ? 24 : -24) : 0
if(success)
src.visible_message("\blue \icon[src] a green light flashes on [src] as it inserts it's fuel rod assembly into an injector.")
else
src.visible_message("\red \icon[src] a red light flashes on [src] as it attempts to insert it's fuel rod assembly into an injector.")
return success
/obj/machinery/rust_fuel_assembly_port/proc/eject_assembly()
if(cur_assembly)
var/turf/check_turf = get_step(get_turf(src), src.dir)
cur_assembly.loc = check_turf
cur_assembly = null
icon_state = "port0"
return 1
else
src.visible_message("\red \icon[src] a red light flashes on [src] as it attempts to eject it's fuel rod assembly.")
/obj/machinery/rust_fuel_assembly_port/proc/try_draw_assembly()
var/success = 0
if(cur_assembly)
var/turf/check_turf = get_step(get_turf(src), src.dir)
check_turf = get_step(check_turf, src.dir)
for(var/obj/machinery/power/rust_fuel_injector/I in check_turf)
if(I.stat & (BROKEN|NOPOWER))
break
if(!I.cur_assembly)
break
if(I.injecting)
break
if(I.stat != 2)
break
cur_assembly = I.cur_assembly
cur_assembly.loc = src
I.cur_assembly = null
icon_state = "port1"
success = 1
if(success)
src.visible_message("\icon[src] a blue light flashes on [src] as it draws a fuel rod assembly from an injector.")
else
src.visible_message("\red \icon[src] a red light flashes on [src] as it attempts to draw a fuel rod assembly from an injector.")
return success
/*
/obj/machinery/rust_fuel_assembly_port/verb/try_insert_assembly_verb()
set name = "Attempt to insert assembly from port into injector"
set category = "Object"
set src in oview(1)
if(!busy)
try_insert_assembly()
/obj/machinery/rust_fuel_assembly_port/verb/eject_assembly_verb()
set name = "Attempt to eject assembly from port"
set category = "Object"
set src in oview(1)
if(!busy)
eject_assembly()
/obj/machinery/rust_fuel_assembly_port/verb/try_draw_assembly_verb()
set name = "Draw assembly from injector"
set category = "Object"
set src in oview(1)
if(!busy)
try_draw_assembly()
*/
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,133 @@
//frame assembly
/obj/item/rust_fuel_assembly_port_frame
name = "Fuel Assembly Port frame"
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
icon_state = "port2"
w_class = 4
flags = FPRINT | TABLEPASS| CONDUCT
/obj/item/rust_fuel_assembly_port_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 )
del(src)
return
..()
/obj/item/rust_fuel_assembly_port_frame/proc/try_build(turf/on_wall)
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(usr,on_wall)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Port cannot be placed on this spot."
return
if (A.requires_power == 0 || A.name == "Space")
usr << "\red Port cannot be placed in this area."
return
new /obj/machinery/rust_fuel_assembly_port(loc, ndir, 1)
del(src)
//construction steps
/obj/machinery/rust_fuel_assembly_port/New(turf/loc, var/ndir, var/building=0)
..()
// offset 24 pixels in direction of dir
// this allows the APC to be embedded in a wall, yet still inside an area
if (building)
dir = ndir
else
has_electronics = 3
opened = 1
icon_state = "port0"
//20% easier to read than apc code
pixel_x = (dir & 3)? 0 : (dir == 4 ? 32 : -32)
pixel_y = (dir & 3)? (dir ==1 ? 32 : -32) : 0
/obj/machinery/rust_fuel_assembly_port/attackby(obj/item/W, mob/user)
if (istype(user, /mob/living/silicon) && get_dist(src,user)>1)
return src.attack_hand(user)
if (istype(W, /obj/item/weapon/crowbar))
if(opened)
if(has_electronics & 1)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "You begin removing the circuitboard" //lpeters - fixed grammar issues
if(do_after(user, 50))
user.visible_message(\
"\red [user.name] has removed the circuitboard from [src.name]!",\
"\blue You remove the circuitboard.")
has_electronics = 0
new /obj/item/weapon/module/rust_fuel_port(loc)
has_electronics &= ~1
else
opened = 0
icon_state = "port0"
user << "\blue You close the maintenance cover."
else
if(cur_assembly)
user << "\red You cannot open the cover while there is a fuel assembly inside."
else
opened = 1
user << "\blue You open the maintenance cover."
icon_state = "port2"
return
else if (istype(W, /obj/item/weapon/cable_coil) && opened && !(has_electronics & 2))
var/obj/item/weapon/cable_coil/C = W
if(C.amount < 10)
user << "\red You need more wires."
return
user << "You start adding cables to the frame..."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20) && C.amount >= 10)
C.use(10)
user.visible_message(\
"\red [user.name] has added cables to the port frame!",\
"You add cables to the port frame.")
has_electronics &= 2
return
else if (istype(W, /obj/item/weapon/wirecutters) && opened && (has_electronics & 2))
user << "You begin to cut the cables..."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 50))
new /obj/item/weapon/cable_coil(loc,10)
user.visible_message(\
"\red [user.name] cut the cabling inside the port.",\
"You cut the cabling inside the port.")
has_electronics &= ~2
return
else if (istype(W, /obj/item/weapon/module/rust_fuel_port) && opened && !(has_electronics & 1))
user << "You trying to insert the port control board into the frame..."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 10))
has_electronics &= 1
user << "You place the port control board inside the frame."
del(W)
return
else if (istype(W, /obj/item/weapon/weldingtool) && opened && !has_electronics)
var/obj/item/weapon/weldingtool/WT = W
if (WT.get_fuel() < 3)
user << "\blue You need more welding fuel to complete this task."
return
user << "You start welding the port frame..."
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 50))
if(!src || !WT.remove_fuel(3, user)) return
new /obj/item/rust_fuel_assembly_port_frame(loc)
user.visible_message(\
"\red [src] has been cut away from the wall by [user.name].",\
"You detached the port frame.",\
"\red You hear welding.")
del(src)
return
..()
@@ -1,87 +1,113 @@
var/const/max_assembly_amount = 300
/obj/machinery/rust/fuel_compressor
icon = 'fuel_compressor.dmi'
icon_state = "fuel_compressor"
/obj/machinery/rust_fuel_compressor
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
icon_state = "fuel_compressor0"
name = "Fuel Compressor"
var/list/new_assembly_quantities
//
New()
new_assembly_quantities = new/list
spawn(0)
new_assembly_quantities["Deuterium"] = 200
new_assembly_quantities["Tritium"] = 100
//
new_assembly_quantities["Helium-3"] = 0
new_assembly_quantities["Lithium-6"] = 0
new_assembly_quantities["Silver"] = 0
var/compressed_matter = 0
anchored = 1
attack_ai(mob/user)
attack_hand(user)
var/opened = 1 //0=closed, 1=opened
var/locked = 0
var/has_electronics = 0 // 0 - none, bit 1 - circuitboard, bit 2 - wires
attack_hand(mob/user)
add_fingerprint(user)
/*if(stat & (BROKEN|NOPOWER))
return*/
interact(user)
/*power_change()
if(stat & BROKEN)
icon_state = "broken"
else
if( powered() )
icon_state = initial(icon_state)
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = "c_unpowered"
stat |= NOPOWER*/
Topic(href, href_list)
..()
if( href_list["close"] )
usr << browse(null, "window=fuelcomp")
usr.machine = null
return
/obj/machinery/rust_fuel_compressor/New()
new_assembly_quantities = new/list
spawn(0)
new_assembly_quantities["Deuterium"] = 200
new_assembly_quantities["Tritium"] = 100
//
for(var/reagent in new_assembly_quantities)
if(href_list[reagent])
var/new_amount = text2num(input("Enter new rod amount", "Fuel Assembly Rod Composition ([reagent])", new_assembly_quantities[reagent]) as text|null)
if(!new_amount)
usr << "\red That's not a valid number."
return
var/sum_reactants = new_amount - new_assembly_quantities[reagent]
for(var/rod in new_assembly_quantities)
sum_reactants += new_assembly_quantities[rod]
if(sum_reactants > max_assembly_amount)
usr << "\red You have entered too many rods."
else
new_assembly_quantities[reagent] = new_amount
updateDialog()
return
if( href_list["activate"] )
var/obj/item/weapon/fuel_assembly/F = new(src)
//world << "\blue New fuel rod assembly"
for(var/reagent in new_assembly_quantities)
F.rod_quantities[reagent] = new_assembly_quantities[reagent]
//world << "\blue [reagent]: new_assembly_quantities[reagent]<br>"
F.loc = src.loc
new_assembly_quantities["Helium-3"] = 0
new_assembly_quantities["Lithium-6"] = 0
new_assembly_quantities["Silver"] = 0
/obj/machinery/rust_fuel_compressor/attack_ai(mob/user)
attack_hand(user)
/obj/machinery/rust_fuel_compressor/attack_hand(mob/user)
add_fingerprint(user)
/*if(stat & (BROKEN|NOPOWER))
return*/
interact(user)
/obj/machinery/rust_fuel_compressor/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/rcd_ammo))
compressed_matter += 10
del(W)
return
..()
/obj/machinery/rust_fuel_compressor/interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.unset_machine()
user << browse(null, "window=fuelcomp")
return
interact(mob/user)
/*if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=fuelcomp")
return*/
var/t = "<B>Reactor Fuel Rod Compressor / Assembler</B><BR>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
var/t = "<B>Reactor Fuel Rod Compressor / Assembler</B><BR>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
if(locked)
t += "Swipe your ID to unlock this console."
else
t += "Compressed matter in storage: [compressed_matter] <A href='?src=\ref[src];eject_matter=1'>\[Eject all\]</a>"
t += "<A href='?src=\ref[src];activate=1'><b>Activate Fuel Synthesis</b></A><BR> (fuel assemblies require no more than [max_assembly_amount] rods).<br>"
t += "<hr>"
t += "- New fuel assembly constituents:- <br>"
for(var/reagent in new_assembly_quantities)
t += " [reagent] rods: [new_assembly_quantities[reagent]] \[<A href='?src=\ref[src];reagent=1'>Modify</A>\]<br>"
t += "<hr>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=fuelcomp;size=500x800")
user.machine = src
t += " [reagent] rods: [new_assembly_quantities[reagent]] \[<A href='?src=\ref[src];change_reagent=[reagent]'>Modify</A>\]<br>"
t += "<hr>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=fuelcomp;size=500x300")
user.set_machine(src)
//var/locked
//var/coverlocked
/obj/machinery/rust_fuel_compressor/Topic(href, href_list)
..()
if( href_list["close"] )
usr << browse(null, "window=fuelcomp")
usr.machine = null
if( href_list["eject_matter"] )
while(compressed_matter > 10)
new /obj/item/weapon/rcd_ammo(src.loc)
compressed_matter -= 10
src.visible_message("\blue \icon[src] [src] ejects some compressed matter units.")
if( href_list["activate"] )
//world << "\blue New fuel rod assembly"
var/obj/item/weapon/fuel_assembly/F = new(src)
var/fail = 0
var/old_matter = compressed_matter
for(var/reagent in new_assembly_quantities)
var/req_matter = F.rod_quantities[reagent] / 10
if(req_matter <= compressed_matter)
F.rod_quantities[reagent] = new_assembly_quantities[reagent]
compressed_matter -= req_matter
else
fail = 1
break
//world << "\blue [reagent]: new_assembly_quantities[reagent]<br>"
if(fail)
del(F)
compressed_matter = old_matter
src.visible_message("\red \icon[src] [src] flashes red: \'Out of matter.\'")
else
F.loc = src.loc
F.percent_depleted = 0
if( href_list["change_reagent"] )
var/cur_reagent = href_list["change_reagent"]
var/avail_rods = 300
for(var/rod in new_assembly_quantities)
avail_rods -= new_assembly_quantities[rod]
avail_rods += new_assembly_quantities[cur_reagent]
avail_rods = max(avail_rods, 0)
var/new_amount = min(input("Enter new [cur_reagent] rod amount (max [avail_rods])", "Fuel Assembly Rod Composition ([cur_reagent])") as num, avail_rods)
new_assembly_quantities[cur_reagent] = new_amount
updateDialog()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 B

@@ -0,0 +1,160 @@
//frame assembly
/obj/item/rust_fuel_compressor_frame
name = "Fuel Compressor frame"
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
icon_state = "fuel_compressor0"
w_class = 4
flags = FPRINT | TABLEPASS| CONDUCT
/obj/item/rust_fuel_compressor_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 )
del(src)
return
..()
/obj/item/rust_fuel_compressor_frame/proc/try_build(turf/on_wall)
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(usr,on_wall)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Compressor cannot be placed on this spot."
return
if (A.requires_power == 0 || A.name == "Space")
usr << "\red Compressor cannot be placed in this area."
return
new /obj/machinery/rust_fuel_assembly_port(loc, ndir, 1)
del(src)
//construction steps
/obj/machinery/rust_fuel_compressor/New(turf/loc, var/ndir, var/building=0)
..()
// offset 24 pixels in direction of dir
// this allows the APC to be embedded in a wall, yet still inside an area
if (building)
dir = ndir
else
has_electronics = 3
opened = 1
locked = 0
icon_state = "port0"
//20% easier to read than apc code
pixel_x = (dir & 3)? 0 : (dir == 4 ? 32 : -32)
pixel_y = (dir & 3)? (dir ==1 ? 32 : -32) : 0
/obj/machinery/rust_fuel_compressor/attackby(obj/item/W, mob/user)
if (istype(user, /mob/living/silicon) && get_dist(src,user)>1)
return src.attack_hand(user)
if (istype(W, /obj/item/weapon/crowbar))
if(opened)
if(has_electronics & 1)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "You begin removing the circuitboard" //lpeters - fixed grammar issues
if(do_after(user, 50))
user.visible_message(\
"\red [user.name] has removed the circuitboard from [src.name]!",\
"\blue You remove the circuitboard board.")
has_electronics = 0
new /obj/item/weapon/module/rust_fuel_compressor(loc)
has_electronics &= ~1
else
opened = 0
icon_state = "fuel_compressor0"
user << "\blue You close the maintenance cover."
else
if(compressed_matter > 0)
user << "\red You cannot open the cover while there is compressed matter inside."
else
opened = 1
user << "\blue You open the maintenance cover."
icon_state = "fuel_compressor1"
return
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
if(opened)
user << "You must close the cover to swipe an ID card."
else
if(src.allowed(usr))
locked = !locked
user << "You [ locked ? "lock" : "unlock"] the compressor interface."
update_icon()
else
user << "\red Access denied."
return
else if (istype(W, /obj/item/weapon/card/emag) && !emagged) // trying to unlock with an emag card
if(opened)
user << "You must close the cover to swipe an ID card."
else
flick("apc-spark", src)
if (do_after(user,6))
if(prob(50))
emagged = 1
locked = 0
user << "You emag the port interface."
else
user << "You fail to [ locked ? "unlock" : "lock"] the compressor interface."
return
else if (istype(W, /obj/item/weapon/cable_coil) && opened && !(has_electronics & 2))
var/obj/item/weapon/cable_coil/C = W
if(C.amount < 10)
user << "\red You need more wires."
return
user << "You start adding cables to the compressor frame..."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20) && C.amount >= 10)
C.use(10)
user.visible_message(\
"\red [user.name] has added cables to the compressor frame!",\
"You add cables to the port frame.")
has_electronics &= 2
return
else if (istype(W, /obj/item/weapon/wirecutters) && opened && (has_electronics & 2))
user << "You begin to cut the cables..."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 50))
new /obj/item/weapon/cable_coil(loc,10)
user.visible_message(\
"\red [user.name] cut the cabling inside the compressor.",\
"You cut the cabling inside the port.")
has_electronics &= ~2
return
else if (istype(W, /obj/item/weapon/module/rust_fuel_compressor) && opened && !(has_electronics & 1))
user << "You trying to insert the circuitboard into the frame..."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 10))
has_electronics &= 1
user << "You place the circuitboard inside the frame."
del(W)
return
else if (istype(W, /obj/item/weapon/weldingtool) && opened && !has_electronics)
var/obj/item/weapon/weldingtool/WT = W
if (WT.get_fuel() < 3)
user << "\blue You need more welding fuel to complete this task."
return
user << "You start welding the compressor frame..."
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 50))
if(!src || !WT.remove_fuel(3, user)) return
new /obj/item/rust_fuel_assembly_port_frame(loc)
user.visible_message(\
"\red [src] has been cut away from the wall by [user.name].",\
"You detached the compressor frame.",\
"\red You hear welding.")
del(src)
return
..()
@@ -1,172 +1,192 @@
/obj/machinery/computer/rust/fuel_control
/obj/machinery/computer/rust_fuel_control
name = "Fuel Injection Control"
icon_state = "power"
var/list/fuel_injectors
var/list/stage_status
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
icon_state = "fuel"
var/list/connected_injectors = list()
var/list/active_stages = list()
var/list/proceeding_stages = list()
var/list/stage_times = list()
//var/list/stage_status
var/announce_fueldepletion = 0
var/announce_stageprogression = 0
//var/obj/machinery/rust/fuel_injector/Injector = null
New()
..()
//these are the only three stages we can accept
//we have another console for SCRAM
fuel_injectors = new/list
stage_status = new/list
var/scan_range = 25
var/ticks_this_stage = 0
fuel_injectors.Add("One")
fuel_injectors["One"] = new/list
stage_status.Add("One")
stage_status["One"] = 0
fuel_injectors.Add("Two")
fuel_injectors["Two"] = new/list
stage_status.Add("Two")
stage_status["Two"] = 0
fuel_injectors.Add("Three")
fuel_injectors["Three"] = new/list
stage_status.Add("Three")
stage_status["Three"] = 0
fuel_injectors.Add("SCRAM")
fuel_injectors["SCRAM"] = new/list
stage_status.Add("SCRAM")
stage_status["SCRAM"] = 0
/*/obj/machinery/computer/rust_fuel_control/New()
..()
//these are the only three stages we can accept
//we have another console for SCRAM
fuel_injectors = new/list
stage_status = new/list
spawn(0)
for(var/obj/machinery/rust/fuel_injector/Injector in world)
if(Injector.stage in fuel_injectors)
var/list/targetlist = fuel_injectors[Injector.stage]
targetlist.Add(Injector)
fuel_injectors.Add("One")
fuel_injectors["One"] = new/list
stage_status.Add("One")
stage_status["One"] = 0
fuel_injectors.Add("Two")
fuel_injectors["Two"] = new/list
stage_status.Add("Two")
stage_status["Two"] = 0
fuel_injectors.Add("Three")
fuel_injectors["Three"] = new/list
stage_status.Add("Three")
stage_status["Three"] = 0
fuel_injectors.Add("SCRAM")
fuel_injectors["SCRAM"] = new/list
stage_status.Add("SCRAM")
stage_status["SCRAM"] = 0
attack_ai(mob/user)
attack_hand(user)
spawn(0)
for(var/obj/machinery/power/rust_fuel_injector/Injector in world)
if(Injector.stage in fuel_injectors)
var/list/targetlist = fuel_injectors[Injector.stage]
targetlist.Add(Injector)*/
attack_hand(mob/user)
add_fingerprint(user)
/*if(stat & (BROKEN|NOPOWER))
return*/
interact(user)
/obj/machinery/computer/rust_fuel_control/attack_ai(mob/user)
attack_hand(user)
/*updateDialog()
for(var/mob/M in range(1))
if(M.machine == src)
interact(m)*/
/obj/machinery/computer/rust_fuel_control/attack_hand(mob/user)
add_fingerprint(user)
interact(user)
Topic(href, href_list)
..()
if( href_list["close"] )
usr << browse(null, "window=fuel_monitor")
usr.machine = null
return
if( href_list["beginstage"] )
var/stage_name = href_list["beginstage"]
if(stage_name in fuel_injectors)
var/success = 1
for(var/obj/machinery/rust/fuel_injector/Injector in fuel_injectors[stage_name])
if(!Injector.BeginInjecting())
success = 0
if(!success) //may still partially complete
usr << "\red Unable to complete command."
stage_status[stage_name] = 1
updateDialog()
return
if( href_list["begincool"] )
var/stage_name = href_list["begincool"]
if(stage_name in fuel_injectors)
for(var/obj/machinery/rust/fuel_injector/Injector in fuel_injectors[stage_name])
Injector.StopInjecting()
stage_status[stage_name] = 0
updateDialog()
return
if( href_list["restart"] )
updateDialog()
return
if( href_list["cooldown"] )
for(var/stage_name in fuel_injectors)
for(var/obj/machinery/rust/fuel_injector/Injector in fuel_injectors[stage_name])
Injector.StopInjecting()
stage_status[stage_name] = 0
updateDialog()
return
if( href_list["update"] )
updateDialog()
return
//
if( href_list["disable_fueldepletion"] )
announce_fueldepletion = 0
updateDialog()
return
if( href_list["announce_fueldepletion"] )
announce_fueldepletion = 1
updateDialog()
return
if( href_list["broadcast_fueldepletion"] )
announce_fueldepletion = 2
updateDialog()
return
//
if( href_list["disable_stageprogression"] )
announce_stageprogression = 0
updateDialog()
return
if( href_list["announce_stageprogression"] )
announce_stageprogression = 1
updateDialog()
return
if( href_list["broadcast_stageprogression"] )
announce_stageprogression = 2
updateDialog()
return
/obj/machinery/computer/rust_fuel_control/interact(mob/user)
if(stat & (BROKEN|NOPOWER))
user.unset_machine()
user << browse(null, "window=fuel_control")
return
process()
..()
src.updateDialog()
if (!istype(user, /mob/living/silicon) && get_dist(src, user) > 1)
user.unset_machine()
user << browse(null, "window=fuel_control")
return
interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=fuel_monitor")
return
var/t = "<B>Reactor Core Fuel Control</B><BR>"
var/cooling = 0
for(var/stage in stage_status)
if(stage_status[stage])
t += "Fuel injection: <font color=blue>Active</font><br>"
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
cooling = 1
break
if(!cooling)
t += "Fuel injection: <font color=blue>Cooling</font><br>"
t += "----<br>"
//
t += "Fuel depletion announcement: "
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
t += "Stage progression announcement: "
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
t += "<hr>"
t += "<table border=1><tr>"
t += "<td><b>Injector Status</b></td>"
t += "<td><b>Injection interval (sec)</b></td>"
t += "<td><b>Assembly consumption per injection</b></td>"
t += "<td><b>Fuel Assembly Port</b></td>"
t += "<td><b>Assembly depletion percentage</b></td>"
t += "</tr>"
for(var/stage_name in fuel_injectors)
var/list/cur_stage = fuel_injectors[stage_name]
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> [stage_name]</font>, [stage_status[stage_name] ? "<font color=green>Active</font> <a href='?src=\ref[src];begincool=[stage_name]'>\[Enter cooldown\]</a>" : "Cooling <a href='?src=\ref[src];beginstage=[stage_name]'>\[Begin injection\]</a>"]</td></tr>"
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
t += "<tr>"
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.percent_depleted]%" : ""]</td>"
t += "</tr>"
t += "</table>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=fuel_monitor;size=500x600")
user.machine = src
var/dat = "<B>Reactor Core Fuel Control</B><BR>"
/*dat += "<b>Fuel depletion announcement:</b> "
dat += "[announce_fueldepletion == 0 ? "Disabled" : "<a href='?src=\ref[src];announce_fueldepletion=0'>\[Disable\]</a>"] "
dat += "[announce_fueldepletion == 1 ? "Announcing" : "<a href='?src=\ref[src];announce_fueldepletion=1'>\[Announce\]</a>"] "
dat += "[announce_fueldepletion == 2 ? "Broadcasting" : "<a href='?src=\ref[src];announce_fueldepletion=2'>\[Broadcast\]</a>"]<br>"
dat += "<b>Stage progression announcement:</b> "
dat += "[announce_stageprogression == 0 ? "Disabled" : "<a href='?src=\ref[src];announce_stageprogression=0'>\[Disable\]</a>"] "
dat += "[announce_stageprogression == 1 ? "Announcing" : "<a href='?src=\ref[src];announce_stageprogression=1'>\[Announce\]</a>"] "
dat += "[announce_stageprogression == 2 ? "Broadcasting" : "<a href='?src=\ref[src];announce_stageprogression=2'>\[Broadcast\]</a>"]<br>"*/
dat += "<hr>"
dat += "<b>Detected devices</b> <a href='?src=\ref[src];scan=1'>\[Refresh list\]</a>"
dat += "<table border=1 width='100%'>"
dat += "<tr>"
dat += "<td><b>ID</b></td>"
dat += "<td><b>Assembly</b></td>"
dat += "<td><b>Consumption</b></td>"
dat += "<td><b>Depletion</b></td>"
dat += "<td><b>Duration</b></td>"
dat += "<td><b>Next stage</b></td>"
dat += "<td></td>"
dat += "<td></td>"
dat += "</tr>"
for(var/obj/machinery/power/rust_fuel_injector/I in connected_injectors)
dat += "<tr>"
dat += "<td>[I.id_tag]</td>"
if(I.cur_assembly)
dat += "<td><a href='?src=\ref[I];toggle_injecting=1;update_extern=\ref[src]'>\[[I.injecting ? "Halt injecting" : "Begin injecting"]\]</a></td>"
else
dat += "<td>None</td>"
dat += "<td>[I.fuel_usage * 100]%</td>"
if(I.cur_assembly)
dat += "<td>[I.cur_assembly.percent_depleted * 100]%</td>"
else
dat += "<td>NA</td>"
if(stage_times.Find(I.id_tag))
dat += "<td>[ticks_this_stage]/[stage_times[I.id_tag]]s <a href='?src=\ref[src];stage_time=[I.id_tag]'>Modify</td>"
else
dat += "<td>[ticks_this_stage]s <a href='?src=\ref[src];stage_time=[I.id_tag]'>Set</td>"
if(proceeding_stages.Find(I.id_tag))
dat += "<td><a href='?src=\ref[src];set_next_stage=[I.id_tag]'>[proceeding_stages[I.id_tag]]</a></td>"
else
dat += "<td>None <a href='?src=\ref[src];set_next_stage=[I.id_tag]'>\[modify\]</a></td>"
dat += "<td><a href='?src=\ref[src];toggle_stage=[I.id_tag]'>\[[active_stages.Find(I.id_tag) ? "Deactivate stage" : "Activate stage "] \]</a></td>"
dat += "</tr>"
dat += "</table>"
dat += "<hr>"
dat += "<A href='?src=\ref[src];refresh=1'>Refresh</A> "
dat += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(dat, "window=fuel_control;size=800x400")
user.set_machine(src)
/obj/machinery/computer/rust_fuel_control/Topic(href, href_list)
..()
if( href_list["scan"] )
connected_injectors = list()
for(var/obj/machinery/power/rust_fuel_injector/I in range(scan_range, src))
if(check_injector_status(I))
connected_injectors.Add(I)
if( href_list["toggle_stage"] )
var/cur_stage = href_list["toggle_stage"]
if(active_stages.Find(cur_stage))
active_stages.Remove(cur_stage)
for(var/obj/machinery/power/rust_fuel_injector/I in connected_injectors)
if(I.id_tag == cur_stage && check_injector_status(I))
I.StopInjecting()
else
active_stages.Add(cur_stage)
for(var/obj/machinery/power/rust_fuel_injector/I in connected_injectors)
if(I.id_tag == cur_stage && check_injector_status(I))
I.BeginInjecting()
if( href_list["cooldown"] )
for(var/obj/machinery/power/rust_fuel_injector/I in connected_injectors)
if(check_injector_status(I))
I.StopInjecting()
active_stages = list()
if( href_list["warmup"] )
for(var/obj/machinery/power/rust_fuel_injector/I in connected_injectors)
if(check_injector_status(I))
I.BeginInjecting()
if(!active_stages.Find(I.id_tag))
active_stages.Add(I.id_tag)
if( href_list["stage_time"] )
var/cur_stage = href_list["stage_time"]
var/new_duration = input("Enter new stage duration in seconds", "Stage duration") as num
if(new_duration)
stage_times[cur_stage] = new_duration
else if(stage_times.Find(cur_stage))
stage_times.Remove(cur_stage)
if( href_list["announce_fueldepletion"] )
announce_fueldepletion = text2num(href_list["announce_fueldepletion"])
if( href_list["announce_stageprogression"] )
announce_stageprogression = text2num(href_list["announce_stageprogression"])
if( href_list["close"] )
usr << browse(null, "window=fuel_control")
usr.unset_machine()
if( href_list["set_next_stage"] )
var/cur_stage = href_list["set_next_stage"]
if(!proceeding_stages.Find(cur_stage))
proceeding_stages.Add(cur_stage)
var/next_stage = input("Enter next stage ID", "Automated stage procession") as text|null
if(next_stage)
proceeding_stages[cur_stage] = next_stage
else
proceeding_stages.Remove(cur_stage)
updateDialog()
/obj/machinery/computer/rust_fuel_control/proc/check_injector_status(var/obj/machinery/power/rust_fuel_injector/I)
if(!I)
return 0
if(I.stat & (BROKEN|NOPOWER) || !I.remote_access_enabled || !I.id_tag)
if(connected_injectors.Find(I))
connected_injectors.Remove(I)
return 0
return 1
@@ -1,210 +1,289 @@
/obj/machinery/rust/fuel_injector
/obj/machinery/power/rust_fuel_injector
name = "Fuel Injector"
icon = 'fuel_injector.dmi'
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
icon_state = "injector0"
anchored = 1
density = 1
var/obj/machinery/rust/fuel_assembly_port/owned_assembly_port
//var/list/stageone_assemblyports
//var/list/stagetwo_assemblyports
//var/list/scram_assemblyports
var/obj/machinery/rust/reactor_vessel/Vessel = null
var/rate = 10 //microseconds between each cycle
var/fuel_usage = 0.0001 //percentage of available fuel to use per cycle
var/on = 1
var/remote_enabled = 1
var/state = 0
var/locked = 0
var/obj/item/weapon/fuel_assembly/cur_assembly
var/fuel_usage = 0.0001 //percentage of available fuel to use per cycle
var/id_tag = "One"
var/injecting = 0
var/stage = "One"
var/targetting_field = 0
layer = 4
var/trying_to_swap_fuel = 0
//
req_access = list(access_engine)
//
use_power = 1
idle_power_usage = 10
active_power_usage = 300
active_power_usage = 500
var/remote_access_enabled = 1
var/cached_power_avail = 0
var/emergency_insert_ready = 0
//fuel assembly should be embedded into the wall behind the injector
New()
..()
name = "Stage [stage] Fuel Injector"
//pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
//pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
/*
stageone_assemblyports = new/list()
stagetwo_assemblyports = new/list()
scram_assemblyports = new/list()
spawn(1)
Vessel = locate() in range(6,src)
for(var/obj/machinery/rust/fuel_assembly_port/S in range(6,src))
switch(S.stage)
if("One")
stageone_assemblyports.Add(S)
if("Two")
stagetwo_assemblyports.Add(S)
if("SCRAM")
scram_assemblyports.Add(S)
*/
spawn(1)
var/rev_dir = reverse_direction(dir)
var/turf/mid = get_step(src, rev_dir)
for(var/obj/machinery/rust/fuel_assembly_port/port in get_step(mid, rev_dir))
owned_assembly_port = port
//
Topic(href, href_list)
..()
if( href_list["close"] )
usr << browse(null, "window=fuel_injector")
usr.machine = null
return
if( href_list["begin_injecting"] )
BeginInjecting()
updateDialog()
return
if( href_list["end_injecting"] )
/obj/machinery/power/rust_fuel_injector/process()
if(injecting)
if(stat & BROKEN || !powernet)
StopInjecting()
updateDialog()
return
if( href_list["cyclerate"] )
var/new_rate = text2num(input("Enter new injection rate (0.1 - 10 sec)", "Modifying injection rate", rate/10))
if(!new_rate)
usr << "\red That's not a valid number."
return
new_rate = min(new_rate,0.1)
new_rate = max(new_rate,10)
rate = new_rate * 10
updateDialog()
return
if( href_list["fuel_usage"] )
var/new_rate = text2num(input("Enter new fuel usage (1 - 100%)", "Modifying fuel usage", rate/10))
if(!new_rate)
usr << "\red That's not a valid number."
return
new_rate = min(new_rate,0.1)
new_rate = max(new_rate,10)
rate = new_rate * 10
updateDialog()
return
attack_ai(mob/user)
attack_hand(user)
attack_hand(mob/user)
add_fingerprint(user)
/*if(stat & (BROKEN|NOPOWER))
return*/
interact(user)
interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=fuel_injector")
return
var/t = "<B>Reactor Core Fuel Injector</B><hr>"
t += "<b>Stage:</b> <font color=blue>[stage]</font><br>"
t += "<b>Status:</b> [injecting ? "<font color=green>Active</font> <a href='?src=\ref[src];end_injecting=1'>\[Disable\]</a>" : "<font color=blue>Standby</font> <a href='?src=\ref[src];begin_injecting=1'>\[Enable\]</a>"]<br>"
t += "<b>Interval (sec):</b> <font color=blue>[rate/10]</font> <a href='?src=\ref[src];cyclerate=1'>\[Modify\]</a><br>"
t += "<b>Fuel usage:</b> [fuel_usage*100]% <a href='?src=\ref[src];fuel_usage=1'>\[Modify\]</a><br>"
/*
var/t = "<B>Reactor Core Fuel Control</B><BR>"
t += "Current fuel injection stage: [active_stage]<br>"
if(active_stage == "Cooling")
//t += "<a href='?src=\ref[src];restart=1;'>Restart injection cycle</a><br>"
t += "----<br>"
else
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
t += "Fuel depletion announcement: "
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
t += "Stage progression announcement: "
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
t += "<hr>"
t += "<table border=1><tr>"
t += "<td><b>Injector Status</b></td>"
t += "<td><b>Injection interval (sec)</b></td>"
t += "<td><b>Assembly consumption per injection</b></td>"
t += "<td><b>Fuel Assembly Port</b></td>"
t += "<td><b>Assembly depletion percentage</b></td>"
t += "</tr>"
for(var/stage in fuel_injectors)
var/list/cur_stage = fuel_injectors[stage]
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> <font color=blue>[stage]</font> [active_stage == stage ? "<font color=green> (Currently active)</font>" : "<a href='?src=\ref[src];beginstage=[stage]'>Activate</a>"]</td></tr>"
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
t += "<tr>"
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[100 - Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""]</td>"
t += "</tr>"
t += "</table>"
*/
t += "<hr>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=fuel_injector;size=500x800")
user.machine = src
Inject()
proc/BeginInjecting()
if(!injecting && owned_assembly_port && owned_assembly_port.cur_assembly)
icon_state = "injector1"
injecting = 1
spawn(rate)
Inject()
return 1
return 0
cached_power_avail = avail()
proc/StopInjecting()
/obj/machinery/power/rust_fuel_injector/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/wrench))
if(injecting)
injecting = 0
icon_state = "injector0"
return 1
return 0
proc/Inject()
if(!injecting)
user << "Turn off the [src] first."
return
if(owned_assembly_port.cur_assembly)
var/obj/machinery/rust/em_field/target_field
if(targetting_field)
for(var/obj/machinery/rust/em_field/field in range(15))
target_field = field
var/amount_left = 0
for(var/reagent in owned_assembly_port.cur_assembly.rod_quantities)
//world << "checking [reagent]"
if(owned_assembly_port.cur_assembly.rod_quantities[reagent] > 0)
//world << " rods left: [owned_assembly_port.cur_assembly.rod_quantities[reagent]]"
var/amount = owned_assembly_port.cur_assembly.rod_quantities[reagent] * fuel_usage
var/numparticles = round(amount * 1000)
if(numparticles < 1)
numparticles = 1
//world << " amount: [amount]"
//world << " numparticles: [numparticles]"
//
var/obj/effect/accelerated_particle/particle = new/obj/effect/accelerated_particle(src.loc, src.dir)
particle.particle_type = reagent
particle.energy = 0
particle.icon_state = "particle"
particle.additional_particles = numparticles - 1
particle.target = target_field
//
owned_assembly_port.cur_assembly.rod_quantities[reagent] -= amount
amount_left += owned_assembly_port.cur_assembly.rod_quantities[reagent]
owned_assembly_port.cur_assembly.percent_depleted = amount_left / 300
flick("injector-emitting",src)
use_power(fuel_usage * 10000 + 100) //0.0001
if(injecting)
spawn(rate)
Inject()
else
injecting = 0
switch(state)
if(0)
state = 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user.visible_message("[user.name] secures [src.name] to the floor.", \
"You secure the external reinforcing bolts to the floor.", \
"You hear a ratchet")
src.anchored = 1
if(1)
state = 0
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \
"You undo the external reinforcing bolts.", \
"You hear a ratchet")
src.anchored = 0
if(2)
user << "\red The [src.name] needs to be unwelded from the floor."
return
process()
..()
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(injecting)
user << "Turn off the [src] first."
return
switch(state)
if(0)
user << "\red The [src.name] needs to be wrenched to the floor."
if(1)
if (WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
"You start to weld the [src] to the floor.", \
"You hear welding")
if (do_after(user,20))
if(!src || !WT.isOn()) return
state = 2
user << "You weld the [src] to the floor."
connect_to_network()
src.directwired = 1
else
user << "\red You need more welding fuel to complete this task."
if(2)
if (WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
"You start to cut the [src] free from the floor.", \
"You hear welding")
if (do_after(user,20))
if(!src || !WT.isOn()) return
state = 1
user << "You cut the [src] free from the floor."
disconnect_from_network()
src.directwired = 0
else
user << "\red You need more welding fuel to complete this task."
return
if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))
if(emagged)
user << "\red The lock seems to be broken"
return
if(src.allowed(user))
src.locked = !src.locked
user << "The controls are now [src.locked ? "locked." : "unlocked."]"
else
user << "\red Access denied."
return
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
locked = 0
emagged = 1
user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.")
return
if(istype(W, /obj/item/weapon/fuel_assembly) && !cur_assembly)
if(emergency_insert_ready)
cur_assembly = W
user.drop_item()
W.loc = src
emergency_insert_ready = 0
return
..()
return
/obj/machinery/power/rust_fuel_injector/attack_ai(mob/user)
attack_hand(user)
/obj/machinery/power/rust_fuel_injector/attack_hand(mob/user)
add_fingerprint(user)
interact(user)
/obj/machinery/power/rust_fuel_injector/interact(mob/user)
if(stat & BROKEN)
user.unset_machine()
user << browse(null, "window=fuel_injector")
return
if(get_dist(src, user) > 1 )
if (!istype(user, /mob/living/silicon))
user.unset_machine()
user << browse(null, "window=fuel_injector")
return
var/dat = ""
if (!powernet || locked || state != 2)
dat += "<i>The console is dark and nonresponsive.</i>"
else
dat += "<B>Reactor Core Fuel Injector</B><hr>"
dat += "<b>Device ID tag:</b> [id_tag] <a href='?src=\ref[src];modify_tag=1'>\[Modify\]</a><br>"
dat += "<b>Status:</b> [injecting ? "<font color=green>Active</font> <a href='?src=\ref[src];toggle_injecting=1'>\[Disable\]</a>" : "<font color=blue>Standby</font> <a href='?src=\ref[src];toggle_injecting=1'>\[Enable\]</a>"]<br>"
dat += "<b>Fuel usage:</b> [fuel_usage*100]% <a href='?src=\ref[src];fuel_usage=1'>\[Modify\]</a><br>"
dat += "<b>Fuel assembly port:</b> "
dat += "<a href='?src=\ref[src];fuel_assembly=1'>\[[cur_assembly ? "Eject assembly to port" : "Draw assembly from port"]\]</a> "
if(cur_assembly)
dat += "<a href='?src=\ref[src];emergency_fuel_assembly=1'>\[Emergency eject\]</a><br>"
else
dat += "<a href='?src=\ref[src];emergency_fuel_assembly=1'>\[[emergency_insert_ready ? "Cancel emergency insertion" : "Emergency insert"]\]</a><br>"
var/font_colour = "green"
if(cached_power_avail < active_power_usage)
font_colour = "red"
else if(cached_power_avail < active_power_usage * 2)
font_colour = "orange"
dat += "<b>Power status:</b> <font color=[font_colour]>[active_power_usage]/[cached_power_avail] W</font><br>"
dat += "<a href='?src=\ref[src];toggle_remote=1'>\[[remote_access_enabled ? "Disable remote access" : "Enable remote access"]\]</a><br>"
dat += "<hr>"
dat += "<A href='?src=\ref[src];refresh=1'>Refresh</A> "
dat += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(dat, "window=fuel_injector;size=500x300")
onclose(user, "fuel_injector")
user.set_machine(src)
/obj/machinery/power/rust_fuel_injector/Topic(href, href_list)
..()
if( href_list["modify_tag"] )
id_tag = input("Enter new ID tag", "Modifying ID tag") as text|null
if( href_list["fuel_assembly"] )
if(!trying_to_swap_fuel)
trying_to_swap_fuel = 1
spawn(50)
attempt_fuel_swap()
trying_to_swap_fuel = 0
if( href_list["emergency_fuel_assembly"] )
if(cur_assembly)
cur_assembly.loc = src.loc
cur_assembly = null
//irradiate!
else
emergency_insert_ready = !emergency_insert_ready
if( href_list["toggle_injecting"] )
if(injecting)
StopInjecting()
else
BeginInjecting()
if( href_list["toggle_remote"] )
remote_access_enabled = !remote_access_enabled
if( href_list["fuel_usage"] )
var/new_usage = text2num(input("Enter new fuel usage (0.01% - 100%)", "Modifying fuel usage", fuel_usage * 100))
if(!new_usage)
usr << "\red That's not a valid number."
return
new_usage = max(new_usage, 0.01)
new_usage = min(new_usage, 100)
fuel_usage = new_usage / 100
active_power_usage = 500 + 1000 * fuel_usage
if( href_list["update_extern"] )
var/obj/machinery/computer/rust_fuel_control/C = locate(href_list["update_extern"])
if(C)
C.updateDialog()
if( href_list["close"] )
usr << browse(null, "window=fuel_injector")
usr.unset_machine()
updateDialog()
/obj/machinery/power/rust_fuel_injector/proc/BeginInjecting()
if(!injecting && cur_assembly)
icon_state = "injector1"
injecting = 1
use_power = 1
/obj/machinery/power/rust_fuel_injector/proc/StopInjecting()
if(injecting)
injecting = 0
icon_state = "injector0"
use_power = 0
/obj/machinery/power/rust_fuel_injector/proc/Inject()
if(!injecting)
return
if(cur_assembly)
var/amount_left = 0
for(var/reagent in cur_assembly.rod_quantities)
//world << "checking [reagent]"
if(cur_assembly.rod_quantities[reagent] > 0)
//world << " rods left: [cur_assembly.rod_quantities[reagent]]"
var/amount = cur_assembly.rod_quantities[reagent] * fuel_usage
var/numparticles = round(amount * 1000)
if(numparticles < 1)
numparticles = 1
//world << " amount: [amount]"
//world << " numparticles: [numparticles]"
//
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.target = target_field
//
cur_assembly.rod_quantities[reagent] -= amount
amount_left += cur_assembly.rod_quantities[reagent]
cur_assembly.percent_depleted = amount_left / 300
flick("injector-emitting",src)
else
StopInjecting()
/obj/machinery/power/rust_fuel_injector/proc/attempt_fuel_swap()
var/rev_dir = reverse_direction(dir)
var/turf/mid = get_step(src, rev_dir)
var/success = 0
for(var/obj/machinery/rust_fuel_assembly_port/check_port in get_step(mid, rev_dir))
if(cur_assembly)
if(!check_port.cur_assembly)
check_port.cur_assembly = cur_assembly
cur_assembly.loc = check_port
cur_assembly = null
check_port.icon_state = "port1"
success = 1
else
if(check_port.cur_assembly)
cur_assembly = check_port.cur_assembly
cur_assembly.loc = src
check_port.cur_assembly = null
check_port.icon_state = "port0"
success = 1
break
if(success)
src.visible_message("\blue \icon[src] a green light flashes on [src].")
updateDialog()
//
else
src.visible_message("\red \icon[src] a red light flashes on [src].")
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

@@ -3,7 +3,7 @@
/obj/item/projectile/beam/ehf_beam
/obj/machinery/rust/gyrotron
icon = 'gyrotron.dmi'
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
icon_state = "emitter-off"
name = "Gyrotron"
anchored = 1
@@ -41,7 +41,7 @@
new_val = min(new_val,0.01)
new_val = max(new_val,0.001)
mega_energy = new_val
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
for(var/obj/machinery/computer/rust_gyrotron_controller/comp in range(25))
comp.updateDialog()
return
if( href_list["modifyrate"] )
@@ -52,7 +52,7 @@
new_val = min(new_val,1)
new_val = max(new_val,10)
rate = new_val
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
for(var/obj/machinery/computer/rust_gyrotron_controller/comp in range(25))
comp.updateDialog()
return
if( href_list["modifyfreq"] )
@@ -63,29 +63,29 @@
new_val = min(new_val,1)
new_val = max(new_val,50000)
frequency = new_val
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
for(var/obj/machinery/computer/rust_gyrotron_controller/comp in range(25))
comp.updateDialog()
return
if( href_list["activate"] )
emitting = 1
spawn(rate)
Emit()
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
for(var/obj/machinery/computer/rust_gyrotron_controller/comp in range(25))
comp.updateDialog()
return
if( href_list["deactivate"] )
emitting = 0
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
for(var/obj/machinery/computer/rust_gyrotron_controller/comp in range(25))
comp.updateDialog()
return
if( href_list["enableremote"] )
remoteenabled = 1
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
for(var/obj/machinery/computer/rust_gyrotron_controller/comp in range(25))
comp.updateDialog()
return
if( href_list["disableremote"] )
remoteenabled = 0
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
for(var/obj/machinery/computer/rust_gyrotron_controller/comp in range(25))
comp.updateDialog()
return
/*
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

@@ -1,7 +1,8 @@
/obj/machinery/computer/rust/gyrotron_controller
/obj/machinery/computer/rust_gyrotron_controller
name = "Gyrotron Remote Controller"
icon_state = "power"
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
icon_state = "engine"
var/updating = 1
New()
@@ -67,4 +67,8 @@
//particle.invisibility = 2
//
return particle
*/
*/
/obj/machinery/computer/rust_radiation_monitor
name = "Radiation Monitor"
icon_state = "power"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 617 B

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

@@ -1,49 +1,53 @@
//gimmicky hack to collect particles and direct them into the field
//byond multitiles are basically... shit
/obj/machinery/rust/particle_catcher
invisibility = 101
/obj/effect/rust_particle_catcher
icon = 'effects.dmi'
icon_state = "energynet"
density = 0
anchored = 1
var/obj/machinery/rust/em_field/parent
invisibility = 101
layer = 4
var/obj/effect/rust_em_field/parent
var/mysize = 0
/*New()
for(var/obj/machinery/rust/em_field/field in range(6))
parent = field
if(!parent)
del(src)*/
/*/obj/effect/rust_particle_catcher/New()
for(var/obj/machinery/rust/em_field/field in range(6))
parent = field
if(!parent)
del(src)*/
proc/SetSize(var/newsize)
name = "collector [newsize]"
mysize = newsize
UpdateSize()
/obj/effect/rust_particle_catcher/process()
if(!parent)
del(src)
proc/AddParticles(var/name, var/quantity = 1)
if(parent && parent.size >= mysize)
parent.AddParticles(name, quantity)
return 1
return 0
/obj/effect/rust_particle_catcher/proc/SetSize(var/newsize)
name = "collector [newsize]"
mysize = newsize
UpdateSize()
proc/UpdateSize()
if(parent.size >= mysize)
density = 1
//invisibility = 101
name = "collector [mysize] ON"
else
density = 0
name = "collector [mysize] OFF"
//invisibility = 101
/obj/effect/rust_particle_catcher/proc/AddParticles(var/name, var/quantity = 1)
if(parent && parent.size >= mysize)
parent.AddParticles(name, quantity)
return 1
return 0
bullet_act(var/obj/item/projectile/Proj)
if(Proj.flag != "bullet" && parent)
var/obj/item/projectile/beam/laserbeam = Proj
parent.AddEnergy(0, laserbeam.damage / 5000, laserbeam.frequency)
return 0
/obj/effect/rust_particle_catcher/proc/UpdateSize()
if(parent.size >= mysize)
density = 1
invisibility = 0
name = "collector [mysize] ON"
else
density = 0
invisibility = 101
name = "collector [mysize] OFF"
process()
..()
if(!parent)
del(src)
/obj/effect/rust_particle_catcher/bullet_act(var/obj/item/projectile/Proj)
if(Proj.flag != "bullet" && parent)
parent.AddEnergy(Proj.damage, 0, 1)
update_icon()
return 0
/obj/effect/rust_particle_catcher/Bumped(atom/AM)
if(ismob(AM) && density && prob(10))
AM << "\red A powerful force pushes you back."
..()
@@ -0,0 +1,52 @@
////////////////////////////////////////
// Shield Generator
/obj/item/weapon/circuitboard/shield_gen
name = "Circuit board (Experimental shield generator)"
board_type = "machine"
build_path = "/obj/machinery/shield_gen/external"
origin_tech = "bluespace=4;plasmatech=3"
frame_desc = "Requires 2 Pico Manipulators, 1 Subspace Transmitter, 5 Pieces of cable, 1 Subspace Crystal, 1 Subspace Amplifier and 1 Console Screen."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
"/obj/item/weapon/stock_parts/subspace/transmitter" = 1,
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
"/obj/item/weapon/stock_parts/subspace/amplifier" = 1,
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/cable_coil" = 5)
datum/design/shield_gen
name = "Circuit Design (Experimental hull shield generator)"
desc = "Allows for the construction of circuit boards used to build an experimental hull shield generator."
id = "shield_gen"
req_tech = list("bluespace" = 4, "plasmatech" = 3)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 10000, "$diamond" = 5000, "$gold" = 10000)
build_path = "/obj/machinery/shield_gen/external"
////////////////////////////////////////
// Shield Capacitor
/obj/item/weapon/circuitboard/shield_cap
name = "Circuit board (Experimental shield capacitor)"
board_type = "machine"
build_path = "/obj/machinery/shield_capacitor"
origin_tech = "magnets=3;powerstorage=4"
frame_desc = "Requires 2 Pico Manipulators, 1 Subspace Filter, 5 Pieces of cable, 1 Subspace Treatment disk, 1 Subspace Analyzer and 1 Console Screen."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
"/obj/item/weapon/stock_parts/subspace/treatment" = 1,
"/obj/item/weapon/stock_parts/subspace/analyzer" = 1,
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/cable_coil" = 5)
datum/design/shield_cap
name = "Circuit Design (Experimental shield capacitor)"
desc = "Allows for the construction of circuit boards used to build an experimental shielding capacitor."
id = "shield_cap"
req_tech = list("magnets" = 3, "powerstorage" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 10000, "$diamond" = 5000, "$silver" = 10000)
build_path = "/obj/machinery/shield_gen/external"
@@ -8,7 +8,7 @@
icon_state = "shieldsparkles"
anchored = 1
layer = 2.1
density = 1
density = 0
invisibility = 2
var/strength = 0
var/obj/machinery/shield_gen/parent
@@ -31,7 +31,7 @@
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
if(strength < 1)
invisibility = 101
invisibility = 2
density = 0
/obj/effect/energy_field/proc/Strengthen(var/severity)
@@ -41,7 +41,7 @@
if(strength > 1)
invisibility = 0
density = 1
/*
/obj/effect/energy_field/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
//Purpose: Determines if the object (or airflow) can pass this atom.
//Called by: Movement, airflow.
@@ -49,5 +49,4 @@
//Outputs: Boolean if can pass.
//return (!density || !height || air_group)
return !density
*/
return density
@@ -1,36 +1,36 @@
//---------- external shield generator
//generates an energy field that loops around any built up area in space (is useless inside) halts movement and airflow, is blocked by walls, windows, airlocks etc
/obj/machinery/shield_gen/external/New()
..()
/obj/machinery/shield_gen/external/get_shielded_turfs()
var
list
open = list(get_turf(src))
closed = list()
while(open.len)
for(var/turf/T in open)
for(var/turf/O in orange(1, T))
if(get_dist(O,src) > field_radius)
continue
var/add_this_turf = 0
if(istype(O,/turf/space))
for(var/turf/simulated/G in orange(1, O))
add_this_turf = 1
break
for(var/obj/structure/S in orange(1, O))
add_this_turf = 1
break
for(var/obj/structure/S in O)
add_this_turf = 0
break
if(add_this_turf && !(O in open) && !(O in closed))
open += O
open -= T
closed += T
return closed
//---------- external shield generator
//generates an energy field that loops around any built up area in space (is useless inside) halts movement and airflow, is blocked by walls, windows, airlocks etc
/obj/machinery/shield_gen/external/New()
..()
/obj/machinery/shield_gen/external/get_shielded_turfs()
var
list
open = list(get_turf(src))
closed = list()
while(open.len)
for(var/turf/T in open)
for(var/turf/O in orange(1, T))
if(get_dist(O,src) > field_radius)
continue
var/add_this_turf = 0
if(istype(O,/turf/space))
for(var/turf/simulated/G in orange(1, O))
add_this_turf = 1
break
for(var/obj/structure/S in orange(1, O))
add_this_turf = 1
break
for(var/obj/structure/S in O)
add_this_turf = 0
break
if(add_this_turf && !(O in open) && !(O in closed))
open += O
open -= T
closed += T
return closed
@@ -1,158 +1,159 @@
//---------- shield capacitor
//pulls energy out of a power net and charges an adjacent generator
/obj/machinery/shield_capacitor
name = "shield capacitor"
desc = "Machine that charges a shield generator."
icon = 'shielding.dmi'
icon_state = "capacitor"
var/active = 1
density = 1
anchored = 1
var/obj/machinery/shield_gen/target_generator
var/stored_charge = 0
var/time_since_fail = 100
var/max_charge = 1000000
var/max_charge_rate = 100000
var/min_charge_rate = 0
var/locked = 0
//
use_power = 1 //0 use nothing
//1 use idle power
//2 use active power
idle_power_usage = 10
active_power_usage = 100
var/charge_rate = 100
/obj/machinery/shield_capacitor/New()
spawn(10)
for(var/obj/machinery/shield_gen/possible_gen in range(1, src))
if(get_dir(src, possible_gen) == src.dir)
target_generator = possible_gen
possible_gen.owned_capacitor = src
break
..()
/obj/machinery/shield_capacitor/verb/rotate()
set name = "Rotate Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored || usr:stat)
usr << "It is fastened to the floor!"
return 0
src.dir = turn(src.dir, 270)
target_generator = locate() in get_step(src,dir)
if(target_generator && !target_generator.owned_capacitor)
target_generator.owned_capacitor = src
return 1
/obj/machinery/shield_capacitor/power_change()
if(stat & BROKEN)
icon_state = "broke"
else
if( powered() )
if (src.active)
icon_state = "capacitor"
else
icon_state = "capacitor"
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = "capacitor"
stat |= NOPOWER
/obj/machinery/shield_capacitor/process()
//
if(active)
use_power = 2
if(stored_charge + charge_rate > max_charge)
active_power_usage = max_charge - stored_charge
else
active_power_usage = charge_rate
stored_charge += active_power_usage
else
use_power = 1
time_since_fail++
if(stored_charge < active_power_usage * 1.5)
time_since_fail = 0
//
updateDialog()
/obj/machinery/shield_capacitor/attackby(obj/item/W, mob/user)
/*if(istype(W, /obj/item/weapon/wrench))
if(active)
user << "Turn off the field generator first."
return
else if(state == 0)
state = 1
playsound(src.loc, 'Ratchet.ogg', 75, 1)
user << "You secure the external reinforcing bolts to the floor."
src.anchored = 1
return
else if(state == 1)
state = 0
playsound(src.loc, 'Ratchet.ogg', 75, 1)
user << "You undo the external reinforcing bolts."
src.anchored = 0
return*/
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (src.allowed(user))
src.locked = !src.locked
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
else
user << "\red Access denied."
else if(istype(W, /obj/item/weapon/wrench))
src.anchored = !src.anchored
src.visible_message("\blue \icon[src] [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].")
else
src.add_fingerprint(user)
user << "\red You hit the [src.name] with your [W.name]!"
for(var/mob/M in viewers(src))
if(M == user) continue
M.show_message("\red The [src.name] has been hit with the [W.name] by [user.name]!")
/obj/machinery/shield_capacitor/Topic(href, href_list[])
..()
if( href_list["close"] )
usr << browse(null, "window=shield_capacitor")
usr.machine = null
return
if( href_list["toggle"] )
active = !active
if(active)
use_power = 2
else
use_power = 1
if( href_list["charge_rate"] )
charge_rate += text2num(href_list["charge_rate"])
if(charge_rate > max_charge_rate)
charge_rate = max_charge_rate
else if(charge_rate < min_charge_rate)
charge_rate = min_charge_rate
//
updateDialog()
/obj/machinery/shield_capacitor/interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=shield_capacitor")
return
var/t = "<B>Shield Capacitor Control Console</B><BR>"
t += "[target_generator ? "<font color=green>Shield generator connected.</font>" : "<font color=red>Unable to locate shield generator!</font>"]<br>"
t += "This capacitor is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
t += "[time_since_fail > 2 ? "<font color=green>Charging stable.</font>" : "<font color=red>Warning, low charge!</font>"]<br>"
t += "Capacitor charge: [stored_charge] Watts ([100 * stored_charge/max_charge]%)<br>"
t += "Capacitor charge rate (approx): <a href='?src=\ref[src];charge_rate=[-max_charge_rate]'>\[min\]</a> <a href='?src=\ref[src];charge_rate=-1000'>\[--\]</a> <a href='?src=\ref[src];charge_rate=-100'>\[-\]</a>[charge_rate] Watts/sec <a href='?src=\ref[src];charge_rate=100'>\[+\]</a> <a href='?src=\ref[src];charge_rate=1000'>\[++\]</a> <a href='?src=\ref[src];charge_rate=[max_charge_rate]'>\[max\]</a><br>"
t += "<hr>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=shield_capacitor;size=500x800")
user.machine = src
//---------- shield capacitor
//pulls energy out of a power net and charges an adjacent generator
/obj/machinery/shield_capacitor
name = "shield capacitor"
desc = "Machine that charges a shield generator."
icon = 'shielding.dmi'
icon_state = "capacitor"
var/active = 1
density = 1
anchored = 1
var/obj/machinery/shield_gen/target_generator
var/stored_charge = 0
var/time_since_fail = 100
var/max_charge = 1000000
var/max_charge_rate = 100000
var/min_charge_rate = 0
var/locked = 0
//
use_power = 1 //0 use nothing
//1 use idle power
//2 use active power
idle_power_usage = 10
active_power_usage = 100
var/charge_rate = 100
/obj/machinery/shield_capacitor/New()
spawn(10)
for(var/obj/machinery/shield_gen/possible_gen in range(1, src))
if(get_dir(src, possible_gen) == src.dir)
target_generator = possible_gen
possible_gen.owned_capacitor = src
break
..()
/obj/machinery/shield_capacitor/verb/rotate()
set name = "Rotate Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored || usr:stat)
usr << "It is fastened to the floor!"
return 0
src.dir = turn(src.dir, 270)
target_generator = locate() in get_step(src,dir)
if(target_generator && !target_generator.owned_capacitor)
target_generator.owned_capacitor = src
return 1
/obj/machinery/shield_capacitor/power_change()
if(stat & BROKEN)
icon_state = "broke"
else
if( powered() )
if (src.active)
icon_state = "capacitor"
else
icon_state = "capacitor"
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = "capacitor"
stat |= NOPOWER
/obj/machinery/shield_capacitor/process()
//
if(active)
use_power = 2
if(stored_charge + charge_rate > max_charge)
active_power_usage = max_charge - stored_charge
else
active_power_usage = charge_rate
stored_charge += active_power_usage
else
use_power = 1
time_since_fail++
if(stored_charge < active_power_usage * 1.5)
time_since_fail = 0
//
updateDialog()
/obj/machinery/shield_capacitor/attackby(obj/item/W, mob/user)
/*if(istype(W, /obj/item/weapon/wrench))
if(active)
user << "Turn off the field generator first."
return
else if(state == 0)
state = 1
playsound(src.loc, 'Ratchet.ogg', 75, 1)
user << "You secure the external reinforcing bolts to the floor."
src.anchored = 1
return
else if(state == 1)
state = 0
playsound(src.loc, 'Ratchet.ogg', 75, 1)
user << "You undo the external reinforcing bolts."
src.anchored = 0
return*/
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (src.allowed(user))
src.locked = !src.locked
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
else
user << "\red Access denied."
else if(istype(W, /obj/item/weapon/wrench))
src.anchored = !src.anchored
src.visible_message("\blue \icon[src] [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].")
else
src.add_fingerprint(user)
user << "\red You hit the [src.name] with your [W.name]!"
for(var/mob/M in viewers(src))
if(M == user) continue
M.show_message("\red The [src.name] has been hit with the [W.name] by [user.name]!")
/obj/machinery/shield_capacitor/Topic(href, href_list[])
..()
if( href_list["close"] )
usr << browse(null, "window=shield_capacitor")
usr.machine = null
return
if( href_list["toggle"] )
active = !active
if(active)
use_power = 2
else
use_power = 1
if( href_list["charge_rate"] )
charge_rate += text2num(href_list["charge_rate"])
if(charge_rate > max_charge_rate)
charge_rate = max_charge_rate
else if(charge_rate < min_charge_rate)
charge_rate = min_charge_rate
//
updateDialog()
/obj/machinery/shield_capacitor/interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=shield_capacitor")
return
var/t = "<B>Shield Capacitor Control Console</B><BR>"
t += "[target_generator ? "<font color=green>Shield generator connected.</font>" : "<font color=red>Unable to locate shield generator!</font>"]<br>"
t += "This capacitor is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
t += "[time_since_fail > 2 ? "<font color=green>Charging stable.</font>" : "<font color=red>Warning, low charge!</font>"]<br>"
t += "Capacitor charge: [stored_charge] Watts ([100 * stored_charge/max_charge]%)<br>"
t += "Capacitor charge rate (approx): <a href='?src=\ref[src];charge_rate=[-max_charge_rate]'>\[min\]</a> <a href='?src=\ref[src];charge_rate=-1000'>\[--\]</a> <a href='?src=\ref[src];charge_rate=-100'>\[-\]</a>[charge_rate] Watts/sec <a href='?src=\ref[src];charge_rate=100'>\[+\]</a> <a href='?src=\ref[src];charge_rate=1000'>\[++\]</a> <a href='?src=\ref[src];charge_rate=[max_charge_rate]'>\[max\]</a><br>"
t += "<hr>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=shield_capacitor;size=500x800")
user.machine = src

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

+8 -26
View File
@@ -24,13 +24,18 @@
side_effects += M
/mob/living/carbon/human/proc/handle_medical_side_effects()
if(src.reagents.has_reagent("bicaridine") || src.reagents.has_reagent("tricordrazine") || src.reagents.has_reagent("cryoxadone"))
if(src.reagents.has_reagent("cryoxadone") || src.reagents.get_reagent_amount("bicaridine") >= 15 || src.reagents.get_reagent_amount("tricordrazine") >= 15)
src.add_side_effect("Headache")
if(src.reagents.has_reagent("kelotane") || src.reagents.has_reagent("dermaline"))
if(src.reagents.get_reagent_amount("kelotane") >= 30 || src.reagents.get_reagent_amount("dermaline") >= 15)
src.add_side_effect("Bad Stomach")
if(src.reagents.get_reagent_amount("tramadol") >= 16 || src.reagents.get_reagent_amount("anti_toxin") >= 30)
src.add_side_effect("Cramps")
if(src.reagents.get_reagent_amount("space_drugs") >= 10)
src.add_side_effect("Itch")
// One full cycle(in terms of strength) every 10 minutes
var/strength_percent = sin(life_tick / 2)
@@ -46,29 +51,6 @@
// Effect slowly growing stronger
M.strength+=0.08
// HEADACHE
// ========
/datum/medical_effect/headache/name = "Headache"
/datum/medical_effect/headache/on_life(mob/living/carbon/human/H, strength)
switch(strength)
if(1 to 10)
H.custom_pain("You feel a light pain in your head.",0)
if(11 to 30)
H.custom_pain("You feel a throbbing pain in your head!",1)
if(31 to 99)
H.custom_pain("You feel an excrutiating pain in your head!",1)
H.adjustBrainLoss(1)
if(99 to INFINITY)
H.custom_pain("It feels like your head is about to split open!",1)
H.adjustBrainLoss(3)
var/datum/organ/external/O = H.organs_by_name["head"]
O.take_damage(0, 1, 0, "Headache")
/datum/medical_effect/headache/cure(mob/living/carbon/human/H)
if(H.reagents.has_reagent("alkysine"))
return 1
return 0
// HEADACHE
// ========
/datum/medical_effect/headache/name = "Headache"
+3 -3
View File
@@ -114,11 +114,11 @@ log transactions
switch(view_screen)
if(CHANGE_SECURITY_LEVEL)
dat += "Select a new security level for this account:<br><hr>"
var/text = "Zero - Only account number or card is required to access this account. EFTPOS transactions will require a card and ask for a pin, but not verify the pin is correct."
var/text = "Zero - Either the account number or card is required to access this account. EFTPOS transactions will require a card and ask for a pin, but not verify the pin is correct."
if(authenticated_account.security_level != 0)
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=0'>[text]</a>"
dat += "[text]<hr>"
text = "One - Both an account number and pin is required to access this account and process transactions."
text = "One - An account number and pin must be manually entered to access this account and process transactions."
if(authenticated_account.security_level != 1)
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=1'>[text]</a>"
dat += "[text]<hr>"
@@ -185,7 +185,7 @@ log transactions
dat += "<span class='warning'>Unable to connect to accounts database, please retry and if the issue persists contact NanoTrasen IT support.</span>"
reconnect_database()
user << browse(dat,"window=atm;size=500x650")
user << browse(dat,"window=atm;size=550x650")
else
user << browse(null,"window=atm")
+1
View File
@@ -66,6 +66,7 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
for(var/T in paths)
var/datum/surgery_step/S = new T
surgery_steps += S
sort_surgeries()
/* // Uncomment to debug chemical reaction list.
/client/verb/debug_chemical_list()
+2 -2
View File
@@ -63,8 +63,8 @@
var/server
var/banappeals
var/wikiurl
var/forumurl
var/wikiurl = "http://baystation12.net/wiki/index.php?title=Main_Page"
var/forumurl = "http://baystation12.net/forums/"
//Alert level description
var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
+1 -1
View File
@@ -118,7 +118,7 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
switch(H.get_species())
if("Tajaran")
icobase = 'icons/mob/human_races/r_tajaran.dmi'
if( "Soghun")
if("Unathi")
icobase = 'icons/mob/human_races/r_lizard.dmi'
if("Skrell")
icobase = 'icons/mob/human_races/r_skrell.dmi'
+2
View File
@@ -61,6 +61,8 @@ datum/mind
New(var/key)
src.key = key
//put this here for easier tracking ingame
var/datum/money_account/initial_account
proc/transfer_to(mob/living/new_character)
if(!istype(new_character))
File diff suppressed because it is too large Load Diff
+44 -26
View File
@@ -96,6 +96,23 @@
else if(damage_type == BURN)
return salved
// checks if wound is considered open for external infections
// untreated cuts (and bleeding bruises) and burns are possibly infectable, chance higher if wound is bigger
proc/can_infect()
if (is_treated() && damage < 10)
return 0
if (disinfected)
return 0
var/dam_coef = round(damage/10)
switch (damage_type)
if (BRUISE)
return prob(dam_coef*5) && bleeding() //bruises only infectable if bleeding
if (BURN)
return prob(dam_coef*10)
if (CUT)
return prob(dam_coef*20)
return 0
// heal the given amount of damage, and if the given amount of damage was more
// than what needed to be healed, return how much heal was left
// set @heals_internal to also heal internal organ damage
@@ -131,31 +148,31 @@
return (!(bandaged||clamped) && (damage_type == BRUISE && damage >= 20 || damage_type == CUT) && current_stage <= max_bleeding_stage && !src.internal)
/** CUTS **/
/datum/wound/cut
/datum/wound/cut/small
// link wound descriptions to amounts of damage
max_bleeding_stage = 2
stages = list("ugly ripped cut" = 20, "ripped cut" = 10, "cut" = 5, "healing cut" = 2, "small scab" = 0)
/datum/wound/deep_cut
/datum/wound/cut/deep
max_bleeding_stage = 3
stages = list("ugly deep ripped cut" = 25, "deep ripped cut" = 20, "deep cut" = 15, "clotted cut" = 8, "scab" = 2, "fresh skin" = 0)
/datum/wound/flesh_wound
/datum/wound/cut/flesh
max_bleeding_stage = 3
stages = list("ugly ripped flesh wound" = 35, "ugly flesh wound" = 30, "flesh wound" = 25, "blood soaked clot" = 15, "large scab" = 5, "fresh skin" = 0)
/datum/wound/gaping_wound
/datum/wound/cut/gaping
max_bleeding_stage = 2
stages = list("gaping wound" = 50, "large blood soaked clot" = 25, "large clot" = 15, "small angry scar" = 5, \
"small straight scar" = 0)
/datum/wound/big_gaping_wound
/datum/wound/cut/gaping_big
max_bleeding_stage = 2
stages = list("big gaping wound" = 60, "healing gaping wound" = 40, "large angry scar" = 10, "large straight scar" = 0)
needs_treatment = 1 // this only heals when bandaged
/datum/wound/massive_wound
datum/wound/cut/massive
max_bleeding_stage = 2
stages = list("massive wound" = 70, "massive healing wound" = 50, "massive angry scar" = 10, "massive jagged scar" = 0)
@@ -169,50 +186,51 @@
needs_treatment = 1 // this only heals when bandaged
damage_type = BRUISE
/datum/wound/bruise/monumental_bruise
/datum/wound/bruise/monumental
// implement sub-paths by starting at a later stage
/datum/wound/bruise/huge_bruise
current_stage = 1
/datum/wound/bruise/large_bruise
current_stage = 2
/datum/wound/bruise/moderate_bruise
current_stage = 3
needs_treatment = 0
/datum/wound/bruise/small_bruise
current_stage = 4
needs_treatment = 0
/datum/wound/bruise/tiny_bruise
/datum/wound/bruise/tiny
current_stage = 5
needs_treatment = 0
/datum/wound/bruise/small
current_stage = 4
needs_treatment = 0
/datum/wound/bruise/moderate
current_stage = 3
needs_treatment = 0
/datum/wound/bruise/large
current_stage = 2
/datum/wound/bruise/huge
current_stage = 1
/** BURNS **/
/datum/wound/moderate_burn
/datum/wound/burn/moderate
stages = list("ripped burn" = 10, "moderate burn" = 5, "moderate salved burn" = 2, "fresh skin" = 0)
needs_treatment = 1 // this only heals when bandaged
damage_type = BURN
/datum/wound/large_burn
/datum/wound/burn/large
stages = list("ripped large burn" = 20, "large burn" = 15, "large salved burn" = 5, "fresh skin" = 0)
needs_treatment = 1 // this only heals when bandaged
damage_type = BURN
/datum/wound/severe_burn
/datum/wound/burn/severe
stages = list("ripped severe burn" = 35, "severe burn" = 30, "severe salved burn" = 10, "burn scar" = 0)
needs_treatment = 1 // this only heals when bandaged
damage_type = BURN
/datum/wound/deep_burn
/datum/wound/burn/deep
stages = list("ripped deep burn" = 45, "deep burn" = 40, "deep salved burn" = 15, "large burn scar" = 0)
needs_treatment = 1 // this only heals when bandaged
@@ -220,7 +238,7 @@
damage_type = BURN
/datum/wound/carbonised_area
/datum/wound/burn/carbonised
stages = list("carbonised area" = 50, "treated carbonised area" = 20, "massive burn scar" = 0)
needs_treatment = 1 // this only heals when bandaged
+53
View File
@@ -849,3 +849,56 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containertype = /obj/structure/closet
containername = "Formalwear for the best occasions."
group = "Operations"
/datum/supply_packs/rust_injector
contains = list(/obj/machinery/power/rust_fuel_injector)
name = "RUST fuel injector"
cost = 50
containertype = /obj/structure/largecrate
containername = "RUST injector crate"
group = "Engineering"
access = access_engine
/datum/supply_packs/rust_compressor
contains = list(/obj/item/weapon/module/rust_fuel_compressor)
name = "RUST fuel compressor circuitry"
cost = 60
containertype = /obj/structure/closet/crate/secure
containername = "RUST fuel compressor circuitry"
group = "Engineering"
access = access_engine
/datum/supply_packs/rust_core
contains = list(/obj/machinery/power/rust_core)
name = "RUST Tokamak Core"
cost = 75
containertype = /obj/structure/largecrate
containername = "RUST tokamak crate"
group = "Engineering"
access = access_engine
/datum/supply_packs/shield_gen
contains = list(/obj/item/weapon/circuitboard/shield_gen)
name = "Experimental shield generator circuitry"
cost = 50
containertype = /obj/structure/closet/crate/secure
containername = "Experimental shield generator"
group = "Engineering"
access = access_ce
/datum/supply_packs/shield_cap
contains = list(/obj/item/weapon/circuitboard/shield_cap)
name = "Experimental shield capacitor circuitry"
cost = 50
containertype = /obj/structure/closet/crate/secure
containername = "Experimental shield capacitor"
group = "Engineering"
access = access_ce
/datum/supply_packs/eftpos
contains = list(/obj/item/device/eftpos)
name = "EFTPOS scanner"
cost = 10
containertype = /obj/structure/closet/crate
containername = "EFTPOS crate"
group = "Operations"
+11 -8
View File
@@ -70,7 +70,7 @@
.manifest td:first-child {text-align:right}
.manifest tr.alt td {[monochrome?"border-top-width: 2px":"background-color: #DEF"]}
</style></head>
<table class="manifest">
<table class="manifest" width='350px'>
<tr class='head'><th>Name</th><th>Rank</th><th>Activity</th></tr>
"}
var/even = 0
@@ -94,28 +94,31 @@
//world << "[name]: [rank]"
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line
var/department = 0
if(real_rank in command_positions)
heads[name] = rank
department = 1
if(real_rank in security_positions)
sec[name] = rank
continue
department = 1
if(real_rank in engineering_positions)
eng[name] = rank
continue
department = 1
if(real_rank in medical_positions)
med[name] = rank
continue
department = 1
if(real_rank in science_positions)
sci[name] = rank
continue
department = 1
if(real_rank in civilian_positions)
civ[name] = rank
continue
department = 1
if(real_rank in nonhuman_positions)
bot[name] = rank
continue
department = 1
if(!(name in heads))
if(!department && !(name in heads))
misc[name] = rank
if(heads.len > 0)
+4 -4
View File
@@ -269,17 +269,17 @@
if(prob(35))
if(istype(src, /area/chapel))
sound = pick('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg')
sound = pick('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg','sound/music/traitor.ogg')
else if(istype(src, /area/medical/morgue))
sound = pick('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/ambience/title2.ogg')
sound = pick('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/music/main.ogg')
else if(type == /area)
sound = pick('sound/ambience/ambispace.ogg','sound/ambience/title2.ogg',)
sound = pick('sound/ambience/ambispace.ogg','sound/music/title2.ogg','sound/music/space.ogg','sound/music/main.ogg','sound/music/traitor.ogg')
else if(istype(src, /area/engine))
sound = pick('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg')
else if(istype(src, /area/AIsattele) || istype(src, /area/turret_protected/ai) || istype(src, /area/turret_protected/ai_upload) || istype(src, /area/turret_protected/ai_upload_foyer))
sound = pick('sound/ambience/ambimalf.ogg')
else if(istype(src, /area/mine/explored) || istype(src, /area/mine/unexplored))
sound = pick('sound/ambience/ambimine.ogg')
sound = pick('sound/ambience/ambimine.ogg', 'sound/ambience/song_game.ogg')
musVolume = 25
else if(istype(src, /area/tcommsat) || istype(src, /area/turret_protected/tcomwest) || istype(src, /area/turret_protected/tcomeast) || istype(src, /area/turret_protected/tcomfoyer) || istype(src, /area/turret_protected/tcomsat))
sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
+10 -3
View File
@@ -37,9 +37,9 @@ var/global/datum/controller/gameticker/ticker
var/triai = 0//Global holder for Triumvirate
/datum/controller/gameticker/proc/pregame()
login_music = pick('sound/ambience/title2.ogg','sound/ambience/title1.ogg','sound/ambience/b12_combined_start.ogg') // choose title music!
for(var/mob/new_player/M in mob_list)
if(M.client) M.client.playtitlemusic()
login_music = pick(\
'sound/music/title1.ogg',\
'sound/music/b12_combined_start.ogg')
do
pregame_timeleft = 180
world << "<B><FONT color='blue'>Welcome to the pre-game lobby!</FONT></B>"
@@ -105,6 +105,13 @@ var/global/datum/controller/gameticker/ticker
else
src.mode.announce()
//setup the money accounts
if(!centcomm_account_db)
for(var/obj/machinery/account_database/check_db in world)
if(check_db.z == 2)
centcomm_account_db = check_db
break
create_characters() //Create player characters and transfer them
collect_minds()
equip_characters()
+4
View File
@@ -124,6 +124,8 @@
var/name_2 = pick(src.org_names_2)
var/mob/living/carbon/human/H = get_suspect()
if(!H) return
var/fingerprints = num2text(md5(H.dna.uni_identity))
var/traitor_name = H.real_name
var/prob_right_dude = rand(1, 100)
@@ -147,6 +149,7 @@
var/prob_right_dude = rand(1, 100)
var/mob/living/carbon/human/H = get_suspect()
if(!H) return
var/traitor_job = H.mind.assigned_role
src.text += "<BR><BR>It has been brought to our attention that the [name_1] [name_2] have stumbled upon some dark secrets. They apparently want to spread the dangerous knowledge onto as many stations as they can."
@@ -165,6 +168,7 @@
var/prob_right_dude = rand(1, 100)
var/mob/living/carbon/human/H = get_suspect()
if(!H) return
var/traitor_job = H.mind.assigned_role
src.text += "<BR><BR>It has been brought to our attention that the [name_1] [name_2] are attempting to stir unrest on one of our stations in your sector."
+1 -1
View File
@@ -6,7 +6,7 @@
name = "nuclear emergency"
config_tag = "nuclear"
required_players = 6
required_players_secret = 15 // 15 players - 5 players to be the nuke ops = 10 players remaining
required_players_secret = 25 // 25 players - 5 players to be the nuke ops = 20 players remaining
required_enemies = 5
recommended_enemies = 5
+1 -1
View File
@@ -294,6 +294,6 @@
// Tell them about people they might want to contact.
var/mob/living/carbon/human/M = get_nt_opposed()
if(M != traitor_mob)
if(M && M != traitor_mob)
traitor_mob << "We have received credible reports that [M.real_name] might be willing to help our cause. If you need assistance, consider contacting them."
traitor_mob.mind.store_memory("<b>Potential Collaborator</b>: [M.real_name]")
+5 -2
View File
@@ -63,6 +63,7 @@
/var/const/access_tcomsat = 61 // has access to the entire telecomms satellite / machinery
/var/const/access_gateway = 62
/var/const/access_sec_doors = 63 // Security front doors
/var/const/access_psychiatrist = 64 // Psychiatrist's office
//BEGIN CENTCOM ACCESS
/*Should leave plenty of room if we need to add more access levels.
@@ -205,7 +206,7 @@
access_teleporter, access_eva, access_heads, access_captain, access_all_personal_lockers,
access_tech_storage, access_chapel_office, access_atmospherics, access_kitchen,
access_bar, access_janitor, access_crematorium, access_robotics, access_cargo, access_construction,
access_hydroponics, access_library, access_lawyer, access_virology, access_cmo, access_qm, access_clown, access_mime, access_surgery,
access_hydroponics, access_library, access_lawyer, access_virology, access_psychiatrist, access_cmo, access_qm, access_clown, access_mime, access_surgery,
access_theatre, access_research, access_mining, access_mailsorting,
access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce,
access_keycard_auth, access_tcomsat, access_gateway)
@@ -223,7 +224,7 @@
if(1) //security
return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
if(2) //medbay
return list(access_medical, access_genetics, access_morgue, access_chemistry, access_virology, access_surgery, access_cmo)
return list(access_medical, access_genetics, access_morgue, access_chemistry, access_psychiatrist, access_virology, access_surgery, access_cmo)
if(3) //research
return list(access_research, access_tox, access_tox_storage, access_robotics, access_xenobiology, access_rd)
if(4) //engineering and maintenance
@@ -335,6 +336,8 @@
return "Robotics"
if(access_virology)
return "Virology"
if(access_psychiatrist)
return "Psychiatrist's Office"
if(access_cmo)
return "Chief Medical Officer"
if(access_qm)
+43 -10
View File
@@ -11,10 +11,10 @@
req_admin_notify = 1
access = list(access_medical, access_morgue, access_genetics, access_heads,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors)
access_keycard_auth, access_sec_doors, access_psychiatrist)
minimal_access = list(access_medical, access_morgue, access_genetics, access_heads,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors)
access_keycard_auth, access_sec_doors, access_psychiatrist)
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
@@ -48,8 +48,8 @@
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
minimal_access = list(access_medical, access_morgue, access_surgery)
alt_titles = list("Surgeon","Emergency Physician","Nurse","Orderly")
minimal_access = list(access_medical, access_morgue, access_surgery, access_virology)
alt_titles = list("Surgeon","Emergency Physician","Nurse","Virologist")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -74,11 +74,12 @@
if("Medical Doctor")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
if("Orderly")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/purple(H), slot_w_uniform)
if("Nurse")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nursesuit(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/head/nursehat(H), slot_head)
if(H.gender == FEMALE)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nursesuit(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/head/nursehat(H), slot_head)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/purple(H), slot_w_uniform)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
@@ -151,7 +152,7 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
/datum/job/virologist
/*/datum/job/virologist
title = "Virologist"
flag = VIROLOGIST
department_flag = MEDSCI
@@ -182,4 +183,36 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
return 1*/
/datum/job/psychiatrist
title = "Psychiatrist"
flag = PSYCHIATRIST
department_flag = MEDSCI
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_psychiatrist)
minimal_access = list(access_medical, access_psychiatrist)
alt_titles = list("Psychologist")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_ears)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
+1 -1
View File
@@ -74,7 +74,7 @@
selection_color = "#ffeeff"
access = list(access_robotics, access_tox, access_tox_storage, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access.
minimal_access = list(access_robotics, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access.
alt_titles = list("Biomedical Engineer","Mechatronic Engineer")
alt_titles = list("Biomechanical Engineer","Mechatronic Engineer")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
+26
View File
@@ -324,6 +324,25 @@ var/global/datum/controller/occupations/job_master
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
H.loc = S.loc
//give them an account in the station database
if(centcomm_account_db)
var/datum/money_account/M = centcomm_account_db.add_account(H.real_name, starting_funds = rand(50,500)*10, pre_existing = 1)
if(H.mind)
var/remembered_info = ""
remembered_info += "<b>Your account number is:</b> #[M.account_number]<br>"
remembered_info += "<b>Your account pin is:</b> [M.remote_access_pin]<br>"
remembered_info += "<b>Your account funds are:</b> $[M.money]<br>"
if(M.transaction_log.len)
var/datum/transaction/T = M.transaction_log[1]
remembered_info += "<b>Your account was created:</b> [T.time], [T.date] at [T.source_terminal]<br>"
H.mind.store_memory(remembered_info)
H.mind.initial_account = M
spawn(0)
H << "\blue<b>Your account number is: [M.account_number], your account pin is: [M.remote_access_pin]</b>"
var/alt_title = null
if(H.mind)
H.mind.assigned_role = rank
@@ -385,13 +404,20 @@ var/global/datum/controller/occupations/job_master
C.rank = rank
C.assignment = title ? title : rank
C.name = "[C.registered_name]'s ID Card ([C.assignment])"
//put the player's account number onto the ID
if(H.mind && H.mind.initial_account)
C.associated_account_number = H.mind.initial_account.account_number
H.equip_to_slot_or_del(C, slot_wear_id)
H.equip_to_slot_or_del(new /obj/item/device/pda(H), slot_belt)
if(locate(/obj/item/device/pda,H))
var/obj/item/device/pda/pda = locate(/obj/item/device/pda,H)
pda.owner = H.real_name
pda.ownjob = C.assignment
pda.name = "PDA-[H.real_name] ([pda.ownjob])"
return 1
+2 -1
View File
@@ -23,6 +23,7 @@ var/const/CMO =(1<<3)
var/const/DOCTOR =(1<<4)
var/const/GENETICIST =(1<<5)
var/const/VIROLOGIST =(1<<6)
var/const/PSYCHIATRIST =(1<<7)
var/const/CIVILIAN =(1<<2)
@@ -75,7 +76,7 @@ var/list/medical_positions = list(
"Chief Medical Officer",
"Medical Doctor",
"Geneticist",
"Virologist",
"Psychiatrist",
"Chemist"
)
+79 -41
View File
@@ -12,7 +12,7 @@
brute_dam_coeff = 0.5
// weight = 1.0E7
req_one_access = list(access_security, access_forensics_lockers)
var/mob/living/carbon/target
var/mob/target
var/oldtarget_name
var/threatlevel = 0
var/target_lastloc //Loc of target when arrested.
@@ -22,6 +22,7 @@
var/idcheck = 0 //If false, all station IDs are authorized for weapons.
var/check_records = 1 //Does it check security records?
var/arrest_type = 0 //If true, don't handcuff
var/next_harm_time = 0
var/mode = 0
#define SECBOT_IDLE 0 // idle
@@ -219,30 +220,47 @@ Auto Patrol: []"},
if(target) // make sure target exists
if(get_dist(src, src.target) <= 1) // if right next to perp
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
src.icon_state = "secbot-c"
spawn(2)
src.icon_state = "secbot[src.on]"
var/mob/living/carbon/M = src.target
var/maxstuns = 4
if(istype(M, /mob/living/carbon/human))
if(M.stuttering < 10 && (!(HULK in M.mutations)))
if(istype(src.target,/mob/living/carbon))
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
src.icon_state = "secbot-c"
spawn(2)
src.icon_state = "secbot[src.on]"
var/mob/living/carbon/M = src.target
var/maxstuns = 4
if(istype(M, /mob/living/carbon/human))
if(M.stuttering < 10 && (!(HULK in M.mutations)))
M.stuttering = 10
M.Stun(10)
M.Weaken(10)
else
M.Weaken(10)
M.stuttering = 10
M.Stun(10)
M.Weaken(10)
else
M.Weaken(10)
M.stuttering = 10
M.Stun(10)
maxstuns--
if(maxstuns <= 0)
target = null
visible_message("\red <B>[src.target] has been stunned by [src]!</B>")
M.Stun(10)
maxstuns--
if(maxstuns <= 0)
target = null
visible_message("\red <B>[src.target] has been stunned by [src]!</B>")
mode = SECBOT_PREP_ARREST
src.anchored = 1
src.target_lastloc = M.loc
return
mode = SECBOT_PREP_ARREST
src.anchored = 1
src.target_lastloc = M.loc
return
else if(istype(src.target,/mob/living/simple_animal))
//just harmbaton them until dead
if(world.time > next_harm_time)
next_harm_time = world.time + 15
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
visible_message("\red <B>[src] beats [src.target] with the stun baton!</B>")
src.icon_state = "secbot-c"
spawn(2)
src.icon_state = "secbot[src.on]"
var/mob/living/simple_animal/S = src.target
S.AdjustStunned(10)
S.adjustBruteLoss(15)
if(S.stat)
src.frustration = 8
playsound(src.loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
else // not next to perp
var/turf/olddist = get_dist(src, src.target)
@@ -251,6 +269,8 @@ Auto Patrol: []"},
src.frustration++
else
src.frustration = 0
else
src.frustration = 8
if(SECBOT_PREP_ARREST) // preparing to arrest target
@@ -261,19 +281,22 @@ Auto Patrol: []"},
return
if(istype(src.target,/mob/living/carbon))
if(!src.target.handcuffed && !src.arrest_type)
var/mob/living/carbon/C = target
if(!C.handcuffed && !src.arrest_type)
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
mode = SECBOT_ARREST
visible_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>")
spawn(60)
if(get_dist(src, src.target) <= 1)
if(src.target.handcuffed)
return
/*if(src.target.handcuffed)
return*/
if(istype(src.target,/mob/living/carbon))
target.handcuffed = new /obj/item/weapon/handcuffs(target)
target.update_inv_handcuffed() //update the handcuffs overlay
C = target
if(!C.handcuffed)
C.handcuffed = new /obj/item/weapon/handcuffs(target)
C.update_inv_handcuffed() //update the handcuffs overlay
mode = SECBOT_IDLE
src.target = null
@@ -284,6 +307,7 @@ Auto Patrol: []"},
playsound(src.loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
// var/arrest_message = pick("Have a secure day!","I AM THE LAW.", "God made tomorrow for the crooks we don't catch today.","You can't outrun a radio.")
// src.speak(arrest_message)
else
mode = SECBOT_IDLE
src.target = null
@@ -293,10 +317,16 @@ Auto Patrol: []"},
if(SECBOT_ARREST) // arresting
if(!target || target.handcuffed)
if(!target || !istype(target, /mob/living/carbon))
src.anchored = 0
mode = SECBOT_IDLE
return
else
var/mob/living/carbon/C = target
if(!C.handcuffed)
src.anchored = 0
mode = SECBOT_IDLE
return
if(SECBOT_START_PATROL) // start a patrol
@@ -560,27 +590,35 @@ Auto Patrol: []"},
/obj/machinery/bot/secbot/proc/look_for_perp()
src.anchored = 0
for (var/mob/living/carbon/C in view(7,src)) //Let's find us a criminal
if((C.stat) || (C.handcuffed))
continue
for (var/mob/living/M in view(7,src)) //Let's find us a criminal
if(istype(M, /mob/living/carbon))
var/mob/living/carbon/C = M
if((C.stat) || (C.handcuffed))
continue
if((C.name == src.oldtarget_name) && (world.time < src.last_found + 100))
continue
if((C.name == src.oldtarget_name) && (world.time < src.last_found + 100))
continue
if(istype(C, /mob/living/carbon/human))
src.threatlevel = src.assess_perp(C)
else if((src.idcheck) && (istype(C, /mob/living/carbon/monkey)))
src.threatlevel = 4
if(istype(C, /mob/living/carbon/human))
src.threatlevel = src.assess_perp(C)
else if((src.idcheck) && (istype(C, /mob/living/carbon/monkey)))
src.threatlevel = 4
else if(istype(M, /mob/living/simple_animal/hostile))
if(M.stat == DEAD)
continue
else
src.threatlevel = 4
if(!src.threatlevel)
continue
else if(src.threatlevel >= 4)
src.target = C
src.oldtarget_name = C.name
src.target = M
src.oldtarget_name = M.name
src.speak("Level [src.threatlevel] infraction alert!")
playsound(src.loc, pick('sound/voice/bcriminal.ogg', 'sound/voice/bjustice.ogg', 'sound/voice/bfreeze.ogg'), 50, 0)
src.visible_message("<b>[src]</b> points at [C.name]!")
src.visible_message("<b>[src]</b> points at [M.name]!")
mode = SECBOT_HUNT
spawn(0)
process() // ensure bot quickly responds to a perp
+44 -7
View File
@@ -51,14 +51,24 @@
if (!( ticker ))
return
if (mode) // accessing crew manifest
var/crew = ""
dat += "<h4>Crew Manifest</h4>"
dat += "Entries cannot be modified from this terminal.<br><br>"
if(data_core)
dat += data_core.get_manifest(0) // make it monochrome
dat += "<br>"
dat += "<a href='?src=\ref[src];choice=print'>Print</a><br>"
dat += "<br>"
dat += "<a href='?src=\ref[src];choice=mode;mode_target=0'>Access ID modification console.</a><br>"
/*var/crew = ""
var/list/L = list()
for (var/datum/data/record/t in data_core.general)
var/R = t.fields["name"] + " - " + t.fields["rank"]
L += R
for(var/R in sortList(L))
crew += "[R]<br>"
dat = "<tt><b>Crew Manifest:</b><br>Please use security record computer to modify entries.<br><br>[crew]<a href='?src=\ref[src];choice=print'>Print</a><br><br><a href='?src=\ref[src];choice=mode;mode_target=0'>Access ID modification console.</a><br></tt>"
crew += "[R]<br>"*/
//dat = "<tt><b>Crew Manifest:</b><br>Please use security record computer to modify entries.<br><br>[crew]<a href='?src=\ref[src];choice=print'>Print</a><br><br><a href='?src=\ref[src];choice=mode;mode_target=0'>Access ID modification console.</a><br></tt>"
else
var/header = "<div align='center'><b>Identification Card Modifier</b></div>"
@@ -114,6 +124,14 @@
var nameField = document.getElementById('namefield');
nameField.style.backgroundColor = "#DDFFDD";
}
function markAccountGreen(){
var nameField = document.getElementById('accountfield');
nameField.style.backgroundColor = "#DDFFDD";
}
function markAccountRed(){
var nameField = document.getElementById('accountfield');
nameField.style.backgroundColor = "#FFDDDD";
}
function showAll(){
var allJobsSlot = document.getElementById('alljobsslot');
allJobsSlot.innerHTML = "<a href='#' onclick='hideAll()'>hide</a><br>"+ "[jobs_all]";
@@ -129,10 +147,16 @@
carddesc += "<b>registered_name:</b> <input type='text' id='namefield' name='reg' value='[target_owner]' style='width:250px; background-color:white;' onchange='markRed()'>"
carddesc += "<input type='submit' value='Rename' onclick='markGreen()'>"
carddesc += "</form>"
carddesc += "<form name='accountnum' action='?src=\ref[src]' method='get'>"
carddesc += "<input type='hidden' name='src' value='\ref[src]'>"
carddesc += "<input type='hidden' name='choice' value='account'>"
carddesc += "<b>Stored account number:</b> <input type='text' id='accountfield' name='account' value='[modify.associated_account_number]' style='width:250px; background-color:white;' onchange='markAccountRed()'>"
carddesc += "<input type='submit' value='Rename' onclick='markAccountGreen()'>"
carddesc += "</form>"
carddesc += "<b>Assignment:</b> "
var/jobs = "<span id='alljobsslot'><a href='#' onclick='showAll()'>[target_rank]</a></span>" //CHECK THIS
var/accesses = ""
if(istype(src,/obj/machinery/computer/card/centcom))
accesses += "<h5>Central Command:</h5>"
@@ -260,6 +284,13 @@
modify.registered_name = temp_name
else
src.visible_message("<span class='notice'>[src] buzzes rudely.</span>")
if ("account")
if (authenticated)
var/t2 = modify
//var/t1 = input(usr, "What name?", "ID computer", null) as text
if ((authenticated && modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
var/account_num = text2num(href_list["account"])
modify.associated_account_number = account_num
if ("mode")
mode = text2num(href_list["mode_target"])
if ("print")
@@ -267,13 +298,19 @@
printing = 1
sleep(50)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( loc )
var/t1 = "<B>Crew Manifest:</B><BR>"
/*var/t1 = "<B>Crew Manifest:</B><BR>"
var/list/L = list()
for (var/datum/data/record/t in data_core.general)
var/R = t.fields["name"] + " - " + t.fields["rank"]
L += R
for(var/R in sortList(L))
t1 += "[R]<br>"
t1 += "[R]<br>"*/
var/t1 = "<h4>Crew Manifest</h4>"
t1 += "<br>"
if(data_core)
t1 += data_core.get_manifest(0) // make it monochrome
P.info = t1
P.name = "paper- 'Crew Manifest'"
printing = null
+4 -5
View File
@@ -10,7 +10,6 @@
var/temperature_archived
var/mob/living/carbon/occupant = null
var/beaker = null
var/next_trans = 0
var/current_heat_capacity = 50
@@ -164,12 +163,12 @@
var/heal_brute = occupant.getBruteLoss() ? min(1, 20/occupant.getBruteLoss()) : 0
var/heal_fire = occupant.getFireLoss() ? min(1, 20/occupant.getFireLoss()) : 0
occupant.heal_organ_damage(heal_brute,heal_fire)
if(beaker && (next_trans == 0))
var/has_cryo = occupant.reagents.get_reagent_amount("cryoxadone") >= 1
var/has_clonexa = occupant.reagents.get_reagent_amount("clonexadone") >= 1
var/has_cryo_medicine = has_cryo || has_clonexa
if(beaker && !has_cryo_medicine)
beaker:reagents.trans_to(occupant, 1, 10)
beaker:reagents.reaction(occupant)
next_trans++
if(next_trans == 10)
next_trans = 0
/obj/machinery/atmospherics/unary/cryo_cell/proc/heat_gas_contents()
if(air_contents.total_moles() < 1)
+8
View File
@@ -190,6 +190,12 @@
targeting_active = 1
target()
targeting_active = 0
if(prob(15))
if(prob(50))
playsound(src.loc, 'sound/effects/turret/move1.wav', 60, 1)
else
playsound(src.loc, 'sound/effects/turret/move2.wav', 60, 1)
else if(!isPopping())//else, pop down
if(!isDown())
popDown()
@@ -244,6 +250,7 @@
if ((!isPopping()) || src.popping==-1)
invisibility = 0
popping = 1
playsound(src.loc, 'sound/effects/turret/open.wav', 60, 1)
if (src.cover!=null)
flick("popup", src.cover)
src.cover.icon_state = "openTurretCover"
@@ -253,6 +260,7 @@
/obj/machinery/turret/proc/popDown()
if ((!isPopping()) || src.popping==1)
popping = -1
playsound(src.loc, 'sound/effects/turret/open.wav', 60, 1)
if (src.cover!=null)
flick("popdown", src.cover)
src.cover.icon_state = "turretCover"
+1 -1
View File
@@ -914,7 +914,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
user.show_message("\blue Localized Damage, Brute/Burn:",1)
if(length(damaged)>0)
for(var/datum/organ/external/org in damaged)
user.show_message(text("\blue \t []: []\blue-[]",capitalize(org.getDisplayName()),(org.brute_dam > 0)?"\red [org.brute_dam]":0,(org.burn_dam > 0)?"\red [org.burn_dam]":0),1)
user.show_message(text("\blue \t []: []\blue-[]",capitalize(org.display_name),(org.brute_dam > 0)?"\red [org.brute_dam]":0,(org.burn_dam > 0)?"\red [org.burn_dam]":0),1)
else
user.show_message("\blue \t Limbs are OK.",1)
+3 -3
View File
@@ -112,7 +112,7 @@ MASS SPECTROMETER
if(length(damaged)>0)
for(var/datum/organ/external/org in damaged)
user.show_message(text("\blue \t []: [][]\blue - []", \
capitalize(org.getDisplayName()), \
capitalize(org.display_name), \
(org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \
(org.status & ORGAN_BLEEDING)?"\red <b>\[Bleeding\]</b>":"\t", \
(org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" :0),1)
@@ -146,7 +146,7 @@ MASS SPECTROMETER
var/mob/living/carbon/human/H = M
for(var/name in H.organs_by_name)
var/datum/organ/external/e = H.organs_by_name[name]
var/limb = e.getDisplayName()
var/limb = e.display_name
if(e.status & ORGAN_BROKEN)
if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!(e.status & ORGAN_SPLINTED)))
user << "\red Unsecured fracture in subject [limb]. Splinting recommended for transport."
@@ -328,4 +328,4 @@ MASS SPECTROMETER
name = "advanced mass-spectrometer"
icon_state = "adv_spectrometer"
details = 1
origin_tech = "magnets=4;biotech=2"
origin_tech = "magnets=4;biotech=2"
+1 -1
View File
@@ -48,7 +48,7 @@
if (W.current_stage <= W.max_bleeding_stage)
user.visible_message( "\blue [user] bandages [W.desc] on [M]'s [affecting.display_name].", \
"\blue You bandage [W.desc] on [M]'s [affecting.display_name]." )
H.add_side_effect("Itch")
//H.add_side_effect("Itch")
else if (istype(W,/datum/wound/bruise))
user.visible_message( "\blue [user] places bruise patch over [W.desc] on [M]'s [affecting.display_name].", \
"\blue You place bruise patch over [W.desc] on [M]'s [affecting.display_name]." )
@@ -73,6 +73,8 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("RUST fuel assembly port frame", /obj/item/rust_fuel_assembly_port_frame, 12, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("RUST fuel compressor frame", /obj/item/rust_fuel_compressor_frame, 12, time = 50, one_per_turf = 1), \
)
/obj/item/stack/sheet/plasteel
@@ -180,33 +180,39 @@ Implant Specifics:<BR>"}
switch (severity)
if (2.0) //Weak EMP will make implant tear limbs off.
if (prob(50))
if (ishuman(imp_in) && part)
imp_in.visible_message("\red Something beeps inside [imp_in][part ? "'s [part.display_name]" : ""]!")
playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
spawn(25)
if (ishuman(imp_in) && part)
//No tearing off these parts since it's pretty much killing
//and you can't replace groins
if (istype(part,/datum/organ/external/chest) || \
istype(part,/datum/organ/external/groin) || \
istype(part,/datum/organ/external/head))
part.createwound(BRUISE, 60) //mangle them instead
else
part.droplimb(1)
explosion(get_turf(imp_in), -1, -1, 2, 3, 3)
del(src)
small_boom()
if (1.0) //strong EMP will melt implant either making it go off, or disarming it
if (prob(50))
activate() //50% chance of bye bye
else
meltdown() //50% chance of implant disarming
if (prob(70))
if (prob(50))
small_boom()
else
if (prob(50))
activate() //50% chance of bye bye
else
meltdown() //50% chance of implant disarming
spawn (20)
malfunction--
islegal()
return 0
proc/small_boom()
if (ishuman(imp_in) && part)
imp_in.visible_message("\red Something beeps inside [imp_in][part ? "'s [part.display_name]" : ""]!")
playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
spawn(25)
if (ishuman(imp_in) && part)
//No tearing off these parts since it's pretty much killing
//and you can't replace groins
if (istype(part,/datum/organ/external/chest) || \
istype(part,/datum/organ/external/groin) || \
istype(part,/datum/organ/external/head))
part.createwound(BRUISE, 60) //mangle them instead
else
part.droplimb(1)
explosion(get_turf(imp_in), -1, -1, 2, 3, 3)
del(src)
/obj/item/weapon/implant/chem
name = "chem"
desc = "Injects things."
@@ -440,7 +446,10 @@ the implant may become unstable and either pre-maturely inject the subject or si
activate()
var/turf/t = get_turf(src)
src.scanned.loc = t
if (imp_in)
imp_in.put_in_hands(scanned)
else
scanned.loc = t
del src
implanted(mob/source as mob)
@@ -1,7 +1,7 @@
/obj/item/weapon/storage/wallet
name = "wallet"
desc = "It can hold a few small and personal things."
storage_slots = 4
storage_slots = 10
icon_state = "wallet"
w_class = 2
can_hold = list(
+10
View File
@@ -265,6 +265,16 @@
AH.try_build(src)
return
else if(istype(W,/obj/item/rust_fuel_compressor_frame))
var/obj/item/rust_fuel_compressor_frame/AH = W
AH.try_build(src)
return
else if(istype(W,/obj/item/rust_fuel_assembly_port_frame))
var/obj/item/rust_fuel_assembly_port_frame/AH = W
AH.try_build(src)
return
//Poster stuff
else if(istype(W,/obj/item/weapon/contraband/poster))
place_poster(W,user)
+15 -12
View File
@@ -41,22 +41,25 @@ var/global/normal_ooc_colour = "#002eb8"
log_ooc("[mob.name]/[key] : [msg]")
var/display_colour = normal_ooc_colour
if(holder && !holder.fakekey)
display_colour = "#0099cc" //light blue
if(holder.rights & R_MOD)
display_colour = "#184880" //dark blue
else if(holder.rights & R_ADMIN)
if(config.allow_admin_ooccolor)
display_colour = src.prefs.ooccolor
else
display_colour = "#b82e00" //orange
for(var/client/C in clients)
if(C.prefs.toggles & CHAT_OOC)
var/display_name = src.key
var/display_colour = normal_ooc_colour
if(holder)
if(holder.fakekey)
if(C.holder)
display_name = "[holder.fakekey]/([src.key])"
else
display_name = holder.fakekey
else if(config.allow_admin_ooccolor)
display_colour = src.prefs.ooccolor
if(holder.fakekey)
if(C.holder)
display_name = "[holder.fakekey]/([src.key])"
else
display_colour = "#b82e00"
display_name = holder.fakekey
C << "<font color='[display_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>"
/*
+21 -9
View File
@@ -46,11 +46,12 @@
set category = "Admin"
set name = "Adminwho"
var/msg = "<b>Current Admins:</b>\n"
var/msg = ""
var/num_mods_online = 0
var/num_admins_online = 0
if(holder)
for(var/client/C in admins)
if(C.holder.rank != "Moderator")
if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights))
msg += "\t[C] is a [C.holder.rank]"
if(C.holder.fakekey)
@@ -66,26 +67,35 @@
if(C.is_afk())
msg += " (AFK)"
msg += "\n"
num_admins_online++
else
num_mods_online++
else
for(var/client/C in admins)
if(C.holder.rank != "Moderator")
if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights))
if(!C.holder.fakekey)
msg += "\t[C] is a [C.holder.rank]\n"
num_admins_online++
else
num_mods_online++
msg += "<b>There are [num_admins_online] administrators online</b>\n"
msg = "<b>Current Admins ([num_admins_online]):</b>\n" + msg
msg += "<b>There are also [num_mods_online] moderators online.</b> To view online moderators, type 'modwho'\n"
src << msg
/client/verb/modwho()
set category = "Admin"
set name = "Modwho"
var/msg = "<b>Current Moderators:</b>\n"
var/msg = ""
var/num_admins_online = 0
var/num_mods_online = 0
if(holder)
for(var/client/C in admins)
if(C.holder.rank == "Moderator")
if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights))
num_admins_online++
else
msg += "\t[C] is a [C.holder.rank]"
if(isobserver(C.mob))
@@ -101,9 +111,11 @@
num_mods_online++
else
for(var/client/C in admins)
if(C.holder.rank == "Moderator")
if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights))
num_admins_online++
else
msg += "\t[C] is a [C.holder.rank]\n"
num_mods_online++
msg += "<b>There are [num_mods_online] moderators online</b>\n"
msg = "<b>Current Moderators ([num_mods_online]):</b>\n" + msg
msg += "<b>There are also [num_admins_online] admins online.</b> To view online admins, type 'adminwho'\n"
src << msg
+1 -1
View File
@@ -641,7 +641,7 @@ var/list/admin_verbs_mod = list(
if(!istype(M, /mob/living/carbon/human))
usr << "\red You can only do this to humans!"
return
switch(alert("Are you sure you wish to edit this mob's appearance? Skrell, Soghun and Tajaran can result in unintended consequences.",,"Yes","No"))
switch(alert("Are you sure you wish to edit this mob's appearance? Skrell, Unathi and Tajaran can result in unintended consequences.",,"Yes","No"))
if("No")
return
var/new_facial = input("Please select facial hair color.", "Character Generation") as color
+8 -6
View File
@@ -74,7 +74,7 @@
var/recieve_color = "purple"
var/send_pm_type = ""
var/recieve_pm_type = "Player"
//usr.client.holder.rights
if(holder)
//mod PMs are maroon
@@ -91,17 +91,17 @@
src << "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>"
return
var/recieve_message = "<font color='[recieve_color]'>[recieve_pm_type] PM from-<b>[key_name(src, C, 1)]</b>: [msg]</font>"
var/recieve_message = ""
if(holder && !C.holder)
recieve_message = "<font color='[recieve_color]' size='4'><b>-- Administrator private message --</b></font>\n" + recieve_message
recieve_message = "<font color='[recieve_color]' size='4'><b>-- Administrator private message --</b></font>\n"
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
if(config.popup_admin_pm)
spawn(0) //so we don't hold the caller proc up
var/sender = src
var/sendername = key
var/reply = input(C, msg,"Admin PM from-[sendername]", "") as text|null //show message and await a reply
var/reply = input(C, msg,"[recieve_pm_type] PM from-[sendername]", "") as text|null //show message and await a reply
if(C && reply)
if(sender)
C.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
@@ -109,8 +109,9 @@
adminhelp(reply) //sender has left, adminhelp instead
return
recieve_message = "<font color='[recieve_color]'>[recieve_pm_type] PM from-<b>[key_name(src, C, C.holder ? 1 : 0)]</b>: [msg]</font>"
C << recieve_message
src << "<font color='blue'>[send_pm_type] PM to-<b>[key_name(C, src, 1)]</b>: [msg]</font>"
src << "<font color='blue'>[send_pm_type] PM to-<b>[key_name(C, src, holder ? 1 : 0)]</b>: [msg]</font>"
/*if(holder && !C.holder)
C.last_pm_recieved = world.time
@@ -177,6 +178,7 @@
//we don't use message_admins here because the sender/receiver might get it too
for(var/client/X in admins)
//check client/X is an admin and isn't the sender or recipient
//only admins can see PMs
if(X == C || X == src)
continue
if(X.key!=key && X.key!=C.key && (X.holder.rights & R_ADMIN) || (X.holder.rights & R_MOD) )
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;[key_name(C, X, 0)]:</B> \blue [msg]</font>" //inform X
+18
View File
@@ -790,6 +790,24 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
if("emergency rescue team")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "Emergency Rescue Team"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
if("special ops officer")
M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate/combat(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/swat/officer(M), slot_wear_suit)
+4 -4
View File
@@ -768,8 +768,8 @@ datum/preferences
var/prev_species = species
var/whitelisted = 0
if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it!
if(is_alien_whitelisted(user, "Soghun")) //Check for Soghun and admins
new_species += "Soghun"
if(is_alien_whitelisted(user, "Soghun")) //Check for Unathi and admins
new_species += "Unathi"
whitelisted = 1
if(is_alien_whitelisted(user, "Tajaran")) //Check for Tajaran and admins
new_species += "Tajaran"
@@ -782,7 +782,7 @@ datum/preferences
alert(user, "You cannot change your species as you need to be whitelisted. If you wish to be whitelisted contact an admin in-game, on the forums, or on IRC.")
else //Not using the whitelist? Aliens for everyone!
new_species += "Tajaran"
new_species += "Soghun"
new_species += "Unathi"
new_species += "Skrell"
species = input("Please select a species", "Character Generation", null) in new_species
@@ -843,7 +843,7 @@ datum/preferences
b_type = new_b_type
if("hair")
if(species == "Human" || species == "Soghun")
if(species == "Human" || species == "Unathi")
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as color|null
if(new_hair)
r_hair = hex2num(copytext(new_hair, 2, 4))
+14 -10
View File
@@ -1,19 +1,23 @@
/obj/item/clothing/head/helmet/space/helmet_soghun_cheap
/obj/item/clothing/head/helmet/space/unathi
var/up = 0 //So Unathi helmets play nicely with the weldervision check.
/obj/item/clothing/head/helmet/space/unathi/helmet_cheap
name = "NT breacher helmet"
desc = "Hey! Watch it with that thing! It's a knock-off of a soghun battle-helm, and that spike could put someone's eye out."
icon_state = "sog_helm_cheap"
item_state = "sog_helm_cheap"
color = "sog_helm_cheap"
desc = "Hey! Watch it with that thing! It's a knock-off of a Unathi battle-helm, and that spike could put someone's eye out."
icon_state = "unathi_helm_cheap"
item_state = "unathi_helm_cheap"
color = "unathi_helm_cheap"
armor = list(melee = 40, bullet = 30, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 50)
heat_protection = HEAD
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
/obj/item/clothing/suit/space/rig_soghun_cheap
/obj/item/clothing/suit/space/unathi/rig_cheap
name = "NT breacher chassis"
desc = "A cheap NT knock-off of a soghun battle-rig. Looks like a fish, moves like a fish, steers like a cow."
icon_state = "rig-soghun-cheap"
item_state = "rig-soghun-cheap"
slowdown = 2
desc = "A cheap NT knock-off of a Unathi battle-rig. Looks like a fish, moves like a fish, steers like a cow."
icon_state = "rig-unathi-cheap"
item_state = "rig-unathi-cheap"
slowdown = 3
armor = list(melee = 40, bullet = 30, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 50)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
+15
View File
@@ -0,0 +1,15 @@
//Unathi clothing.
/obj/item/clothing/suit/unathi/robe
name = "roughspun robes"
desc = "A traditional Unathi garment."
icon_state = "robe-unathi"
item_state = "robe-unathi"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
/obj/item/clothing/suit/unathi/mantle
name = "hide mantle"
desc = "A rather grisly selection of cured hides and skin, sewn together to form a ragged mantle."
icon_state = "mantle-unathi"
item_state = "mantle-unathi"
body_parts_covered = UPPER_TORSO
+23 -13
View File
@@ -4,6 +4,7 @@
oneShot = 1
var/list/obj/machinery/vending/vendingMachines = list()
var/list/obj/machinery/vending/infectedVendingMachines = list()
var/obj/machinery/vending/originMachine
@@ -28,20 +29,29 @@
/datum/event/brand_intelligence/tick()
if(!vendingMachines.len || !originMachine || originMachine.shut_up) //if every machine is infected, or if the original vending machine is missing or has it's voice switch flipped
end()
kill()
return
if(IsMultiple(activeFor, 3))
var/obj/machinery/vending/infectedMachine = pick(vendingMachines)
vendingMachines.Remove(infectedMachine)
infectedMachine.shut_up = 0
infectedMachine.shoot_inventory = 1
if(IsMultiple(activeFor, 5))
if(prob(25))
var/obj/machinery/vending/infectedMachine = pick(vendingMachines)
vendingMachines.Remove(infectedMachine)
infectedVendingMachines.Add(infectedMachine)
infectedMachine.shut_up = 0
infectedMachine.shoot_inventory = 1
if(IsMultiple(activeFor, 12))
originMachine.speak(pick("Try our aggressive new marketing strategies!", \
"You should buy products to feed your lifestyle obession!", \
"Consume!", \
"Your money can buy happiness!", \
"Engage direct marketing!", \
"Advertising is legalized lying! But don't let that put you off our great deals!", \
"You don't want to buy anything? Yeah, well I didn't want to buy your mom either."))
if(IsMultiple(activeFor, 12))
originMachine.speak(pick("Try our aggressive new marketing strategies!", \
"You should buy products to feed your lifestyle obession!", \
"Consume!", \
"Your money can buy happiness!", \
"Engage direct marketing!", \
"Advertising is legalized lying! But don't let that put you off our great deals!", \
"You don't want to buy anything? Yeah, well I didn't want to buy your mom either."))
/datum/event/brand_intelligence/end()
for(var/obj/machinery/vending/infectedMachine in infectedVendingMachines)
if(prob(90))
infectedMachine.shut_up = 1
infectedMachine.shoot_inventory = 0
+11 -2
View File
@@ -1,15 +1,24 @@
/datum/event/carp_migration
announceWhen = 50
oneShot = 1
endWhen = 900
var/list/spawned_carp = list()
/datum/event/carp_migration/setup()
announceWhen = rand(40, 60)
endWhen = rand(600,1200)
/datum/event/carp_migration/announce()
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
/datum/event/carp_migration/start()
for(var/obj/effect/landmark/C in landmarks_list)
if(C.name == "carpspawn")
new /mob/living/simple_animal/hostile/carp(C.loc)
spawned_carp.Add(new /mob/living/simple_animal/hostile/carp(C.loc))
/datum/event/carp_migration/end()
for(var/mob/living/simple_animal/hostile/carp/C in spawned_carp)
if(!C.stat)
var/turf/T = get_turf(C)
if(istype(T, /turf/space))
del(C)
+2 -2
View File
@@ -43,7 +43,7 @@
possibleEvents[/datum/event/carp_migration] = 50 + 50 * active_with_role["Engineer"]
possibleEvents[/datum/event/brand_intelligence] = 50 + 25 * active_with_role["Janitor"]
possibleEvents[/datum/event/rogue_drone] = 50 + 25 * active_with_role["Engineer"] + 25 * active_with_role["Security"]
possibleEvents[/datum/event/rogue_drone] = 25 + 25 * active_with_role["Engineer"] + 25 * active_with_role["Security"]
possibleEvents[/datum/event/infestation] = 50 + 25 * active_with_role["Janitor"]
possibleEvents[/datum/event/communications_blackout] = 50 + 25 * active_with_role["AI"] + active_with_role["Scientist"] * 25
@@ -167,7 +167,7 @@
active_with_role["Janitor"] = 0
for(var/mob/M in player_list)
if(!M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
continue
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "engineering robot module")
+2 -3
View File
@@ -4,7 +4,6 @@ var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event
var/eventTimeLower = 15000 //15 minutes
var/eventTimeUpper = 30000 //30 minutes
var/scheduledEvent = null
@@ -19,7 +18,7 @@ var/scheduledEvent = null
/proc/checkEvent()
if(!scheduledEvent)
//more players = more time between events, less players = less time between events
var/playercount_modifier = 0.5
var/playercount_modifier = 1
switch(player_list.len)
if(0 to 10)
playercount_modifier = 1.2
@@ -63,4 +62,4 @@ var/scheduledEvent = null
if(ispath(type))
new type
message_admins("[key_name_admin(usr)] has triggered an event. ([type])", 1)
message_admins("[key_name_admin(usr)] has triggered an event. ([type])", 1)
+3 -1
View File
@@ -83,7 +83,6 @@
vermstring = "lizards"
if(VERM_SPIDERS)
spawn_types = list(/obj/effect/spider/spiderling)
max_number = 6
vermstring = "spiders"
spawn(0)
@@ -92,6 +91,8 @@
var/turf/simulated/floor/T = pick(turfs)
turfs.Remove(T)
num--
if(vermin == VERM_SPIDERS)
var/obj/effect/spider/spiderling/S = new(T)
S.amount_grown = -1
@@ -99,6 +100,7 @@
var/spawn_type = pick(spawn_types)
new spawn_type(T)
/datum/event/infestation/announce()
command_alert("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Vermin infestation")
+1 -1
View File
@@ -188,7 +188,7 @@
status = "MISSING!"
if(status == "")
status = "OK"
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.getDisplayName(),status),1)
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.display_name,status),1)
if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
H.play_xylophone()
else
@@ -919,4 +919,33 @@
src.custom_pain("You feel a stabbing pain in your chest!", 1)
E.ruptured_lungs = 1
/*
/mob/living/carbon/human/verb/simulate()
set name = "sim"
set background = 1
var/damage = input("Wound damage","Wound damage") as num
var/germs = 0
var/tdamage = 0
var/ticks = 0
while (germs < 2501 && ticks < 100000 && round(damage/10)*20)
diary << "VIRUS TESTING: [ticks] : germs [germs] tdamage [tdamage] prob [round(damage/10)*20]"
ticks++
if (prob(round(damage/10)*20))
germs++
if (germs == 100)
world << "Reached stage 1 in [ticks] ticks"
if (germs > 100)
if (prob(10))
damage++
germs++
if (germs == 1000)
world << "Reached stage 2 in [ticks] ticks"
if (germs > 1000)
damage++
germs++
if (germs == 2500)
world << "Reached stage 3 in [ticks] ticks"
world << "Mob took [tdamage] tox damage"
*/
+3 -4
View File
@@ -1260,10 +1260,9 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
if("lizard","slime")
see_in_dark = 3
see_invisible = SEE_INVISIBLE_LEVEL_ONE
if("tajaran")
see_in_dark = 4
if("shadow")
if("shadow","tajaran")
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_ONE
else
see_in_dark = 2
@@ -1403,7 +1402,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
var/masked = 0
if( istype(head, /obj/item/clothing/head/welding) )
if( istype(head, /obj/item/clothing/head/welding) || istype(head, /obj/item/clothing/head/helmet/space/unathi))
var/obj/item/clothing/head/welding/O = head
if(!O.up && tinted_weldhelh)
client.screen += global_hud.darkMask
@@ -222,6 +222,7 @@ proc/get_damage_icon_part(damage_state, body_part)
var/husk_color_mod = rgb(96,88,80)
var/hulk_color_mod = rgb(48,224,40)
var/plant_color_mod = rgb(144,224,144)
var/necrosis_color_mod = rgb(10,50,0)
var/husk = (HUSK in src.mutations) //100% unnecessary -Agouri //nope, do you really want to iterate through src.mutations repeatedly? -Pete
var/fat = (FAT in src.mutations)
@@ -283,6 +284,9 @@ proc/get_damage_icon_part(damage_state, body_part)
temp = new /icon(icobase, "[part.icon_name]")
if(part.status & ORGAN_ROBOT)
temp.GrayScale()
if(part.status & ORGAN_DEAD)
temp.ColorTone(necrosis_color_mod)
temp.SetIntensity(0.7)
else if(!skeleton)
if(husk)
temp.ColorTone(husk_color_mod)
@@ -789,7 +793,7 @@ proc/get_damage_icon_part(damage_state, body_part)
if(!wear_suit || !(wear_suit.flags_inv & HIDEJUMPSUIT) && !istype(wear_suit, /obj/item/clothing/suit/space))
overlays_lying[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "tajtail_l")
overlays_standing[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "tajtail_s")
else if( cur_species == "Soghun")
else if( cur_species == "Unathi")
if(!wear_suit || !(wear_suit.flags_inv & HIDEJUMPSUIT) && !istype(wear_suit, /obj/item/clothing/suit/space))
overlays_lying[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "sogtail_l")
overlays_standing[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "sogtail_s")
+22 -21
View File
@@ -15,6 +15,9 @@ var/list/department_radio_keys = list(
":t" = "Syndicate", "#t" = "Syndicate", ".t" = "Syndicate",
":u" = "Supply", "#u" = "Supply", ".u" = "Supply",
":g" = "changeling", "#g" = "changeling", ".g" = "changeling",
":k" = "skrell", "#k" = "skrell", ".k" = "skrell",
":j" = "tajaran", "#j" = "tajaran", ".j" = "tajaran",
":o" = "soghun", "#o" = "soghun", ".o" = "soghun",
":R" = "right hand", "#R" = "right hand", ".R" = "right hand",
":L" = "left hand", "#L" = "left hand", ".L" = "left hand",
@@ -31,6 +34,9 @@ var/list/department_radio_keys = list(
":T" = "Syndicate", "#T" = "Syndicate", ".T" = "Syndicate",
":U" = "Supply", "#U" = "Supply", ".U" = "Supply",
":G" = "changeling", "#G" = "changeling", ".G" = "changeling",
":K" = "skrell", "#K" = "skrell", ".K" = "skrell",
":J" = "tajaran", "#J" = "tajaran", ".J" = "tajaran",
":O" = "soghun", "#O" = "soghun", ".O" = "soghun",
//kinda localization -- rastaf0
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
@@ -139,27 +145,6 @@ var/list/department_radio_keys = list(
if (!message)
return
//work out if we're speaking skrell or not
var/is_speaking_skrell = 0
if(copytext(message, 1, 3) == ":k" || copytext(message, 1, 3) == ":K")
message = copytext(message, 3)
if(skrell_talk_understand || universal_speak)
is_speaking_skrell = 1
//work out if we're speaking soghun or not
var/is_speaking_soghun = 0
if(copytext(message, 1, 3) == ":o" || copytext(message, 1, 3) == ":O")
message = copytext(message, 3)
if(soghun_talk_understand || universal_speak)
is_speaking_soghun = 1
//work out if we're speaking soghun or not
var/is_speaking_taj = 0
if(copytext(message, 1, 3) == ":j" || copytext(message, 1, 3) == ":J")
message = copytext(message, 3)
if(tajaran_talk_understand || universal_speak)
is_speaking_taj = 1
// :downs:
if (getBrainLoss() >= 60)
message = replacetext(message, " am ", " ")
@@ -191,6 +176,10 @@ var/list/department_radio_keys = list(
*/
var/list/obj/item/used_radios = new
var/is_speaking_skrell = 0
var/is_speaking_soghun = 0
var/is_speaking_taj = 0
switch (message_mode)
if ("headset")
if (src:ears)
@@ -269,6 +258,18 @@ var/list/department_radio_keys = list(
message_range = 1
italics = 1
if ("tajaran")
if(tajaran_talk_understand || universal_speak)
is_speaking_taj = 1
if ("soghun")
if(soghun_talk_understand || universal_speak)
is_speaking_soghun = 1
if ("skrell")
if(skrell_talk_understand || universal_speak)
is_speaking_skrell = 1
if("changeling")
if(mind && mind.changeling)
for(var/mob/Changeling in mob_list)
@@ -34,6 +34,13 @@
for(var/mob/M in view())
M << 'sound/effects/mousesqueek.ogg'
if(prob(0.5) && stat == CONSCIOUS)
stat = UNCONSCIOUS
icon_state = "mouse_[color]_sleep"
if(stat == UNCONSCIOUS && prob(1))
stat = CONSCIOUS
icon_state = "mouse_[color]"
/mob/living/simple_animal/mouse/New()
..()
if(!color)
@@ -46,6 +46,13 @@
stance = HOSTILE_STANCE_ATTACK
T = M
break
if(istype(A, /obj/machinery/bot))
var/obj/machinery/bot/B = A
if (B.health > 0)
stance = HOSTILE_STANCE_ATTACK
T = B
break
return T
@@ -88,6 +95,9 @@
var/obj/mecha/M = target_mob
M.attack_animal(src)
return M
if(istype(target_mob,/obj/machinery/bot))
var/obj/machinery/bot/B = target_mob
B.attack_animal(src)
/mob/living/simple_animal/hostile/proc/LoseTarget()
stance = HOSTILE_STANCE_IDLE
@@ -157,7 +157,7 @@
hostile_drone = 0
walk(src,0)
/mob/living/simple_animal/Die()
/mob/living/simple_animal/hostile/retaliate/malf_drone/Die()
src.visible_message("\blue \icon[src] [src] suddenly breaks apart.")
..()
del(src)
@@ -452,4 +452,8 @@
var/obj/mecha/M = target_mob
if (M.occupant)
return (0)
if (istype(target_mob,/obj/machinery/bot))
var/obj/machinery/bot/B = target_mob
if(B.health > 0)
return (0)
return (1)
+4 -2
View File
@@ -134,7 +134,7 @@ proc/hasorgans(A)
zone = "head"
if("mouth")
zone = "head"
if("l_hand")
/* if("l_hand")
zone = "l_arm"
if("r_hand")
zone = "r_arm"
@@ -144,6 +144,7 @@ proc/hasorgans(A)
zone = "r_leg"
if("groin")
zone = "chest"
*/
return zone
@@ -171,7 +172,7 @@ proc/hasorgans(A)
// you can only miss if your target is standing and not restrained
if(!target.buckled && !target.lying)
var/miss_chance = max(10 + miss_chance_mod, 0)
var/miss_chance = 10
switch(zone)
if("head")
miss_chance = 40
@@ -191,6 +192,7 @@ proc/hasorgans(A)
miss_chance = 50
if("r_foot")
miss_chance = 50
miss_chance = max(miss_chance + miss_chance_mod, 0)
if(prob(miss_chance))
if(prob(70))
return null
+1 -1
View File
@@ -338,7 +338,7 @@
if(is_alien_whitelisted(src, "Tajaran") || !config.usealienwhitelist)
new_character.dna.mutantrace = "tajaran"
new_character.tajaran_talk_understand = 1
if(client.prefs.species == "Soghun")
if(client.prefs.species == "Unathi")
if(is_alien_whitelisted(src, "Soghun") || !config.usealienwhitelist)
new_character.dna.mutantrace = "lizard"
new_character.soghun_talk_understand = 1
@@ -138,7 +138,7 @@ datum/preferences
if(species == "Tajaran")
preview_icon = new /icon('icons/effects/species.dmi', "tajaran_[g]_s")
preview_icon.Blend(new /icon('icons/effects/species.dmi', "tajtail_s"), ICON_OVERLAY)
else if(species == "Soghun")
else if(species == "Unathi")
preview_icon = new /icon('icons/effects/species.dmi', "lizard_[g]_s")
preview_icon.Blend(new /icon('icons/effects/species.dmi', "sogtail_s"), ICON_OVERLAY)
else if(species == "Skrell")
@@ -48,7 +48,7 @@
name = "Bald"
icon_state = "bald"
gender = MALE
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
short
name = "Short Hair" // try to capatilize the names please~
@@ -119,7 +119,7 @@
name = "Pompadour"
icon_state = "hair_pompadour"
gender = MALE
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
quiff
name = "Quiff"
@@ -142,19 +142,19 @@
name = "Beehive"
icon_state = "hair_beehive"
gender = FEMALE
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
bobcurl
name = "Bobcurl"
icon_state = "hair_bobcurl"
gender = FEMALE
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
bob
name = "Bob"
icon_state = "hair_bobcut"
gender = FEMALE
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
bowl
name = "Bowl"
@@ -165,7 +165,7 @@
name = "Buzzcut"
icon_state = "hair_buzzcut"
gender = MALE
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
crew
name = "Crewcut"
@@ -227,7 +227,7 @@
mohawk
name = "Mohawk"
icon_state = "hair_d"
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
jensen
name = "Adam Jensen Hair"
icon_state = "hair_jensen"
@@ -241,7 +241,7 @@
spiky
name = "Spiky"
icon_state = "hair_spikey"
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
kusangi
name = "Kusanagi Hair"
icon_state = "hair_kusanagi"
@@ -306,7 +306,7 @@
name = "Shaved"
icon_state = "bald"
gender = NEUTER
species_allowed = list("Human","Soghun","Tajaran","Skrell")
species_allowed = list("Human","Unathi","Tajaran","Skrell")
watson
name = "Watson Mustache"
@@ -347,7 +347,7 @@
elvis
name = "Elvis Sideburns"
icon_state = "facial_elvis"
species_allowed = list("Human","Soghun")
species_allowed = list("Human","Unathi")
abe
name = "Abraham Lincoln Beard"
@@ -382,11 +382,30 @@
*/
/datum/sprite_accessory/hair
tentacle_m
name = "Skrell Male Tentacles"
icon_state = "skrell_hair_m"
species_allowed = list("Skrell")
gender = MALE
spines_long
name = "Long Unathi Spines"
icon_state = "soghun_longspines"
species_allowed = list("Unathi")
spines_short
name = "Short Unathi Spines"
icon_state = "soghun_shortspines"
species_allowed = list("Unathi")
frills_long
name = "Long Unathi Frills"
icon_state = "soghun_longfrills"
species_allowed = list("Unathi")
frills_short
name = "Short Unathi Frills"
icon_state = "soghun_shortfrill"
species_allowed = list("Unathi")
horns
name = "Unathi Horns"
icon_state = "soghun_horns"
species_allowed = list("Unathi")
tentacle_f
name = "Skrell Female Tentacles"
@@ -499,6 +518,7 @@
name = "Smallsatche"
icon_state = "facial_smallstache"
species_allowed = list("Tajaran")
//skin styles - WIP
//going to have to re-integrate this with surgery
//let the icon_state hold an icon preview for now
@@ -521,11 +541,11 @@
icon = 'icons/mob/human_races/r_tajaran.dmi'
species_allowed = list("Tajaran")
soghun
name = "Default soghun skin"
unathi
name = "Default Unathi skin"
icon_state = "default"
icon = 'icons/mob/human_races/r_lizard.dmi'
species_allowed = list("Soghun")
species_allowed = list("Unathi")
skrell
name = "Default skrell skin"
+1 -1
View File
@@ -50,7 +50,7 @@
for(var/mob/M in player_list)
if(istype(M, /mob/new_player))
continue
if(M.client && M.client.holder && (M.client.prefs.toggles & CHAT_DEAD)) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
if(M.client && M.client.holder && M.client.holder.rights & R_ADMIN && (M.client.prefs.toggles & CHAT_DEAD)) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
M << rendered //Admins can hear deadchat, if they choose to, no matter if they're blind/deaf or not.
else if(M.stat == DEAD)
M.show_message(rendered, 2) //Takes into account blindness and such.
@@ -43,14 +43,14 @@
toxmob(A)
if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/machinery/singularity/)))
A:energy += energy
else if( istype(A,/obj/machinery/rust/particle_catcher) )
var/obj/machinery/rust/particle_catcher/collided_catcher = A
else if( istype(A,/obj/effect/rust_particle_catcher) )
var/obj/effect/rust_particle_catcher/collided_catcher = A
if(particle_type && particle_type != "neutron")
if(collided_catcher.AddParticles(particle_type, 1 + additional_particles))
collided_catcher.parent.AddEnergy(energy,mega_energy)
del (src)
else if( istype(A,/obj/machinery/rust/core) )
var/obj/machinery/rust/core/collided_core = A
else if( istype(A,/obj/machinery/power/rust_core) )
var/obj/machinery/power/rust_core/collided_core = A
if(particle_type && particle_type != "neutron")
if(collided_core.AddParticles(particle_type, 1 + additional_particles))
var/energy_loss_ratio = abs(collided_core.owned_field.frequency - frequency) / 1e9
+27 -4
View File
@@ -1,3 +1,7 @@
#define SPEEDLOADER 0
#define FROM_BOX 1
#define MAGAZINE 2
/obj/item/weapon/gun/projectile
desc = "A classic revolver. Uses 357 ammo"
name = "revolver"
@@ -10,7 +14,7 @@
var/ammo_type = "/obj/item/ammo_casing/a357"
var/list/loaded = list()
var/max_shells = 7
var/load_method = 0 //0 = Single shells or quick loader, 1 = box, 2 = magazine
var/load_method = SPEEDLOADER //0 = Single shells or quick loader, 1 = box, 2 = magazine
var/obj/item/ammo_magazine/empty_mag = null
@@ -45,7 +49,7 @@
var/num_loaded = 0
if(istype(A, /obj/item/ammo_magazine))
if((load_method == 2) && loaded.len) return
if((load_method == MAGAZINE) && loaded.len) return
var/obj/item/ammo_magazine/AM = A
for(var/obj/item/ammo_casing/AC in AM.stored_ammo)
if(loaded.len >= max_shells)
@@ -55,11 +59,11 @@
AM.stored_ammo -= AC
loaded += AC
num_loaded++
if(load_method == 2)
if(load_method == MAGAZINE)
user.remove_from_mob(AM)
empty_mag = AM
empty_mag.loc = src
if(istype(A, /obj/item/ammo_casing) && !load_method)
if(istype(A, /obj/item/ammo_casing) && load_method == SPEEDLOADER)
var/obj/item/ammo_casing/AC = A
if(AC.caliber == caliber && loaded.len < max_shells)
user.drop_item()
@@ -72,6 +76,25 @@
update_icon()
return
/obj/item/weapon/gun/projectile/attack_self(mob/user as mob)
if (loaded.len)
if (load_method == SPEEDLOADER)
var/obj/item/ammo_casing/AC = loaded[1]
loaded -= AC
AC.loc = get_turf(src) //Eject casing onto ground.
user << "\blue You unload shell from \the [src]!"
if (load_method == MAGAZINE)
var/obj/item/ammo_magazine/AM = empty_mag
for (var/obj/item/ammo_casing/AC in loaded)
AM.stored_ammo += AC
loaded -= AC
AM.loc = get_turf(src)
empty_mag = null
user << "\blue You unload magazine from \the [src]!"
else
user << "\red Nothing loaded in \the [src]!"
/obj/item/weapon/gun/projectile/examine()
..()
+16 -20
View File
@@ -74,37 +74,34 @@
loc = A.loc
return 0// nope.avi
var/distance = get_dist(original,loc)
var/distance = get_dist(starting,loc)
//Lower accurancy/longer range tradeoff. Distance matters a lot here, so at
// close distance, actually RAISE the chance to hit.
def_zone = get_zone_with_miss_chance(def_zone, M, -30 + 8*distance)
if(silenced)
if(def_zone)
M << "\red You've been shot in the [parse_zone(def_zone)] by the [src.name]!"
if(!def_zone)
visible_message("\blue \The [src] misses [M] narrowly!")
forcedodge = -1
else
if(!def_zone)
visible_message("\The [src] misses [M] narrowly.")
del(src)
return
if(silenced)
M << "\red You've been shot in the [parse_zone(def_zone)] by the [src.name]!"
else
visible_message("\red [A.name] is hit by the [src.name] in the [parse_zone(def_zone)]!")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
if(istype(firer, /mob))
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>"
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>"
log_attack("<font color='red'>[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src.type]</font>")
msg_admin_attack("ATTACK: [firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src]") //BS12 EDIT ALG
else
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
log_attack("<font color='red'>UNKNOWN shot [M] ([M.ckey]) with a [src.type]</font>")
msg_admin_attack("ATTACK: UNKNOWN shot [M] ([M.ckey]) with a [src]") //BS12 EDIT ALG
if(istype(firer, /mob))
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>"
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>"
log_attack("<font color='red'>[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src.type]</font>")
msg_admin_attack("ATTACK: [firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src]") //BS12 EDIT ALG
else
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
log_attack("<font color='red'>UNKNOWN shot [M] ([M.ckey]) with a [src.type]</font>")
msg_admin_attack("ATTACK: UNKNOWN shot [M] ([M.ckey]) with a [src]") //BS12 EDIT ALG
spawn(0)
if(A)
var/permutation = A.bullet_act(src, def_zone) // searches for return value
if(permutation == -1 || forcedodge) // the bullet passes through a dense object!
if (!forcedodge)
forcedodge = A.bullet_act(src, def_zone) // searches for return value
if(forcedodge == -1) // the bullet passes through a dense object!
bumped = 0 // reset bumped variable!
if(istype(A, /turf))
loc = A
@@ -118,7 +115,6 @@
O.bullet_act(src)
for(var/mob/M in A)
M.bullet_act(src, def_zone)
density = 0
invisibility = 101
del(src)
+38 -32
View File
@@ -20,50 +20,56 @@ var/list/beam_master = list()
process()
var/reference = "\ref[src]" //So we do not have to recalculate it a ton
var/first = 1 //So we don't make the overlay in the same tile as the firer
spawn while(src) //Move until we hit something
spawn(0)
while(!bumped) //Move until we hit something
step_towards(src, current) //Move~
if((!( current ) || loc == current)) //If we pass our target
current = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z)
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
del(src) //Delete if it passes the world edge
return
step_towards(src, current) //Move~
for(var/mob/living/M in loc)
Bump(M) //Bump anyone we touch
if(kill_count < 1)
del(src)
kill_count--
if((!( current ) || loc == current)) //If we pass our target
current = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z)
if(!bumped && !isturf(original))
if(loc == get_turf(original))
if(!(original in permutated))
Bump(original)
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
del(src) //Delete if it passes the world edge
return
if(!first) //Add the overlay as we pass over tiles
var/target_dir = get_dir(src, current) //So we don't call this too much
if(!first) //Add the overlay as we pass over tiles
var/target_dir = get_dir(src, current) //So we don't call this too much
//If the icon has not been added yet
if( !("[icon_state][target_dir]" in beam_master) )
var/image/I = image(icon,icon_state,10,target_dir) //Generate it.
beam_master["[icon_state][target_dir]"] = I //And cache it!
//If the icon has not been added yet
if( !("[icon_state][target_dir]" in beam_master) )
var/image/I = image(icon,icon_state,10,target_dir) //Generate it.
beam_master["[icon_state][target_dir]"] = I //And cache it!
//Finally add the overlay
src.loc.overlays += beam_master["[icon_state][target_dir]"]
//Finally add the overlay
src.loc.overlays += beam_master["[icon_state][target_dir]"]
//Add the turf to a list in the beam master so they can be cleaned up easily.
if(reference in beam_master)
var/list/turf_master = beam_master[reference]
if("[icon_state][target_dir]" in turf_master)
var/list/turfs = turf_master["[icon_state][target_dir]"]
turfs += loc
else
turf_master["[icon_state][target_dir]"] = list(loc)
//Add the turf to a list in the beam master so they can be cleaned up easily.
if(reference in beam_master)
var/list/turf_master = beam_master[reference]
if("[icon_state][target_dir]" in turf_master)
var/list/turfs = turf_master["[icon_state][target_dir]"]
turfs += loc
else
var/list/turfs = list()
turfs["[icon_state][target_dir]"] = list(loc)
beam_master[reference] = turfs
turf_master["[icon_state][target_dir]"] = list(loc)
else
first = 0
var/list/turfs = list()
turfs["[icon_state][target_dir]"] = list(loc)
beam_master[reference] = turfs
else
first = 0
cleanup(reference)
return
Del()
cleanup("\ref[src]")
..()
proc/cleanup(reference) //Waits .3 seconds then removes the overlay.
src = null
sleep(3)
@@ -0,0 +1,92 @@
Methylphenidate
#define ANTIDEPRESSANT_MESSAGE_DELAY 5*60*10
/datum/reagent/antidepressant/methylphenidate
name = "Methylphenidate"
id = "methylphenidate"
description = "Improves the ability to concentrate."
reagent_state = LIQUID
color = "#C8A5DC"
custom_metabolism = 0.01
data = 0
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(src.volume <= 0.1) if(data != -1)
data = -1
M << "\red You lose focus.."
else
if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY)
data = world.time
M << "\blue Your mind feels focused and undivided."
..()
return
/datum/chemical_reaction/methylphenidate
name = "Methylphenidate"
id = "methylphenidate"
result = "methylphenidate"
required_reagents = list("mindbreaker" = 1, "hydrogen" = 1)
result_amount = 3
/datum/reagent/antidepressant/citalopram
name = "citalopram"
id = "Citalopram"
description = "Stabilizes the mind a little."
reagent_state = LIQUID
color = "#C8A5DC"
custom_metabolism = 0.01
data = 0
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(src.volume <= 0.1) if(data != -1)
data = -1
M << "\red Your mind feels a little less stable.."
else
if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY)
data = world.time
M << "\blue Your mind feels stable.. a little stable."
..()
return
/datum/chemical_reaction/citalopram
name = "Citalopram"
id = "citalopram"
result = "citalopram"
required_reagents = list("mindbreaker" = 1, "carbon" = 1)
result_amount = 3
/datum/reagent/antidepressant/paroxetine
name = "paroxetine"
id = "Paroxetine"
description = "Stabilizes the mind greatly, but has a chance of adverse effects."
reagent_state = LIQUID
color = "#C8A5DC"
custom_metabolism = 0.01
data = 0
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(src.volume <= 0.1) if(data != -1)
data = -1
M << "\red Your mind feels much less stable.."
else
if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY)
data = world.time
if(prob(90))
M << "\blue Your mind feels much more stable."
else
M << "\red Your mind breaks apart.."
M.hallucination += 200
..()
return
/datum/chemical_reaction/paroxetine
name = "Paroxetine"
id = "paroxetine"
result = "paroxetine"
required_reagents = list("mindbreaker" = 1, "oxygen" = 1, "inaprovaline" = 1)
result_amount = 3
+64 -10
View File
@@ -19,6 +19,8 @@ datum
var/list/data = null
var/volume = 0
var/nutriment_factor = 0
var/custom_metabolism = REAGENTS_METABOLISM
var/mildly_toxic = 0
//var/list/viruses = list()
var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!)
@@ -68,7 +70,14 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!istype(M, /mob/living))
return //Noticed runtime errors from pacid trying to damage ghosts, this should fix. --NEO
holder.remove_reagent(src.id, REAGENTS_METABOLISM) //By default it slowly disappears.
// Certain elements in too large amounts cause side-effects
if(mildly_toxic && istype(M, /mob/living/carbon/human/))
var/mob/living/carbon/human/H = M
if(H.side_effects.len == 0)
M.add_side_effect(pick("Headache", "Bad Stomach", "Itch"))
holder.remove_reagent(src.id, custom_metabolism) //By default it slowly disappears.
return
on_move(var/mob/M)
@@ -199,6 +208,7 @@ datum
description = "A ubiquitous chemical substance that is composed of hydrogen and oxygen."
reagent_state = LIQUID
color = "#0064C8" // rgb: 0, 100, 200
custom_metabolism = 0.01
reaction_turf(var/turf/simulated/T, var/volume)
if (!istype(T)) return
@@ -309,24 +319,28 @@ datum
description = "A Toxic chemical."
reagent_state = LIQUID
color = "#CF3600" // rgb: 207, 54, 0
custom_metabolism = 0.01
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M.adjustToxLoss(1.5*REM)
// Toxins are really weak, but without being treated, last very long.
M.adjustToxLoss(0.2)
..()
return
cyanide
// Fast and lethal
name = "Cyanide"
id = "cyanide"
description = "A highly toxic chemical."
reagent_state = LIQUID
color = "#CF3600" // rgb: 207, 54, 0
custom_metabolism = 0.4
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M.adjustToxLoss(3*REM)
M.adjustOxyLoss(3*REM)
M.adjustToxLoss(4)
M.adjustOxyLoss(4)
M.sleeping += 1
..()
return
@@ -405,6 +419,8 @@ datum
reagent_state = LIQUID
color = "#E895CC" // rgb: 232, 149, 204
custom_metabolism = 0.1
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(!data) data = 1
@@ -540,12 +556,17 @@ datum
reagent_state = GAS
color = "#808080" // rgb: 128, 128, 128
custom_metabolism = 0.01
copper
name = "Copper"
id = "copper"
description = "A highly ductile metal."
color = "#6E3B08" // rgb: 110, 59, 8
mildly_toxic = 1
custom_metabolism = 0.01
nitrogen
name = "Nitrogen"
id = "nitrogen"
@@ -553,6 +574,9 @@ datum
reagent_state = GAS
color = "#808080" // rgb: 128, 128, 128
mildly_toxic = 1
custom_metabolism = 0.01
hydrogen
name = "Hydrogen"
id = "hydrogen"
@@ -560,6 +584,9 @@ datum
reagent_state = GAS
color = "#808080" // rgb: 128, 128, 128
mildly_toxic = 1
custom_metabolism = 0.01
potassium
name = "Potassium"
id = "potassium"
@@ -567,6 +594,10 @@ datum
reagent_state = SOLID
color = "#A0A0A0" // rgb: 160, 160, 160
mildly_toxic = 1
custom_metabolism = 0.01
mercury
name = "Mercury"
id = "mercury"
@@ -589,6 +620,9 @@ datum
reagent_state = SOLID
color = "#BF8C00" // rgb: 191, 140, 0
mildly_toxic = 1
custom_metabolism = 0.01
carbon
name = "Carbon"
id = "carbon"
@@ -596,6 +630,9 @@ datum
reagent_state = SOLID
color = "#1C1300" // rgb: 30, 20, 0
mildly_toxic = 1
custom_metabolism = 0.01
reaction_turf(var/turf/T, var/volume)
src = null
if(!istype(T, /turf/space))
@@ -634,6 +671,9 @@ datum
reagent_state = SOLID
color = "#808080" // rgb: 128, 128, 128
mildly_toxic = 1
custom_metabolism = 0.01
phosphorus
name = "Phosphorus"
id = "phosphorus"
@@ -641,6 +681,9 @@ datum
reagent_state = SOLID
color = "#832828" // rgb: 131, 40, 40
mildly_toxic = 1
custom_metabolism = 0.01
lithium
name = "Lithium"
id = "lithium"
@@ -826,6 +869,9 @@ datum
reagent_state = LIQUID
color = "#808080" // rgb: 128, 128, 128
mildly_toxic = 1
custom_metabolism = 0.01
nitroglycerin
name = "Nitroglycerin"
id = "nitroglycerin"
@@ -833,6 +879,9 @@ datum
reagent_state = LIQUID
color = "#808080" // rgb: 128, 128, 128
mildly_toxic = 1
custom_metabolism = 0.01
radium
name = "Radium"
id = "radium"
@@ -1403,6 +1452,7 @@ datum
description = "Synaptizine is used to treat various diseases."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
custom_metabolism = 0.01
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -1440,6 +1490,7 @@ datum
description = "Hyronalin is a medicinal drug used to counter the effect of radiation poisoning."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
custom_metabolism = 0.05
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -1453,6 +1504,7 @@ datum
description = "Arithrazine is an unstable medication used for the most extreme cases of radiation poisoning."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
custom_metabolism = 0.05
on_mob_life(var/mob/living/M as mob)
if(M.stat == 2.0)
@@ -1471,6 +1523,7 @@ datum
description = "Alkysine is a drug used to lessen the damage to neurological tissue after a catastrophic injury. Can heal brain tissue."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
custom_metabolism = 0.05
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -1516,11 +1569,11 @@ datum
description = "Hyperzine is a highly effective, long lasting, muscle stimulant."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
custom_metabolism = 0.03
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(prob(5)) M.emote(pick("twitch","blink_r","shiver"))
holder.remove_reagent(src.id, 0.5 * REAGENTS_METABOLISM)
..()
return
@@ -1535,9 +1588,9 @@ datum
if(!M) M = holder.my_atom
if(M.bodytemperature < 170)
M.adjustCloneLoss(-1)
M.adjustOxyLoss(-3)
M.heal_organ_damage(3,3)
M.adjustToxLoss(-3)
M.adjustOxyLoss(-1)
M.heal_organ_damage(1,1)
M.adjustToxLoss(-1)
..()
return
@@ -1564,9 +1617,9 @@ datum
description = "An all-purpose antiviral agent."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
custom_metabolism = 0.01
on_mob_life(var/mob/living/M as mob)//no more mr. panacea
holder.remove_reagent(src.id, 0.2)
on_mob_life(var/mob/living/M as mob)
..()
return
@@ -1612,6 +1665,7 @@ datum
description = "A powerful hallucinogen. Not a thing to be messed with."
reagent_state = LIQUID
color = "#B31008" // rgb: 139, 166, 233
custom_metabolism = 0.05
on_mob_life(var/mob/living/M)
if(!M) M = holder.my_atom
@@ -84,7 +84,7 @@
icon_state = "pill17"
New()
..()
reagents.add_reagent("anti_toxin", 50)
reagents.add_reagent("anti_toxin", 25)
/obj/item/weapon/reagent_containers/pill/tox
name = "Toxins pill"
@@ -134,6 +134,24 @@
..()
reagents.add_reagent("tramadol", 15)
/obj/item/weapon/reagent_containers/pill/methylphenidate
name = "Methylphenidate pill"
desc = "Improves the ability to concentrate."
icon_state = "pill8"
New()
..()
reagents.add_reagent("methylphenidate", 15)
/obj/item/weapon/reagent_containers/pill/citalopram
name = "Citalopram pill"
desc = "Mild anti-depressant."
icon_state = "pill8"
New()
..()
reagents.add_reagent("citalopram", 15)
/obj/item/weapon/reagent_containers/pill/inaprovaline
name = "Inaprovaline pill"
desc = "Used to stabilize patients."
@@ -175,4 +193,4 @@
..()
reagents.add_reagent("impedrezene", 10)
reagents.add_reagent("synaptizine", 5)
reagents.add_reagent("hyperzine", 5)
reagents.add_reagent("hyperzine", 5)
@@ -1,16 +1,4 @@
/obj/item/clothing/suit/bio_suit/anomaly
name = "Anomaly Suit"
desc = "A sealed bio suit capable of resisting exotic alien energies and low pressure environments."
icon_state = "engspace_suit"
item_state = "engspace_suit"
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen, /obj/item/weapon/pickaxe/hand_pick)
/obj/item/clothing/head/bio_hood/anomaly
name = "Anomaly Hood"
desc = "A sealed bio hood capable of resisting exotic alien energies and low pressure environments."
icon_state = "engspace_helmet"
item_state = "engspace_helmet"
/obj/structure/noticeboard/anomaly/New()
notices = 5
icon_state = "nboard05"

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