mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 06:22:26 +01:00
Merge remote-tracking branch 'upstream/master' into polaroid
This commit is contained in:
@@ -17,4 +17,5 @@ install:
|
||||
- cd ..
|
||||
|
||||
script:
|
||||
- (! grep -q 'step_[xy]' maps/tgstation2.dmm)
|
||||
- DreamMaker baystation12.dme
|
||||
|
||||
+2
-2
@@ -835,7 +835,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"
|
||||
@@ -1159,7 +1158,8 @@
|
||||
#include "code\modules\projectiles\guns\energy\stun.dm"
|
||||
#include "code\modules\projectiles\guns\energy\temperature.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\automatic.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\bow.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\crossbow.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\launcher.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\pistol.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\pneumatic.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\revolver.dm"
|
||||
|
||||
@@ -22,20 +22,21 @@
|
||||
var/dat = "<table border='0' align='left'>"
|
||||
var/i = 0
|
||||
for(var/datum/file/F in filelist)
|
||||
i++
|
||||
if(i==1)
|
||||
dat += "<tr>"
|
||||
if(i>= 6)
|
||||
i = 0
|
||||
dat += "</tr>"
|
||||
continue
|
||||
dat += {"
|
||||
<td>
|
||||
<center><a href='?src=\ref[src];[fileop]=\ref[F]'>
|
||||
<img src=\ref[F.image]><br>
|
||||
<span>[F.name]</span>
|
||||
</a></center>
|
||||
</td>"}
|
||||
if(!F.hidden_file)
|
||||
i++
|
||||
if(i==1)
|
||||
dat += "<tr>"
|
||||
if(i>= 6)
|
||||
i = 0
|
||||
dat += "</tr>"
|
||||
continue
|
||||
dat += {"
|
||||
<td>
|
||||
<center><a href='?src=\ref[src];[fileop]=\ref[F]'>
|
||||
<img src=\ref[F.image]><br>
|
||||
<span>[F.name]</span>
|
||||
</a></center>
|
||||
</td>"}
|
||||
|
||||
dat += "</tr></table>"
|
||||
return dat
|
||||
@@ -164,6 +165,8 @@
|
||||
|
||||
<body><div style='width:640px;height:480px; border:2px solid black;padding:8px;background-position:center;background-image:url(\ref['nano/images/uiBackground.png'])'>"}
|
||||
|
||||
|
||||
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 += "<img src=\ref['icons/ntos/battery_icons/batt_none.gif']>"
|
||||
if(0 to 5)
|
||||
dat += "<img src=\ref['icons/ntos/battery_icons/batt_5.gif']>"
|
||||
if(6 to 20)
|
||||
dat += "<img src=\ref['icons/ntos/battery_icons/batt_20.gif']>"
|
||||
if(21 to 40)
|
||||
dat += "<img src=\ref['icons/ntos/battery_icons/batt_40.gif']>"
|
||||
if(41 to 60)
|
||||
dat += "<img src=\ref['icons/ntos/battery_icons/batt_60.gif']>"
|
||||
if(61 to 80)
|
||||
dat += "<img src=\ref['icons/ntos/battery_icons/batt_80.gif']>"
|
||||
if(81 to 100)
|
||||
dat += "<img src=\ref['icons/ntos/battery_icons/batt_100.gif']>"
|
||||
dat += "<br>"
|
||||
return dat
|
||||
|
||||
/datum/file/program/ntos/Topic(href, list/href_list)
|
||||
if(!interactable() || ..(href,href_list))
|
||||
return
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
|
||||
@@ -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("<TT>[src.temp]</TT><BR><BR><A href='?src=\ref[src];temp=1'>Clear Screen</A>")
|
||||
else
|
||||
dat = text("Confirm Identity: <A href='?src=\ref[];scan=1'>[]</A><HR>", src, (src.scan ? text("[]", src.scan.name) : "----------"))
|
||||
dat = text("Confirm Identity (R): <A href='?src=\ref[];cardr=1'>[]</A><HR>", src, (scan ? text("[]", scan.name) : "----------"))
|
||||
if (computer.cardslot.dualslot)
|
||||
dat += text("Check Identity (W): <A href='?src=\ref[];cardw=1'>[]</A><BR>", src, (scan2 ? text("[]", scan2.name) : "----------"))
|
||||
if(scan2 && !scan)
|
||||
dat += text("<div class='notice'>Insert card into reader slot to log in.</div><br>")
|
||||
|
||||
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
|
||||
|
||||
@@ -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 <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
return
|
||||
@@ -60,7 +65,11 @@
|
||||
if (temp)
|
||||
dat = text("<TT>[]</TT><BR><BR><A href='?src=\ref[];choice=Clear Screen'>Clear Screen</A>", temp, src)
|
||||
else
|
||||
dat = text("Confirm Identity: <A href='?src=\ref[];choice=Confirm Identity'>[]</A><HR>", src, (scan ? text("[]", scan.name) : "----------"))
|
||||
dat = text("Confirm Identity (R): <A href='?src=\ref[];choice=Confirm Identity R'>[]</A><HR>", src, (scan ? text("[]", scan.name) : "----------"))
|
||||
if (computer.cardslot.dualslot)
|
||||
dat += text("Check Identity (W): <A href='?src=\ref[];choice=Confirm Identity W'>[]</A><BR>", src, (scan2 ? text("[]", scan2.name) : "----------"))
|
||||
if(scan2 && !scan)
|
||||
dat += text("<div class='notice'>Insert card into reader slot to log in.</div><br>")
|
||||
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("<tr style=[]><td><A href='?src=\ref[];choice=Browse Record;d_rec=\ref[]'>[]</a></td>", background, src, R, R.fields["name"])
|
||||
dat += text("<td>[]</td>", 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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -213,58 +213,66 @@
|
||||
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(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]<span class='warning'>You don't have that much money!</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'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
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]<span class='warning'>You don't have that much money!</span>"
|
||||
|
||||
/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("<span class='info'>[usr] swipes a card through [src].</span>")
|
||||
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]<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'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
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
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ obj/var/contaminated = 0
|
||||
/mob/living/carbon/human/proc/burn_eyes()
|
||||
//The proc that handles eye burning.
|
||||
if(prob(20)) src << "\red Your eyes burn!"
|
||||
var/datum/organ/internal/eyes/E = internal_organs["eyes"]
|
||||
var/datum/organ/internal/eyes/E = internal_organs_by_name["eyes"]
|
||||
E.damage += 2.5
|
||||
eye_blurry = min(eye_blurry+1.5,50)
|
||||
if (prob(max(0,E.damage - 15) + 1) &&!eye_blind)
|
||||
|
||||
@@ -104,6 +104,8 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
|
||||
for (var/language_name in all_languages)
|
||||
var/datum/language/L = all_languages[language_name]
|
||||
language_keys[":[lowertext(L.key)]"] = L
|
||||
language_keys[".[lowertext(L.key)]"] = L
|
||||
language_keys["#[lowertext(L.key)]"] = L
|
||||
|
||||
var/rkey = 0
|
||||
paths = typesof(/datum/species)-/datum/species
|
||||
@@ -128,4 +130,4 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
|
||||
for(var/t in L)
|
||||
. += " has: [t]\n"
|
||||
world << .
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -87,8 +87,6 @@
|
||||
for(var/area/RA in related)
|
||||
for(var/obj/machinery/camera/C in RA)
|
||||
C.network.Remove("Atmosphere Alarms")
|
||||
for (var/obj/machinery/alarm/AA in RA)
|
||||
AA.update_icon()
|
||||
for(var/mob/living/silicon/aiPlayer in player_list)
|
||||
aiPlayer.cancelAlarm("Atmosphere", src, src)
|
||||
for(var/obj/machinery/computer/station_alert/a in machines)
|
||||
@@ -101,8 +99,6 @@
|
||||
for(var/obj/machinery/camera/C in RA)
|
||||
cameras += C
|
||||
C.network.Add("Atmosphere Alarms")
|
||||
for (var/obj/machinery/alarm/AA in RA)
|
||||
AA.update_icon()
|
||||
for(var/mob/living/silicon/aiPlayer in player_list)
|
||||
aiPlayer.triggerAlarm("Atmosphere", src, cameras, src)
|
||||
for(var/obj/machinery/computer/station_alert/a in machines)
|
||||
@@ -110,6 +106,10 @@
|
||||
air_doors_close()
|
||||
|
||||
atmosalm = danger_level
|
||||
for(var/area/RA in related)
|
||||
for (var/obj/machinery/alarm/AA in RA)
|
||||
AA.update_icon()
|
||||
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -5,7 +5,7 @@
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "Nanotrasen officials and Space law"
|
||||
supervisors = "Nanotrasen officials and Corporate Regulations"
|
||||
selection_color = "#ccccff"
|
||||
idtype = /obj/item/weapon/card/id/gold
|
||||
req_admin_notify = 1
|
||||
|
||||
@@ -309,10 +309,18 @@
|
||||
if(e.open)
|
||||
open = "Open:"
|
||||
switch (e.germ_level)
|
||||
if (INFECTION_LEVEL_ONE + 50 to INFECTION_LEVEL_TWO)
|
||||
if (INFECTION_LEVEL_ONE to INFECTION_LEVEL_ONE + 200)
|
||||
infected = "Mild Infection:"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_THREE)
|
||||
if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300)
|
||||
infected = "Mild Infection+:"
|
||||
if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400)
|
||||
infected = "Mild Infection++:"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200)
|
||||
infected = "Acute Infection:"
|
||||
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
|
||||
infected = "Acute Infection+:"
|
||||
if (INFECTION_LEVEL_TWO + 300 to INFECTION_LEVEL_TWO + 400)
|
||||
infected = "Acute Infection++:"
|
||||
if (INFECTION_LEVEL_THREE to INFINITY)
|
||||
infected = "Septic:"
|
||||
|
||||
@@ -332,8 +340,7 @@
|
||||
else
|
||||
dat += "<td>[e.display_name]</td><td>-</td><td>-</td><td>Not Found</td>"
|
||||
dat += "</tr>"
|
||||
for(var/organ_name in occupant.internal_organs)
|
||||
var/datum/organ/internal/i = occupant.internal_organs[organ_name]
|
||||
for(var/datum/organ/internal/i in occupant.internal_organs)
|
||||
var/mech = ""
|
||||
if(i.robotic == 1)
|
||||
mech = "Assisted:"
|
||||
@@ -342,10 +349,18 @@
|
||||
|
||||
var/infection = "None"
|
||||
switch (i.germ_level)
|
||||
if (1 to INFECTION_LEVEL_TWO)
|
||||
if (1 to INFECTION_LEVEL_ONE + 200)
|
||||
infection = "Mild Infection:"
|
||||
if (INFECTION_LEVEL_TWO to INFINITY)
|
||||
if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300)
|
||||
infection = "Mild Infection+:"
|
||||
if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400)
|
||||
infection = "Mild Infection++:"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200)
|
||||
infection = "Acute Infection:"
|
||||
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
|
||||
infection = "Acute Infection+:"
|
||||
if (INFECTION_LEVEL_TWO + 300 to INFINITY)
|
||||
infection = "Acute Infection++:"
|
||||
|
||||
dat += "<tr>"
|
||||
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>[infection]:[mech]</td><td></td>"
|
||||
|
||||
@@ -405,6 +405,12 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/alarm/proc/apply_mode()
|
||||
//propagate mode to other air alarms in the area
|
||||
//TODO: make it so that players can choose between applying the new mode to the room they are in (related area) vs the entire alarm area
|
||||
for (var/area/RA in alarm_area.related)
|
||||
for (var/obj/machinery/alarm/AA in RA)
|
||||
AA.mode = mode
|
||||
|
||||
switch(mode)
|
||||
if(AALARM_MODE_SCRUBBING)
|
||||
for(var/device_id in alarm_area.air_scrub_names)
|
||||
|
||||
@@ -85,7 +85,8 @@
|
||||
crewmemberData["fire"] = round(H.getFireLoss(), 1)
|
||||
crewmemberData["brute"] = round(H.getBruteLoss(), 1)
|
||||
crewmemberData["name"] = (H.wear_id ? H.wear_id.name : "Unknown")
|
||||
crewmemberData["area"] = get_area(H)
|
||||
var/area/A = get_area(H)
|
||||
crewmemberData["area"] = sanitize(A.name)
|
||||
crewmemberData["x"] = pos.x
|
||||
crewmemberData["y"] = pos.y
|
||||
|
||||
@@ -113,4 +114,4 @@
|
||||
var/obj/item/clothing/under/C = H.w_uniform
|
||||
if (C.has_sensor)
|
||||
tracked |= C
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
switch(href_list["field"])
|
||||
if("fingerprint")
|
||||
if (istype(src.active1, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
|
||||
return
|
||||
src.active1.fields["fingerprint"] = t1
|
||||
@@ -271,55 +271,55 @@
|
||||
src.active1.fields["age"] = t1
|
||||
if("mi_dis")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["mi_dis"] = t1
|
||||
if("mi_dis_d")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["mi_dis_d"] = t1
|
||||
if("ma_dis")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["ma_dis"] = t1
|
||||
if("ma_dis_d")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["ma_dis_d"] = t1
|
||||
if("alg")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["alg"] = t1
|
||||
if("alg_d")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["alg_d"] = t1
|
||||
if("cdi")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["cdi"] = t1
|
||||
if("cdi_d")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["cdi_d"] = t1
|
||||
if("notes")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = copytext(html_encode(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(html_encode(trim(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["notes"] = t1
|
||||
@@ -334,21 +334,21 @@
|
||||
src.temp = text("<B>Blood Type:</B><BR>\n\t<A href='?src=\ref[];temp=1;b_type=an'>A-</A> <A href='?src=\ref[];temp=1;b_type=ap'>A+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=bn'>B-</A> <A href='?src=\ref[];temp=1;b_type=bp'>B+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=abn'>AB-</A> <A href='?src=\ref[];temp=1;b_type=abp'>AB+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=on'>O-</A> <A href='?src=\ref[];temp=1;b_type=op'>O+</A><BR>", src, src, src, src, src, src, src, src)
|
||||
if("b_dna")
|
||||
if (istype(src.active1, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please input DNA hash:", "Med. records", src.active1.fields["dna"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please input DNA hash:", "Med. records", src.active1.fields["dna"], null) as text)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
|
||||
return
|
||||
src.active1.fields["dna"] = t1
|
||||
if("vir_name")
|
||||
var/datum/data/record/v = locate(href_list["edit_vir"])
|
||||
if (v)
|
||||
var/t1 = copytext(sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
|
||||
return
|
||||
v.fields["name"] = t1
|
||||
if("vir_desc")
|
||||
var/datum/data/record/v = locate(href_list["edit_vir"])
|
||||
if (v)
|
||||
var/t1 = copytext(sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
|
||||
return
|
||||
v.fields["description"] = t1
|
||||
@@ -451,7 +451,7 @@
|
||||
if (!( istype(src.active2, /datum/data/record) ))
|
||||
return
|
||||
var/a2 = src.active2
|
||||
var/t1 = copytext(sanitize(input("Add Comment:", "Med. records", null, null) as message),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Add Comment:", "Med. records", null, null) as message)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
var/counter = 1
|
||||
|
||||
@@ -387,7 +387,7 @@ What a mess.*/
|
||||
if (!( istype(active2, /datum/data/record) ))
|
||||
return
|
||||
var/a2 = active2
|
||||
var/t1 = copytext(sanitize(input("Add Comment:", "Secure. records", null, null) as message),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Add Comment:", "Secure. records", null, null) as message)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
||||
return
|
||||
var/counter = 1
|
||||
@@ -450,19 +450,19 @@ What a mess.*/
|
||||
switch(href_list["field"])
|
||||
if("name")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = input("Please input name:", "Secure. records", active1.fields["name"], null) as text
|
||||
var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
|
||||
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
|
||||
return
|
||||
active1.fields["name"] = t1
|
||||
if("id")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["id"] = t1
|
||||
if("fingerprint")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["fingerprint"] = t1
|
||||
@@ -480,31 +480,31 @@ What a mess.*/
|
||||
active1.fields["age"] = t1
|
||||
if("mi_crim")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
||||
return
|
||||
active2.fields["mi_crim"] = t1
|
||||
if("mi_crim_d")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
||||
return
|
||||
active2.fields["mi_crim_d"] = t1
|
||||
if("ma_crim")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
||||
return
|
||||
active2.fields["ma_crim"] = t1
|
||||
if("ma_crim_d")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
||||
return
|
||||
active2.fields["ma_crim_d"] = t1
|
||||
if("notes")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = copytext(html_encode(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(html_encode(trim(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
||||
return
|
||||
active2.fields["notes"] = t1
|
||||
@@ -531,7 +531,7 @@ What a mess.*/
|
||||
alert(usr, "You do not have the required rank to do this!")
|
||||
if("species")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["species"] = t1
|
||||
|
||||
@@ -325,19 +325,19 @@ What a mess.*/
|
||||
switch(href_list["field"])
|
||||
if("name")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = input("Please input name:", "Secure. records", active1.fields["name"], null) as text
|
||||
var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
|
||||
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
|
||||
return
|
||||
active1.fields["name"] = t1
|
||||
if("id")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["id"] = t1
|
||||
if("fingerprint")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["fingerprint"] = t1
|
||||
@@ -366,7 +366,7 @@ What a mess.*/
|
||||
alert(usr, "You do not have the required rank to do this!")
|
||||
if("species")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = copytext(trim(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["species"] = t1
|
||||
|
||||
@@ -77,6 +77,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
|
||||
icon_state = "door_closed"
|
||||
power_channel = ENVIRON
|
||||
|
||||
explosion_resistance = 15
|
||||
var/aiControlDisabled = 0 //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
|
||||
var/hackProof = 0 // if 1, this door can't be hacked by the AI
|
||||
var/secondsMainPowerLost = 0 //The number of seconds until power is restored.
|
||||
|
||||
@@ -6,13 +6,16 @@ obj/machinery/door/airlock
|
||||
var/frequency
|
||||
var/shockedby = list()
|
||||
var/datum/radio_frequency/radio_connection
|
||||
explosion_resistance = 15
|
||||
var/cur_command = null //the command the door is currently attempting to complete
|
||||
|
||||
obj/machinery/door/airlock/proc/can_radio()
|
||||
if( !arePowerSystemsOn() || (stat & NOPOWER) || isWireCut(AIRLOCK_WIRE_AI_CONTROL) )
|
||||
return 0
|
||||
return 1
|
||||
|
||||
obj/machinery/door/airlock/process()
|
||||
..()
|
||||
execute_current_command()
|
||||
|
||||
obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||
if (!can_radio()) return
|
||||
@@ -21,7 +24,19 @@ obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||
|
||||
if(id_tag != signal.data["tag"] || !signal.data["command"]) return
|
||||
|
||||
switch(signal.data["command"])
|
||||
cur_command = signal.data["command"]
|
||||
execute_current_command()
|
||||
|
||||
obj/machinery/door/airlock/proc/execute_current_command()
|
||||
if (!cur_command)
|
||||
return
|
||||
|
||||
do_command(cur_command)
|
||||
if (command_completed(cur_command))
|
||||
cur_command = null
|
||||
|
||||
obj/machinery/door/airlock/proc/do_command(var/command)
|
||||
switch(command)
|
||||
if("open")
|
||||
open()
|
||||
|
||||
@@ -48,9 +63,30 @@ obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||
|
||||
lock()
|
||||
sleep(2)
|
||||
|
||||
|
||||
send_status()
|
||||
|
||||
obj/machinery/door/airlock/proc/command_completed(var/command)
|
||||
switch(command)
|
||||
if("open")
|
||||
return (!density)
|
||||
|
||||
if("close")
|
||||
return density
|
||||
|
||||
if("unlock")
|
||||
return !locked
|
||||
|
||||
if("lock")
|
||||
return locked
|
||||
|
||||
if("secure_open")
|
||||
return (locked && !density)
|
||||
|
||||
if("secure_close")
|
||||
return (locked && density)
|
||||
|
||||
return 1 //Unknown command. Just assume it's completed.
|
||||
|
||||
obj/machinery/door/airlock/proc/send_status()
|
||||
if(radio_connection)
|
||||
|
||||
@@ -108,7 +108,9 @@
|
||||
|
||||
//are we ready for undocking?
|
||||
/datum/computer/file/embedded_program/docking/airlock/ready_for_undocking()
|
||||
return airlock_program.check_doors_secured()
|
||||
var/ext_closed = airlock_program.check_exterior_door_secured()
|
||||
var/int_closed = airlock_program.check_interior_door_secured()
|
||||
return (ext_closed || int_closed)
|
||||
|
||||
//An airlock controller to be used by the airlock-based docking port controller.
|
||||
//Same as a regular airlock controller but allows disabling of the regular airlock functions when docking
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
|
||||
if (istype(M, /obj/machinery/embedded_controller/radio/airlock)) //if our controller is an airlock controller than we can auto-init our tags
|
||||
var/obj/machinery/embedded_controller/radio/airlock/controller = M
|
||||
tag_exterior_door = controller.tag_exterior_door
|
||||
tag_interior_door = controller.tag_interior_door
|
||||
tag_airpump = controller.tag_airpump
|
||||
tag_chamber_sensor = controller.tag_chamber_sensor
|
||||
tag_exterior_door = controller.tag_exterior_door? controller.tag_exterior_door : "[id_tag]_outer"
|
||||
tag_interior_door = controller.tag_interior_door? controller.tag_interior_door : "[id_tag]_inner"
|
||||
tag_airpump = controller.tag_airpump? controller.tag_airpump : "[id_tag]_pump"
|
||||
tag_chamber_sensor = controller.tag_chamber_sensor? controller.tag_chamber_sensor : "[id_tag]_sensor"
|
||||
tag_exterior_sensor = controller.tag_exterior_sensor
|
||||
tag_interior_sensor = controller.tag_interior_sensor
|
||||
memory["secure"] = controller.tag_secure
|
||||
@@ -248,9 +248,15 @@
|
||||
return (state == STATE_WAIT && target_state == TARGET_NONE)
|
||||
|
||||
//are the doors closed and locked?
|
||||
/datum/computer/file/embedded_program/airlock/proc/check_exterior_door_secured()
|
||||
return (memory["exterior_status"]["state"] == "closed" && memory["exterior_status"]["lock"] == "locked")
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/check_interior_door_secured()
|
||||
return (memory["interior_status"]["state"] == "closed" && memory["interior_status"]["lock"] == "locked")
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/check_doors_secured()
|
||||
var/ext_closed = (memory["exterior_status"]["state"] == "closed" && memory["exterior_status"]["lock"] == "locked")
|
||||
var/int_closed = (memory["interior_status"]["state"] == "closed" && memory["interior_status"]["lock"] == "locked")
|
||||
var/ext_closed = check_exterior_door_secured()
|
||||
var/int_closed = check_interior_door_secured()
|
||||
return (ext_closed && int_closed)
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/signalDoor(var/tag, var/command)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
//This controller goes on the escape pod itself
|
||||
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod
|
||||
name = "escape pod controller"
|
||||
var/datum/shuttle/ferry/escape_pod/pod
|
||||
|
||||
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
if (istype(M, /obj/machinery/embedded_controller/radio/simple_docking_controller))
|
||||
var/obj/machinery/embedded_controller/radio/simple_docking_controller/controller = M
|
||||
|
||||
tag_door = controller.tag_door
|
||||
tag_door = controller.tag_door? controller.tag_door : "[id_tag]_hatch"
|
||||
|
||||
spawn(10)
|
||||
signal_door("update") //signals connected doors to update their status
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
O.Weaken(strength)
|
||||
if (istype(O, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = O
|
||||
var/datum/organ/internal/eyes/E = H.internal_organs["eyes"]
|
||||
var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"]
|
||||
if ((E.damage > E.min_bruised_damage && prob(E.damage + 50)))
|
||||
flick("e_flash", O:flash)
|
||||
E.damage += rand(1, 5)
|
||||
|
||||
@@ -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,28 +74,28 @@ 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)
|
||||
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.charges < initial(B.charges))
|
||||
B.charges++
|
||||
icon_state = "recharger1"
|
||||
icon_state = icon_state_charging
|
||||
use_power(150)
|
||||
else
|
||||
icon_state = "recharger2"
|
||||
icon_state = icon_state_charged
|
||||
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)
|
||||
else
|
||||
icon_state = "recharger2"
|
||||
icon_state = icon_state_charged
|
||||
return
|
||||
|
||||
obj/machinery/recharger/emp_act(severity)
|
||||
@@ -112,40 +115,15 @@ 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)
|
||||
else
|
||||
icon_state = "wrecharger2"
|
||||
return
|
||||
if(istype(charging, /obj/item/weapon/melee/baton))
|
||||
var/obj/item/weapon/melee/baton/B = charging
|
||||
if(B.charges < initial(B.charges))
|
||||
B.charges++
|
||||
icon_state = "wrecharger1"
|
||||
use_power(150)
|
||||
else
|
||||
icon_state = "wrecharger2"
|
||||
|
||||
obj/machinery/recharger/wallcharger/update_icon()
|
||||
if(charging)
|
||||
icon_state = "wrecharger1"
|
||||
else
|
||||
icon_state = "wrecharger0"
|
||||
icon_state_idle = "wrecharger0"
|
||||
icon_state_charging = "wrecharger1"
|
||||
icon_state_charged = "wrecharger2"
|
||||
@@ -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")
|
||||
|
||||
@@ -187,53 +187,63 @@
|
||||
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(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.suspended)
|
||||
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]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
|
||||
//Just Vend it.
|
||||
transfer_and_vend(CH)
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
usr << "\icon[src]<span class='warning'>Connected account has been suspended.</span>"
|
||||
else
|
||||
//Just Vend it.
|
||||
usr << "\icon[src]<span class='warning'>Error: Unable to access your account. Please contact technical support if problem persists.</span>"
|
||||
|
||||
/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]<span class='warning'>You don't have that much money!</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
usr << "\icon[src]<span class='warning'>Error: Unable to access your account. Please contact technical support if problem persists.</span>"
|
||||
|
||||
|
||||
/obj/machinery/vending/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -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
|
||||
return
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -539,7 +551,7 @@
|
||||
"\red You stab yourself in the eyes with [src]!" \
|
||||
)
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/internal/eyes/eyes = H.internal_organs["eyes"]
|
||||
var/datum/organ/internal/eyes/eyes = H.internal_organs_by_name["eyes"]
|
||||
eyes.damage += rand(3,4)
|
||||
if(eyes.damage >= eyes.min_bruised_damage)
|
||||
if(M.stat != 2)
|
||||
|
||||
@@ -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 << "<span class='warning'>This kit has no parts for this modification left.</span>"
|
||||
@@ -22,11 +24,20 @@
|
||||
del(src)
|
||||
return
|
||||
|
||||
/* TODO: list comparison
|
||||
if(istype(O,to_type))
|
||||
user << "<span class='notice'>[O] is already modified.</span>"
|
||||
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 << "<span class='notice'>[src] is unable to modify that.</span>"
|
||||
return
|
||||
*/
|
||||
|
||||
var/excluding = ("exclude" in I.species_restricted)
|
||||
var/in_list = (target_species in I.species_restricted)
|
||||
if (excluding ^ in_list)
|
||||
user << "<span class='notice'>[I] is already modified.</span>"
|
||||
|
||||
if(!isturf(O.loc))
|
||||
user << "<span class='warning'>[O] must be safely placed on the ground for modification.</span>"
|
||||
@@ -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]"
|
||||
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"
|
||||
@@ -83,7 +83,7 @@
|
||||
//This really should be in mob not every check
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/internal/eyes/E = H.internal_organs["eyes"]
|
||||
var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"]
|
||||
if (E.damage >= E.min_bruised_damage)
|
||||
M << "\red Your eyes start to burn badly!"
|
||||
if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang)))
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
/obj/item/weapon/kitchen/utensil/New()
|
||||
if (prob(60))
|
||||
src.pixel_y = rand(0, 4)
|
||||
return
|
||||
|
||||
create_reagents(5)
|
||||
return
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -737,11 +737,11 @@
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/security_space_law
|
||||
name = "Space Law"
|
||||
name = "Corporate Regulations"
|
||||
desc = "A set of NanoTrasen guidelines for keeping law and order on their space stations."
|
||||
icon_state = "bookSpaceLaw"
|
||||
author = "NanoTrasen"
|
||||
title = "Space Law"
|
||||
title = "Corporate Regulations"
|
||||
|
||||
dat = {"
|
||||
|
||||
@@ -749,7 +749,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<iframe width='100%' height='97%' src="http://baystation12.net/wiki/index.php?title=Space_law&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
|
||||
<iframe width='100%' height='97%' src="http://baystation12.net/wiki/index.php?title=Corporate_Regulations&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -97,26 +97,6 @@
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/melee/baton/throw_impact(atom/hit_atom)
|
||||
. = ..()
|
||||
if (prob(50))
|
||||
if(istype(hit_atom, /mob/living))
|
||||
var/mob/living/carbon/human/H = hit_atom
|
||||
if(status)
|
||||
H.apply_effect(10, STUN, 0)
|
||||
H.apply_effect(10, WEAKEN, 0)
|
||||
H.apply_effect(10, STUTTER, 0)
|
||||
charges--
|
||||
|
||||
for(var/mob/M in player_list) if(M.key == src.fingerprintslast)
|
||||
foundmob = M
|
||||
break
|
||||
|
||||
H.visible_message("<span class='danger'>[src], thrown by [foundmob.name], strikes [H] and stuns them!</span>")
|
||||
|
||||
H.attack_log += "\[[time_stamp()]\]<font color='orange'> Stunned by thrown [src.name] last touched by ([src.fingerprintslast])</font>"
|
||||
msg_admin_attack("Flying [src.name], last touched by ([src.fingerprintslast]) stunned [key_name(H)]" )
|
||||
|
||||
/obj/item/weapon/melee/baton/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
|
||||
@@ -356,7 +356,7 @@
|
||||
var/safety = user:eyecheck()
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/datum/organ/internal/eyes/E = H.internal_organs["eyes"]
|
||||
var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"]
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
return
|
||||
switch(safety)
|
||||
|
||||
+16
-4
@@ -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))
|
||||
@@ -130,6 +130,13 @@ var/global/normal_ooc_colour = "#002eb8"
|
||||
log_ooc("(LOCAL) [mob.name]/[key] : [msg]")
|
||||
|
||||
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
|
||||
@@ -138,7 +145,6 @@ var/global/normal_ooc_colour = "#002eb8"
|
||||
continue //they are handled after that
|
||||
|
||||
if(C.prefs.toggles & CHAT_LOOC)
|
||||
var/display_name = src.key
|
||||
if(holder)
|
||||
if(holder.fakekey)
|
||||
if(C.holder)
|
||||
@@ -146,9 +152,15 @@ var/global/normal_ooc_colour = "#002eb8"
|
||||
else
|
||||
display_name = holder.fakekey
|
||||
C << "<font color='#6699CC'><span class='ooc'><span class='prefix'>LOOC:</span> <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
|
||||
// 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 << "<font color='#6699CC'><span class='ooc'><span class='prefix'>[prefix]:</span> <EM>[src.key]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
C << "<font color='#6699CC'><span class='ooc'><span class='prefix'>[prefix]:</span> <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ var/global/vox_tick = 1
|
||||
equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(src), slot_glasses) // REPLACE WITH CODED VOX ALTERNATIVE.
|
||||
equip_to_slot_or_del(new /obj/item/device/chameleon(src), slot_l_store)
|
||||
|
||||
var/obj/item/weapon/spikethrower/W = new(src)
|
||||
var/obj/item/weapon/gun/launcher/spikethrower/W = new(src)
|
||||
equip_to_slot_or_del(W, slot_r_hand)
|
||||
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
@@ -405,4 +428,8 @@ BLIND // can't see anything
|
||||
sensor_mode = pick(0,1,2,3)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/emp_act(severity)
|
||||
if (hastie)
|
||||
hastie.emp_act(severity)
|
||||
..()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -72,85 +72,85 @@
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
/obj/item/clothing/under/psyche
|
||||
name = "psychedelic"
|
||||
name = "psychedelic jumpsuit"
|
||||
desc = "Groovy!"
|
||||
icon_state = "psyche"
|
||||
item_color = "psyche"
|
||||
|
||||
/obj/item/clothing/under/lightblue
|
||||
name = "lightblue"
|
||||
name = "lightblue jumpsuit"
|
||||
desc = "lightblue"
|
||||
icon_state = "lightblue"
|
||||
item_color = "lightblue"
|
||||
|
||||
/obj/item/clothing/under/aqua
|
||||
name = "aqua"
|
||||
name = "aqua jumpsuit"
|
||||
desc = "aqua"
|
||||
icon_state = "aqua"
|
||||
item_color = "aqua"
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
/obj/item/clothing/under/purple
|
||||
name = "purple"
|
||||
name = "purple jumpsuit"
|
||||
desc = "purple"
|
||||
icon_state = "purple"
|
||||
item_state = "p_suit"
|
||||
item_color = "purple"
|
||||
|
||||
/obj/item/clothing/under/lightpurple
|
||||
name = "lightpurple"
|
||||
name = "lightpurple jumpsuit"
|
||||
desc = "lightpurple"
|
||||
icon_state = "lightpurple"
|
||||
item_color = "lightpurple"
|
||||
|
||||
/obj/item/clothing/under/lightgreen
|
||||
name = "lightgreen"
|
||||
name = "lightgreen jumpsuit"
|
||||
desc = "lightgreen"
|
||||
icon_state = "lightgreen"
|
||||
item_color = "lightgreen"
|
||||
|
||||
/obj/item/clothing/under/lightblue
|
||||
name = "lightblue"
|
||||
name = "lightblue jumpsuit"
|
||||
desc = "lightblue"
|
||||
icon_state = "lightblue"
|
||||
item_color = "lightblue"
|
||||
|
||||
/obj/item/clothing/under/lightbrown
|
||||
name = "lightbrown"
|
||||
name = "lightbrown jumpsuit"
|
||||
desc = "lightbrown"
|
||||
icon_state = "lightbrown"
|
||||
item_color = "lightbrown"
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
/obj/item/clothing/under/brown
|
||||
name = "brown"
|
||||
name = "brown jumpsuit"
|
||||
desc = "brown"
|
||||
icon_state = "brown"
|
||||
item_color = "brown"
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
/obj/item/clothing/under/yellowgreen
|
||||
name = "yellowgreen"
|
||||
name = "yellowgreen jumpsuit"
|
||||
desc = "yellowgreen"
|
||||
icon_state = "yellowgreen"
|
||||
item_color = "yellowgreen"
|
||||
|
||||
/obj/item/clothing/under/darkblue
|
||||
name = "darkblue"
|
||||
name = "darkblue jumpsuit"
|
||||
desc = "darkblue"
|
||||
icon_state = "darkblue"
|
||||
item_color = "darkblue"
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
/obj/item/clothing/under/lightred
|
||||
name = "lightred"
|
||||
name = "lightred jumpsuit"
|
||||
desc = "lightred"
|
||||
icon_state = "lightred"
|
||||
item_color = "lightred"
|
||||
|
||||
/obj/item/clothing/under/darkred
|
||||
name = "darkred"
|
||||
name = "darkred jumpsuit"
|
||||
desc = "darkred"
|
||||
icon_state = "darkred"
|
||||
item_color = "darkred"
|
||||
flags = FPRINT | TABLEPASS
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
@@ -113,24 +113,28 @@
|
||||
|
||||
|
||||
/obj/item/clothing/under/lawyer/black
|
||||
name = "black Lawyer suit"
|
||||
icon_state = "lawyer_black"
|
||||
item_state = "lawyer_black"
|
||||
item_color = "lawyer_black"
|
||||
|
||||
|
||||
/obj/item/clothing/under/lawyer/female
|
||||
name = "black Lawyer suit"
|
||||
icon_state = "black_suit_fem"
|
||||
item_state = "black_suit_fem"
|
||||
item_color = "black_suit_fem"
|
||||
|
||||
|
||||
/obj/item/clothing/under/lawyer/red
|
||||
name = "red Lawyer suit"
|
||||
icon_state = "lawyer_red"
|
||||
item_state = "lawyer_red"
|
||||
item_color = "lawyer_red"
|
||||
|
||||
|
||||
/obj/item/clothing/under/lawyer/blue
|
||||
name = "blue Lawyer suit"
|
||||
icon_state = "lawyer_blue"
|
||||
item_state = "lawyer_blue"
|
||||
item_color = "lawyer_blue"
|
||||
@@ -178,4 +182,4 @@
|
||||
name = "shaft miner's jumpsuit"
|
||||
icon_state = "miner"
|
||||
item_state = "miner"
|
||||
item_color = "miner"
|
||||
item_color = "miner"
|
||||
|
||||
@@ -6,21 +6,26 @@
|
||||
body_parts_covered = LOWER_TORSO
|
||||
|
||||
/obj/item/clothing/under/shorts/red
|
||||
name = "red athletic shorts"
|
||||
icon_state = "redshorts"
|
||||
item_color = "redshorts"
|
||||
|
||||
/obj/item/clothing/under/shorts/green
|
||||
name = "green athletic shorts"
|
||||
icon_state = "greenshorts"
|
||||
item_color = "greenshorts"
|
||||
|
||||
/obj/item/clothing/under/shorts/blue
|
||||
name = "blue athletic shorts"
|
||||
icon_state = "blueshorts"
|
||||
item_color = "blueshorts"
|
||||
|
||||
/obj/item/clothing/under/shorts/black
|
||||
name = "black athletic shorts"
|
||||
icon_state = "blackshorts"
|
||||
item_color = "blackshorts"
|
||||
|
||||
/obj/item/clothing/under/shorts/grey
|
||||
name = "grey athletic shorts"
|
||||
icon_state = "greyshorts"
|
||||
item_color = "greyshorts"
|
||||
item_color = "greyshorts"
|
||||
|
||||
@@ -700,7 +700,7 @@
|
||||
name = "Robotics labcoat"
|
||||
desc = "A labcoat with a few markings denoting it as the labcoat of roboticist."
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "aeneasrinil_open"
|
||||
icon_state = "aeneasrinil"
|
||||
|
||||
/obj/item/clothing/suit/storage/labcoat/fluff/pink //spaceman96: Trenna Seber
|
||||
name = "pink labcoat"
|
||||
|
||||
@@ -175,9 +175,12 @@
|
||||
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 = attempt_account_access(attempt_account_num, attempt_pin, 1)
|
||||
if(linked_account.suspended)
|
||||
linked_account = null
|
||||
usr << "\icon[src]<span class='warning'>Account has been suspended.</span>"
|
||||
if(linked_account)
|
||||
if(linked_account.suspended)
|
||||
linked_account = null
|
||||
usr << "\icon[src]<span class='warning'>Account has been suspended.</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Account not found.</span>"
|
||||
if("trans_purpose")
|
||||
transaction_purpose = input("Enter reason for EFTPOS transaction", "Transaction purpose")
|
||||
if("trans_value")
|
||||
@@ -199,7 +202,7 @@
|
||||
else if(linked_account)
|
||||
transaction_locked = 1
|
||||
else
|
||||
usr << "\icon[src] <span class='warning'>No account connected to send transactions to.</span>"
|
||||
usr << "\icon[src]<span class='warning'>No account connected to send transactions to.</span>"
|
||||
if("scan_card")
|
||||
if(linked_account)
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
@@ -228,8 +231,12 @@
|
||||
if(transaction_locked && !transaction_paid)
|
||||
if(linked_account)
|
||||
if(!linked_account.suspended)
|
||||
var/attempt_pin = input("Enter pin code", "EFTPOS transaction") as num
|
||||
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
|
||||
var/attempt_pin = ""
|
||||
var/datum/money_account/D = get_account(C.associated_account_number)
|
||||
if(D.security_level)
|
||||
attempt_pin = input("Enter pin code", "EFTPOS transaction") as num
|
||||
D = null
|
||||
D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
|
||||
if(D)
|
||||
if(!D.suspended)
|
||||
if(transaction_amount <= D.money)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,45 +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)
|
||||
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/O = pick(C.internal_organs)
|
||||
var/datum/organ/internal/I = C.internal_organs[O]
|
||||
|
||||
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--
|
||||
@@ -4,6 +4,11 @@
|
||||
if(!client)
|
||||
return
|
||||
|
||||
if(speaker && !speaker.client && istype(src,/mob/dead/observer) && client.prefs.toggles & CHAT_GHOSTEARS && !speaker in view(src))
|
||||
//Does the speaker have a client? It's either random stuff that observers won't care about (Experiment 97B says, 'EHEHEHEHEHEHEHE')
|
||||
//Or someone snoring. So we make it where they won't hear it.
|
||||
return
|
||||
|
||||
if(sleeping || stat == 1)
|
||||
hear_sleep(message)
|
||||
return
|
||||
@@ -50,7 +55,7 @@
|
||||
src << "<span class='name'>[speaker_name]</span>[alt_name] talks but you cannot hear \him."
|
||||
else
|
||||
src << "<span class='game say'><span class='name'>[speaker_name]</span>[alt_name] [track][verb], <span class='message'><span class='[style]'>\"[message]\"</span></span></span>"
|
||||
if (speech_sound)
|
||||
if (speech_sound && (get_dist(speaker, src) <= world.view && src.z == speaker.z))
|
||||
var/turf/source = speaker? get_turf(speaker) : get_turf(src)
|
||||
src.playsound_local(source, speech_sound, sound_vol, 1)
|
||||
|
||||
|
||||
Regular → Executable
+2
-2
@@ -34,10 +34,10 @@
|
||||
speech_verb = "mrowls"
|
||||
colour = "tajaran_signlang"
|
||||
key = "y" //only "dfpqxyz" left.
|
||||
|
||||
|
||||
//need to find a way to resolve possesive macros
|
||||
signlang_verb = list("flicks their left ear", "flicks their right ear", "swivels their ears", "twitches their tail", "curls the end of their tail", "arches their tail", "wiggles the end of their tail", "waves their tail about", "holds up a claw", "gestures with their left hand", "gestures with their right hand", "gestures with their tail", "gestures with their ears")
|
||||
|
||||
|
||||
flags = WHITELISTED | NONVERBAL
|
||||
|
||||
/datum/language/skrell
|
||||
|
||||
@@ -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 <B>You withdraw your probosci, releasing control of [B.host_brain]</B>"
|
||||
B.host_brain << "\red <B>Your vision swims as the alien parasite releases control of your body.</B>"
|
||||
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 <B>ERROR NO BORER OR BRAINMOB DETECTED IN THIS MOB, THIS IS A BUG !</B>"
|
||||
|
||||
//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
|
||||
return
|
||||
|
||||
@@ -237,9 +237,7 @@
|
||||
|
||||
msg += "</span>"
|
||||
|
||||
if(stat == UNCONSCIOUS)
|
||||
msg += "[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.\n"
|
||||
else if(getBrainLoss() >= 60)
|
||||
if(getBrainLoss() >= 60)
|
||||
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
|
||||
|
||||
if(!key && brain_op_stage != 4 && stat != DEAD)
|
||||
|
||||
@@ -1086,8 +1086,7 @@
|
||||
H.brainmob.mind.transfer_to(src)
|
||||
del(H)
|
||||
|
||||
for(var/E in internal_organs)
|
||||
var/datum/organ/internal/I = internal_organs[E]
|
||||
for(var/datum/organ/internal/I in internal_organs)
|
||||
I.damage = 0
|
||||
|
||||
for (var/datum/disease/virus in viruses)
|
||||
@@ -1099,11 +1098,11 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/proc/is_lung_ruptured()
|
||||
var/datum/organ/internal/lungs/L = internal_organs["lungs"]
|
||||
var/datum/organ/internal/lungs/L = internal_organs_by_name["lungs"]
|
||||
return L.is_bruised()
|
||||
|
||||
/mob/living/carbon/human/proc/rupture_lung()
|
||||
var/datum/organ/internal/lungs/L = internal_organs["lungs"]
|
||||
var/datum/organ/internal/lungs/L = internal_organs_by_name["lungs"]
|
||||
|
||||
if(!L.is_bruised())
|
||||
src.custom_pain("You feel a stabbing pain in your chest!", 1)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/mob/living/carbon/human/getBrainLoss()
|
||||
var/res = brainloss
|
||||
var/datum/organ/internal/brain/sponge = internal_organs["brain"]
|
||||
var/datum/organ/internal/brain/sponge = internal_organs_by_name["brain"]
|
||||
if (sponge.is_bruised())
|
||||
res += 20
|
||||
if (sponge.is_broken())
|
||||
|
||||
@@ -51,11 +51,6 @@ emp_act
|
||||
|
||||
return -1 // complete projectile permutation
|
||||
|
||||
if(check_shields(P.damage, "the [P.name]"))
|
||||
P.on_hit(src, 2, def_zone)
|
||||
handle_suit_punctures(P.damage_type, P.damage)
|
||||
return 2
|
||||
|
||||
//BEGIN BOOK'S TASER NERF.
|
||||
if(istype(P, /obj/item/projectile/beam/stun))
|
||||
var/datum/organ/external/select_area = get_organ(def_zone) // We're checking the outside, buddy!
|
||||
@@ -89,6 +84,10 @@ emp_act
|
||||
return
|
||||
//END TASER NERF
|
||||
|
||||
if(check_shields(P.damage, "the [P.name]"))
|
||||
P.on_hit(src, 2, def_zone)
|
||||
return 2
|
||||
|
||||
var/datum/organ/external/organ = get_organ(check_zone(def_zone))
|
||||
|
||||
var/armor = getarmor_organ(organ, "bullet")
|
||||
@@ -190,7 +189,8 @@ emp_act
|
||||
/mob/living/carbon/human/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
|
||||
if(!I || !user) return 0
|
||||
|
||||
var/target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, src)
|
||||
var/target_zone = def_zone? def_zone : get_zone_with_miss_chance(user.zone_sel.selecting, src)
|
||||
|
||||
if(user == src) // Attacking yourself can't miss
|
||||
target_zone = user.zone_sel.selecting
|
||||
if(!target_zone)
|
||||
@@ -229,7 +229,7 @@ emp_act
|
||||
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].")
|
||||
var/weapon_sharp = is_sharp(I)
|
||||
var/weapon_edge = has_edge(I)
|
||||
if ((weapon_sharp || weapon_edge) && prob(getarmor(def_zone, "melee")))
|
||||
if ((weapon_sharp || weapon_edge) && prob(getarmor(target_zone, "melee")))
|
||||
weapon_sharp = 0
|
||||
weapon_edge = 0
|
||||
|
||||
|
||||
@@ -13,9 +13,11 @@
|
||||
|
||||
if(reagents.has_reagent("nuka_cola")) return -1
|
||||
|
||||
var/health_deficiency = (100 - health + halloss)
|
||||
var/health_deficiency = (100 - health)
|
||||
if(health_deficiency >= 40) tally += (health_deficiency / 25)
|
||||
|
||||
if(halloss >= 10) tally += (halloss / 10)
|
||||
|
||||
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
|
||||
if (hungry >= 70) tally += hungry/50
|
||||
|
||||
|
||||
@@ -1845,13 +1845,13 @@
|
||||
if("Ninja")
|
||||
holder.icon_state = "hudninja"
|
||||
if("head_loyalist")
|
||||
holder.icon_state = "loyalist"
|
||||
holder.icon_state = "hudloyalist"
|
||||
if("loyalist")
|
||||
holder.icon_state = "loyalist"
|
||||
holder.icon_state = "hudloyalist"
|
||||
if("head_mutineer")
|
||||
holder.icon_state = "mutineer"
|
||||
holder.icon_state = "hudmutineer"
|
||||
if("mutineer")
|
||||
holder.icon_state = "mutineer"
|
||||
holder.icon_state = "hudmutineer"
|
||||
|
||||
hud_list[SPECIALROLE_HUD] = holder
|
||||
hud_updateflag = 0
|
||||
|
||||
@@ -486,14 +486,8 @@
|
||||
B.host.adjustBrainLoss(rand(5,10))
|
||||
H << "\red <B>With an immense exertion of will, you regain control of your body!</B>"
|
||||
B.host << "\red <B>You feel control of the host brain ripped from your grasp, and retract your probosci before the wild neural impulses can damage you.</b>"
|
||||
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
|
||||
|
||||
@@ -100,7 +100,6 @@ var/list/ai_list = list()
|
||||
add_language("Siik'maas", 0)
|
||||
add_language("Siik'tajr", 0)
|
||||
add_language("Skrellian", 0)
|
||||
add_language("Rootspeak", 0)
|
||||
add_language("Tradeband", 1)
|
||||
add_language("Gutter", 0)
|
||||
|
||||
|
||||
Regular → Executable
+7
-5
@@ -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
|
||||
@@ -67,7 +69,7 @@
|
||||
add_language("Sol Common", 1)
|
||||
add_language("Tradeband", 1)
|
||||
add_language("Gutter", 1)
|
||||
|
||||
|
||||
//PDA
|
||||
pda = new(src)
|
||||
spawn(5)
|
||||
@@ -81,20 +83,20 @@
|
||||
..()
|
||||
usr << browse_rsc('html/paigrid.png') // Go ahead and cache the interface resources as early as possible
|
||||
|
||||
|
||||
|
||||
// this function shows the information about being silenced as a pAI in the Status panel
|
||||
/mob/living/silicon/pai/proc/show_silenced()
|
||||
if(src.silence_time)
|
||||
var/timeleft = round((silence_time - world.timeofday)/10 ,1)
|
||||
stat(null, "Communications system reboot in -[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/pai/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
if (src.client.statpanel == "Status")
|
||||
show_silenced()
|
||||
|
||||
|
||||
if (proc_holder_list.len)//Generic list for proc_holder objects.
|
||||
for(var/obj/effect/proc_holder/P in proc_holder_list)
|
||||
statpanel("[P.panel]","",P)
|
||||
|
||||
Regular → Executable
+32
-8
@@ -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 += "<a href='byond://?src=\ref[src];software=medicalhud;sub=0'>Medical Analysis Suite</a> [(src.medHUD) ? "<font color=#55FF55>•</font>" : "<font color=#FF5555>•</font>"] <br>"
|
||||
if(s == "universal translator") //This file has to be saved as ANSI or this will not display correctly
|
||||
dat += "<a href='byond://?src=\ref[src];software=translator;sub=0'>Universal Translator</a> [(src.universal_speak) ? "<font color=#55FF55>•</font>" : "<font color=#FF5555>•</font>"] <br>"
|
||||
dat += "<a href='byond://?src=\ref[src];software=translator;sub=0'>Universal Translator</a> [(src.translator_on) ? "<font color=#55FF55>•</font>" : "<font color=#FF5555>•</font>"] <br>"
|
||||
if(s == "projection array")
|
||||
dat += "<a href='byond://?src=\ref[src];software=projectionarray;sub=0'>Projection Array</a> <br>"
|
||||
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()]</TT></body></html>"}
|
||||
|
||||
|
||||
return dat
|
||||
|
||||
|
||||
// Crew Manifest
|
||||
/mob/living/silicon/pai/proc/softwareManifest()
|
||||
var/dat = ""
|
||||
@@ -498,7 +498,7 @@
|
||||
/mob/living/silicon/pai/proc/softwareTranslator()
|
||||
var/dat = {"<h2>Universal Translator</h2><hr>
|
||||
When enabled, this device will automatically convert all spoken and written languages into a format that any known recipient can understand.<br><br>
|
||||
The device is currently [ (src.universal_speak) ? "<font color=#55FF55>en" : "<font color=#FF5555>dis" ]abled</font>.<br>
|
||||
The device is currently [ (src.translator_on) ? "<font color=#55FF55>en" : "<font color=#FF5555>dis" ]abled</font>.<br>
|
||||
<a href='byond://?src=\ref[src];software=translator;sub=0;toggle=1'>Toggle Device</a><br>
|
||||
"}
|
||||
return dat
|
||||
@@ -538,7 +538,7 @@
|
||||
return dat
|
||||
dat += {"<b>Bioscan Results for [M]</b>: <br>
|
||||
Overall Status: [M.stat > 1 ? "dead" : "[M.health]% healthy"] <br><br>
|
||||
|
||||
|
||||
<b>Scan Breakdown</b>: <br>
|
||||
Respiratory: [M.getOxyLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getOxyLoss()]</font><br>
|
||||
Toxicology: [M.getToxLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getToxLoss()]</font><br>
|
||||
@@ -676,7 +676,7 @@
|
||||
dat += "</li>"
|
||||
dat += "</ul>"
|
||||
dat += "Messages: <hr>"
|
||||
|
||||
|
||||
dat += "<style>td.a { vertical-align:top; }</style>"
|
||||
dat += "<table>"
|
||||
for(var/index in pda.tnote)
|
||||
@@ -685,4 +685,28 @@
|
||||
else
|
||||
dat += addtext("<tr><td class='a'><i><b>From</b></i></td><td class='a'><i><b>→</b></i></td><td><i><b><a href='byond://?src=\ref[src];software=pdamessage;target=",index["target"],"'>", index["owner"],"</a>: </b></i>", index["message"], "<br></td></tr>")
|
||||
dat += "</table>"
|
||||
return dat
|
||||
return dat
|
||||
|
||||
/mob/living/silicon/pai/proc/translator_toggle()
|
||||
|
||||
// Sol Common, Tradeband and Gutter are added with New() and are therefore the current default, always active languages
|
||||
|
||||
if(translator_on)
|
||||
translator_on = 0
|
||||
|
||||
remove_language("Sinta'unathi")
|
||||
remove_language("Siik'maas")
|
||||
remove_language("Siik'tajr")
|
||||
remove_language("Skrellian")
|
||||
|
||||
src << "\blue Translator Module toggled OFF."
|
||||
|
||||
else
|
||||
translator_on = 1
|
||||
|
||||
add_language("Sinta'unathi")
|
||||
add_language("Siik'maas")
|
||||
add_language("Siik'tajr", 0)
|
||||
add_language("Skrellian")
|
||||
|
||||
src << "\blue Translator Module toggled ON."
|
||||
|
||||
@@ -317,10 +317,10 @@
|
||||
if (!yes || ( \
|
||||
!istype(AM,/obj/machinery/door) && \
|
||||
!istype(AM,/obj/machinery/recharge_station) && \
|
||||
!istype(AM,/obj/machinery/disposal/deliveryChute && \
|
||||
!istype(AM,/obj/machinery/disposal/deliveryChute) && \
|
||||
!istype(AM,/obj/machinery/teleport/hub) && \
|
||||
!istype(AM,/obj/effect/portal)
|
||||
))) return
|
||||
)) return
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
R.add_language("Siik'maas", 0)
|
||||
R.add_language("Siik'tajr", 0)
|
||||
R.add_language("Skrellian", 0)
|
||||
R.add_language("Rootspeak", 0)
|
||||
R.add_language("Tradeband", 0)
|
||||
R.add_language("Gutter", 0)
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/mob/living/silicon/say_understands(var/other,var/datum/language/speaking = null)
|
||||
//These only pertain to common. Languages are handled by mob/say_understands()
|
||||
if (!speaking)
|
||||
if (istype(other, /mob/living/carbon/human))
|
||||
if (istype(other, /mob/living/carbon))
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon))
|
||||
return 1
|
||||
@@ -60,7 +60,7 @@
|
||||
return
|
||||
|
||||
var/verb = say_quote(message)
|
||||
|
||||
|
||||
//parse radio key and consume it
|
||||
var/message_mode = parse_message_mode(message, "general")
|
||||
if (message_mode)
|
||||
@@ -68,19 +68,19 @@
|
||||
message = trim(copytext(message,2))
|
||||
else
|
||||
message = trim(copytext(message,3))
|
||||
|
||||
|
||||
if(message_mode && bot_type == IS_ROBOT && message_mode != "binary" && !R.is_component_functioning("radio"))
|
||||
src << "\red Your radio isn't functional at this time."
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
//parse language key and consume it
|
||||
var/datum/language/speaking = parse_language(message)
|
||||
if (speaking)
|
||||
verb = speaking.speech_verb
|
||||
message = copytext(message,3)
|
||||
|
||||
|
||||
|
||||
|
||||
switch(message_mode)
|
||||
if("department")
|
||||
switch(bot_type)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
desc = "A small, quivering sluglike creature."
|
||||
speak_emote = list("chirrups")
|
||||
emote_hear = list("chirrups")
|
||||
response_help = "pokes the"
|
||||
response_help = "pokes"
|
||||
response_disarm = "prods the"
|
||||
response_harm = "stomps on the"
|
||||
icon_state = "brainslug"
|
||||
@@ -234,14 +234,45 @@
|
||||
src << "\red <B>You plunge your probosci deep into the cortex of the host brain, interfacing directly with their nervous system.</B>"
|
||||
host << "\red <B>You feel a strange shifting sensation behind your eyes as an alien consciousness displaces yours.</B>"
|
||||
|
||||
// host -> brain
|
||||
var/h2b_id = host.computer_id
|
||||
var/h2b_ip= host.lastKnownIP
|
||||
host.computer_id = null
|
||||
host.lastKnownIP = null
|
||||
|
||||
del(host_brain)
|
||||
host_brain = new(src)
|
||||
|
||||
host_brain.ckey = host.ckey
|
||||
|
||||
if(!host_brain.computer_id)
|
||||
host_brain.computer_id = h2b_id
|
||||
|
||||
if(!host_brain.lastKnownIP)
|
||||
host_brain.lastKnownIP = h2b_ip
|
||||
|
||||
// self -> host
|
||||
var/s2h_id = src.computer_id
|
||||
var/s2h_ip= src.lastKnownIP
|
||||
src.computer_id = null
|
||||
src.lastKnownIP = null
|
||||
|
||||
host.ckey = src.ckey
|
||||
|
||||
if(!host.computer_id)
|
||||
host.computer_id = s2h_id
|
||||
|
||||
if(!host.lastKnownIP)
|
||||
host.lastKnownIP = s2h_ip
|
||||
|
||||
controlling = 1
|
||||
|
||||
host.verbs += /mob/living/carbon/proc/release_control
|
||||
host.verbs += /mob/living/carbon/proc/punish_host
|
||||
host.verbs += /mob/living/carbon/proc/spawn_larvae
|
||||
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/borer/verb/secrete_chemicals()
|
||||
set category = "Alien"
|
||||
set name = "Secrete Chemicals"
|
||||
@@ -329,20 +360,45 @@ mob/living/simple_animal/borer/proc/detatch()
|
||||
host.verbs -= /mob/living/carbon/proc/punish_host
|
||||
host.verbs -= /mob/living/carbon/proc/spawn_larvae
|
||||
|
||||
if(host_brain.ckey)
|
||||
|
||||
if(host_brain)
|
||||
|
||||
// host -> self
|
||||
var/h2s_id = host.computer_id
|
||||
var/h2s_ip= host.lastKnownIP
|
||||
host.computer_id = null
|
||||
host.lastKnownIP = null
|
||||
|
||||
src.ckey = host.ckey
|
||||
|
||||
if(!src.computer_id)
|
||||
src.computer_id = h2s_id
|
||||
|
||||
if(!host_brain.lastKnownIP)
|
||||
src.lastKnownIP = h2s_ip
|
||||
|
||||
// brain -> host
|
||||
var/b2h_id = host_brain.computer_id
|
||||
var/b2h_ip= host_brain.lastKnownIP
|
||||
host_brain.computer_id = null
|
||||
host_brain.lastKnownIP = null
|
||||
|
||||
host.ckey = host_brain.ckey
|
||||
host_brain.ckey = null
|
||||
host_brain.name = "host brain"
|
||||
host_brain.real_name = "host brain"
|
||||
|
||||
if(!host.computer_id)
|
||||
host.computer_id = b2h_id
|
||||
|
||||
if(!host.lastKnownIP)
|
||||
host.lastKnownIP = b2h_ip
|
||||
|
||||
del(host_brain)
|
||||
|
||||
var/mob/living/H = host
|
||||
H.status_flags &= ~PASSEMOTES
|
||||
|
||||
host = null
|
||||
|
||||
for(var/atom/A in H.contents)
|
||||
if(istype(A,/mob/living/simple_animal/borer) || istype(A,/obj/item/weapon/holder))
|
||||
return
|
||||
H.status_flags &= ~PASSEMOTES
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/borer/verb/infest()
|
||||
set category = "Alien"
|
||||
@@ -408,8 +464,6 @@ mob/living/simple_animal/borer/proc/detatch()
|
||||
var/datum/organ/external/head = H.get_organ("head")
|
||||
head.implants += src
|
||||
|
||||
host_brain.name = M.name
|
||||
host_brain.real_name = M.real_name
|
||||
host.status_flags |= PASSEMOTES
|
||||
|
||||
return
|
||||
@@ -503,4 +557,4 @@ mob/living/simple_animal/borer/proc/transfer_personality(var/client/candidate)
|
||||
src.mind = candidate.mob.mind
|
||||
src.ckey = candidate.ckey
|
||||
if(src.mind)
|
||||
src.mind.assigned_role = "Cortical Borer"
|
||||
src.mind.assigned_role = "Cortical Borer"
|
||||
|
||||
@@ -318,7 +318,7 @@
|
||||
|
||||
var/list/items = list()
|
||||
for(var/obj/item/I in view(1,src))
|
||||
if(I.loc != src && I.w_class <= 2)
|
||||
if(I.loc != src && I.w_class <= 2 && I.Adjacent(src) )
|
||||
items.Add(I)
|
||||
|
||||
var/obj/selection = input("Select an item.", "Pickup") in items
|
||||
|
||||
@@ -141,48 +141,42 @@
|
||||
//Atmos
|
||||
var/atmos_suitable = 1
|
||||
|
||||
var/atom/A = src.loc
|
||||
if(isturf(A))
|
||||
var/turf/T = A
|
||||
var/areatemp = T.temperature
|
||||
if( abs(areatemp - bodytemperature) > 40 )
|
||||
var/diff = areatemp - bodytemperature
|
||||
diff = diff / 5
|
||||
//world << "changed from [bodytemperature] by [diff] to [bodytemperature + diff]"
|
||||
bodytemperature += diff
|
||||
var/atom/A = src.loc
|
||||
|
||||
if(istype(T,/turf/simulated))
|
||||
var/turf/simulated/ST = T
|
||||
if(ST.air)
|
||||
var/tox = ST.air.phoron
|
||||
var/oxy = ST.air.oxygen
|
||||
var/n2 = ST.air.nitrogen
|
||||
var/co2 = ST.air.carbon_dioxide
|
||||
|
||||
if(min_oxy)
|
||||
if(oxy < min_oxy)
|
||||
atmos_suitable = 0
|
||||
if(max_oxy)
|
||||
if(oxy > max_oxy)
|
||||
atmos_suitable = 0
|
||||
if(min_tox)
|
||||
if(tox < min_tox)
|
||||
atmos_suitable = 0
|
||||
if(max_tox)
|
||||
if(tox > max_tox)
|
||||
atmos_suitable = 0
|
||||
if(min_n2)
|
||||
if(n2 < min_n2)
|
||||
atmos_suitable = 0
|
||||
if(max_n2)
|
||||
if(n2 > max_n2)
|
||||
atmos_suitable = 0
|
||||
if(min_co2)
|
||||
if(co2 < min_co2)
|
||||
atmos_suitable = 0
|
||||
if(max_co2)
|
||||
if(co2 > max_co2)
|
||||
atmos_suitable = 0
|
||||
if(istype(A,/turf))
|
||||
var/turf/T = A
|
||||
|
||||
var/datum/gas_mixture/Environment = T.return_air()
|
||||
|
||||
if(Environment)
|
||||
|
||||
if( abs(Environment.temperature - bodytemperature) > 40 )
|
||||
bodytemperature += ((Environment.temperature - bodytemperature) / 5)
|
||||
|
||||
if(min_oxy)
|
||||
if(Environment.oxygen < min_oxy)
|
||||
atmos_suitable = 0
|
||||
if(max_oxy)
|
||||
if(Environment.oxygen > max_oxy)
|
||||
atmos_suitable = 0
|
||||
if(min_tox)
|
||||
if(Environment.phoron < min_tox)
|
||||
atmos_suitable = 0
|
||||
if(max_tox)
|
||||
if(Environment.phoron > max_tox)
|
||||
atmos_suitable = 0
|
||||
if(min_n2)
|
||||
if(Environment.nitrogen < min_n2)
|
||||
atmos_suitable = 0
|
||||
if(max_n2)
|
||||
if(Environment.nitrogen > max_n2)
|
||||
atmos_suitable = 0
|
||||
if(min_co2)
|
||||
if(Environment.carbon_dioxide < min_co2)
|
||||
atmos_suitable = 0
|
||||
if(max_co2)
|
||||
if(Environment.carbon_dioxide > max_co2)
|
||||
atmos_suitable = 0
|
||||
|
||||
//Atmos effect
|
||||
if(bodytemperature < minbodytemp)
|
||||
|
||||
@@ -329,17 +329,25 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
|
||||
|
||||
/proc/shake_camera(mob/M, duration, strength=1)
|
||||
if(!M || !M.client || M.shakecamera)
|
||||
if(!M || !M.client || M.shakecamera)
|
||||
return
|
||||
M.shakecamera = 1
|
||||
spawn(1)
|
||||
var/oldeye=M.client.eye
|
||||
|
||||
var/atom/oldeye=M.client.eye
|
||||
var/aiEyeFlag = 0
|
||||
if(istype(oldeye, /mob/aiEye))
|
||||
aiEyeFlag = 1
|
||||
|
||||
var/x
|
||||
M.shakecamera = 1
|
||||
for(x=0; x<duration, x++)
|
||||
M.client.eye = locate(dd_range(1,M.loc.x+rand(-strength,strength),world.maxx),dd_range(1,M.loc.y+rand(-strength,strength),world.maxy),M.loc.z)
|
||||
if(aiEyeFlag)
|
||||
M.client.eye = locate(dd_range(1,oldeye.loc.x+rand(-strength,strength),world.maxx),dd_range(1,oldeye.loc.y+rand(-strength,strength),world.maxy),oldeye.loc.z)
|
||||
else
|
||||
M.client.eye = locate(dd_range(1,M.loc.x+rand(-strength,strength),world.maxx),dd_range(1,M.loc.y+rand(-strength,strength),world.maxy),M.loc.z)
|
||||
sleep(1)
|
||||
M.shakecamera = 0
|
||||
M.client.eye=oldeye
|
||||
M.shakecamera = 0
|
||||
|
||||
|
||||
/proc/findname(msg)
|
||||
|
||||
@@ -62,7 +62,7 @@ datum/skill/management
|
||||
datum/skill/knowledge/law
|
||||
ID = "law"
|
||||
name = "NanoTrasen Law"
|
||||
desc = "Your knowledge of NanoTrasen law and procedures. This includes Space Law, as well as general station rulings and procedures. A low level in this skill is typical for security officers, a high level in this skill is typical for captains."
|
||||
desc = "Your knowledge of NanoTrasen law and procedures. This includes Corporate Regulations, as well as general station rulings and procedures. A low level in this skill is typical for security officers, a high level in this skill is typical for captains."
|
||||
field = "Security"
|
||||
secondary = 1
|
||||
|
||||
@@ -232,4 +232,4 @@ mob/living/carbon/human/verb/show_skills()
|
||||
set category = "IC"
|
||||
set name = "Show Own Skills"
|
||||
|
||||
show_skill_window(src, src)
|
||||
show_skill_window(src, src)
|
||||
|
||||
+22
-32
@@ -72,11 +72,11 @@
|
||||
|
||||
if (src.stat == 2) //Dead
|
||||
return 1
|
||||
|
||||
|
||||
//Universal speak makes everything understandable, for obvious reasons.
|
||||
else if(src.universal_speak || src.universal_understand)
|
||||
return 1
|
||||
|
||||
|
||||
//Languages are handled after.
|
||||
if (!speaking)
|
||||
if(!other)
|
||||
@@ -88,43 +88,33 @@
|
||||
if (istype(other, src.type) || istype(src, other.type))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
//Language check.
|
||||
for(var/datum/language/L in src.languages)
|
||||
if(speaking.name == L.name)
|
||||
return 1
|
||||
|
||||
|
||||
return 0
|
||||
|
||||
/mob/proc/say_quote(var/text,var/datum/language/speaking)
|
||||
/*
|
||||
***Deprecated***
|
||||
let this be handled at the hear_say or hear_radio proc
|
||||
This is left in for robot speaking when humans gain binary channel access until I get around to rewriting
|
||||
robot_talk() proc.
|
||||
There is no language handling build into it however there is at the /mob level so we accept the call
|
||||
for it but just ignore it.
|
||||
*/
|
||||
|
||||
if(!text)
|
||||
return "says, \"...\""; //not the best solution, but it will stop a large number of runtimes. The cause is somewhere in the Tcomms code
|
||||
//tcomms code is still runtiming somewhere here
|
||||
var/ending = copytext(text, length(text))
|
||||
/mob/proc/say_quote(var/message, var/datum/language/speaking = null)
|
||||
var/verb = "says"
|
||||
var/ending = copytext(message, length(message))
|
||||
if(ending=="!")
|
||||
verb=pick("exclaims","shouts","yells")
|
||||
else if(ending=="?")
|
||||
verb="asks"
|
||||
|
||||
var/speech_verb = "says"
|
||||
var/speech_style = "body"
|
||||
return verb
|
||||
|
||||
if (speaking)
|
||||
speech_verb = speaking.speech_verb
|
||||
speech_style = speaking.colour
|
||||
else if(speak_emote && speak_emote.len)
|
||||
speech_verb = pick(speak_emote)
|
||||
else if (src.stuttering)
|
||||
speech_verb = "stammers"
|
||||
else if (src.slurring)
|
||||
speech_verb = "slurrs"
|
||||
else if (ending == "?")
|
||||
speech_verb = "asks"
|
||||
else if (ending == "!")
|
||||
speech_verb = "exclaims"
|
||||
else if(isliving(src))
|
||||
var/mob/living/L = src
|
||||
if (L.getBrainLoss() >= 60)
|
||||
speech_verb = "gibbers"
|
||||
|
||||
return "<span class='say_quote'>[speech_verb],</span> \"<span class='[speech_style]'>[text]</span>\""
|
||||
|
||||
/mob/proc/emote(var/act, var/type, var/message)
|
||||
if(act == "me")
|
||||
@@ -156,7 +146,7 @@
|
||||
if(length(message) >= 2)
|
||||
var/channel_prefix = copytext(message, 1 ,3)
|
||||
return department_radio_keys[channel_prefix]
|
||||
|
||||
|
||||
return null
|
||||
|
||||
//parses the language code (e.g. :j) from text, such as that supplied to say.
|
||||
@@ -167,6 +157,6 @@
|
||||
var/datum/language/L = language_keys[language_prefix]
|
||||
if (can_speak(L))
|
||||
return L
|
||||
|
||||
|
||||
return null
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
|
||||
// Damaged heart virtually reduces the blood volume, as the blood isn't
|
||||
// being pumped properly anymore.
|
||||
var/datum/organ/internal/heart/heart = internal_organs["heart"]
|
||||
var/datum/organ/internal/heart/heart = internal_organs_by_name["heart"]
|
||||
|
||||
if(heart.damage > 1 && heart.damage < heart.min_bruised_damage)
|
||||
blood_volume *= 0.8
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/datum/organ/proc/handle_antibiotics()
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
|
||||
if (antibiotics < 5)
|
||||
if (!germ_level || antibiotics < 5)
|
||||
return
|
||||
|
||||
if (germ_level < INFECTION_LEVEL_ONE)
|
||||
|
||||
@@ -90,15 +90,8 @@
|
||||
brute *= brmod //~2/3 damage for ROBOLIMBS
|
||||
burn *= bumod //~2/3 damage for ROBOLIMBS
|
||||
|
||||
//If limb took enough damage, try to cut or tear it off
|
||||
if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you.
|
||||
if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier)
|
||||
if( (edge && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) )
|
||||
droplimb(1)
|
||||
return
|
||||
|
||||
// High brute damage or sharp objects may damage internal organs
|
||||
if(internal_organs != null) if( (sharp && brute >= 5) || brute >= 10) if(prob(5))
|
||||
if(internal_organs && ( (sharp && brute >= 5) || brute >= 10) && prob(5))
|
||||
// Damage an internal organ
|
||||
var/datum/organ/internal/I = pick(internal_organs)
|
||||
I.take_damage(brute / 2)
|
||||
@@ -161,6 +154,14 @@
|
||||
|
||||
// sync the organ's damage with its wounds
|
||||
src.update_damages()
|
||||
|
||||
//If limb took enough damage, try to cut or tear it off
|
||||
if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you.
|
||||
if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier)
|
||||
if( (edge && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) )
|
||||
droplimb(1)
|
||||
return
|
||||
|
||||
owner.updatehealth()
|
||||
|
||||
var/result = update_icon()
|
||||
@@ -363,7 +364,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
|
||||
//** Syncing germ levels with external wounds
|
||||
handle_germ_sync()
|
||||
|
||||
|
||||
//** Handle antibiotics and curing infections
|
||||
handle_antibiotics()
|
||||
|
||||
@@ -386,13 +387,13 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
/datum/organ/external/proc/handle_germ_effects()
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
|
||||
if (germ_level < INFECTION_LEVEL_ONE && prob(60)) //this could be an else clause, but it looks cleaner this way
|
||||
|
||||
if (germ_level > 0 && germ_level < INFECTION_LEVEL_ONE && prob(60)) //this could be an else clause, but it looks cleaner this way
|
||||
germ_level-- //since germ_level increases at a rate of 1 per second with dirty wounds, prob(60) should give us about 5 minutes before level one.
|
||||
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_ONE)
|
||||
//having an infection raises your body temperature
|
||||
var/fever_temperature = (owner.species.heat_level_1 - owner.species.body_temperature - 1)* min(germ_level/INFECTION_LEVEL_THREE, 1) + owner.species.body_temperature
|
||||
var/fever_temperature = (owner.species.heat_level_1 - owner.species.body_temperature - 1)* min(germ_level/(INFECTION_LEVEL_ONE+300), 1) + owner.species.body_temperature
|
||||
if (owner.bodytemperature < fever_temperature)
|
||||
//world << "fever: [owner.bodytemperature] < [fever_temperature], raising temperature."
|
||||
owner.bodytemperature++
|
||||
@@ -400,7 +401,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(prob(round(germ_level/10)))
|
||||
if (antibiotics < 5)
|
||||
germ_level++
|
||||
|
||||
|
||||
if (prob(5)) //adjust this to tweak how fast people take toxin damage from infections
|
||||
owner.adjustToxLoss(1)
|
||||
|
||||
@@ -411,7 +412,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if (I.germ_level > 0 && I.germ_level < min(germ_level, INFECTION_LEVEL_TWO)) //once the organ reaches whatever we can give it, or level two, switch to a different one
|
||||
if (!target_organ || I.germ_level > target_organ.germ_level) //choose the organ with the highest germ_level
|
||||
target_organ = I
|
||||
|
||||
|
||||
if (!target_organ)
|
||||
//figure out which organs we can spread germs to and pick one at random
|
||||
var/list/candidate_organs = list()
|
||||
@@ -420,7 +421,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
candidate_organs += I
|
||||
if (candidate_organs.len)
|
||||
target_organ = pick(candidate_organs)
|
||||
|
||||
|
||||
if (target_organ)
|
||||
target_organ.germ_level++
|
||||
|
||||
@@ -800,8 +801,8 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
owner.u_equip(c_hand)
|
||||
owner.emote("me", 1, "drops what they were holding, their [hand_name] malfunctioning!")
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
spark_system.set_up(5, 0, owner)
|
||||
spark_system.attach(owner)
|
||||
spark_system.start()
|
||||
spawn(10)
|
||||
del(spark_system)
|
||||
|
||||
@@ -27,14 +27,12 @@
|
||||
var/datum/organ/external/E = H.organs_by_name[src.parent_organ]
|
||||
if(E.internal_organs == null)
|
||||
E.internal_organs = list()
|
||||
E.internal_organs += src
|
||||
H.internal_organs[src.name] = src
|
||||
E.internal_organs |= src
|
||||
H.internal_organs |= src
|
||||
src.owner = H
|
||||
|
||||
/datum/organ/internal/process()
|
||||
//Process infections
|
||||
if (!germ_level)
|
||||
return
|
||||
|
||||
if (robotic >= 2 || (owner.species && owner.species.flags & IS_PLANT)) //TODO make robotic internal and external organs separate types of organ instead of a flag
|
||||
germ_level = 0
|
||||
@@ -47,7 +45,7 @@
|
||||
//** Handle the effects of infections
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
|
||||
if (germ_level < INFECTION_LEVEL_ONE/2 && prob(30))
|
||||
if (germ_level > 0 && germ_level < INFECTION_LEVEL_ONE/2 && prob(30))
|
||||
germ_level--
|
||||
|
||||
if (germ_level >= INFECTION_LEVEL_ONE/2)
|
||||
|
||||
@@ -102,8 +102,7 @@ mob/living/carbon/human/proc/handle_pain()
|
||||
pain(damaged_organ.display_name, maxdam, 0)
|
||||
|
||||
// Damage to internal organs hurts a lot.
|
||||
for(var/organ_name in internal_organs)
|
||||
var/datum/organ/internal/I = internal_organs[organ_name]
|
||||
for(var/datum/organ/internal/I in internal_organs)
|
||||
if(I.damage > 2) if(prob(2))
|
||||
var/datum/organ/external/parent = get_organ(I.parent_organ)
|
||||
src.custom_pain("You feel a sharp pain in your [parent.display_name]", 1)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
pressure_resistance = 10
|
||||
layer = OBJ_LAYER - 0.1
|
||||
var/amount = 30 //How much paper is in the bin.
|
||||
var/list/papers = new/list() //List of papers put in the bin for reference.
|
||||
|
||||
|
||||
@@ -308,7 +308,7 @@
|
||||
return
|
||||
|
||||
else
|
||||
user << "<span class='notice'>You transfer [MAXCOIL - src.amount ] length\s of cable from one coil to the other.</span>"
|
||||
user << "<span class='notice'>You transfer [MAXCOIL - C.amount ] length\s of cable from one coil to the other.</span>"
|
||||
src.amount -= (MAXCOIL-C.amount)
|
||||
src.updateicon()
|
||||
src.update_wclass()
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
//Point blank shooting if on harm intent or target we were targeting.
|
||||
if(user.a_intent == "hurt")
|
||||
user.visible_message("\red <b> \The [user] fires \the [src] point blank at [M]!</b>")
|
||||
in_chamber.damage *= 1.3
|
||||
if(istype(in_chamber)) in_chamber.damage *= 1.3
|
||||
Fire(M,user)
|
||||
return
|
||||
else if(target && M in target)
|
||||
|
||||
@@ -1,19 +1,5 @@
|
||||
//Vox pinning weapon.
|
||||
|
||||
//Ammo.
|
||||
/obj/item/weapon/spike
|
||||
name = "alloy spike"
|
||||
desc = "It's about a foot of weird silver metal with a wicked point."
|
||||
sharp = 1
|
||||
edge = 0
|
||||
throwforce = 5
|
||||
w_class = 2
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "metal-rod"
|
||||
item_state = "bolt"
|
||||
|
||||
//Launcher.
|
||||
/obj/item/weapon/spikethrower
|
||||
/obj/item/weapon/gun/launcher/spikethrower
|
||||
|
||||
name = "Vox spike thrower"
|
||||
desc = "A vicious alien projectile weapon. Parts of it quiver gelatinously, as though the thing is insectile and alive."
|
||||
@@ -22,97 +8,60 @@
|
||||
var/spike_gen_time = 100
|
||||
var/max_spikes = 3
|
||||
var/spikes = 3
|
||||
var/obj/item/weapon/spike/spike
|
||||
var/fire_force = 30
|
||||
|
||||
//Going to make an effort to get this compatible with the threat targetting system.
|
||||
var/tmp/list/mob/living/target
|
||||
var/tmp/mob/living/last_moved_mob
|
||||
|
||||
release_force = 30
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "spikethrower3"
|
||||
item_state = "spikethrower"
|
||||
fire_sound_text = "a strange noise"
|
||||
fire_sound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
/obj/item/weapon/spikethrower/New()
|
||||
/obj/item/weapon/gun/launcher/spikethrower/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
last_regen = world.time
|
||||
|
||||
/obj/item/weapon/spikethrower/Del()
|
||||
/obj/item/weapon/gun/launcher/spikethrower/Del()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/spikethrower/process()
|
||||
/obj/item/weapon/gun/launcher/spikethrower/process()
|
||||
|
||||
if(spikes < max_spikes && world.time > last_regen + spike_gen_time)
|
||||
spikes++
|
||||
last_regen = world.time
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/spikethrower/examine()
|
||||
/obj/item/weapon/gun/launcher/spikethrower/examine()
|
||||
..()
|
||||
usr << "It has [spikes] [spikes == 1 ? "spike" : "spikes"] remaining."
|
||||
|
||||
/obj/item/weapon/spikethrower/update_icon()
|
||||
/obj/item/weapon/gun/launcher/spikethrower/update_icon()
|
||||
icon_state = "spikethrower[spikes]"
|
||||
|
||||
/obj/item/weapon/spikethrower/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
|
||||
if(flag) return
|
||||
if(user && user.client && user.client.gun_mode && !(A in target))
|
||||
//TODO: Make this compatible with targetting (prolly have to actually make it a gun subtype, ugh.)
|
||||
//PreFire(A,user,params)
|
||||
else
|
||||
Fire(A,user,params)
|
||||
|
||||
/obj/item/weapon/spikethrower/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
|
||||
if (M == user && user.zone_sel.selecting == "mouth")
|
||||
M.visible_message("\red [user] attempts without success to fit [src] into their mouth.")
|
||||
return
|
||||
|
||||
if (spikes > 0)
|
||||
if(user.a_intent == "hurt")
|
||||
user.visible_message("\red <b> \The [user] fires \the [src] point blank at [M]!</b>")
|
||||
Fire(M,user)
|
||||
return
|
||||
else if(target && M in target)
|
||||
Fire(M,user)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/spikethrower/proc/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
var/turf/curloc = get_turf(user)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if (!istype(targloc) || !istype(curloc))
|
||||
return
|
||||
/obj/item/weapon/gun/launcher/spikethrower/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/launcher/spikethrower/special_check(user)
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species && H.species.name != "Vox")
|
||||
user << "\red The weapon does not respond to you!"
|
||||
return
|
||||
else
|
||||
user << "\red The weapon does not respond to you!"
|
||||
return
|
||||
if(H.species && H.species.name != "Vox" && H.species.name != "Vox Armalis")
|
||||
user << "\red \The [src] does not respond to you!"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
if(spikes <= 0)
|
||||
user << "\red The weapon has nothing to fire!"
|
||||
return
|
||||
/obj/item/weapon/gun/launcher/spikethrower/update_release_force()
|
||||
return
|
||||
|
||||
if(!spike)
|
||||
spike = new(src) //Create a spike.
|
||||
spike.add_fingerprint(user)
|
||||
spikes--
|
||||
/obj/item/weapon/gun/launcher/spikethrower/load_into_chamber()
|
||||
if(in_chamber) return 1
|
||||
if(spikes < 1) return 0
|
||||
|
||||
user.visible_message("\red [user] fires [src]!", "\red You fire [src]!")
|
||||
spike.loc = get_turf(src)
|
||||
spike.throw_at(target,10,fire_force)
|
||||
spike = null
|
||||
update_icon()
|
||||
spikes--
|
||||
in_chamber = new /obj/item/weapon/spike(src)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/launcher/spikethrower/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
if(..()) update_icon()
|
||||
|
||||
//This gun only functions for armalis. The on-sprite is too huge to render properly on other sprites.
|
||||
/obj/item/weapon/gun/energy/noisecannon
|
||||
|
||||
+95
-117
@@ -1,3 +1,5 @@
|
||||
//AMMUNITION
|
||||
|
||||
/obj/item/weapon/arrow
|
||||
|
||||
name = "bolt"
|
||||
@@ -14,6 +16,17 @@
|
||||
/obj/item/weapon/arrow/proc/removed() //Helper for metal rods falling apart.
|
||||
return
|
||||
|
||||
/obj/item/weapon/spike
|
||||
name = "alloy spike"
|
||||
desc = "It's about a foot of weird silver metal with a wicked point."
|
||||
sharp = 1
|
||||
edge = 0
|
||||
throwforce = 5
|
||||
w_class = 2
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "metal-rod"
|
||||
item_state = "bolt"
|
||||
|
||||
/obj/item/weapon/arrow/quill
|
||||
|
||||
name = "vox quill"
|
||||
@@ -36,86 +49,50 @@
|
||||
S.loc = get_turf(src)
|
||||
src.Del()
|
||||
|
||||
/obj/item/weapon/crossbow
|
||||
/obj/item/weapon/gun/launcher/crossbow
|
||||
|
||||
name = "powered crossbow"
|
||||
desc = "A 2557AD twist on an old classic. Pick up that can."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "crossbow"
|
||||
item_state = "crossbow-solid"
|
||||
w_class = 5.0
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT | SLOT_BACK
|
||||
fire_sound = 'sound/weapons/punchmiss.ogg' // TODO: Decent THWOK noise.
|
||||
ejectshell = 0 // No spent shells.
|
||||
mouthshoot = 1 // No suiciding with this weapon, causes runtimes.
|
||||
fire_sound_text = "a solid thunk"
|
||||
fire_delay = 25
|
||||
|
||||
w_class = 3.0
|
||||
var/tension = 0 // Current draw on the bow.
|
||||
var/max_tension = 5 // Highest possible tension.
|
||||
var/release_speed = 5 // Speed per unit of tension.
|
||||
var/obj/item/weapon/cell/cell = null // Used for firing superheated rods.
|
||||
var/current_user // Used to check if the crossbow has changed hands since being drawn.
|
||||
|
||||
var/tension = 0 // Current draw on the bow.
|
||||
var/max_tension = 5 // Highest possible tension.
|
||||
var/release_speed = 5 // Speed per unit of tension.
|
||||
var/mob/living/current_user = null // Used to see if the person drawing the bow started drawing it.
|
||||
var/obj/item/weapon/arrow = null // Nocked arrow.
|
||||
var/obj/item/weapon/cell/cell = null // Used for firing special projectiles like rods.
|
||||
/obj/item/weapon/gun/launcher/crossbow/emp_act(severity)
|
||||
if(cell && severity)
|
||||
cell.use(100*severity)
|
||||
|
||||
/obj/item/weapon/crossbow/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(!arrow)
|
||||
if (istype(W,/obj/item/weapon/arrow))
|
||||
user.drop_item()
|
||||
arrow = W
|
||||
arrow.loc = src
|
||||
user.visible_message("[user] slides [arrow] into [src].","You slide [arrow] into [src].")
|
||||
icon_state = "crossbow-nocked"
|
||||
return
|
||||
else if(istype(W,/obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = W
|
||||
R.use(1)
|
||||
arrow = new /obj/item/weapon/arrow/rod(src)
|
||||
arrow.fingerprintslast = src.fingerprintslast
|
||||
arrow.loc = src
|
||||
icon_state = "crossbow-nocked"
|
||||
user.visible_message("[user] haphazardly jams [arrow] into [src].","You jam [arrow] into [src].")
|
||||
if(cell)
|
||||
if(cell.charge >= 500)
|
||||
user << "<span class='notice'>[arrow] plinks and crackles as it begins to glow red-hot.</span>"
|
||||
arrow.throwforce = 15
|
||||
arrow.icon_state = "metal-rod-superheated"
|
||||
cell.use(500)
|
||||
return
|
||||
/obj/item/weapon/gun/launcher/crossbow/special_check(user)
|
||||
if(tension <= 0)
|
||||
user << "\red \The [src] is not drawn back!"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
if(!cell)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
cell = W
|
||||
user << "<span class='notice'>You jam [cell] into [src] and wire it to the firing coil.</span>"
|
||||
if(arrow)
|
||||
if(istype(arrow,/obj/item/weapon/arrow/rod) && arrow.throwforce < 15 && cell.charge >= 500)
|
||||
user << "<span class='notice'>[arrow] plinks and crackles as it begins to glow red-hot.</span>"
|
||||
arrow.throwforce = 15
|
||||
arrow.icon_state = "metal-rod-superheated"
|
||||
cell.use(500)
|
||||
else
|
||||
user << "<span class='notice'>[src] already has a cell installed.</span>"
|
||||
/obj/item/weapon/gun/launcher/crossbow/update_release_force()
|
||||
release_force = tension*release_speed
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(cell)
|
||||
var/obj/item/C = cell
|
||||
C.loc = get_turf(user)
|
||||
cell = null
|
||||
user << "<span class='notice'>You jimmy [cell] out of [src] with [W].</span>"
|
||||
else
|
||||
user << "<span class='notice'>[src] doesn't have a cell installed.</span>"
|
||||
/obj/item/weapon/gun/launcher/crossbow/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
|
||||
else
|
||||
..()
|
||||
if(!..()) return //Only do this on a successful shot.
|
||||
icon_state = "crossbow"
|
||||
|
||||
/obj/item/weapon/crossbow/attack_self(mob/living/user as mob)
|
||||
/obj/item/weapon/gun/launcher/crossbow/attack_self(mob/living/user as mob)
|
||||
if(tension)
|
||||
if(arrow)
|
||||
user.visible_message("[user] relaxes the tension on [src]'s string and removes [arrow].","You relax the tension on [src]'s string and remove [arrow].")
|
||||
var/obj/item/weapon/arrow/A = arrow
|
||||
A.loc = get_turf(src)
|
||||
if(in_chamber && in_chamber.loc == src) //Just in case they click it the tick after firing.
|
||||
user.visible_message("[user] relaxes the tension on [src]'s string and removes [in_chamber].","You relax the tension on [src]'s string and remove [in_chamber].")
|
||||
in_chamber.loc = get_turf(src)
|
||||
var/obj/item/weapon/arrow/A = in_chamber
|
||||
in_chamber = null
|
||||
A.removed(user)
|
||||
arrow = null
|
||||
else
|
||||
user.visible_message("[user] relaxes the tension on [src]'s string.","You relax the tension on [src]'s string.")
|
||||
tension = 0
|
||||
@@ -123,9 +100,9 @@
|
||||
else
|
||||
draw(user)
|
||||
|
||||
/obj/item/weapon/crossbow/proc/draw(var/mob/user as mob)
|
||||
/obj/item/weapon/gun/launcher/crossbow/proc/draw(var/mob/user as mob)
|
||||
|
||||
if(!arrow)
|
||||
if(!in_chamber)
|
||||
user << "You don't have anything nocked to [src]."
|
||||
return
|
||||
|
||||
@@ -133,14 +110,13 @@
|
||||
return
|
||||
|
||||
current_user = user
|
||||
|
||||
user.visible_message("[user] begins to draw back the string of [src].","You begin to draw back the string of [src].")
|
||||
tension = 1
|
||||
spawn(25) increase_tension(user)
|
||||
spawn(25) increase_tension(user) //TODO: This needs to be changed to something less shit.
|
||||
|
||||
/obj/item/weapon/crossbow/proc/increase_tension(var/mob/user as mob)
|
||||
/obj/item/weapon/gun/launcher/crossbow/proc/increase_tension(var/mob/user as mob)
|
||||
|
||||
if(!arrow || !tension || current_user != user) //Arrow has been fired, bow has been relaxed or user has changed.
|
||||
if(!in_chamber || !tension || current_user != user) //Arrow has been fired, bow has been relaxed or user has changed.
|
||||
return
|
||||
|
||||
tension++
|
||||
@@ -153,60 +129,62 @@
|
||||
user.visible_message("[usr] draws back the string of [src]!","You continue drawing back the string of [src]!")
|
||||
spawn(25) increase_tension(user)
|
||||
|
||||
/obj/item/weapon/crossbow/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
|
||||
/obj/item/weapon/gun/launcher/crossbow/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(!in_chamber)
|
||||
if (istype(W,/obj/item/weapon/arrow))
|
||||
user.drop_item()
|
||||
in_chamber = W
|
||||
in_chamber.loc = src
|
||||
user.visible_message("[user] slides [in_chamber] into [src].","You slide [in_chamber] into [src].")
|
||||
icon_state = "crossbow-nocked"
|
||||
return
|
||||
else if(istype(W,/obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = W
|
||||
R.use(1)
|
||||
in_chamber = new /obj/item/weapon/arrow/rod(src)
|
||||
in_chamber.fingerprintslast = src.fingerprintslast
|
||||
in_chamber.loc = src
|
||||
icon_state = "crossbow-nocked"
|
||||
user.visible_message("[user] jams [in_chamber] into [src].","You jam [in_chamber] into [src].")
|
||||
superheat_rod(user)
|
||||
return
|
||||
|
||||
if (istype(target, /obj/item/weapon/storage/backpack ))
|
||||
src.dropped()
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
if(!cell)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
cell = W
|
||||
user << "<span class='notice'>You jam [cell] into [src] and wire it to the firing coil.</span>"
|
||||
superheat_rod(user)
|
||||
else
|
||||
user << "<span class='notice'>[src] already has a cell installed.</span>"
|
||||
|
||||
else if (target.loc == user.loc)
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(cell)
|
||||
var/obj/item/C = cell
|
||||
C.loc = get_turf(user)
|
||||
user << "<span class='notice'>You jimmy [cell] out of [src] with [W].</span>"
|
||||
cell = null
|
||||
else
|
||||
user << "<span class='notice'>[src] doesn't have a cell installed.</span>"
|
||||
|
||||
else if (locate (/obj/structure/table, src.loc))
|
||||
return
|
||||
|
||||
else if(target == user)
|
||||
return
|
||||
|
||||
if(!tension)
|
||||
user << "You haven't drawn back the bolt!"
|
||||
return 0
|
||||
|
||||
if (!arrow)
|
||||
user << "You have no arrow nocked to [src]!"
|
||||
return 0
|
||||
else
|
||||
spawn(0) Fire(target,user,params)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/crossbow/proc/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
/obj/item/weapon/gun/launcher/crossbow/proc/superheat_rod(var/mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
if(!user || !cell || !in_chamber) return
|
||||
if(cell.charge < 500) return
|
||||
if(in_chamber.throwforce >= 15) return
|
||||
if(!istype(in_chamber,/obj/item/weapon/arrow/rod)) return
|
||||
|
||||
var/turf/curloc = get_turf(user)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if (!istype(targloc) || !istype(curloc))
|
||||
return
|
||||
user << "<span class='notice'>[in_chamber] plinks and crackles as it begins to glow red-hot.</span>"
|
||||
in_chamber.throwforce = 15
|
||||
in_chamber.icon_state = "metal-rod-superheated"
|
||||
cell.use(500)
|
||||
|
||||
user.visible_message("<span class='danger'>[user] releases [src] and sends [arrow] streaking toward [target]!</span>","<span class='danger'>You release [src] and send [arrow] streaking toward [target]!</span>")
|
||||
|
||||
var/obj/item/weapon/arrow/A = arrow
|
||||
A.loc = get_turf(user)
|
||||
A.throw_at(target,10,tension*release_speed)
|
||||
arrow = null
|
||||
tension = 0
|
||||
icon_state = "crossbow"
|
||||
|
||||
/obj/item/weapon/crossbow/dropped(mob/user)
|
||||
if(arrow)
|
||||
var/obj/item/weapon/arrow/A = arrow
|
||||
A.loc = get_turf(src)
|
||||
A.removed(user)
|
||||
arrow = null
|
||||
tension = 0
|
||||
icon_state = "crossbow"
|
||||
|
||||
// Crossbow construction.
|
||||
|
||||
/obj/item/weapon/crossbowframe
|
||||
name = "crossbow frame"
|
||||
desc = "A half-finished crossbow."
|
||||
@@ -283,7 +261,7 @@
|
||||
else if(istype(W,/obj/item/weapon/screwdriver))
|
||||
if(buildstate == 5)
|
||||
user << "\blue You secure the crossbow's various parts."
|
||||
new /obj/item/weapon/crossbow(get_turf(src))
|
||||
new /obj/item/weapon/gun/launcher/crossbow(get_turf(src))
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
@@ -0,0 +1,91 @@
|
||||
/obj/item/weapon/gun/launcher
|
||||
|
||||
name = "launcher"
|
||||
desc = "A device that launches things."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
w_class = 5.0
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
|
||||
var/release_force = 0
|
||||
var/fire_sound_text = "a launcher firing"
|
||||
|
||||
//Check if we're drawing and if the bow is loaded.
|
||||
/obj/item/weapon/gun/launcher/load_into_chamber()
|
||||
return (!isnull(in_chamber))
|
||||
|
||||
//This should not fit in a combat belt or holster.
|
||||
/obj/item/weapon/gun/launcher/isHandgun()
|
||||
return 0
|
||||
|
||||
//Launchers are mechanical, no other impact.
|
||||
/obj/item/weapon/gun/launcher/emp_act(severity)
|
||||
return
|
||||
|
||||
//This normally uses a proc on projectiles and our ammo is not strictly speaking a projectile.
|
||||
/obj/item/weapon/gun/launcher/can_hit(var/mob/living/target as mob, var/mob/living/user as mob)
|
||||
return
|
||||
|
||||
//Override this to avoid a runtime with suicide handling.
|
||||
/obj/item/weapon/gun/launcher/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
if (M == user && user.zone_sel.selecting == "mouth")
|
||||
user << "\red Shooting yourself with \a [src] is pretty tricky. You can't seem to manage it."
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/launcher/proc/update_release_force()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/launcher/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
|
||||
if (!user.IsAdvancedToolUser())
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 0
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
//Make sure target turfs both exist.
|
||||
var/turf/curloc = get_turf(user)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if (!istype(targloc) || !istype(curloc))
|
||||
return 0
|
||||
|
||||
if(!special_check(user))
|
||||
return 0
|
||||
|
||||
if (!ready_to_fire())
|
||||
if (world.time % 3) //to prevent spam
|
||||
user << "<span class='warning'>[src] is not ready to fire again!"
|
||||
return 0
|
||||
|
||||
if(!load_into_chamber()) //CHECK
|
||||
return click_empty(user)
|
||||
|
||||
if(!in_chamber)
|
||||
return 0
|
||||
|
||||
update_release_force()
|
||||
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] fires [src][reflex ? " by reflex":""]!</span>", \
|
||||
"<span class='warning'>You fire [src][reflex ? "by reflex":""]!</span>", \
|
||||
"You hear [fire_sound_text]!")
|
||||
|
||||
in_chamber.loc = get_turf(user)
|
||||
in_chamber.throw_at(target,10,release_force)
|
||||
|
||||
sleep(1)
|
||||
|
||||
in_chamber = null
|
||||
|
||||
update_icon()
|
||||
|
||||
if(user.hand)
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.update_inv_r_hand()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/launcher/attack_self(mob/living/user as mob)
|
||||
return
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/storage/pneumatic
|
||||
/obj/item/weapon/gun/launcher/pneumatic
|
||||
name = "pneumatic cannon"
|
||||
desc = "A large gas-powered cannon."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
@@ -6,27 +6,28 @@
|
||||
item_state = "pneumatic"
|
||||
w_class = 5.0
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
max_w_class = 3
|
||||
max_combined_w_class = 20
|
||||
fire_sound_text = "a loud whoosh of moving air"
|
||||
fire_delay = 50
|
||||
fire_sound = 'sound/weapons/tablehit1.ogg'
|
||||
|
||||
var/fire_pressure // Used in fire checks/pressure checks.
|
||||
var/max_w_class = 3 // Hopper intake size.
|
||||
var/max_combined_w_class = 20 // Total internal storage size.
|
||||
var/obj/item/weapon/tank/tank = null // Tank of gas for use in firing the cannon.
|
||||
var/obj/item/weapon/storage/tank_container = new() // Something to hold the tank item so we don't accidentally fire it.
|
||||
var/pressure_setting = 10 // Percentage of the gas in the tank used to fire the projectile.
|
||||
var/possible_pressure_amounts = list(5,10,20,25,50) // Possible pressure settings.
|
||||
var/minimum_tank_pressure = 10 // Minimum pressure to fire the gun.
|
||||
var/cooldown = 0 // Whether or not we're cooling down.
|
||||
var/cooldown_time = 50 // Time between shots.
|
||||
var/force_divisor = 400 // Force equates to speed. Speed/5 equates to a damage multiplier for whoever you hit.
|
||||
// For reference, a fully pressurized oxy tank at 50% gas release firing a health
|
||||
// analyzer with a force_divisor of 10 hit with a damage multiplier of 3000+.
|
||||
/obj/item/weapon/storage/pneumatic/New()
|
||||
/obj/item/weapon/gun/launcher/pneumatic/New()
|
||||
..()
|
||||
tank_container.tag = "gas_tank_holder"
|
||||
|
||||
/obj/item/weapon/storage/pneumatic/verb/set_pressure() //set amount of tank pressure.
|
||||
/obj/item/weapon/gun/launcher/pneumatic/verb/set_pressure() //set amount of tank pressure.
|
||||
|
||||
set name = "Set valve pressure"
|
||||
set name = "Set Valve Pressure"
|
||||
set category = "Object"
|
||||
set src in range(0)
|
||||
var/N = input("Percentage of tank used per shot:","[src]") as null|anything in possible_pressure_amounts
|
||||
@@ -34,9 +35,9 @@
|
||||
pressure_setting = N
|
||||
usr << "You dial the pressure valve to [pressure_setting]%."
|
||||
|
||||
/obj/item/weapon/storage/pneumatic/verb/eject_tank() //Remove the tank.
|
||||
/obj/item/weapon/gun/launcher/pneumatic/verb/eject_tank() //Remove the tank.
|
||||
|
||||
set name = "Eject tank"
|
||||
set name = "Eject Tank"
|
||||
set category = "Object"
|
||||
set src in range(0)
|
||||
|
||||
@@ -50,7 +51,7 @@
|
||||
else
|
||||
usr << "There's no tank in [src]."
|
||||
|
||||
/obj/item/weapon/storage/pneumatic/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/launcher/pneumatic/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(!tank && istype(W,/obj/item/weapon/tank))
|
||||
user.drop_item()
|
||||
tank = W
|
||||
@@ -59,10 +60,43 @@
|
||||
icon_state = "pneumatic-tank"
|
||||
item_state = "pneumatic-tank"
|
||||
user.update_icons()
|
||||
else
|
||||
..()
|
||||
else if(W.w_class <= max_w_class)
|
||||
|
||||
/obj/item/weapon/storage/pneumatic/examine()
|
||||
var/total_stored = 0
|
||||
for(var/obj/item/O in src.contents)
|
||||
total_stored += O.w_class
|
||||
if(total_stored + W.w_class <= max_combined_w_class)
|
||||
user.drop_item(W)
|
||||
W.loc = src
|
||||
user << "You shove [W] into the hopper."
|
||||
else
|
||||
user << "That won't fit into the hopper - it's full."
|
||||
return
|
||||
else
|
||||
user << "That won't fit into the hopper."
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/attack_self(mob/user as mob)
|
||||
|
||||
if(contents.len > 0)
|
||||
var/obj/item/removing = contents[contents.len]
|
||||
if(removing == in_chamber)
|
||||
in_chamber = null
|
||||
|
||||
removing.loc = get_turf(src)
|
||||
user.put_in_hands(removing)
|
||||
user << "You remove [removing] from the hopper."
|
||||
else
|
||||
user << "There is nothing to remove in \the [src]."
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/load_into_chamber()
|
||||
if(!contents.len)
|
||||
return 0
|
||||
|
||||
in_chamber = contents[1]
|
||||
return !isnull(in_chamber)
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/examine()
|
||||
set src in view()
|
||||
..()
|
||||
if (!(usr in view(2)) && usr!=src.loc) return
|
||||
@@ -72,76 +106,32 @@
|
||||
else
|
||||
usr << "Nothing is attached to the tank valve!"
|
||||
|
||||
/obj/item/weapon/storage/pneumatic/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
|
||||
if (istype(target, /obj/item/weapon/storage/backpack ))
|
||||
return
|
||||
|
||||
else if (target.loc == user.loc)
|
||||
return
|
||||
|
||||
else if (locate (/obj/structure/table, src.loc))
|
||||
return
|
||||
|
||||
else if(target == user)
|
||||
return
|
||||
|
||||
if (length(contents) == 0)
|
||||
user << "There's nothing in [src] to fire!"
|
||||
return 0
|
||||
else
|
||||
spawn(0) Fire(target,user,params)
|
||||
|
||||
/obj/item/weapon/storage/pneumatic/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
if (length(contents) > 0)
|
||||
if(user.a_intent == "hurt")
|
||||
user.visible_message("\red <b> \The [user] fires \the [src] point blank at [M]!</b>")
|
||||
Fire(M,user)
|
||||
return
|
||||
else
|
||||
Fire(M,user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/pneumatic/proc/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
/obj/item/weapon/gun/launcher/pneumatic/special_check(user)
|
||||
|
||||
if (!tank)
|
||||
user << "There is no gas tank in [src]!"
|
||||
return 0
|
||||
|
||||
if (cooldown)
|
||||
user << "The chamber hasn't built up enough pressure yet!"
|
||||
return 0
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
var/turf/curloc = get_turf(user)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if (!istype(targloc) || !istype(curloc))
|
||||
return
|
||||
|
||||
var/fire_pressure = (tank.air_contents.return_pressure()/100)*pressure_setting
|
||||
|
||||
fire_pressure = (tank.air_contents.return_pressure()/100)*pressure_setting
|
||||
if (fire_pressure < minimum_tank_pressure)
|
||||
user << "There isn't enough gas in the tank to fire [src]."
|
||||
return 0
|
||||
|
||||
var/obj/item/object = contents[1]
|
||||
var/speed = ((fire_pressure*tank.volume)/object.w_class)/force_divisor //projectile speed.
|
||||
if(speed>80) speed = 80 //damage cap.
|
||||
return 1
|
||||
|
||||
user.visible_message("<span class='danger'>[user] fires [src] and launches [object] at [target]!</span>","<span class='danger'>You fire [src] and launch [object] at [target]!</span>")
|
||||
/obj/item/weapon/gun/launcher/pneumatic/update_release_force()
|
||||
if(!in_chamber) return
|
||||
release_force = ((fire_pressure*tank.volume)/in_chamber.w_class)/force_divisor //projectile speed.
|
||||
if(release_force >80) release_force = 80 //damage cap.
|
||||
|
||||
src.remove_from_storage(object,user.loc)
|
||||
object.throw_at(target,10,speed)
|
||||
/obj/item/weapon/gun/launcher/pneumatic/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
|
||||
if(!tank || !..()) return //Only do this on a successful shot.
|
||||
|
||||
var/lost_gas_amount = tank.air_contents.total_moles*(pressure_setting/100)
|
||||
var/datum/gas_mixture/removed = tank.air_contents.remove(lost_gas_amount)
|
||||
user.loc.assume_air(removed)
|
||||
|
||||
cooldown = 1
|
||||
spawn(cooldown_time)
|
||||
cooldown = 0
|
||||
user << "[src]'s gauge informs you it's ready to be fired again."
|
||||
|
||||
//Constructable pneumatic cannon.
|
||||
|
||||
/obj/item/weapon/cannonframe
|
||||
@@ -215,7 +205,7 @@
|
||||
if(!src || !T.isOn()) return
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
|
||||
user << "\blue You weld the valve into place."
|
||||
new /obj/item/weapon/storage/pneumatic(get_turf(src))
|
||||
new /obj/item/weapon/gun/launcher/pneumatic(get_turf(src))
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet // "rubber" bullets
|
||||
damage = 10
|
||||
stun = 5
|
||||
weaken = 5
|
||||
agony = 40
|
||||
embed = 0
|
||||
sharp = 0
|
||||
|
||||
@@ -28,8 +27,6 @@
|
||||
|
||||
/obj/item/projectile/bullet/midbullet
|
||||
damage = 20
|
||||
stun = 5
|
||||
weaken = 5
|
||||
|
||||
/obj/item/projectile/bullet/midbullet2
|
||||
damage = 25
|
||||
@@ -56,8 +53,7 @@
|
||||
/obj/item/projectile/bullet/stunshot
|
||||
name = "stunshot"
|
||||
damage = 5
|
||||
stun = 10
|
||||
weaken = 10
|
||||
agony = 80
|
||||
stutter = 10
|
||||
embed = 0
|
||||
sharp = 0
|
||||
@@ -67,4 +63,4 @@
|
||||
|
||||
/obj/item/projectile/bullet/chameleon
|
||||
damage = 1 // stop trying to murderbone with a fake gun dumbass!!!
|
||||
embed = 0 // nope
|
||||
embed = 0 // nope
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 380, 650)
|
||||
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 390, 655)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
|
||||
@@ -1312,7 +1312,7 @@ datum
|
||||
M.eye_blind = max(M.eye_blind-5 , 0)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/internal/eyes/E = H.internal_organs["eyes"]
|
||||
var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"]
|
||||
if(istype(E))
|
||||
if(E.damage > 0)
|
||||
E.damage -= 1
|
||||
@@ -1332,8 +1332,9 @@ datum
|
||||
if(!M) M = holder.my_atom
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/external/chest/C = H.get_organ("chest")
|
||||
for(var/datum/organ/internal/I in C.internal_organs)
|
||||
|
||||
//Peridaxon is hard enough to get, it's probably fair to make this all internal organs
|
||||
for(var/datum/organ/internal/I in H.internal_organs)
|
||||
if(I.damage > 0)
|
||||
I.damage -= 0.20
|
||||
..()
|
||||
@@ -3036,7 +3037,7 @@ datum
|
||||
M:drowsyness = max(M:drowsyness, 30)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/internal/liver/L = H.internal_organs["liver"]
|
||||
var/datum/organ/internal/liver/L = H.internal_organs_by_name["liver"]
|
||||
if (istype(L))
|
||||
L.take_damage(0.1, 1)
|
||||
H.adjustToxLoss(0.1)
|
||||
@@ -3273,13 +3274,13 @@ datum
|
||||
if(prob(30)) M.adjustToxLoss(2)
|
||||
if(prob(5)) if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/internal/heart/L = H.internal_organs["heart"]
|
||||
var/datum/organ/internal/heart/L = H.internal_organs_by_name["heart"]
|
||||
if (istype(L))
|
||||
L.take_damage(5, 0)
|
||||
if (300 to INFINITY)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/internal/heart/L = H.internal_organs["heart"]
|
||||
var/datum/organ/internal/heart/L = H.internal_organs_by_name["heart"]
|
||||
if (istype(L))
|
||||
L.take_damage(100, 0)
|
||||
holder.remove_reagent(src.id, FOOD_METABOLISM)
|
||||
|
||||
@@ -6,7 +6,29 @@
|
||||
volume = 50 //Sets the default container amount for all food items.
|
||||
var/filling_color = "#FFFFFF" //Used by sandwiches.
|
||||
|
||||
var/list/center_of_mass = newlist() //Center of mass
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/New()
|
||||
..()
|
||||
src.pixel_x = rand(-10.0, 10) //Randomizes postion
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
..()
|
||||
if (!pixel_x && !pixel_y)
|
||||
src.pixel_x = rand(-6.0, 6) //Randomizes postion
|
||||
src.pixel_y = rand(-6.0, 6)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/afterattack(atom/A, mob/user, proximity, params)
|
||||
if(proximity && params && istype(A, /obj/structure/table) && center_of_mass.len)
|
||||
//Places the item on a grid
|
||||
var/list/mouse_control = params2list(params)
|
||||
var/cellnumber = 4
|
||||
|
||||
var/mouse_x = text2num(mouse_control["icon-x"])
|
||||
var/mouse_y = text2num(mouse_control["icon-y"])
|
||||
|
||||
var/grid_x = round(mouse_x, 32/cellnumber)
|
||||
var/grid_y = round(mouse_y, 32/cellnumber)
|
||||
|
||||
if(mouse_control["icon-x"])
|
||||
var/sign = mouse_x - grid_x != 0 ? sign(mouse_x - grid_x) : -1 //positive if rounded down, else negative
|
||||
pixel_x = grid_x - center_of_mass["x"] + sign*16/cellnumber //center of the cell
|
||||
if(mouse_control["icon-y"])
|
||||
var/sign = mouse_y - grid_y != 0 ? sign(mouse_y - grid_y) : -1
|
||||
pixel_y = grid_y - center_of_mass["y"] + sign*16/cellnumber
|
||||
@@ -17,7 +17,7 @@
|
||||
var/fillevel = gulp_size
|
||||
|
||||
if(!R.total_volume || !R)
|
||||
user << "\red None of [src] left, oh no!"
|
||||
user << "\red The [src.name] is empty!"
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
@@ -32,7 +32,7 @@
|
||||
return 1
|
||||
else if( istype(M, /mob/living/carbon/human) )
|
||||
if (canopened == 0)
|
||||
user << "<span class='notice'> You need to open the drink!</span>"
|
||||
user << "<span class='notice'>You need to open the drink!</span>"
|
||||
return
|
||||
|
||||
else if (canopened == 1)
|
||||
@@ -66,6 +66,9 @@
|
||||
if(!proximity) return
|
||||
|
||||
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
if (canopened == 0)
|
||||
user << "<span class='notice'>You need to open the drink!</span>"
|
||||
return
|
||||
|
||||
if(!target.reagents.total_volume)
|
||||
user << "\red [target] is empty."
|
||||
@@ -77,10 +80,19 @@
|
||||
|
||||
var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this)
|
||||
user << "\blue You fill [src] with [trans] units of the contents of [target]."
|
||||
if (canopened == 0)
|
||||
user << "<span class='notice'>You need to open the drink!</span>"
|
||||
|
||||
|
||||
else if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it.
|
||||
if (canopened == 0)
|
||||
user << "<span class='notice'>You need to open the drink!</span>"
|
||||
return
|
||||
|
||||
if (istype(target, /obj/item/weapon/reagent_containers/food/drinks/cans))
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/cans/cantarget = target
|
||||
if(cantarget.canopened == 0)
|
||||
user << "<span class='notice'>You need to open the drink you want to pour into!</span>"
|
||||
return
|
||||
|
||||
if(!reagents.total_volume)
|
||||
user << "\red [src] is empty."
|
||||
return
|
||||
@@ -111,7 +123,7 @@
|
||||
reagents.add_reagent(refill, trans)
|
||||
user << "Cyborg [src] refilled."
|
||||
|
||||
return
|
||||
return ..()
|
||||
|
||||
/* examine()
|
||||
set src in view()
|
||||
@@ -135,129 +147,118 @@
|
||||
name = "Space Cola"
|
||||
desc = "Cola. in space."
|
||||
icon_state = "cola"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("cola", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle
|
||||
name = "Bottled Water"
|
||||
desc = "Introduced to the vending machines by Skrellian request, this water comes straight from the Martian poles."
|
||||
icon_state = "waterbottle"
|
||||
center_of_mass = list("x"=15, "y"=8)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("water", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/beer
|
||||
name = "Space Beer"
|
||||
desc = "Contains only water, malt and hops."
|
||||
icon_state = "beer"
|
||||
center_of_mass = list("x"=16, "y"=12)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("beer", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/ale
|
||||
name = "Magm-Ale"
|
||||
desc = "A true dorf's drink of choice."
|
||||
icon_state = "alebottle"
|
||||
item_state = "beer"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("ale", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind
|
||||
name = "Space Mountain Wind"
|
||||
desc = "Blows right through you like a space wind."
|
||||
icon_state = "space_mountain_wind"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("spacemountainwind", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko
|
||||
name = "Thirteen Loko"
|
||||
desc = "The CMO has advised crew members that consumption of Thirteen Loko may result in seizures, blindness, drunkeness, or even death. Please Drink Responsibly."
|
||||
icon_state = "thirteen_loko"
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("thirteenloko", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/dr_gibb
|
||||
name = "Dr. Gibb"
|
||||
desc = "A delicious mixture of 42 different flavors."
|
||||
icon_state = "dr_gibb"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("dr_gibb", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/starkist
|
||||
name = "Star-kist"
|
||||
desc = "The taste of a star in liquid form. And, a bit of tuna...?"
|
||||
icon_state = "starkist"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("cola", 15)
|
||||
reagents.add_reagent("orangejuice", 15)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/space_up
|
||||
name = "Space-Up"
|
||||
desc = "Tastes like a hull breach in your mouth."
|
||||
icon_state = "space-up"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("space_up", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/lemon_lime
|
||||
name = "Lemon-Lime"
|
||||
desc = "You wanted ORANGE. It gave you Lemon Lime."
|
||||
icon_state = "lemon-lime"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("lemon_lime", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/iced_tea
|
||||
name = "Vrisk Serket Iced Tea"
|
||||
desc = "That sweet, refreshing southern earthy flavor. That's where it's from, right? South Earth?"
|
||||
icon_state = "ice_tea_can"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("icetea", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice
|
||||
name = "Grapel Juice"
|
||||
desc = "500 pages of rules of how to appropriately enter into a combat with this juice!"
|
||||
icon_state = "purple_can"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("grapejuice", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/tonic
|
||||
name = "T-Borg's Tonic Water"
|
||||
desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away."
|
||||
icon_state = "tonic"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("tonic", 50)
|
||||
@@ -266,6 +267,7 @@
|
||||
name = "Soda Water"
|
||||
desc = "A can of soda water. Still water's more refreshing cousin."
|
||||
icon_state = "sodawater"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("sodawater", 50)
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
icon_state = "emptycondiment"
|
||||
flags = FPRINT | TABLEPASS | OPENCONTAINER
|
||||
possible_transfer_amounts = list(1,5,10)
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
volume = 50
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -23,7 +24,7 @@
|
||||
var/datum/reagents/R = src.reagents
|
||||
|
||||
if(!R || !R.total_volume)
|
||||
user << "\red None of [src] left, oh no!"
|
||||
user << "\red The [src.name] is empty!"
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
@@ -90,37 +91,46 @@
|
||||
name = "Ketchup"
|
||||
desc = "You feel more American already."
|
||||
icon_state = "ketchup"
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
if("capsaicin")
|
||||
name = "Hotsauce"
|
||||
desc = "You can almost TASTE the stomach ulcers now!"
|
||||
icon_state = "hotsauce"
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
if("enzyme")
|
||||
name = "Universal Enzyme"
|
||||
desc = "Used in cooking various dishes."
|
||||
icon_state = "enzyme"
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
if("soysauce")
|
||||
name = "Soy Sauce"
|
||||
desc = "A salty soy-based flavoring."
|
||||
icon_state = "soysauce"
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
if("frostoil")
|
||||
name = "Coldsauce"
|
||||
desc = "Leaves the tongue numb in its passage."
|
||||
icon_state = "coldsauce"
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
if("sodiumchloride")
|
||||
name = "Salt Shaker"
|
||||
desc = "Salt. From space oceans, presumably."
|
||||
icon_state = "saltshaker"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("blackpepper")
|
||||
name = "Pepper Mill"
|
||||
desc = "Often used to flavor food or make people sneeze."
|
||||
icon_state = "peppermillsmall"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("cornoil")
|
||||
name = "Corn Oil"
|
||||
desc = "A delicious oil used in cooking. Made from corn."
|
||||
icon_state = "oliveoil"
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
if("sugar")
|
||||
name = "Sugar"
|
||||
desc = "Tastey space sugar!"
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
else
|
||||
name = "Misc Condiment Bottle"
|
||||
if (reagents.reagent_list.len==1)
|
||||
@@ -128,10 +138,12 @@
|
||||
else
|
||||
desc = "A mixture of various condiments. [reagents.get_master_reagent_name()] is one of them."
|
||||
icon_state = "mixedcondiments"
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
else
|
||||
icon_state = "emptycondiment"
|
||||
name = "Condiment Bottle"
|
||||
desc = "An empty condiment bottle."
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/enzyme
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
var/fillevel = gulp_size
|
||||
|
||||
if(!R.total_volume || !R)
|
||||
user << "\red None of [src] left, oh no!"
|
||||
user << "\red The [src.name] is empty!"
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
@@ -120,7 +120,7 @@
|
||||
reagents.add_reagent(refill, trans)
|
||||
user << "Cyborg [src] refilled."
|
||||
|
||||
return
|
||||
return ..()
|
||||
|
||||
examine()
|
||||
set src in view()
|
||||
@@ -169,11 +169,10 @@
|
||||
desc = "It's milk. White and nutritious goodness!"
|
||||
icon_state = "milk"
|
||||
item_state = "carton"
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("milk", 50)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/* Flour is no longer a reagent
|
||||
/obj/item/weapon/reagent_containers/food/drinks/flour
|
||||
@@ -194,63 +193,57 @@
|
||||
desc = "It's soy milk. White and nutritious goodness!"
|
||||
icon_state = "soymilk"
|
||||
item_state = "carton"
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("soymilk", 50)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/coffee
|
||||
name = "Robust Coffee"
|
||||
desc = "Careful, the beverage you're about to enjoy is extremely hot."
|
||||
icon_state = "coffee"
|
||||
center_of_mass = list("x"=15, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("coffee", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/tea
|
||||
name = "Duke Purple Tea"
|
||||
desc = "An insult to Duke Purple is an insult to the Space Queen! Any proper gentleman will fight you, if you sully this tea."
|
||||
icon_state = "teacup"
|
||||
item_state = "coffee"
|
||||
center_of_mass = list("x"=16, "y"=14)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("tea", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(0, 20) // the teacup is very low on the 32x32 grid so if it's -y then it clips into the tile below it.
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/ice
|
||||
name = "Ice Cup"
|
||||
desc = "Careful, cold ice, do not chew."
|
||||
icon_state = "coffee"
|
||||
center_of_mass = list("x"=15, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("ice", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/h_chocolate
|
||||
name = "Dutch Hot Coco"
|
||||
desc = "Made in Space South America."
|
||||
icon_state = "hot_coco"
|
||||
item_state = "coffee"
|
||||
center_of_mass = list("x"=15, "y"=13)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("hot_coco", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/dry_ramen
|
||||
name = "Cup Ramen"
|
||||
desc = "Just add 10ml water, self heats! A taste that reminds you of your school years."
|
||||
icon_state = "ramen"
|
||||
center_of_mass = list("x"=16, "y"=11)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("dry_ramen", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/sillycup
|
||||
@@ -259,10 +252,9 @@
|
||||
icon_state = "water_cup_e"
|
||||
possible_transfer_amounts = null
|
||||
volume = 10
|
||||
center_of_mass = list("x"=16, "y"=12)
|
||||
New()
|
||||
..()
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
on_reagent_change()
|
||||
if(reagents.total_volume)
|
||||
icon_state = "water_cup"
|
||||
@@ -281,33 +273,39 @@
|
||||
icon_state = "shaker"
|
||||
amount_per_transfer_from_this = 10
|
||||
volume = 100
|
||||
center_of_mass = list("x"=17, "y"=10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/flask
|
||||
name = "Captain's Flask"
|
||||
desc = "A metal flask belonging to the captain"
|
||||
icon_state = "flask"
|
||||
volume = 60
|
||||
center_of_mass = list("x"=17, "y"=7)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/flask/detflask
|
||||
name = "Detective's Flask"
|
||||
desc = "A metal flask with a leather band and golden badge belonging to the detective."
|
||||
icon_state = "detflask"
|
||||
volume = 60
|
||||
center_of_mass = list("x"=17, "y"=8)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/flask/barflask
|
||||
name = "flask"
|
||||
desc = "For those who can't be bothered to hang out at the bar to drink."
|
||||
icon_state = "barflask"
|
||||
volume = 60
|
||||
center_of_mass = list("x"=17, "y"=7)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/flask/vacuumflask
|
||||
name = "vacuum flask"
|
||||
desc = "Keeping your drinks at the perfect temperature since 1892."
|
||||
icon_state = "vacuumflask"
|
||||
volume = 60
|
||||
center_of_mass = list("x"=15, "y"=4)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/britcup
|
||||
name = "cup"
|
||||
desc = "A cup with the British flag emblazoned on it."
|
||||
icon_state = "britcup"
|
||||
volume = 30
|
||||
center_of_mass = list("x"=15, "y"=13)
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
name = "Griffeater Gin"
|
||||
desc = "A bottle of high quality gin, produced in the New London Space Station."
|
||||
icon_state = "ginbottle"
|
||||
center_of_mass = list("x"=16, "y"=4)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("gin", 100)
|
||||
@@ -146,6 +147,7 @@
|
||||
name = "Uncle Git's Special Reserve"
|
||||
desc = "A premium single-malt whiskey, gently matured inside the tunnels of a nuclear shelter. TUNNEL WHISKEY RULES."
|
||||
icon_state = "whiskeybottle"
|
||||
center_of_mass = list("x"=16, "y"=3)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("whiskey", 100)
|
||||
@@ -154,6 +156,7 @@
|
||||
name = "Tunguska Triple Distilled"
|
||||
desc = "Aah, vodka. Prime choice of drink AND fuel by Russians worldwide."
|
||||
icon_state = "vodkabottle"
|
||||
center_of_mass = list("x"=17, "y"=3)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("vodka", 100)
|
||||
@@ -162,6 +165,7 @@
|
||||
name = "Caccavo Guaranteed Quality Tequilla"
|
||||
desc = "Made from premium petroleum distillates, pure thalidomide and other fine quality ingredients!"
|
||||
icon_state = "tequillabottle"
|
||||
center_of_mass = list("x"=16, "y"=3)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("tequilla", 100)
|
||||
@@ -170,6 +174,7 @@
|
||||
name = "Bottle of Nothing"
|
||||
desc = "A bottle filled with nothing"
|
||||
icon_state = "bottleofnothing"
|
||||
center_of_mass = list("x"=17, "y"=5)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("nothing", 100)
|
||||
@@ -178,6 +183,7 @@
|
||||
name = "Wrapp Artiste Patron"
|
||||
desc = "Silver laced tequilla, served in space night clubs across the galaxy."
|
||||
icon_state = "patronbottle"
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("patron", 100)
|
||||
@@ -186,6 +192,7 @@
|
||||
name = "Captain Pete's Cuban Spiced Rum"
|
||||
desc = "This isn't just rum, oh no. It's practically GRIFF in a bottle."
|
||||
icon_state = "rumbottle"
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("rum", 100)
|
||||
@@ -194,6 +201,7 @@
|
||||
name = "Flask of Holy Water"
|
||||
desc = "A flask of the chaplain's holy water."
|
||||
icon_state = "holyflask"
|
||||
center_of_mass = list("x"=17, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("holywater", 100)
|
||||
@@ -202,6 +210,7 @@
|
||||
name = "Goldeneye Vermouth"
|
||||
desc = "Sweet, sweet dryness~"
|
||||
icon_state = "vermouthbottle"
|
||||
center_of_mass = list("x"=17, "y"=3)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("vermouth", 100)
|
||||
@@ -210,6 +219,7 @@
|
||||
name = "Robert Robust's Coffee Liqueur"
|
||||
desc = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936, HONK"
|
||||
icon_state = "kahluabottle"
|
||||
center_of_mass = list("x"=17, "y"=3)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("kahlua", 100)
|
||||
@@ -218,6 +228,7 @@
|
||||
name = "College Girl Goldschlager"
|
||||
desc = "Because they are the only ones who will drink 100 proof cinnamon schnapps."
|
||||
icon_state = "goldschlagerbottle"
|
||||
center_of_mass = list("x"=15, "y"=3)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("goldschlager", 100)
|
||||
@@ -226,6 +237,7 @@
|
||||
name = "Chateau De Baton Premium Cognac"
|
||||
desc = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. You might as well not scream 'SHITCURITY' this time."
|
||||
icon_state = "cognacbottle"
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("cognac", 100)
|
||||
@@ -234,6 +246,7 @@
|
||||
name = "Doublebeard Bearded Special Wine"
|
||||
desc = "A faint aura of unease and asspainery surrounds the bottle."
|
||||
icon_state = "winebottle"
|
||||
center_of_mass = list("x"=16, "y"=4)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("wine", 100)
|
||||
@@ -242,6 +255,7 @@
|
||||
name = "Jailbreaker Verte"
|
||||
desc = "One sip of this and you just know you're gonna have a good time."
|
||||
icon_state = "absinthebottle"
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("absinthe", 100)
|
||||
@@ -250,6 +264,7 @@
|
||||
name = "Emeraldine Melon Liquor"
|
||||
desc = "A bottle of 46 proof Emeraldine Melon Liquor. Sweet and light."
|
||||
icon_state = "alco-green" //Placeholder.
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("melonliquor", 100)
|
||||
@@ -258,6 +273,7 @@
|
||||
name = "Miss Blue Curacao"
|
||||
desc = "A fruity, exceptionally azure drink. Does not allow the imbiber to use the fifth magic."
|
||||
icon_state = "alco-blue" //Placeholder.
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("bluecuracao", 100)
|
||||
@@ -266,6 +282,7 @@
|
||||
name = "Briar Rose Grenadine Syrup"
|
||||
desc = "Sweet and tangy, a bar syrup used to add color or flavor to drinks."
|
||||
icon_state = "grenadinebottle"
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("grenadine", 100)
|
||||
@@ -274,6 +291,7 @@
|
||||
name = "Warlock's Velvet"
|
||||
desc = "What a delightful packaging for a surely high quality wine! The vintage must be amazing!"
|
||||
icon_state = "pwinebottle"
|
||||
center_of_mass = list("x"=16, "y"=4)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("pwine", 100)
|
||||
@@ -285,6 +303,7 @@
|
||||
desc = "Full of vitamins and deliciousness!"
|
||||
icon_state = "orangejuice"
|
||||
item_state = "carton"
|
||||
center_of_mass = list("x"=16, "y"=7)
|
||||
isGlass = 0
|
||||
New()
|
||||
..()
|
||||
@@ -295,6 +314,7 @@
|
||||
desc = "It's cream. Made from milk. What else did you think you'd find in there?"
|
||||
icon_state = "cream"
|
||||
item_state = "carton"
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
isGlass = 0
|
||||
New()
|
||||
..()
|
||||
@@ -305,6 +325,7 @@
|
||||
desc = "Well, at least it LOOKS like tomato juice. You can't tell with all that redness."
|
||||
icon_state = "tomatojuice"
|
||||
item_state = "carton"
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
isGlass = 0
|
||||
New()
|
||||
..()
|
||||
@@ -315,6 +336,7 @@
|
||||
desc = "Sweet-sour goodness."
|
||||
icon_state = "limejuice"
|
||||
item_state = "carton"
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
isGlass = 0
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass
|
||||
name = "glass"
|
||||
desc = "Your standard drinking glass."
|
||||
icon_state = "glass_empty"
|
||||
amount_per_transfer_from_this = 10
|
||||
volume = 50
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
|
||||
on_reagent_change()
|
||||
/*if(reagents.reagent_list.len > 1 )
|
||||
@@ -22,142 +23,177 @@
|
||||
icon_state = "beerglass"
|
||||
name = "Beer glass"
|
||||
desc = "A freezing pint of beer"
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
if("beer2")
|
||||
icon_state = "beerglass"
|
||||
name = "Beer glass"
|
||||
desc = "A freezing pint of beer"
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
if("ale")
|
||||
icon_state = "aleglass"
|
||||
name = "Ale glass"
|
||||
desc = "A freezing pint of delicious Ale"
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
if("milk")
|
||||
icon_state = "glass_white"
|
||||
name = "Glass of milk"
|
||||
desc = "White and nutritious goodness!"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("cream")
|
||||
icon_state = "glass_white"
|
||||
name = "Glass of cream"
|
||||
desc = "Ewwww..."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("chocolate")
|
||||
icon_state = "chocolateglass"
|
||||
name = "Glass of chocolate"
|
||||
desc = "Tasty"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("lemonjuice")
|
||||
icon_state = "lemonglass"
|
||||
name = "Glass of lemonjuice"
|
||||
desc = "Sour..."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("cola")
|
||||
icon_state = "glass_brown"
|
||||
name = "Glass of Space Cola"
|
||||
desc = "A glass of refreshing Space Cola"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("nuka_cola")
|
||||
icon_state = "nuka_colaglass"
|
||||
name = "Nuka Cola"
|
||||
desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland"
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
if("orangejuice")
|
||||
icon_state = "glass_orange"
|
||||
name = "Glass of Orange juice"
|
||||
desc = "Vitamins! Yay!"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("tomatojuice")
|
||||
icon_state = "glass_red"
|
||||
name = "Glass of Tomato juf"
|
||||
desc = "Are you sure this is tomato juice?"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("blood")
|
||||
icon_state = "glass_red"
|
||||
name = "Glass of Tomato juice"
|
||||
desc = "Are you sure this is tomato juice?"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("limejuice")
|
||||
icon_state = "glass_green"
|
||||
name = "Glass of Lime juice"
|
||||
desc = "A glass of sweet-sour lime juice."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("whiskey")
|
||||
icon_state = "whiskeyglass"
|
||||
name = "Glass of whiskey"
|
||||
desc = "The silky, smokey whiskey goodness inside the glass makes the drink look very classy."
|
||||
center_of_mass = list("x"=16, "y"=12)
|
||||
if("gin")
|
||||
icon_state = "ginvodkaglass"
|
||||
name = "Glass of gin"
|
||||
desc = "A crystal clear glass of Griffeater gin."
|
||||
center_of_mass = list("x"=16, "y"=12)
|
||||
if("vodka")
|
||||
icon_state = "ginvodkaglass"
|
||||
name = "Glass of vodka"
|
||||
desc = "The glass contain wodka. Xynta."
|
||||
center_of_mass = list("x"=16, "y"=12)
|
||||
if("sake")
|
||||
icon_state = "ginvodkaglass"
|
||||
name = "Glass of Sake"
|
||||
desc = "A glass of Sake."
|
||||
center_of_mass = list("x"=16, "y"=12)
|
||||
if("goldschlager")
|
||||
icon_state = "ginvodkaglass"
|
||||
name = "Glass of goldschlager"
|
||||
desc = "100 proof that teen girls will drink anything with gold in it."
|
||||
center_of_mass = list("x"=16, "y"=12)
|
||||
if("wine")
|
||||
icon_state = "wineglass"
|
||||
name = "Glass of wine"
|
||||
desc = "A very classy looking drink."
|
||||
center_of_mass = list("x"=15, "y"=7)
|
||||
if("cognac")
|
||||
icon_state = "cognacglass"
|
||||
name = "Glass of cognac"
|
||||
desc = "Damn, you feel like some kind of French aristocrat just by holding this."
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
if ("kahlua")
|
||||
icon_state = "kahluaglass"
|
||||
name = "Glass of RR coffee Liquor"
|
||||
desc = "DAMN, THIS THING LOOKS ROBUST"
|
||||
center_of_mass = list("x"=15, "y"=7)
|
||||
if("vermouth")
|
||||
icon_state = "vermouthglass"
|
||||
name = "Glass of Vermouth"
|
||||
desc = "You wonder why you're even drinking this straight."
|
||||
center_of_mass = list("x"=16, "y"=12)
|
||||
if("tequilla")
|
||||
icon_state = "tequillaglass"
|
||||
name = "Glass of Tequilla"
|
||||
desc = "Now all that's missing is the weird colored shades!"
|
||||
center_of_mass = list("x"=16, "y"=12)
|
||||
if("patron")
|
||||
icon_state = "patronglass"
|
||||
name = "Glass of Patron"
|
||||
desc = "Drinking patron in the bar, with all the subpar ladies."
|
||||
center_of_mass = list("x"=7, "y"=8)
|
||||
if("rum")
|
||||
icon_state = "rumglass"
|
||||
name = "Glass of Rum"
|
||||
desc = "Now you want to Pray for a pirate suit, don't you?"
|
||||
center_of_mass = list("x"=16, "y"=12)
|
||||
if("gintonic")
|
||||
icon_state = "gintonicglass"
|
||||
name = "Gin and Tonic"
|
||||
desc = "A mild but still great cocktail. Drink up, like a true Englishman."
|
||||
center_of_mass = list("x"=16, "y"=7)
|
||||
if("whiskeycola")
|
||||
icon_state = "whiskeycolaglass"
|
||||
name = "Whiskey Cola"
|
||||
desc = "An innocent-looking mixture of cola and Whiskey. Delicious."
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
if("whiterussian")
|
||||
icon_state = "whiterussianglass"
|
||||
name = "White Russian"
|
||||
desc = "A very nice looking drink. But that's just, like, your opinion, man."
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
if("screwdrivercocktail")
|
||||
icon_state = "screwdriverglass"
|
||||
name = "Screwdriver"
|
||||
desc = "A simple, yet superb mixture of Vodka and orange juice. Just the thing for the tired engineer."
|
||||
center_of_mass = list("x"=15, "y"=10)
|
||||
if("bloodymary")
|
||||
icon_state = "bloodymaryglass"
|
||||
name = "Bloody Mary"
|
||||
desc = "Tomato juice, mixed with Vodka and a lil' bit of lime. Tastes like liquid murder."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("martini")
|
||||
icon_state = "martiniglass"
|
||||
name = "Classic Martini"
|
||||
desc = "Damn, the bartender even stirred it, not shook it."
|
||||
center_of_mass = list("x"=17, "y"=8)
|
||||
if("vodkamartini")
|
||||
icon_state = "martiniglass"
|
||||
name = "Vodka martini"
|
||||
desc ="A bastardisation of the classic martini. Still great."
|
||||
center_of_mass = list("x"=17, "y"=8)
|
||||
if("gargleblaster")
|
||||
icon_state = "gargleblasterglass"
|
||||
name = "Pan-Galactic Gargle Blaster"
|
||||
desc = "Does... does this mean that Arthur and Ford are on the station? Oh joy."
|
||||
center_of_mass = list("x"=17, "y"=6)
|
||||
if("bravebull")
|
||||
icon_state = "bravebullglass"
|
||||
name = "Brave Bull"
|
||||
desc = "Tequilla and Coffee liquor, brought together in a mouthwatering mixture. Drink up."
|
||||
center_of_mass = list("x"=15, "y"=8)
|
||||
if("tequillasunrise")
|
||||
icon_state = "tequillasunriseglass"
|
||||
name = "Tequilla Sunrise"
|
||||
desc = "Oh great, now you feel nostalgic about sunrises back on Terra..."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("phoronspecial")
|
||||
icon_state = "phoronspecialglass"
|
||||
name = "Toxins Special"
|
||||
@@ -166,330 +202,412 @@
|
||||
icon_state = "beepskysmashglass"
|
||||
name = "Beepsky Smash"
|
||||
desc = "Heavy, hot and strong. Just like the Iron fist of the LAW."
|
||||
center_of_mass = list("x"=18, "y"=10)
|
||||
if("doctorsdelight")
|
||||
icon_state = "doctorsdelightglass"
|
||||
name = "Doctor's Delight"
|
||||
desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place."
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
if("manlydorf")
|
||||
icon_state = "manlydorfglass"
|
||||
name = "The Manly Dorf"
|
||||
desc = "A manly concotion made from Ale and Beer. Intended for true men only."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("irishcream")
|
||||
icon_state = "irishcreamglass"
|
||||
name = "Irish Cream"
|
||||
desc = "It's cream, mixed with whiskey. What else would you expect from the Irish?"
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
if("cubalibre")
|
||||
icon_state = "cubalibreglass"
|
||||
name = "Cuba Libre"
|
||||
desc = "A classic mix of rum and cola."
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
if("b52")
|
||||
icon_state = "b52glass"
|
||||
name = "B-52"
|
||||
desc = "Kahlua, Irish Cream, and congac. You will get bombed."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("atomicbomb")
|
||||
icon_state = "atomicbombglass"
|
||||
name = "Atomic Bomb"
|
||||
desc = "Nanotrasen cannot take legal responsibility for your actions after imbibing."
|
||||
center_of_mass = list("x"=15, "y"=7)
|
||||
if("longislandicedtea")
|
||||
icon_state = "longislandicedteaglass"
|
||||
name = "Long Island Iced Tea"
|
||||
desc = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only."
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
if("threemileisland")
|
||||
icon_state = "threemileislandglass"
|
||||
name = "Three Mile Island Ice Tea"
|
||||
desc = "A glass of this is sure to prevent a meltdown."
|
||||
center_of_mass = list("x"=16, "y"=2)
|
||||
if("margarita")
|
||||
icon_state = "margaritaglass"
|
||||
name = "Margarita"
|
||||
desc = "On the rocks with salt on the rim. Arriba~!"
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
if("blackrussian")
|
||||
icon_state = "blackrussianglass"
|
||||
name = "Black Russian"
|
||||
desc = "For the lactose-intolerant. Still as classy as a White Russian."
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
if("vodkatonic")
|
||||
icon_state = "vodkatonicglass"
|
||||
name = "Vodka and Tonic"
|
||||
desc = "For when a gin and tonic isn't russian enough."
|
||||
center_of_mass = list("x"=16, "y"=7)
|
||||
if("manhattan")
|
||||
icon_state = "manhattanglass"
|
||||
name = "Manhattan"
|
||||
desc = "The Detective's undercover drink of choice. He never could stomach gin..."
|
||||
center_of_mass = list("x"=17, "y"=8)
|
||||
if("manhattan_proj")
|
||||
icon_state = "proj_manhattanglass"
|
||||
name = "Manhattan Project"
|
||||
desc = "A scienitst drink of choice, for thinking how to blow up the station."
|
||||
center_of_mass = list("x"=17, "y"=8)
|
||||
if("ginfizz")
|
||||
icon_state = "ginfizzglass"
|
||||
name = "Gin Fizz"
|
||||
desc = "Refreshingly lemony, deliciously dry."
|
||||
center_of_mass = list("x"=16, "y"=7)
|
||||
if("irishcoffee")
|
||||
icon_state = "irishcoffeeglass"
|
||||
name = "Irish Coffee"
|
||||
desc = "Coffee and alcohol. More fun than a Mimosa to drink in the morning."
|
||||
center_of_mass = list("x"=15, "y"=10)
|
||||
if("hooch")
|
||||
icon_state = "glass_brown2"
|
||||
name = "Hooch"
|
||||
desc = "You've really hit rock bottom now... your liver packed its bags and left last night."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("whiskeysoda")
|
||||
icon_state = "whiskeysodaglass2"
|
||||
name = "Whiskey Soda"
|
||||
desc = "Ultimate refreshment."
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
if("tonic")
|
||||
icon_state = "glass_clear"
|
||||
name = "Glass of Tonic Water"
|
||||
desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("sodawater")
|
||||
icon_state = "glass_clear"
|
||||
name = "Glass of Soda Water"
|
||||
desc = "Soda water. Why not make a scotch and soda?"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("water")
|
||||
icon_state = "glass_clear"
|
||||
name = "Glass of Water"
|
||||
desc = "The father of all refreshments."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("spacemountainwind")
|
||||
icon_state = "Space_mountain_wind_glass"
|
||||
name = "Glass of Space Mountain Wind"
|
||||
desc = "Space Mountain Wind. As you know, there are no mountains in space, only wind."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("thirteenloko")
|
||||
icon_state = "thirteen_loko_glass"
|
||||
name = "Glass of Thirteen Loko"
|
||||
desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("dr_gibb")
|
||||
icon_state = "dr_gibb_glass"
|
||||
name = "Glass of Dr. Gibb"
|
||||
desc = "Dr. Gibb. Not as dangerous as the name might imply."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("space_up")
|
||||
icon_state = "space-up_glass"
|
||||
name = "Glass of Space-up"
|
||||
desc = "Space-up. It helps keep your cool."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("moonshine")
|
||||
icon_state = "glass_clear"
|
||||
name = "Moonshine"
|
||||
desc = "You've really hit rock bottom now... your liver packed its bags and left last night."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("soymilk")
|
||||
icon_state = "glass_white"
|
||||
name = "Glass of soy milk"
|
||||
desc = "White and nutritious soy goodness!"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("berryjuice")
|
||||
icon_state = "berryjuice"
|
||||
name = "Glass of berry juice"
|
||||
desc = "Berry juice. Or maybe its jam. Who cares?"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("poisonberryjuice")
|
||||
icon_state = "poisonberryjuice"
|
||||
name = "Glass of poison berry juice"
|
||||
desc = "A glass of deadly juice."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("carrotjuice")
|
||||
icon_state = "carrotjuice"
|
||||
name = "Glass of carrot juice"
|
||||
desc = "It is just like a carrot but without crunching."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("banana")
|
||||
icon_state = "banana"
|
||||
name = "Glass of banana juice"
|
||||
desc = "The raw essence of a banana. HONK"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("bahama_mama")
|
||||
icon_state = "bahama_mama"
|
||||
name = "Bahama Mama"
|
||||
desc = "Tropic cocktail"
|
||||
center_of_mass = list("x"=16, "y"=5)
|
||||
if("singulo")
|
||||
icon_state = "singulo"
|
||||
name = "Singulo"
|
||||
desc = "A blue-space beverage."
|
||||
center_of_mass = list("x"=17, "y"=4)
|
||||
if("alliescocktail")
|
||||
icon_state = "alliescocktail"
|
||||
name = "Allies cocktail"
|
||||
desc = "A drink made from your allies."
|
||||
center_of_mass = list("x"=17, "y"=8)
|
||||
if("antifreeze")
|
||||
icon_state = "antifreeze"
|
||||
name = "Anti-freeze"
|
||||
desc = "The ultimate refreshment."
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
if("barefoot")
|
||||
icon_state = "b&p"
|
||||
name = "Barefoot"
|
||||
desc = "Barefoot and pregnant"
|
||||
center_of_mass = list("x"=17, "y"=8)
|
||||
if("demonsblood")
|
||||
icon_state = "demonsblood"
|
||||
name = "Demons Blood"
|
||||
desc = "Just looking at this thing makes the hair at the back of your neck stand up."
|
||||
center_of_mass = list("x"=16, "y"=2)
|
||||
if("booger")
|
||||
icon_state = "booger"
|
||||
name = "Booger"
|
||||
desc = "Ewww..."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("snowwhite")
|
||||
icon_state = "snowwhite"
|
||||
name = "Snow White"
|
||||
desc = "A cold refreshment."
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
if("aloe")
|
||||
icon_state = "aloe"
|
||||
name = "Aloe"
|
||||
desc = "Very, very, very good."
|
||||
center_of_mass = list("x"=17, "y"=8)
|
||||
if("andalusia")
|
||||
icon_state = "andalusia"
|
||||
name = "Andalusia"
|
||||
desc = "A nice, strange named drink."
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
if("sbiten")
|
||||
icon_state = "sbitenglass"
|
||||
name = "Sbiten"
|
||||
desc = "A spicy mix of Vodka and Spice. Very hot."
|
||||
center_of_mass = list("x"=17, "y"=8)
|
||||
if("red_mead")
|
||||
icon_state = "red_meadglass"
|
||||
name = "Red Mead"
|
||||
desc = "A True Vikings Beverage, though its color is strange."
|
||||
center_of_mass = list("x"=17, "y"=10)
|
||||
if("mead")
|
||||
icon_state = "meadglass"
|
||||
name = "Mead"
|
||||
desc = "A Vikings Beverage, though a cheap one."
|
||||
center_of_mass = list("x"=17, "y"=10)
|
||||
if("iced_beer")
|
||||
icon_state = "iced_beerglass"
|
||||
name = "Iced Beer"
|
||||
desc = "A beer so frosty, the air around it freezes."
|
||||
center_of_mass = list("x"=16, "y"=7)
|
||||
if("grog")
|
||||
icon_state = "grogglass"
|
||||
name = "Grog"
|
||||
desc = "A fine and cepa drink for Space."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("soy_latte")
|
||||
icon_state = "soy_latte"
|
||||
name = "Soy Latte"
|
||||
desc = "A nice and refrshing beverage while you are reading."
|
||||
center_of_mass = list("x"=15, "y"=9)
|
||||
if("cafe_latte")
|
||||
icon_state = "cafe_latte"
|
||||
name = "Cafe Latte"
|
||||
desc = "A nice, strong and refreshing beverage while you are reading."
|
||||
center_of_mass = list("x"=15, "y"=9)
|
||||
if("acidspit")
|
||||
icon_state = "acidspitglass"
|
||||
name = "Acid Spit"
|
||||
desc = "A drink from Nanotrasen. Made from live aliens."
|
||||
center_of_mass = list("x"=16, "y"=7)
|
||||
if("amasec")
|
||||
icon_state = "amasecglass"
|
||||
name = "Amasec"
|
||||
desc = "Always handy before COMBAT!!!"
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
if("neurotoxin")
|
||||
icon_state = "neurotoxinglass"
|
||||
name = "Neurotoxin"
|
||||
desc = "A drink that is guaranteed to knock you silly."
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
if("hippiesdelight")
|
||||
icon_state = "hippiesdelightglass"
|
||||
name = "Hippie's Delight"
|
||||
desc = "A drink enjoyed by people during the 1960's."
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
if("bananahonk")
|
||||
icon_state = "bananahonkglass"
|
||||
name = "Banana Honk"
|
||||
desc = "A drink from Banana Heaven."
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
if("silencer")
|
||||
icon_state = "silencerglass"
|
||||
name = "Silencer"
|
||||
desc = "A drink from mime Heaven."
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
if("nothing")
|
||||
icon_state = "nothing"
|
||||
name = "Nothing"
|
||||
desc = "Absolutely nothing."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("devilskiss")
|
||||
icon_state = "devilskiss"
|
||||
name = "Devils Kiss"
|
||||
desc = "Creepy time!"
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
if("changelingsting")
|
||||
icon_state = "changelingsting"
|
||||
name = "Changeling Sting"
|
||||
desc = "A stingy drink."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("irishcarbomb")
|
||||
icon_state = "irishcarbomb"
|
||||
name = "Irish Car Bomb"
|
||||
desc = "An irish car bomb."
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
if("syndicatebomb")
|
||||
icon_state = "syndicatebomb"
|
||||
name = "Syndicate Bomb"
|
||||
desc = "A syndicate bomb."
|
||||
center_of_mass = list("x"=16, "y"=4)
|
||||
if("erikasurprise")
|
||||
icon_state = "erikasurprise"
|
||||
name = "Erika Surprise"
|
||||
desc = "The surprise is, it's green!"
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
if("driestmartini")
|
||||
icon_state = "driestmartiniglass"
|
||||
name = "Driest Martini"
|
||||
desc = "Only for the experienced. You think you see sand floating in the glass."
|
||||
center_of_mass = list("x"=17, "y"=8)
|
||||
if("ice")
|
||||
icon_state = "iceglass"
|
||||
name = "Glass of ice"
|
||||
desc = "Generally, you're supposed to put something else in there too..."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("icecoffee")
|
||||
icon_state = "icedcoffeeglass"
|
||||
name = "Iced Coffee"
|
||||
desc = "A drink to perk you up and refresh you!"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("coffee")
|
||||
icon_state = "glass_brown"
|
||||
name = "Glass of coffee"
|
||||
desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("bilk")
|
||||
icon_state = "glass_brown"
|
||||
name = "Glass of bilk"
|
||||
desc = "A brew of milk and beer. For those alcoholics who fear osteoporosis."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("fuel")
|
||||
icon_state = "dr_gibb_glass"
|
||||
name = "Glass of welder fuel"
|
||||
desc = "Unless you are an industrial tool, this is probably not safe for consumption."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("brownstar")
|
||||
icon_state = "brownstar"
|
||||
name = "Brown Star"
|
||||
desc = "It's not what it sounds like..."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("grapejuice")
|
||||
icon_state = "grapejuice"
|
||||
name = "Glass of grape juice"
|
||||
desc = "It's grrrrrape!"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("grapesoda")
|
||||
icon_state = "grapesoda"
|
||||
name = "Can of Grape Soda"
|
||||
desc = "Looks like a delicious drank!"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("icetea")
|
||||
icon_state = "icedteaglass"
|
||||
name = "Iced Tea"
|
||||
desc = "No relation to a certain rap artist/ actor."
|
||||
center_of_mass = list("x"=15, "y"=10)
|
||||
if("grenadine")
|
||||
icon_state = "grenadineglass"
|
||||
name = "Glass of grenadine syrup"
|
||||
desc = "Sweet and tangy, a bar syrup used to add color or flavor to drinks."
|
||||
center_of_mass = list("x"=17, "y"=6)
|
||||
if("milkshake")
|
||||
icon_state = "milkshake"
|
||||
name = "Milkshake"
|
||||
desc = "Glorious brainfreezing mixture."
|
||||
center_of_mass = list("x"=16, "y"=7)
|
||||
if("lemonade")
|
||||
icon_state = "lemonadeglass"
|
||||
name = "Lemonade"
|
||||
desc = "Oh the nostalgia..."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
if("kiraspecial")
|
||||
icon_state = "kiraspecial"
|
||||
name = "Kira Special"
|
||||
desc = "Long live the guy who everyone had mistaken for a girl. Baka!"
|
||||
center_of_mass = list("x"=16, "y"=12)
|
||||
if("rewriter")
|
||||
icon_state = "rewriter"
|
||||
name = "Rewriter"
|
||||
desc = "The secret of the sanctuary of the Libarian..."
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
if("suidream")
|
||||
icon_state = "sdreamglass"
|
||||
name = "Sui Dream"
|
||||
desc = "A froofy, fruity, and sweet mixed drink. Understanding the name only brings shame."
|
||||
center_of_mass = list("x"=16, "y"=5)
|
||||
if("melonliquor")
|
||||
icon_state = "emeraldglass"
|
||||
name = "Glass of Melon Liquor"
|
||||
desc = "A relatively sweet and fruity 46 proof liquor."
|
||||
center_of_mass = list("x"=16, "y"=5)
|
||||
if("bluecuracao")
|
||||
icon_state = "curacaoglass"
|
||||
name = "Glass of Blue Curacao"
|
||||
desc = "Exotically blue, fruity drink, distilled from oranges."
|
||||
center_of_mass = list("x"=16, "y"=5)
|
||||
if("absinthe")
|
||||
icon_state = "absintheglass"
|
||||
name = "Glass of Absinthe"
|
||||
desc = "Wormwood, anise, oh my."
|
||||
center_of_mass = list("x"=16, "y"=5)
|
||||
if("pwine")
|
||||
icon_state = "pwineglass"
|
||||
name = "Glass of ???"
|
||||
desc = "A black ichor with an oily purple sheer on top. Are you sure you should drink this?"
|
||||
center_of_mass = list("x"=16, "y"=5)
|
||||
else
|
||||
icon_state ="glass_brown"
|
||||
name = "Glass of ..what?"
|
||||
desc = "You can't really tell what this is."
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
else
|
||||
icon_state = "glass_empty"
|
||||
name = "Drinking glass"
|
||||
desc = "Your standard drinking glass"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
return
|
||||
|
||||
// for /obj/machinery/vending/sovietsoda
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
desc = "A jar. You're not sure what it's supposed to hold."
|
||||
icon_state = "jar"
|
||||
item_state = "beaker"
|
||||
center_of_mass = list("x"=15, "y"=8)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("slime", 50)
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
var/trash = null
|
||||
var/slice_path
|
||||
var/slices_num
|
||||
center_of_mass = list("x"=15, "y"=15)
|
||||
|
||||
//Placeholder for effect that trigger on eating that aren't tied to reagents.
|
||||
/obj/item/weapon/reagent_containers/food/snacks/proc/On_Consume(var/mob/M)
|
||||
@@ -107,7 +108,7 @@
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/afterattack(obj/target, mob/user, proximity)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/examine()
|
||||
set src in view()
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
harvesting = 0
|
||||
cur_artifact.anchored = 0
|
||||
cur_artifact.being_used = 0
|
||||
cur_artifact = null
|
||||
src.visible_message("<b>[name]</b> states, \"Battery is full.\"")
|
||||
icon_state = "incubator"
|
||||
|
||||
@@ -140,27 +141,13 @@
|
||||
src.visible_message("<b>[src]</b> states, \"Cannot harvest. Source already being harvested.\"")
|
||||
|
||||
else
|
||||
var/mundane = 0
|
||||
for(var/obj/O in get_turf(owned_scanner))
|
||||
if(O.invisibility)
|
||||
continue
|
||||
if(!istype(O, /obj/machinery/artifact) && !istype(O, /obj/machinery/artifact_scanpad))
|
||||
mundane++
|
||||
break
|
||||
for(var/mob/O in get_turf(owned_scanner))
|
||||
if(O.invisibility)
|
||||
continue
|
||||
mundane++
|
||||
break
|
||||
|
||||
if(articount > 1 || mundane)
|
||||
var/message = "<b>[src]</b> states, \"Cannot harvest. Too many artifacts on the pad.\""
|
||||
src.visible_message(message)
|
||||
else
|
||||
if(articount > 1)
|
||||
state("Cannot harvest. Too many artifacts on the pad.")
|
||||
else if(analysed)
|
||||
cur_artifact = analysed
|
||||
|
||||
//if both effects are active, we can't harvest either
|
||||
if(cur_artifact.my_effect.activated && cur_artifact.secondary_effect.activated)
|
||||
if(cur_artifact.my_effect && cur_artifact.my_effect.activated && cur_artifact.secondary_effect.activated)
|
||||
src.visible_message("<b>[src]</b> states, \"Cannot harvest. Source is emitting conflicting energy signatures.\"")
|
||||
else if(!cur_artifact.my_effect.activated && !cur_artifact.secondary_effect.activated)
|
||||
src.visible_message("<b>[src]</b> states, \"Cannot harvest. No energy emitting from source.\"")
|
||||
@@ -233,6 +220,7 @@
|
||||
harvesting = 0
|
||||
cur_artifact.anchored = 0
|
||||
cur_artifact.being_used = 0
|
||||
cur_artifact = null
|
||||
src.visible_message("<b>[name]</b> states, \"Energy harvesting interrupted.\"")
|
||||
icon_state = "incubator"
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
p = min(p, 100)
|
||||
icon_state = "anobattery[round(p,25)]"
|
||||
|
||||
/obj/item/weapon/anobattery/proc/use_power(var/amount)
|
||||
stored_charge = max(0, stored_charge - amount)
|
||||
|
||||
/obj/item/weapon/anodevice
|
||||
name = "Anomaly power utilizer"
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
@@ -78,7 +81,7 @@
|
||||
|
||||
/obj/item/weapon/anodevice/process()
|
||||
if(activated)
|
||||
if(inserted_battery && inserted_battery.battery_effect)
|
||||
if(inserted_battery && inserted_battery.battery_effect && (inserted_battery.stored_charge > 0) )
|
||||
//make sure the effect is active
|
||||
if(!inserted_battery.battery_effect.activated)
|
||||
inserted_battery.battery_effect.ToggleActivate(1)
|
||||
@@ -106,20 +109,20 @@
|
||||
inserted_battery.battery_effect.DoEffectTouch(holder)
|
||||
|
||||
//consume power
|
||||
inserted_battery.stored_charge -= energy_consumed_on_touch
|
||||
inserted_battery.use_power(energy_consumed_on_touch)
|
||||
else
|
||||
//consume power equal to time passed
|
||||
inserted_battery.stored_charge -= world.time - last_process
|
||||
inserted_battery.use_power(world.time - last_process)
|
||||
|
||||
else if(inserted_battery.battery_effect.effect == EFFECT_PULSE)
|
||||
inserted_battery.battery_effect.chargelevel = inserted_battery.battery_effect.chargelevelmax
|
||||
|
||||
//consume power relative to the time the artifact takes to charge and the effect range
|
||||
inserted_battery.stored_charge -= inserted_battery.battery_effect.effectrange * inserted_battery.battery_effect.effectrange * inserted_battery.battery_effect.chargelevelmax
|
||||
inserted_battery.use_power(inserted_battery.battery_effect.effectrange * inserted_battery.battery_effect.effectrange * inserted_battery.battery_effect.chargelevelmax)
|
||||
|
||||
else
|
||||
//consume power equal to time passed
|
||||
inserted_battery.stored_charge -= world.time - last_process
|
||||
inserted_battery.use_power(world.time - last_process)
|
||||
|
||||
last_activation = world.time
|
||||
|
||||
@@ -159,11 +162,12 @@
|
||||
//max 10 sec interval
|
||||
interval = min(max(interval, 0), 100)
|
||||
if(href_list["startup"])
|
||||
activated = 1
|
||||
src.visible_message("\blue \icon[src] [src] whirrs.", "\icon[src]\blue You hear something whirr.")
|
||||
if(!inserted_battery.battery_effect.activated)
|
||||
inserted_battery.battery_effect.ToggleActivate(1)
|
||||
time_end = world.time + duration
|
||||
if(inserted_battery && inserted_battery.battery_effect && (inserted_battery.stored_charge > 0) )
|
||||
activated = 1
|
||||
src.visible_message("\blue \icon[src] [src] whirrs.", "\icon[src]\blue You hear something whirr.")
|
||||
if(!inserted_battery.battery_effect.activated)
|
||||
inserted_battery.battery_effect.ToggleActivate(1)
|
||||
time_end = world.time + duration
|
||||
if(href_list["shutdown"])
|
||||
activated = 0
|
||||
if(href_list["ejectbattery"])
|
||||
@@ -196,7 +200,7 @@
|
||||
|
||||
if(activated && inserted_battery.battery_effect.effect == EFFECT_TOUCH && !isnull(inserted_battery))
|
||||
inserted_battery.battery_effect.DoEffectTouch(M)
|
||||
inserted_battery.stored_charge -= energy_consumed_on_touch
|
||||
inserted_battery.use_power(energy_consumed_on_touch)
|
||||
user.visible_message("\blue [user] taps [M] with [src], and it shudders on contact.")
|
||||
else
|
||||
user.visible_message("\blue [user] taps [M] with [src], but nothing happens.")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user