diff --git a/baystation12.dme b/baystation12.dme
index 855bd5368e..838233ddf5 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -836,7 +836,6 @@
#include "code\modules\events\money_hacker.dm"
#include "code\modules\events\money_lotto.dm"
#include "code\modules\events\money_spam.dm"
-#include "code\modules\events\organ_failure.dm"
#include "code\modules\events\prison_break.dm"
#include "code\modules\events\radiation_storm.dm"
#include "code\modules\events\rogue_drones.dm"
diff --git a/code/WorkInProgress/computer3/NTOS.dm b/code/WorkInProgress/computer3/NTOS.dm
index 0b921ad43b..86157dcc1c 100644
--- a/code/WorkInProgress/computer3/NTOS.dm
+++ b/code/WorkInProgress/computer3/NTOS.dm
@@ -22,20 +22,21 @@
var/dat = "
"}
+
+ dat += generate_status_bar()
var/list/files = list_files()
if(current)
dat +=window(current.name,buttonbar(),filegrid(files))
@@ -175,6 +178,32 @@
usr << browse(dat, "window=\ref[computer];size=670x510")
onclose(usr, "\ref[computer]")
+ // STATUS BAR
+ // Small 16x16 icons representing status of components, etc.
+ // Currently only used by battery icon
+ // TODO: Add more icons!
+/datum/file/program/ntos/proc/generate_status_bar()
+ var/dat = ""
+
+ // Battery level icon
+ switch(computer.check_battery_status())
+ if(-1)
+ dat += "

"
+ if(0 to 5)
+ dat += "

"
+ if(6 to 20)
+ dat += "

"
+ if(21 to 40)
+ dat += "

"
+ if(41 to 60)
+ dat += "

"
+ if(61 to 80)
+ dat += "

"
+ if(81 to 100)
+ dat += "

"
+ dat += "
"
+ return dat
+
/datum/file/program/ntos/Topic(href, list/href_list)
if(!interactable() || ..(href,href_list))
return
diff --git a/code/WorkInProgress/computer3/component.dm b/code/WorkInProgress/computer3/component.dm
index 8dc2ec835b..501bbc973e 100644
--- a/code/WorkInProgress/computer3/component.dm
+++ b/code/WorkInProgress/computer3/component.dm
@@ -91,29 +91,127 @@
return
..(I,user)
- proc/insert(var/obj/item/weapon/card/card)
+ // cardslot.insert(card, slot)
+ // card: The card obj you want to insert (usually your ID)
+ // slot: Which slot to insert into (1: reader, 2: writer, 3: auto), 3 default
+ proc/insert(var/obj/item/weapon/card/card, var/slot = 3)
if(!computer)
return 0
- if(reader != null)
- usr << "There is already something in the slot!"
+ // This shouldn't happen, just in case..
+ if(slot == 2 && !dualslot)
+ usr << "This device has only one card slot"
return 0
- if(istype(card,/obj/item/weapon/card/emag)) // emag reader slot
- usr << "You insert \the [card], and the computer grinds, sparks, and beeps. After a moment, the card ejects itself."
- computer.emagged = 1
- return 1
- var/mob/living/L = usr
- L.drop_item()
- card.loc = src
- reader = card
- proc/remove()
- reader.loc = loc
- var/mob/living/carbon/human/user = usr
- if(istype(user) && !user.get_active_hand())
- user.put_in_hands(reader)
- else
- reader.loc = computer.loc
- reader = null
+ if(istype(card,/obj/item/weapon/card/emag)) // emag reader slot
+ if(!writer)
+ usr << "You insert \the [card], and the computer grinds, sparks, and beeps. After a moment, the card ejects itself."
+ computer.emagged = 1
+ return 1
+ else
+ usr << "You are unable to insert \the [card], as the reader slot is occupied"
+
+ var/mob/living/L = usr
+ switch(slot)
+ if(1)
+ if(equip_to_reader(card, L))
+ usr << "You insert the card into reader slot"
+ else
+ usr << "There is already something in the reader slot."
+ if(2)
+ if(equip_to_writer(card, L))
+ usr << "You insert the card into writer slot"
+ else
+ usr << "There is already something in the reader slot."
+ if(3)
+ if(equip_to_reader(card, L))
+ usr << "You insert the card into reader slot"
+ else if (equip_to_writer(card, L) && dualslot)
+ usr << "You insert the card into writer slot"
+ else if (dualslot)
+ usr << "There is already something in both slots."
+ else
+ usr << "There is already something in the reader slot."
+
+
+ // Usage of insert() preferred, as it also tells result to the user.
+ proc/equip_to_reader(var/obj/item/weapon/card/card, var/mob/living/L)
+ if(!reader)
+ L.drop_item()
+ card.loc = src
+ reader = card
+ return 1
+ return 0
+
+ proc/equip_to_writer(var/obj/item/weapon/card/card, var/mob/living/L)
+ if(!writer && dualslot)
+ L.drop_item()
+ card.loc = src
+ writer = card
+ return 1
+ return 0
+
+ // cardslot.remove(slot)
+ // slot: Which slot to remove card(s) from (1: reader only, 2: writer only, 3: both [works even with one card], 4: reader and if empty then writer ), 3 default
+ proc/remove(var/slot = 3)
+ var/mob/living/L = usr
+ switch(slot)
+ if(1)
+ if (remove_reader(L))
+ L << "You remove the card from reader slot"
+ else
+ L << "There is no card in the reader slot"
+ if(2)
+ if (remove_writer(L))
+ L << "You remove the card from writer slot"
+ else
+ L << "There is no card in the writer slot"
+ if(3)
+ if (remove_reader(L))
+ if (remove_writer(L))
+ L << "You remove cards from both slots"
+ else
+ L << "You remove the card from reader slot"
+ else
+ if(remove_writer(L))
+ L << "You remove the card from writer slot"
+ else
+ L << "There are no cards in both slots"
+ if(4)
+ if (!remove_reader(L))
+ if (remove_writer(L))
+ L << "You remove the card from writer slot"
+ else if (!dualslot)
+ L << "There is no card in the reader slot"
+ else
+ L << "There are no cards in both slots"
+ else
+ L << "You remove the card from reader slot"
+
+
+ proc/remove_reader(var/mob/living/L)
+ if(reader)
+ reader.loc = loc
+ if(istype(L) && !L.get_active_hand())
+ L.put_in_hands(reader)
+ else
+ reader.loc = computer.loc
+ reader = null
+ return 1
+ return 0
+
+ proc/remove_writer(var/mob/living/L)
+ if(writer && dualslot)
+ writer.loc = loc
+ if(istype(L) && !L.get_active_hand())
+ L.put_in_hands(writer)
+ else
+ writer.loc = computer.loc
+ writer = null
+ return 1
+ return 0
+
+
+
// Authorizes the user based on the computer's requirements
proc/authenticate()
@@ -133,6 +231,13 @@
desc = "Contains slots for inserting magnetic swipe cards for reading and writing."
dualslot = 1
+
+ /*
+ // Atlantis: Reworked card manipulation a bit.
+ // No need for separated code for dual and single readers.
+ // Both is handled in single-slot reader code now, thanks to the "dualslot" var.
+ // Leaving this code here if someone wants to somehow use it, just uncomment.
+
insert(var/obj/item/weapon/card/card,var/slot = 0)
if(!computer)
return 0
@@ -194,5 +299,6 @@
user.put_in_hands(card)
else
card.loc = computer.loc
+*/
diff --git a/code/WorkInProgress/computer3/computer.dm b/code/WorkInProgress/computer3/computer.dm
index 093f7b5ed7..456bdf3d71 100644
--- a/code/WorkInProgress/computer3/computer.dm
+++ b/code/WorkInProgress/computer3/computer.dm
@@ -449,6 +449,16 @@
overlays += kb
name = initial(name) + " (orange screen of death)"
+ //Returns percentage of battery charge remaining. Returns -1 if no battery is installed.
+ proc/check_battery_status()
+ if (battery)
+ var/obj/item/weapon/cell/B = battery
+ return round(B.charge / (B.maxcharge / 100))
+ else
+ return -1
+
+
+
/obj/machinery/computer3/wall_comp
name = "terminal"
icon = 'icons/obj/computer3.dmi'
diff --git a/code/WorkInProgress/computer3/computers/camera.dm b/code/WorkInProgress/computer3/computers/camera.dm
index 4da54340c1..0883680f5c 100644
--- a/code/WorkInProgress/computer3/computers/camera.dm
+++ b/code/WorkInProgress/computer3/computers/camera.dm
@@ -275,3 +275,7 @@
else
usr << "The screen turns to static."
return
+
+ // Atlantis: Required for camnetkeys to work.
+/datum/file/program/security/hidden
+ hidden_file = 1
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/computers/card.dm b/code/WorkInProgress/computer3/computers/card.dm
index 6080b59643..5acb7c9de2 100644
--- a/code/WorkInProgress/computer3/computers/card.dm
+++ b/code/WorkInProgress/computer3/computers/card.dm
@@ -253,9 +253,9 @@
if("remove" in href_list)
var/which = href_list["remove"]
if(which == "writer")
- computer.cardslot.remove(computer.cardslot.writer)
+ computer.cardslot.remove(2)
else
- computer.cardslot.remove(computer.cardslot.reader)
+ computer.cardslot.remove(1)
auth = 0
if("insert" in href_list)
@@ -264,9 +264,9 @@
var/which = href_list["insert"]
if(which == "writer")
- computer.cardslot.insert(card,1)
- else
computer.cardslot.insert(card,2)
+ else
+ computer.cardslot.insert(card,1)
if("print" in href_list)
if (printing)
diff --git a/code/WorkInProgress/computer3/computers/medical.dm b/code/WorkInProgress/computer3/computers/medical.dm
index ee55a857b2..7fc5da1232 100644
--- a/code/WorkInProgress/computer3/computers/medical.dm
+++ b/code/WorkInProgress/computer3/computers/medical.dm
@@ -23,6 +23,7 @@
req_one_access = list(access_medical, access_forensics_lockers)
var/obj/item/weapon/card/id/scan = null
+ var/obj/item/weapon/card/id/scan2 = null
var/authenticated = null
var/rank = null
var/screen = null
@@ -56,7 +57,12 @@
if (temp)
dat = text("
[src.temp]Clear Screen")
else
- dat = text("Confirm Identity:
[]
", src, (src.scan ? text("[]", src.scan.name) : "----------"))
+ dat = text("Confirm Identity (R):
[]
", src, (scan ? text("[]", scan.name) : "----------"))
+ if (computer.cardslot.dualslot)
+ dat += text("Check Identity (W):
[]", src, (scan2 ? text("[]", scan2.name) : "----------"))
+ if(scan2 && !scan)
+ dat += text("
Insert card into reader slot to log in.
")
+
if (src.authenticated)
switch(src.screen)
if(1.0)
@@ -165,19 +171,32 @@
if (href_list["temp"])
src.temp = null
- if (href_list["scan"])
+ if (href_list["cardr"])
if (scan)
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
- computer.cardslot.remove(scan)
+ computer.cardslot.remove(1)
else
scan.loc = get_turf(src)
scan = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
- computer.cardslot.insert(I)
+ computer.cardslot.insert(I, 1)
scan = I
+ if (href_list["cardw"])
+ if (scan2)
+ if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
+ computer.cardslot.remove(2)
+ else
+ scan2.loc = get_turf(src)
+ scan2 = null
+ else
+ var/obj/item/I = usr.get_active_hand()
+ if (istype(I, /obj/item/weapon/card/id))
+ computer.cardslot.insert(I, 2)
+ scan2 = I
+
else if (href_list["logout"])
src.authenticated = null
src.screen = null
diff --git a/code/WorkInProgress/computer3/computers/security.dm b/code/WorkInProgress/computer3/computers/security.dm
index f161b10cab..f193b07139 100644
--- a/code/WorkInProgress/computer3/computers/security.dm
+++ b/code/WorkInProgress/computer3/computers/security.dm
@@ -19,6 +19,7 @@
req_one_access = list(access_security, access_forensics_lockers)
var/obj/item/weapon/card/id/scan = null
+ var/obj/item/weapon/card/id/scan2 = null
var/authenticated = null
var/rank = null
var/screen = null
@@ -49,9 +50,13 @@
return
usr.set_machine(src)
scan = computer.cardslot.reader
+
+ if (computer.cardslot.dualslot)
+ scan2 = computer.cardslot.writer
+
if(!interactable())
return
- return
+
if (computer.z > 6)
usr << "\red
Unable to establish a connection: \black You're too far away from the station!"
return
@@ -60,7 +65,11 @@
if (temp)
dat = text("
[]Clear Screen", temp, src)
else
- dat = text("Confirm Identity:
[]
", src, (scan ? text("[]", scan.name) : "----------"))
+ dat = text("Confirm Identity (R):
[]
", src, (scan ? text("[]", scan.name) : "----------"))
+ if (computer.cardslot.dualslot)
+ dat += text("Check Identity (W):
[]", src, (scan2 ? text("[]", scan2.name) : "----------"))
+ if(scan2 && !scan)
+ dat += text("
Insert card into reader slot to log in.
")
if (authenticated)
switch(screen)
if(1.0)
@@ -100,9 +109,9 @@
if("Released")
background = "'background-color:#3BB9FF;'"
if("None")
- background = "'background-color:#00FF7F;'"
- if("")
background = "'background-color:#00FF00;'"
+ if("")
+ background = "'background-color:#00FF7F;'"
crimstat = "No Record."
dat += text("
| [] | ", background, src, R, R.fields["name"])
dat += text("[] | ", R.fields["id"])
@@ -236,19 +245,32 @@ What a mess.*/
active1 = null
active2 = null
- if("Confirm Identity")
+ if("Confirm Identity R")
if (scan)
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
- computer.cardslot.remove(scan)
+ computer.cardslot.remove(1)
else
scan.loc = get_turf(src)
scan = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
- computer.cardslot.insert(I)
+ computer.cardslot.insert(I, 1)
scan = I
+ if("Confirm Identity W")
+ if (scan2)
+ if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
+ computer.cardslot.remove(2)
+ else
+ scan2.loc = get_turf(src)
+ scan2 = null
+ else
+ var/obj/item/I = usr.get_active_hand()
+ if (istype(I, /obj/item/weapon/card/id))
+ computer.cardslot.insert(I, 2)
+ scan2 = I
+
if("Log Out")
authenticated = null
screen = null
diff --git a/code/WorkInProgress/computer3/file.dm b/code/WorkInProgress/computer3/file.dm
index 3693579067..849312ec50 100644
--- a/code/WorkInProgress/computer3/file.dm
+++ b/code/WorkInProgress/computer3/file.dm
@@ -13,7 +13,7 @@
var/image = 'icons/ntos/file.png' // determines the icon to use, found in icons/ntos
var/obj/machinery/computer3/computer // the parent computer, if fixed
var/obj/item/part/computer/storage/device // the device that is containing this file
-
+ var/hidden_file = 0 // Prevents file from showing up on NTOS program list.
var/drm = 0 // Copy protection, called by copy() and move()
var/readonly = 0 // Edit protection, called by edit(), which is just a failcheck proc
diff --git a/code/WorkInProgress/computer3/lapvend.dm b/code/WorkInProgress/computer3/lapvend.dm
index d36af863d1..b6f93f4702 100644
--- a/code/WorkInProgress/computer3/lapvend.dm
+++ b/code/WorkInProgress/computer3/lapvend.dm
@@ -213,58 +213,66 @@
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
visible_message("[usr] swipes a card through [src].")
- if(vendor_account)
- var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
- var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
- if(D)
- var/transaction_amount = total()
- if(transaction_amount <= D.money)
-
- //transfer the money
- D.money -= transaction_amount
- vendor_account.money += transaction_amount
-
- //Transaction logs
- var/datum/transaction/T = new()
- T.target_name = "[vendor_account.owner_name] (via [src.name])"
- T.purpose = "Purchase of Laptop"
- if(transaction_amount > 0)
- T.amount = "([transaction_amount])"
- else
- T.amount = "[transaction_amount]"
- T.source_terminal = src.name
- T.date = current_date_string
- T.time = worldtime2text()
- D.transaction_log.Add(T)
- //
- T = new()
- T.target_name = D.owner_name
- T.purpose = "Purchase of Laptop"
- T.amount = "[transaction_amount]"
- T.source_terminal = src.name
- T.date = current_date_string
- T.time = worldtime2text()
- vendor_account.transaction_log.Add(T)
-
- newlap = new /obj/machinery/computer3/laptop/vended(src.loc)
-
- choose_progs(C)
- vend()
- popup.close()
- newlap.close_computer()
- newlap = null
- cardreader = 0
- floppy = 0
- radionet = 0
- camera = 0
- network = 0
- power = 0
+ var/datum/money_account/CH = get_account(C.associated_account_number)
+ if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
+ if(vendor_account)
+ var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
+ var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
+ if(D)
+ transfer_and_vend(D, C)
else
- usr << "\icon[src]You don't have that much money!"
+ usr << "\icon[src]Unable to access account. Check security settings and try again."
else
- usr << "\icon[src]Unable to access account. Check security settings and try again."
+ usr << "\icon[src]Unable to access vendor account. Please record the machine ID and call CentComm Support."
else
- usr << "\icon[src]Unable to access vendor account. Please record the machine ID and call CentComm Support."
+ transfer_and_vend(CH, C)
+
+
+// Transfers money and vends the laptop.
+/obj/machinery/lapvend/proc/transfer_and_vend(var/datum/money_account/D, var/obj/item/weapon/card/C)
+ var/transaction_amount = total()
+ if(transaction_amount <= D.money)
+
+ //transfer the money
+ D.money -= transaction_amount
+ vendor_account.money += transaction_amount
+ //Transaction logs
+ var/datum/transaction/T = new()
+ T.target_name = "[vendor_account.owner_name] (via [src.name])"
+ T.purpose = "Purchase of Laptop"
+ if(transaction_amount > 0)
+ T.amount = "([transaction_amount])"
+ else
+ T.amount = "[transaction_amount]"
+ T.source_terminal = src.name
+ T.date = current_date_string
+ T.time = worldtime2text()
+ D.transaction_log.Add(T)
+ //
+ T = new()
+ T.target_name = D.owner_name
+ T.purpose = "Purchase of Laptop"
+ T.amount = "[transaction_amount]"
+ T.source_terminal = src.name
+ T.date = current_date_string
+ T.time = worldtime2text()
+ vendor_account.transaction_log.Add(T)
+
+ newlap = new /obj/machinery/computer3/laptop/vended(src.loc)
+
+ choose_progs(C)
+ vend()
+ popup.close()
+ newlap.close_computer()
+ newlap = null
+ cardreader = 0
+ floppy = 0
+ radionet = 0
+ camera = 0
+ network = 0
+ power = 0
+ else
+ usr << "\icon[src]You don't have that much money!"
/obj/machinery/lapvend/proc/total()
var/total = 0
@@ -305,9 +313,10 @@
newlap.spawn_files += (/datum/file/program/card_comp)
if(access_heads in C.access)
newlap.spawn_files += (/datum/file/program/communications)
- if(access_medical in C.access)
- newlap.spawn_files += (/datum/file/program/crew)
+ if((access_medical in C.access) || (access_forensics_lockers in C.access)) //Gives detective the medical records program, but not the crew monitoring one.
newlap.spawn_files += (/datum/file/program/med_data)
+ if (access_medical in C.access)
+ newlap.spawn_files += (/datum/file/program/crew)
if(access_engine in C.access)
newlap.spawn_files += (/datum/file/program/powermon)
if(access_research in C.access)
@@ -320,6 +329,8 @@
newlap.spawn_files += (/datum/file/camnet_key/creed)
newlap.spawn_files += (/datum/file/program/arcade)
newlap.spawn_files += (/datum/file/camnet_key/entertainment)
+ //Atlantis: Each laptop gets "invisible" program/security - REQUIRED for camnetkeys to work.
+ newlap.spawn_files += (/datum/file/program/security/hidden)
newlap.update_spawn_files()
/obj/machinery/lapvend/proc/calc_reimburse(var/obj/item/device/laptop/L)
@@ -350,49 +361,53 @@
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
visible_message("[usr] swipes a card through [src].")
- if(vendor_account)
- var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
- var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
- if(D)
- var/transaction_amount = total()
-
- //transfer the money
- D.money += transaction_amount
- vendor_account.money -= transaction_amount
-
- //Transaction logs
- var/datum/transaction/T = new()
- T.target_name = "[vendor_account.owner_name] (via [src.name])"
- T.purpose = "Return purchase of Laptop"
- if(transaction_amount > 0)
- T.amount = "([transaction_amount])"
+ var/datum/money_account/CH = get_account(C.associated_account_number)
+ if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
+ if(vendor_account)
+ var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
+ var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
+ if(D)
+ transfer_and_reimburse(D)
else
- T.amount = "[transaction_amount]"
- T.source_terminal = src.name
- T.date = current_date_string
- T.time = worldtime2text()
- D.transaction_log.Add(T)
- //
- T = new()
- T.target_name = D.owner_name
- T.purpose = "Return purchase of Laptop"
- T.amount = "[transaction_amount]"
- T.source_terminal = src.name
- T.date = current_date_string
- T.time = worldtime2text()
- vendor_account.transaction_log.Add(T)
-
- del(relap)
-
- vendmode = 0
- cardreader = 0
- floppy = 0
- radionet = 0
- camera = 0
- network = 0
- power = 0
-
+ usr << "\icon[src]Unable to access account. Check security settings and try again."
else
- usr << "\icon[src]Unable to access account. Check security settings and try again."
+ usr << "\icon[src]Unable to access vendor account. Please record the machine ID and call CentComm Support."
else
- usr << "\icon[src]Unable to access vendor account. Please record the machine ID and call CentComm Support."
\ No newline at end of file
+ transfer_and_reimburse(CH)
+
+/obj/machinery/lapvend/proc/transfer_and_reimburse(var/datum/money_account/D)
+ var/transaction_amount = total()
+ //transfer the money
+ D.money += transaction_amount
+ vendor_account.money -= transaction_amount
+
+ //Transaction logs
+ var/datum/transaction/T = new()
+ T.target_name = "[vendor_account.owner_name] (via [src.name])"
+ T.purpose = "Return purchase of Laptop"
+ if(transaction_amount > 0)
+ T.amount = "([transaction_amount])"
+ else
+ T.amount = "[transaction_amount]"
+ T.source_terminal = src.name
+ T.date = current_date_string
+ T.time = worldtime2text()
+ D.transaction_log.Add(T)
+ //
+ T = new()
+ T.target_name = D.owner_name
+ T.purpose = "Return purchase of Laptop"
+ T.amount = "[transaction_amount]"
+ T.source_terminal = src.name
+ T.date = current_date_string
+ T.time = worldtime2text()
+ vendor_account.transaction_log.Add(T)
+
+ del(relap)
+ vendmode = 0
+ cardreader = 0
+ floppy = 0
+ radionet = 0
+ camera = 0
+ network = 0
+ power = 0
diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm
index c338b2e42d..be2bb88a17 100644
--- a/code/game/gamemodes/changeling/changeling_powers.dm
+++ b/code/game/gamemodes/changeling/changeling_powers.dm
@@ -844,11 +844,13 @@ var/list/datum/dna/hivemind_bank = list()
if(!changeling)
return 0
- var/mob/living/carbon/T = changeling_sting(40, /mob/proc/changeling_extract_dna_sting)
+ var/mob/living/carbon/human/T = changeling_sting(40, /mob/proc/changeling_extract_dna_sting)
if(!T) return 0
T.dna.real_name = T.real_name
changeling.absorbed_dna |= T.dna
+ if(T.species && !(T.species.name in changeling.absorbed_species))
+ changeling.absorbed_species += T.species.name
feedback_add_details("changeling_powers","ED")
return 1
\ No newline at end of file
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index bffc256b74..5f3c179c58 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -9,6 +9,9 @@ obj/machinery/recharger
idle_power_usage = 4
active_power_usage = 250
var/obj/item/charging = null
+ var/icon_state_charged = "recharger2"
+ var/icon_state_charging = "recharger1"
+ var/icon_state_idle = "recharger0"
obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
if(istype(user,/mob/living/silicon))
@@ -71,30 +74,30 @@ obj/machinery/recharger/process()
var/obj/item/weapon/gun/energy/E = charging
if(E.power_supply.charge < E.power_supply.maxcharge)
E.power_supply.give(100)
- icon_state = "recharger1"
+ icon_state = icon_state_charging
use_power(250/CELLRATE)
else
- icon_state = "recharger2"
+ icon_state = icon_state_charged
return
if(istype(charging, /obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = charging
if(B.bcell)
if(B.bcell.give(1500)) //Because otherwise it takes two minutes to fully charge due to 15k cells. - Neerti
- icon_state = "recharger1"
+ icon_state = icon_state_charging
use_power(200/CELLRATE)
else
- icon_state = "recharger2"
+ icon_state = icon_state_charged
else
- icon_state = "recharger3"
+ icon_state = icon_state_idle
return
if(istype(charging, /obj/item/device/laptop))
var/obj/item/device/laptop/L = charging
if(L.stored_computer.battery.charge < L.stored_computer.battery.maxcharge)
L.stored_computer.battery.give(100)
- icon_state = "recharger1"
+ icon_state = icon_state_charging
use_power(250/CELLRATE)
else
- icon_state = "recharger2"
+ icon_state = icon_state_charged
return
@@ -117,42 +120,12 @@ obj/machinery/recharger/emp_act(severity)
obj/machinery/recharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
if(charging)
- icon_state = "recharger1"
+ icon_state = icon_state_charging
else
- icon_state = "recharger0"
+ icon_state = icon_state_idle
+// Atlantis: No need for that copy-pasta code, just use var to store icon_states instead.
obj/machinery/recharger/wallcharger
name = "wall recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "wrecharger0"
-
-obj/machinery/recharger/wallcharger/process()
- if(stat & (NOPOWER|BROKEN) || !anchored)
- return
-
- if(charging)
- if(istype(charging, /obj/item/weapon/gun/energy))
- var/obj/item/weapon/gun/energy/E = charging
- if(E.power_supply.charge < E.power_supply.maxcharge)
- E.power_supply.give(100)
- icon_state = "wrecharger1"
- use_power(250/CELLRATE)
- else
- icon_state = "wrecharger2"
- return
- if(istype(charging, /obj/item/weapon/melee/baton))
- var/obj/item/weapon/melee/baton/B = charging
- if(B.bcell)
- if(B.bcell.give(1500)) //Because otherwise it takes two minutes to fully charge due to 15k cells. - Neerti
- icon_state = "wrecharger1"
- use_power(200/CELLRATE)
- else
- icon_state = "wrecharger2"
- else
- icon_state = "wrecharger0"
-
-obj/machinery/recharger/wallcharger/update_icon()
- if(charging)
- icon_state = "wrecharger1"
- else
- icon_state = "wrecharger0"
\ No newline at end of file
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index 7e6f1e3f7e..2db29d4ab0 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -1064,19 +1064,9 @@
if(!target_species || !target_department)
return
- switch(target_species)
- if("Skrell")
- if(helmet) helmet.species_restricted = list("Skrell")
- if(suit) suit.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
- if("Human")
- if(helmet) helmet.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox","Skrell")
- if(suit) suit.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
- if("Unathi")
- if(helmet) helmet.species_restricted = list("Unathi")
- if(suit) suit.species_restricted = list("Unathi")
- if("Tajaran")
- if(helmet) helmet.species_restricted = list("Tajaran")
- if(suit) suit.species_restricted = list("Tajaran")
+ if(target_species)
+ if(helmet) helmet.refit_for_species(target_species)
+ if(suit) suit.refit_for_species(target_species)
switch(target_department)
if("Engineering")
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index e69a2b36de..8d3ee58944 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -187,53 +187,60 @@
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
visible_message("[usr] swipes a card through [src].")
- if(check_accounts)
- if(vendor_account)
- var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
- var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
- if(D)
- var/transaction_amount = currently_vending.price
- if(transaction_amount <= D.money)
-
- //transfer the money
- D.money -= transaction_amount
- vendor_account.money += transaction_amount
-
- //create entries in the two account transaction logs
- var/datum/transaction/T = new()
- T.target_name = "[vendor_account.owner_name] (via [src.name])"
- T.purpose = "Purchase of [currently_vending.product_name]"
- if(transaction_amount > 0)
- T.amount = "([transaction_amount])"
- else
- T.amount = "[transaction_amount]"
- T.source_terminal = src.name
- T.date = current_date_string
- T.time = worldtime2text()
- D.transaction_log.Add(T)
- //
- T = new()
- T.target_name = D.owner_name
- T.purpose = "Purchase of [currently_vending.product_name]"
- T.amount = "[transaction_amount]"
- T.source_terminal = src.name
- T.date = current_date_string
- T.time = worldtime2text()
- vendor_account.transaction_log.Add(T)
-
- // Vend the item
- src.vend(src.currently_vending, usr)
- currently_vending = null
+ var/datum/money_account/CH = get_account(C.associated_account_number)
+ if (CH) // Only proceed if card contains proper account number.
+ if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
+ if(vendor_account)
+ var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
+ var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
+ transfer_and_vend(D)
else
- usr << "\icon[src]You don't have that much money!"
+ usr << "\icon[src]Unable to access account. Check security settings and try again."
else
- usr << "\icon[src]Unable to access account. Check security settings and try again."
+ //Just Vend it.
+ transfer_and_vend(CH)
else
- //Just Vend it.
+ usr << "\icon[src]Error: Unable to access your account. Please contact technical support if problem persists."
+
+/obj/machinery/vending/proc/transfer_and_vend(var/datum/money_account/acc)
+ if(acc)
+ var/transaction_amount = currently_vending.price
+ if(transaction_amount <= acc.money)
+
+ //transfer the money
+ acc.money -= transaction_amount
+ vendor_account.money += transaction_amount
+
+ //create entries in the two account transaction logs
+ var/datum/transaction/T = new()
+ T.target_name = "[vendor_account.owner_name] (via [src.name])"
+ T.purpose = "Purchase of [currently_vending.product_name]"
+ if(transaction_amount > 0)
+ T.amount = "([transaction_amount])"
+ else
+ T.amount = "[transaction_amount]"
+ T.source_terminal = src.name
+ T.date = current_date_string
+ T.time = worldtime2text()
+ acc.transaction_log.Add(T)
+ //
+ T = new()
+ T.target_name = acc.owner_name
+ T.purpose = "Purchase of [currently_vending.product_name]"
+ T.amount = "[transaction_amount]"
+ T.source_terminal = src.name
+ T.date = current_date_string
+ T.time = worldtime2text()
+ vendor_account.transaction_log.Add(T)
+
+ // Vend the item
src.vend(src.currently_vending, usr)
currently_vending = null
+ else
+ usr << "\icon[src]You don't have that much money!"
else
- usr << "\icon[src]Unable to access vendor account. Please record the machine ID and call CentComm Support."
+ usr << "\icon[src]Error: Unable to access your account. Please contact technical support if problem persists."
+
/obj/machinery/vending/attack_paw(mob/user as mob)
return attack_hand(user)
diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm
index c80eb656cb..e9c6d644a8 100644
--- a/code/game/mecha/mecha_construction_paths.dm
+++ b/code/game/mecha/mecha_construction_paths.dm
@@ -1273,6 +1273,7 @@
else
user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].")
holder.icon_state = "odysseus10"
+ if(2)
if(diff==FORWARD)
user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.")
holder.icon_state = "odysseus13"
@@ -1293,4 +1294,4 @@
spawn_result()
..()
feedback_inc("mecha_odysseus_created",1)
- return
\ No newline at end of file
+ return
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 6beb98c40c..935760efdb 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -49,6 +49,18 @@
var/list/sprite_sheets = null
var/icon_override = null //Used to override hardcoded clothing dmis in human clothing proc.
+ /* Species-specific sprite sheets for object and inhand sprites
+ Works similarly to worn sprite_sheets, except the alternate sprites are used when the clothing/refit_for_species() proc is called.
+ */
+ var/list/sprite_sheets_obj = null
+
+ //Inhand is not as big a deal as the object sprites, so I'm not sure if these are worth the extra vars.
+ //Maybe in the future:
+ //var/list/sprite_sheets_inhand_l = null
+ //var/list/sprite_sheets_inhand_r = null
+ //var/icon_l_hand = 'icons/mob/items_lefthand.dmi'
+ //var/icon_r_hand = 'icons/mob/items_righthand.dmi'
+
/obj/item/device
icon = 'icons/obj/device.dmi'
diff --git a/code/game/objects/items/devices/modkit.dm b/code/game/objects/items/devices/modkit.dm
index dd7c1231f4..a1de93987f 100644
--- a/code/game/objects/items/devices/modkit.dm
+++ b/code/game/objects/items/devices/modkit.dm
@@ -7,7 +7,7 @@
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user."
icon_state = "modkit"
var/parts = MODKIT_FULL
- var/list/target_species = list("Human","Skrell")
+ var/target_species = "Human"
var/list/permitted_types = list(
/obj/item/clothing/head/helmet/space/rig,
@@ -15,6 +15,8 @@
)
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob)
+ if (!target_species)
+ return //it shouldn't be null, okay?
if(!parts)
user << "This kit has no parts for this modification left."
@@ -22,11 +24,20 @@
del(src)
return
- /* TODO: list comparison
- if(istype(O,to_type))
- user << "[O] is already modified."
+ var/allowed = 0
+ for (var/permitted_type in permitted_types)
+ if(istype(O, permitted_type))
+ allowed = 1
+
+ var/obj/item/clothing/I = O
+ if (!istype(I) || !allowed)
+ user << "[src] is unable to modify that."
return
- */
+
+ var/excluding = ("exclude" in I.species_restricted)
+ var/in_list = (target_species in I.species_restricted)
+ if (excluding ^ in_list)
+ user << "[I] is already modified."
if(!isturf(O.loc))
user << "[O] must be safely placed on the ground for modification."
@@ -36,22 +47,22 @@
user.visible_message("\red [user] opens \the [src] and modifies \the [O].","\red You open \the [src] and modify \the [O].")
- var/obj/item/clothing/I = O
- if(istype(I))
- I.species_restricted = target_species.Copy()
+ I.refit_for_species(target_species)
- parts--
+ if (istype(I, /obj/item/clothing/head/helmet))
+ parts &= ~MODKIT_HELMET
+ if (istype(I, /obj/item/clothing/suit))
+ parts &= ~MODKIT_SUIT
+
if(!parts)
user.drop_from_inventory(src)
del(src)
-/obj/item/device/modkit/tajaran
- name = "tajaran hardsuit modification kit"
- desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user. This one looks like it's meant for Tajara."
- target_species = list("Tajaran")
-
/obj/item/device/modkit/examine()
..()
- usr << "It looks as though it modifies hardsuits to fit the following users:"
- for(var/species in target_species)
- usr << "- [species]"
\ No newline at end of file
+ usr << "It looks as though it modifies hardsuits to fit [target_species] users."
+
+/obj/item/device/modkit/tajaran
+ name = "tajaran hardsuit modification kit"
+ desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user. This one looks like it's meant for Tajaran."
+ target_species = "Tajaran"
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm
index 4181ef6e20..5d72495520 100644
--- a/code/game/objects/items/weapons/kitchen.dm
+++ b/code/game/objects/items/weapons/kitchen.dm
@@ -32,7 +32,7 @@
/obj/item/weapon/kitchen/utensil/New()
if (prob(60))
src.pixel_y = rand(0, 4)
-
+
create_reagents(5)
return
@@ -58,7 +58,7 @@
for(var/mob/O in viewers(M, null))
O.show_message(text("\blue [] feeds [] some [] from \the []", user, M, loaded, src), 1)
M.reagents.add_reagent("nutriment", 1)
-
+ playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
overlays.Cut()
return
diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm
index cead05c53e..f383e2fa5e 100644
--- a/code/game/verbs/ooc.dm
+++ b/code/game/verbs/ooc.dm
@@ -14,7 +14,7 @@ var/global/normal_ooc_colour = "#002eb8"
src << "Guests may not use OOC."
return
- msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
+ msg = trim(copytext(sanitize(msg), 1, MAX_MESSAGE_LEN))
if(!msg) return
if(!(prefs.toggles & CHAT_OOC))
@@ -102,7 +102,7 @@ var/global/normal_ooc_colour = "#002eb8"
src << "Guests may not use OOC."
return
- msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
+ msg = trim(copytext(sanitize(msg), 1, MAX_MESSAGE_LEN))
if(!msg) return
if(!(prefs.toggles & CHAT_LOOC))
@@ -131,9 +131,12 @@ var/global/normal_ooc_colour = "#002eb8"
var/list/heard = get_mobs_in_view(7, src.mob)
var/mob/S = src.mob
+
var/display_name = S.key
if(S.stat != DEAD)
display_name = S.name
+
+ // Handle non-admins
for(var/mob/M in heard)
if(!M.client)
continue
@@ -149,9 +152,15 @@ var/global/normal_ooc_colour = "#002eb8"
else
display_name = holder.fakekey
C << "LOOC: [display_name]: [msg]"
+
+ // Now handle admins
+ display_name = S.key
+ if(S.stat != DEAD)
+ display_name = "[S.name]/([S.key])"
+
for(var/client/C in admins)
if(C.prefs.toggles & CHAT_LOOC)
var/prefix = "(R)LOOC"
if (C.mob in heard)
prefix = "LOOC"
- C << "[prefix]: [display_name]: [msg]"
\ No newline at end of file
+ C << "[prefix]: [display_name]: [msg]"
diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm
index 9548c279a0..59e4182ac5 100644
--- a/code/modules/admin/IsBanned.dm
+++ b/code/modules/admin/IsBanned.dm
@@ -1,3 +1,4 @@
+#ifndef OVERRIDE_BAN_SYSTEM
//Blocks an attempt to connect before even creating our client datum thing.
world/IsBanned(key,address,computer_id)
if(ckey(key) in admin_datums)
@@ -79,3 +80,6 @@ world/IsBanned(key,address,computer_id)
if (failedip)
message_admins("[key] has logged in with a blank ip in the ban check.")
return ..() //default pager ban stuff
+#endif
+#undef OVERRIDE_BAN_SYSTEM
+
diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm
index e9304976cc..b90fbe5b7f 100644
--- a/code/modules/awaymissions/corpse.dm
+++ b/code/modules/awaymissions/corpse.dm
@@ -161,9 +161,9 @@
corpseidaccess = "Station Engineer"
/obj/effect/landmark/corpse/engineer/rig
- corpsesuit = /obj/item/clothing/suit/space/rig
+ corpsesuit = /obj/item/clothing/suit/space/rig/engineering
corpsemask = /obj/item/clothing/mask/breath
- corpsehelmet = /obj/item/clothing/head/helmet/space/rig
+ corpsehelmet = /obj/item/clothing/head/helmet/space/rig/engineering
/obj/effect/landmark/corpse/clown
name = "Clown"
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 034fede96a..f6681f9d22 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -32,6 +32,29 @@
return 1
+/obj/item/clothing/proc/refit_for_species(var/target_species)
+ switch(target_species)
+ if("Human", "Skrell") //humanoid bodytypes
+ species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
+ else
+ species_restricted = list(target_species)
+
+ if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
+ icon = sprite_sheets_obj[target_species]
+
+/obj/item/clothing/head/helmet/refit_for_species(var/target_species)
+ switch(target_species)
+ if("Skrell")
+ species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
+ if("Human")
+ species_restricted = list("exclude","Skrell","Unathi","Tajaran","Diona","Vox")
+ else
+ species_restricted = list(target_species)
+
+ if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
+ icon = sprite_sheets_obj[target_species]
+
+
//Ears: headsets, earmuffs and tiny objects
/obj/item/clothing/ears
name = "ears"
diff --git a/code/modules/clothing/spacesuits/rig.dm b/code/modules/clothing/spacesuits/rig.dm
index 995e116717..4009d1a8f8 100644
--- a/code/modules/clothing/spacesuits/rig.dm
+++ b/code/modules/clothing/spacesuits/rig.dm
@@ -1,10 +1,10 @@
//Regular rig suits
/obj/item/clothing/head/helmet/space/rig
- name = "engineering hardsuit helmet"
- desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding."
+ name = "hardsuit helmet"
+ desc = "A special helmet designed for work in a hazardous, low-pressure environment."
icon_state = "rig0-engineering"
item_state = "eng_helm"
- armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80)
+ armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
allowed = list(/obj/item/device/flashlight)
var/brightness_on = 4 //luminosity when on
var/on = 0
@@ -49,13 +49,13 @@
SetLuminosity(brightness_on)
/obj/item/clothing/suit/space/rig
- name = "engineering hardsuit"
- desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding."
+ name = "hardsuit"
+ desc = "A special space suit for environments that might pose hazards beyond just the vacuum of space. Provides more protection than a standard space suit."
icon_state = "rig-engineering"
item_state = "eng_hardsuit"
slowdown = 1
- armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80)
- allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
+ armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
+ allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit)
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
@@ -292,21 +292,46 @@
..()
+//Engineering rig
+/obj/item/clothing/head/helmet/space/rig/engineering
+ name = "engineering hardsuit helmet"
+ desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding."
+ icon_state = "rig0-engineering"
+ item_state = "eng_helm"
+ armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80)
+ sprite_sheets_obj = list(
+ "Tajaran" = 'icons/obj/clothing/species/tajaran/hats.dmi',
+ )
+
+/obj/item/clothing/suit/space/rig/engineering
+ name = "engineering hardsuit"
+ desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding."
+ icon_state = "rig-engineering"
+ item_state = "eng_hardsuit"
+ slowdown = 1
+ armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80)
+ allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
+ sprite_sheets_obj = list(
+ "Tajaran" = 'icons/obj/clothing/species/tajaran/suits.dmi',
+ )
+
//Chief Engineer's rig
-/obj/item/clothing/head/helmet/space/rig/elite
+/obj/item/clothing/head/helmet/space/rig/engineering/chief
name = "advanced hardsuit helmet"
desc = "An advanced helmet designed for work in a hazardous, low pressure environment. Shines with a high polish."
icon_state = "rig0-white"
item_state = "ce_helm"
item_color = "white"
sprite_sheets = null
+ sprite_sheets_obj = null
-/obj/item/clothing/suit/space/rig/elite
+/obj/item/clothing/suit/space/rig/engineering/chief
icon_state = "rig-white"
name = "advanced hardsuit"
desc = "An advanced suit that protects against hazardous, low pressure environments. Shines with a high polish."
item_state = "ce_hardsuit"
sprite_sheets = null
+ sprite_sheets_obj = null
//Mining rig
/obj/item/clothing/head/helmet/space/rig/mining
@@ -336,6 +361,13 @@
siemens_coefficient = 0.6
var/obj/machinery/camera/camera
species_restricted = list("exclude","Unathi","Tajaran","Skrell","Vox")
+ sprite_sheets_obj = list(
+ "Tajaran" = 'icons/obj/clothing/species/tajaran/hats.dmi',
+ "Unathi" = 'icons/obj/clothing/species/unathi/hats.dmi',
+ "Skrell" = 'icons/obj/clothing/species/skrell/hats.dmi',
+ )
+
+
/obj/item/clothing/head/helmet/space/rig/syndi/attack_self(mob/user)
if(camera)
..(user)
@@ -362,6 +394,11 @@
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs)
siemens_coefficient = 0.6
species_restricted = list("exclude","Unathi","Tajaran","Skrell","Vox")
+ sprite_sheets_obj = list(
+ "Tajaran" = 'icons/obj/clothing/species/tajaran/suits.dmi',
+ "Unathi" = 'icons/obj/clothing/species/unathi/suits.dmi',
+ "Skrell" = 'icons/obj/clothing/species/skrell/suits.dmi',
+ )
//Wizard Rig
diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm
index 3db6f6137f..7ca50ad9eb 100644
--- a/code/modules/events/event_dynamic.dm
+++ b/code/modules/events/event_dynamic.dm
@@ -76,7 +76,6 @@ var/list/event_last_fired = list()
possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 10
possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 10
possibleEvents[/datum/event/viral_infection] = active_with_role["Medical"] * 10
- possibleEvents[/datum/event/organ_failure] = active_with_role["Medical"] * 50
possibleEvents[/datum/event/prison_break] = active_with_role["Security"] * 50
if(active_with_role["Security"] > 0)
diff --git a/code/modules/events/organ_failure.dm b/code/modules/events/organ_failure.dm
deleted file mode 100644
index f51c463328..0000000000
--- a/code/modules/events/organ_failure.dm
+++ /dev/null
@@ -1,44 +0,0 @@
-datum/event/organ_failure
- var/severity = 1
-
-datum/event/organ_failure/setup()
- announceWhen = rand(0, 300)
- endWhen = announceWhen + 1
- severity = rand(1, 3)
-
-datum/event/organ_failure/announce()
- command_alert("Confirmed outbreak of level [rand(3,7)] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
- world << sound('sound/AI/outbreak5.ogg')
-
-datum/event/organ_failure/start()
- var/list/candidates = list() //list of candidate keys
- for(var/mob/living/carbon/human/G in player_list)
- if(G.mind && G.mind.current && G.mind.current.stat != DEAD && G.health > 70 && G.internal_organs)
- candidates += G
- if(!candidates.len) return
- candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
-
- while(severity > 0 && candidates.len)
- var/mob/living/carbon/human/C = candidates[1]
-
- var/acute = prob(15)
- if (prob(75))
- //internal organ infection
- var/datum/organ/internal/I = pick(C.internal_organs)
-
- if (acute)
- I.germ_level = max(INFECTION_LEVEL_TWO, I.germ_level)
- else
- I.germ_level = max(rand(INFECTION_LEVEL_ONE,INFECTION_LEVEL_ONE*2), I.germ_level)
- else
- //external organ infection
- var/datum/organ/external/O = pick(C.organs)
-
- if (acute)
- O.germ_level = max(INFECTION_LEVEL_TWO, O.germ_level)
- else
- O.germ_level = max(rand(INFECTION_LEVEL_ONE,INFECTION_LEVEL_ONE*2), O.germ_level)
-
- C.bad_external_organs |= O
-
- severity--
diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm
old mode 100644
new mode 100755
index 1a8b76c11c..4bd6627122
--- a/code/modules/mob/language.dm
+++ b/code/modules/mob/language.dm
@@ -54,7 +54,7 @@
speech_verb = "shrieks"
colour = "vox"
key = "v"
- flags = RESTRICTED | UNTRANSLATABLE
+ flags = RESTRICTED
/datum/language/diona
name = "Rootspeak"
@@ -62,7 +62,7 @@
speech_verb = "creaks and rustles"
colour = "soghun"
key = "q"
- flags = RESTRICTED | UNTRANSLATABLE
+ flags = RESTRICTED
/datum/language/human
name = "Sol Common"
@@ -106,7 +106,7 @@
// Can we speak this language, as opposed to just understanding it?
/mob/proc/can_speak(datum/language/speaking)
- return ((universal_speak && !(speaking.flags & UNTRANSLATABLE)) || speaking in src.languages)
+ return (universal_speak || speaking in src.languages)
//TBD
/mob/verb/check_languages()
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index c7bf755356..0d6aaec965 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -423,23 +423,17 @@
var/mob/living/simple_animal/borer/B = has_brain_worms()
- if(!B)
- return
-
- if(B.controlling)
+ if(B && B.host_brain)
src << "\red You withdraw your probosci, releasing control of [B.host_brain]"
- B.host_brain << "\red Your vision swims as the alien parasite releases control of your body."
- B.ckey = ckey
- B.controlling = 0
- if(B.host_brain.ckey)
- ckey = B.host_brain.ckey
- B.host_brain.ckey = null
- B.host_brain.name = "host brain"
- B.host_brain.real_name = "host brain"
- verbs -= /mob/living/carbon/proc/release_control
- verbs -= /mob/living/carbon/proc/punish_host
- verbs -= /mob/living/carbon/proc/spawn_larvae
+ B.detatch()
+
+ verbs -= /mob/living/carbon/proc/release_control
+ verbs -= /mob/living/carbon/proc/punish_host
+ verbs -= /mob/living/carbon/proc/spawn_larvae
+
+ else
+ src << "\red ERROR NO BORER OR BRAINMOB DETECTED IN THIS MOB, THIS IS A BUG !"
//Brain slug proc for tormenting the host.
/mob/living/carbon/proc/punish_host()
@@ -486,4 +480,4 @@
else
src << "You do not have enough chemicals stored to reproduce."
- return
\ No newline at end of file
+ return
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 9865901886..4cfad2504a 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -486,14 +486,8 @@
B.host.adjustBrainLoss(rand(5,10))
H << "\red With an immense exertion of will, you regain control of your body!"
B.host << "\red You feel control of the host brain ripped from your grasp, and retract your probosci before the wild neural impulses can damage you."
- B.controlling = 0
- B.ckey = B.host.ckey
- B.host.ckey = H.ckey
-
- H.ckey = null
- H.name = "host brain"
- H.real_name = "host brain"
+ B.detatch()
verbs -= /mob/living/carbon/proc/release_control
verbs -= /mob/living/carbon/proc/punish_host
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
old mode 100644
new mode 100755
index 95e6dac83e..fba71205fc
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -52,6 +52,8 @@
var/obj/item/radio/integrated/signal/sradio // AI's signaller
+ var/translator_on = 0 // keeps track of the translator module
+
/mob/living/silicon/pai/New(var/obj/item/device/paicard)
canmove = 0
diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm
old mode 100644
new mode 100755
index 757b04b1ea..8ca741724e
--- a/code/modules/mob/living/silicon/pai/software.dm
+++ b/code/modules/mob/living/silicon/pai/software.dm
@@ -266,7 +266,7 @@
src.medHUD = !src.medHUD
if("translator")
if(href_list["toggle"])
- src.universal_speak = !src.universal_speak
+ src.translator_toggle()
if("doorjack")
if(href_list["jack"])
if(src.cable && src.cable.machine)
@@ -325,7 +325,7 @@
if(s == "medical HUD") //This file has to be saved as ANSI or this will not display correctly
dat += "Medical Analysis Suite [(src.medHUD) ? "•" : "•"]
"
if(s == "universal translator") //This file has to be saved as ANSI or this will not display correctly
- dat += "Universal Translator [(src.universal_speak) ? "•" : "•"]
"
+ dat += "Universal Translator [(src.translator_on) ? "•" : "•"]
"
if(s == "projection array")
dat += "Projection Array
"
if(s == "camera jack")
@@ -438,9 +438,9 @@
for (var/ch_name in radio.channels)
dat+=radio.text_sec_channel(ch_name, radio.channels[ch_name])
dat+={"[radio.text_wires()]