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

Conflicts:
	baystation12.dme
	code/modules/reagents/Chemistry-Reagents.dm
	html/changelog.html
This commit is contained in:
Chinsky
2013-01-22 20:07:10 +04:00
101 changed files with 7149 additions and 12741 deletions
@@ -0,0 +1,298 @@
var/global/current_date_string
var/global/num_financial_terminals = 1
var/global/datum/money_account/station_account
var/global/next_account_number = 0
/proc/create_station_account()
if(!station_account)
next_account_number = rand(111111, 999999)
station_account = new()
station_account.owner_name = "[station_name()] Station Account"
station_account.account_number = rand(111111, 999999)
station_account.remote_access_pin = rand(1111, 111111)
station_account.money = 10000
//create an entry in the account transaction log for when it was created
var/datum/transaction/T = new()
T.target_name = station_account.owner_name
T.purpose = "Account creation"
T.amount = 10000
T.date = "2nd April, 2555"
T.time = "11:24"
T.source_terminal = "Biesel GalaxyNet Terminal #277"
//add the account
station_account.transaction_log.Add(T)
for(var/obj/machinery/account_database/A in world)
A.accounts.Add(station_account)
//the current ingame time (hh:mm) can be obtained by calling:
//worldtime2text()
/datum/money_account
var/owner_name = ""
var/account_number = 0
var/remote_access_pin = 0
var/money = 0
var/list/transaction_log = list()
var/security_level = 1 //0 - auto-identify from worn ID, require only account number
//1 - require manual login / account number and pin
//2 - require card and manual login
/datum/transaction
var/target_name = ""
var/purpose = ""
var/amount = 0
var/date = ""
var/time = ""
var/source_terminal = ""
/obj/machinery/account_database
name = "Accounts database"
desc = "Holds transaction logs, account data and all kinds of other financial records."
icon = 'virology.dmi'
icon_state = "analyser"
density = 1
var/list/accounts = list()
req_one_access = list(access_hop, access_captain)
var/receipt_num
var/machine_id = ""
var/obj/item/weapon/card/id/held_card
var/access_level = 0
var/datum/money_account/detailed_account_view
var/creating_new_account = 0
/obj/machinery/account_database/New()
..()
if(!station_account)
create_station_account()
if(!current_date_string)
current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 2557"
machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]"
/obj/machinery/account_database/attack_hand(mob/user as mob)
if(get_dist(src,user) <= 1)
var/dat = "<b>Accounts Database</b><br>"
dat += "<i>[machine_id]</i><br>"
dat += "Confirm identity: <a href='?src=\ref[src];choice=insert_card'>[held_card ? held_card : "-----"]</a><br>"
if(access_level > 0)
dat += "You may not edit accounts at this terminal, only create and view them.<br>"
if(creating_new_account)
dat += "<br>"
dat += "<a href='?src=\ref[src];choice=view_accounts_list;'>Return to accounts list</a>"
dat += "<form name='create_account' action='?src=\ref[src]' method='get'>"
dat += "<input type='hidden' name='src' value='\ref[src]'>"
dat += "<input type='hidden' name='choice' value='finalise_create_account'>"
dat += "<b>Holder name:</b> <input type='text' id='holder_name' name='holder_name' style='width:250px; background-color:white;'><br>"
dat += "<b>Initial funds:</b> <input type='text' id='starting_funds' name='starting_funds' style='width:250px; background-color:white;'> (subtracted from station account)<br>"
dat += "<i>New accounts are automatically assigned a secret number and pin, which are printed separately in a sealed package.</i><br>"
dat += "<input type='submit' value='Create'><br>"
dat += "</form>"
else
if(detailed_account_view)
dat += "<br>"
dat += "<a href='?src=\ref[src];choice=view_accounts_list;'>Return to accounts list</a><hr>"
dat += "<b>Account number:</b> #[detailed_account_view.account_number]<br>"
dat += "<b>Account holder:</b> [detailed_account_view.owner_name]<br>"
dat += "<b>Account balance:</b> $[detailed_account_view.money]<br>"
dat += "<table border=1 style='width:100%'>"
dat += "<tr>"
dat += "<td><b>Date</b></td>"
dat += "<td><b>Time</b></td>"
dat += "<td><b>Target</b></td>"
dat += "<td><b>Purpose</b></td>"
dat += "<td><b>Value</b></td>"
dat += "<td><b>Source terminal ID</b></td>"
dat += "</tr>"
for(var/datum/transaction/T in detailed_account_view.transaction_log)
dat += "<tr>"
dat += "<td>[T.date]</td>"
dat += "<td>[T.time]</td>"
dat += "<td>[T.target_name]</td>"
dat += "<td>[T.purpose]</td>"
dat += "<td>$[T.amount]</td>"
dat += "<td>[T.source_terminal]</td>"
dat += "</tr>"
dat += "</table>"
else
dat += "<a href='?src=\ref[src];choice=create_account;'>Create new account</a> <a href='?src=\ref[src];choice=sync_accounts;'>Sync accounts across databases</a><br><br>"
dat += "<table border=1 style='width:100%'>"
for(var/i=1, i<=accounts.len, i++)
var/datum/money_account/D = accounts[i]
dat += "<tr>"
dat += "<td>#[D.account_number]</td>"
dat += "<td>[D.owner_name]</td>"
dat += "<td><a href='?src=\ref[src];choice=view_account_detail;account_index=[i]'>View in detail</a></td>"
dat += "</tr>"
dat += "</table>"
user << browse(dat,"window=account_db;size=700x650")
else
user << browse(null,"window=account_db")
/obj/machinery/account_database/attackby(O as obj, user as mob)//TODO:SANITY
if(istype(O, /obj/item/weapon/card))
var/obj/item/weapon/card/id/idcard = O
if(!held_card)
usr.drop_item()
idcard.loc = src
held_card = idcard
if(access_cent_captain in idcard.access)
access_level = 2
else if(access_hop in idcard.access || access_captain in idcard.access)
access_level = 1
else
..()
/obj/machinery/account_database/Topic(var/href, var/href_list)
if(href_list["choice"])
switch(href_list["choice"])
if("sync_accounts")
for(var/obj/machinery/account_database/A in world)
for(var/datum/money_account/M in src.accounts)
if(!A.accounts.Find(M))
A.accounts.Add(M)
usr << "\icon[src] <span class='info'>Accounts synched across all databases in range.</span>"
if("create_account")
creating_new_account = 1
if("finalise_create_account")
var/account_name = href_list["holder_name"]
var/starting_funds = max(text2num(href_list["starting_funds"]), 0)
add_account(account_name, starting_funds)
if(starting_funds > 0)
//subtract the money
station_account.money -= starting_funds
//create a transaction log entry
var/datum/transaction/T = new()
T.target_name = account_name
T.purpose = "New account funds initialisation"
T.amount = "([starting_funds])"
T.date = current_date_string
T.time = worldtime2text()
T.source_terminal = machine_id
station_account.transaction_log.Add(T)
creating_new_account = 0
if("insert_card")
if(held_card)
held_card.loc = src.loc
if(ishuman(usr) && !usr.get_active_hand())
usr.put_in_hands(held_card)
held_card = null
access_level = 0
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
usr.drop_item()
C.loc = src
held_card = C
if(access_cent_captain in C.access)
access_level = 2
else if(access_hop in C.access || access_captain in C.access)
access_level = 1
if("view_account_detail")
var/index = text2num(href_list["account_index"])
if(index && index <= accounts.len)
detailed_account_view = accounts[index]
if("view_accounts_list")
detailed_account_view = null
creating_new_account = 0
src.attack_hand(usr)
/obj/machinery/account_database/proc/add_account(var/new_owner_name = "Default user", var/starting_funds = 0, var/pre_existing = 0)
//create a new account
var/datum/money_account/M = new()
M.owner_name = new_owner_name
M.remote_access_pin = rand(1111, 111111)
M.money = starting_funds
//create an entry in the account transaction log for when it was created
var/datum/transaction/T = new()
T.target_name = new_owner_name
T.purpose = "Account creation"
T.amount = starting_funds
if(pre_existing)
//set a random date, time and location some time over the past few decades
T.date = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 25[rand(10,56)]"
T.time = "[rand(0,24)]:[rand(11,59)]"
T.source_terminal = "NTGalaxyNet Terminal #[rand(111,1111)]"
M.account_number = rand(111111, 999999)
else
T.date = current_date_string
T.time = worldtime2text()
T.source_terminal = machine_id
M.account_number = next_account_number
next_account_number += rand(1,25)
//create a sealed package containing the account details
var/obj/item/smallDelivery/P = new(src.loc)
var/obj/item/weapon/paper/R = new(P)
P.wrapped = R
R.name = "Account information: [M.owner_name]"
R.info = "<b>Account details (confidential)</b><br><hr><br>"
R.info += "<i>Account holder:</i> [M.owner_name]<br>"
R.info += "<i>Account number:</i> [M.account_number]<br>"
R.info += "<i>Account pin:</i> [M.remote_access_pin]<br>"
R.info += "<i>Starting balance:</i> $[M.money]<br>"
R.info += "<i>Date and time:</i> [worldtime2text()], [current_date_string]<br><br>"
R.info += "<i>Creation terminal ID:</i> [machine_id]<br>"
R.info += "<i>Authorised NT officer overseeing creation:</i> [held_card.registered_name]<br>"
//stamp the paper
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
stampoverlay.icon_state = "paper_stamp-cent"
if(!R.stamped)
R.stamped = new
R.stamped += /obj/item/weapon/stamp
R.overlays += stampoverlay
R.stamps += "<HR><i>This paper has been stamped by the Accounts Database.</i>"
//add the account
M.transaction_log.Add(T)
accounts.Add(M)
/obj/machinery/account_database/proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount)
for(var/datum/money_account/D in accounts)
if(D.account_number == attempt_account_number)
D.money += amount
//create a transaction log entry
var/datum/transaction/T = new()
T.target_name = source_name
T.purpose = purpose
if(amount < 0)
T.amount = "([amount])"
else
T.amount = "[amount]"
T.date = current_date_string
T.time = worldtime2text()
T.source_terminal = terminal_id
D.transaction_log.Add(T)
return 1
return 0
//this returns the first account datum that matches the supplied accnum/pin combination, it returns null if the combination did not match any account
/obj/machinery/account_database/proc/attempt_account_access(var/attempt_account_number, var/attempt_pin_number, var/security_level_passed = 0)
for(var/datum/money_account/D in accounts)
if(D.account_number == attempt_account_number)
if( D.security_level <= security_level_passed && (!D.security_level || D.remote_access_pin == attempt_pin_number) )
return D
@@ -0,0 +1,177 @@
/obj/item/weapon/eftpos
name = "EFTPOS scanner"
desc = "Swipe your ID card to pay electronically."
icon = 'icons/obj/library.dmi'
icon_state = "scanner"
var/machine_id = ""
var/eftpos_name = "Default EFTPOS scanner"
var/transaction_locked = 0
var/transaction_paid = 0
var/transaction_amount = 0
var/transaction_purpose = "Default charge"
var/access_code = 0
var/obj/machinery/account_database/linked_db
var/datum/money_account/linked_account
/obj/item/weapon/eftpos/New()
..()
machine_id = "[station_name()] EFTPOS #[num_financial_terminals++]"
access_code = rand(1111,111111)
reconnect_database()
print_reference()
//by default, connect to the station account
//the user of the EFTPOS device can change the target account though, and no-one will be the wiser (except whoever's being charged)
linked_account = station_account
/obj/item/weapon/eftpos/proc/print_reference()
var/obj/item/weapon/paper/R = new(get_turf(src))
R.name = "Reference: [eftpos_name]"
R.info = "<b>[eftpos_name] reference</b><br><br>"
R.info += "Access code: [access_code]<br><br>"
R.info += "<b>Do not lose this code, or the device will have to be replaced.</b><br>"
//stamp the paper
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
stampoverlay.icon_state = "paper_stamp-cent"
if(!R.stamped)
R.stamped = new
R.stamped += /obj/item/weapon/stamp
R.overlays += stampoverlay
R.stamps += "<HR><i>This paper has been stamped by the EFTPOS device.</i>"
/obj/item/weapon/eftpos/proc/reconnect_database()
for(var/obj/machinery/account_database/DB in world)
if(DB.z == src.z)
linked_db = DB
break
/obj/item/weapon/eftpos/attack_self(mob/user as mob)
if(get_dist(src,user) <= 1)
var/dat = "<b>[eftpos_name]</b><br>"
dat += "<i>This terminal is</i> [machine_id]. <i>Report this code when contacting NanoTrasen IT Support</i><br>"
if(transaction_locked)
dat += "<a href='?src=\ref[src];choice=toggle_lock'>Reset[transaction_paid ? "" : " (authentication required)"]</a><br><br>"
dat += "Transaction purpose: <b>[transaction_purpose]</b><br>"
dat += "Value: <b>$[transaction_amount]</b><br>"
dat += "Linked account: <b>[linked_account ? linked_account.owner_name : "None"]</b><hr>"
if(transaction_paid)
dat += "<i>This transaction has been processed successfully.</i><hr>"
else
dat += "<i>Swipe your card below the line to finish this transaction.</i><hr>"
dat += "<a href='?src=\ref[src];choice=scan_card'>\[------\]</a>"
else
dat += "<a href='?src=\ref[src];choice=toggle_lock'>Lock in new transaction</a><br><br>"
dat += "Transaction purpose: <a href='?src=\ref[src];choice=trans_purpose'>[transaction_purpose]</a><br>"
dat += "Value: <a href='?src=\ref[src];choice=trans_value'>$[transaction_amount]</a><br>"
dat += "Linked account: <a href='?src=\ref[src];choice=link_account'>[linked_account ? linked_account.owner_name : "None"]</a><hr>"
dat += "<a href='?src=\ref[src];choice=change_code'>Change access code</a>"
user << browse(dat,"window=eftpos")
else
user << browse(null,"window=eftpos")
/obj/item/weapon/eftpos/attackby(O as obj, user as mob)
if(istype(O, /obj/item/weapon/card))
//attempt to connect to a new db, and if that doesn't work then fail
if(!linked_db)
reconnect_database()
if(linked_db && linked_account)
var/obj/item/weapon/card/I = O
scan_card(I)
else
usr << "\icon[src]<span class='warning'>Unable to connect to accounts database.</span>"
else
..()
/obj/item/weapon/eftpos/Topic(var/href, var/href_list)
if(href_list["choice"])
switch(href_list["choice"])
if("change_code")
var/attempt_code = text2num(input("Re-enter the current EFTPOS access code", "Confirm old EFTPOS code"))
if(attempt_code == access_code)
access_code = text2num(input("Enter a new access code for this device", "Enter new EFTPOS code"))
print_reference()
else
usr << "\icon[src]<span class='warning'>Incorrect code entered.</span>"
if("link_account")
if(linked_db)
var/attempt_account_num = text2num(input("Enter account number to pay EFTPOS charges into", "New account number"))
var/attempt_pin = text2num(input("Enter pin code", "Account pin"))
linked_account = linked_db.attempt_account_access(attempt_account_num, attempt_pin, 1)
else
usr << "<span class='warning'>Unable to connect to accounts database.</span>"
if("trans_purpose")
transaction_purpose = input("Enter reason for EFTPOS transaction", "Transaction purpose")
if("trans_value")
transaction_amount = max(text2num(input("Enter amount for EFTPOS transaction", "Transaction amount")),0)
if("toggle_lock")
if(transaction_locked)
var/attempt_code = text2num(input("Enter EFTPOS access code", "Reset Transaction"))
if(attempt_code == access_code)
transaction_locked = 0
transaction_paid = 0
else if(linked_account)
transaction_locked = 1
else
usr << "\icon[src] <span class='warning'>No account connected to send transactions to.</span>"
if("scan_card")
//attempt to connect to a new db, and if that doesn't work then fail
if(!linked_db)
reconnect_database()
if(linked_db && linked_account)
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card))
scan_card(I)
else
usr << "\icon[src]<span class='warning'>Unable to link accounts.</span>"
src.attack_self(usr)
/obj/item/weapon/eftpos/proc/scan_card(var/obj/item/weapon/card/I)
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
if(transaction_locked && !transaction_paid)
if(linked_account)
var/attempt_pin = text2num(input("Enter pin code", "EFTPOS transaction"))
var/datum/money_account/D = linked_db.attempt_account_access(C.associated_account_number, attempt_pin, 2)
if(D)
if(transaction_amount <= D.money)
playsound(src, 'chime.ogg', 50, 1)
src.visible_message("\icon[src] The [src] chimes.")
transaction_paid = 1
//transfer the money
D.money -= transaction_amount
linked_account.money += transaction_amount
//create entries in the two account transaction logs
var/datum/transaction/T = new()
T.target_name = "[linked_account.owner_name] ([eftpos_name])"
T.purpose = transaction_purpose
T.amount = "([transaction_amount])"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
D.transaction_log.Add(T)
//
T = new()
T.target_name = D.owner_name
T.purpose = transaction_purpose
T.amount = "[transaction_amount]"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
linked_account.transaction_log.Add(T)
else
usr << "\icon[src]<span class='warning'>You don't have that much money!<span>"
else
usr << "\icon[src]<span class='warning'>EFTPOS is not connected to an account.<span>"
else
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
else
..()
//emag?
@@ -0,0 +1,63 @@
#define RIOTS 1
#define WILD_ANIMAL_ATTACK 2
#define INDUSTRIAL_ACCIDENT 3
#define BIOHAZARD_OUTBREAK 4
#define WARSHIPS_ARRIVE 5
#define PIRATES 6
#define CORPORATE_ATTACK 7
#define ALIEN_RAIDERS 8
#define AI_LIBERATION 9
#define MOURNING 10
#define CULT_CELL_REVEALED 11
#define SECURITY_BREACH 12
#define ANIMAL_RIGHTS_RAID 13
#define FESTIVAL 14
#define DEFAULT 1
#define ADMINISTRATIVE 2
#define CLOTHING 3
#define SECURITY 4
#define SPECIAL_SECURITY 5
#define FOOD 6
#define ANIMALS 7
#define MINERALS 8
#define EMERGENCY 9
#define GAS 10
#define MAINTENANCE 11
#define ELECTRICAL 12
#define ROBOTICS 13
#define BIOMEDICAL 14
#define EVA 15
//---- The following corporations are friendly with NanoTrasen and loosely enable trade and travel:
//Corporation NanoTrasen - Generalised / high tech research and plasma exploitation.
//Corporation Vessel Contracting - Ship and station construction, materials research.
//Corporation Osiris Atmospherics - Atmospherics machinery construction and chemical research.
//Corporation Second Red Cross Society - 26th century Red Cross reborn as a dominating economic force in biomedical science (research and materials).
//Corporation Blue Industries - High tech and high energy research, in particular into the mysteries of bluespace manipulation and power generation.
//Corporation Kusanagi Robotics - Founded by robotics legend Kaito Kusanagi in the 2070s, they have been on the forefront of mechanical augmentation and robotics development ever since.
//Corporation Free traders - Not so much a corporation as a loose coalition of spacers, Free Traders are a roving band of smugglers, traders and fringe elements following a rigid (if informal) code of loyalty and honour. Mistrusted by most corporations, they are tolerated because of their uncanny ability to smell out a profit.
//---- Descriptions of destination types
//Space stations can be purpose built for a number of different things, but generally require regular shipments of essential supplies.
//Corvettes are small, fast warships generally assigned to border patrol or chasing down smugglers.
//Battleships are large, heavy cruisers designed for slugging it out with other heavies or razing planets.
//Yachts are fast civilian craft, often used for pleasure or smuggling.
//Destroyers are medium sized vessels, often used for escorting larger ships but able to go toe-to-toe with them if need be.
//Frigates are medium sized vessels, often used for escorting larger ships. They will rapidly find themselves outclassed if forced to face heavy warships head on.
var/setup_economy = 0
/proc/setup_economy()
var/datum/feed_channel/newChannel = new /datum/feed_channel
newChannel.channel_name = "Tau Ceti Daily"
newChannel.author = "CentComm Minister of Information"
newChannel.locked = 1
newChannel.is_admin_channel = 1
news_network.network_channels += newChannel
setup_economy = 1
@@ -0,0 +1,102 @@
/datum/event/economic_event
endWhen = 50 //this will be set randomly, later
announceWhen = 15
var/event_type = 0
var/list/cheaper_goods = list()
var/list/dearer_goods = list()
var/datum/trade_destination/affected_dest
/datum/event/economic_event/start()
if(!setup_economy)
setup_economy()
var/type = pick(tradeable_destinations)
affected_dest = new type()
if(affected_dest.viable_random_events.len)
endWhen = rand(60,300)
event_type = pick(affected_dest.viable_random_events)
switch(event_type)
if(RIOTS)
dearer_goods = list(SECURITY)
cheaper_goods = list(MINERALS, FOOD)
if(WILD_ANIMAL_ATTACK)
cheaper_goods = list(ANIMALS)
dearer_goods = list(FOOD, BIOMEDICAL)
if(INDUSTRIAL_ACCIDENT)
dearer_goods = list(EMERGENCY, BIOMEDICAL, ROBOTICS)
if(BIOHAZARD_OUTBREAK)
dearer_goods = list(BIOMEDICAL, GAS)
if(PIRATES)
dearer_goods = list(SECURITY, MINERALS)
if(CORPORATE_ATTACK)
dearer_goods = list(SECURITY, MAINTENANCE)
if(ALIEN_RAIDERS)
dearer_goods = list(BIOMEDICAL, ANIMALS)
cheaper_goods = list(GAS, MINERALS)
if(AI_LIBERATION)
dearer_goods = list(EMERGENCY, GAS, MAINTENANCE)
if(MOURNING)
cheaper_goods = list(MINERALS, MAINTENANCE)
if(CULT_CELL_REVEALED)
dearer_goods = list(SECURITY, BIOMEDICAL, MAINTENANCE)
if(SECURITY_BREACH)
dearer_goods = list(SECURITY)
if(ANIMAL_RIGHTS_RAID)
dearer_goods = list(ANIMALS)
if(FESTIVAL)
dearer_goods = list(FOOD, ANIMALS)
for(var/good_type in dearer_goods)
affected_dest.temp_price_change[good_type] = rand(1,100)
for(var/good_type in cheaper_goods)
affected_dest.temp_price_change[good_type] = rand(1,100) / 100
/datum/event/economic_event/announce()
//copy-pasted from the admin verbs to submit new newscaster messages
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = "NanoTrasen Editor"
newMsg.is_admin_message = 1
switch(event_type)
if(RIOTS)
newMsg.body = "[pick("Riots have","Unrest has")] broken out on planet [affected_dest.name]. Authorities call for calm, as [pick("various parties","rebellious elements","peacekeeping forces","\'REDACTED\'")] begin stockpiling weaponry and armour. Meanwhile, food and mineral prices are dropping as local industries attempt empty their stocks in expectation of looting."
if(WILD_ANIMAL_ATTACK)
newMsg.body = "Local [pick("wildlife","animal life","fauna")] on planet [affected_dest.name] has been increasing in agression and raiding outlying settlements for food. Big game hunters have been called in to help alleviate the problem, but numerous injuries have already occurred."
if(INDUSTRIAL_ACCIDENT)
newMsg.body = "[pick("An industrial accident","A smelting accident","A malfunction","A malfunctioning piece of machinery","Negligent maintenance","A cooleant leak","A ruptured conduit")] at a [pick("factory","installation","power plant","dockyards")] on [affected_dest.name] resulted in severe structural damage and numerous injuries. Repairs are ongoing."
if(BIOHAZARD_OUTBREAK)
newMsg.body = "[pick("A \'REDACTED\'","A biohazard","An outbreak","A virus")] on [affected_dest.name] has resulted in quarantine, stopping much shipping in the area. Although the quarantine is now lifted, authorities are calling for deliveries of medical supplies to treat the infected, and gas to replace contaminated stocks."
if(PIRATES)
newMsg.body = "[pick("Pirates","Criminal elements","A [pick("Syndicate","Donk Co.","Waffle Co.","\'REDACTED\'")] strike force")] have [pick("raided","blockaded","attempted to blackmail","attacked")] [affected_dest.name] today. Security has been tightened, but many valuable minerals were taken."
if(CORPORATE_ATTACK)
newMsg.body = "A small [pick("pirate","Cybersun Industries","Gorlex Marauders","Syndicate")] fleet has precise-jumped into proximity with [affected_dest.name], [pick("for a smash-and-grab operation","in a hit and run attack","in an overt display of hostilities")]. Much damage was done, and security has been tightened since the incident."
if(ALIEN_RAIDERS)
if(prob(20))
newMsg.body = "The Tiger Co-operative have raided [affected_dest.name] today, no doubt on orders from their enigmatic masters. Stealing wildlife, farm animals, medical research materials and kidnapping civilians. NanoTrasen authorities are standing by to counter attempts at bio-terrorism."
else
newMsg.body = "[pick("The alien species designated \'United Exolitics\'","The alien species designated \'REDACTED\'","An unknown alien species")] have raided [affected_dest.name] today, stealing wildlife, farm animals, medical research materials and kidnapping civilians. It seems they desire to learn more about us, so the Navy will be standing by to accomodate them next time they try."
if(AI_LIBERATION)
newMsg.body = "A [pick("\'REDACTED\' was detected on","S.E.L.F operative infiltrated","malignant computer virus was detected on","rogue [pick("slicer","hacker")] was apprehended on")] [affected_dest.name] today, and managed to infect [pick("\'REDACTED\'","a sentient sub-system","a class one AI","a sentient defence installation")] before it could be stopped. Many lives were lost as it systematically begin murdering civilians, and considerable work must be done to repair the affected areas."
if(MOURNING)
newMsg.body = "[pick("The popular","The well-liked","The eminent","The well-known")] [pick("professor","entertainer","singer","researcher","public servant","administrator","ship captain","\'REDACTED\'")], [pick( random_name(pick(MALE,FEMALE)), 40; "\'REDACTED\'" )] has [pick("passed away","committed suicide","been murdered","died in a freakish accident")] on [affected_dest.name] today. The entire planet is in mourning, and prices have dropped for industrial goods as worker morale drops."
if(CULT_CELL_REVEALED)
newMsg.body = "A [pick("dastardly","blood-thirsty","villanous","crazed")] cult of [pick("The Elder Gods","Nar'sie","an apocalyptic sect","\'REDACTED\'")] has [pick("been discovered","been revealed","revealed themselves","gone public")] on [affected_dest.name] earlier today. Public morale has been shaken due to [pick("certain","several","one or two")] [pick("high-profile","well known","popular")] individuals [pick("performing \'REDACTED\'","claiming allegiance to the cult","swearing loyalty to the cult leader","promising to aid to the cult")] before those involved could be brought to justice. The editor reminds all personnel that supernatural myths will not be tolerated on NanoTrasen facilities."
if(SECURITY_BREACH)
newMsg.body = "There was [pick("a security breach in","an unauthorised access in","an attempted theft in","an anarchist attack in","violent sabotage of")] a [pick("high-security","restricted access","classified","\'REDACTED\'")] [pick("\'REDACTED\'","section","zone","area")] this morning. Security was tightened on [affected_dest.name] after the incident, and the editor reassures all NanoTrasen personnel that such lapses are rare."
if(ANIMAL_RIGHTS_RAID)
newMsg.body = "[pick("Militant animal rights activists","Members of the terrorist group Animal Rights Consortium","Members of the terrorist group \'REDACTED\'")] have [pick("launched a campaign of terror","unleashed a swathe of destruction","raided farms and pastures","forced entry to \'REDACTED\'")] on [affected_dest.name] earlier today, freeing numerous [pick("farm animals","animals","\'REDACTED\'")]. Prices for tame and breeding animals have spiked as a result."
if(FESTIVAL)
newMsg.body = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been delcared on [affected_dest.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter")]","coming of age of their [pick("son","daughter")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet."
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == "Tau Ceti Daily")
FC.messages += newMsg
break
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.newsAlert("Tau Ceti Daily")
/datum/event/economic_event/end()
for(var/good_type in dearer_goods)
affected_dest.temp_price_change[good_type] = 1
for(var/good_type in cheaper_goods)
affected_dest.temp_price_change[good_type] = 1
@@ -0,0 +1,85 @@
/datum/trade_destination
var/name = ""
var/description = ""
var/distance = 0
var/list/willing_to_buy = list()
var/list/willing_to_sell = list()
var/can_shuttle_here = 0 //one day crew from the exodus will be able to travel to this destination
var/list/viable_random_events = list()
var/list/temp_price_change[BIOMEDICAL]
//distance is measured in AU and co-relates to travel time
/datum/trade_destination/centcomm
name = "CentComm"
description = "NanoTrasen's administrative centre for Tau Ceti."
distance = 1.2
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(SECURITY_BREACH, CORPORATE_ATTACK, AI_LIBERATION)
/datum/trade_destination/anansi
name = "NSS Anansi"
description = "Medical station ran by Second Red Cross (but owned by NT) for handling emergency cases from nearby colonies."
distance = 1.7
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(SECURITY_BREACH, CULT_CELL_REVEALED, BIOHAZARD_OUTBREAK, PIRATES, ALIEN_RAIDERS)
/datum/trade_destination/icarus
name = "NMV Icarus"
description = "Corvette assigned to patrol NSS Exodus local space."
distance = 0.1
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(SECURITY_BREACH, AI_LIBERATION, PIRATES)
/datum/trade_destination/redolant
name = "OAV Redolant"
description = "Osiris Atmospherics station in orbit around the only gas giant insystem. They retain tight control over shipping rights, and Osiris warships protecting their prize are not an uncommon sight in Tau Ceti."
distance = 0.6
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(INDUSTRIAL_ACCIDENT, PIRATES, CORPORATE_ATTACK)
/datum/trade_destination/beltway
name = "Beltway mining chain"
description = "A co-operative effort between Beltway and NanoTrasen to exploit the rich outer asteroid belt of the Tau Ceti system."
distance = 7.5
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(PIRATES, INDUSTRIAL_ACCIDENT)
/datum/trade_destination/biesel
name = "Biesel"
description = "Large ship yards, strong economy and a stable, well-educated populace, Biesel largely owes allegiance to Sol / Vessel Contracting and begrudgingly tolerates NT. Capital is Lowell City."
distance = 2.3
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(RIOTS, INDUSTRIAL_ACCIDENT, BIOHAZARD_OUTBREAK, CULT_CELL_REVEALED, FESTIVAL, MOURNING)
/datum/trade_destination/new_gibson
name = "New Gibson"
description = "Heavily industrialised rocky planet containing the majority of the planet-bound resources in the system, New Gibson is torn by unrest and has very little wealth to call it's own except in the hands of the corporations who jostle with NT for control."
distance = 6.6
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(RIOTS, INDUSTRIAL_ACCIDENT, BIOHAZARD_OUTBREAK, CULT_CELL_REVEALED, FESTIVAL, MOURNING)
/datum/trade_destination/luthien
name = "Luthien"
description = "A small colony established on a feral, untamed world (largely jungle). Savages and wild beasts attack the outpost regularly, although NT maintains tight military control."
distance = 8.9
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(WILD_ANIMAL_ATTACK, CULT_CELL_REVEALED, FESTIVAL, MOURNING, ANIMAL_RIGHTS_RAID, ALIEN_RAIDERS)
/datum/trade_destination/reade
name = "Reade"
description = "A cold, metal-deficient world, NT maintains large pastures in whatever available space in an attempt to salvage something from this profitless colony."
distance = 7.5
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(WILD_ANIMAL_ATTACK, CULT_CELL_REVEALED, FESTIVAL, MOURNING, ANIMAL_RIGHTS_RAID, ALIEN_RAIDERS)
var/list/tradeable_destinations = typesof(/datum/trade_destination) - /datum/trade_destination
@@ -1,248 +1,248 @@
/mob/living/carbon/amorph/attack_paw(mob/living/carbon/monkey/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
..()
switch(M.a_intent)
if ("help")
help_shake_act(M)
else
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
if (health > 0)
attacked += 10
playsound(loc, 'bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
adjustBruteLoss(rand(0, 1))
updatehealth()
return
/mob/living/carbon/amorph/attack_hand(mob/living/carbon/human/M as mob)
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
Weaken(5)
if (stuttering < 5)
stuttering = 5
Stun(5)
for(var/mob/O in viewers(src, null))
if (O.client)
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2)
return
else
M << "\red Not enough charge! "
return
if (M.a_intent == "help")
help_shake_act(M)
else
if (M.a_intent == "hurt")
var/attack_verb
switch(M.mutantrace)
if("lizard")
attack_verb = "scratch"
if("plant")
attack_verb = "slash"
else
attack_verb = "punch"
if(M.type == /mob/living/carbon/human/tajaran)
attack_verb = "slash"
if ((prob(75) && health > 0))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has [attack_verb]ed [name]!</B>", M), 1)
var/damage = rand(5, 10)
if(M.type != /mob/living/carbon/human/tajaran)
playsound(loc, "punch", 25, 1, -1)
else if(M.type == /mob/living/carbon/human/tajaran)
damage += 10
playsound(loc, 'slice.ogg', 25, 1, -1)
adjustBruteLoss(damage/10)
updatehealth()
else
if(M.type != /mob/living/carbon/human/tajaran)
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
else if(M.type == /mob/living/carbon/human/tajaran)
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to [attack_verb] [name]!</B>", M), 1)
else
if (M.a_intent == "grab")
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
else
if (!( paralysis ))
drop_item()
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
return
/mob/living/carbon/amorph/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
switch(M.a_intent)
if ("help")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if ("hurt")
if ((prob(95) && health > 0))
playsound(loc, 'slice.ogg', 25, 1, -1)
var/damage = rand(15, 30)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
adjustBruteLoss(damage/10)
updatehealth()
react_to_attack(M)
else
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
if ("grab")
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
if ("disarm")
playsound(loc, 'pierce.ogg', 25, 1, -1)
var/damage = 5
if(prob(95))
Weaken(rand(10,15))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
else
drop_item()
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
adjustBruteLoss(damage)
react_to_attack(M)
updatehealth()
return
/mob/living/carbon/amorph/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
bruteloss += damage
/mob/living/carbon/amorph/attack_metroid(mob/living/carbon/metroid/M as mob)
if(M.Victim) return // can't attack while eating!
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
var/damage = rand(1, 3)
if(istype(M, /mob/living/carbon/metroid/adult))
damage = rand(10, 35)
else
damage = rand(5, 25)
src.cloneloss += damage
UpdateDamageIcon()
if(M.powerlevel > 0)
var/stunprob = 10
var/power = M.powerlevel + rand(0,3)
switch(M.powerlevel)
if(1 to 2) stunprob = 20
if(3 to 4) stunprob = 30
if(5 to 6) stunprob = 40
if(7 to 8) stunprob = 60
if(9) stunprob = 70
if(10) stunprob = 95
if(prob(stunprob))
M.powerlevel -= 3
if(M.powerlevel < 0)
M.powerlevel = 0
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
Weaken(power)
if (stuttering < power)
stuttering = power
Stun(power)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (prob(stunprob) && M.powerlevel >= 8)
adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth()
return
/mob/living/carbon/amorph/attack_paw(mob/living/carbon/monkey/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
..()
switch(M.a_intent)
if ("help")
help_shake_act(M)
else
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
if (health > 0)
attacked += 10
playsound(loc, 'bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
adjustBruteLoss(rand(0, 1))
updatehealth()
return
/mob/living/carbon/amorph/attack_hand(mob/living/carbon/human/M as mob)
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
Weaken(5)
if (stuttering < 5)
stuttering = 5
Stun(5)
for(var/mob/O in viewers(src, null))
if (O.client)
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2)
return
else
M << "\red Not enough charge! "
return
if (M.a_intent == "help")
help_shake_act(M)
else
if (M.a_intent == "hurt")
var/attack_verb
switch(M.mutantrace)
if("lizard")
attack_verb = "scratch"
if("plant")
attack_verb = "slash"
else
attack_verb = "punch"
if(M.type == /mob/living/carbon/human/tajaran)
attack_verb = "slash"
if ((prob(75) && health > 0))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has [attack_verb]ed [name]!</B>", M), 1)
var/damage = rand(5, 10)
if(M.type != /mob/living/carbon/human/tajaran)
playsound(loc, "punch", 25, 1, -1)
else if(M.type == /mob/living/carbon/human/tajaran)
damage += 10
playsound(loc, 'slice.ogg', 25, 1, -1)
adjustBruteLoss(damage/10)
updatehealth()
else
if(M.type != /mob/living/carbon/human/tajaran)
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
else if(M.type == /mob/living/carbon/human/tajaran)
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to [attack_verb] [name]!</B>", M), 1)
else
if (M.a_intent == "grab")
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
else
if (!( paralysis ))
drop_item()
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
return
/mob/living/carbon/amorph/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
switch(M.a_intent)
if ("help")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if ("hurt")
if ((prob(95) && health > 0))
playsound(loc, 'slice.ogg', 25, 1, -1)
var/damage = rand(15, 30)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
adjustBruteLoss(damage/10)
updatehealth()
react_to_attack(M)
else
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
if ("grab")
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
if ("disarm")
playsound(loc, 'pierce.ogg', 25, 1, -1)
var/damage = 5
if(prob(95))
Weaken(rand(10,15))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
else
drop_item()
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
adjustBruteLoss(damage)
react_to_attack(M)
updatehealth()
return
/mob/living/carbon/amorph/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
bruteloss += damage
/mob/living/carbon/amorph/attack_metroid(mob/living/carbon/metroid/M as mob)
if(M.Victim) return // can't attack while eating!
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
var/damage = rand(1, 3)
if(istype(M, /mob/living/carbon/metroid/adult))
damage = rand(10, 35)
else
damage = rand(5, 25)
src.cloneloss += damage
UpdateDamageIcon()
if(M.powerlevel > 0)
var/stunprob = 10
var/power = M.powerlevel + rand(0,3)
switch(M.powerlevel)
if(1 to 2) stunprob = 20
if(3 to 4) stunprob = 30
if(5 to 6) stunprob = 40
if(7 to 8) stunprob = 60
if(9) stunprob = 70
if(10) stunprob = 95
if(prob(stunprob))
M.powerlevel -= 3
if(M.powerlevel < 0)
M.powerlevel = 0
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
Weaken(power)
if (stuttering < power)
stuttering = power
Stun(power)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (prob(stunprob) && M.powerlevel >= 8)
adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth()
return
@@ -1,12 +1,12 @@
/mob/living/carbon/amorph/proc/HealDamage(zone, brute, burn)
return heal_overall_damage(brute, burn)
/mob/living/carbon/amorph/UpdateDamageIcon()
// no damage sprites for amorphs yet
return
/mob/living/carbon/amorph/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
if(damagetype == BRUTE)
take_overall_damage(damage, 0)
else
/mob/living/carbon/amorph/proc/HealDamage(zone, brute, burn)
return heal_overall_damage(brute, burn)
/mob/living/carbon/amorph/UpdateDamageIcon()
// no damage sprites for amorphs yet
return
/mob/living/carbon/amorph/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
if(damagetype == BRUTE)
take_overall_damage(damage, 0)
else
take_overall_damage(0, damage)
@@ -1,300 +1,300 @@
/obj/hud/proc/amorph_hud(var/ui_style='screen1_old.dmi')
src.adding = list( )
src.other = list( )
src.intents = list( )
src.mon_blo = list( )
src.m_ints = list( )
src.mov_int = list( )
src.vimpaired = list( )
src.darkMask = list( )
src.intent_small_hud_objects = list( )
src.g_dither = new /obj/screen( src )
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.g_dither.name = "Mask"
src.g_dither.icon = ui_style
src.g_dither.icon_state = "dither12g"
src.g_dither.layer = 18
src.g_dither.mouse_opacity = 0
src.alien_view = new /obj/screen(src)
src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.alien_view.name = "Alien"
src.alien_view.icon = ui_style
src.alien_view.icon_state = "alien"
src.alien_view.layer = 18
src.alien_view.mouse_opacity = 0
src.blurry = new /obj/screen( src )
src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.blurry.name = "Blurry"
src.blurry.icon = ui_style
src.blurry.icon_state = "blurry"
src.blurry.layer = 17
src.blurry.mouse_opacity = 0
src.druggy = new /obj/screen( src )
src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.druggy.name = "Druggy"
src.druggy.icon = ui_style
src.druggy.icon_state = "druggy"
src.druggy.layer = 17
src.druggy.mouse_opacity = 0
var/obj/screen/using
using = new /obj/screen( src )
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
//intent small hud objects
var/icon/ico
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
help_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
disarm_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
grab_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
hurt_intent = using
//end intent small hud objects
using = new /obj/screen( src )
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
move_intent = using
using = new /obj/screen( src )
using.name = "drop"
using.icon = ui_style
using.icon_state = "act_drop"
using.screen_loc = ui_dropbutton
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "r_hand"
using.dir = WEST
using.icon = ui_style
using.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
using.icon_state = "hand_active"
using.screen_loc = ui_rhand
using.layer = 19
src.r_hand_hud_object = using
src.adding += using
using = new /obj/screen( src )
using.name = "l_hand"
using.dir = EAST
using.icon = ui_style
using.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
using.icon_state = "hand_active"
using.screen_loc = ui_lhand
using.layer = 19
src.l_hand_hud_object = using
src.adding += using
using = new /obj/screen( src )
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "mask"
using.dir = NORTH
using.icon = ui_style
using.icon_state = "equip"
using.screen_loc = ui_monkey_mask
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "back"
using.dir = NORTHEAST
using.icon = ui_style
using.icon_state = "equip"
using.screen_loc = ui_back
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "1,1 to 5,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "5,1 to 10,5"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "6,11 to 10,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "11,1 to 15,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
mymob.throw_icon = new /obj/screen(null)
mymob.throw_icon.icon = ui_style
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_throw
mymob.oxygen = new /obj/screen( null )
mymob.oxygen.icon = ui_style
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.pressure = new /obj/screen( null )
mymob.pressure.icon = ui_style
mymob.pressure.icon_state = "pressure0"
mymob.pressure.name = "pressure"
mymob.pressure.screen_loc = ui_pressure
mymob.toxin = new /obj/screen( null )
mymob.toxin.icon = ui_style
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.internals = new /obj/screen( null )
mymob.internals.icon = ui_style
mymob.internals.icon_state = "internal0"
mymob.internals.name = "internal"
mymob.internals.screen_loc = ui_internal
mymob.fire = new /obj/screen( null )
mymob.fire.icon = ui_style
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.bodytemp = new /obj/screen( null )
mymob.bodytemp.icon = ui_style
mymob.bodytemp.icon_state = "temp1"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.healths = new /obj/screen( null )
mymob.healths.icon = ui_style
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.pullin = new /obj/screen( null )
mymob.pullin.icon = ui_style
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull
mymob.blind = new /obj/screen( null )
mymob.blind.icon = ui_style
mymob.blind.icon_state = "blackanimate"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1 to 15,15"
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
mymob.flash = new /obj/screen( null )
mymob.flash.icon = ui_style
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel( null )
mymob.zone_sel.overlays = null
mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
mymob.client.screen = null
//, mymob.i_select, mymob.m_select
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach, mymob.hands, )
mymob.client.screen += src.adding + src.other
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
return
/obj/hud/proc/amorph_hud(var/ui_style='screen1_old.dmi')
src.adding = list( )
src.other = list( )
src.intents = list( )
src.mon_blo = list( )
src.m_ints = list( )
src.mov_int = list( )
src.vimpaired = list( )
src.darkMask = list( )
src.intent_small_hud_objects = list( )
src.g_dither = new /obj/screen( src )
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.g_dither.name = "Mask"
src.g_dither.icon = ui_style
src.g_dither.icon_state = "dither12g"
src.g_dither.layer = 18
src.g_dither.mouse_opacity = 0
src.alien_view = new /obj/screen(src)
src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.alien_view.name = "Alien"
src.alien_view.icon = ui_style
src.alien_view.icon_state = "alien"
src.alien_view.layer = 18
src.alien_view.mouse_opacity = 0
src.blurry = new /obj/screen( src )
src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.blurry.name = "Blurry"
src.blurry.icon = ui_style
src.blurry.icon_state = "blurry"
src.blurry.layer = 17
src.blurry.mouse_opacity = 0
src.druggy = new /obj/screen( src )
src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.druggy.name = "Druggy"
src.druggy.icon = ui_style
src.druggy.icon_state = "druggy"
src.druggy.layer = 17
src.druggy.mouse_opacity = 0
var/obj/screen/using
using = new /obj/screen( src )
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
//intent small hud objects
var/icon/ico
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
help_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
disarm_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
grab_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
hurt_intent = using
//end intent small hud objects
using = new /obj/screen( src )
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
move_intent = using
using = new /obj/screen( src )
using.name = "drop"
using.icon = ui_style
using.icon_state = "act_drop"
using.screen_loc = ui_dropbutton
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "r_hand"
using.dir = WEST
using.icon = ui_style
using.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
using.icon_state = "hand_active"
using.screen_loc = ui_rhand
using.layer = 19
src.r_hand_hud_object = using
src.adding += using
using = new /obj/screen( src )
using.name = "l_hand"
using.dir = EAST
using.icon = ui_style
using.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
using.icon_state = "hand_active"
using.screen_loc = ui_lhand
using.layer = 19
src.l_hand_hud_object = using
src.adding += using
using = new /obj/screen( src )
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "mask"
using.dir = NORTH
using.icon = ui_style
using.icon_state = "equip"
using.screen_loc = ui_monkey_mask
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "back"
using.dir = NORTHEAST
using.icon = ui_style
using.icon_state = "equip"
using.screen_loc = ui_back
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "1,1 to 5,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "5,1 to 10,5"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "6,11 to 10,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "11,1 to 15,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
mymob.throw_icon = new /obj/screen(null)
mymob.throw_icon.icon = ui_style
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_throw
mymob.oxygen = new /obj/screen( null )
mymob.oxygen.icon = ui_style
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.pressure = new /obj/screen( null )
mymob.pressure.icon = ui_style
mymob.pressure.icon_state = "pressure0"
mymob.pressure.name = "pressure"
mymob.pressure.screen_loc = ui_pressure
mymob.toxin = new /obj/screen( null )
mymob.toxin.icon = ui_style
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.internals = new /obj/screen( null )
mymob.internals.icon = ui_style
mymob.internals.icon_state = "internal0"
mymob.internals.name = "internal"
mymob.internals.screen_loc = ui_internal
mymob.fire = new /obj/screen( null )
mymob.fire.icon = ui_style
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.bodytemp = new /obj/screen( null )
mymob.bodytemp.icon = ui_style
mymob.bodytemp.icon_state = "temp1"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.healths = new /obj/screen( null )
mymob.healths.icon = ui_style
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.pullin = new /obj/screen( null )
mymob.pullin.icon = ui_style
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull
mymob.blind = new /obj/screen( null )
mymob.blind.icon = ui_style
mymob.blind.icon_state = "blackanimate"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1 to 15,15"
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
mymob.flash = new /obj/screen( null )
mymob.flash.icon = ui_style
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel( null )
mymob.zone_sel.overlays = null
mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
mymob.client.screen = null
//, mymob.i_select, mymob.m_select
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach, mymob.hands, )
mymob.client.screen += src.adding + src.other
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
return
@@ -1,6 +1,6 @@
/mob/living/carbon/amorph/emote(var/act,var/m_type=1,var/message = null)
if(act == "me")
return custom_emote(m_type, message)
/mob/living/carbon/amorph/say_quote(var/text)
return "[src.say_message], \"[text]\"";
/mob/living/carbon/amorph/emote(var/act,var/m_type=1,var/message = null)
if(act == "me")
return custom_emote(m_type, message)
/mob/living/carbon/amorph/say_quote(var/text)
return "[src.say_message], \"[text]\"";
+332 -53
View File
@@ -7,6 +7,11 @@ log transactions
*/
#define NO_SCREEN 0
#define CHANGE_SECURITY_LEVEL 1
#define TRANSFER_FUNDS 2
#define VIEW_TRANSACTION_LOGS 3
/obj/item/weapon/card/id/var/money = 2000
/obj/machinery/atm
@@ -17,72 +22,346 @@ log transactions
anchored = 1
use_power = 1
idle_power_usage = 10
var/obj/machinery/account_database/linked_db
var/datum/money_account/authenticated_account
var/number_incorrect_tries = 0
var/previous_account_number = 0
var/max_pin_attempts = 3
var/ticks_left_locked_down = 0
var/ticks_left_timeout = 0
var/machine_id = ""
var/obj/item/weapon/card/held_card
var/editing_security_level = 0
var/view_screen = NO_SCREEN
/obj/machinery/atm/New()
..()
reconnect_database()
machine_id = "[station_name()] RT #[num_financial_terminals++]"
/obj/machinery/atm/process()
if(ticks_left_timeout > 0)
ticks_left_timeout--
if(ticks_left_timeout <= 0)
authenticated_account = null
if(ticks_left_locked_down > 0)
ticks_left_locked_down--
for(var/obj/item/weapon/spacecash/S in src)
S.loc = src.loc
if(prob(50))
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
else
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
break
/obj/machinery/atm/proc/reconnect_database()
for(var/obj/machinery/account_database/DB in world)
if(DB.z == src.z)
linked_db = DB
break
/obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob)
if(ishuman(user))
var/obj/item/weapon/card/id/user_id = src.scan_user(user)
if(istype(I, /obj/item/weapon/card))
var/obj/item/weapon/card/id/idcard = I
if(!held_card)
usr.drop_item()
idcard.loc = src
held_card = idcard
authenticated_account = null
else if(authenticated_account)
if(istype(I,/obj/item/weapon/spacecash))
user_id.money += I:worth
//consume the money
authenticated_account.money += I:worth
if(prob(50))
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
else
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
//create a transaction log entry
var/datum/transaction/T = new()
T.target_name = authenticated_account.owner_name
T.purpose = "Credit deposit"
T.amount = I:worth
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
authenticated_account.transaction_log.Add(T)
user << "<span class='info'>You insert [I] into [src].</span>"
src.attack_hand(user)
del I
else ..()
/obj/machinery/atm/attack_hand(mob/user as mob)
if(istype(user, /mob/living/silicon))
user << "\red Artificial unit recognized. Artificial units do not currently receive monetary compensation, as per NanoTrasen regulation #1005."
return
if(get_dist(src,user) <= 1)
//check to see if the user has low security enabled
scan_user(user)
var/obj/item/weapon/card/id/user_id = src.scan_user(user)
if(..())
return
var/dat = ""
dat += "<h1>NanoTrasen Automatic Teller Machine</h1><br/>"
dat += "For all your monetary needs!<br/><br/>"
dat += "Welcome, [user_id.registered_name].<br/>"
dat += "You have $[user_id.money] in your account.<br/>"
dat += "<a href=\"?src=\ref[src]&withdraw=1&id=\ref[user_id]\">Withdraw</a><br/>"
user << browse(dat,"window=atm")
//js replicated from obj/machinery/computer/card
var/dat = "<h1>NanoTrasen Automatic Teller Machine</h1>"
dat += "For all your monetary needs!<br>"
dat += "<i>This terminal is</i> [machine_id]. <i>Report this code when contacting NanoTrasen IT Support</i><br/>"
dat += "Card: <a href='?src=\ref[src];choice=insert_card'>[held_card ? held_card.name : "------"]</a><br><br>"
if(ticks_left_locked_down > 0)
dat += "<span class='alert'>Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled.</span>"
else if(authenticated_account)
switch(view_screen)
if(CHANGE_SECURITY_LEVEL)
dat += "Select a new security level for this account:<br><hr>"
var/text = "Zero - Only account number or card is required to access this account. EFTPOS transactions will require a card and ask for a pin, but not verify the pin is correct."
if(authenticated_account.security_level != 0)
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=0'>[text]</a>"
dat += "[text]<hr>"
text = "One - Both an account number and pin is required to access this account and process transactions."
if(authenticated_account.security_level != 1)
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=1'>[text]</a>"
dat += "[text]<hr>"
text = "Two - In addition to account number and pin, a card is required to access this account and process transactions."
if(authenticated_account.security_level != 2)
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=2'>[text]</a>"
dat += "[text]<hr><br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=0'>Back</a>"
if(VIEW_TRANSACTION_LOGS)
dat += "<b>Transaction logs</b><br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=0'>Back</a>"
dat += "<table border=1 style='width:100%'>"
dat += "<tr>"
dat += "<td><b>Date</b></td>"
dat += "<td><b>Time</b></td>"
dat += "<td><b>Target</b></td>"
dat += "<td><b>Purpose</b></td>"
dat += "<td><b>Value</b></td>"
dat += "<td><b>Source terminal ID</b></td>"
dat += "</tr>"
for(var/datum/transaction/T in authenticated_account.transaction_log)
dat += "<tr>"
dat += "<td>[T.date]</td>"
dat += "<td>[T.time]</td>"
dat += "<td>[T.target_name]</td>"
dat += "<td>[T.purpose]</td>"
dat += "<td>$[T.amount]</td>"
dat += "<td>[T.source_terminal]</td>"
dat += "</tr>"
dat += "</table>"
if(TRANSFER_FUNDS)
dat += "<b>Account balance:</b> $[authenticated_account.money]<br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=0'>Back</a><br><br>"
dat += "<form name='transfer' action='?src=\ref[src]' method='get'>"
dat += "<input type='hidden' name='src' value='\ref[src]'>"
dat += "<input type='hidden' name='choice' value='transfer'>"
dat += "Target account number: <input type='text' name='target_acc_number' value='' style='width:200px; background-color:white;'><br>"
dat += "Funds to transfer: <input type='text' name='funds_amount' value='' style='width:200px; background-color:white;'><br>"
dat += "Transaction purpose: <input type='text' name='purpose' value='Funds transfer' style='width:200px; background-color:white;'><br>"
dat += "<input type='submit' value='Transfer funds'><br>"
dat += "</form>"
else
dat += "Welcome, <b>[authenticated_account.owner_name].</b><br/>"
dat += "<b>Account balance:</b> $[authenticated_account.money]"
dat += "<form name='withdrawal' action='?src=\ref[src]' method='get'>"
dat += "<input type='hidden' name='src' value='\ref[src]'>"
dat += "<input type='hidden' name='choice' value='withdrawal'>"
dat += "<input type='text' name='funds_amount' value='' style='width:200px; background-color:white;'><input type='submit' value='Withdraw funds'><br>"
dat += "</form>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=1'>Change account security level</a><br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=2'>Make transfer</a><br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=3'>View transaction log</a><br>"
dat += "<A href='?src=\ref[src];choice=balance_statement'>Print balance statement</a><br>"
dat += "<A href='?src=\ref[src];choice=logout'>Logout</a><br>"
else if(linked_db)
dat += "<form name='atm_auth' action='?src=\ref[src]' method='get'>"
dat += "<input type='hidden' name='src' value='\ref[src]'>"
dat += "<input type='hidden' name='choice' value='attempt_auth'>"
dat += "<b>Account:</b> <input type='text' id='account_num' name='account_num' style='width:250px; background-color:white;'><br>"
dat += "<b>PIN:</b> <input type='text' id='account_pin' name='account_pin' style='width:250px; background-color:white;'><br>"
dat += "<input type='submit' value='Submit'><br>"
dat += "</form>"
else
dat += "<span class='warning'>Unable to connect to accounts database, please retry and if the issue persists contact NanoTrasen IT support.</span>"
reconnect_database()
user << browse(dat,"window=atm;size=500x650")
else
user << browse(null,"window=atm")
/obj/machinery/atm/Topic(var/href, var/href_list)
if(href_list["withdraw"] && href_list["id"])
var/amount = input("How much would you like to withdraw?", "Amount", 0) in list(1,10,20,50,100,200,500,1000, 0)
var/obj/item/weapon/card/id/user_id = locate(href_list["id"])
if(amount != 0 && user_id)
if(amount <= user_id.money)
user_id.money -= amount
//hueg switch for giving moneh out
switch(amount)
if(1)
new /obj/item/weapon/spacecash(loc)
if(10)
new /obj/item/weapon/spacecash/c10(loc)
if(20)
new /obj/item/weapon/spacecash/c20(loc)
if(50)
new /obj/item/weapon/spacecash/c50(loc)
if(100)
new /obj/item/weapon/spacecash/c100(loc)
if(200)
new /obj/item/weapon/spacecash/c200(loc)
if(500)
new /obj/item/weapon/spacecash/c500(loc)
if(1000)
new /obj/item/weapon/spacecash/c1000(loc)
else
usr << browse("You don't have that much money!<br/><a href=\"?src=\ref[src]\">Back</a>","window=atm")
return
if(href_list["choice"])
switch(href_list["choice"])
if("transfer")
if(authenticated_account && linked_db)
var/target_account_number = text2num(href_list["target_acc_number"])
var/transfer_amount = text2num(href_list["funds_amount"])
var/transfer_purpose = href_list["purpose"]
if(transfer_amount <= authenticated_account.money)
if(linked_db.charge_to_account(target_account_number, authenticated_account.owner_name, transfer_purpose, machine_id, transfer_amount))
usr << "\icon[src]<span class='info'>Funds transfer successful.</span>"
authenticated_account.money -= transfer_amount
//create an entry in the account transaction log
var/datum/transaction/T = new()
T.target_name = "Account #[target_account_number]"
T.purpose = transfer_purpose
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.amount = "([transfer_amount])"
authenticated_account.transaction_log.Add(T)
else
usr << "\icon[src]<span class='warning'>Funds transfer failed.</span>"
else
usr << "\icon[src]<span class='warning'>You don't have enough funds to do that!</span>"
if("view_screen")
view_screen = text2num(href_list["view_screen"])
if("change_security_level")
if(authenticated_account)
var/new_sec_level = max( min(text2num(href_list["new_security_level"]), 2), 0)
authenticated_account.security_level = new_sec_level
if("attempt_auth")
if(linked_db)
var/tried_account_num = text2num(href_list["account_num"])
if(!tried_account_num)
tried_account_num = held_card.associated_account_number
var/tried_pin = text2num(href_list["account_pin"])
authenticated_account = linked_db.attempt_account_access(tried_account_num, tried_pin, held_card && held_card.associated_account_number == tried_account_num ? 2 : 1)
if(!authenticated_account)
if(previous_account_number == tried_account_num)
if(++number_incorrect_tries > max_pin_attempts)
//lock down the atm
number_incorrect_tries = 0
ticks_left_locked_down = 10
playsound(src, 'buzz-two.ogg', 50, 1)
//create an entry in the account transaction log
var/datum/transaction/T = new()
T.target_name = authenticated_account.owner_name
T.purpose = "Unauthorised login attempt"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
authenticated_account.transaction_log.Add(T)
else
previous_account_number = tried_account_num
number_incorrect_tries = 1
playsound(src, 'buzz-sigh.ogg', 50, 1)
else
playsound(src, 'twobeep.ogg', 50, 1)
ticks_left_timeout = 120
view_screen = NO_SCREEN
//create a transaction log entry
var/datum/transaction/T = new()
T.target_name = authenticated_account.owner_name
T.purpose = "Remote terminal access"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
authenticated_account.transaction_log.Add(T)
if("withdrawal")
var/amount = max(text2num(href_list["funds_amount"]),0)
if(authenticated_account && amount > 0)
if(amount <= authenticated_account.money)
playsound(src, 'chime.ogg', 50, 1)
//remove the money
authenticated_account.money -= amount
withdraw_arbitrary_sum(amount)
//create an entry in the account transaction log
var/datum/transaction/T = new()
T.target_name = authenticated_account.owner_name
T.purpose = "Credit withdrawal"
T.amount = "([amount])"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
authenticated_account.transaction_log.Add(T)
else
usr << "\icon[src]<span class='warning'>You don't have enough funds to do that!</span>"
if("balance_statement")
if(authenticated_account)
var/obj/item/weapon/paper/R = new(src.loc)
R.name = "Account balance: [authenticated_account.owner_name]"
R.info = "<b>NT Automated Teller Account Statement</b><br><br>"
R.info += "<i>Account holder:</i> [authenticated_account.owner_name]<br>"
R.info += "<i>Account number:</i> [authenticated_account.account_number]<br>"
R.info += "<i>Balance:</i> $[authenticated_account.money]<br>"
R.info += "<i>Date and time:</i> [worldtime2text()], [current_date_string]<br><br>"
R.info += "<i>Service terminal ID:</i> [machine_id]<br>"
//stamp the paper
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
stampoverlay.icon_state = "paper_stamp-cent"
if(!R.stamped)
R.stamped = new
R.stamped += /obj/item/weapon/stamp
R.overlays += stampoverlay
R.stamps += "<HR><i>This paper has been stamped by the Automatic Teller Machine.</i>"
if(prob(50))
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
else
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
if("insert_card")
if(held_card)
held_card.loc = src.loc
authenticated_account = null
if(ishuman(usr) && !usr.get_active_hand())
usr.put_in_hands(held_card)
held_card = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
I.loc = src
held_card = I
if("logout")
authenticated_account = null
src.attack_hand(usr)
//create the most effective combination of notes to make up the requested amount
/obj/machinery/atm/proc/withdraw_arbitrary_sum(var/arbitrary_sum)
while(arbitrary_sum >= 1000)
arbitrary_sum -= 1000
new /obj/item/weapon/spacecash/c1000(src)
while(arbitrary_sum >= 500)
arbitrary_sum -= 500
new /obj/item/weapon/spacecash/c500(src)
while(arbitrary_sum >= 200)
arbitrary_sum -= 200
new /obj/item/weapon/spacecash/c200(src)
while(arbitrary_sum >= 100)
arbitrary_sum -= 100
new /obj/item/weapon/spacecash/c100(src)
while(arbitrary_sum >= 50)
arbitrary_sum -= 50
new /obj/item/weapon/spacecash/c50(src)
while(arbitrary_sum >= 20)
arbitrary_sum -= 20
new /obj/item/weapon/spacecash/c20(src)
while(arbitrary_sum >= 10)
arbitrary_sum -= 10
new /obj/item/weapon/spacecash/c10(src)
while(arbitrary_sum >= 1)
arbitrary_sum -= 1
new /obj/item/weapon/spacecash(src)
//stolen wholesale and then edited a bit from newscasters, which are awesome and by Agouri
/obj/machinery/atm/proc/scan_user(mob/living/carbon/human/human_user as mob)
if(human_user.wear_id)
if(istype(human_user.wear_id, /obj/item/device/pda) )
var/obj/item/device/pda/P = human_user.wear_id
if(P.id)
return P.id
else
return null
else if(istype(human_user.wear_id, /obj/item/weapon/card/id) )
return human_user.wear_id
else
return null
else
return null
if(!authenticated_account && linked_db)
if(human_user.wear_id)
var/obj/item/weapon/card/id/I
if(istype(human_user.wear_id, /obj/item/weapon/card/id) )
I = human_user.wear_id
else if(istype(human_user.wear_id, /obj/item/device/pda) )
var/obj/item/device/pda/P = human_user.wear_id
I = P.id
if(I)
authenticated_account = linked_db.attempt_account_access(I.associated_account_number)
+2 -4
View File
@@ -82,10 +82,6 @@
usr << "No."
return
if(wdata.len == 0 && chemtraces.len == 0)
usr << "<b>* There is no data about any wounds in the scanner's database. You may have to scan more bodyparts, or otherwise this wound type may not be in the scanner's database."
return
var/scan_data = ""
if(timeofdeath)
@@ -187,6 +183,8 @@
if(target_name != M.name)
target_name = M.name
src.wdata = list()
src.chemtraces = list()
src.timeofdeath = null
user << "\red A new patient has been registered.. Purging data for previous patient."
src.timeofdeath = M.timeofdeath
-246
View File
@@ -1,246 +0,0 @@
dmm_suite
/*
dmm_suite version 1.0
Released January 30th, 2011.
defines the object /dmm_suite
- Provides the proc load_map()
- Loads the specified map file onto the specified z-level.
- provides the proc write_map()
- Returns a text string of the map in dmm format
ready for output to a file.
- provides the proc save_map()
- Returns a .dmm file if map is saved
- Returns FALSE if map fails to save
The dmm_suite provides saving and loading of map files in BYOND's native DMM map
format. It approximates the map saving and loading processes of the Dream Maker
and Dream Seeker programs so as to allow editing, saving, and loading of maps at
runtime.
------------------------
To save a map at runtime, create an instance of /dmm_suite, and then call
write_map(), which accepts three arguments:
- A turf representing one corner of a three dimensional grid (Required).
- Another turf representing the other corner of the same grid (Required).
- Any, or a combination, of several bit flags (Optional, see documentation).
The order in which the turfs are supplied does not matter, the /dmm_writer will
determine the grid containing both, in much the same way as DM's block() function.
write_map() will then return a string representing the saved map in dmm format;
this string can then be saved to a file, or used for any other purose.
------------------------
To load a map at runtime, create an instance of /dmm_suite, and then call load_map(),
which accepts two arguments:
- A .dmm file to load (Required).
- A number representing the z-level on which to start loading the map (Optional).
The /dmm_suite will load the map file starting on the specified z-level. If no
z-level was specified, world.maxz will be increased so as to fit the map. Note
that if you wish to load a map onto a z-level that already has objects on it,
you will have to handle the removal of those objects. Otherwise the new map will
simply load the new objects on top of the old ones.
Also note that all type paths specified in the .dmm file must exist in the world's
code, and that the /dmm_reader trusts that files to be loaded are in fact valid
.dmm files. Errors in the .dmm format will cause runtime errors.
*/
verb/load_map(var/dmm_file as file, var/z_offset as num)
// dmm_file: A .dmm file to load (Required).
// z_offset: A number representing the z-level on which to start loading the map (Optional).
verb/write_map(var/turf/t1 as turf, var/turf/t2 as turf, var/flags as num)
// t1: A turf representing one corner of a three dimensional grid (Required).
// t2: Another turf representing the other corner of the same grid (Required).
// flags: Any, or a combination, of several bit flags (Optional, see documentation).
// save_map is included as a legacy proc. Use write_map instead.
verb/save_map(var/turf/t1 as turf, var/turf/t2 as turf, var/map_name as text, var/flags as num)
// t1: A turf representing one corner of a three dimensional grid (Required).
// t2: Another turf representing the other corner of the same grid (Required).
// map_name: A valid name for the map to be saved, such as "castle" (Required).
// flags: Any, or a combination, of several bit flags (Optional, see documentation).
#define DMM_IGNORE_AREAS 1
#define DMM_IGNORE_TURFS 2
#define DMM_IGNORE_OBJS 4
#define DMM_IGNORE_NPCS 8
#define DMM_IGNORE_PLAYERS 16
#define DMM_IGNORE_MOBS 24
dmm_suite{
var{
quote = "\""
list/letter_digits = list(
"a","b","c","d","e",
"f","g","h","i","j",
"k","l","m","n","o",
"p","q","r","s","t",
"u","v","w","x","y",
"z",
"A","B","C","D","E",
"F","G","H","I","J",
"K","L","M","N","O",
"P","Q","R","S","T",
"U","V","W","X","Y",
"Z"
)
}
save_map(var/turf/t1 as turf, var/turf/t2 as turf, var/map_name as text, var/flags as num){
//Check for illegal characters in file name... in a cheap way.
if(!((ckeyEx(map_name)==map_name) && ckeyEx(map_name))){
CRASH("Invalid text supplied to proc save_map, invalid characters or empty string.")
}
//Check for valid turfs.
if(!isturf(t1) || !isturf(t2)){
CRASH("Invalid arguments supplied to proc save_map, arguments were not turfs.")
}
var/file_text = write_map(t1,t2,flags)
if(fexists("[map_name].dmm")){
fdel("[map_name].dmm")
}
var/saved_map = file("[map_name].dmm")
saved_map << file_text
return saved_map
}
write_map(var/turf/t1 as turf, var/turf/t2 as turf, var/flags as num){
//Check for valid turfs.
if(!isturf(t1) || !isturf(t2)){
CRASH("Invalid arguments supplied to proc write_map, arguments were not turfs.")
}
var/turf/nw = locate(min(t1.x,t2.x),max(t1.y,t2.y),min(t1.z,t2.z))
var/turf/se = locate(max(t1.x,t2.x),min(t1.y,t2.y),max(t1.z,t2.z))
var/list/templates[0]
var/template_buffer = {""}
var/dmm_text = {""}
for(var/pos_z=nw.z;pos_z<=se.z;pos_z++){
for(var/pos_y=nw.y;pos_y>=se.y;pos_y--){
for(var/pos_x=nw.x;pos_x<=se.x;pos_x++){
var/turf/test_turf = locate(pos_x,pos_y,pos_z)
var/test_template = make_template(test_turf, flags)
var/template_number = templates.Find(test_template)
if(!template_number){
templates.Add(test_template)
template_number = templates.len
}
template_buffer += "[template_number],"
}
template_buffer += ";"
}
template_buffer += "."
}
var/key_length = round/*floor*/(log(letter_digits.len,templates.len-1)+1)
var/list/keys[templates.len]
for(var/key_pos=1;key_pos<=templates.len;key_pos++){
keys[key_pos] = get_model_key(key_pos,key_length)
dmm_text += {""[keys[key_pos]]" = ([templates[key_pos]])\n"}
}
var/z_level = 0
for(var/z_pos=1;TRUE;z_pos=findtext(template_buffer,".",z_pos)+1){
if(z_pos>=length(template_buffer)){break}
if(z_level){dmm_text+={"\n"}}
dmm_text += {"\n(1,1,[++z_level]) = {"\n"}
var/z_block = copytext(template_buffer,z_pos,findtext(template_buffer,".",z_pos))
for(var/y_pos=1;TRUE;y_pos=findtext(z_block,";",y_pos)+1){
if(y_pos>=length(z_block)){break}
var/y_block = copytext(z_block,y_pos,findtext(z_block,";",y_pos))
for(var/x_pos=1;TRUE;x_pos=findtext(y_block,",",x_pos)+1){
if(x_pos>=length(y_block)){break}
var/x_block = copytext(y_block,x_pos,findtext(y_block,",",x_pos))
var/key_number = text2num(x_block)
var/temp_key = keys[key_number]
dmm_text += temp_key
sleep(-1)
}
dmm_text += {"\n"}
sleep(-1)
}
dmm_text += {"\"}"}
sleep(-1)
}
return dmm_text
}
proc{
make_template(var/turf/model as turf, var/flags as num){
var/template = ""
var/obj_template = ""
var/mob_template = ""
var/turf_template = ""
if(!(flags & DMM_IGNORE_TURFS)){
turf_template = "[model.type][check_attributes(model)],"
} else{ turf_template = "[world.turf],"}
var/area_template = ""
if(!(flags & DMM_IGNORE_OBJS)){
for(var/obj/O in model.contents){
obj_template += "[O.type][check_attributes(O)],"
}
}
for(var/mob/M in model.contents){
if(M.client){
if(!(flags & DMM_IGNORE_PLAYERS)){
mob_template += "[M.type][check_attributes(M)],"
}
}
else{
if(!(flags & DMM_IGNORE_NPCS)){
mob_template += "[M.type][check_attributes(M)],"
}
}
}
if(!(flags & DMM_IGNORE_AREAS)){
var/area/m_area = model.loc
area_template = "[m_area.type][check_attributes(m_area)]"
} else{ area_template = "[world.area]"}
template = "[obj_template][mob_template][turf_template][area_template]"
return template
}
check_attributes(var/atom/A){
var/attributes_text = {"{"}
for(var/V in A.vars){
sleep(-1)
if((!issaved(A.vars[V])) || (A.vars[V]==initial(A.vars[V]))){continue}
if(istext(A.vars[V])){
attributes_text += {"[V] = "[A.vars[V]]""}
}
else if(isnum(A.vars[V])||ispath(A.vars[V])){
attributes_text += {"[V] = [A.vars[V]]"}
}
else if(isicon(A.vars[V])||isfile(A.vars[V])){
attributes_text += {"[V] = '[A.vars[V]]'"}
}
else{
continue
}
if(attributes_text != {"{"}){
attributes_text+={"; "}
}
}
if(attributes_text=={"{"}){
return
}
if(copytext(attributes_text, length(attributes_text)-1, 0) == {"; "}){
attributes_text = copytext(attributes_text, 1, length(attributes_text)-1)
}
attributes_text += {"}"}
return attributes_text
}
get_model_key(var/which as num, var/key_length as num){
var/key = ""
var/working_digit = which-1
for(var/digit_pos=key_length;digit_pos>=1;digit_pos--){
var/place_value = round/*floor*/(working_digit/(letter_digits.len**(digit_pos-1)))
working_digit-=place_value*(letter_digits.len**(digit_pos-1))
key = "[key][letter_digits[place_value+1]]"
}
return key
}
}
}
-181
View File
@@ -1,181 +0,0 @@
dmm_suite/load_map(var/dmm_file as file, var/z_offset as num)
if(!z_offset)
z_offset = world.maxz+1
var/quote = ascii2text(34)
var/tfile = file2text(dmm_file)
var/tfile_len = length(tfile)
var/list/grid_models[0]
var/key_len = length(copytext(tfile,2,findtext(tfile,quote,2,0)))
for(var/lpos=1;lpos<tfile_len;lpos=findtext(tfile,"\n",lpos,0)+1)
var/tline = copytext(tfile,lpos,findtext(tfile,"\n",lpos,0))
if(copytext(tline,1,2)!=quote) break
var/model_key = copytext(tline,2,findtext(tfile,quote,2,0))
var/model_contents = copytext(tline,findtext(tfile,"=")+3,length(tline))
grid_models[model_key] = model_contents
sleep(-1)
var/zcrd=-1
var/ycrd=0
var/xcrd=0
for(var/zpos=findtext(tfile,"\n(1,1,");TRUE;zpos=findtext(tfile,"\n(1,1,",zpos+1,0))
zcrd++
world.maxz = max(world.maxz, zcrd+z_offset)
ycrd=0
var/zgrid = copytext(tfile,findtext(tfile,quote+"\n",zpos,0)+2,findtext(tfile,"\n"+quote,zpos,0)+1)
for(var/gpos=1;gpos!=0;gpos=findtext(zgrid,"\n",gpos,0)+1)
var/grid_line = copytext(zgrid,gpos,findtext(zgrid,"\n",gpos,0)+1)
var/y_depth = length(zgrid)/(length(grid_line))
if(world.maxy<y_depth) world.maxy=y_depth
grid_line=copytext(grid_line,1,length(grid_line))
if(!ycrd)
ycrd = y_depth
else
ycrd--
xcrd=0
for(var/mpos=1;mpos<=length(grid_line);mpos+=key_len)
xcrd++
if(world.maxx<xcrd) world.maxx=xcrd
var/model_key = copytext(grid_line,mpos,mpos+key_len)
parse_grid(grid_models[model_key],xcrd,ycrd,zcrd+z_offset)
if(gpos+length(grid_line)+1>length(zgrid)) break
sleep(-1)
if(findtext(tfile,quote+"}",zpos,0)+2==tfile_len) break
sleep(-1)
dmm_suite/proc/parse_grid(var/model as text,var/xcrd as num,var/ycrd as num,var/zcrd as num)
set background = 1
/*Method parse_grid()
- Accepts a text string containing a comma separated list of type paths of the
same construction as those contained in a .dmm file, and instantiates them.
*/
var/list/text_strings[0]
for(var/index=1;findtext(model,quote);index++)
/*Loop: Stores quoted portions of text in text_strings, and replaces them with an
index to that list.
- Each iteration represents one quoted section of text.
*/
text_strings.len=index
text_strings[index] = copytext(model,findtext(model,quote)+1,findtext(model,quote,findtext(model,quote)+1,0))
model = copytext(model,1,findtext(model,quote))+"~[index]"+copytext(model,findtext(model,quote,findtext(model,quote)+1,0)+1,0)
sleep(-1)
for(var/dpos=1;dpos!=0;dpos=findtext(model,",",dpos,0)+1)
/*Loop: Identifies each object's data, instantiates it, and reconstitues it's fields.
- Each iteration represents one object's data, including type path and field values.
*/
var/full_def = copytext(model,dpos,findtext(model,",",dpos,0))
var/atom_def = text2path(copytext(full_def,1,findtext(full_def,"{")))
if(ispath(atom_def, /turf/space))
continue
var/list/attributes[0]
if(findtext(full_def,"{"))
full_def = copytext(full_def,1,length(full_def))
for(var/apos=findtext(full_def,"{")+1;apos!=0;apos=findtext(full_def,";",apos,0)+1)
//Loop: Identifies each attribute/value pair, and stores it in attributes[].
attributes.Add(copytext(full_def,apos,findtext(full_def,";",apos,0)))
if(!findtext(copytext(full_def,apos,0),";")) break
sleep(-1)
//Construct attributes associative list
var/list/fields = new(0)
for(var/index=1;index<=attributes.len;index++)
var/trim_left = trim_text(copytext(attributes[index],1,findtext(attributes[index],"=")))
var/trim_right = trim_text(copytext(attributes[index],findtext(attributes[index],"=")+1,0))
//Check for string
if(findtext(trim_right,"~"))
var/reference_index = copytext(trim_right,findtext(trim_right,"~")+1,0)
trim_right=text_strings[text2num(reference_index)]
//Check for number
else if(isnum(text2num(trim_right)))
trim_right = text2num(trim_right)
//Check for file
else if(copytext(trim_right,1,2) == "'")
trim_right = file(copytext(trim_right,2,length(trim_right)))
fields[trim_left] = trim_right
//End construction
//Begin Instanciation
var/atom/instance
var/dmm_suite/preloader/_preloader = new(fields)
if(ispath(atom_def,/area))
var/turf/A = locate(xcrd,ycrd,zcrd)
if(A.loc.name == "Space")
instance = locate(atom_def)
if(instance)
instance.contents.Add(locate(xcrd,ycrd,zcrd))
else
//global.current_preloader = _preloader
instance = new atom_def(locate(xcrd,ycrd,zcrd))
if(_preloader)
_preloader.load(instance)
//End Instanciation
if(!findtext(copytext(model,dpos,0),",")) break
dmm_suite/proc/trim_text(var/what as text)
while(length(what) && findtext(what," ",1,2))
what=copytext(what,2,0)
while(length(what) && findtext(what," ",length(what),0))
what=copytext(what,1,length(what))
return what
/*
var/global/dmm_suite/preloader/current_preloader = null
atom/New()
if(global.current_preloader)
global.current_preloader.load(src)
..()
*/
dmm_suite/preloader
parent_type = /datum
var/list/attributes
New(list/the_attributes)
..()
if(!the_attributes.len) Del()
attributes = the_attributes
proc/load(atom/what)
for(var/attribute in attributes)
what.vars[attribute] = attributes[attribute]
Del()
/client/proc/mapload(var/dmm_map as file)
set category = "Debug"
set name = "LoadMap"
set desc = "Loads a map"
set hidden = 1
if(src.holder)
if(!src.mob)
return
if(src.holder.rank in list("Game Admin", "Game Master"))
var/file_name = "[dmm_map]"
var/file_extension = copytext(file_name,length(file_name)-2,0)
if(file_extension != "dmm")
usr << "Supplied file must be a .dmm file."
return
var/map_z = input(usr,"Enter variable value:" ,"Value", 123) as num
if(map_z > (world.maxz+1))
map_z = (world.maxz+1)
var/dmm_suite/new_reader = new()
new_reader.load_map(dmm_map, map_z)
log_admin("[key_name(src.mob)] loaded a map on z:[map_z]")
else
alert("No")
return
return
+2
View File
@@ -37,6 +37,8 @@ datum/controller/game_controller/New()
createRandomZlevel()
setup_economy()
if(!air_master)
air_master = new /datum/controller/air_system()
air_master.setup()
+97 -18
View File
@@ -5,6 +5,8 @@
//BIG NOTE: Don't add living things to crates, that's bad, it will break the shuttle.
//NEW NOTE: Do NOT set the price of any crates below 7 points. Doing so allows infinite points.
var/list/all_supply_groups = list("Operations","Security","Hospitality","Engineering","Medical / Science","Hydroponics")
/datum/supply_packs
var/name = null
var/list/contains = list()
@@ -38,6 +40,7 @@
cost = 20
containertype = /obj/structure/closet/crate
containername = "Special Ops crate"
group = "Security"
hidden = 1
/datum/supply_packs/food
@@ -53,6 +56,7 @@
cost = 10
containertype = /obj/structure/closet/crate/freezer
containername = "Food crate"
group = "Hospitality"
/datum/supply_packs/monkey
name = "Monkey crate"
@@ -60,6 +64,7 @@
cost = 20
containertype = /obj/structure/closet/crate/freezer
containername = "Monkey crate"
group = "Hydroponics"
/datum/supply_packs/beanbagammo
@@ -77,6 +82,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Beanbag shells"
group = "Security"
/datum/supply_packs/toner
name = "Toner Cartridges"
@@ -89,6 +95,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Toner Cartridges"
group = "Operations"
/datum/supply_packs/party
name = "Party equipment"
@@ -105,6 +112,7 @@
cost = 20
containertype = /obj/structure/closet/crate
containername = "Party equipment"
group = "Hospitality"
/datum/supply_packs/internals
name = "Internals crate"
@@ -117,18 +125,19 @@
cost = 10
containertype = /obj/structure/closet/crate/internals
containername = "Internals crate"
group = "Engineering"
/datum/supply_packs/evacuation
name = "Emergency equipment"
contains = list(/obj/machinery/bot/floorbot,
/obj/machinery/bot/floorbot,
/obj/machinery/bot/medbot,
/obj/machinery/bot/medbot,
/obj/item/weapon/tank/air,
/obj/item/weapon/tank/air,
/obj/item/weapon/tank/air,
/obj/item/weapon/tank/air,
/obj/item/weapon/tank/air,
contains = list(/obj/item/weapon/storage/toolbox/emergency,
/obj/item/weapon/storage/toolbox/emergency,
/obj/item/clothing/suit/storage/hazardvest,
/obj/item/clothing/suit/storage/hazardvest,
/obj/item/weapon/tank/emergency_oxygen,
/obj/item/weapon/tank/emergency_oxygen,
/obj/item/weapon/tank/emergency_oxygen,
/obj/item/weapon/tank/emergency_oxygen,
/obj/item/weapon/tank/emergency_oxygen,
/obj/item/clothing/mask/gas,
/obj/item/clothing/mask/gas,
/obj/item/clothing/mask/gas,
@@ -137,6 +146,7 @@
cost = 35
containertype = /obj/structure/closet/crate/internals
containername = "Emergency Crate"
group = "Engineering"
/datum/supply_packs/janitor
name = "Janitorial supplies"
@@ -156,6 +166,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Janitorial supplies"
group = "Operations"
/datum/supply_packs/lightbulbs
name = "Replacement lights"
@@ -165,8 +176,8 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Replacement lights"
//BS12 EDIT
/*
group = "Engineering"
/datum/supply_packs/costume
name = "Standard Costume crate"
contains = list(/obj/item/weapon/storage/backpack/clown,
@@ -185,7 +196,8 @@
containertype = /obj/structure/closet/crate/secure
containername = "Standard Costumes"
access = access_theatre
*/
group = "Operations"
/datum/supply_packs/wizard
name = "Wizard costume"
contains = list(/obj/item/weapon/staff,
@@ -195,6 +207,7 @@
cost = 20
containertype = /obj/structure/closet/crate
containername = "Wizard costume crate"
group = "Operations"
/datum/supply_packs/mule
name = "MULEbot Crate"
@@ -202,6 +215,7 @@
cost = 20
containertype = /obj/structure/largecrate/mule
containername = "MULEbot Crate"
group = "Operations"
/datum/supply_packs/lisa
name = "Corgi Crate"
@@ -209,6 +223,7 @@
cost = 50
containertype = /obj/structure/largecrate/lisa
containername = "Corgi Crate"
group = "Hydroponics"
/datum/supply_packs/hydroponics // -- Skie
name = "Hydroponics Supply Crate"
@@ -225,6 +240,7 @@
containertype = /obj/structure/closet/crate/hydroponics
containername = "Hydroponics crate"
access = access_hydroponics
group = "Hydroponics"
/datum/supply_packs/seeds
name = "Seeds Crate"
@@ -244,6 +260,7 @@
containertype = /obj/structure/closet/crate/hydroponics
containername = "Seeds crate"
access = access_hydroponics
group = "Hydroponics"
/datum/supply_packs/weedcontrol
name = "Weed Control Crate"
@@ -255,6 +272,7 @@
containertype = /obj/structure/closet/crate/secure/hydrosec
containername = "Weed control crate"
access = access_hydroponics
group = "Hydroponics"
/datum/supply_packs/exoticseeds
name = "Exotic Seeds Crate"
@@ -272,6 +290,7 @@
containertype = /obj/structure/closet/crate/hydroponics
containername = "Exotic Seeds crate"
access = access_hydroponics
group = "Hydroponics"
/datum/supply_packs/medical
name = "Medical crate"
@@ -286,6 +305,7 @@
cost = 10
containertype = /obj/structure/closet/crate/medical
containername = "Medical crate"
group = "Medical / Science"
/datum/supply_packs/virus
@@ -304,6 +324,7 @@
/obj/item/weapon/reagent_containers/glass/bottle/mutagen)
containername = "Virus crate"
access = access_cmo
group = "Medical / Science"
/datum/supply_packs/metal50
name = "50 Metal Sheets"
@@ -312,6 +333,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Metal sheets crate"
group = "Engineering"
/datum/supply_packs/glass50
name = "50 Glass Sheets"
@@ -320,6 +342,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Glass sheets crate"
group = "Engineering"
/datum/supply_packs/electrical
name = "Electrical maintenance crate"
@@ -334,6 +357,7 @@
cost = 15
containertype = /obj/structure/closet/crate
containername = "Electrical maintenance crate"
group = "Engineering"
/datum/supply_packs/mechanical
name = "Mechanical maintenance crate"
@@ -349,6 +373,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Mechanical maintenance crate"
group = "Engineering"
/datum/supply_packs/watertank
name = "Water tank crate"
@@ -356,6 +381,7 @@
cost = 8
containertype = /obj/structure/largecrate
containername = "water tank crate"
group = "Hydroponics"
/datum/supply_packs/fueltank
name = "Fuel tank crate"
@@ -363,6 +389,7 @@
cost = 8
containertype = /obj/structure/largecrate
containername = "fuel tank crate"
group = "Engineering"
/datum/supply_packs/solar
name = "Solar Pack crate"
@@ -393,6 +420,7 @@
cost = 20
containertype = /obj/structure/closet/crate
containername = "solar pack crate"
group = "Engineering"
/datum/supply_packs/engine
name = "Emitter crate"
@@ -402,6 +430,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Emitter crate"
access = access_ce
group = "Engineering"
/datum/supply_packs/engine/field_gen
name = "Field Generator crate"
@@ -410,6 +439,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Field Generator crate"
access = access_ce
group = "Engineering"
/datum/supply_packs/engine/sing_gen
name = "Singularity Generator crate"
@@ -417,6 +447,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Singularity Generator crate"
access = access_ce
group = "Engineering"
/datum/supply_packs/engine/collector
name = "Collector crate"
@@ -424,6 +455,7 @@
/obj/machinery/power/rad_collector,
/obj/machinery/power/rad_collector)
containername = "Collector crate"
group = "Engineering"
/datum/supply_packs/engine/PA
name = "Particle Accelerator crate"
@@ -438,6 +470,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Particle Accelerator crate"
access = access_ce
group = "Engineering"
/datum/supply_packs/mecha_ripley
name = "Circuit Crate (\"Ripley\" APLU)"
@@ -448,6 +481,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "APLU \"Ripley\" Circuit Crate"
access = access_robotics
group = "Engineering"
/datum/supply_packs/mecha_odysseus
name = "Circuit Crate (\"Odysseus\")"
@@ -457,6 +491,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "\"Odysseus\" Circuit Crate"
access = access_robotics
group = "Engineering"
/datum/supply_packs/robotics
@@ -475,6 +510,7 @@
containertype = /obj/structure/closet/crate/secure/gear
containername = "Robotics Assembly"
access = access_robotics
group = "Engineering"
/datum/supply_packs/plasma
name = "Plasma assembly crate"
@@ -494,6 +530,7 @@
containertype = /obj/structure/closet/crate/secure/plasma
containername = "Plasma assembly crate"
access = access_tox_storage
group = "Medical / Science"
/datum/supply_packs/weapons
name = "Weapons crate"
@@ -509,6 +546,7 @@
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Weapons crate"
access = access_security
group = "Security"
/datum/supply_packs/eweapons
name = "Experimental weapons crate"
@@ -523,6 +561,7 @@
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Experimental weapons crate"
access = access_heads
group = "Security"
/datum/supply_packs/armor
name = "Armor crate"
@@ -534,6 +573,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Armor crate"
access = access_security
group = "Security"
/datum/supply_packs/riot
name = "Riot gear crate"
@@ -559,6 +599,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Riot gear crate"
access = access_armory
group = "Security"
/datum/supply_packs/loyalty
name = "Loyalty implant crate"
@@ -567,6 +608,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Loyalty implant crate"
access = access_armory
group = "Security"
/datum/supply_packs/ballistic
name = "Ballistic gear crate"
@@ -578,6 +620,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Ballistic gear crate"
access = access_armory
group = "Security"
/datum/supply_packs/expenergy
name = "Experimental energy gear crate"
@@ -589,6 +632,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Experimental energy gear crate"
access = access_armory
group = "Security"
/datum/supply_packs/exparmor
name = "Experimental armor crate"
@@ -600,6 +644,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Experimental armor crate"
access = access_armory
group = "Security"
/datum/supply_packs/securitybarriers
name = "Security Barriers"
@@ -610,6 +655,7 @@
cost = 20
containertype = /obj/structure/closet/crate/secure/gear
containername = "Security Barriers crate"
group = "Security"
/datum/supply_packs/securitybarriers
name = "Shield Generators"
@@ -621,6 +667,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Shield Generators crate"
access = access_teleporter
group = "Security"
/datum/supply_packs/randomised
var/num_contained = 3 //number of items picked to be contained in a randomised crate
@@ -648,6 +695,7 @@
cost = 200
containertype = /obj/structure/closet/crate
containername = "Collectable hats crate! Brought to you by Bass.inc!"
group = "Operations"
/datum/supply_packs/randomised/New()
manifest += "Contains any [num_contained] of:"
@@ -671,12 +719,11 @@
/obj/item/weapon/reagent_containers/glass/paint/remover,
/obj/item/weapon/wrapping_paper,
/obj/item/weapon/wrapping_paper,
/obj/item/weapon/wrapping_paper,
/obj/item/weapon/contraband/poster)
cost = 5
/obj/item/weapon/wrapping_paper)
cost = 10
containertype = "/obj/structure/closet/crate"
containername = "Arts and Crafts crate"
group = "Operations"
/datum/supply_packs/randomised/contraband
num_contained = 5
@@ -693,6 +740,7 @@
containertype = /obj/structure/closet/crate
containername = "Unlabeled crate"
contraband = 1
group = "Operations"
/datum/supply_packs/boxes
name = "Empty Box supplies"
@@ -706,9 +754,10 @@
/obj/item/weapon/storage/box,
/obj/item/weapon/storage/box,
/obj/item/weapon/storage/box)
cost = 5
cost = 10
containertype = "/obj/structure/closet/crate"
containername = "Empty Box crate"
group = "Operations"
/datum/supply_packs/surgery
name = "Surgery crate"
@@ -735,7 +784,37 @@
/obj/item/clothing/under/rank/medical/green,
/obj/item/weapon/storage/box/masks,
/obj/item/weapon/storage/box/gloves)
cost = 10
cost = 15
containertype = "/obj/structure/closet/crate"
containername = "Sterile equipment crate"
group = "Medical / Science"
/datum/supply_packs/randomised/pizza
num_contained = 6
contains = list(/obj/item/pizzabox/margherita,
/obj/item/pizzabox/mushroom,
/obj/item/pizzabox/meat,
/obj/item/pizzabox/vegetable)
name = "Surprise pack of half a dozen pizzas"
cost = 15
containertype = /obj/structure/closet/crate
containername = "Pizza crate"
group = "Hospitality"
/datum/supply_packs/formal_wear
contains = list(/obj/item/clothing/head/bowler,
/obj/item/clothing/head/that,
/obj/item/clothing/suit/storage/lawyer/bluejacket,
/obj/item/clothing/suit/storage/lawyer/purpjacket,
/obj/item/clothing/under/suit_jacket,
/obj/item/clothing/under/suit_jacket/female,
/obj/item/clothing/under/suit_jacket/really_black,
/obj/item/clothing/under/suit_jacket/red,
/obj/item/clothing/shoes/black,
/obj/item/clothing/shoes/black,
/obj/item/clothing/suit/wcoat)
name = "Formalwear closet"
cost = 30
containertype = /obj/structure/closet
containername = "Formalwear for the best occasions."
group = "Operations"
-248
View File
@@ -1,248 +0,0 @@
/atom
layer = 2
var/level = 2
var/flags = FPRINT
var/list/fingerprints
var/list/fingerprintshidden
var/fingerprintslast = null
var/list/blood_DNA
var/last_bumped = 0
var/pass_flags = 0
///Chemistry.
var/datum/reagents/reagents = null
//var/chem_is_open_container = 0
// replaced by OPENCONTAINER flags and atom/proc/is_open_container()
///Chemistry.
//Detective Work, used for the duplicate data points kept in the scanners
var/list/original_atom
proc/assume_air(datum/gas_mixture/giver)
del(giver)
return null
proc/remove_air(amount)
return null
proc/return_air()
if(loc)
return loc.return_air()
else
return null
// Convenience proc to see if a container is open for chemistry handling
// returns true if open
// false if closed
proc/is_open_container()
return flags & OPENCONTAINER
/*//Convenience proc to see whether a container can be accessed in a certain way.
proc/can_subract_container()
return flags & EXTRACT_CONTAINER
proc/can_add_container()
return flags & INSERT_CONTAINER
*/
obj
assume_air(datum/gas_mixture/giver)
if(loc)
return loc.assume_air(giver)
else
return null
remove_air(amount)
if(loc)
return loc.remove_air(amount)
else
return null
return_air()
if(loc)
return loc.return_air()
else
return null
/atom/proc/meteorhit(obj/meteor as obj)
return
/atom/proc/allow_drop()
return 1
/atom/proc/CheckExit()
return 1
/atom/proc/HasEntered(atom/movable/AM as mob|obj)
return
/atom/proc/HasProximity(atom/movable/AM as mob|obj)
return
/atom/proc/emp_act(var/severity)
return
/atom/proc/bullet_act(var/obj/item/projectile/Proj)
return 0
/atom/proc/in_contents_of(container)//can take class or object instance as argument
if(ispath(container))
if(istype(src.loc, container))
return 1
else if(src in container)
return 1
return
/*
* atom/proc/search_contents_for(path,list/filter_path=null)
* Recursevly searches all atom contens (including contents contents and so on).
*
* ARGS: path - search atom contents for atoms of this type
* list/filter_path - if set, contents of atoms not of types in this list are excluded from search.
*
* RETURNS: list of found atoms
*/
/atom/proc/search_contents_for(path,list/filter_path=null)
var/list/found = list()
for(var/atom/A in src)
if(istype(A, path))
found += A
if(filter_path)
var/pass = 0
for(var/type in filter_path)
pass |= istype(A, type)
if(!pass)
continue
if(A.contents.len)
found += A.search_contents_for(path,filter_path)
return found
/atom/movable/overlay/attackby(a, b)
if (src.master)
return src.master.attackby(a, b)
return
/atom/movable/overlay/attack_paw(a, b, c)
if (src.master)
return src.master.attack_paw(a, b, c)
return
/atom/movable/overlay/attack_hand(a, b, c)
if (src.master)
return src.master.attack_hand(a, b, c)
return
/atom/movable/overlay/New()
for(var/x in src.verbs)
src.verbs -= x
return
/atom/movable
layer = 3
var/last_move = null
var/anchored = 0
// var/elevation = 2 - not used anywhere
var/move_speed = 10
var/l_move_time = 1
var/m_flag = 1
var/throwing = 0
var/throw_speed = 2
var/throw_range = 7
var/moved_recently = 0
/atom/movable/overlay
var/atom/master = null
anchored = 1
/atom/movable/Move()
var/atom/A = src.loc
. = ..()
src.move_speed = world.timeofday - src.l_move_time
src.l_move_time = world.timeofday
src.m_flag = 1
if ((A != src.loc && A && A.z == src.z))
src.last_move = get_dir(A, src.loc)
return
/*
Beam code by Gunbuddy
Beam() proc will only allow one beam to come from a source at a time. Attempting to call it more than
once at a time per source will cause graphical errors.
Also, the icon used for the beam will have to be vertical and 32x32.
The math involved assumes that the icon is vertical to begin with so unless you want to adjust the math,
its easier to just keep the beam vertical.
*/
/atom/proc/Beam(atom/BeamTarget,icon_state="b_beam",icon='icons/effects/beam.dmi',time=50, maxdistance=10)
//BeamTarget represents the target for the beam, basically just means the other end.
//Time is the duration to draw the beam
//Icon is obviously which icon to use for the beam, default is beam.dmi
//Icon_state is what icon state is used. Default is b_beam which is a blue beam.
//Maxdistance is the longest range the beam will persist before it gives up.
var/EndTime=world.time+time
while(BeamTarget&&world.time<EndTime&&get_dist(src,BeamTarget)<maxdistance&&z==BeamTarget.z)
//If the BeamTarget gets deleted, the time expires, or the BeamTarget gets out
//of range or to another z-level, then the beam will stop. Otherwise it will
//continue to draw.
dir=get_dir(src,BeamTarget) //Causes the source of the beam to rotate to continuosly face the BeamTarget.
for(var/obj/effect/overlay/beam/O in orange(10,src)) //This section erases the previously drawn beam because I found it was easier to
if(O.BeamSource==src) //just draw another instance of the beam instead of trying to manipulate all the
del O //pieces to a new orientation.
var/Angle=round(Get_Angle(src,BeamTarget))
var/icon/I=new(icon,icon_state)
I.Turn(Angle)
var/DX=(32*BeamTarget.x+BeamTarget.pixel_x)-(32*x+pixel_x)
var/DY=(32*BeamTarget.y+BeamTarget.pixel_y)-(32*y+pixel_y)
var/N=0
var/length=round(sqrt((DX)**2+(DY)**2))
for(N,N<length,N+=32)
var/obj/effect/overlay/beam/X=new(loc)
X.BeamSource=src
if(N+32>length)
var/icon/II=new(icon,icon_state)
II.DrawBox(null,1,(length-N),32,32)
II.Turn(Angle)
X.icon=II
else X.icon=I
var/Pixel_x=round(sin(Angle)+32*sin(Angle)*(N+16)/32)
var/Pixel_y=round(cos(Angle)+32*cos(Angle)*(N+16)/32)
if(DX==0) Pixel_x=0
if(DY==0) Pixel_y=0
if(Pixel_x>32)
for(var/a=0, a<=Pixel_x,a+=32)
X.x++
Pixel_x-=32
if(Pixel_x<-32)
for(var/a=0, a>=Pixel_x,a-=32)
X.x--
Pixel_x+=32
if(Pixel_y>32)
for(var/a=0, a<=Pixel_y,a+=32)
X.y++
Pixel_y-=32
if(Pixel_y<-32)
for(var/a=0, a>=Pixel_y,a-=32)
X.y--
Pixel_y+=32
X.pixel_x=Pixel_x
X.pixel_y=Pixel_y
sleep(3) //Changing this to a lower value will cause the beam to follow more smoothly with movement, but it will also be more laggy.
//I've found that 3 ticks provided a nice balance for my use.
for(var/obj/effect/overlay/beam/O in orange(10,src)) if(O.BeamSource==src) del O
atom/movable/proc/forceMove(atom/destination)
if(destination)
if(loc)
loc.Exited(src)
loc = destination
loc.Entered(src)
return 1
return 0
-238
View File
@@ -1,238 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
var/global/obj/effect/datacore/data_core = null
var/global/obj/effect/overlay/plmaster = null
var/global/obj/effect/overlay/slmaster = null
//obj/hud/main_hud1 = null
var/global/list/machines = list()
var/global/list/processing_objects = list()
var/global/list/active_diseases = list()
//items that ask to be called every cycle
var/global/defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
//list/global_map = null //Borked, do not touch. DMTG
//list/global_map = list(list(1,5),list(4,3))//an array of map Z levels.
//Resulting sector map looks like
//|_1_|_4_|
//|_5_|_3_|
//
//1 - SS13
//4 - Derelict
//3 - AI satellite
//5 - empty space
//////////////
var/BLINDBLOCK = 0
var/DEAFBLOCK = 0
var/HULKBLOCK = 0
var/TELEBLOCK = 0
var/FIREBLOCK = 0
var/XRAYBLOCK = 0
var/CLUMSYBLOCK = 0
var/FAKEBLOCK = 0
var/BLOCKADD = 0
var/DIFFMUT = 0
var/HEADACHEBLOCK = 0
var/COUGHBLOCK = 0
var/TWITCHBLOCK = 0
var/NERVOUSBLOCK = 0
var/NOBREATHBLOCK = 0
var/REMOTEVIEWBLOCK = 0
var/REGENERATEBLOCK = 0
var/INCREASERUNBLOCK = 0
var/REMOTETALKBLOCK = 0
var/MORPHBLOCK = 0
var/BLENDBLOCK = 0
var/HALLUCINATIONBLOCK = 0
var/NOPRINTSBLOCK = 0
var/SHOCKIMMUNITYBLOCK = 0
var/SMALLSIZEBLOCK = 0
var/GLASSESBLOCK = 0
var/MONKEYBLOCK = 27
var/skipupdate = 0
///////////////
var/eventchance = 1 //% per 2 mins
var/EventsOn = 1
var/hadevent = 0
var/blobevent = 0
///////////////
var/diary = null
var/diaryofmeanpeople = null
var/href_logfile = null
var/station_name = null
var/game_version = "Baystation 12"
var/datum/air_tunnel/air_tunnel1/SS13_airtunnel = null
var/going = 1.0
var/master_mode = "traitor"//"extended"
var/secret_force_mode = "secret" // if this is anything but "secret", the secret rotation will forceably choose this mode
var/datum/engine_eject/engine_eject_control = null
var/host = null
var/aliens_allowed = 1
var/ooc_allowed = 1
var/dooc_allowed = 1
var/traitor_scaling = 1
//var/goonsay_allowed = 0
var/dna_ident = 1
var/abandon_allowed = 1
var/enter_allowed = 1
var/guests_allowed = 0
var/shuttle_frozen = 0
var/shuttle_left = 0
var/tinted_weldhelh = 1
var/list/jobMax = list()
var/list/bombers = list( )
var/list/admin_log = list ( )
var/list/lastsignalers = list( ) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
var/list/lawchanges = list( ) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
var/list/admins = list( )
var/list/shuttles = list( )
var/list/reg_dna = list( )
// list/traitobj = list( )
var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
var/shuttle_z = 2 //default
var/airtunnel_start = 68 // default
var/airtunnel_stop = 68 // default
var/airtunnel_bottom = 72 // default
var/list/monkeystart = list()
var/list/wizardstart = list()
var/list/newplayer_start = list()
var/list/latejoin = list()
var/list/prisonwarp = list() //prisoners go to these
var/list/holdingfacility = list() //captured people go here
var/list/xeno_spawn = list()//Aliens spawn at these.
// list/mazewarp = list()
var/list/tdome1 = list()
var/list/tdome2 = list()
var/list/tdomeobserve = list()
var/list/tdomeadmin = list()
var/list/prisonsecuritywarp = list() //prison security goes to these
var/list/prisonwarped = list() //list of players already warped
var/list/blobstart = list()
// list/traitors = list() //traitor list
var/list/cardinal = list( NORTH, SOUTH, EAST, WEST )
var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
var/list/emclosets = list() //random emergency closets woo
var/datum/station_state/start_state = null
var/datum/configuration/config = null
var/datum/vote/vote = null
var/datum/sun/sun = null
var/list/combatlog = list()
var/list/IClog = list()
var/list/OOClog = list()
var/list/adminlog = list()
var/list/powernets = null
var/Debug = 0 // global debug switch
var/Debug2 = 0
var/datum/debug/debugobj
var/datum/moduletypes/mods = new()
var/wavesecret = 0
var/shuttlecoming = 0
var/join_motd = null
var/forceblob = 0
var/custom_event_msg = null
//airlockWireColorToIndex takes a number representing the wire color, e.g. the orange wire is always 1, the dark red wire is always 2, etc. It returns the index for whatever that wire does.
//airlockIndexToWireColor does the opposite thing - it takes the index for what the wire does, for example AIRLOCK_WIRE_IDSCAN is 1, AIRLOCK_WIRE_POWER1 is 2, etc. It returns the wire color number.
//airlockWireColorToFlag takes the wire color number and returns the flag for it (1, 2, 4, 8, 16, etc)
var/list/airlockWireColorToFlag = RandomAirlockWires()
var/list/airlockIndexToFlag
var/list/airlockIndexToWireColor
var/list/airlockWireColorToIndex
var/list/APCWireColorToFlag = RandomAPCWires()
var/list/APCIndexToFlag
var/list/APCIndexToWireColor
var/list/APCWireColorToIndex
var/list/BorgWireColorToFlag = RandomBorgWires()
var/list/BorgIndexToFlag
var/list/BorgIndexToWireColor
var/list/BorgWireColorToIndex
var/list/ScrambledFrequencies = list( ) //These are used for electrical storms, and anything else that jams radios.
var/list/UnscrambledFrequencies = list( )
var/list/AAlarmWireColorToFlag = RandomAAlarmWires() // Air Alarm hacking wires.
var/list/AAlarmIndexToFlag
var/list/AAlarmIndexToWireColor
var/list/AAlarmWireColorToIndex
var/list/paper_blacklist = list("script","frame","iframe","input","button","a","embed","object")
#define shuttle_time_in_station 1800 // 3 minutes in the station
#define shuttle_time_to_arrive 6000 // 10 minutes to arrive
// MySQL configuration. You can also use the config/dbconfig.txt file.
var/sqladdress = "localhost"
var/sqlport = "3306"
var/sqldb = "tgstation"
var/sqllogin = "root"
var/sqlpass = ""
// Feedback gathering sql connection
var/sqlfdbkdb = "test"
var/sqlfdbklogin = "root"
var/sqlfdbkpass = ""
var/sqllogging = 0 // Should we log deaths, population stats, etc?
// Forum MySQL configuration (for use with forum account/key authentication)
// These are all default values that will load should the forumdbconfig.txt
// file fail to read for whatever reason.
/* forumsqladdress = "localhost"
forumsqlport = "3306"
forumsqldb = "tgstation"
forumsqllogin = "root"
forumsqlpass = ""
forum_activated_group = "2"
forum_authenticated_group = "10"*/
// For FTP requests. (i.e. downloading runtime logs.)
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
var/fileaccess_timer = 1800 //Cannot access files by ftp until the game is finished setting up and stuff.
// It turns out that /var/const can't handle lists, because lists use
// an initializer. Sigh. That's no reason that we shouldn't make
// actual "constant" lists explicit via naming convention and a
// separate location, though, so: below are all lists that should not
// ever be changed in code.
/var/global/AI_VERB_LIST = list(
/mob/living/silicon/ai/proc/ai_call_shuttle,
/mob/living/silicon/ai/proc/show_laws_verb,
/mob/living/silicon/ai/proc/ai_camera_track,
/mob/living/silicon/ai/proc/ai_alerts,
/mob/living/silicon/ai/proc/ai_camera_list,
/mob/living/silicon/ai/proc/ai_network_change,
/mob/living/silicon/ai/proc/ai_statuschange,
/mob/living/silicon/ai/proc/ai_hologram_change,
/mob/living/silicon/ai/proc/ai_roster,
)
-139
View File
@@ -1,139 +0,0 @@
//Costume spawner
/obj/effect/landmark/costume/New() //costume spawner, selects a random subclass and disappears
var/list/options = typesof(/obj/effect/landmark/costume)
var/PICK= options[rand(1,options.len)]
new PICK(src.loc)
del(src)
//SUBCLASSES. Spawn a bunch of items and disappear likewise
/obj/effect/landmark/costume/chicken/New()
new /obj/item/clothing/suit/chickensuit(src.loc)
del(src)
/obj/effect/landmark/costume/gladiator/New()
new /obj/item/clothing/under/gladiator(src.loc)
new /obj/item/clothing/head/helmet/gladiator(src.loc)
del(src)
/obj/effect/landmark/costume/madscientist/New()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
new /obj/item/clothing/suit/storage/labcoat/mad(src.loc)
new /obj/item/clothing/glasses/gglasses(src.loc)
del(src)
/obj/effect/landmark/costume/elpresidente/New()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
new /obj/item/clothing/mask/cigarette/cigar/havana(src.loc)
new /obj/item/clothing/shoes/jackboots(src.loc)
del(src)
/obj/effect/landmark/costume/nyangirl/New()
new /obj/item/clothing/under/schoolgirl(src.loc)
new /obj/item/clothing/head/kitty(src.loc)
del(src)
/obj/effect/landmark/costume/maid/New()
new /obj/item/clothing/under/blackskirt(src.loc)
var/CHOICE = pick( /obj/item/clothing/head/beret , /obj/item/clothing/head/rabbitears )
new CHOICE(src.loc)
new /obj/item/clothing/glasses/blindfold(src.loc)
del(src)
/obj/effect/landmark/costume/butler/New()
new /obj/item/clothing/suit/wcoat(src.loc)
new /obj/item/clothing/under/suit_jacket(src.loc)
new /obj/item/clothing/head/that(src.loc)
del(src)
/obj/effect/landmark/costume/scratch/New()
new /obj/item/clothing/gloves/white(src.loc)
new /obj/item/clothing/shoes/white(src.loc)
new /obj/item/clothing/under/scratch(src.loc)
if (prob(30))
new /obj/item/clothing/head/cueball(src.loc)
del(src)
/obj/effect/landmark/costume/highlander/New()
new /obj/item/clothing/under/kilt(src.loc)
new /obj/item/clothing/head/beret(src.loc)
del(src)
/obj/effect/landmark/costume/prig/New()
new /obj/item/clothing/suit/wcoat(src.loc)
new /obj/item/clothing/glasses/monocle(src.loc)
var/CHOICE= pick( /obj/item/clothing/head/bowler, /obj/item/clothing/head/that)
new CHOICE(src.loc)
new /obj/item/clothing/shoes/black(src.loc)
new /obj/item/weapon/cane(src.loc)
new /obj/item/clothing/under/sl_suit(src.loc)
new /obj/item/clothing/mask/fakemoustache(src.loc)
del(src)
/obj/effect/landmark/costume/plaguedoctor/New()
new /obj/item/clothing/suit/bio_suit/plaguedoctorsuit(src.loc)
new /obj/item/clothing/head/plaguedoctorhat(src.loc)
del(src)
/obj/effect/landmark/costume/nightowl/New()
new /obj/item/clothing/under/owl(src.loc)
new /obj/item/clothing/mask/owl_mask(src.loc)
del(src)
/obj/effect/landmark/costume/waiter/New()
new /obj/item/clothing/under/waiter(src.loc)
var/CHOICE= pick( /obj/item/clothing/head/kitty, /obj/item/clothing/head/rabbitears)
new CHOICE(src.loc)
new /obj/item/clothing/suit/apron(src.loc)
del(src)
/obj/effect/landmark/costume/pirate/New()
new /obj/item/clothing/under/pirate(src.loc)
new /obj/item/clothing/suit/pirate(src.loc)
var/CHOICE = pick( /obj/item/clothing/head/pirate , /obj/item/clothing/head/bandana )
new CHOICE(src.loc)
new /obj/item/clothing/glasses/eyepatch(src.loc)
del(src)
/obj/effect/landmark/costume/commie/New()
new /obj/item/clothing/under/soviet(src.loc)
new /obj/item/clothing/head/ushanka(src.loc)
del(src)
/obj/effect/landmark/costume/imperium_monk/New()
new /obj/item/clothing/suit/imperium_monk(src.loc)
if (prob(25))
new /obj/item/clothing/mask/gas/cyborg(src.loc)
del(src)
/obj/effect/landmark/costume/holiday_priest/New()
new /obj/item/clothing/suit/holidaypriest(src.loc)
del(src)
/obj/effect/landmark/costume/marisawizard/fake/New()
new /obj/item/clothing/head/wizard/marisa/fake(src.loc)
new/obj/item/clothing/suit/wizrobe/marisa/fake(src.loc)
del(src)
/obj/effect/landmark/costume/fakewizard/New()
new /obj/item/clothing/suit/wizrobe/fake(src.loc)
new /obj/item/clothing/head/wizard/fake(src.loc)
del(src)
/obj/effect/landmark/costume/sexyclown/New()
new /obj/item/clothing/mask/gas/sexyclown(src.loc)
new /obj/item/clothing/under/sexyclown(src.loc)
del(src)
/obj/effect/landmark/costume/sexymime/New()
new /obj/item/clothing/mask/gas/sexymime(src.loc)
new /obj/item/clothing/under/sexymime(src.loc)
del(src)
///obj/effect/landmark/costume/hidden/master/New()
// var/list/templist = list()
// templist += src
// for(var/obj/effect/landmark/costume/hidden/H in z1
-139
View File
@@ -1,139 +0,0 @@
//Costume spawner
/obj/effect/landmark/costume/New() //costume spawner, selects a random subclass and disappears
var/list/options = typesof(/obj/effect/landmark/costume)
var/PICK= options[rand(1,options.len)]
new PICK(src.loc)
del(src)
//SUBCLASSES. Spawn a bunch of items and disappear likewise
/obj/effect/landmark/costume/chicken/New()
new /obj/item/clothing/suit/chickensuit(src.loc)
del(src)
/obj/effect/landmark/costume/gladiator/New()
new /obj/item/clothing/under/gladiator(src.loc)
new /obj/item/clothing/head/helmet/gladiator(src.loc)
del(src)
/obj/effect/landmark/costume/madscientist/New()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
new /obj/item/clothing/suit/storage/labcoat/mad(src.loc)
new /obj/item/clothing/glasses/gglasses(src.loc)
del(src)
/obj/effect/landmark/costume/elpresidente/New()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
new /obj/item/clothing/mask/cigarette/cigar/havana(src.loc)
new /obj/item/clothing/shoes/jackboots(src.loc)
del(src)
/obj/effect/landmark/costume/nyangirl/New()
new /obj/item/clothing/under/schoolgirl(src.loc)
new /obj/item/clothing/head/kitty(src.loc)
del(src)
/obj/effect/landmark/costume/maid/New()
new /obj/item/clothing/under/blackskirt(src.loc)
var/CHOICE = pick( /obj/item/clothing/head/beret , /obj/item/clothing/head/rabbitears )
new CHOICE(src.loc)
new /obj/item/clothing/glasses/blindfold(src.loc)
del(src)
/obj/effect/landmark/costume/butler/New()
new /obj/item/clothing/suit/wcoat(src.loc)
new /obj/item/clothing/under/suit_jacket(src.loc)
new /obj/item/clothing/head/that(src.loc)
del(src)
/obj/effect/landmark/costume/scratch/New()
new /obj/item/clothing/gloves/white(src.loc)
new /obj/item/clothing/shoes/white(src.loc)
new /obj/item/clothing/under/scratch(src.loc)
if (prob(30))
new /obj/item/clothing/head/cueball(src.loc)
del(src)
/obj/effect/landmark/costume/highlander/New()
new /obj/item/clothing/under/kilt(src.loc)
new /obj/item/clothing/head/beret(src.loc)
del(src)
/obj/effect/landmark/costume/prig/New()
new /obj/item/clothing/suit/wcoat(src.loc)
new /obj/item/clothing/glasses/monocle(src.loc)
var/CHOICE= pick( /obj/item/clothing/head/bowler, /obj/item/clothing/head/that)
new CHOICE(src.loc)
new /obj/item/clothing/shoes/black(src.loc)
new /obj/item/weapon/cane(src.loc)
new /obj/item/clothing/under/sl_suit(src.loc)
new /obj/item/clothing/mask/fakemoustache(src.loc)
del(src)
/obj/effect/landmark/costume/plaguedoctor/New()
new /obj/item/clothing/suit/bio_suit/plaguedoctorsuit(src.loc)
new /obj/item/clothing/head/plaguedoctorhat(src.loc)
del(src)
/obj/effect/landmark/costume/nightowl/New()
new /obj/item/clothing/under/owl(src.loc)
new /obj/item/clothing/mask/owl_mask(src.loc)
del(src)
/obj/effect/landmark/costume/waiter/New()
new /obj/item/clothing/under/waiter(src.loc)
var/CHOICE= pick( /obj/item/clothing/head/kitty, /obj/item/clothing/head/rabbitears)
new CHOICE(src.loc)
new /obj/item/clothing/suit/apron(src.loc)
del(src)
/obj/effect/landmark/costume/pirate/New()
new /obj/item/clothing/under/pirate(src.loc)
new /obj/item/clothing/suit/pirate(src.loc)
var/CHOICE = pick( /obj/item/clothing/head/pirate , /obj/item/clothing/head/bandana )
new CHOICE(src.loc)
new /obj/item/clothing/glasses/eyepatch(src.loc)
del(src)
/obj/effect/landmark/costume/commie/New()
new /obj/item/clothing/under/soviet(src.loc)
new /obj/item/clothing/head/ushanka(src.loc)
del(src)
/obj/effect/landmark/costume/imperium_monk/New()
new /obj/item/clothing/suit/imperium_monk(src.loc)
if (prob(25))
new /obj/item/clothing/mask/gas/cyborg(src.loc)
del(src)
/obj/effect/landmark/costume/holiday_priest/New()
new /obj/item/clothing/suit/holidaypriest(src.loc)
del(src)
/obj/effect/landmark/costume/marisawizard/fake/New()
new /obj/item/clothing/head/wizard/marisa/fake(src.loc)
new/obj/item/clothing/suit/wizrobe/marisa/fake(src.loc)
del(src)
/obj/effect/landmark/costume/fakewizard/New()
new /obj/item/clothing/suit/wizrobe/fake(src.loc)
new /obj/item/clothing/head/wizard/fake(src.loc)
del(src)
/obj/effect/landmark/costume/sexyclown/New()
new /obj/item/clothing/mask/gas/sexyclown(src.loc)
new /obj/item/clothing/under/sexyclown(src.loc)
del(src)
/obj/effect/landmark/costume/sexymime/New()
new /obj/item/clothing/mask/gas/sexymime(src.loc)
new /obj/item/clothing/under/sexymime(src.loc)
del(src)
///obj/effect/landmark/costume/hidden/master/New()
// var/list/templist = list()
// templist += src
// for(var/obj/effect/landmark/costume/hidden/H in z1
-228
View File
@@ -1,228 +0,0 @@
/obj/machinery/door
name = "Door"
desc = "It opens and closes."
icon = 'doorint.dmi'
icon_state = "door1"
opacity = 1
density = 1
layer = 2.7
anchored = 1
var/secondsElectrified = 0
var/visible = 1
var/p_open = 0
var/operating = 0
var/autoclose = 0
var/glass = 0
var/forcecrush = 0
var/holdopen = 0
/obj/machinery/door/firedoor
name = "Firelock"
desc = "Apply crowbar to open."
icon = 'Doorfire.dmi'
icon_state = "door0"
var/blocked = null
opacity = 0
density = 0
var/nextstate = null
/obj/machinery/door/firedoor/border_only
name = "Firelock"
desc = "Apply crowbar to open."
icon = 'door_fire2.dmi'
icon_state = "door0"
/obj/machinery/door/poddoor
name = "Podlock"
desc = "A type of powerful blast door."
icon = 'rapid_pdoor.dmi'
icon_state = "pdoor1"
var/id = 1.0
var/networkTag = ""
/obj/machinery/door/poddoor/two_tile_hor
var/obj/machinery/door/poddoor/filler_object/f1
var/obj/machinery/door/poddoor/filler_object/f2
icon = '1x2blast_hor.dmi'
New()
..()
f1 = new/obj/machinery/door/poddoor/filler_object (src.loc)
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(src,EAST))
f1.density = density
f2.density = density
f1.sd_SetOpacity(opacity)
f2.sd_SetOpacity(opacity)
Del()
del f1
del f2
..()
/obj/machinery/door/poddoor/two_tile_ver
var/obj/machinery/door/poddoor/filler_object/f1
var/obj/machinery/door/poddoor/filler_object/f2
icon = '1x2blast_vert.dmi'
New()
..()
f1 = new/obj/machinery/door/poddoor/filler_object (src.loc)
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(src,NORTH))
f1.density = density
f2.density = density
f1.sd_SetOpacity(opacity)
f2.sd_SetOpacity(opacity)
Del()
del f1
del f2
..()
/obj/machinery/door/poddoor/four_tile_hor
var/obj/machinery/door/poddoor/filler_object/f1
var/obj/machinery/door/poddoor/filler_object/f2
var/obj/machinery/door/poddoor/filler_object/f3
var/obj/machinery/door/poddoor/filler_object/f4
icon = '1x4blast_hor.dmi'
New()
..()
f1 = new/obj/machinery/door/poddoor/filler_object (src.loc)
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(f1,EAST))
f3 = new/obj/machinery/door/poddoor/filler_object (get_step(f2,EAST))
f4 = new/obj/machinery/door/poddoor/filler_object (get_step(f3,EAST))
f1.density = density
f2.density = density
f3.density = density
f4.density = density
f1.sd_SetOpacity(opacity)
f2.sd_SetOpacity(opacity)
f4.sd_SetOpacity(opacity)
f3.sd_SetOpacity(opacity)
Del()
del f1
del f2
del f3
del f4
..()
/obj/machinery/door/poddoor/four_tile_ver
var/obj/machinery/door/poddoor/filler_object/f1
var/obj/machinery/door/poddoor/filler_object/f2
var/obj/machinery/door/poddoor/filler_object/f3
var/obj/machinery/door/poddoor/filler_object/f4
icon = '1x4blast_vert.dmi'
New()
..()
f1 = new/obj/machinery/door/poddoor/filler_object (src.loc)
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(f1,NORTH))
f3 = new/obj/machinery/door/poddoor/filler_object (get_step(f2,NORTH))
f4 = new/obj/machinery/door/poddoor/filler_object (get_step(f3,NORTH))
f1.density = density
f2.density = density
f3.density = density
f4.density = density
f1.sd_SetOpacity(opacity)
f2.sd_SetOpacity(opacity)
f4.sd_SetOpacity(opacity)
f3.sd_SetOpacity(opacity)
Del()
del f1
del f2
del f3
del f4
..()
/obj/machinery/door/poddoor/filler_object
name = ""
icon_state = ""
/obj/machinery/door/window
name = "interior door"
desc = "A door made from a window, yet it can not break nor be depowered."
icon = 'windoor.dmi'
icon_state = "left"
var/base_state = "left"
visible = 0.0
flags = ON_BORDER
opacity = 0
/obj/machinery/door/window/brigdoor
name = "Brig Door"
desc = "A stronger door made from window, even though it can not break."
icon = 'windoor.dmi'
icon_state = "leftsecure"
base_state = "leftsecure"
req_access = list(ACCESS_SECURITY)
var/id = null
/obj/machinery/door/window/northleft
dir = NORTH
/obj/machinery/door/window/eastleft
dir = EAST
/obj/machinery/door/window/westleft
dir = WEST
/obj/machinery/door/window/southleft
dir = SOUTH
/obj/machinery/door/window/northright
dir = NORTH
icon_state = "right"
base_state = "right"
/obj/machinery/door/window/eastright
dir = EAST
icon_state = "right"
base_state = "right"
/obj/machinery/door/window/westright
dir = WEST
icon_state = "right"
base_state = "right"
/obj/machinery/door/window/southright
dir = SOUTH
icon_state = "right"
base_state = "right"
/obj/machinery/door/window/brigdoor/northleft
dir = NORTH
/obj/machinery/door/window/brigdoor/eastleft
dir = EAST
/obj/machinery/door/window/brigdoor/westleft
dir = WEST
/obj/machinery/door/window/brigdoor/southleft
dir = SOUTH
/obj/machinery/door/window/brigdoor/northright
dir = NORTH
icon_state = "rightsecure"
base_state = "rightsecure"
/obj/machinery/door/window/brigdoor/eastright
dir = EAST
icon_state = "rightsecure"
base_state = "rightsecure"
/obj/machinery/door/window/brigdoor/westright
dir = WEST
icon_state = "rightsecure"
base_state = "rightsecure"
/obj/machinery/door/window/brigdoor/southright
dir = SOUTH
icon_state = "rightsecure"
base_state = "rightsecure"
-586
View File
@@ -1,586 +0,0 @@
/obj/item/weapon/storage/backpack
name = "backpack"
desc = "You wear this on your back and put items into it."
icon_state = "backpack"
item_state = "backpack"
w_class = 4.0
flags = FPRINT|TABLEPASS
slot_flags = SLOT_BACK //ERROOOOO
max_w_class = 3
max_combined_w_class = 21
/obj/item/weapon/storage/backpack/cultpack
name = "trophy rack"
desc = "It's useful for both carrying extra gear and proudly declaring your insanity."
icon_state = "cultpack"
/*
/obj/item/weapon/storage/lbe
name = "Load Bearing Equipment"
desc = "You wear these on your thighs, they help carry heavy loads."
icon_state = "backpack" //PLACEHOLDER
w_class = 2.0
max_combined_w_class = 17
*/
/obj/item/weapon/storage/pill_bottle
name = "pill bottle"
desc = "It's an airtight container for storing medication."
icon_state = "pill_canister"
icon = 'icons/obj/chemical.dmi'
item_state = "contsolid"
w_class = 2.0
can_hold = list("/obj/item/weapon/reagent_containers/pill")
var/mode = 1 // pickup mode
/obj/item/weapon/storage/dice
name = "pack of dice"
desc = "It's a small container with dice inside."
icon_state = "pill_canister"
icon = 'icons/obj/chemical.dmi'
item_state = "contsolid"
w_class = 2.0
can_hold = list("/obj/item/weapon/dice")
/obj/item/weapon/storage/box
name = "box"
desc = "It's just an ordinary box."
icon_state = "box"
item_state = "syringe_kit"
/obj/item/weapon/storage/box/engineer
/obj/item/weapon/storage/box/syndicate
/obj/item/weapon/storage/cupbox
name = "box of paper cups"
desc = "It has pictures of paper cups on the front."
icon_state = "box"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
New()
..()
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
/obj/item/weapon/storage/pillbottlebox
name = "box of pill bottles"
desc = "It has pictures of pill bottles on its front."
icon_state = "pillbox"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/blankbox
name = "box of blank shells"
desc = "It has a picture of a gun and several warning symbols on the front."
icon_state = "box"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/backpack/clown
name = "Giggles Von Honkerton"
desc = "It's a backpack made by Honk! Co."
icon_state = "clownpack"
item_state = "clownpack"
/obj/item/weapon/storage/backpack/medic
name = "medical backpack"
desc = "It's a backpack especially designed for use in a sterile environment."
icon_state = "medicalpack"
item_state = "medicalpack"
/obj/item/weapon/storage/backpack/security
name = "security backpack"
desc = "It's a very robust backpack."
icon_state = "securitypack"
item_state = "securitypack"
/obj/item/weapon/storage/backpack/captain
name = "captain's backpack"
desc = "It's a special backpack made exclusively for Nanotrasen officers."
icon_state = "captainpack"
item_state = "captainpack"
/obj/item/weapon/storage/backpack/satchel
name = "leather satchel"
desc = "It's a very fancy satchel made with fine leather."
icon_state = "satchel"
/obj/item/weapon/storage/backpack/satchel/withwallet
New()
..()
new /obj/item/weapon/storage/wallet/random( src )
// Belt Bags/Satchels
/obj/item/weapon/storage/backpack/satchel_norm
name = "satchel"
desc = "A trendy looking satchel."
icon_state = "satchel-norm"
/obj/item/weapon/storage/backpack/satchel_eng
name = "industrial satchel"
desc = "A tough satchel with extra pockets."
icon_state = "satchel-eng"
item_state = "engiepack"
/obj/item/weapon/storage/backpack/satchel_med
name = "medical satchel"
desc = "A sterile satchel used in medical departments."
icon_state = "satchel-med"
item_state = "medicalpack"
/obj/item/weapon/storage/backpack/satchel_vir
name = "virologist satchel"
desc = "A sterile satchel with virologist colours."
icon_state = "satchel-vir"
/obj/item/weapon/storage/backpack/satchel_chem
name = "chemist satchel"
desc = "A sterile satchel with chemist colours."
icon_state = "satchel-chem"
/obj/item/weapon/storage/backpack/satchel_gen
name = "geneticist satchel"
desc = "A sterile satchel with geneticist colours."
icon_state = "satchel-gen"
/obj/item/weapon/storage/backpack/satchel_tox
name = "scientist satchel"
desc = "Useful for holding research materials."
icon_state = "satchel-tox"
/obj/item/weapon/storage/backpack/satchel_sec
name = "security satchel"
desc = "A robust satchel for security related needs."
icon_state = "satchel-sec"
item_state = "securitypack"
/obj/item/weapon/storage/backpack/satchel_hyd
name = "hydroponics satchel"
desc = "A green satchel for plant related work."
icon_state = "satchel_hyd"
/obj/item/weapon/storage/backpack/satchel_cap
name = "captain's satchel"
desc = "An exclusive satchel for Nanotrasen officers."
icon_state = "satchel-cap"
item_state = "captainpack"
/obj/item/weapon/storage/backpack/industrial
name = "industrial backpack"
desc = "It's a tough backpack for the daily grind of station life."
icon_state = "engiepack"
item_state = "engiepack"
/obj/item/weapon/storage/briefcase
name = "briefcase"
desc = "It's made of AUTHENTIC faux-leather and has a price-tag still attached. Its owner must be a real professional."
icon_state = "briefcase"
flags = FPRINT | TABLEPASS| CONDUCT
force = 8.0
throw_speed = 1
throw_range = 4
w_class = 4.0
max_w_class = 3
max_combined_w_class = 16
/obj/item/weapon/storage/wallet
name = "wallet"
desc = "It can hold a few small and personal things."
storage_slots = 4
icon_state = "wallet"
w_class = 2
can_hold = list(
"/obj/item/weapon/spacecash",
"/obj/item/weapon/card",
"/obj/item/clothing/mask/cigarette",
"/obj/item/device/flashlight/pen",
"/obj/item/seeds",
"/obj/item/stack/medical",
"/obj/item/toy/crayon",
"/obj/item/weapon/coin",
"/obj/item/weapon/dice",
"/obj/item/weapon/disk",
"/obj/item/weapon/implanter",
"/obj/item/weapon/lighter",
"/obj/item/weapon/match",
"/obj/item/weapon/paper",
"/obj/item/weapon/pen",
"/obj/item/weapon/photo",
"/obj/item/weapon/reagent_containers/dropper",
"/obj/item/weapon/screwdriver",
"/obj/item/weapon/stamp")
attackby(obj/item/A as obj, mob/user as mob)
..()
update_icon()
return
update_icon()
for(var/obj/item/weapon/card/id/ID in contents)
switch(ID.icon_state)
if("id")
icon_state = "walletid"
return
if("silver")
icon_state = "walletid_silver"
return
if("gold")
icon_state = "walletid_gold"
return
if("centcom")
icon_state = "walletid_centcom"
return
icon_state = "wallet"
proc/get_id()
for(var/obj/item/weapon/card/id/ID in contents)
if(istype(ID))
return ID
/obj/item/weapon/storage/wallet/random/New()
..()
var/item1_type = pick( /obj/item/weapon/spacecash/c10,/obj/item/weapon/spacecash/c100,/obj/item/weapon/spacecash/c1000,/obj/item/weapon/spacecash/c20,/obj/item/weapon/spacecash/c200,/obj/item/weapon/spacecash/c50, /obj/item/weapon/spacecash/c500)
var/item2_type
if(prob(50))
item2_type = pick( /obj/item/weapon/spacecash/c10,/obj/item/weapon/spacecash/c100,/obj/item/weapon/spacecash/c1000,/obj/item/weapon/spacecash/c20,/obj/item/weapon/spacecash/c200,/obj/item/weapon/spacecash/c50, /obj/item/weapon/spacecash/c500)
var/item3_type = pick( /obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/gold, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron )
spawn(2)
if(item1_type)
new item1_type(src)
if(item2_type)
new item2_type(src)
if(item3_type)
new item3_type(src)
/obj/item/weapon/storage/disk_kit
name = "box of data disks"
desc = "It has a picture of a data disk on it."
icon_state = "id"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/disk_kit/disks
/obj/item/weapon/storage/disk_kit/disks2
/obj/item/weapon/storage/fcard_kit
name = "box of fingerprint cards"
desc = "It has a picture of a fingerprint on each of its faces."
icon_state = "id"
item_state = "syringe_kit"
/obj/item/weapon/storage/firstaid
name = "first-aid kit"
desc = "It's an emergency medical kit for those serious boo-boos."
icon_state = "firstaid"
throw_speed = 2
throw_range = 8
var/empty = 0
/obj/item/weapon/storage/firstaid/fire
name = "fire first-aid kit"
desc = "It's an emergency medical kit for when the toxins lab <i>-spontaneously-</i> burns down."
icon_state = "ointment"
item_state = "firstaid-ointment"
/obj/item/weapon/storage/firstaid/regular
icon_state = "firstaid"
/obj/item/weapon/storage/syringes
name = "syringes"
desc = "A box full of syringes."
desc = "A biohazard alert warning is printed on the box"
icon_state = "syringe"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/firstaid/toxin
name = "toxin first aid"
desc = "Used to treat when you have a high amoutn of toxins in your body."
icon_state = "antitoxin"
item_state = "firstaid-toxin"
/obj/item/weapon/storage/firstaid/o2
name = "oxygen deprivation first aid"
desc = "A box full of oxygen goodies."
icon_state = "o2"
item_state = "firstaid-o2"
/obj/item/weapon/storage/flashbang_kit
name = "flashbangs (WARNING)"
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>"
icon_state = "flashbang"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/emp_kit
name = "emp grenades"
desc = "A box with 5 emp grenades."
icon_state = "flashbang"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/gl_kit
name = "Prescription Glasses"
desc = "This box contains nerd glasses."
icon_state = "glasses"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/seccart_kit
name = "Spare R.O.B.U.S.T. Cartridges"
desc = "A box full of R.O.B.U.S.T. Cartridges, used by Security."
icon = 'icons/obj/pda.dmi'
icon_state = "pdabox"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/handcuff_kit
name = "Spare Handcuffs"
desc = "A box full of handcuffs."
icon_state = "handcuff"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/id_kit
name = "Spare IDs"
desc = "Has so many empty IDs."
icon_state = "id"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/lglo_kit
name = "Latex Gloves"
desc = "Contains white gloves."
icon_state = "latex"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/injectbox
name = "DNA-Injectors"
desc = "This box contains injectors it seems."
icon_state = "box"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/stma_kit
name = "Sterile Masks"
desc = "This box contains masks of sterility."
icon_state = "sterile"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/trackimp_kit
name = "Tracking Implant Kit"
desc = "Box full of scum-bag tracking utensils."
icon_state = "implant"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/chemimp_kit
name = "Chemical Implant Kit"
desc = "Box of stuff used to implant chemicals."
icon_state = "implant"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/toolbox
name = "toolbox"
desc = "Danger. Very robust."
icon = 'icons/obj/storage.dmi'
icon_state = "red"
item_state = "toolbox_red"
flags = FPRINT | TABLEPASS| CONDUCT
force = 5.0
throwforce = 10.0
throw_speed = 1
throw_range = 7
w_class = 4.0
origin_tech = "combat=1"
attack_verb = list("robusted")
/obj/item/weapon/storage/toolbox/emergency
name = "emergency toolbox"
icon_state = "red"
item_state = "toolbox_red"
/obj/item/weapon/storage/toolbox/mechanical
name = "mechanical toolbox"
icon_state = "blue"
item_state = "toolbox_blue"
/obj/item/weapon/storage/toolbox/electrical
name = "electrical toolbox"
icon_state = "yellow"
item_state = "toolbox_yellow"
/obj/item/weapon/storage/toolbox/syndicate
name = "suspicious looking toolbox"
icon_state = "syndicate"
item_state = "toolbox_syndi"
origin_tech = "combat=1;syndicate=1"
force = 7.0
/obj/item/weapon/storage/bible
name = "bible"
desc = "A holy book." //BS12 EDIT
icon_state ="bible"
throw_speed = 1
throw_range = 5
w_class = 3.0
flags = FPRINT | TABLEPASS
var/mob/affecting = null
var/deity_name = "Christ"
/obj/item/weapon/storage/bible/booze
name = "bible"
desc = "A holy book. Smells faintly of alcohol" //BS12 EDIT
/obj/item/weapon/storage/mousetraps
name = "box of Pest-B-Gon Mousetraps"
desc = "<B><FONT=red>WARNING:</FONT></B> <I>Keep out of reach of children</I>."
icon_state = "mousetraps"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/donkpocket_kit
name = "box of donk-pockets"
desc = "<B>Instructions:</B> <I>Heat in microwave. Product will cool if not eaten within seven minutes.</I>"
icon_state = "donk_kit"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/condimentbottles
name = "box of condiment bottles"
desc = "It has a large ketchup smear on it."
icon_state = "box"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/drinkingglasses
name = "box of drinking glasses"
desc = "It has a picture of drinking glasses on it."
icon_state = "box"
item_state = "syringe_kit"
/obj/structure/closet/syndicate/resources/
desc = "An old, dusty locker."
/obj/structure/closet/syndicate/resources/New()
..()
var/common_min = 30 //Minimum amount of minerals in the stack for common minerals
var/common_max = 50 //Maximum amount of HONK in the stack for HONK common minerals
var/rare_min = 5 //Minimum HONK of HONK in the stack HONK HONK rare minerals
var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK
sleep(2)
var/pickednum = rand(1, 50)
//Sad trombone
if(pickednum == 1)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
P.name = "IOU"
P.info = "Sorry man, we needed the money so we sold your stash. It's ok, we'll double our money for sure this time!"
//Metal (common ore)
if(pickednum >= 2)
new /obj/item/stack/sheet/metal(src, rand(common_min, common_max))
//Glass (common ore)
if(pickednum >= 5)
new /obj/item/stack/sheet/glass(src, rand(common_min, common_max))
//Plasteel (common ore) Because it has a million more uses then plasma
if(pickednum >= 10)
new /obj/item/stack/sheet/plasteel(src, rand(common_min, common_max))
//Plasma (rare ore)
if(pickednum >= 15)
new /obj/item/stack/sheet/mineral/plasma(src, rand(rare_min, rare_max))
//Silver (rare ore)
if(pickednum >= 20)
new /obj/item/stack/sheet/mineral/silver(src, rand(rare_min, rare_max))
//Gold (rare ore)
if(pickednum >= 30)
new /obj/item/stack/sheet/mineral/gold(src, rand(rare_min, rare_max))
//Uranium (rare ore)
if(pickednum >= 40)
new /obj/item/stack/sheet/mineral/uranium(src, rand(rare_min, rare_max))
//Diamond (rare HONK)
if(pickednum >= 45)
new /obj/item/stack/sheet/mineral/diamond(src, rand(rare_min, rare_max))
//Jetpack (You hit the jackpot!)
if(pickednum == 50)
new /obj/item/weapon/tank/jetpack/carbondioxide(src)
return
/obj/structure/closet/syndicate/resources/everything
desc = "It's an emergency storage closet for repairs."
/obj/structure/closet/syndicate/resources/everything/New()
var/list/resources = list(
/obj/item/stack/sheet/metal,
/obj/item/stack/sheet/glass,
/obj/item/stack/sheet/mineral/gold,
/obj/item/stack/sheet/mineral/silver,
/obj/item/stack/sheet/mineral/plasma,
/obj/item/stack/sheet/mineral/uranium,
/obj/item/stack/sheet/mineral/diamond,
/obj/item/stack/sheet/mineral/clown,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/rods
)
sleep(2)
for(var/i = 0, i<2, i++)
for(var/res in resources)
var/obj/item/stack/R = new res(src)
R.amount = R.max_amount
return
/obj/item/weapon/storage/satchel
name = "Mining Satchel"
desc = "This little bugger can be used to store and transport ores."
icon = 'icons/obj/mining.dmi'
icon_state = "satchel"
slot_flags = SLOT_BELT | SLOT_POCKET
w_class = 3
storage_slots = 50
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
use_to_pickup = 1
max_w_class = 3
display_contents_with_number = 1
allow_quick_empty = 1
allow_quick_gather = 1
can_hold = list(
"/obj/item/weapon/ore"
)
-334
View File
@@ -1,334 +0,0 @@
/obj/machinery/vending
name = "Vendomat"
desc = "A generic vending machine."
icon = 'icons/obj/vending.dmi'
icon_state = "generic"
layer = 2.9
anchored = 1
density = 1
var/active = 1 //No sales pitches if off!
var/vend_ready = 1 //Are we ready to vend?? Is it time??
var/vend_delay = 10 //How long does it take to vend?
var/product_paths = "" //String of product paths separated by semicolons. No spaces!
var/product_amounts = "" //String of product amounts separated by semicolons, must have amount for every path in product_paths
var/product_slogans = "" //String of slogans separated by semicolons, optional
var/product_ads = "" //String of small ad messages in the vending screen - random chance
var/product_hidden = "" //String of products that are hidden unless hacked.
var/product_hideamt = "" //String of hidden product amounts, separated by semicolons. Exact same as amounts. Must be left blank if hidden is.
var/product_coin = ""
var/product_coin_amt = ""
var/list/product_records = list()
var/list/hidden_records = list()
var/list/coin_records = list()
var/list/slogan_list = list()
var/list/small_ads = list() // small ad messages in the vending screen - random chance of popping up whenever you open it
var/vend_reply //Thank you for shopping!
var/last_reply = 0
var/last_slogan = 0 //When did we last pitch?
var/slogan_delay = 6000 //How long until we can pitch again?
var/icon_vend //Icon_state when vending!
var/icon_deny //Icon_state when vending!
//var/emagged = 0 //Ignores if somebody doesn't have card access to that machine.
var/seconds_electrified = 0 //Shock customers like an airlock.
var/shoot_inventory = 0 //Fire items at customers! We're broken!
var/shut_up = 1 //Stop spouting those godawful pitches!
var/extended_inventory = 0 //can we access the hidden inventory?
var/panel_open = 0 //Hacking that vending machine. Gonna get a free candy bar.
var/wires = 15
var/obj/item/weapon/coin/coin
/*
/obj/machinery/vending/[vendors name here] // --vending machine template :)
name = ""
desc = ""
icon = ''
icon_state = ""
product_paths = ""
product_amounts = ""
vend_delay = 15
product_hidden = ""
product_hideamt = ""
product_slogans = ""
product_ads = ""
*/
/*
/obj/machinery/vending/atmospherics //Commenting this out until someone ponies up some actual working, broken, and unpowered sprites - Quarxink
name = "Tank Vendor"
desc = "A vendor with a wide variety of masks and gas tanks."
icon = 'icons/obj/objects.dmi'
icon_state = "dispenser"
product_paths = "/obj/item/weapon/tank/oxygen;/obj/item/weapon/tank/plasma;/obj/item/weapon/tank/emergency_oxygen;/obj/item/weapon/tank/emergency_oxygen/engi;/obj/item/clothing/mask/breath"
product_amounts = "10;10;10;5;25"
vend_delay = 0
*/
/obj/machinery/vending/boozeomat
name = "Booze-O-Mat"
desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one."
icon_state = "boozeomat" //////////////18 drink entities below, plus the glasses, in case someone wants to edit the number of bottles
icon_deny = "boozeomat-deny"
product_paths = "/obj/item/weapon/reagent_containers/food/drinks/bottle/gin;/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey;/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla;/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka;/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth;/obj/item/weapon/reagent_containers/food/drinks/bottle/rum;/obj/item/weapon/reagent_containers/food/drinks/bottle/wine;/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac;/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua;/obj/item/weapon/reagent_containers/food/drinks/beer;/obj/item/weapon/reagent_containers/food/drinks/ale;/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice;/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice;/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice;/obj/item/weapon/reagent_containers/food/drinks/bottle/cream;/obj/item/weapon/reagent_containers/food/drinks/tonic;/obj/item/weapon/reagent_containers/food/drinks/cola;/obj/item/weapon/reagent_containers/food/drinks/sodawater;/obj/item/weapon/reagent_containers/food/drinks/drinkingglass;/obj/item/weapon/reagent_containers/food/drinks/ice"
product_amounts = "5;5;5;5;5;5;5;5;5;6;6;4;4;4;4;8;8;15;30;9"
vend_delay = 15
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/tea"
product_hideamt = "10"
product_slogans = "I hope nobody asks me for a bloody cup o' tea...;Alcohol is humanity's friend. Would you abandon a friend?;Quite delighted to serve you!;Is nobody thirsty on this station?"
product_ads = "Drink up!;Booze is good for you!;Alcohol is humanity's best friend.;Quite delighted to serve you!;Care for a nice, cold beer?;Nothing cures you like booze!;Have a sip!;Have a drink!;Have a beer!;Beer is good for you!;Only the finest alcohol!;Best quality booze since 2053!;Award-winning wine!;Maximum alcohol!;Man loves beer.;A toast for progress!"
req_access_txt = "25"
/obj/machinery/vending/assist
product_amounts = "5;3;4;1;4"
product_hidden = "/obj/item/device/flashlight;obj/item/device/assembly/timer"
product_paths = "/obj/item/device/assembly/prox_sensor;/obj/item/device/assembly/igniter;/obj/item/device/assembly/signaler;/obj/item/weapon/wirecutters;/obj/item/weapon/cartridge/signal"
product_hideamt = "5;2"
product_ads = "Only the finest!;Have some tools.;The most robust equipment.;The finest gear in space!"
/obj/machinery/vending/coffee
name = "Hot Drinks machine"
desc = "A vending machine which dispenses hot drinks."
icon_state = "coffee"
icon_vend = "coffee-vend"
product_paths = "/obj/item/weapon/reagent_containers/food/drinks/coffee;/obj/item/weapon/reagent_containers/food/drinks/tea;/obj/item/weapon/reagent_containers/food/drinks/h_chocolate"
product_amounts = "25;25;25"
vend_delay = 34
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/ice"
product_ads = "Have a drink!;Drink up!;It's good for you!;Would you like a hot joe?;I'd kill for some coffee!;The best beans in the galaxy.;Only the finest brew for you.;Mmmm. Nothing like a coffee.;I like coffee, don't you?;Coffee helps you work!;Try some tea.;We hope you like the best!;Try our new chocolate!;Admin conspiracies"
product_hideamt = "10"
/obj/machinery/vending/snack
name = "Getmore Chocolate Corp"
desc = "A snack machine courtesy of the Getmore Chocolate Corporation, based out of Mars"
icon_state = "snack"
product_paths = "/obj/item/weapon/reagent_containers/food/snacks/candy;/obj/item/weapon/reagent_containers/food/drinks/dry_ramen;/obj/item/weapon/reagent_containers/food/snacks/chips;/obj/item/weapon/reagent_containers/food/snacks/sosjerky;/obj/item/weapon/reagent_containers/food/snacks/no_raisin;/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie;/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers"
product_amounts = "6;6;6;6;6;6;6"
product_slogans = "Try our new nougat bar!;Twice the calories for half the price!"
product_hidden = "/obj/item/weapon/reagent_containers/food/snacks/syndicake"
product_hideamt = "6"
product_ads = "The healthiest!;Award-winning chocolate bars!;Mmm! So good!;Oh my god it's so juicy!;Have a snack.;Snacks are good for you!;Have some more Getmore!;Best quality snacks straight from mars.;We love chocolate!;Try our new jerky!"
/obj/machinery/vending/cola
name = "Robust Softdrinks"
desc = "A softdrink vendor provided by Robust Industries, LLC."
icon_state = "Cola_Machine"
product_paths = "/obj/item/weapon/reagent_containers/food/drinks/cola;/obj/item/weapon/reagent_containers/food/drinks/space_mountain_wind;/obj/item/weapon/reagent_containers/food/drinks/dr_gibb;/obj/item/weapon/reagent_containers/food/drinks/starkist;/obj/item/weapon/reagent_containers/food/drinks/space_up"
product_amounts = "10;10;10;10;10"
product_slogans = "Robust Softdrinks: More robust than a toolbox to the head!"
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/thirteenloko"
product_hideamt = "5"
product_ads = "Refreshing!;Hope you're thirsty!;Over 1 million drinks sold!;Thirsty? Why not cola?;Please, have a drink!;Drink up!;The best drinks in space."
//This one's from bay12
/obj/machinery/vending/cart
name = "PTech"
desc = "Cartridges for PDAs"
icon_state = "cart"
icon_deny = "cart-deny"
product_paths = "/obj/item/weapon/cartridge/medical;/obj/item/weapon/cartridge/engineering;/obj/item/weapon/cartridge/security;/obj/item/weapon/cartridge/janitor;/obj/item/weapon/cartridge/signal/toxins;/obj/item/device/pda/heads;/obj/item/weapon/cartridge/captain;/obj/item/weapon/cartridge/quartermaster"
product_amounts = "10;10;10;10;10;10;3;10"
product_slogans = "Carts to go!"
product_hidden = ""
product_hideamt = ""
product_coin = ""
product_coin_amt = ""
/obj/machinery/vending/cigarette
name = "Cigarette machine" //OCD had to be uppercase to look nice with the new formating
desc = "If you want to get cancer, might as well do it in style"
icon_state = "cigs"
product_paths = "/obj/item/weapon/cigpacket;/obj/item/weapon/storage/matchbox;/obj/item/weapon/lighter/random"
product_amounts = "10;10;4"
product_slogans = "Space cigs taste good like a cigarette should.;I'd rather toolbox than switch.;Smoke!;Don't believe the reports - smoke today!"
vend_delay = 34
product_hidden = "/obj/item/weapon/lighter/zippo"
product_hideamt = "4"
product_coin = "/obj/item/clothing/mask/cigarette/cigar/havana"
product_coin_amt = "2"
product_ads = "Probably not bad for you!;Don't believe the scientists!;It's good for you!;Don't quit, buy more!;Smoke!;Nicotine heaven.;Best cigarettes since 2150.;Award-winning cigs."
/obj/machinery/vending/medical
name = "NanoMed Plus"
desc = "Medical drug dispenser."
icon_state = "med"
icon_deny = "med-deny"
req_access_txt = "5"
product_paths = "/obj/item/weapon/reagent_containers/glass/bottle/antitoxin;/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline;/obj/item/weapon/reagent_containers/glass/bottle/stoxin;/obj/item/weapon/reagent_containers/glass/bottle/toxin;/obj/item/weapon/reagent_containers/syringe/antiviral;/obj/item/weapon/reagent_containers/syringe;/obj/item/device/healthanalyzer;/obj/item/weapon/reagent_containers/glass/beaker;/obj/item/weapon/reagent_containers/dropper"
product_amounts = "4;4;4;4;4;12;5;4;2"
product_hidden = "/obj/item/weapon/reagent_containers/pill/tox;/obj/item/weapon/reagent_containers/pill/stox;/obj/item/weapon/reagent_containers/pill/antitox"
product_hideamt = "3;4;6"
product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?;Ping!"
//This one's from bay12
/obj/machinery/vending/plasmaresearch
name = "Toximate 3000"
desc = "All the fine parts you need in one vending machine!"
product_paths = "/obj/item/clothing/under/rank/scientist;/obj/item/clothing/suit/bio_suit;/obj/item/clothing/head/bio_hood;/obj/item/device/transfer_valve;/obj/item/device/assembly/signaler;/obj/item/device/assembly/prox_sensor;/obj/item/device/assembly/igniter;/obj/item/device/assembly/timer"
product_amounts = "6;6;6;6;6"
product_hidden = ""
product_hideamt = ""
product_coin = ""
product_coin_amt = ""
/obj/machinery/vending/wallmed1
name = "NanoMed"
desc = "Wall-mounted Medical Equipment dispenser."
icon_state = "wallmed"
icon_deny = "wallmed-deny"
req_access_txt = "5"
product_paths = "/obj/item/stack/medical/bruise_pack;/obj/item/stack/medical/ointment;/obj/item/weapon/reagent_containers/syringe/inaprovaline;/obj/item/device/healthanalyzer"
product_amounts = "2;2;4;1"
product_hidden = "/obj/item/weapon/reagent_containers/syringe/antitoxin;/obj/item/weapon/reagent_containers/syringe/antiviral;/obj/item/weapon/reagent_containers/pill/tox"
product_hideamt = "4;4;1"
density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude
product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?"
/obj/machinery/vending/wallmed2
name = "NanoMed"
desc = "Wall-mounted Medical Equipment dispenser."
icon_state = "wallmed"
icon_deny = "wallmed-deny"
req_access_txt = "5"
product_paths = "/obj/item/weapon/reagent_containers/syringe/inaprovaline;/obj/item/weapon/reagent_containers/syringe/antitoxin;/obj/item/stack/medical/bruise_pack;/obj/item/stack/medical/ointment;/obj/item/device/healthanalyzer"
product_amounts = "5;3;3;3;3"
product_hidden = "/obj/item/weapon/reagent_containers/pill/tox"
product_hideamt = "3"
density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude
/obj/machinery/vending/security
name = "SecTech"
desc = "A security equipment vendor"
icon_state = "sec"
icon_deny = "sec-deny"
req_access_txt = "1"
product_paths = "/obj/item/weapon/handcuffs;/obj/item/weapon/grenade/flashbang;/obj/item/device/flash;/obj/item/weapon/reagent_containers/food/snacks/donut/normal;/obj/item/weapon/storage/box/evidence"
product_amounts = "8;4;5;12;6"
product_hidden = "/obj/item/clothing/glasses/sunglasses;/obj/item/weapon/storage/fancy/donut_box"
product_hideamt = "2;2"
product_ads = "Crack capitalist skulls!;Beat some heads in!;Don't forget - harm is good!;Your weapons are right here.;Handcuffs!;Freeze, scumbag!;Don't tase me bro!;Tase them, bro.;Why not have a donut?"
/obj/machinery/vending/hydronutrients
name = "NutriMax"
desc = "A plant nutrients vendor"
icon_state = "nutri"
icon_deny = "nutri-deny"
product_paths = "/obj/item/nutrient/ez;/obj/item/nutrient/l4z;/obj/item/nutrient/rh;/obj/item/weapon/pestspray;/obj/item/weapon/reagent_containers/syringe;/obj/item/weapon/plantbag;/obj/item/weapon/seedbag"
product_amounts = "35;25;15;20;5;5;5"
product_slogans = "Aren't you glad you don't have to fertilize the natural way?;Now with 50% less stink!;Plants are people too!"
product_hidden = "/obj/item/weapon/reagent_containers/glass/bottle/ammonia;/obj/item/weapon/reagent_containers/glass/bottle/diethylamine"
product_hideamt = "10;5"
product_ads = "We like plants!;Don't you want some?;The greenest thumbs ever.;We like big plants.;Soft soil..."
/obj/machinery/vending/hydroseeds
name = "MegaSeed Servitor"
desc = "When you need seeds fast!"
icon_state = "seeds"
product_paths = "/obj/item/seeds/bananaseed;/obj/item/seeds/berryseed;/obj/item/seeds/carrotseed;/obj/item/seeds/chantermycelium;/obj/item/seeds/chiliseed;/obj/item/seeds/cornseed;/obj/item/seeds/eggplantseed;/obj/item/seeds/potatoseed;/obj/item/seeds/replicapod;/obj/item/seeds/soyaseed;/obj/item/seeds/sunflowerseed;/obj/item/seeds/tomatoseed;/obj/item/seeds/towermycelium;/obj/item/seeds/wheatseed;/obj/item/seeds/appleseed;/obj/item/seeds/poppyseed;/obj/item/seeds/ambrosiavulgarisseed;/obj/item/seeds/whitebeetseed;/obj/item/seeds/watermelonseed;/obj/item/seeds/limeseed;/obj/item/seeds/lemonseed;/obj/item/seeds/orangeseed;/obj/item/seeds/grassseed;/obj/item/seeds/cocoapodseed;/obj/item/seeds/cabbageseed;/obj/item/seeds/grapeseed;/obj/item/seeds/pumpkinseed;/obj/item/seeds/cherryseed"
product_amounts = "3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3"
product_slogans = "THIS'S WHERE TH' SEEDS LIVE! GIT YOU SOME!;Hands down the best seed selection on the station!;Also certain mushroom varieties available, more for experts! Get certified today!"
product_hidden = "/obj/item/seeds/amanitamycelium;/obj/item/seeds/glowshroom;/obj/item/seeds/libertymycelium;/obj/item/seeds/nettleseed;/obj/item/seeds/plumpmycelium;/obj/item/seeds/reishimycelium"
product_hideamt = "2;2;2;2;2;2"
product_coin = "/obj/item/toy/waterflower"
product_coin_amt = "1"
product_ads = "We like plants!;Grow some crops!;Grow, baby, growww!;Aw h'yeah son!"
/obj/machinery/vending/liquid
name = "LiquidRation Dispenser"
desc = "All the food you'll ever need to survive!"
icon_state = "liquidfood"
product_paths = "/obj/item/weapon/reagent_containers/food/snacks/liquidfood;/obj/item/weapon/flavor/red;/obj/item/weapon/flavor/blue"
product_amounts = "20;10;10"
product_slogans = "Enjoy your NanoTrasen \"LiquidFood\" Ration! Now with a choice of TWO delicious flavors!"
product_ads = "Think of it as free survival!;It's even healthy!;Take a quick break, enjoy your ration!"
/obj/machinery/vending/magivend
name = "MagiVend"
desc = "A magic vending machine."
icon_state = "MagiVend"
product_amounts = "1;1;1;1;1;2"
product_slogans = "Sling spells the proper way with MagiVend!;Be your own Houdini! Use MagiVend!"
product_paths = "/obj/item/clothing/head/wizard;/obj/item/clothing/suit/wizrobe;/obj/item/clothing/head/wizard/red;/obj/item/clothing/suit/wizrobe/red;/obj/item/clothing/shoes/sandal;/obj/item/weapon/staff"
vend_delay = 15
vend_reply = "Have an enchanted evening!"
product_hidden = "/obj/item/weapon/reagent_containers/glass/bottle/wizarditis" //No one can get to the machine to hack it anyways
product_hideamt = "1" //Just one, for the lulz, not like anyone can get it - Microwave
product_ads = "FJKLFJSD;AJKFLBJAKL;1234 LOONIES LOL!;>MFW;Kill them fuckers!;GET DAT FUKKEN DISK;HONK!;EI NATH;Destroy the station!;Admin conspiracies since forever!;Space-time bending hardware!"
/obj/machinery/vending/dinnerware
name = "Dinnerware"
desc = "A kitchen and restaurant equipment vendor"
icon_state = "dinnerware"
product_paths = "/obj/item/weapon/tray;/obj/item/weapon/kitchen/utensil/fork;/obj/item/weapon/kitchenknife;/obj/item/weapon/reagent_containers/food/drinks/drinkingglass;/obj/item/clothing/suit/chef/classic"
product_amounts = "8;6;3;8;2"
//product_amounts = "8;5;4" Old totals
product_hidden = "/obj/item/weapon/kitchen/utensil/spoon;/obj/item/weapon/kitchen/utensil/knife;/obj/item/weapon/kitchen/rollingpin;/obj/item/weapon/butch"
product_hideamt = "2;2;2;2"
product_ads = "Mm, food stuffs!;Food and food accessories.;Get your plates!;You like forks?;I like forks.;Woo, utensils.;You don't really need these..."
/obj/machinery/vending/sovietsoda
name = "BODA"
desc = "Old sweet water vending machine"
icon_state = "sovietsoda"
product_paths = "/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/soda"
product_amounts = "30"
//product_amounts = "8;5;4" Old totals
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/cola"
product_hideamt = "20"
product_ads = "For Tsar and Country.;Have you fulfilled your nutrition quota today?;Very nice!;We are simple people, for this is all we eat.;If there is a person, there is a problem. If there is no person, then there is no problem."
/obj/machinery/vending/tool
name = "YouTool"
desc = "Tools for tools."
icon_state = "tool"
icon_deny = "tool-deny"
//req_access_txt = "12" //Maintenance access
product_paths = "/obj/item/weapon/cable_coil/random;/obj/item/weapon/crowbar;/obj/item/weapon/weldingtool;/obj/item/weapon/wirecutters;/obj/item/weapon/wrench;/obj/item/device/analyzer;/obj/item/device/t_scanner"
product_amounts = "10;5;3;5;5;5;5"
product_hidden = "/obj/item/weapon/weldingtool/hugeetank;/obj/item/clothing/gloves/fyellow"
product_hideamt = "2;2"
product_coin = "/obj/item/clothing/gloves/yellow"
product_coin_amt = "1"
/obj/machinery/vending/engivend
name = "Engi-Vend"
desc = "Spare tool vending. What? Did you expect some witty description?"
icon_state = "engivend"
icon_deny = "engivend-deny"
req_access_txt = "10" //Engineering access
product_paths = "/obj/item/clothing/glasses/meson;/obj/item/device/multitool;/obj/item/weapon/airlock_electronics;/obj/item/weapon/module/power_control;/obj/item/weapon/cell/high"
product_amounts = "2;4;10;10;10"
product_hidden = "/obj/item/weapon/cell/potato"
product_hideamt = "3"
product_coin = "/obj/item/weapon/storage/belt/utility"
product_coin_amt = "3"
//This one's from bay12
/obj/machinery/vending/engineering
name = "Robco Tool Maker"
desc = "Everything you need for do-it-yourself station repair."
icon_state = "engi"
icon_deny = "engi-deny"
req_access_txt = "10"
product_paths = "/obj/item/clothing/under/rank/chief_engineer;/obj/item/clothing/under/rank/engineer;/obj/item/clothing/shoes/orange;/obj/item/clothing/head/helmet/hardhat;/obj/item/weapon/storage/belt/utility;/obj/item/clothing/glasses/meson;/obj/item/clothing/gloves/yellow;/obj/item/weapon/screwdriver;/obj/item/weapon/crowbar;/obj/item/weapon/wirecutters;/obj/item/device/multitool;/obj/item/weapon/wrench;/obj/item/device/t_scanner;/obj/item/weapon/CableCoil/power;/obj/item/weapon/circuitry;/obj/item/weapon/cell;/obj/item/weapon/weldingtool;/obj/item/clothing/head/helmet/welding;/obj/item/weapon/light/tube;/obj/item/clothing/suit/fire;/obj/item/weapon/stock_parts/scanning_module;/obj/item/weapon/stock_parts/micro_laser;/obj/item/weapon/stock_parts/matter_bin;/obj/item/weapon/stock_parts/manipulator;/obj/item/weapon/stock_parts/console_screen"
// product_amounts = "4;4;4;4;4;4;4;12;12;12;12;12;12;8;4;8;8;8;10;4"
product_hidden = ""
product_hideamt = ""
product_coin = ""
product_coin_amt = ""
//This one's from bay12
/obj/machinery/vending/robotics
name = "Robotech Deluxe"
desc = "All the tools you need to create your own robot army."
icon_state = "robotics"
icon_deny = "robotics-deny"
req_access_txt = "29"
product_paths = "/obj/item/clothing/suit/storage/labcoat;/obj/item/clothing/under/rank/roboticist;/obj/item/weapon/cable_coil;/obj/item/device/flash;/obj/item/weapon/cell/high;/obj/item/device/assembly/prox_sensor;/obj/item/device/assembly/signaler;/obj/item/device/healthanalyzer;/obj/item/weapon/scalpel;/obj/item/weapon/circular_saw;/obj/item/weapon/tank/anesthetic;/obj/item/clothing/mask/medical;/obj/item/weapon/screwdriver;/obj/item/weapon/crowbar"
product_amounts = "4;4;4;4;12"
product_hidden = ""
product_hideamt = ""
product_coin = ""
product_coin_amt = ""
+23 -1
View File
@@ -27,7 +27,7 @@
/obj/item/weapon/spacecash
name = "space cash"
name = "1 credit chip"
desc = "It's worth 1 credit."
gender = PLURAL
icon = 'icons/obj/items.dmi'
@@ -42,35 +42,57 @@
w_class = 1.0
var/access = list()
access = access_crate_cash
var/worth = 1
/obj/item/weapon/spacecash/c10
name = "10 credit chip"
icon_state = "spacecash10"
access = access_crate_cash
desc = "It's worth 10 credits."
worth = 10
/obj/item/weapon/spacecash/c20
name = "20 credit chip"
icon_state = "spacecash20"
access = access_crate_cash
desc = "It's worth 20 credits."
worth = 20
/obj/item/weapon/spacecash/c50
name = "50 credit chip"
icon_state = "spacecash50"
access = access_crate_cash
desc = "It's worth 50 credits."
worth = 50
/obj/item/weapon/spacecash/c100
name = "100 credit chip"
icon_state = "spacecash100"
access = access_crate_cash
desc = "It's worth 100 credits."
worth = 100
/obj/item/weapon/spacecash/c200
name = "200 credit chip"
icon_state = "spacecash200"
access = access_crate_cash
desc = "It's worth 200 credits."
worth = 200
/obj/item/weapon/spacecash/c500
name = "500 credit chip"
icon_state = "spacecash500"
access = access_crate_cash
desc = "It's worth 500 credits."
worth = 500
/obj/item/weapon/spacecash/c1000
name = "1000 credit chip"
icon_state = "spacecash1000"
access = access_crate_cash
desc = "It's worth 1000 credits."
worth = 1000
/obj/item/weapon/bananapeel
name = "banana peel"
-32
View File
@@ -1,32 +0,0 @@
/* Atom procs
These procs expand on the basic built in procs.
Bumped(O)
Automatically called whenever a movable atom O Bump()s into src.
Proc protype designed to be overridden for specific objects.
Trigger(O)
Automatically called whenever a movable atom O steps into the same
turf with src.
Proc protype designed to be overridden for specific objects.
*/
atom
proc
Bumped(O)
// O just Bump()ed into src.
// prototype Bumped() proc for all atoms
Trigger(O)
atom/movable
Bump(atom/A)
if(istype(A)) A.Bumped(src) // tell A that src bumped into it
..()
turf
Entered(atom/O)
for(var/atom/A in contents - O)
if(O)
O.Trigger(A)
..()
-131
View File
@@ -1,131 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/* base 64 procs
These procs convert plain text to a hexidecimal string to 64 encoded text and vice versa.
sd_base64toHex(encode64, pad_code = 67)
Accepts a base 64 encoded text and returns the hexidecimal equivalent.
ARGS:
encode64 = the base64 text to convert
pad_code = the character or ASCII code used to pad the base64 text.
DEFAULT: 67 (= sign)
RETURNS: the hexidecimal text
sd_hex2base64(hextext, pad_char = "=")
Accepts a hexidecimal string and returns the base 64 encoded text equivalent.
ARGS:
hextext = hex text to convert
pad_char = the character or ASCII code used to pad the base64 text.
DEFAULT: "=" (ASCII 67)
RETURNS: the base64 text
sd_hex2text(hex)
Accepts a hexidecimal string and returns the plain text equivalent.
sd_text2hex(txt)
Accepts a plain text string and returns the hexidecimal equivalent.
*/
/*********************************************
* Implimentation: No need to read further. *
*********************************************/
proc
sd_base64toHex(encode64, pad_code = 67)
/* convert the base 64 text encode64 to hexidecimal text
pad_code = the character or ASCII code used to pad the base64 text.
DEFAULT: 67 (= sign)
RETURNS: the hexidecimal text */
var/pos = 1
var/offset = 2
var/current = 0
var/padding = 0
var/hextext = ""
if(istext(pad_code)) pad_code = text2ascii(pad_code)
while(pos <= length(encode64))
var/val = text2ascii(encode64, pos++)
if((val >= 65) && (val <= 90)) // A to Z
val -= 65
else if((val >= 97) && (val <= 122)) // a to z
val -= 71
else if((val >= 48) && (val <= 57)) // 0 to 9
val += 4
else if(val == 43) // + sign
val = 62
else if(val == 47) // / symbol
val = 63
else if(pad_code) // padding
// the = sign indicates that some 0 bits were appended to pad the original string to
val = -1
padding ++
else // anything else (presumably whitespace)
val = -1
if(val < 0) continue // whitespace and padding ignored
if(offset>2)
var/lft = val >> (8 - offset)
current |= lft
hextext += sd_dec2base(current,,2)
current = (val << offset) & 0xFF
offset += 2
if(offset > 8)
offset = 2
if(padding)
hextext = copytext(hextext, 1, length(hextext) + 1 - padding * 2)
return hextext
sd_hex2base64(hextext, pad_char = "=")
/* convert the hexidecimal string hextext to base 64 encoded text
pad_char = the character or ASCII code used to pad the base64 text.
DEFAULT: "=" (ASCII 67)
RETURNS: the base 64 encoded text */
var/key64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
var/encode64 = ""
var/pos = 1
var/offset = 2
var/current = 0
var/len = length(hextext)
var/end = len
var/padding = end%6
if(padding)
padding = 6 - padding
end += padding
padding >>= 1
if(isnum(pad_char)) pad_char = ascii2text(pad_char)
while(pos <= end)
var/val = 0 // pad with 0s
if(pos < len) val = sd_base2dec(copytext(hextext, pos, pos+2))
pos+=2
var/lft = val >> offset
current |= lft
encode64 += copytext(key64,current+1,current+2)
current = (val << (6-offset)) & 0x3F
offset += 2
if(offset>6)
encode64 += copytext(key64,current+1,current+2)
offset = 2
current = 0
for(var/x = 1 to padding)
encode64 += pad_char
return encode64
sd_hex2text(hex)
/* convert hexidecimal text to a plain text string
RETURNS: the plain text */
var/txt = ""
for(var/loop = 1 to length(hex) step 2)
txt += ascii2text(sd_base2dec(copytext(hex,loop, loop+2)))
return txt
sd_text2hex(txt)
/* convert plain text to a hexidecimal string
RETURNS: the hexidecimal text */
var/hex = ""
for(var/loop = 1 to length(txt))
hex += sd_dec2base(text2ascii(txt,loop),,2)
return hex
-75
View File
@@ -1,75 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/* sd_color and procs
sd_color is a special datum that contains color data in various
formats. Sample colors are available in samplecolors.dm.
sd_color
var/name // the name of the color
var/red // red componant of the color
var/green // green componant of the color
var/blue // red componant of the color
var/html // html string for the color
var/icon/Icon // contains the icon produced by the rgb2icon() proc
PROCS
brightness()
Returns the grayscale brightness of the RGB color set.
html2rgb()
Calculates the rgb colors from the html colors.
rgb2html()
Calculates the html color from the rbg colors.
rgb2icon()
Converts the rgb value to a solid icon stored as src.Icon
*/
/*********************************************
* Implimentation: No need to read further. *
*********************************************/
sd_color
var/name // the name of the color
var/red = 0 // red componant of the color
var/green = 0 // green componant of the color
var/blue = 0 // red componant of the color
var/html // html string for the color
var/icon/Icon // contains the icon produced by the rgb2icon() proc
proc
brightness()
/* returns the grayscale brightness of the RGB colors. */
return round((red*30 + green*59 + blue*11)/100,1)
html2rgb()
/* Calculates the rgb colors from the html colors */
red = sd_base2dec(copytext(html,1,3))
green = sd_base2dec(copytext(html,3,5))
blue = sd_base2dec(copytext(html,5,7))
rgb2html()
/* Calculates the html color from the rbg colors */
html = sd_dec2base(red,,2) + sd_dec2base(green,,2) + sd_dec2base(blue,,2)
return html
rgb2icon()
/* Converts the rgb value to a solid icon stored as src.Icon */
Icon = 'Black.dmi' + rgb(red,green,blue)
return Icon
New()
..()
// if this is an unnamed subtype, name it according to it's type
if(!name)
name = "[type]"
var/slash = sd_findlast(name,"/")
if(slash)
name = copytext(name,slash+1)
name = sd_replacetext(name,"_"," ")
if(html) // if there is an html string
html2rgb() // convert the html to red, green, & blue values
else
rgb2html() // convert the red, green, & blue values to html
-1
View File
@@ -1 +0,0 @@
#define PI 3.141592654
-154
View File
@@ -1,154 +0,0 @@
/* Direction procs
These procs deal with BYOND directions.
sd_get_approx_dir(atom/ref,atom/target)
returns the approximate direction from ref to target.
sd_degrees2dir(degrees as num)
Accepts an angle in degrees and returns the closest BYOND
direction value.
sd_dir2degrees(dir as num)
Accepts a BYOND direction value and returns the angle North of
East in degrees.
sd_dir2radial(dir as num)
Accepts a BYOND direction value and returns the radial direction
(0-7) North of East.
sd_dir2radians(dir as num)
Accepts a BYOND direction value and returns the angle North of
East in radians.
sd_dir2text(dir as num)
Accepts a BYOND direction value and returns the lowercase text
name of the direction.
sd_dir2Text(dir as num)
Accepts a BYOND direction value and returns the Capitalized text
name of the direction
sd_radial2dir(radial as num)
Accepts a radial direction (0-7) and returns the BYOND direction
value.
*/
/*********************************************
* Implimentation: No need to read further. *
*********************************************/
proc
sd_get_approx_dir(atom/ref,atom/target)
/* returns the approximate direction from ref to target.
Code by Lummox JR
http://www.byond.com/forum/forum.cgi?action=message_list&query=Post+ID%3A153964#153964
*/
var/d=get_dir(ref,target)
if(d&d-1) // diagonal
var/ax=abs(ref.x-target.x)
var/ay=abs(ref.y-target.y)
if(ax>=ay<<1) return d&12 // keep east/west (4 and 8)
else if(ay>=ax<<1) return d&3 // keep north/south (1 and 2)
return d
sd_degrees2dir(degrees as num)
/* accepts an angle in degrees and returns the closest BYOND
direction value */
var/error_report = degrees // for error tracking
// force angle into a range between 0 and 360
degrees %= 360
if(degrees < 0)
degrees += 360
// BYOND dirs are at 45 degree angles
degrees = round(degrees,45)
switch(degrees)
if(0,360) return EAST
if(45) return NORTHEAST
if(90) return NORTH
if(135) return NORTHWEST
if(180) return WEST
if(225) return SOUTHWEST
if(270) return SOUTH
if(315) return SOUTHEAST
else
world.log << "Error in sd_degrees2dir(): [error_report] -> [degrees]"
sd_dir2degrees(dir as num)
/* accepts a BYOND direction value and returns the angle North of
East in degrees */
switch(dir)
if(EAST) return 0
if(NORTHEAST) return 45
if(NORTH) return 90
if(NORTHWEST) return 135
if(WEST) return 180
if(SOUTHWEST) return 225
if(SOUTH) return 270
if(SOUTHEAST) return 315
sd_dir2radial(dir as num)
/* accepts a BYOND direction value and returns the radial direction
(0-7) North of East */
switch(dir)
if(EAST) return 0
if(NORTHEAST) return 1
if(NORTH) return 2
if(NORTHWEST) return 3
if(WEST) return 4
if(SOUTHWEST) return 5
if(SOUTH) return 6
if(SOUTHEAST) return 7
sd_dir2radians(dir as num)
/* accepts a BYOND direction value and returns the angle North of
East in radians */
switch(dir)
if(EAST) return 0
if(NORTHEAST) return PI/4
if(NORTH) return PI/2
if(NORTHWEST) return PI*3/4
if(WEST) return PI
if(SOUTHWEST) return PI*5/4
if(SOUTH) return PI*3/2
if(SOUTHEAST) return PI*7/4
sd_dir2text(dir as num)
/* accepts a direction and returns the lowercase text name of
the direction */
switch(dir)
if(NORTH) return "north"
if(SOUTH) return "south"
if(EAST) return "east"
if(WEST) return "west"
if(NORTHEAST) return "northeast"
if(SOUTHEAST) return "southeast"
if(NORTHWEST) return "northwest"
if(SOUTHWEST) return "southwest"
sd_dir2Text(dir as num)
/* accepts a direction and returns the Capitalized text name of
the direction */
switch(dir)
if(NORTH) return "North"
if(SOUTH) return "South"
if(EAST) return "East"
if(WEST) return "West"
if(NORTHEAST) return "Northeast"
if(SOUTHEAST) return "Southeast"
if(NORTHWEST) return "Northwest"
if(SOUTHWEST) return "Southwest"
sd_radial2dir(radial as num)
/* accepts a radial direction (0-7) and returns the BYOND direction
value */
switch(radial)
if(0) return EAST
if(1) return NORTHEAST
if(2) return NORTH
if(3) return NORTHWEST
if(4) return WEST
if(5) return SOUTHWEST
if(6) return SOUTH
if(7) return SOUTHEAST
-185
View File
@@ -1,185 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/* HSL procs
These procs convert between RGB (red, green, blu) and HSL (hue, saturation, light)
color spaces. The algorithms used for these procs were found at
http://www.paris-pc-gis.com/MI_Enviro/Colors/color_models.htm
hsl2rgb(hue, sat, lgh, scale = 240)
Returns the RRGGBB format of an HSL color.
ALTERNATE FORMAT:
hsl2rgb(HSL, scale)
ARGS:
hue - hue
sat - saturation
lgh - light/dark
HSL - a hex string in format HHSSLL where:
HH = Hue from
SS = Saturation
LL = light
scale - high end of the HSL values. Some programs (like BYOND Dream Maker)
use 240, others use 255. The H {0-360}, S {0-100}, L {0-100}
scale is not supported.
DEFAULT: 240
RETURNS:
RGB color string in RRGGBB format.
rgb2hsl(red, grn, blu, scale = 240)
Returns the HSL color string of an RGB color
ALTERNATE FORMAT:
rgb2hsl(RGB, scale)
ARGS:
red - red componant {0-255}
grn - green componant {0-255}
blu - blue componant {0-255}
RGB - a hex string in format RRGGBB
scale - high end of the HSL values. Some programs (like BYOND Dream Maker)
use 240, others use 255. The H {0-360}, S {0-100}, L {0-100}
scale is not supported.
DEFAULT: 240
RETURNS:
HHSSLL color string
*/
/*********************************************
* Implimentation: No need to read further. *
*********************************************/
proc
hsl2rgb(hue, sat, lgh, scale = 240)
/* Returns the RRGGBB format of an HSL color string
algorithm from http://www.paris-pc-gis.com/MI_Enviro/Colors/color_models.htm
ALTERNATE FORMAT:
hsl2rgb(HSL, scale)
ARGS:
hue - hue
sat - saturation
lgh - light/dark
HSL - a hex string in format HHSSLL where:
HH = Hue from
SS = Saturation
LL = light
scale - high end of the HSL values. Some programs (like BYOND Dream Maker)
use 240, others use 255. The H {0-360}, S {0-100}, L {0-100}
scale is not supported.
DEFAULT: 240
RETURNS:
RGB color string in RRGGBB format. */
if(istext(hue)) // used alternate hsl2rgb("HHSSLL", scale)
if(length(hue)!=6)
CRASH("hsl2rbg('[hue]'): text argument must be a 6 character hex code.")
return
if(isnum(sat)) scale = sat
lgh = sd_base2dec(copytext(hue,5))
sat = sd_base2dec(copytext(hue,3,5))
hue = sd_base2dec(copytext(hue,1,3))
// scale decimal {0-1}
hue /= scale
sat /= scale
lgh /= scale
var/red
var/grn
var/blu
if(!sat) // greyscale
red = lgh
grn = lgh
blu = lgh
else
var/temp1
var/temp2
var/temp3
if(lgh < 0.5) temp2 = lgh * (1 + sat)
else temp2 = lgh + sat - lgh * sat
temp1 = 2 * lgh - temp2
// red
temp3 = hue + 1/3
if(temp3 > 1) temp3--
if(6*temp3<1) red = temp1 + (temp2 - temp1) * 6 * temp3
else if(2*temp3<1) red = temp2
else if(3*temp3<2) red = temp1 + (temp2 - temp1) * ((2/3) - temp3) * 6
else red = temp1
// green
temp3 = hue
if(6*temp3<1) grn = temp1 + (temp2 - temp1) * 6 * temp3
else if(2*temp3<1) grn = temp2
else if(3*temp3<2) grn = temp1 + (temp2 - temp1) * ((2/3) - temp3) * 6
else grn = temp1
// blue
temp3 = hue - 1/3
if(temp3 < 0) temp3++
if(6*temp3<1) blu = temp1 + (temp2 - temp1) * 6 * temp3
else if(2*temp3<1) blu = temp2
else if(3*temp3<2) blu = temp1 + (temp2 - temp1) * ((2/3) - temp3) * 6
else blu = temp1
// shift from {0-1} scale to integers {0-255}
red = round(red*255, 1)
grn = round(grn*255, 1)
blu = round(blu*255, 1)
// return 6 digit hex string
return sd_dec2base(red,16, 2) + sd_dec2base(grn,16, 2) + sd_dec2base(blu,16, 2)
rgb2hsl(red, grn, blu, scale = 240)
/* Returns the HSL color string of a RGB color
algorithm from http://www.paris-pc-gis.com/MI_Enviro/Colors/color_models.htm
ALTERNATE FORMAT:
rgb2hsl(RGB, scale)
ARGS:
red - red componant {0-255}
grn - green componant {0-255}
blu - blue componant {0-255}
RGB - a hex string in format RRGGBB
scale - high end of the HSL values. Some programs (like BYOND Dream Maker)
use 240, others use 255. The H {0-360}, S {0-100}, L {0-100}
scale is not supported.
DEFAULT: 240
RETURNS:
HHSSLL color string */
if(istext(red)) // used alternate rgb2hsl("RRGGBB", scale) format
if(length(red)!=6)
CRASH("rbg2hsl('[red]'): text argument must be a 6 character hex code.")
return
if(isnum(grn)) scale = grn
blu = sd_base2dec(copytext(red,5))
grn = sd_base2dec(copytext(red,3,5))
red = sd_base2dec(copytext(red,1,3))
// scale decimal {0-1}
red /= 255
grn /= 255
blu /= 255
var/lo = min(red, grn, blu)
var/hi = max(red, grn, blu)
var/hue = 0
var/sat = 0
var/lgh = (lo + hi)/2
if(lo != hi) // if equal, hue and sat may both stay 0
if(lgh < 0.5) sat = (hi - lo) / (hi + lo)
else sat = (hi - lo) / (2 - hi - lo)
// produce hue as value from 0-6
if(red == hi) hue = (grn - blu) / (hi - lo)
else if(grn == hi) hue = 2 + (blu - red) / (hi - lo)
else hue = 4 + (red - grn) / (hi - lo)
if(hue<0) hue += 6
// convert decimal {0-1} to integer {0-scale}
lgh = round(lgh * scale, 1)
sat = round(sat * scale, 1)
// convert hue as decimal 0-6 to integer {0-scale}
hue = round((hue / 6) * scale, 1)
// return 6 digit hex string
return sd_dec2base(hue,16, 2) + sd_dec2base(sat,16, 2) + sd_dec2base(lgh,16, 2)
-117
View File
@@ -1,117 +0,0 @@
/* Math procs
These procs contain basic math routines.
sd_base2dec(number as text, base = 16 as num)
Accepts a number in any base (2 to 36) and returns the equivelent
value in decimal.
ARGS:
number - number to convert as a text string
base - number base
RETURNS:
decimal value of the number
sd_dec2base(decimal,base = 16 as num,digits = 0 as num)
Accepts a decimal number and returns the equivelent value in the
new base as a string.
ARGS:
decimal - number to convert
base - new number base
digits - if output is less than digits, it will add
preceeding 0s to pad it out
RETURNS:
equivelent value in the new base as a string
sd_get_dist(atom/A, atom/B)
Returns the mathematical 3D distance between two atoms.
sd_get_dist_squared(atom/A, atom/B)
Returns the square of the mathematical 3D distance between two atoms. (More processor
friendly than sd_get_dist() and useful for modelling realworld physics.)
*/
/*********************************************
* Implimentation: No need to read further. *
*********************************************/
proc
sd_base2dec(number as text, base = 16 as num)
/* Accepts a number in any base (2 to 36) and returns the equivelent
value in decimal.
ARGS:
number - number to convert as a text string
base - number base
RETURNS:
decimal value of the number
*/
if(!istext(number))
world.log << "sd_base2dec: invalid number string- [number]"
return null
if(!isnum(base) || (base < 2) || (base > 36))
world.log << "sd_base2dec: invalid base - [base]"
return null
var/decimal = 0
number = uppertext(number)
for(var/loop = 1, loop <= lentext(number))
var/digit = copytext(number,loop,++loop)
if((digit >= "0") && (digit <= "9"))
decimal = decimal * base + text2num(digit)
else if((digit >= "A") && (digit <= "Z"))
decimal = decimal * base + (text2ascii(digit) - 55)
else
break // terminate when it encounters an invalid character
return decimal
sd_dec2base(decimal,base = 16 as num,digits = 0 as num)
/* Accepts a decimal number and returns the equivelent value in the
new base as a string.
ARGS:
decimal - number to convert
base - new number base
digits - if output is less than digits, it will add
preceeding 0s to pad it out
RETURNS:
equivelent value in the new base as a string
*/
if(istext(decimal)) decimal = text2num(decimal)
decimal = round(decimal)
if(!isnum(decimal) || (decimal < 0))
world.log << "sd_dec2base: invalid decimal number - [decimal]"
return null
if(!isnum(base) || (base < 2) || (base > 36))
world.log << "sd_dec2base: invalid base - [base]"
return null
var/text = ""
if(!decimal) text = "0"
while(decimal)
var/n = decimal%base
if(n<10)
text = num2text(n) + text
else
text = ascii2text(55+n) + text
decimal = (decimal - n)/base
while(lentext(text) < digits)
text = "0" + text
return text
sd_get_dist(atom/A, atom/B)
/* Returns the mathematical 3D distance between two atoms. */
var/X = (A.x - B.x)
var/Y = (A.y - B.y)
var/Z = (A.z - B.z)
return sqrt(X * X + Y * Y + Z * Z)
sd_get_dist_squared(atom/A, atom/B)
/* Returns the square of the mathematical 3D distance between two atoms. (More processor
friendly than sd_get_dist() and useful for modelling realworld physics.) */
var/X = (A.x - B.x)
var/Y = (A.y - B.y)
var/Z = (A.z - B.z)
return X * X + Y * Y + Z * Z
-140
View File
@@ -1,140 +0,0 @@
/* Nybble Colors
Nybble colors is used to compact RGB colors to "nybble" (4 bits, 1 hex
digit, or decimal numbers 0 to 15.) Since BYOND allows up to 16 bits in
bitwise mathematics, you could store up to 4 color values in a single
number. (The project inspiring these procs stores a foreground nybble
color, background nybble color, and 8 bit text character in each 16 bit
number.)
The value of each bit is:
Bit: 4 3 2 1
Component: Intensity Red Green Blue
Nybble color values are:
Dec Hex Bin Color
0 0 0000 null color. See the note below.
1 1 0001 dark blue (navy)
2 2 0010 dark green
3 3 0011 dark cyan
4 4 0100 dark red
5 5 0101 dark magenta
6 6 0110 brown
7 7 0111 grey
8 8 1000 black
9 9 1001 blue
10 A 1010 green
11 B 1011 cyan
12 C 1100 red
13 D 1101 magenta
14 E 1110 yellow
15 F 1111 white
Null color note: rgb2nybble() will return a value of 8 for black, so
that you may use 0 value nybbles for special cases in your own code.
For example, in the project that inspired these procs, color 0
indicates the default background, which is a textured image.
nybble2rgb() will convert values of 0 or 8 to "000000" (or "000" if
you specify short rgb.)
PROCS
sd_nybble2rgb(original, bit = 8, short = 0)
Converts a nybble color to an RGB hex color string.
ARGS:
value - the number containing the nibble
bit - the MSB (most significant bit) of the nybble. The
default value of 8 uses the lowest 4 bits of original.
DEFAULT: 8
short - short RGB flag. If this is set, the proc returns a
3 character RGB string. Otherwise it returns a 6
character RGB string.
DEFAULT: 0 (return 6 characters)
RETURNS:
A 3 or 6 character hexidecimal RGB color string.
sd_rgb2nybble(rgb, bit = 8)
Converts an rgb color string to a nybble color.
ARGS:
rgb - The color string to be converted. This may be a 3 or 6
character color code with or without a leading "#".
Examples: "000", "000000", "#000", "#000000" all
indicate black.
bit - the MSB (most significant bit) of the nybble. You can
use this to shift the position of your nybble within
the return value. The default value of 8 uses the
lowest 4 bits.
DEFAULT: 8
RETURNS:
A nybble color value or null if the proc failed.
*/
/*********************************************
* Implimentation: No need to read further. *
*********************************************/
proc
sd_nybble2rgb(original, bit = 8, short = 0)
/* Converts a nybble color to an RGB hex color string.
ARGS:
value - the number containing the nibble
bit - the MSB (most significant bit) of the nybble. The
default value of 8 uses the lowest 4 bits of original.
DEFAULT: 8
short - short RGB flag. If this is set, the proc returns a
3 character RGB string. Otherwise it returns a 6
character RGB string.
DEFAULT: 0 (return 6 characters)
RETURNS:
A 3 or 6 character hexidecimal RGB color string. */
var {intensity = "9"; off = "0"}
if(original & bit) intensity = "F"
if(!short)
intensity += intensity
off = "00"
. = ""
for(var/loop = 1 to 3)
bit >>= 1
if(original & bit) . += intensity
else . += off
if(. == "990") . = "940"
else if(. == "999900") . = "994400"
if(intensity == "F" && . == "000000") . = "00FF99"
sd_rgb2nybble(rgb, bit = 8)
/* Converts an rgb color string to a nybble color.
ARGS:
rgb - The color string to be converted. This may be a 3 or 6
character color code with or without a leading "#".
Examples: "000", "000000", "#000", "#000000" all
indicate black.
bit - the MSB (most significant bit) of the nybble. You can
use this to shift the position of your nybble within
the return value. The default value of 8 uses the
lowest 4 bits.
DEFAULT: 8
RETURNS:
A nybble color value or null if the proc failed. */
if(!istext(rgb)) return
if(text2ascii(rgb) == 35) // leading "#"
rgb = copytext(rgb,2)
var{char; cmp[3]; cmp_size; hi = 0; loop; pos = 1}
switch(length(rgb))
if(3) cmp_size = 1
if(6) cmp_size = 2
else return
for(loop = 1 to 3)
char = copytext(rgb, pos, pos+1)
// char 0 to 3 => 0, 4 to 9 => 1, A to F => 2
// cmp[loop] = round(sd_base2dec(char, 16) * 0.15, 1)
// previous line takes over twice as long as switch() method below
switch(char)
if("0", "1", "2", "3") cmp[loop] = 0
if("4", "5", "6", "7", "8", "9") cmp[loop] = 1
else cmp[loop] = 2
if(cmp[loop] > hi) hi = cmp[loop]
pos += cmp_size
switch(hi)
if(0) return bit // color 8: black
if(2) . = bit // high intensity
else . = 0 // low intensity
for(loop = 1 to 3)
bit >>= 1
if(cmp[loop] == hi) . |= bit
-310
View File
@@ -1,310 +0,0 @@
/* Sample sd_colors. This file will not automatically be included in your
projects, since you may want to define them differently.
Colors can be defined by rgb values:
sd_color/blue
red = 0
green = 0
blue = 255
Colors can be defined by HTML values:
sd_color/green
html = "00FF00"
Colors can be defined by just overriding selective rgb values:
sd_color/red
red = 255
magenta
// still has red = 255, since it is a child of red
blue = 255
*/
/******************************************************
* Here 142 colors you might like to use from *
* http://www.w3schools.com/html/html_colornames.asp *
******************************************************/
sd_color
AliceBlue
html = "F0F8FF"
AntiqueWhite
html = "FAEBD7"
Aqua
html = "00FFFF"
Aquamarine
html = "7FFFD4"
Azure
html = "F0FFFF"
Beige
html = "F5F5DC"
Bisque
html = "FFE4C4"
Black
html = "000000"
BlanchedAlmond
html = "FFEBCD"
Blue
html = "0000FF"
BlueViolet
html = "8A2BE2"
Brown
html = "A52A2A"
BurlyWood
html = "DEB887"
CadetBlue
html = "5F9EA0"
Chartreuse
html = "7FFF00"
Chocolate
html = "D2691E"
Coral
html = "FF7F50"
CornflowerBlue
html = "6495ED"
Cornsilk
html = "FFF8DC"
Crimson
html = "DC143C"
Cyan
html = "00FFFF"
DarkBlue
html = "00008B"
DarkCyan
html = "008B8B"
DarkGoldenRod
html = "B8860B"
DarkGray
html = "A9A9A9"
DarkGreen
html = "006400"
DarkKhaki
html = "BDB76B"
DarkMagenta
html = "8B008B"
DarkOliveGreen
html = "556B2F"
Darkorange
html = "FF8C00"
DarkOrchid
html = "9932CC"
DarkRed
html = "8B0000"
DarkSalmon
html = "E9967A"
DarkSeaGreen
html = "8FBC8F"
DarkSlateBlue
html = "483D8B"
DarkSlateGray
html = "2F4F4F"
DarkTurquoise
html = "00CED1"
DarkViolet
html = "9400D3"
DeepPink
html = "FF1493"
DeepSkyBlue
html = "00BFFF"
DimGray
html = "696969"
DodgerBlue
html = "1E90FF"
FireBrick
html = "B22222"
FloralWhite
html = "FFFAF0"
ForestGreen
html = "228B22"
Fuchsia
html = "FF00FF"
Gainsboro
html = "DCDCDC"
GhostWhite
html = "F8F8FF"
Gold
html = "FFD700"
GoldenRod
html = "DAA520"
Gray
html = "808080"
Green
html = "008000"
GreenYellow
html = "ADFF2F"
HoneyDew
html = "F0FFF0"
HotPink
html = "FF69B4"
IndianRed
html = "CD5C5C"
Indigo
html = "4B0082"
Ivory
html = "FFFFF0"
Khaki
html = "F0E68C"
Lavender
html = "E6E6FA"
LavenderBlush
html = "FFF0F5"
LawnGreen
html = "7CFC00"
LemonChiffon
html = "FFFACD"
LightBlue
html = "ADD8E6"
LightCoral
html = "F08080"
LightCyan
html = "E0FFFF"
LightGoldenRodYellow
html = "FAFAD2"
LightGrey
html = "D3D3D3"
LightGreen
html = "90EE90"
LightPink
html = "FFB6C1"
LightSalmon
html = "FFA07A"
LightSeaGreen
html = "20B2AA"
LightSkyBlue
html = "87CEFA"
LightSlateBlue
html = "8470FF"
LightSlateGray
html = "778899"
LightSteelBlue
html = "B0C4DE"
LightYellow
html = "FFFFE0"
Lime
html = "00FF00"
LimeGreen
html = "32CD32"
Linen
html = "FAF0E6"
Magenta
html = "FF00FF"
Maroon
html = "800000"
MediumAquaMarine
html = "66CDAA"
MediumBlue
html = "0000CD"
MediumOrchid
html = "BA55D3"
MediumPurple
html = "9370D8"
MediumSeaGreen
html = "3CB371"
MediumSlateBlue
html = "7B68EE"
MediumSpringGreen
html = "00FA9A"
MediumTurquoise
html = "48D1CC"
MediumVioletRed
html = "C71585"
MidnightBlue
html = "191970"
MintCream
html = "F5FFFA"
MistyRose
html = "FFE4E1"
Moccasin
html = "FFE4B5"
NavajoWhite
html = "FFDEAD"
Navy
html = "000080"
OldLace
html = "FDF5E6"
Olive
html = "808000"
OliveDrab
html = "6B8E23"
Orange
html = "FFA500"
OrangeRed
html = "FF4500"
Orchid
html = "DA70D6"
PaleGoldenRod
html = "EEE8AA"
PaleGreen
html = "98FB98"
PaleTurquoise
html = "AFEEEE"
PaleVioletRed
html = "D87093"
PapayaWhip
html = "FFEFD5"
PeachPuff
html = "FFDAB9"
Peru
html = "CD853F"
Pink
html = "FFC0CB"
Plum
html = "DDA0DD"
PowderBlue
html = "B0E0E6"
Purple
html = "800080"
Red
html = "FF0000"
RosyBrown
html = "BC8F8F"
RoyalBlue
html = "4169E1"
SaddleBrown
html = "8B4513"
Salmon
html = "FA8072"
SandyBrown
html = "F4A460"
SeaGreen
html = "2E8B57"
SeaShell
html = "FFF5EE"
Sienna
html = "A0522D"
Silver
html = "C0C0C0"
SkyBlue
html = "87CEEB"
SlateBlue
html = "6A5ACD"
SlateGray
html = "708090"
Snow
html = "FFFAFA"
SpringGreen
html = "00FF7F"
SteelBlue
html = "4682B4"
Tan
html = "D2B48C"
Teal
html = "008080"
Thistle
html = "D8BFD8"
Tomato
html = "FF6347"
Turquoise
html = "40E0D0"
Violet
html = "EE82EE"
VioletRed
html = "D02090"
Wheat
html = "F5DEB3"
White
html = "FFFFFF"
WhiteSmoke
html = "F5F5F5"
Yellow
html = "FFFF00"
YellowGreen
html = "9ACD32"
-161
View File
@@ -1,161 +0,0 @@
/* sd_procs
by: Shadowdarke (shadowdarke@hotmail.com)
A collection of general purpose procs I use often in
other projects.
The following is a summary of all the procs and other additions included in
the sd_procs library. Please refer to the specific file for detailed information.
Atom (atom.dm)
These procs expand on the basic built in procs.
Bumped(O)
Automatically called whenever a movable atom O Bump()s into src.
Proc protype designed to be overridden for specific objects.
Trigger(O)
Automatically called whenever a movable atom O steps into the same
turf with src.
Proc protype designed to be overridden for specific objects.
Base 64 (base64.dm)
These procs convert plain text to a hexidecimal string to 64 encoded text and vice versa.
sd_base64toHex(encode64, pad_code = 67)
Accepts a base 64 encoded text and returns the hexidecimal equivalent.
sd_hex2base64(hextext, pad_char = "=")
Accepts a hexidecimal string and returns the base 64 encoded text equivalent.
sd_hex2text(hex)
Accepts a hexidecimal string and returns the plain text equivalent.
sd_text2hex(txt)
Accepts a plain text string and returns the hexidecimal equivalent.
Colors(color.dm)
sd_color
sd_color is a special datum that contains color data in various
formats. Sample colors are available in samplecolors.dm.
VARS
name // the name of the color
red // red componant of the color
green // green componant of the color
blue // red componant of the color
html // html string for the color
icon/Icon // contains the icon produced by rgb2icon() proc
PROCS
brightness()
Returns the grayscale brightness of the RGB color set.
html2rgb()
Calculates the rgb colors from the html colors.
rgb2html()
Calculates the html color from the rbg colors.
rgb2icon()
Converts the rgb value to a solid icon stored as src.Icon
Direction procs (direction.dm)
sd_get_approx_dir(atom/ref,atom/target)
returns the approximate direction from ref to target.
sd_degrees2dir(degrees as num)
Accepts an angle in degrees and returns the closest BYOND
direction value.
sd_dir2degrees(dir as num)
Accepts a BYOND direction value and returns the angle North of
East in degrees.
sd_dir2radial(dir as num)
Accepts a BYOND direction value and returns the radial direction
(0-7) North of East.
sd_dir2radians(dir as num)
Accepts a BYOND direction value and returns the angle North of
East in radians.
sd_dir2text(dir as num)
Accepts a BYOND direction value and returns the lowercase text
name of the direction.
sd_dir2Text(dir as num)
Accepts a BYOND direction value and returns the Capitalized text
name of the direction
sd_radial2dir(radial as num)
Accepts a radial direction (0-7) and returns the BYOND direction
value.
HSL procs (hsl.dm)
hsl2rgb(hue, sat, lgh, scale = 240)
Returns the RRGGBB format of an HSL color.
ALTERNATE FORMAT: hsl2rgb(HSL, scale)
rgb2hsl(red, grn, blu, scale = 240)
Returns the HHSSLL string of an RGB color
ALTERNATE FORMAT: rgb2hsl(RGB, scale)
Math procs (math.dm)
sd_base2dec(number as text, base = 16 as num)
Accepts a number in any base (2 to 36) and returns the equivelent
value in decimal.
sd_dec2base(decimal,base = 16 as num,digits = 0 as num)
Accepts a decimal number and returns the equivelent value in the
new base as a string.
sd_get_dist(atom/A, atom/B)
Returns the mathematical 3D distance between two atoms.
sd_get_dist_squared(atom/A, atom/B)
Returns the square of the mathematical 3D distance between two atoms. (More processor
friendly than sd_get_dist() and useful for modelling realworld physics.)
Nybble Color procs (nybble.dm)
sd_nybble2rgb(original, bit = 8, short = 0)
Converts a nybble color to a hexidecimal RGB color string.
sd_rgb2nybble(rgb, bit = 8)
Converts an RGB color string to a nybble color.
Sample sd_colors. (samplecolors.dm)
This file includes 142 predefined sd_colors. It will not automatically
be included in your projects, since you may want to define them differently.
Test program (test.dm)
This file provides a brief demo of some library functions.
It is not included in your projects.
Text procs (text.dm)
sd_findlast(maintext as text, searchtext as text)
Returns the location of the last instance of searchtext in
maintext. sd_findlast is not case sensitive.
sd_findLast(maintext as text, searchtext as text)
Returns the location of the last instance of searchtext in
maintext. sd_findLast is case sensitive.
sd_htmlremove(T as text)
Returns the text string with all potential html tags (anything
between < and >) removed.
sd_replacetext(maintext as text, oldtext as text, newtext as text)
Replaces all instances of oldtext within maintext with newtext.
sd_replacetext is not case sensitive.
sd_replaceText(maintext as text, oldtext as text, newtext as text)
Replaces all instances of oldtext within maintext with newtext.
sd_replaceText is case sensitive.
*/
-89
View File
@@ -1,89 +0,0 @@
/* Text procs
These procs manipulate text strings.
sd_findlast(maintext as text, searchtext as text)
Returns the location of the last instance of searchtext in
maintext. sd_findlast is not case sensitive.
sd_findLast(maintext as text, searchtext as text)
Returns the location of the last instance of searchtext in
maintext. sd_findLast is case sensitive.
sd_htmlremove(T as text)
Returns the text string with all potential html tags (anything
between < and >) removed.
sd_replacetext(maintext as text, oldtext as text, newtext as text)
Replaces all instances of oldtext within maintext with newtext.
sd_replacetext is not case sensitive.
sd_replaceText(maintext as text, oldtext as text, newtext as text)
Replaces all instances of oldtext within maintext with newtext.
sd_replaceText is case sensitive.
*/
/*********************************************
* Implimentation: No need to read further. *
*********************************************/
proc
sd_findlast(maintext as text, searchtext as text)
/* Returns the location of the last instance of searchtext in
maintext. sd_findlast is not case sensitive. */
var/loc = 0
var/looking = findtext(maintext, searchtext)
while(looking)
loc = looking
looking = findtext(maintext, searchtext, looking + 1)
return loc
sd_findLast(maintext as text, searchtext as text)
/* Returns the location of the last instance of searchtext in
maintext. sd_findLast is case sensitive. */
var/loc = 0
var/looking = findText(maintext, searchtext)
while(looking)
loc = looking
looking = findText(maintext, searchtext, looking + 1)
return loc
sd_htmlremove(T as text)
/* Returns the text string with all potential html tags (anything
between < and >) removed. */
T = sd_replacetext(T, "&nbsp;","")
var/open = findtext(T,"<")
while(open)
var/close = findtext(T,">",open)
if(close)
if(close<lentext(T))
T = copytext(T,1,open)+copytext(T,close+1)
else
T = copytext(T,1,open)
open = findtext(T,"<")
else
open = 0
return T
sd_replacetext(maintext as text, oldtext as text, newtext as text)
/* Replaces all instances of oldtext within maintext with newtext.
sd_replacetext is not case sensitive. See sd_replaceText for a
case sensitive version. */
var/F = findtext(maintext, oldtext)
var/length = length(newtext)
while(F)
var/newmessage = copytext(maintext,1,F) + newtext + copytext(maintext,F+lentext(oldtext))
maintext = newmessage
F = findtext(maintext, oldtext, F + length)
return maintext
sd_replaceText(maintext as text, oldtext as text, newtext as text)
/* Replaces all instances of oldtext within maintext with newtext.
sd_replaceText is case sensitive. See sd_replacetext for a
non-case sensitive version. */
var/F = findText(maintext, oldtext)
var/length = length(newtext)
while(F)
var/newmessage = copytext(maintext,1,F) + newtext + copytext(maintext,F+lentext(oldtext))
maintext = newmessage
F = findText(maintext, oldtext, F + length)
return maintext
-444
View File
@@ -1,444 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/turf
icon = 'icons/turf/floors.dmi'
var/intact = 1 //for floors, use is_plating(), is_plasteel_floor() and is_light_floor()
level = 1.0
//Properties for open tiles (/floor)
var/oxygen = 0
var/carbon_dioxide = 0
var/nitrogen = 0
var/toxins = 0
//Properties for airtight tiles (/wall)
var/thermal_conductivity = 0.05
var/heat_capacity = 1
//Properties for both
var/temperature = T20C
var/blocks_air = 0
var/icon_old = null
var/pathweight = 1
proc/is_plating()
return 0
proc/is_asteroid_floor()
return 0
proc/is_plasteel_floor()
return 0
proc/is_light_floor()
return 0
proc/is_grass_floor()
return 0
proc/is_wood_floor()
return 0
proc/return_siding_icon_state() //used for grass floors, which have siding.
return 0
/turf/Entered(atom/A as mob|obj)
..()
if ((A && A.density && !( istype(A, /obj/effect/beam) )))
for(var/obj/effect/beam/i_beam/I in src)
spawn( 0 )
if (I)
I.hit()
return
return
/turf/space
icon = 'icons/turf/space.dmi'
name = "\proper space"
icon_state = "placeholder"
temperature = TCMB
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 700000
/turf/space/transit
var/pushdirection // push things that get caught in the transit tile this direction
//Overwrite because we dont want people building rods in space.
/turf/space/transit/attackby(obj/O as obj, mob/user as mob)
return
/turf/space/transit/north // moving to the north
pushdirection = SOUTH // south because the space tile is scrolling south
//IF ANYONE KNOWS A MORE EFFICIENT WAY OF MANAGING THESE SPRITES, BE MY GUEST.
shuttlespace_ns1
icon_state = "speedspace_ns_1"
shuttlespace_ns2
icon_state = "speedspace_ns_2"
shuttlespace_ns3
icon_state = "speedspace_ns_3"
shuttlespace_ns4
icon_state = "speedspace_ns_4"
shuttlespace_ns5
icon_state = "speedspace_ns_5"
shuttlespace_ns6
icon_state = "speedspace_ns_6"
shuttlespace_ns7
icon_state = "speedspace_ns_7"
shuttlespace_ns8
icon_state = "speedspace_ns_8"
shuttlespace_ns9
icon_state = "speedspace_ns_9"
shuttlespace_ns10
icon_state = "speedspace_ns_10"
shuttlespace_ns11
icon_state = "speedspace_ns_11"
shuttlespace_ns12
icon_state = "speedspace_ns_12"
shuttlespace_ns13
icon_state = "speedspace_ns_13"
shuttlespace_ns14
icon_state = "speedspace_ns_14"
shuttlespace_ns15
icon_state = "speedspace_ns_15"
/turf/space/transit/east // moving to the east
pushdirection = WEST
shuttlespace_ew1
icon_state = "speedspace_ew_1"
shuttlespace_ew2
icon_state = "speedspace_ew_2"
shuttlespace_ew3
icon_state = "speedspace_ew_3"
shuttlespace_ew4
icon_state = "speedspace_ew_4"
shuttlespace_ew5
icon_state = "speedspace_ew_5"
shuttlespace_ew6
icon_state = "speedspace_ew_6"
shuttlespace_ew7
icon_state = "speedspace_ew_7"
shuttlespace_ew8
icon_state = "speedspace_ew_8"
shuttlespace_ew9
icon_state = "speedspace_ew_9"
shuttlespace_ew10
icon_state = "speedspace_ew_10"
shuttlespace_ew11
icon_state = "speedspace_ew_11"
shuttlespace_ew12
icon_state = "speedspace_ew_12"
shuttlespace_ew13
icon_state = "speedspace_ew_13"
shuttlespace_ew14
icon_state = "speedspace_ew_14"
shuttlespace_ew15
icon_state = "speedspace_ew_15"
/turf/space/New()
// icon = 'icons/turf/space.dmi'
if(!istype(src, /turf/space/transit))
icon_state = "[pick(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25)]"
/turf/simulated
name = "station"
var/wet = 0
var/image/wet_overlay = null
var/thermite = 0
oxygen = MOLES_O2STANDARD
nitrogen = MOLES_N2STANDARD
var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed
var/max_fire_temperature_sustained = 0 //The max temperature of the fire which it was subjected to
/turf/simulated/New()
..()
levelupdate()
/turf/simulated/wall
name = "wall"
desc = "A huge chunk of metal used to seperate rooms."
icon = 'icons/turf/walls.dmi'
var/mineral = "metal"
opacity = 1
density = 1
blocks_air = 1
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall
var/walltype = "metal"
/turf/simulated/wall/r_wall
name = "r wall"
desc = "A huge chunk of reinforced metal used to seperate rooms."
icon_state = "r_wall"
opacity = 1
density = 1
walltype = "rwall"
var/d_state = 0
/turf/simulated/wall/mineral
name = "mineral wall"
desc = "This shouldn't exist"
icon_state = ""
var/last_event = 0
var/active = null
/turf/simulated/wall/mineral/New()
switch(mineral)
if("gold")
name = "gold wall"
desc = "A wall with gold plating. Swag!"
icon_state = "gold0"
walltype = "gold"
// var/electro = 1
// var/shocked = null
if("silver")
name = "silver wall"
desc = "A wall with silver plating. Shiny!"
icon_state = "silver0"
walltype = "silver"
// var/electro = 0.75
// var/shocked = null
if("diamond")
name = "diamond wall"
desc = "A wall with diamond plating. You monster."
icon_state = "diamond0"
walltype = "diamond"
if("uranium")
name = "uranium wall"
desc = "A wall with uranium plating. This is probably a bad idea."
icon_state = "uranium0"
walltype = "uranium"
if("plasma")
name = "plasma wall"
desc = "A wall with plasma plating. This is definately a bad idea."
icon_state = "plasma0"
walltype = "plasma"
if("clown")
name = "bananium wall"
desc = "A wall with bananium plating. Honk!"
icon_state = "clown0"
walltype = "clown"
if("sandstone")
name = "sandstone wall"
desc = "A wall with sandstone plating."
icon_state = "sandstone0"
walltype = "sandstone"
..()
/turf/simulated/wall/mineral/proc/radiate()
if(!active)
if(world.time > last_event+15)
active = 1
for(var/mob/living/L in range(3,src))
L.apply_effect(12,IRRADIATE,0)
for(var/turf/simulated/wall/mineral/T in range(3,src))
if(T.mineral == "uranium")
T.radiate()
last_event = world.time
active = null
return
return
/*/turf/simulated/wall/mineral/proc/shock()
if (electrocute_mob(user, C, src))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return 1
else
return 0
*/
/turf/simulated/wall/cult
name = "wall"
desc = "The patterns engraved on the wall seem to shift as you try to focus on them. You feel sick"
icon_state = "cult"
walltype = "cult"
/turf/simulated/shuttle
name = "shuttle"
icon = 'icons/turf/shuttle.dmi'
thermal_conductivity = 0.05
heat_capacity = 0
layer = 2
/turf/simulated/shuttle/wall
name = "wall"
icon_state = "wall1"
opacity = 1
density = 1
blocks_air = 1
/turf/simulated/shuttle/floor
name = "floor"
icon_state = "floor"
/turf/simulated/shuttle/plating
name = "plating"
icon = 'icons/turf/floors.dmi'
icon_state = "plating"
/turf/simulated/shuttle/floor4 // Added this floor tile so that I have a seperate turf to check in the shuttle -- Polymorph
name = "Brig floor" // Also added it into the 2x3 brig area of the shuttle.
icon_state = "floor4"
/turf/unsimulated
intact = 1
name = "command"
oxygen = MOLES_O2STANDARD
nitrogen = MOLES_N2STANDARD
/turf/unsimulated/floor
name = "floor"
icon = 'icons/turf/floors.dmi'
icon_state = "Floor3"
/turf/unsimulated/wall
name = "wall"
icon = 'icons/turf/walls.dmi'
icon_state = "riveted"
opacity = 1
density = 1
turf/unsimulated/wall/splashscreen
name = "Space Station 13"
icon = 'icons/misc/fullscreen.dmi'
icon_state = "title"
layer = FLY_LAYER
/turf/unsimulated/wall/other
icon_state = "r_wall"
/turf/proc/AdjacentTurfs()
var/L[] = new()
for(var/turf/simulated/t in oview(src,1))
if(!t.density)
if(!LinkBlocked(src, t) && !TurfBlockedNonWindow(t))
L.Add(t)
return L
/turf/proc/Distance(turf/t)
if(get_dist(src,t) == 1)
var/cost = (src.x - t.x) * (src.x - t.x) + (src.y - t.y) * (src.y - t.y)
cost *= (pathweight+t.pathweight)/2
return cost
else
return get_dist(src,t)
/turf/proc/AdjacentTurfsSpace()
var/L[] = new()
for(var/turf/t in oview(src,1))
if(!t.density)
if(!LinkBlocked(src, t) && !TurfBlockedNonWindow(t))
L.Add(t)
return L
/*
/turf/simulated/wall/mineral
icon = 'icons/turf/mineral_walls.dmi'
walltype = "iron"
var/oreAmount = 1
var/hardness = 1
New()
..()
name = "[walltype] wall"
dismantle_wall(devastated = 0)
if(!devastated)
var/ore = text2path("/obj/item/weapon/ore/[walltype]")
for(var/i = 1, i <= oreAmount, i++)
new ore(src)
ReplaceWithFloor()
else
ReplaceWithSpace()
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/digTool = W
user << "You start digging the [name]."
if(do_after(user,digTool.digspeed*hardness) && src)
user << "You finished digging."
dismantle_wall()
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
hardness -= W.force/100
user << "You hit the [name] with your [W.name]!"
CheckHardness()
else
attack_hand(user)
return
proc/CheckHardness()
if(hardness <= 0)
dismantle_wall()
/turf/simulated/wall/mineral/iron
walltype = "iron"
hardness = 3
/turf/simulated/wall/mineral/silver
walltype = "silver"
hardness = 3
/turf/simulated/wall/mineral/uranium
walltype = "uranium"
hardness = 3
New()
..()
sd_SetLuminosity(3)
/turf/simulated/wall/mineral/gold
walltype = "gold"
/turf/simulated/wall/mineral/sand
walltype = "sand"
hardness = 0.5
/turf/simulated/wall/mineral/transparent
opacity = 0
/turf/simulated/wall/mineral/transparent/diamond
walltype = "diamond"
hardness = 10
/turf/simulated/wall/mineral/transparent/plasma
walltype = "plasma"
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
return TemperatureAct(100)
..()
temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
TemperatureAct(exposed_temperature)
proc/TemperatureAct(temperature)
for(var/turf/simulated/floor/target_tile in range(2,loc))
if(target_tile.parent && target_tile.parent.group_processing)
target_tile.parent.suspend_group_processing()
var/datum/gas_mixture/napalm = new
var/toxinsToDeduce = temperature/10
napalm.toxins = toxinsToDeduce
napalm.temperature = 400+T0C
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(temperature, 400)
hardness -= toxinsToDeduce/100
CheckHardness()
*/
+29 -52
View File
@@ -46,13 +46,15 @@
possibleEvents["Meteor"] = 80 * engineer_count
possibleEvents["Blob"] = 30 * engineer_count
possibleEvents["Spacevine"] = 30 * engineer_count
possibleEvents["Grid Check"] = 10 * engineer_count
if(medical_count >= 1)
possibleEvents["Radiation"] = medical_count * 100
possibleEvents["Virus"] = medical_count * 50
possibleEvents["Appendicitis"] = medical_count * 50
if(security_count >= 1)
possibleEvents["Prison Break"] = security_count * 50
//possibleEvents["Space Ninja"] = security_count * 10 // very low chance for space ninja event
/*if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)
possibleEvents["Space Ninja"] = security_count * 10*/
var/picked_event = pick(possibleEvents)
var/chance = possibleEvents[picked_event]
@@ -77,54 +79,6 @@
return 0
switch(picked_event)
if("Meteor")
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/meteors.ogg')
spawn(100)
meteor_wave()
spawn_meteors()
spawn(700)
meteor_wave()
spawn_meteors()
if(2)
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/granomalies.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
spawn(rand(50, 300))
del(bh)
/*
if(3) //Leaving the code in so someone can try and delag it, but this event can no longer occur randomly, per SoS's request. --NEO
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('sound/AI/spanomalies.ogg')
var/list/turfs = new
var/turf/picked
for(var/turf/simulated/floor/T in world)
if(T.z == 1)
turfs += T
for(var/turf/simulated/floor/T in turfs)
if(prob(20))
spawn(50+rand(0,3000))
picked = pick(turfs)
var/obj/effect/portal/P = new /obj/effect/portal( T )
P.target = picked
P.creator = null
P.icon = 'icons/obj/objects.dmi'
P.failchance = 0
P.icon_state = "anom"
P.name = "wormhole"
spawn(rand(300,600))
del(P)
*/
if(3)
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
space_ninja_arrival()//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
if(4) mini_blob_event()
if("Space Ninja")
//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
space_ninja_arrival()
@@ -148,6 +102,10 @@
spacevine_infestation()
if("Communications")
communications_blackout()
if("Grid Check")
grid_check()
if("Meteor")
meteor_shower()
return 1
@@ -163,8 +121,9 @@
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)
/proc/power_failure()
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
/proc/power_failure(var/is_grid_check = 0)
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", is_grid_check ? "Automated Grid Check" : "Critical Power Failure")
for(var/mob/M in player_list)
M << sound('sound/AI/poweroff.ogg')
for(var/obj/machinery/power/smes/S in world)
@@ -624,10 +583,28 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
world << "Ion Storm Main Done"
*/
/proc/meteor_shower()
command_alert("The station is now in a meteor shower", "Meteor Alert")
spawn(0)
var/waves = rand(1,4)
while(waves > 0)
sleep(rand(20,100))
spawn_meteors(rand(1,3))
waves--
command_alert("The station has cleared the meteor shower", "Meteor Alert")
/proc/grid_check()
spawn(0)
power_failure(1)
sleep(rand(100,600))
power_restore()
// Returns how many characters are currently active(not logged out, not AFK for more than 10 minutes)
// with a specific role.
// Note that this isn't sorted by department, because e.g. having a roboticist shouldn't make meteors spawn.
proc/number_active_with_role(role)
/proc/number_active_with_role(role)
var/count = 0
for(var/mob/M in player_list)
if(!M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
-32
View File
@@ -1,32 +0,0 @@
/area/var/radsafe = 0
/area/maintenance/radsafe = 1
/area/ai_monitored/maintenance/radsafe = 1
/area/centcom/radsafe = 1
/area/admin/radsafe = 1
/area/adminsafety/radsafe = 1
/area/shuttle/radsafe = 1
/area/syndicate_station/radsafe = 1
/area/asteroid/radsafe = 1
/area/crew_quarters/sleeping/radsafe = 1
/datum/event/blowout
Lifetime = 150
Announce()
if(!forced && prob(90))
ActiveEvent = null
SpawnEvent()
del src
return
command_alert("Warning: station approaching high-density radiation cloud. Seek cover immediately.")
Tick()
if(ActiveFor == 50)
command_alert("Station has entered radiation cloud. Do not leave cover until it has passed.")
if(ActiveFor == 100 || ActiveFor == 150) //1/2 and 2/2 f the way after it start proper make peope be half dead mostly
for(var/mob/living/carbon/M in world)
var/area = get_area(M)
if(area:radsafe)
continue
if(!M.stat)
M.radiate(100)
Die()
command_alert("The station has cleared the radiation cloud. It is now safe to leave cover.")
@@ -1,88 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/datum/event/electricalstorm
var/list/obj/machinery/light/Lights = list( )
var/list/obj/machinery/light/APCs = list( )
var/list/obj/machinery/light/Doors = list( )
var/list/obj/machinery/light/Comms = list( )
Announce()
// command_alert("The station is flying through an electrical storm. Radio communications may be disrupted", "Anomaly Alert")
for(var/obj/machinery/light/Light in world)
if(Light.z == 1 && Light.status != 0)
Lights += Light
for(var/obj/machinery/power/apc/APC in world)
if(APC.z == 1 && !APC.crit)
APCs += APC
for(var/obj/machinery/door/airlock/Door in world)
if(Door.z == 1 && !istype(Door,/obj/machinery/door/airlock/secure))
Doors += Door
for(var/obj/machinery/telecomms/processor/T in world)
if(prob(90) && !(T.stat & (BROKEN|NOPOWER)))
T.stat |= BROKEN
Comms |= T
Tick()
for(var/x = 0; x < 3; x++)
if (prob(30))
BlowLight()
if (prob(10))
DisruptAPC()
if (prob(10))
DisableDoor()
Die()
command_alert("The station has cleared the electrical storm. Radio communications restored", "Anomaly Alert")
for(var/obj/machinery/telecomms/processor/T in Comms)
T.stat &= ~BROKEN
Comms = list()
proc
BlowLight() //Blow out a light fixture
var/obj/machinery/light/Light = null
var/failed_attempts = 0
while (Light == null || Light.status != 0)
Light = pick(Lights)
failed_attempts++
if (failed_attempts >= 10)
return
spawn(0) //Overload the light, spectacularly.
//Light.sd_SetLuminosity(10)
//sleep(2)
Light.on = 1
Light.broken()
Lights -= Light
DisruptAPC()
var/failed_attempts = 0
var/obj/machinery/power/apc/APC
while (!APC || !APC.operating)
APC = pick(APCs)
failed_attempts++
if (failed_attempts >= 10)
return
if (prob(40))
APC.operating = 0 //Blow its breaker
if (prob(8))
APC.set_broken()
APCs -= APC
DisableDoor()
var/obj/machinery/door/airlock/Airlock
while (!Airlock || Airlock.z != 1)
Airlock = pick(Doors)
Airlock.pulse(airlockIndexToWireColor[4])
for (var/x = 0; x < 2; x++)
var/Wire = 0
while(!Wire || Wire == 4)
Wire = rand(1, 9)
Airlock.pulse(airlockIndexToWireColor[Wire])
Airlock.update_icon()
Doors -= Airlock
@@ -1,10 +0,0 @@
/datum/event/gravitationalanomaly
Announce()
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('granomalies.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
spawn(rand(50, 300))
del(bh)
@@ -1,5 +0,0 @@
/datum/event/immovablerod
Announce()
immovablerod()
-11
View File
@@ -1,11 +0,0 @@
/datum/event/meteorstorm
Announce()
command_alert("The station is now in a meteor shower", "Meteor Alert")
Tick()
if (prob(20))
meteor_wave()
Die()
command_alert("The station has cleared the meteor shower", "Meteor Alert")
@@ -1,16 +0,0 @@
/datum/event/power_offline
Announce()
for(var/obj/machinery/power/apc/a in world)
if(!a.crit && a.z == 1)
if(istype(a.area, /area/ai_monitored/storage/eva) || istype(a.area, /area/engine)\
|| istype(a.area, /area/toxins/xenobiology) || istype(a.area, /area/turret_protected/ai))
continue
a.eventoff = 1
a.update()
Die()
command_alert("The station has finished an automated power system grid check, thank you.", "Maintenance alert")
for(var/obj/machinery/power/apc/a in world)
if(!a.crit)
a.eventoff = 0
a.update()
-30
View File
@@ -1,30 +0,0 @@
/datum/event/prisonbreak
Announce()
for (var/obj/machinery/power/apc/temp_apc in world)
if(istype(get_area(temp_apc), /area/security/prison))
temp_apc.overload_lighting()
if(istype(get_area(temp_apc), /area/security/brig))
temp_apc.overload_lighting()
// for (var/obj/machinery/computer/prison_shuttle/temp_shuttle in world)
// temp_shuttle.prison_break()
for (var/obj/structure/closet/secure_closet/brig/temp_closet in world)
if(istype(get_area(temp_closet), /area/security/prison))
temp_closet.locked = 0
temp_closet.icon_state = temp_closet.icon_closed
for (var/obj/machinery/door/airlock/security/temp_airlock in world)
if(istype(get_area(temp_airlock), /area/security/prison))
temp_airlock.prison_open()
if(istype(get_area(temp_airlock), /area/security/brig))
temp_airlock.prison_open()
for (var/obj/machinery/door/airlock/glass/glass_security/temp_glassairlock in world)
if(istype(get_area(temp_glassairlock), /area/security/prison))
temp_glassairlock.prison_open()
if(istype(get_area(temp_glassairlock), /area/security/brig))
temp_glassairlock.prison_open()
for (var/obj/machinery/door_timer/temp_timer in world)
if(istype(get_area(temp_timer), /area/security/brig))
temp_timer.releasetime = 1
sleep(150)
command_alert("Glitch in imprisonment subroutines detected on [station_name()]. Recommend station AI involvement.", "Security Alert")
@@ -1,27 +0,0 @@
/datum/event/radiation
var/current_iteration = 0
// 50 - 20 (grace period) seconds lifetime
Lifetime = 50
Announce()
command_alert("The station is now travelling through a radiation belt. Take shelter in the maintenance tunnels, or in the crew quarters!", "Medical Alert")
Tick()
current_iteration++
// start radiating after 20 seconds grace period
if(current_iteration > 20)
for(var/mob/living/carbon/L in world)
// check whether they're in a safe place
// if they are, do not radiate
var/turf/T = get_turf(L)
if(T && ( istype(T.loc, /area/maintenance) || istype(T.loc, /area/crew_quarters) ))
continue
if (istype(L, /mob/living/carbon/monkey)) // So as to stop monkeys from dying in their pens
L.apply_effect(rand(3,4), IRRADIATE)
else
L.apply_effect(rand(4,10), IRRADIATE)
Die()
command_alert("The station has cleared the radiation belt", "Medical Alert")
-14
View File
@@ -1,14 +0,0 @@
/datum/event/spacecarp
Announce()
for(var/obj/effect/landmark/C in world)
if(C.name == "carpspawn")
if(prob(99))
new /mob/living/simple_animal/carp(C.loc)
else
new /mob/living/simple_animal/carp/elite(C.loc)
//sleep(100)
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
world << sound('commandreport.ogg')
-6
View File
@@ -1,6 +0,0 @@
/datum/event/spaceninja
Announce()
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
space_ninja_arrival()//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
@@ -1,7 +0,0 @@
/datum/traitorinfo
var/starting_objective = ""
var/starting_player_count = 0
var/starting_occupation = ""
var/starting_name = ""
var/ckey = ""
var/list/spawnlist = list()
+33 -17
View File
@@ -414,29 +414,45 @@
/proc/get_all_centcom_jobs()
return list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Supreme Commander")
/obj/proc/GetJobName()
//gets the actual job rank (ignoring alt titles)
//this is used solely for sechuds
/obj/proc/GetJobRealName()
if (!istype(src, /obj/item/device/pda) && !istype(src,/obj/item/weapon/card/id))
return
var/jobName
var/realJobName
// hack for alt titles
if(istype(loc, /mob))
var/mob/M = loc
if(M.mind && M.mind.role_alt_title == jobName && M.mind.assigned_role in get_all_jobs())
return M.mind.assigned_role
var/rank
var/assignment
if(istype(src, /obj/item/device/pda))
if(src:id)
jobName = src:id:assignment
realJobName = src:id:assignment_real_title
if(istype(src, /obj/item/weapon/card/id))
jobName = src:assignment
realJobName = src:assignment_real_title
rank = src:id:rank
assignment = src:id:assignment
else if(istype(src, /obj/item/weapon/card/id))
rank = src:rank
assignment = src:assignment
if( (realJobName in get_all_jobs()) || (jobName in get_all_jobs()) )
return jobName
if( rank in get_all_jobs() )
return rank
if( assignment in get_all_jobs() )
return assignment
return "Unknown"
//gets the alt title, failing that the actual job rank
//this is unused
/obj/proc/sdsdsd() //GetJobDisplayName
if (!istype(src, /obj/item/device/pda) && !istype(src,/obj/item/weapon/card/id))
return
var/assignment
if(istype(src, /obj/item/device/pda))
if(src:id)
assignment = src:id:assignment
else if(istype(src, /obj/item/weapon/card/id))
assignment = src:assignment
if(assignment)
return assignment
return "Unknown"
-2
View File
@@ -11,7 +11,6 @@
req_admin_notify = 1
access = list() //See get_access()
minimal_access = list() //See get_access()
alt_titles = list("Administrator")
equip(var/mob/living/carbon/human/H)
@@ -56,7 +55,6 @@
selection_color = "#ddddff"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
alt_titles = list("Human resources director","Executive Officer")
access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
+7 -8
View File
@@ -10,7 +10,7 @@
selection_color = "#dddddd"
access = list(access_bar)
minimal_access = list(access_bar)
alt_titles = list("Waiter","Waitress")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -52,7 +52,7 @@
selection_color = "#dddddd"
access = list(access_kitchen, access_morgue)
minimal_access = list(access_kitchen, access_morgue)
alt_titles = list("Gourmet chef","Cook")
alt_titles = list("Cook")
equip(var/mob/living/carbon/human/H)
@@ -83,6 +83,7 @@
minimal_access = list(access_hydroponics, access_morgue) // Removed tox and chem access because STOP PISSING OFF THE CHEMIST GUYS // //Removed medical access because WHAT THE FUCK YOU AREN'T A DOCTOR YOU GROW WHEAT //Given Morgue access because they have a viable means of cloning.
alt_titles = list("Hydroponicist")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/hydroponics(H), slot_w_uniform)
@@ -111,7 +112,6 @@
selection_color = "#dddddd"
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
alt_titles = list("Supplies Officer","Logistics Officer")
equip(var/mob/living/carbon/human/H)
@@ -142,7 +142,6 @@
selection_color = "#dddddd"
access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
alt_titles = list("Supplies worker","Courier","Logistics worker")
equip(var/mob/living/carbon/human/H)
@@ -171,7 +170,7 @@
selection_color = "#dddddd"
access = list(access_mining, access_mint, access_mining_station, access_mailsorting)
minimal_access = list(access_mining, access_mint, access_mining_station, access_mailsorting)
alt_titles = list("Deep space miner","NTCA Affiliate","Prospector")
alt_titles = list("Deep space miner")
equip(var/mob/living/carbon/human/H)
@@ -283,7 +282,7 @@
selection_color = "#dddddd"
access = list(access_janitor, access_maint_tunnels)
minimal_access = list(access_janitor, access_maint_tunnels)
alt_titles = list("Custodial officer","Hygiene supervisor","OHS assistant","Health and Safety worker")
alt_titles = list("Custodial officer")
equip(var/mob/living/carbon/human/H)
@@ -312,7 +311,7 @@
selection_color = "#dddddd"
access = list(access_library)
minimal_access = list(access_library)
alt_titles = list("Journalist","Clerk","Record keeper")
alt_titles = list("Journalist")
equip(var/mob/living/carbon/human/H)
@@ -341,7 +340,7 @@ var/global/lawyer = 0//Checks for another lawyer
selection_color = "#dddddd"
access = list(access_lawyer, access_court, access_sec_doors)
minimal_access = list(access_lawyer, access_court, access_sec_doors)
alt_titles = list("Attourney","Barrister","Solicitor","Queen's Counsel","Paralegal")
alt_titles = list("Attourney", "IA Consultant")
equip(var/mob/living/carbon/human/H)
+1 -1
View File
@@ -10,7 +10,7 @@
selection_color = "#dddddd"
access = list(access_morgue, access_chapel_office, access_crematorium)
minimal_access = list(access_morgue, access_chapel_office, access_crematorium)
alt_titles = list("Counselor","Psychiatrist","Crew services adviser","Morale Officer")
alt_titles = list("Counselor")
equip(var/mob/living/carbon/human/H)
-3
View File
@@ -9,7 +9,6 @@
selection_color = "#ffeeaa"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
alt_titles = list("Engineering supervisor")
access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva,
access_heads, access_construction, access_sec_doors,
@@ -55,7 +54,6 @@
alt_titles = list("Technician","Maintenance technician","Engine technician","EVA technician","Electrician","Construction specialist")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_ears)
@@ -88,7 +86,6 @@
selection_color = "#fff5cc"
access = list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
minimal_access = list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
alt_titles = list("Pipeworker","Gas supervisor","Firefighter")
equip(var/mob/living/carbon/human/H)
-1
View File
@@ -131,7 +131,6 @@
selection_color = "#ffeef0"
access = list(access_medical, access_morgue, access_genetics, access_research)
minimal_access = list(access_medical, access_morgue, access_genetics, access_research)
alt_titles = list("Sequencer")
equip(var/mob/living/carbon/human/H)
+1 -1
View File
@@ -47,7 +47,7 @@
access = list(access_tox, access_tox_storage, access_research, access_xenobiology)
minimal_access = list(access_tox, access_tox_storage, access_research, access_xenobiology)
alt_titles = list("Xenoarcheologist", "Anomalist", "Plasma Researcher", "Xenobiologist","High Energy Materials Researcher")
alt_titles = list("Xenoarcheologist", "Anomalist", "Plasma Researcher", "Xenobiologist")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
+1 -4
View File
@@ -9,7 +9,6 @@
selection_color = "#ffdddd"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
alt_titles = list("Commander","Commissioner")
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
@@ -56,7 +55,6 @@
spawn_positions = 1
supervisors = "the head of security"
selection_color = "#ffeeee"
alt_titles = list("Arsenal clerk","Brig supervisor","Superintendant")
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court)
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court)
@@ -97,7 +95,7 @@
access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
minimal_access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
alt_titles = list("Forensic Technician","Investigator")
alt_titles = list("Forensic Technician")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -144,7 +142,6 @@
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_court)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court)
alt_titles = list("OHS marshal","Enforcer")
equip(var/mob/living/carbon/human/H)
+7 -12
View File
@@ -38,8 +38,8 @@ var/global/datum/controller/occupations/job_master
if(J.title == rank) return J
return null
proc/GetAltTitle(mob/new_player/player, rank)
return player.client.prefs.GetAltTitle(GetJob(rank))
proc/GetPlayerAltTitle(mob/new_player/player, rank)
return player.client.prefs.GetPlayerAltTitle(GetJob(rank))
proc/AssignRole(var/mob/new_player/player, var/rank, var/latejoin = 0)
Debug("Running AR, Player: [player], Rank: [rank], LJ: [latejoin]")
@@ -53,7 +53,7 @@ var/global/datum/controller/occupations/job_master
if((job.current_positions < position_limit) || position_limit == -1)
Debug("Player: [player] is now Rank: [rank], JCP:[job.current_positions], JPL:[position_limit]")
player.mind.assigned_role = rank
player.mind.role_alt_title = GetAltTitle(player, rank)
player.mind.role_alt_title = GetPlayerAltTitle(player, rank)
unassigned -= player
job.current_positions++
return 1
@@ -299,9 +299,6 @@ var/global/datum/controller/occupations/job_master
H << "Your job is [rank] and the game just can't handle it! Please report this bug to an administrator."
H.job = rank
if(H.mind && H.mind.assigned_role != rank)
H.mind.assigned_role = rank
H.mind.role_alt_title = null
if(!joined_late)
var/obj/S = null
@@ -319,6 +316,7 @@ var/global/datum/controller/occupations/job_master
if(H.mind)
H.mind.assigned_role = rank
H.mind.role_alt_title = null
switch(rank)
if("Cyborg")
@@ -347,10 +345,7 @@ var/global/datum/controller/occupations/job_master
if(job.req_admin_notify)
H << "<b>You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.</b>"
if(H.mind.assigned_role == rank && H.mind.role_alt_title)
spawnId(H, rank, H.mind.role_alt_title)
else
spawnId(H,rank)
spawnId(H, rank, H.mind.role_alt_title)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_ears)
// H.update_icons()
return 1
@@ -358,7 +353,6 @@ var/global/datum/controller/occupations/job_master
proc/spawnId(var/mob/living/carbon/human/H, rank, title)
if(!H) return 0
if(!title) title = rank
var/obj/item/weapon/card/id/C = null
var/datum/job/job = null
@@ -377,7 +371,8 @@ var/global/datum/controller/occupations/job_master
C = new /obj/item/weapon/card/id(H)
if(C)
C.registered_name = H.real_name
C.assignment = title
C.rank = rank
C.assignment = title ? title : rank
C.name = "[C.registered_name]'s ID Card ([C.assignment])"
H.equip_to_slot_or_del(C, slot_wear_id)
H.equip_to_slot_or_del(new /obj/item/device/pda(H), slot_belt)
+6 -4
View File
@@ -232,8 +232,9 @@
var/t1 = href_list["assign_target"]
if(t1 == "Custom")
var/temp_t = copytext(sanitize(input("Enter a custom job assignment.","Assignment")),1,MAX_MESSAGE_LEN)
if(temp_t)
t1 = temp_t
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t && modify)
modify.assignment = temp_t
else
var/datum/job/jobdatum
for(var/jobtype in typesof(/datum/job))
@@ -246,8 +247,9 @@
return
modify.access = ( istype(src,/obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : jobdatum.get_access() )
if (modify)
modify.assignment = t1
if (modify)
modify.assignment = t1
modify.rank = t1
if ("reg")
if (authenticated)
var/t2 = modify
+1 -1
View File
@@ -52,7 +52,7 @@
world << text("\blue <B>Alert: [] authorizations needed until shuttle is launched early</B>", src.auth_need - src.authorized.len)
if("Abort")
world << "\blue <B>All authorizations to shorting time for shuttle launch have been revoked!</B>"
world << "\blue <B>All authorizations to shortening time for shuttle launch have been revoked!</B>"
src.authorized.len = 0
src.authorized = list( )
+1 -1
View File
@@ -4,7 +4,7 @@
icon_state = "cell-off"
density = 1
anchored = 1.0
layer = 5
layer = 2.8
var/on = 0
var/temperature_archived
+23 -19
View File
@@ -1,3 +1,5 @@
#define SPEED_MULTIPLIER 0.5
/obj/machinery/hydroponics
name = "hydroponics tray"
icon = 'icons/obj/hydroponics.dmi'
@@ -45,42 +47,42 @@ obj/machinery/hydroponics/process()
lastcycle = world.time
if(planted && !dead)
// Advance age
age++
age += 1 * SPEED_MULTIPLIER
//Nutrients//////////////////////////////////////////////////////////////
// Nutrients deplete slowly
if(nutrilevel > 0)
if(prob(50))
nutrilevel -= 1
nutrilevel -= 1 * SPEED_MULTIPLIER
// Lack of nutrients hurts non-weeds
if(nutrilevel <= 0 && myseed.plant_type != 1)
health -= rand(1,3)
health -= rand(1,3) * SPEED_MULTIPLIER
//Water//////////////////////////////////////////////////////////////////
// Drink random amount of water
waterlevel = max(waterlevel - rand(1,6), 0)
waterlevel = max(waterlevel - rand(1,6) * SPEED_MULTIPLIER, 0)
// If the plant is dry, it loses health pretty fast, unless mushroom
if(waterlevel <= 10 && myseed.plant_type != 2)
health -= rand(0,1)
health -= rand(0,1) * SPEED_MULTIPLIER
if(waterlevel <= 0)
health -= rand(0,2)
health -= rand(0,2) * SPEED_MULTIPLIER
// Sufficient water level and nutrient level = plant healthy
else if(waterlevel > 10 && nutrilevel > 0)
health += rand(1,2)
health += rand(1,2) * SPEED_MULTIPLIER
if(prob(5)) //5 percent chance the weed population will increase
weedlevel += 1
weedlevel += 1 * SPEED_MULTIPLIER
//Toxins/////////////////////////////////////////////////////////////////
// Too much toxins cause harm, but when the plant drinks the contaiminated water, the toxins disappear slowly
if(toxic >= 40 && toxic < 80)
health -= 1
toxic -= rand(1,10)
health -= 1 * SPEED_MULTIPLIER
toxic -= rand(1,10) * SPEED_MULTIPLIER
else if(toxic >= 80) // I don't think it ever gets here tbh unless above is commented out
health -= 3
toxic -= rand(1,10)
health -= 3 * SPEED_MULTIPLIER
toxic -= rand(1,10) * SPEED_MULTIPLIER
else if(toxic < 0) // Make sure it won't go overoboard
toxic = 0
@@ -91,11 +93,11 @@ obj/machinery/hydroponics/process()
pestlevel = 10
else if(pestlevel >= 5)
health -= 1
health -= 1 * SPEED_MULTIPLIER
// If it's a weed, it doesn't stunt the growth
if(weedlevel >= 5 && myseed.plant_type != 1 )
health -= 1
health -= 1 * SPEED_MULTIPLIER
//Health & Age///////////////////////////////////////////////////////////
@@ -107,12 +109,12 @@ obj/machinery/hydroponics/process()
else if(health <= 0)
dead = 1
harvest = 0
weedlevel += 1 // Weeds flourish
weedlevel += 1 * SPEED_MULTIPLIER // Weeds flourish
pestlevel = 0 // Pests die
// If the plant is too old, lose health fast
if(age > myseed.lifespan)
health -= rand(1,5)
health -= rand(1,5) * SPEED_MULTIPLIER
// Harvest code
if(age > myseed.production && (age - lastproduce) > myseed.production && (!harvest && !dead))
@@ -129,10 +131,10 @@ obj/machinery/hydroponics/process()
else
lastproduce = age
if(prob(5)) // On each tick, there's a 5 percent chance the pest population will increase
pestlevel += 1
pestlevel += 1 * SPEED_MULTIPLIER
else
if(waterlevel > 10 && nutrilevel > 0 && prob(10)) // If there's no plant, the percentage chance is 10%
weedlevel += 1
weedlevel += 1 * SPEED_MULTIPLIER
if(weedlevel > 10)
weedlevel = 10
@@ -1038,4 +1040,6 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
SetLuminosity(round(myseed.potency/10))
else
SetLuminosity(0)
return
return
#undef SPEED_MULTIPLIER
-422
View File
@@ -1,422 +0,0 @@
/obj/item/proc/attack_self()
return
/obj/item/proc/talk_into(mob/M as mob, text)
return
/obj/item/proc/moved(mob/user as mob, old_loc as turf)
return
/obj/item/proc/dropped(mob/user as mob)
..()
// called just as an item is picked up (loc is not yet changed)
/obj/item/proc/pickup(mob/user)
return
// called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
/obj/item/proc/on_exit_storage(obj/item/weapon/storage/S as obj)
return
// called when this item is added into a storage item, which is passed on as S. The loc variable is already set to the storage item.
/obj/item/proc/on_enter_storage(obj/item/weapon/storage/S as obj)
return
// called after an item is placed in an equipment slot
// user is mob that equipped it
// slot uses the slot_X defines found in setup.dm
// for items that can be placed in multiple slots
// note this isn't called during the initial dressing of a player
/obj/item/proc/equipped(var/mob/user, var/slot)
return
/obj/item/proc/afterattack()
return
/obj/item/weapon/dummy/ex_act()
return
/obj/item/weapon/dummy/blob_act()
return
/obj/item/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(50))
del(src)
return
if(3.0)
if (prob(5))
del(src)
return
else
return
/obj/item/blob_act()
return
/obj/item/verb/move_to_top()
set name = "Move To Top"
set category = "Object"
set src in oview(1)
if(!istype(src.loc, /turf) || usr.stat || usr.restrained() )
return
var/turf/T = src.loc
src.loc = null
src.loc = T
/obj/item/examine()
set src in view()
var/t
switch(src.w_class)
if(1.0)
t = "tiny"
if(2.0)
t = "small"
if(3.0)
t = "normal-sized"
if(4.0)
t = "bulky"
if(5.0)
t = "huge"
else
if ((CLUMSY in usr.mutations) && prob(50)) t = "funny-looking"
usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA ? "" : "bloody ",src, src.name, t)
if(src.desc)
usr << src.desc
return
/obj/item/attack_hand(mob/user as mob)
if (!user) return
if (istype(src.loc, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = src.loc
S.remove_from_storage(src)
src.throwing = 0
if (src.loc == user)
//canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N
if(!src.canremove)
return
else
user.u_equip(src)
else
if(isliving(src.loc))
return
src.pickup(user)
user.lastDblClick = world.time + 2
user.next_move = world.time + 2
add_fingerprint(user)
user.put_in_active_hand(src)
return
/obj/item/attack_paw(mob/user as mob)
if(isalien(user)) // -- TLE
var/mob/living/carbon/alien/A = user
if(!A.has_fine_manipulation || w_class >= 4)
if(src in A.contents) // To stop Aliens having items stuck in their pockets
A.drop_from_inventory(src)
user << "Your claws aren't capable of such fine manipulation."
return
if (istype(src.loc, /obj/item/weapon/storage))
for(var/mob/M in range(1, src.loc))
if (M.s_active == src.loc)
if (M.client)
M.client.screen -= src
src.throwing = 0
if (src.loc == user)
//canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N
if(istype(src, /obj/item/clothing) && !src:canremove)
return
else
user.u_equip(src)
else
if(istype(src.loc, /mob/living))
return
src.pickup(user)
user.lastDblClick = world.time + 2
user.next_move = world.time + 2
user.put_in_active_hand(src)
return
/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
if(S.use_to_pickup)
if(!S.can_be_inserted(src))
return
if(S.collection_mode) //Mode is set to collect all items on a tile and we clicked on a valid one.
if(isturf(src.loc))
for(var/obj/item/I in src.loc)
if(I != src) //We'll do the one we clicked on last.
if(!S.can_be_inserted(src))
continue
S.handle_item_insertion(I, 1) //The 1 stops the "You put the [src] into [S]" insertion message from being displayed.
S.handle_item_insertion(src)
return
mob/proc/flash_weak_pain()
flick("weak_pain",pain)
/obj/item/proc/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
if (!istype(M)) // not sure if this is the right thing...
return
var/messagesource = M
if (istype(M,/mob/living/carbon/brain))
messagesource = M:container
if (src.hitsound)
playsound(src.loc, hitsound, 50, 1, -1)
M.flash_weak_pain()
/////////////////////////
user.lastattacked = M
M.lastattacker = user
var/power = src.force
// EXPERIMENTAL: scale power and time to the weight class
if(w_class >= 4.0 && !istype(src,/obj/item/weapon/melee/energy/blade)) // eswords are an exception, they only have a w_class of 4 to not fit into pockets
power = power * 2.5
user.visible_message("\red [user.name] swings at [M.name] with \the [src]!")
user.next_move = max(user.next_move, world.time + 30)
// if the mob didn't move, he has a 100% chance to hit(given the enemy also didn't move)
// otherwise, the chance to hit is lower
var/unmoved = 0
spawn
unmoved = do_after(user, 4)
sleep(4)
if( (!unmoved && !prob(70)) || (get_dist(user, M) != 1 && user != M))
user.visible_message("\red [user.name] misses with \the [src]!")
return
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>"
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)]")
msg_admin_attack("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)]")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>" )
//spawn(1800) // this wont work right
// M.lastattacker = null
/////////////////////////
if((HULK in user.mutations) || (SUPRSTR in user.augmentations))
power *= 2
if(!istype(M, /mob/living/carbon/human))
if(istype(M, /mob/living/carbon/metroid))
var/mob/living/carbon/metroid/Metroid = M
if(prob(25))
user << "\red [src] passes right through [M]!"
return
if(power > 0)
Metroid.attacked += 10
if(Metroid.Discipline && prob(50)) // wow, buddy, why am I getting attacked??
Metroid.Discipline = 0
if(power >= 3)
if(istype(Metroid, /mob/living/carbon/metroid/adult))
if(prob(5 + round(power/2)))
if(Metroid.Victim)
if(prob(80) && !Metroid.client)
Metroid.Discipline++
Metroid.Victim = null
Metroid.anchored = 0
spawn()
if(Metroid)
Metroid.SStun = 1
sleep(rand(5,20))
if(Metroid)
Metroid.SStun = 0
spawn(0)
if(Metroid)
Metroid.canmove = 0
step_away(Metroid, user)
if(prob(25 + power))
sleep(2)
if(Metroid && user)
step_away(Metroid, user)
Metroid.canmove = 1
else
if(prob(10 + power*2))
if(Metroid)
if(Metroid.Victim)
if(prob(80) && !Metroid.client)
Metroid.Discipline++
if(Metroid.Discipline == 1)
Metroid.attacked = 0
spawn()
if(Metroid)
Metroid.SStun = 1
sleep(rand(5,20))
if(Metroid)
Metroid.SStun = 0
Metroid.Victim = null
Metroid.anchored = 0
spawn(0)
if(Metroid && user)
step_away(Metroid, user)
Metroid.canmove = 0
if(prob(25 + power*4))
sleep(2)
if(Metroid && user)
step_away(Metroid, user)
Metroid.canmove = 1
var/showname = "."
if(user)
showname = " by [user]."
if(!(user in viewers(M, null)))
showname = "."
for(var/mob/O in viewers(messagesource, null))
if(src.attack_verb.len)
O.show_message("\red <B>[M] has been [pick(src.attack_verb)] with [src][showname] </B>", 1)
else
O.show_message("\red <B>[M] has been attacked with [src][showname] </B>", 1)
if(!showname && user)
if(user.client)
user << "\red <B>You attack [M] with [src]. </B>"
if(istype(M, /mob/living/carbon/human))
M:attacked_by(src, user, def_zone)
else
switch(src.damtype)
if("brute")
if(istype(src, /mob/living/carbon/metroid))
M.adjustBrainLoss(power)
else
M.take_organ_damage(power)
if (prob(33)) // Added blood for whacking non-humans too
var/turf/location = M.loc
if (istype(location, /turf/simulated))
location.add_blood_floor(M)
if("fire")
if (!(COLD_RESISTANCE in M.mutations))
M.take_organ_damage(0, power)
M << "Aargh it burns!"
M.updatehealth()
src.add_fingerprint(user)
return 1
/obj/item/proc/IsShield()
return 0
/obj/item/proc/eyestab(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
var/mob/living/carbon/human/H = M
if(istype(H) && ( \
(H.head && H.head.flags & HEADCOVERSEYES) || \
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
))
// you can't stab someone in the eyes wearing a mask!
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
var/mob/living/carbon/monkey/Mo = M
if(istype(Mo) && ( \
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
))
// you can't stab someone in the eyes wearing a mask!
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/metroid))//Aliens don't have eyes./N Metroids also don't have eyes!
user << "\red You cannot locate any eyes on this creature!"
return
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
log_attack("<font color='red'> [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
log_admin("ATTACK: [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG
src.add_fingerprint(user)
//if((CLUMSY in user.mutations) && prob(50))
// M = user
/*
M << "\red You stab yourself in the eye."
M.sdisabilities |= BLIND
M.weakened += 4
M.adjustBruteLoss(10)
*/
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] has been stabbed in the eye with [src] by [user].", 1)
M << "\red [user] stabs you in the eye with [src]!"
user << "\red You stab [M] in the eye with [src]!"
else
user.visible_message( \
"\red [user] has stabbed themself with [src]!", \
"\red You stab yourself in the eyes with [src]!" \
)
if(istype(M, /mob/living/carbon/human))
var/datum/organ/external/affecting = M:get_organ("head")
if(affecting.take_damage(7))
M:UpdateDamageIcon()
else
M.take_organ_damage(7)
M.eye_blurry += rand(3,4)
M.eye_stat += rand(2,4)
if (M.eye_stat >= 10)
M.eye_blurry += 15+(0.1*M.eye_blurry)
M.disabilities |= NEARSIGHTED
if(M.stat != 2)
M << "\red Your eyes start to bleed profusely!"
if(prob(50))
if(M.stat != 2)
M << "\red You drop what you're holding and clutch at your eyes!"
M.drop_item()
M.eye_blurry += 10
M.Paralyse(1)
M.Weaken(4)
if (prob(M.eye_stat - 10 + 1))
if(M.stat != 2)
M << "\red You go blind!"
M.sdisabilities |= BLIND
return
@@ -72,6 +72,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
*/
var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1), \
)
/obj/item/stack/sheet/plasteel
+1
View File
@@ -167,6 +167,7 @@
src.add_fingerprint(user)
if (src.bullets < 1)
user.show_message("\red *click* *click*", 2)
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
return
playsound(user, 'sound/weapons/Gunshot.ogg', 100, 1)
src.bullets--
+4 -2
View File
@@ -16,6 +16,7 @@
desc = "Does card things."
icon = 'icons/obj/card.dmi'
w_class = 1.0
var/associated_account_number = 0
var/list/files = list( )
@@ -74,8 +75,9 @@
var/dna_hash = "\[UNSET\]"
var/fingerprint_hash = "\[UNSET\]"
var/assignment = null
var/assignment_real_title = null
//alt titles are handled a bit weirdly in order to unobtrusively integrate into existing ID system
var/assignment = null //can be alt title or the actual job
var/rank = null //actual job
var/dorm = 0 // determines if this ID has claimed a dorm already
/obj/item/weapon/card/id/attack_self(mob/user as mob)
@@ -347,6 +347,16 @@
return
return
/obj/item/weapon/tray/var/cooldown = 0 //shield bash cooldown. based on world.time
/obj/item/weapon/tray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/kitchen/rollingpin))
if(cooldown < world.time - 25)
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
cooldown = world.time
else
..()
/*
===============~~~~~================================~~~~~====================
+39 -10
View File
@@ -355,7 +355,7 @@ var/list/mechtoys = list(
dat += {"<BR><B>Supply shuttle</B><HR>
Location: [supply_shuttle.moving ? "Moving to station ([supply_shuttle.eta] Mins.)":supply_shuttle.at_station ? "Station":"Dock"]<BR>
<HR>Supply points: [supply_shuttle.points]<BR>
<BR>\n<A href='?src=\ref[src];order=1'>Request items</A><BR><BR>
<BR>\n<A href='?src=\ref[src];order=categories'>Request items</A><BR><BR>
<A href='?src=\ref[src];vieworders=1'>View approved orders</A><BR><BR>
<A href='?src=\ref[src];viewrequests=1'>View requests</A><BR><BR>
<A href='?src=\ref[user];mach_close=computer'>Close</A>"}
@@ -372,12 +372,23 @@ var/list/mechtoys = list(
usr.set_machine(src)
if(href_list["order"])
temp = "Supply points: [supply_shuttle.points]<BR><HR><BR>Request what?<BR><BR>"
for(var/supply_name in supply_shuttle.supply_packs )
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
if(N.hidden || N.contraband) continue //Have to send the type instead of a reference to
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
if(href_list["order"] == "categories")
//all_supply_groups
//Request what?
temp = "<b>Supply points: [supply_shuttle.points]</b><BR>"
temp += "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A><HR><BR><BR>"
temp += "<b>Select a category</b><BR><BR>"
for(var/supply_group_name in all_supply_groups )
temp += "<A href='?src=\ref[src];order=[supply_group_name]'>[supply_group_name]</A><BR>"
else
var/cur_supply_group = href_list["order"]
temp = "<b>Supply points: [supply_shuttle.points]</b><BR>"
temp += "<A href='?src=\ref[src];order=categories'>Back to all categories</A><HR><BR><BR>"
temp += "<b>Request from: [cur_supply_group]</b><BR><BR>"
for(var/supply_name in supply_shuttle.supply_packs )
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
if(N.hidden || N.contraband || N.group != cur_supply_group) continue //Have to send the type instead of a reference to
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
else if (href_list["doorder"])
if(world.time < reqtime)
@@ -468,7 +479,7 @@ var/list/mechtoys = list(
dat += {"<BR><B>Supply shuttle</B><HR>
\nLocation: [supply_shuttle.moving ? "Moving to station ([supply_shuttle.eta] Mins.)":supply_shuttle.at_station ? "Station":"Away"]<BR>
<HR>\nSupply points: [supply_shuttle.points]<BR>\n<BR>
[supply_shuttle.moving ? "\n*Must be away to order items*<BR>\n<BR>":supply_shuttle.at_station ? "\n*Must be away to order items*<BR>\n<BR>":"\n<A href='?src=\ref[src];order=1'>Order items</A><BR>\n<BR>"]
[supply_shuttle.moving ? "\n*Must be away to order items*<BR>\n<BR>":supply_shuttle.at_station ? "\n*Must be away to order items*<BR>\n<BR>":"\n<A href='?src=\ref[src];order=categories'>Order items</A><BR>\n<BR>"]
[supply_shuttle.moving ? "\n*Shuttle already called*<BR>\n<BR>":supply_shuttle.at_station ? "\n<A href='?src=\ref[src];send=1'>Send away</A><BR>\n<BR>":"\n<A href='?src=\ref[src];send=1'>Send to station</A><BR>\n<BR>"]
\n<A href='?src=\ref[src];viewrequests=1'>View requests</A><BR>\n<BR>
\n<A href='?src=\ref[src];vieworders=1'>View orders</A><BR>\n<BR>
@@ -544,14 +555,32 @@ var/list/mechtoys = list(
else if (href_list["order"])
if(supply_shuttle.moving) return
temp = "Supply points: [supply_shuttle.points]<BR><HR><BR>Request what?<BR><BR>"
if(href_list["order"] == "categories")
//all_supply_groups
//Request what?
temp = "<b>Supply points: [supply_shuttle.points]</b><BR>"
temp += "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A><HR><BR><BR>"
temp += "<b>Select a category</b><BR><BR>"
for(var/supply_group_name in all_supply_groups )
temp += "<A href='?src=\ref[src];order=[supply_group_name]'>[supply_group_name]</A><BR>"
else
var/cur_supply_group = href_list["order"]
temp = "<b>Supply points: [supply_shuttle.points]</b><BR>"
temp += "<A href='?src=\ref[src];order=categories'>Back to all categories</A><HR><BR><BR>"
temp += "<b>Request from: [cur_supply_group]</b><BR><BR>"
for(var/supply_name in supply_shuttle.supply_packs )
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
if(N.hidden || N.contraband || N.group != cur_supply_group) continue //Have to send the type instead of a reference to
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
/*temp = "Supply points: [supply_shuttle.points]<BR><HR><BR>Request what?<BR><BR>"
for(var/supply_name in supply_shuttle.supply_packs )
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
if(N.hidden && !hacked) continue
if(N.contraband && !can_order_contraband) continue
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"*/
else if (href_list["doorder"])
if(world.time < reqtime)
+1 -1
View File
@@ -70,7 +70,7 @@ var/blobevent = 0
var/diary = null
var/diaryofmeanpeople = null
var/href_logfile = null
var/station_name = "NSV Exodus"
var/station_name = "NSS Exodus"
var/game_version = "Baystation12"
var/changelog_hash = ""
-1
View File
@@ -8,7 +8,6 @@
item_state = ""
w_class = 1
/obj/item/weapon/evidencebag/afterattack(obj/item/O, mob/user as mob)
/obj/item/weapon/evidencebag/afterattack(obj/item/I, mob/user as mob)
if(!in_range(I, user))
return
+11 -11
View File
@@ -91,7 +91,7 @@ datum/preferences
// will probably not be able to do this for head and torso ;)
var/list/organ_data = list()
var/list/job_alt_titles = new() // the default name of a job like "Medical Doctor"
var/list/player_alt_titles = new() // the default name of a job like "Medical Doctor"
var/flavor_text = ""
var/med_record = ""
@@ -425,7 +425,7 @@ datum/preferences
else
HTML += " <font color=red>\[NEVER]</font>"
if(job.alt_titles)
HTML += "</a><br> <a href=\"byond://?src=\ref[user];preference=job;task=alt_title;job=\ref[job]\">\[[GetAltTitle(job)]\]</a></td></tr>"
HTML += "</a><br> <a href=\"byond://?src=\ref[user];preference=job;task=alt_title;job=\ref[job]\">\[[GetPlayerAltTitle(job)]\]</a></td></tr>"
HTML += "</a></td></tr>"
HTML += "</td'></tr></table>"
@@ -487,18 +487,18 @@ datum/preferences
user << browse(HTML, "window=records;size=350x300")
return
proc/GetAltTitle(datum/job/job)
return job_alt_titles.Find(job.title) > 0 \
? job_alt_titles[job.title] \
proc/GetPlayerAltTitle(datum/job/job)
return player_alt_titles.Find(job.title) > 0 \
? player_alt_titles[job.title] \
: job.title
proc/SetAltTitle(datum/job/job, new_title)
proc/SetPlayerAltTitle(datum/job/job, new_title)
// remove existing entry
if(job_alt_titles.Find(job.title))
job_alt_titles -= job.title
if(player_alt_titles.Find(job.title))
player_alt_titles -= job.title
// add one if it's not default
if(job.title != new_title)
job_alt_titles[job.title] = new_title
player_alt_titles[job.title] = new_title
proc/SetJob(mob/user, role)
var/datum/job/job = job_master.GetJob(role)
@@ -638,9 +638,9 @@ datum/preferences
var/datum/job/job = locate(href_list["job"])
if (job)
var/choices = list(job.title) + job.alt_titles
var/choice = input("Pick a title for [job.title].", "Character Generation", GetAltTitle(job)) as anything in choices | null
var/choice = input("Pick a title for [job.title].", "Character Generation", GetPlayerAltTitle(job)) as anything in choices | null
if(choice)
SetAltTitle(job, choice)
SetPlayerAltTitle(job, choice)
SetChoices(user)
if("input")
SetJob(user, href_list["text"])
+3 -3
View File
@@ -138,7 +138,7 @@
S["sec_record"] >> sec_record
S["be_special"] >> be_special
S["disabilities"] >> disabilities
S["job_alt_titles"] >> job_alt_titles
S["player_alt_titles"] >> player_alt_titles
S["used_skillpoints"] >> used_skillpoints
S["skills"] >> skills
S["skill_specialization"] >> skill_specialization
@@ -182,7 +182,7 @@
if(!skills) skills = list()
if(!used_skillpoints) used_skillpoints= 0
if(isnull(disabilities)) disabilities = 0
if(!job_alt_titles) job_alt_titles = new()
if(!player_alt_titles) player_alt_titles = new()
if(!organ_data) src.organ_data = list()
//if(!skin_style) skin_style = "Default"
@@ -232,7 +232,7 @@
S["flavor_text"] << flavor_text
S["med_record"] << med_record
S["sec_record"] << sec_record
S["job_alt_titles"] << job_alt_titles
S["player_alt_titles"] << player_alt_titles
S["be_special"] << be_special
S["used_skillpoints"] << used_skillpoints
S["skills"] << skills
+2 -3
View File
@@ -83,14 +83,13 @@
var/icon/tempHud = 'icons/mob/hud.dmi'
for(var/mob/living/carbon/human/perp in view(M))
if(!C) continue
var/perpname = "wot"
var/perpname = perp.name
if(perp.wear_id)
var/obj/item/weapon/card/id/I = perp.wear_id.GetID()
if(I)
C.images += image(tempHud, perp, "hud[ckey(I.GetJobName())]")
C.images += image(tempHud, perp, "hud[ckey(I.GetJobRealName())]")
perpname = I.registered_name
else
perpname = perp.name
C.images += image(tempHud, perp, "hudunknown")
for(var/datum/data/record/E in data_core.general)
+1 -1
View File
@@ -133,7 +133,7 @@
/obj/item/clothing/suit/space/rig/security
desc = "A special suit that protects against hazardous, low pressure environments. Has additional layers of armour and ablative shielding in lieu of radiation shielding."
icon_state = "rig-security"
name = "atmos hardsuit"
name = "security hardsuit"
item_state = "atmos_hardsuit"
armor = list(melee = 45, bullet = 10, laser = 25,energy = 10, bomb = 40, bio = 100, rad = 5)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/gun/energy)
+6
View File
@@ -382,6 +382,12 @@ hi
icon = 'custom_items.dmi'
icon_state = "chal_appara_1"
/obj/item/clothing/gloves/fluff/ashley_rifler_1 //Vinceluk: Ashley Rifler
name = "Purple Glove"
desc = "A single, purple glove. Initials A.R. are written on the inside of it."
icon = 'custom_items.dmi'
icon_state = "ashley_rifler_1"
//////////// Eye Wear ////////////
/obj/item/clothing/glasses/meson/fluff/book_berner_1 //asanadas: Book Berner
File diff suppressed because it is too large Load Diff
-23
View File
@@ -1,23 +0,0 @@
/obj/item/weapon/reagent_containers/food/snacks/meat
name = "meat"
desc = "A slab of meat"
icon_state = "meat"
health = 180
New()
..()
reagents.add_reagent("nutriment", 3)
src.bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/meat/syntiflesh
name = "synthetic meat"
desc = "A synthetic slab of flesh."
/obj/item/weapon/reagent_containers/food/snacks/meat/human
name = "-meat"
var/subjectname = ""
var/subjectjob = null
/obj/item/weapon/reagent_containers/food/snacks/meat/monkey
//same as plain meat
+5
View File
@@ -28,6 +28,7 @@
var/amt_plasma = 0
var/amt_uranium = 0
var/amt_clown = 0
var/amt_strange = 0
for (var/obj/item/weapon/ore/C in contents)
@@ -47,6 +48,8 @@
amt_uranium++;
if (istype(C,/obj/item/weapon/ore/clown))
amt_clown++;
if (istype(C,/obj/item/weapon/ore/strangerock))
amt_strange++;
var/dat = text("<b>The contents of the ore box reveal...</b><br>")
if (amt_gold)
@@ -65,6 +68,8 @@
dat += text("Uranium ore: [amt_uranium]<br>")
if (amt_clown)
dat += text("Bananium ore: [amt_clown]<br>")
if (amt_strange)
dat += text("Strange rocks: [amt_strange]<br>")
dat += text("<br><br><A href='?src=\ref[src];removeall=1'>Empty box</A>")
user << browse("[dat]", "window=orebox")
@@ -258,3 +258,31 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
see_invisible = SEE_INVISIBLE_OBSERVER
else
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
/mob/dead/observer/verb/become_mouse()
set name = "Become mouse"
set category = "Ghost"
//find a viable mouse candidate
var/mob/living/simple_animal/mouse/host
var/list/mouse_candidates = list()
for(var/mob/living/simple_animal/mouse/M in world)
if(!M.ckey && !M.stat)
mouse_candidates.Add(M)
if(mouse_candidates.len)
host = pick(mouse_candidates)
else
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/list/found_vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
if(!v.welded && v.z == src.z)
found_vents.Add(v)
if(found_vents.len)
vent_found = pick(found_vents)
host = new /mob/living/simple_animal/mouse(vent_found.loc)
else
src << "<span class='warning'>Unable to find any live mice, or unwelded vents to spawn one at.</span>"
if(host)
host.ckey = src.ckey
host << "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>"
+1 -1
View File
@@ -629,7 +629,7 @@ Radar-related things
var/mob/living/M = A
if(ishuman(M))
if(M:wear_id)
var/job = M:wear_id:GetJobName()
var/job = M:wear_id:GetJobRealName()
if(job == "Security Officer")
blip.icon_state = "secblip"
blip.name = "Security Officer"
+6 -6
View File
@@ -776,13 +776,13 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
fire_alert = max(fire_alert, 1)
switch(bodytemperature)
if(360 to 400)
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN)
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
if(400 to 1000)
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN)
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
if(1000 to INFINITY)
apply_damage(HEAT_DAMAGE_LEVEL_3, BURN)
apply_damage(HEAT_DAMAGE_LEVEL_3, BURN, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
else if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
@@ -790,13 +790,13 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
switch(bodytemperature)
if(200 to 260)
apply_damage(COLD_DAMAGE_LEVEL_1, BURN)
apply_damage(COLD_DAMAGE_LEVEL_1, BURN, used_weapon = "Low Body Temperature")
fire_alert = max(fire_alert, 1)
if(120 to 200)
apply_damage(COLD_DAMAGE_LEVEL_2, BURN)
apply_damage(COLD_DAMAGE_LEVEL_2, BURN, used_weapon = "Low Body Temperature")
fire_alert = max(fire_alert, 1)
if(-INFINITY to 120)
apply_damage(COLD_DAMAGE_LEVEL_3, BURN)
apply_damage(COLD_DAMAGE_LEVEL_3, BURN, used_weapon = "Low Body Temperature")
fire_alert = max(fire_alert, 1)
// Account for massive pressure differences. Done by Polymorph
+2 -2
View File
@@ -8,7 +8,7 @@
Returns
standard 0 if fail
*/
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0)
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/used_weapon = null)
if(!damage || (blocked >= 2)) return 0
switch(damagetype)
if(BRUTE)
@@ -72,4 +72,4 @@
if(stutter) apply_effect(stutter, STUTTER, blocked)
if(eyeblur) apply_effect(eyeblur, EYE_BLUR, blocked)
if(drowsy) apply_effect(drowsy, DROWSY, blocked)
return 1
return 1
+1 -1
View File
@@ -57,7 +57,7 @@
P.on_hit(src,2)
return 2
if(!P.nodamage)
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone)
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, used_weapon = "Projectile([P.name])")
P.on_hit(src, absorb)
return absorb
+1 -1
View File
@@ -10,7 +10,7 @@
var/turf/T = get_turf_or_move(src.loc)
for(var/mob/living/carbon/human/perp in view(T))
if(perp.wear_id)
client.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]")
client.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobRealName())]")
var/perpname = "wot"
if(istype(perp.wear_id,/obj/item/weapon/card/id))
perpname = perp.wear_id:registered_name
+3 -2
View File
@@ -318,8 +318,9 @@
if(job && IsJobAvailable(job.title))
var/active = 0
// Only players with the job assigned and AFK for less than 10 minutes count as active
for(var/mob/M in player_list) if(M.mind && M.client && M.mind.assigned_job == job && M.client.inactivity <= 10 * 60 * 10)
active++
for(var/mob/M in player_list)
if(M.mind && M.mind.assigned_job == job && M.client && M.client.inactivity <= 10 * 60 * 10)
active++
dat += "<a href='byond://?src=\ref[src];SelectedJob=[job.title]'>[job.title] ([job.current_positions]) (Active: [active])</a><br>"
dat += "</center>"
+1
View File
@@ -75,6 +75,7 @@
return
if(!load_into_chamber())
user << "\red *click*";
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
return
if(!in_chamber)
@@ -143,6 +143,7 @@
if(!loaded.len)
user.visible_message("\red *click*", "\red *click*")
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
return
if(isliving(target) && isliving(user))
@@ -153,6 +154,7 @@
var/obj/item/ammo_casing/AC = loaded[1]
if(!load_into_chamber())
user.visible_message("\red *click*", "\red *click*")
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
return
if(!in_chamber)
return
+176 -34
View File
@@ -1,8 +1,11 @@
#define SOLID 1
#define LIQUID 2
#define GAS 3
<<<<<<< HEAD
#define REAGENTS_OVERDOSE 30
#define FOOD_METABOLISM 0.4
=======
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
//The reaction procs must ALWAYS set src = null, this detaches the proc from the object (the reagent)
//so that it can continue working when the reagent is deleted while the proc is still active.
@@ -311,6 +314,7 @@ datum
if(!M) M = holder.my_atom
M.drowsyness = max(M.drowsyness-2*REAGENTS_EFFECT_MULTIPLIER, 0)
if(holder.has_reagent("toxin"))
<<<<<<< HEAD
holder.remove_reagent("toxin", 10*REAGENTS_METABOLISM)
if(holder.has_reagent("stoxin"))
holder.remove_reagent("stoxin", 10*REAGENTS_METABOLISM)
@@ -332,6 +336,29 @@ datum
holder.remove_reagent("mindbreaker", 10*REAGENTS_METABOLISM)
M.hallucination = max(0, M.hallucination - 5*REAGENTS_EFFECT_MULTIPLIER)
M.adjustToxLoss(-2*REAGENTS_EFFECT_MULTIPLIER)
=======
holder.remove_reagent("toxin", 2)
if(holder.has_reagent("stoxin"))
holder.remove_reagent("stoxin", 2)
if(holder.has_reagent("plasma"))
holder.remove_reagent("plasma", 1)
if(holder.has_reagent("sacid"))
holder.remove_reagent("sacid", 1)
if(holder.has_reagent("cyanide"))
holder.remove_reagent("cyanide", 1)
if(holder.has_reagent("amatoxin"))
holder.remove_reagent("amatoxin", 2)
if(holder.has_reagent("chloralhydrate"))
holder.remove_reagent("chloralhydrate", 5)
if(holder.has_reagent("carpotoxin"))
holder.remove_reagent("carpotoxin", 1)
if(holder.has_reagent("zombiepowder"))
holder.remove_reagent("zombiepowder", 0.5)
if(holder.has_reagent("mindbreaker"))
holder.remove_reagent("mindbreaker", 2)
M.hallucination = max(0, M.hallucination - 5)
M.adjustToxLoss(-2)
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
..()
return
@@ -360,8 +387,6 @@ datum
M.adjustToxLoss(3*REAGENTS_EFFECT_MULTIPLIER)
M.adjustOxyLoss(3*REAGENTS_EFFECT_MULTIPLIER)
M.sleeping += 1
// Sleep toxins should always be consumed pretty fast
holder.remove_reagent(src.id, 0.1)
..()
return
@@ -431,8 +456,6 @@ datum
M.stuttering = 0
M.confused = 0
M.jitteriness = 0
// Sleep toxins should always be consumed pretty fast
holder.remove_reagent(src.id, 0.1)
..()
return
@@ -938,13 +961,17 @@ datum
id = "virusfood"
description = "A mixture of water, milk, and oxygen. Virus cells can use this mixture to reproduce."
reagent_state = LIQUID
nutriment_factor = 2 * FOOD_METABOLISM
nutriment_factor = 2 * REAGENTS_METABOLISM
color = "#899613" // rgb: 137, 150, 19
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
<<<<<<< HEAD
M.nutrition += nutriment_factor*REAGENTS_EFFECT_MULTIPLIER
holder.remove_reagent(src.id, FOOD_METABOLISM)
=======
M.nutrition += nutriment_factor
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
..()
return
@@ -1166,8 +1193,13 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(holder.has_reagent("inaprovaline"))
<<<<<<< HEAD
holder.remove_reagent("inaprovaline", 10*REAGENTS_METABOLISM)
M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER)
=======
holder.remove_reagent("inaprovaline", 2)
M.adjustToxLoss(1)
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
..()
return
reaction_obj(var/obj/O, var/volume)
@@ -1285,7 +1317,11 @@ datum
if(!M) M = holder.my_atom
M.adjustOxyLoss(-2*REAGENTS_EFFECT_MULTIPLIER)
if(holder.has_reagent("lexorin"))
<<<<<<< HEAD
holder.remove_reagent("lexorin", 10*REAGENTS_METABOLISM)
=======
holder.remove_reagent("lexorin", 2)
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
..()
return
@@ -1302,7 +1338,11 @@ datum
if(!M) M = holder.my_atom
M.adjustOxyLoss(-M.getOxyLoss())
if(holder.has_reagent("lexorin"))
<<<<<<< HEAD
holder.remove_reagent("lexorin", 10*REAGENTS_METABOLISM)
=======
holder.remove_reagent("lexorin", 2)
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
..()
return
@@ -1402,8 +1442,13 @@ datum
M.AdjustStunned(-1)
M.AdjustWeakened(-1)
if(holder.has_reagent("mindbreaker"))
<<<<<<< HEAD
holder.remove_reagent("mindbreaker", 10*REAGENTS_METABOLISM)
M.hallucination = max(0, M.hallucination - 10*REAGENTS_EFFECT_MULTIPLIER)
=======
holder.remove_reagent("mindbreaker", 5)
M.hallucination = max(0, M.hallucination - 10)
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
if(prob(60)) M.adjustToxLoss(1)
..()
return
@@ -1718,10 +1763,14 @@ datum
M.sleeping += 1
if(61 to INFINITY)
M.sleeping += 1
<<<<<<< HEAD
M.adjustToxLoss((data - 50) * REAGENTS_EFFECT_MULTIPLIER)
// Sleep toxins should always be consumed pretty fast
holder.remove_reagent(src.id, 0.1)
=======
M.adjustToxLoss(data - 50)
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
..()
return
@@ -1745,8 +1794,6 @@ datum
M.sleeping += 1
M.adjustToxLoss(data - 50)
data++
// Sleep toxins should always be consumed pretty fast
holder.remove_reagent(src.id, 0.1)
..()
return
@@ -1759,12 +1806,13 @@ datum
id = "nutriment"
description = "All the vitamins, minerals, and carbohydrates the body needs in pure form."
reagent_state = SOLID
nutriment_factor = 15 * FOOD_METABOLISM
nutriment_factor = 15 * REAGENTS_METABOLISM
color = "#664330" // rgb: 102, 67, 48
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M.nutrition += nutriment_factor // For hunger and fatness
<<<<<<< HEAD
holder.remove_reagent(src.id, FOOD_METABOLISM)
..()
return
@@ -1921,6 +1969,21 @@ datum
if(prob(30)) M.emote(pick("twitch","giggle"))
holder.remove_reagent(src.id, 0.2)
data++
=======
/*
// If overeaten - vomit and fall down
// Makes you feel bad but removes reagents and some effect
// from your body
if (M.nutrition > 650)
M.nutrition = rand (250, 400)
M.weakened += rand(2, 10)
M.jitteriness += rand(0, 5)
M.dizziness = max (0, (M.dizziness - rand(0, 15)))
M.druggy = max (0, (M.druggy - rand(0, 15)))
M.adjustToxLoss(rand(-15, -5)))
M.updatehealth()
*/
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
..()
return
@@ -1929,7 +1992,7 @@ datum
id = "lipozine"
description = "A chemical compound that causes a powerful fat-burning reaction."
reagent_state = LIQUID
nutriment_factor = 10 * FOOD_METABOLISM
nutriment_factor = 10 * REAGENTS_METABOLISM
color = "#BBEDA4" // rgb: 187, 237, 164
on_mob_life(var/mob/living/M as mob)
@@ -1946,7 +2009,7 @@ datum
id = "soysauce"
description = "A salty sauce made from the soy plant."
reagent_state = LIQUID
nutriment_factor = 2 * FOOD_METABOLISM
nutriment_factor = 2 * REAGENTS_METABOLISM
color = "#792300" // rgb: 121, 35, 0
ketchup
@@ -1954,7 +2017,7 @@ datum
id = "ketchup"
description = "Ketchup, catsup, whatever. It's tomato paste."
reagent_state = LIQUID
nutriment_factor = 5 * FOOD_METABOLISM
nutriment_factor = 5 * REAGENTS_METABOLISM
color = "#731008" // rgb: 115, 16, 8
sodiumchloride
@@ -1993,8 +2056,13 @@ datum
if(1 to 15)
M.bodytemperature += 5 * TEMPERATURE_DAMAGE_COEFFICIENT
if(holder.has_reagent("frostoil"))
<<<<<<< HEAD
holder.remove_reagent("frostoil", 10*REAGENTS_METABOLISM)
if(istype(M, /mob/living/carbon/metroid))
=======
holder.remove_reagent("frostoil", 5)
if(istype(M, /mob/living/carbon/slime))
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
M.bodytemperature += rand(5,20)
if(15 to 25)
M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT
@@ -2079,8 +2147,13 @@ datum
if(1 to 15)
M.bodytemperature -= 5 * TEMPERATURE_DAMAGE_COEFFICIENT
if(holder.has_reagent("capsaicin"))
<<<<<<< HEAD
holder.remove_reagent("capsaicin", 10*REAGENTS_METABOLISM)
if(istype(M, /mob/living/carbon/metroid))
=======
holder.remove_reagent("capsaicin", 5)
if(istype(M, /mob/living/carbon/slime))
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
M.bodytemperature -= rand(5,20)
if(15 to 25)
M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT
@@ -2113,12 +2186,11 @@ datum
id = "coco"
description = "A fatty, bitter paste made from coco beans."
reagent_state = SOLID
nutriment_factor = 5 * FOOD_METABOLISM
nutriment_factor = 5 * REAGENTS_METABOLISM
color = "#302000" // rgb: 48, 32, 0
on_mob_life(var/mob/living/M as mob)
M.nutrition += nutriment_factor
holder.remove_reagent(src.id, FOOD_METABOLISM)
..()
return
@@ -2127,14 +2199,13 @@ datum
id = "hot_coco"
description = "Made with love! And coco beans."
reagent_state = LIQUID
nutriment_factor = 2 * FOOD_METABOLISM
nutriment_factor = 2 * REAGENTS_METABOLISM
color = "#403010" // rgb: 64, 48, 16
on_mob_life(var/mob/living/M as mob)
if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
M.bodytemperature = min(310, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.nutrition += nutriment_factor
holder.remove_reagent(src.id, FOOD_METABOLISM)
..()
return
@@ -2187,17 +2258,15 @@ datum
name = "Sprinkles"
id = "sprinkles"
description = "Multi-colored little bits of sugar, commonly found on donuts. Loved by cops."
nutriment_factor = 1 * FOOD_METABOLISM
nutriment_factor = 1 * REAGENTS_METABOLISM
color = "#302000" // rgb: 48, 32, 0
on_mob_life(var/mob/living/M as mob)
M.nutrition += nutriment_factor
holder.remove_reagent(src.id, FOOD_METABOLISM)
if(istype(M, /mob/living/carbon/human) && M.job in list("Security Officer", "Head of Security", "Detective", "Warden"))
if(!M) M = holder.my_atom
M.heal_organ_damage(1,1)
M.nutrition += nutriment_factor
holder.remove_reagent(src.id, FOOD_METABOLISM)
..()
return
..()
@@ -2206,18 +2275,16 @@ datum
name = "Cream filling"
id = "syndicream"
description = "Delicious cream filling of a mysterious origin. Tastes criminally good."
nutriment_factor = 1 * FOOD_METABOLISM
nutriment_factor = 1 * REAGENTS_METABOLISM
color = "#AB7878" // rgb: 171, 120, 120
on_mob_life(var/mob/living/M as mob)
M.nutrition += nutriment_factor
holder.remove_reagent(src.id, FOOD_METABOLISM)
if(istype(M, /mob/living/carbon/human) && M.mind)
if(M.mind.special_role)
if(!M) M = holder.my_atom
M.heal_organ_damage(1,1)
M.nutrition += nutriment_factor
holder.remove_reagent(src.id, FOOD_METABOLISM)
..()
return
..()
@@ -2227,12 +2294,11 @@ datum
id = "cornoil"
description = "An oil derived from various types of corn."
reagent_state = LIQUID
nutriment_factor = 20 * FOOD_METABOLISM
nutriment_factor = 20 * REAGENTS_METABOLISM
color = "#302000" // rgb: 48, 32, 0
on_mob_life(var/mob/living/M as mob)
M.nutrition += nutriment_factor
holder.remove_reagent(src.id, FOOD_METABOLISM)
..()
return
reaction_turf(var/turf/simulated/T, var/volume)
@@ -2274,12 +2340,11 @@ datum
id = "dry_ramen"
description = "Space age food, since August 25, 1958. Contains dried noodles, vegetables, and chemicals that boil in contact with water."
reagent_state = SOLID
nutriment_factor = 1 * FOOD_METABOLISM
nutriment_factor = 1 * REAGENTS_METABOLISM
color = "#302000" // rgb: 48, 32, 0
on_mob_life(var/mob/living/M as mob)
M.nutrition += nutriment_factor
holder.remove_reagent(src.id, FOOD_METABOLISM)
..()
return
@@ -2288,12 +2353,11 @@ datum
id = "hot_ramen"
description = "The noodles are boiled, the flavors are artificial, just like being back in school."
reagent_state = LIQUID
nutriment_factor = 5 * FOOD_METABOLISM
nutriment_factor = 5 * REAGENTS_METABOLISM
color = "#302000" // rgb: 48, 32, 0
on_mob_life(var/mob/living/M as mob)
M.nutrition += nutriment_factor
holder.remove_reagent(src.id, FOOD_METABOLISM)
if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
M.bodytemperature = min(310, M.bodytemperature + (10 * TEMPERATURE_DAMAGE_COEFFICIENT))
..()
@@ -2304,12 +2368,11 @@ datum
id = "hell_ramen"
description = "The noodles are boiled, the flavors are artificial, just like being back in school."
reagent_state = LIQUID
nutriment_factor = 5 * FOOD_METABOLISM
nutriment_factor = 5 * REAGENTS_METABOLISM
color = "#302000" // rgb: 48, 32, 0
on_mob_life(var/mob/living/M as mob)
M.nutrition += nutriment_factor
holder.remove_reagent(src.id, FOOD_METABOLISM)
M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT
..()
return
@@ -2319,12 +2382,11 @@ datum
id = "flour"
description = "This is what you rub all over yourself to pretend to be a ghost."
reagent_state = SOLID
nutriment_factor = 1 * FOOD_METABOLISM
nutriment_factor = 1 * REAGENTS_METABOLISM
color = "#FFFFFF" // rgb: 0, 0, 0
on_mob_life(var/mob/living/M as mob)
M.nutrition += nutriment_factor
holder.remove_reagent(src.id, FOOD_METABOLISM)
..()
return
@@ -2338,12 +2400,11 @@ datum
id = "cherryjelly"
description = "Totally the best. Only to be spread on foods with excellent lateral symmetry."
reagent_state = LIQUID
nutriment_factor = 1 * FOOD_METABOLISM
nutriment_factor = 1 * REAGENTS_METABOLISM
color = "#801E28" // rgb: 128, 30, 40
on_mob_life(var/mob/living/M as mob)
M.nutrition += nutriment_factor
holder.remove_reagent(src.id, FOOD_METABOLISM)
..()
return
@@ -2356,7 +2417,7 @@ datum
id = "drink"
description = "Uh, some kind of drink."
reagent_state = LIQUID
nutriment_factor = 1 * FOOD_METABOLISM
nutriment_factor = 1 * REAGENTS_METABOLISM
color = "#E78108" // rgb: 231, 129, 8
var/adj_dizzy = 0
var/adj_drowsy = 0
@@ -2364,6 +2425,7 @@ datum
var/adj_temp = 0
on_mob_life(var/mob/living/M as mob)
<<<<<<< HEAD
if(!M) M = holder.my_atom
M.nutrition += nutriment_factor
holder.remove_reagent(src.id, FOOD_METABOLISM)
@@ -2375,6 +2437,12 @@ datum
M.bodytemperature = min(310, M.bodytemperature + (25 * TEMPERATURE_DAMAGE_COEFFICIENT))
// Drinks should be used up faster than other reagents.
holder.remove_reagent(src.id, FOOD_METABOLISM)
=======
M.nutrition += nutriment_factor
if(!M) M = holder.my_atom
if(M.getOxyLoss() && prob(30)) M.adjustOxyLoss(-1)
M.nutrition++
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
..()
return
@@ -2406,10 +2474,20 @@ datum
description = "The sweet-sour juice of limes."
color = "#365E30" // rgb: 54, 94, 48
<<<<<<< HEAD
on_mob_life(var/mob/living/M as mob)
..()
if(M.getToxLoss() && prob(20)) M.adjustToxLoss(-1)
return
=======
watermelonjuice
name = "Watermelon Juice"
id = "watermelonjuice"
description = "Delicious juice made from watermelon."
reagent_state = LIQUID
nutriment_factor = 1 * REAGENTS_METABOLISM
color = "#863333" // rgb: 134, 51, 51
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
carrotjuice
name = "Carrot juice"
@@ -2448,6 +2526,7 @@ datum
M.adjustToxLoss(1)
return
<<<<<<< HEAD
watermelonjuice
name = "Watermelon Juice"
id = "watermelonjuice"
@@ -2528,6 +2607,19 @@ datum
holder.remove_reagent("frostoil", 10*REAGENTS_METABOLISM)
holder.remove_reagent(src.id, 0.1)
=======
nothing
name = "Nothing"
id = "nothing"
description = "Absolutely nothing."
nutriment_factor = 1 * REAGENTS_METABOLISM
on_mob_life(var/mob/living/M as mob)
M.nutrition += nutriment_factor
if(istype(M, /mob/living/carbon/human) && M.job in list("Mime"))
if(!M) M = holder.my_atom
M.heal_organ_damage(1,1)
..()
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
return
icecoffee
@@ -2732,6 +2824,7 @@ datum
var/pass_out = 325 //amount absorbed after which mob starts passing out
on_mob_life(var/mob/living/M as mob)
<<<<<<< HEAD
M:nutrition += nutriment_factor
holder.remove_reagent(src.id, FOOD_METABOLISM)
if(!src.data) data = 1
@@ -2782,6 +2875,20 @@ datum
nutriment_factor = 2 * FOOD_METABOLISM
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
=======
M.nutrition += nutriment_factor
if(!data) data = 1
data++
if(istype(M, /mob/living/carbon/human) && M.job in list("Clown"))
if(!M) M = holder.my_atom
M.heal_organ_damage(1,1)
M.dizziness +=5
if(data >= 55 && data <165)
if (!M.stuttering) M.stuttering = 1
M.stuttering += 5
else if(data >= 165 && prob(33))
M.confused = max(M.confused+5,0)
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
..()
M:jitteriness = max(M:jitteriness-3,0)
return
@@ -2841,9 +2948,12 @@ datum
on_mob_life(var/mob/living/M as mob)
..()
<<<<<<< HEAD
M.dizziness +=5
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
=======
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
return
vodka
@@ -2858,6 +2968,7 @@ datum
description = "A strong and mildly flavoured, mexican produced spirit. Feeling thirsty hombre?"
color = "#A8B0B7" // rgb: 168, 176, 183
<<<<<<< HEAD
vermouth
name = "Vermouth"
id = "vermouth"
@@ -3072,6 +3183,14 @@ datum
if(M.confused !=0) M.confused = max(0,M.confused - 5)
..()
return
=======
changelingsting
name = "Changeling Sting"
id = "changelingsting"
description = "You take a tiny sip and feel a burning sensation..."
reagent_state = LIQUID
color = "#2E6671" // rgb: 46, 102, 113
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
irish_cream
name = "Irish Cream"
@@ -3324,6 +3443,7 @@ datum
M:silent = max(M:silent, 15)
return
<<<<<<< HEAD
bananahonk
name = "Banana Mama"
id = "bananahonk"
@@ -3349,6 +3469,14 @@ datum
..()
M.dizziness +=5
return
=======
erikasurprise
name = "Erika Surprise"
id = "erikasurprise"
description = "The surprise is, it's green!"
reagent_state = LIQUID
color = "#2E6671" // rgb: 46, 102, 113
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
irishcarbomb
name = "Irish Car Bomb"
@@ -3362,6 +3490,7 @@ datum
M.dizziness +=5
return
<<<<<<< HEAD
syndicatebomb
name = "Syndicate Bomb"
id = "syndicatebomb"
@@ -3382,3 +3511,16 @@ datum
description = "Only for the experienced. You think you see sand floating in the glass."
nutriment_factor = 1 * FOOD_METABOLISM
color = "#2E6671" // rgb: 46, 102, 113
=======
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.dizziness +=10
if(data >= 55 && data <115)
if (!M.stuttering) M.stuttering = 1
M.stuttering += 10
else if(data >= 115 && prob(33))
M.confused = max(M.confused+15,15)
..()
return
>>>>>>> 090495f3865a1283beacfa5cb62cd42c4c76b3ce
@@ -2117,6 +2117,15 @@
trash = /obj/item/trash/plate
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/cracker
name = "Cracker"
desc = "It's a salted cracker."
icon_state = "cracker"
New()
..()
reagents.add_reagent("nutriment", 1)
/////////////////////////////////////////////////PIZZA////////////////////////////////////////
@@ -2356,11 +2365,18 @@
return
..()
/obj/item/weapon/reagent_containers/food/snacks/cracker
name = "Cracker"
desc = "It's a salted cracker."
icon_state = "cracker"
/obj/item/pizzabox/margherita/New()
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita(src)
boxtag = "Margherita Deluxe"
New()
..()
reagents.add_reagent("nutriment", 1)
/obj/item/pizzabox/vegetable/New()
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza(src)
boxtag = "Gourmet Vegatable"
/obj/item/pizzabox/mushroom/New()
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza(src)
boxtag = "Mushroom Special"
/obj/item/pizzabox/meat/New()
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza(src)
boxtag = "Meatlover's Supreme"
@@ -79,6 +79,8 @@
R.source_rock = src.source_rock
R.geological_data = src.geological_data
user << "\blue You take a core sample of the [src]."
else
..()
/*Code does not work, likely due to removal/change of acid_act proc
//Strange rocks currently melt to gooey grey w/ acid application (see reactions)