"
+
+ 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)
+ for(var/datum/money_account/M in A.accounts)
+ if(!src.accounts.Find(M))
+ src.accounts.Add(M)
+ usr << "\icon[src] Accounts synched across all databases in range."
+
+ 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 = "Account details (confidential) "
+ R.info += "Account holder: [M.owner_name] "
+ R.info += "Account number: [M.account_number] "
+ R.info += "Account pin: [M.remote_access_pin] "
+ R.info += "Starting balance: $[M.money] "
+ R.info += "Date and time: [worldtime2text()], [current_date_string]
"
+ R.info += "Creation terminal ID: [machine_id] "
+ R.info += "Authorised NT officer overseeing creation: [held_card.registered_name] "
+
+ //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 += "This paper has been stamped by the Accounts Database."
+
+
+ //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
diff --git a/code/WorkInProgress/Cael_Aislinn/Economy/EFTPOS.dm b/code/WorkInProgress/Cael_Aislinn/Economy/EFTPOS.dm
new file mode 100644
index 00000000000..5fc619755ad
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Economy/EFTPOS.dm
@@ -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 = "[eftpos_name] reference
"
+ R.info += "Access code: [access_code]
"
+ R.info += "Do not lose this code, or the device will have to be replaced. "
+
+ //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 += "This paper has been stamped by the EFTPOS device."
+
+/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 = "[eftpos_name] "
+ dat += "This terminal is [machine_id]. Report this code when contacting NanoTrasen IT Support "
+ if(transaction_locked)
+ dat += "Reset[transaction_paid ? "" : " (authentication required)"]
"
+
+ dat += "Transaction purpose: [transaction_purpose] "
+ dat += "Value: $[transaction_amount] "
+ dat += "Linked account: [linked_account ? linked_account.owner_name : "None"]"
+ if(transaction_paid)
+ dat += "This transaction has been processed successfully."
+ else
+ dat += "Swipe your card below the line to finish this transaction."
+ dat += "\[------\]"
+ else
+ dat += "Lock in new transaction
"
+
+ dat += "Transaction purpose: [transaction_purpose] "
+ dat += "Value: $[transaction_amount] "
+ dat += "Linked account: [linked_account ? linked_account.owner_name : "None"]"
+ dat += "Change access code"
+ 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]Unable to connect to accounts database."
+ 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]Incorrect code entered."
+ 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 << "Unable to connect to accounts database."
+ 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] No account connected to send transactions to."
+ 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]Unable to link accounts."
+
+ 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("[usr] swipes a card through [src].")
+ 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]You don't have that much money!"
+ else
+ usr << "\icon[src]EFTPOS is not connected to an account."
+ else
+ usr << "\icon[src]Unable to access account. Check security settings and try again."
+ else
+ ..()
+
+ //emag?
\ No newline at end of file
diff --git a/code/WorkInProgress/Cael_Aislinn/Economy/Economy.dm b/code/WorkInProgress/Cael_Aislinn/Economy/Economy.dm
new file mode 100644
index 00000000000..95163f043c7
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Economy/Economy.dm
@@ -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
diff --git a/code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events.dm b/code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events.dm
new file mode 100644
index 00000000000..a93a4690293
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events.dm
@@ -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
diff --git a/code/WorkInProgress/Cael_Aislinn/Economy/Economy_TradeDestinations.dm b/code/WorkInProgress/Cael_Aislinn/Economy/Economy_TradeDestinations.dm
new file mode 100644
index 00000000000..1e5ed65be6b
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Economy/Economy_TradeDestinations.dm
@@ -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
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/falsewall.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/falsewall.dm
new file mode 100644
index 00000000000..a83711609da
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Jungle/falsewall.dm
@@ -0,0 +1,59 @@
+//simplified copy of /obj/structure/falsewall
+
+/obj/effect/landmark/falsewall_spawner
+ name = "falsewall spawner"
+
+/obj/structure/temple_falsewall
+ name = "wall"
+ anchored = 1
+ icon = 'icons/turf/walls.dmi'
+ icon_state = "plasma0"
+ opacity = 1
+ var/closed_wall_dir = 0
+ var/opening = 0
+ var/mineral = "plasma"
+ var/is_metal = 0
+
+/obj/structure/temple_falsewall/New()
+ ..()
+ spawn(10)
+ if(prob(95))
+ desc = pick("Something seems slightly off about it.","")
+
+ var/junction = 0 //will be used to determine from which side the wall is connected to other walls
+
+ for(var/turf/unsimulated/wall/W in orange(src,1))
+ if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
+ junction |= get_dir(src,W)
+
+ closed_wall_dir = junction
+ density = 1
+ icon_state = "[mineral][closed_wall_dir]"
+
+/obj/structure/temple_falsewall/attack_hand(mob/user as mob)
+ if(opening)
+ return
+
+ if(density)
+ opening = 1
+ if(is_metal)
+ icon_state = "metalfwall_open"
+ flick("metalfwall_opening", src)
+ else
+ icon_state = "[mineral]fwall_open"
+ flick("[mineral]fwall_opening", src)
+ sleep(15)
+ src.density = 0
+ SetOpacity(0)
+ opening = 0
+ else
+ opening = 1
+ icon_state = "[mineral][closed_wall_dir]"
+ if(is_metal)
+ flick("metalfwall_closing", src)
+ else
+ flick("[mineral]fwall_closing", src)
+ density = 1
+ sleep(15)
+ SetOpacity(1)
+ opening = 0
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dm
new file mode 100644
index 00000000000..ac09a7c2ce6
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dm
@@ -0,0 +1,347 @@
+//some testin stuff
+
+#define PATH_SPREAD_CHANCE_START 90
+#define PATH_SPREAD_CHANCE_LOSS_UPPER 80
+#define PATH_SPREAD_CHANCE_LOSS_LOWER 50
+
+#define RIVER_SPREAD_CHANCE_START 100
+#define RIVER_SPREAD_CHANCE_LOSS_UPPER 65
+#define RIVER_SPREAD_CHANCE_LOSS_LOWER 50
+
+#define RANDOM_UPPER_X 100
+#define RANDOM_UPPER_Y 100
+
+#define RANDOM_LOWER_X 18
+#define RANDOM_LOWER_Y 18
+
+/area/jungle
+ name = "jungle"
+ icon = 'code/workinprogress/cael_aislinn/jungle/jungle.dmi'
+ icon_state = "area"
+ lighting_use_dynamic = 0
+ luminosity = 1
+
+//randomly spawns, will create paths around the map
+/obj/effect/landmark/path_waypoint
+ name = "path waypoint"
+ icon_state = "x2"
+ var/connected = 0
+
+/obj/effect/landmark/temple
+ name = "temple entrance"
+ icon_state = "x2"
+ var/obj/structure/ladder/my_ladder
+
+ New()
+ //pick a random temple to link to
+ var/list/waypoints = list()
+ for(var/obj/effect/landmark/temple/destination/T in world)
+ waypoints.Add(T)
+ var/obj/effect/landmark/temple/destination/dest_temple = pick(waypoints)
+ dest_temple.init()
+
+ //connect this landmark to the other
+ my_ladder = new /obj/structure/ladder(src.loc)
+ my_ladder.id = dest_temple.my_ladder.id
+ dest_temple.my_ladder.up = my_ladder
+
+ //delete the landmarks now that we're finished
+ del(dest_temple)
+ del(src)
+
+/obj/effect/landmark/temple/destination/New()
+ //nothing
+
+/obj/effect/landmark/temple/destination/proc/init()
+ my_ladder = new /obj/structure/ladder(src.loc)
+ my_ladder.id = rand(999)
+ my_ladder.height = -1
+
+ //loop over the walls in the temple and make them a random pre-chosen mineral (null is a stand in for plasma, which the walls already are)
+ //treat plasma slightly differently because it's the default wall type
+ var/mineral = pick("uranium","sandstone","gold","iron","silver","diamond","clown","plasma")
+ //world << "init [mineral]"
+ var/area/my_area = get_area(src)
+ var/list/temple_turfs = get_area_turfs(my_area.type)
+
+ for(var/turf/simulated/floor/T in temple_turfs)
+
+ for(var/obj/effect/landmark/falsewall_spawner/F in T.contents)
+ var/obj/structure/temple_falsewall/fwall = new(F.loc)
+ fwall.mineral = mineral
+ if(mineral == "iron")
+ fwall.is_metal = 1
+ del(F)
+
+ for(var/obj/effect/landmark/door_spawner/D in T.contents)
+ var/spawn_type
+ if(mineral == "iron")
+ spawn_type = text2path("/obj/machinery/door/airlock/vault")
+ else
+ spawn_type = text2path("/obj/machinery/door/airlock/[mineral]")
+ new spawn_type(D.loc)
+ del(D)
+
+ for(var/turf/unsimulated/wall/T in temple_turfs)
+ if(mineral != "plasma")
+ T.icon_state = replacetext(T.icon_state, "plasma", mineral)
+
+ /*for(var/obj/effect/landmark/falsewall_spawner/F in T.contents)
+ //world << "falsewall_spawner found in wall"
+ var/obj/structure/temple_falsewall/fwall = new(F.loc)
+ fwall.mineral = mineral
+ del(F)
+
+ for(var/obj/effect/landmark/door_spawner/D in T.contents)
+ //world << "door_spawner found in wall"
+ T = new /turf/unsimulated/floor(T.loc)
+ T.icon_state = "dark"
+ var/spawn_type = text2path("/obj/machinery/door/airlock/[door_mineral]")
+ new spawn_type(T)
+ del(D)*/
+
+//a shuttle has crashed somewhere on the map, it should have a power cell to let the adventurers get home
+/area/jungle/crash_ship_source
+ icon_state = "crash"
+
+/area/jungle/crash_ship_clean
+ icon_state = "crash"
+
+/area/jungle/crash_ship_one
+ icon_state = "crash"
+
+/area/jungle/crash_ship_two
+ icon_state = "crash"
+
+/area/jungle/crash_ship_three
+ icon_state = "crash"
+
+/area/jungle/crash_ship_four
+ icon_state = "crash"
+
+//randomly spawns, will create rivers around the map
+//uses the same logic as jungle paths
+/obj/effect/landmark/river_waypoint
+ name = "river source waypoint"
+ var/connected = 0
+
+/obj/machinery/jungle_controller
+ name = "jungle controller"
+ desc = "a mysterious and ancient piece of machinery"
+ var/list/animal_spawners = list()
+
+ New()
+ ..()
+ Initialise()
+
+/obj/machinery/jungle_controller/proc/Initialise()
+ set background = 1
+ spawn(0)
+ world << "\red \b Setting up jungle, this may take a moment..."
+
+ //crash dat shuttle
+ var/area/start_location = locate(/area/jungle/crash_ship_source)
+ var/area/clean_location = locate(/area/jungle/crash_ship_clean)
+ var/list/ship_locations = list(/area/jungle/crash_ship_one, /area/jungle/crash_ship_two, /area/jungle/crash_ship_three, /area/jungle/crash_ship_four)
+ var/area/end_location = locate( pick(ship_locations) )
+ ship_locations -= end_location.type
+
+ start_location.move_contents_to(end_location)
+ for(var/area_type in ship_locations)
+ var/area/cur_location = locate(area_type)
+ clean_location.copy_turfs_to(cur_location)
+
+ //drop some random river nodes
+ var/list/river_nodes = list()
+ var/max = rand(1,3)
+ var/num_spawned = 0
+ while(num_spawned < max)
+ var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
+ if(!istype(J))
+ continue
+ if(!J.bushes_spawn)
+ continue
+ river_nodes.Add(new /obj/effect/landmark/river_waypoint(J))
+ num_spawned++
+
+ //make some randomly pathing rivers
+ for(var/obj/effect/landmark/river_waypoint/W in world)
+ if (W.z != src.z || W.connected)
+ continue
+
+ W.connected = 1
+ var/turf/cur_turf = new /turf/unsimulated/jungle/water(get_turf(W))
+ var/turf/target_turf = get_turf(pick(river_nodes))
+
+ var/detouring = 0
+ var/cur_dir = get_dir(cur_turf, target_turf)
+ //
+ while(cur_turf != target_turf)
+ //randomly snake around a bit
+ if(detouring)
+ if(prob(20))
+ detouring = 0
+ cur_dir = get_dir(cur_turf, target_turf)
+ else if(prob(20))
+ detouring = 1
+ if(prob(50))
+ cur_dir = turn(cur_dir, 45)
+ else
+ cur_dir = turn(cur_dir, -45)
+ else
+ cur_dir = get_dir(cur_turf, target_turf)
+
+ cur_turf = get_step(cur_turf, cur_dir)
+
+ var/skip = 0
+ if(!istype(cur_turf, /turf/unsimulated/jungle) || istype(cur_turf, /turf/unsimulated/jungle/rock))
+ detouring = 0
+ cur_dir = get_dir(cur_turf, target_turf)
+ cur_turf = get_step(cur_turf, cur_dir)
+ continue
+
+ if(!skip)
+ var/turf/unsimulated/jungle/water/water_turf = new(cur_turf)
+ water_turf.Spread(75, rand(65, 25))
+
+ var/list/path_nodes = list()
+
+ //place some ladders leading down to pre-generated temples
+ max = rand(2,5)
+ num_spawned = 0
+ while(num_spawned < max)
+ var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
+ if(!J || !J.bushes_spawn)
+ continue
+ new /obj/effect/landmark/temple(J)
+ path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
+ num_spawned++
+
+ //put a native tribe somewhere
+ num_spawned = 0
+ while(num_spawned < 1)
+ var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
+ if(!J || !J.bushes_spawn)
+ continue
+ new /obj/effect/jungle_tribe_spawn(J)
+ path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
+ num_spawned++
+
+ //place some random path waypoints to confuse players
+ max = rand(1,3)
+ num_spawned = 0
+ while(num_spawned < max)
+ var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
+ if(!J || !J.bushes_spawn)
+ continue
+ path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
+ num_spawned++
+
+ //get any path nodes placed on the map
+ for(var/obj/effect/landmark/path_waypoint/W in world)
+ if (W.z == src.z)
+ path_nodes.Add(W)
+
+ //make random, connecting paths
+ for(var/obj/effect/landmark/path_waypoint/W in path_nodes)
+ if (W.connected)
+ continue
+
+ W.connected = 1
+ var/turf/cur_turf = get_turf(W)
+ path_nodes.Remove(W)
+ var/turf/target_turf = get_turf(pick(path_nodes))
+ path_nodes.Add(W)
+ //
+ cur_turf = new /turf/unsimulated/jungle/path(cur_turf)
+
+ var/detouring = 0
+ var/cur_dir = get_dir(cur_turf, target_turf)
+ //
+ while(cur_turf != target_turf)
+ //randomly snake around a bit
+ if(detouring)
+ if(prob(20) || get_dist(cur_turf, target_turf) < 5)
+ detouring = 0
+ cur_dir = get_dir(cur_turf, target_turf)
+ else if(prob(20) && get_dist(cur_turf, target_turf) > 5)
+ detouring = 1
+ if(prob(50))
+ cur_dir = turn(cur_dir, 45)
+ else
+ cur_dir = turn(cur_dir, -45)
+ else
+ cur_dir = get_dir(cur_turf, target_turf)
+
+ //move a step forward
+ cur_turf = get_step(cur_turf, cur_dir)
+
+ //if we're not a jungle turf, get back to what we were doing
+ if(!istype(cur_turf, /turf/unsimulated/jungle/))
+ cur_dir = get_dir(cur_turf, target_turf)
+ cur_turf = get_step(cur_turf, cur_dir)
+ continue
+
+ var/turf/unsimulated/jungle/J = cur_turf
+ if(istype(J, /turf/unsimulated/jungle/impenetrable) || istype(J, /turf/unsimulated/jungle/water/deep))
+ cur_dir = get_dir(cur_turf, target_turf)
+ cur_turf = get_step(cur_turf, cur_dir)
+ continue
+
+ if(!istype(J, /turf/unsimulated/jungle/water))
+ J = new /turf/unsimulated/jungle/path(cur_turf)
+ J.Spread(PATH_SPREAD_CHANCE_START, rand(PATH_SPREAD_CHANCE_LOSS_UPPER, PATH_SPREAD_CHANCE_LOSS_LOWER))
+
+ //create monkey spawners
+ num_spawned = 0
+ max = rand(3,6)
+ while(num_spawned < max)
+ var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
+ if(!J || !J.bushes_spawn)
+ continue
+ animal_spawners.Add(new /obj/effect/landmark/animal_spawner/monkey(J))
+ num_spawned++
+
+ //create panther spawners
+ num_spawned = 0
+ max = rand(6,12)
+ while(num_spawned < max)
+ var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
+ if(!J || !istype(J) || !J.bushes_spawn)
+ continue
+ animal_spawners.Add(new /obj/effect/landmark/animal_spawner/panther(J))
+ num_spawned++
+
+ //create snake spawners
+ num_spawned = 0
+ max = rand(6,12)
+ while(num_spawned < max)
+ var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
+ if(!J || !istype(J) || !J.bushes_spawn)
+ continue
+ animal_spawners.Add(new /obj/effect/landmark/animal_spawner/snake(J))
+ num_spawned++
+
+ //create parrot spawners
+ num_spawned = 0
+ max = rand(3,6)
+ while(num_spawned < max)
+ var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
+ if(!J || !istype(J) || !J.bushes_spawn)
+ continue
+ animal_spawners.Add(new /obj/effect/landmark/animal_spawner/parrot(J))
+ num_spawned++
+
+#undef PATH_SPREAD_CHANCE_START
+#undef PATH_SPREAD_CHANCE_LOSS_UPPER
+#undef PATH_SPREAD_CHANCE_LOSS_LOWER
+
+#undef RIVER_SPREAD_CHANCE_START
+#undef RIVER_SPREAD_CHANCE_LOSS_UPPER
+#undef RIVER_SPREAD_CHANCE_LOSS_LOWER
+
+#undef RANDOM_UPPER_X
+#undef RANDOM_UPPER_Y
+
+#undef RANDOM_LOWER_X
+#undef RANDOM_LOWER_Y
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi
new file mode 100644
index 00000000000..13cd5e77396
Binary files /dev/null and b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi differ
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_animals.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_animals.dm
new file mode 100644
index 00000000000..81f1607d69d
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_animals.dm
@@ -0,0 +1,158 @@
+
+//spawns one of the specified animal type
+/obj/effect/landmark/animal_spawner
+ icon_state = "x3"
+ var/spawn_type
+ var/mob/living/spawned_animal
+ invisibility = 101
+
+/obj/effect/landmark/animal_spawner/New()
+ if(!spawn_type)
+ var/new_type = pick(typesof(/obj/effect/landmark/animal_spawner) - /obj/effect/landmark/animal_spawner)
+ new new_type(get_turf(src))
+ del(src)
+
+ processing_objects.Add(src)
+ spawned_animal = new spawn_type(get_turf(src))
+
+/obj/effect/landmark/animal_spawner/process()
+ //if any of our animals are killed, spawn new ones
+ if(!spawned_animal || spawned_animal.stat == DEAD)
+ spawned_animal = new spawn_type(src)
+ //after a random timeout, and in a random position (6-30 seconds)
+ spawn(rand(1200,2400))
+ spawned_animal.loc = locate(src.x + rand(-12,12), src.y + rand(-12,12), src.z)
+
+/obj/effect/landmark/animal_spawner/Del()
+ processing_objects.Remove(src)
+
+/obj/effect/landmark/animal_spawner/panther
+ name = "panther spawner"
+ spawn_type = /mob/living/simple_animal/hostile/panther
+
+/obj/effect/landmark/animal_spawner/parrot
+ name = "parrot spawner"
+ spawn_type = /mob/living/simple_animal/parrot
+
+/obj/effect/landmark/animal_spawner/monkey
+ name = "monkey spawner"
+ spawn_type = /mob/living/carbon/monkey
+
+/obj/effect/landmark/animal_spawner/snake
+ name = "snake spawner"
+ spawn_type = /mob/living/simple_animal/hostile/snake
+
+
+//*********//
+// Panther //
+//*********//
+
+/mob/living/simple_animal/hostile/panther
+ name = "panther"
+ desc = "A long sleek, black cat with sharp teeth and claws."
+ icon = 'jungle.dmi'
+ icon_state = "panther"
+ icon_living = "panther"
+ icon_dead = "panther_dead"
+ icon_gib = "panther_dead"
+ speak_chance = 0
+ turns_per_move = 3
+ meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
+ response_help = "pets the"
+ response_disarm = "gently pushes aside the"
+ response_harm = "hits the"
+ stop_automated_movement_when_pulled = 0
+ maxHealth = 50
+ health = 50
+
+ harm_intent_damage = 8
+ melee_damage_lower = 15
+ melee_damage_upper = 15
+ attacktext = "slashes"
+ attack_sound = 'sound/weapons/bite.ogg'
+
+ layer = 3.1 //so they can stay hidde under the /obj/structure/bush
+ var/stalk_tick_delay = 3
+
+/mob/living/simple_animal/hostile/panther/ListTargets()
+ var/list/targets = list()
+ for(var/mob/living/carbon/human/H in view(src, 10))
+ targets += H
+ return targets
+
+/mob/living/simple_animal/hostile/panther/FindTarget()
+ . = ..()
+ if(.)
+ emote("nashes at [.]")
+
+/mob/living/simple_animal/hostile/panther/AttackingTarget()
+ . =..()
+ var/mob/living/L = .
+ if(istype(L))
+ if(prob(15))
+ L.Weaken(3)
+ L.visible_message("\the [src] knocks down \the [L]!")
+
+/mob/living/simple_animal/hostile/panther/AttackTarget()
+ ..()
+ if(stance == HOSTILE_STANCE_ATTACKING && get_dist(src, target_mob))
+ stalk_tick_delay -= 1
+ if(stalk_tick_delay <= 0)
+ src.loc = get_step_towards(src, target_mob)
+ stalk_tick_delay = 3
+
+//*******//
+// Snake //
+//*******//
+
+/mob/living/simple_animal/hostile/snake
+ name = "snake"
+ desc = "A sinuously coiled, venomous looking reptile."
+ icon = 'jungle.dmi'
+ icon_state = "snake"
+ icon_living = "snake"
+ icon_dead = "snake_dead"
+ icon_gib = "snake_dead"
+ speak_chance = 0
+ turns_per_move = 1
+ meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
+ response_help = "pets the"
+ response_disarm = "gently pushes aside the"
+ response_harm = "hits the"
+ stop_automated_movement_when_pulled = 0
+ maxHealth = 25
+ health = 25
+
+ harm_intent_damage = 2
+ melee_damage_lower = 3
+ melee_damage_upper = 10
+ attacktext = "bites"
+ attack_sound = 'sound/weapons/bite.ogg'
+
+ layer = 3.1 //so they can stay hidde under the /obj/structure/bush
+ var/stalk_tick_delay = 3
+
+/mob/living/simple_animal/hostile/snake/ListTargets()
+ var/list/targets = list()
+ for(var/mob/living/carbon/human/H in view(src, 10))
+ targets += H
+ return targets
+
+/mob/living/simple_animal/hostile/snake/FindTarget()
+ . = ..()
+ if(.)
+ emote("hisses wickedly")
+
+/mob/living/simple_animal/hostile/snake/AttackingTarget()
+ . =..()
+ var/mob/living/L = .
+ if(istype(L))
+ L.apply_damage(rand(3,12), TOX)
+
+/mob/living/simple_animal/hostile/snake/AttackTarget()
+ ..()
+ if(stance == HOSTILE_STANCE_ATTACKING && get_dist(src, target_mob))
+ stalk_tick_delay -= 1
+ if(stalk_tick_delay <= 0)
+ src.loc = get_step_towards(src, target_mob)
+ stalk_tick_delay = 3
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_plants.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_plants.dm
new file mode 100644
index 00000000000..b78048b0417
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_plants.dm
@@ -0,0 +1,120 @@
+//*********************//
+// Generic undergrowth //
+//*********************//
+
+/obj/structure/bush
+ name = "foliage"
+ desc = "Pretty thick scrub, it'll take something sharp and a lot of determination to clear away."
+ icon = 'jungle.dmi'
+ icon_state = "bush1"
+ density = 1
+ anchored = 1
+ layer = 3.2
+ var/indestructable = 0
+ var/stump = 0
+
+/obj/structure/bush/New()
+ if(prob(20))
+ opacity = 1
+
+/obj/structure/bush/Bumped(M as mob)
+ if (istype(M, /mob/living/simple_animal))
+ var/mob/living/simple_animal/A = M
+ A.loc = get_turf(src)
+ else if (istype(M, /mob/living/carbon/monkey))
+ var/mob/living/carbon/monkey/A = M
+ A.loc = get_turf(src)
+
+/obj/structure/bush/attackby(var/obj/I as obj, var/mob/user as mob)
+ //hatchets can clear away undergrowth
+ if(istype(I, /obj/item/weapon/hatchet) && !stump)
+ if(indestructable)
+ //this bush marks the edge of the map, you can't destroy it
+ user << "\red You flail away at the undergrowth, but it's too thick here."
+ else
+ user.visible_message("\red [user] begins clearing away [src].","\red You begin clearing away [src].")
+ spawn(rand(15,30))
+ if(get_dist(user,src) < 2)
+ user << "\blue You clear away [src]."
+ var/obj/item/stack/sheet/wood/W = new(src.loc)
+ W.amount = rand(3,15)
+ if(prob(50))
+ icon_state = "stump[rand(1,2)]"
+ name = "cleared foliage"
+ desc = "There used to be dense undergrowth here."
+ density = 0
+ stump = 1
+ pixel_x = rand(-6,6)
+ pixel_y = rand(-6,6)
+ else
+ del(src)
+ else
+ return ..()
+
+//*******************************//
+// Strange, fruit-bearing plants //
+//*******************************//
+
+var/list/fruit_icon_states = list("badrecipe","kudzupod","reishi","lime","grapes","boiledrorocore","chocolateegg")
+var/list/reagent_effects = list("toxin","anti_toxin","stoxin","space_drugs","mindbreaker","zombiepowder","impedrezene")
+var/jungle_plants_init = 0
+
+/proc/init_jungle_plants()
+ jungle_plants_init = 1
+ fruit_icon_states = shuffle(fruit_icon_states)
+ reagent_effects = shuffle(reagent_effects)
+
+/obj/item/weapon/reagent_containers/food/snacks/grown/jungle_fruit
+ seed = ""
+ name = "jungle fruit"
+ desc = "It smells weird and looks off."
+ icon = 'jungle.dmi'
+ icon_state = "orange"
+ potency = 1
+
+/obj/structure/jungle_plant
+ icon = 'jungle.dmi'
+ icon_state = "plant1"
+ desc = "Looks like some of that fruit might be edible."
+ var/fruits_left = 3
+ var/fruit_type = -1
+ var/icon/fruit_overlay
+ var/plant_strength = 1
+ var/fruit_r
+ var/fruit_g
+ var/fruit_b
+
+
+/obj/structure/jungle_plant/New()
+ if(!jungle_plants_init)
+ init_jungle_plants()
+
+ fruit_type = rand(1,7)
+ icon_state = "plant[fruit_type]"
+ fruits_left = rand(1,5)
+ fruit_overlay = icon('jungle.dmi',"fruit[fruits_left]")
+ fruit_r = 255 - fruit_type * 36
+ fruit_g = rand(1,255)
+ fruit_b = fruit_type * 36
+ fruit_overlay.Blend(rgb(fruit_r, fruit_g, fruit_b), ICON_ADD)
+ overlays += fruit_overlay
+ plant_strength = rand(20,200)
+
+/obj/structure/jungle_plant/attack_hand(var/mob/user as mob)
+ if(fruits_left > 0)
+ fruits_left--
+ user << "\blue You pick a fruit off [src]."
+
+ var/obj/item/weapon/reagent_containers/food/snacks/grown/jungle_fruit/J = new (src.loc)
+ J.potency = plant_strength
+ J.icon_state = fruit_icon_states[fruit_type]
+ J.reagents.add_reagent(reagent_effects[fruit_type], 1+round((plant_strength / 20), 1))
+ J.bitesize = 1+round(J.reagents.total_volume / 2, 1)
+ J.attack_hand(user)
+
+ overlays -= fruit_overlay
+ fruit_overlay = icon('jungle.dmi',"fruit[fruits_left]")
+ fruit_overlay.Blend(rgb(fruit_r, fruit_g, fruit_b), ICON_ADD)
+ overlays += fruit_overlay
+ else
+ user << "\red There are no fruit left on [src]."
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm
new file mode 100644
index 00000000000..c34cce4e3de
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm
@@ -0,0 +1,401 @@
+//randomly generated temples, indiana jones style (minus the cultists, probably)
+
+/area/jungle/temple_one
+ name = "temple"
+ lighting_use_dynamic = 1
+ icon = 'jungle.dmi'
+ icon_state = "temple1"
+
+/area/jungle/temple_two
+ name = "temple"
+ lighting_use_dynamic = 1
+ icon = 'jungle.dmi'
+ icon_state = "temple2"
+
+/area/jungle/temple_three
+ name = "temple"
+ lighting_use_dynamic = 1
+ icon = 'jungle.dmi'
+ icon_state = "temple3"
+
+/area/jungle/temple_four
+ name = "temple"
+ lighting_use_dynamic = 1
+ icon = 'jungle.dmi'
+ icon_state = "temple4"
+
+/area/jungle/temple_five
+ name = "temple"
+ lighting_use_dynamic = 1
+ icon = 'jungle.dmi'
+ icon_state = "temple5"
+
+/area/jungle/temple_six
+ name = "temple"
+ lighting_use_dynamic = 1
+ icon = 'jungle.dmi'
+ icon_state = "temple6"
+
+/obj/effect/landmark/door_spawner
+ name = "door spawner"
+
+//******//
+// Loot //
+//******//
+
+/obj/effect/landmark/glowshroom_spawn
+ icon_state = "x3"
+ invisibility = 101
+ New()
+ if(prob(10))
+ new /obj/effect/glowshroom(src.loc)
+ del(src)
+
+/obj/effect/landmark/loot_spawn
+ name = "loot spawner"
+ icon_state = "grabbed1"
+ var/low_probability = 0
+ New()
+
+ switch(pick( \
+ low_probability * 1000;"nothing", \
+ 200 - low_probability * 175;"treasure", \
+ 25 + low_probability * 75;"remains", \
+ 25 + low_probability * 75;"plants", \
+ 5; "blob", \
+ 50 + low_probability * 50;"clothes", \
+ "glasses", \
+ 100 - low_probability * 50;"weapons", \
+ 100 - low_probability * 50;"spacesuit", \
+ "health", \
+ 25 + low_probability * 75;"snacks", \
+ 25;"alien", \
+ "lights", \
+ 25 - low_probability * 25;"engineering", \
+ 25 - low_probability * 25;"coffin", \
+ 25;"mimic", \
+ 25;"viscerator", \
+ ))
+ if("treasure")
+ var/obj/structure/closet/crate/C = new(src.loc)
+ if(prob(33))
+ //coins
+
+ var/amount = rand(2,6)
+ var/list/possible_spawns = list()
+ for(var/coin_type in typesof(/obj/item/weapon/coin))
+ possible_spawns += coin_type
+
+ //no icon_state for mythril coins
+ possible_spawns -= /obj/item/weapon/coin/mythril
+
+ var/coin_type = pick(possible_spawns)
+ for(var/i=0,iA sawblade shoots out of the ground and strikes you!"
+ M.apply_damage(rand(5,10), BRUTE)
+
+ var/atom/myloc = src.loc
+ var/image/flicker = image('jungle.dmi',"sawblade")
+ myloc.overlays += flicker
+ spawn(8)
+ myloc.overlays -= flicker
+ del(flicker)
+ //flick("sawblade",src)
+ if("poison_dart")
+ M << "\red You feel something small and sharp strike you!"
+ M.apply_damage(rand(5,10), TOX)
+
+ var/atom/myloc = src.loc
+ var/image/flicker = image('jungle.dmi',"dart[rand(1,3)]")
+ myloc.overlays += flicker
+ spawn(8)
+ myloc.overlays -= flicker
+ del(flicker)
+ //flick("dart[rand(1,3)]",src)
+ if("flame_burst")
+ M << "\red A jet of fire comes out of nowhere!"
+ M.apply_damage(rand(5,10), BURN)
+
+ var/atom/myloc = src.loc
+ var/image/flicker = image('jungle.dmi',"flameburst")
+ myloc.overlays += flicker
+ spawn(8)
+ myloc.overlays -= flicker
+ del flicker
+ //flick("flameburst",src)
+ if("plasma_gas")
+ //spawn a bunch of plasma
+ if("n2_gas")
+ //spawn a bunch of sleeping gas
+ if("thrower")
+ //edited version of obj/effect/step_trigger/thrower
+ var/throw_dir = pick(1,2,4,8)
+ M.visible_message("\red The floor under [M] suddenly tips upward!","\red The floor tips upward under you!")
+
+ var/atom/myloc = src.loc
+ var/image/flicker = image('jungle.dmi',"throw[throw_dir]")
+ myloc.overlays += flicker
+ var/turf/my_turf = get_turf(loc)
+ if(!my_turf.density)
+ my_turf.density = 1
+ spawn(8)
+ my_turf.density = 0
+ spawn(8)
+ myloc.overlays -= flicker
+ del(flicker)
+
+ var/dist = rand(1,5)
+ var/curtiles = 0
+ while(M)
+ if(curtiles >= dist)
+ break
+ if(M.z != src.z)
+ break
+
+ curtiles++
+ sleep(1)
+
+ var/predir = M.dir
+ step(M, throw_dir)
+ M.dir = predir
+
+//gives turf a different description, to try and trick players
+/obj/effect/step_trigger/trap/fake
+ icon_state = "faketrap"
+ name = "fake trap"
+
+ New()
+ if(prob(10))
+ new /obj/effect/glowshroom(src.loc)
+ if(prob(90))
+ var/turf/T = get_turf(src)
+ T.desc = pick("It looks a little dustier than the surrounding tiles.","It is somewhat ornate.","It looks a little darker than the surrounding tiles.")
+ del(src)
+
+//50% chance of being a trap
+/obj/effect/step_trigger/trap/fifty
+ icon_state = "trap"
+ name = "fifty fifty trap"
+ icon_state = "fiftytrap"
+
+ New()
+ if(prob(50))
+ ..()
+ else
+ if(prob(10))
+ new /obj/effect/glowshroom(src.loc)
+ del(src)
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_tribe.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_tribe.dm
new file mode 100644
index 00000000000..9cf9b17c887
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_tribe.dm
@@ -0,0 +1,91 @@
+
+
+/obj/item/projectile/jungle_spear
+ damage = 10
+ damage_type = TOX
+ icon_state = "bullet"
+
+/obj/effect/jungle_tribe_spawn
+ name = "campfire"
+ desc = "Looks cosy, in an alien sort of way."
+ icon = 'jungle.dmi'
+ icon_state = "campfire"
+ anchored = 1
+ var/list/tribesmen = list()
+ var/list/enemy_players = list()
+ var/tribe_type = 1
+
+/obj/effect/jungle_tribe_spawn/New()
+ processing_objects.Add(src)
+ tribe_type = rand(1,5)
+
+ var/num_tribesmen = rand(3,6)
+ for(var/i=0,i[src] throws a spear at [target_mob]!", 1)
+ flick(src, "native[my_type]_act")
+
+ var/tturf = get_turf(target_mob)
+ Shoot(tturf, src.loc, src)
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_turfs.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_turfs.dm
new file mode 100644
index 00000000000..a2275490ef8
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_turfs.dm
@@ -0,0 +1,178 @@
+
+/turf/unsimulated/jungle
+ var/bushes_spawn = 1
+ var/plants_spawn = 1
+ name = "wet grass"
+ desc = "Thick, long wet grass"
+ icon = 'jungle.dmi'
+ icon_state = "grass1"
+ var/icon_spawn_state = "grass1"
+ luminosity = 3
+
+ New()
+ icon_state = icon_spawn_state
+
+ if(plants_spawn && prob(40))
+ if(prob(90))
+ var/image/I
+ if(prob(35))
+ I = image('jungle.dmi',"plant[rand(1,7)]")
+ else
+ if(prob(30))
+ I = image('icons/obj/flora/ausflora.dmi',"reedbush_[rand(1,4)]")
+ else if(prob(33))
+ I = image('icons/obj/flora/ausflora.dmi',"leafybush_[rand(1,3)]")
+ else if(prob(50))
+ I = image('icons/obj/flora/ausflora.dmi',"fernybush_[rand(1,3)]")
+ else
+ I = image('icons/obj/flora/ausflora.dmi',"stalkybush_[rand(1,3)]")
+ I.pixel_x = rand(-6,6)
+ I.pixel_y = rand(-6,6)
+ overlays += I
+ else
+ var/obj/structure/jungle_plant/J = new(src)
+ J.pixel_x = rand(-6,6)
+ J.pixel_y = rand(-6,6)
+ if(bushes_spawn && prob(90))
+ new /obj/structure/bush(src)
+
+/turf/unsimulated/jungle/clear
+ bushes_spawn = 0
+ plants_spawn = 0
+ icon_state = "grass_clear"
+ icon_spawn_state = "grass3"
+
+/turf/unsimulated/jungle/path
+ bushes_spawn = 0
+ name = "wet grass"
+ desc = "thick, long wet grass"
+ icon = 'jungle.dmi'
+ icon_state = "grass_path"
+ icon_spawn_state = "grass2"
+
+ New()
+ ..()
+ for(var/obj/structure/bush/B in src)
+ del B
+
+/turf/unsimulated/jungle/proc/Spread(var/probability, var/prob_loss = 50)
+ if(probability <= 0)
+ return
+
+ //world << "\blue Spread([probability])"
+ for(var/turf/unsimulated/jungle/J in orange(1, src))
+ if(!J.bushes_spawn)
+ continue
+
+ var/turf/unsimulated/jungle/P = null
+ if(J.type == src.type)
+ P = J
+ else
+ P = new src.type(J)
+
+ if(P && prob(probability))
+ P.Spread(probability - prob_loss)
+
+/turf/unsimulated/jungle/impenetrable
+ bushes_spawn = 0
+ icon_state = "grass_impenetrable"
+ icon_spawn_state = "grass1"
+ New()
+ ..()
+ var/obj/structure/bush/B = new(src)
+ B.indestructable = 1
+
+//copy paste from asteroid mineral turfs
+/turf/unsimulated/jungle/rock
+ bushes_spawn = 0
+ plants_spawn = 0
+ density = 1
+ name = "rock wall"
+ icon = 'icons/turf/walls.dmi'
+ icon_state = "rock"
+ icon_spawn_state = "rock"
+
+/turf/unsimulated/jungle/rock/New()
+ spawn(1)
+ var/turf/T
+ if(!istype(get_step(src, NORTH), /turf/unsimulated/jungle/rock) && !istype(get_step(src, NORTH), /turf/unsimulated/wall))
+ T = get_step(src, NORTH)
+ if (T)
+ T.overlays += image('icons/turf/walls.dmi', "rock_side_s")
+ if(!istype(get_step(src, SOUTH), /turf/unsimulated/jungle/rock) && !istype(get_step(src, SOUTH), /turf/unsimulated/wall))
+ T = get_step(src, SOUTH)
+ if (T)
+ T.overlays += image('icons/turf/walls.dmi', "rock_side_n", layer=6)
+ if(!istype(get_step(src, EAST), /turf/unsimulated/jungle/rock) && !istype(get_step(src, EAST), /turf/unsimulated/wall))
+ T = get_step(src, EAST)
+ if (T)
+ T.overlays += image('icons/turf/walls.dmi', "rock_side_w", layer=6)
+ if(!istype(get_step(src, WEST), /turf/unsimulated/jungle/rock) && !istype(get_step(src, WEST), /turf/unsimulated/wall))
+ T = get_step(src, WEST)
+ if (T)
+ T.overlays += image('icons/turf/walls.dmi', "rock_side_e", layer=6)
+
+/turf/unsimulated/jungle/water
+ bushes_spawn = 0
+ name = "murky water"
+ desc = "thick, murky water"
+ icon = 'icons/misc/beach.dmi'
+ icon_state = "water"
+ icon_spawn_state = "water"
+
+/turf/unsimulated/jungle/water/New()
+ ..()
+ for(var/obj/structure/bush/B in src)
+ del(B)
+
+/turf/unsimulated/jungle/water/Entered(atom/movable/O)
+ ..()
+ if(istype(O, /mob/living/))
+ var/mob/living/M = O
+ //slip in the murky water if we try to run through it
+ if(prob(10 + (M.m_intent == "run" ? 40 : 0)))
+ M << pick("\blue You slip on something slimy.","\blue You fall over into the murk.")
+ M.Stun(2)
+ M.Weaken(1)
+
+ //piranhas - 25% chance to be an omnipresent risk, although they do practically no damage
+ if(prob(25))
+ M << "\blue You feel something slithering around your legs."
+ if(prob(50))
+ spawn(rand(25,50))
+ var/turf/T = get_turf(M)
+ if(istype(T, /turf/unsimulated/jungle/water))
+ M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
+ M.apply_damage(rand(0,1), BRUTE)
+ if(prob(50))
+ spawn(rand(25,50))
+ var/turf/T = get_turf(M)
+ if(istype(T, /turf/unsimulated/jungle/water))
+ M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
+ M.apply_damage(rand(0,1), BRUTE)
+ if(prob(50))
+ spawn(rand(25,50))
+ var/turf/T = get_turf(M)
+ if(istype(T, /turf/unsimulated/jungle/water))
+ M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
+ M.apply_damage(rand(0,1), BRUTE)
+ if(prob(50))
+ spawn(rand(25,50))
+ var/turf/T = get_turf(M)
+ if(istype(T, /turf/unsimulated/jungle/water))
+ M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
+ M.apply_damage(rand(0,1), BRUTE)
+
+/turf/unsimulated/jungle/water/deep
+ plants_spawn = 0
+ density = 1
+ icon_state = "water2"
+ icon_spawn_state = "water2"
+
+/turf/unsimulated/jungle/temple_wall
+ name = "temple wall"
+ desc = ""
+ density = 1
+ icon = 'icons/turf/walls.dmi'
+ icon_state = "plasma0"
+ var/mineral = "plasma"
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/misc_helpers.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/misc_helpers.dm
new file mode 100644
index 00000000000..ffc1265b7dd
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Jungle/misc_helpers.dm
@@ -0,0 +1,122 @@
+//put this here because i needed specific functionality, and i wanted to avoid the hassle of getting it onto svn
+
+
+/area/proc/copy_turfs_to(var/area/A , var/platingRequired = 0 )
+ //Takes: Area. Optional: If it should copy to areas that don't have plating
+ //Returns: Nothing.
+ //Notes: Attempts to move the contents of one area to another area.
+ // Movement based on lower left corner. Tiles that do not fit
+ // into the new area will not be moved.
+
+ if(!A || !src) return 0
+
+ var/list/turfs_src = get_area_turfs(src.type)
+ var/list/turfs_trg = get_area_turfs(A.type)
+
+ var/src_min_x = 0
+ var/src_min_y = 0
+ for (var/turf/T in turfs_src)
+ if(T.x < src_min_x || !src_min_x) src_min_x = T.x
+ if(T.y < src_min_y || !src_min_y) src_min_y = T.y
+
+ var/trg_min_x = 0
+ var/trg_min_y = 0
+ for (var/turf/T in turfs_trg)
+ if(T.x < trg_min_x || !trg_min_x) trg_min_x = T.x
+ if(T.y < trg_min_y || !trg_min_y) trg_min_y = T.y
+
+ var/list/refined_src = new/list()
+ for(var/turf/T in turfs_src)
+ refined_src += T
+ refined_src[T] = new/datum/coords
+ var/datum/coords/C = refined_src[T]
+ C.x_pos = (T.x - src_min_x)
+ C.y_pos = (T.y - src_min_y)
+
+ var/list/refined_trg = new/list()
+ for(var/turf/T in turfs_trg)
+ refined_trg += T
+ refined_trg[T] = new/datum/coords
+ var/datum/coords/C = refined_trg[T]
+ C.x_pos = (T.x - trg_min_x)
+ C.y_pos = (T.y - trg_min_y)
+
+ var/list/toupdate = new/list()
+
+ var/copiedobjs = list()
+
+
+ moving:
+ for (var/turf/T in refined_src)
+ var/datum/coords/C_src = refined_src[T]
+ for (var/turf/B in refined_trg)
+ var/datum/coords/C_trg = refined_trg[B]
+ if(C_src.x_pos == C_trg.x_pos && C_src.y_pos == C_trg.y_pos)
+
+ var/old_dir1 = T.dir
+ var/old_icon_state1 = T.icon_state
+ var/old_icon1 = T.icon
+
+ if(platingRequired)
+ if(istype(B, /turf/space))
+ continue moving
+
+ var/turf/X = new T.type(B)
+ X.dir = old_dir1
+ X.icon_state = old_icon_state1
+ X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
+
+
+ var/list/mobs = new/list()
+ var/list/newmobs = new/list()
+
+ for(var/mob/M in T)
+
+ if(!istype(M,/mob) || istype(M, /mob/aiEye)) continue // If we need to check for more mobs, I'll add a variable
+ mobs += M
+
+ for(var/mob/M in mobs)
+ newmobs += DuplicateObject(M , 1)
+
+ for(var/mob/M in newmobs)
+ M.loc = X
+
+
+
+ for(var/V in T.vars)
+ if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity")))
+ X.vars[V] = T.vars[V]
+
+// var/area/AR = X.loc
+
+// if(AR.lighting_use_dynamic)
+// X.opacity = !X.opacity
+// X.sd_SetOpacity(!X.opacity) //TODO: rewrite this code so it's not messed by lighting ~Carn
+
+ toupdate += X
+
+ refined_src -= T
+ refined_trg -= B
+ continue moving
+
+
+
+
+ /*var/list/doors = new/list()
+
+ if(toupdate.len)
+ for(var/turf/simulated/T1 in toupdate)
+ for(var/obj/machinery/door/D2 in T1)
+ doors += D2
+ if(T1.parent)
+ air_master.groups_to_rebuild += T1.parent
+ else
+ air_master.tiles_to_update += T1
+
+ for(var/obj/O in doors)
+ O:update_nearby_tiles(1)*/
+
+
+
+
+ return copiedobjs
diff --git a/code/WorkInProgress/Chinsky/ashtray.dm b/code/WorkInProgress/Chinsky/ashtray.dm
index 9948c306630..1af757b962c 100644
--- a/code/WorkInProgress/Chinsky/ashtray.dm
+++ b/code/WorkInProgress/Chinsky/ashtray.dm
@@ -29,7 +29,7 @@
var/obj/item/clothing/mask/cigarette/cig = W
if (cig.lit == 1)
src.visible_message("[user] crushes [cig] in [src], putting it out.")
- cig.put_out()
+ cig.smoketime = 0
else if (cig.lit == 0)
if(istype(cig, /obj/item/weapon/match))
user << "You place [cig] in [src] without even lighting it. Why would you do that?"
diff --git a/code/modules/mob/living/carbon/amorph/amorph.dm b/code/WorkInProgress/Cib/amorph/amorph.dm
similarity index 96%
rename from code/modules/mob/living/carbon/amorph/amorph.dm
rename to code/WorkInProgress/Cib/amorph/amorph.dm
index c2af2ff75d4..dd1a678f47a 100644
--- a/code/modules/mob/living/carbon/amorph/amorph.dm
+++ b/code/WorkInProgress/Cib/amorph/amorph.dm
@@ -1,590 +1,590 @@
-/mob/living/carbon/amorph
- name = "amorph"
- real_name = "amorph"
- voice_name = "amorph"
- icon = 'icons/mob/amorph.dmi'
- icon_state = ""
-
-
- var/species = "Amorph"
- age = 30.0
-
- var/used_skillpoints = 0
- var/skill_specialization = null
- var/list/skills = null
-
- var/obj/item/l_ear = null
-
- // might use this later to recolor armorphs with icon.SwapColor
- var/slime_color = null
-
- var/examine_text = ""
-
-
-/mob/living/carbon/amorph/New()
-
- ..()
-
- // Amorphs don't have a blood vessel, but they can have reagents in their body
- var/datum/reagents/R = new/datum/reagents(1000)
- reagents = R
- R.my_atom = src
-
- // Amorphs have no DNA(they're more like carbon-based machines)
-
- // Amorphs don't have organs
- ..()
-
-/mob/living/carbon/amorph/Bump(atom/movable/AM as mob|obj, yes)
- if ((!( yes ) || now_pushing))
- return
- now_pushing = 1
- if (ismob(AM))
- var/mob/tmob = AM
-
-//BubbleWrap - Should stop you pushing a restrained person out of the way
-
- if(istype(tmob, /mob/living/carbon/human))
-
- for(var/mob/M in range(tmob, 1))
- if( ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
- if ( !(world.time % 5) )
- src << "\red [tmob] is restrained, you cannot push past"
- now_pushing = 0
- return
- if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
- if ( !(world.time % 5) )
- src << "\red [tmob] is restraining [M], you cannot push past"
- now_pushing = 0
- return
-
- //BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
- if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove) // mutual brohugs all around!
- var/turf/oldloc = loc
- loc = tmob.loc
- tmob.loc = oldloc
- now_pushing = 0
- for(var/mob/living/carbon/metroid/Metroid in view(1,tmob))
- if(Metroid.Victim == tmob)
- Metroid.UpdateFeed()
- return
-
- if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
- if(prob(99))
- now_pushing = 0
- return
- if(tmob.l_hand && istype(tmob.l_hand, /obj/item/weapon/shield/riot))
- if(prob(99))
- now_pushing = 0
- return
- if(tmob.nopush)
- now_pushing = 0
- return
-
- tmob.LAssailant = src
-
- now_pushing = 0
- spawn(0)
- ..()
- if (!istype(AM, /atom/movable))
- return
- if (!now_pushing)
- now_pushing = 1
-
- if (!AM.anchored)
- var/t = get_dir(src, AM)
- if (istype(AM, /obj/structure/window))
- if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
- for(var/obj/structure/window/win in get_step(AM,t))
- now_pushing = 0
- return
- step(AM, t)
- now_pushing = 0
- return
- return
-
-/mob/living/carbon/amorph/movement_delay()
- var/tally = 2 // amorphs are a bit slower than humans
- var/mob/M = pulling
-
- if(reagents.has_reagent("hyperzine")) return -1
-
- if(reagents.has_reagent("nuka_cola")) return -1
-
- if(analgesic) return -1
-
- if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
-
- var/health_deficiency = traumatic_shock
- if(health_deficiency >= 40) tally += (health_deficiency / 25)
-
- var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
- if (hungry >= 70) tally += hungry/300
-
- if (bodytemperature < 283.222)
- tally += (283.222 - bodytemperature) / 10 * 1.75
- if (stuttering < 10)
- stuttering = 10
-
- if(shock_stage >= 10) tally += 3
-
- if(tally < 0)
- tally = 0
-
- if(istype(M) && M.lying) //Pulling lying down people is slower
- tally += 3
-
- if(mRun in mutations)
- tally = 0
-
- return tally
-
-/mob/living/carbon/amorph/Stat()
- ..()
- statpanel("Status")
-
- stat(null, "Intent: [a_intent]")
- stat(null, "Move Mode: [m_intent]")
- if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
- if(ticker.mode:malf_mode_declared)
- stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
- if(emergency_shuttle)
- if(emergency_shuttle.online && emergency_shuttle.location < 2)
- var/timeleft = emergency_shuttle.timeleft()
- if (timeleft)
- stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
-
- if (client.statpanel == "Status")
- if (internal)
- if (!internal.air_contents)
- del(internal)
- else
- stat("Internal Atmosphere Info", internal.name)
- stat("Tank Pressure", internal.air_contents.return_pressure())
- stat("Distribution Pressure", internal.distribute_pressure)
- if (mind)
- if (mind.special_role == "Changeling" && changeling)
- stat("Chemical Storage", changeling.chem_charges)
- stat("Genetic Damage Time", changeling.geneticdamage)
-
-/mob/living/carbon/amorph/ex_act(severity)
- flick("flash", flash)
-
- var/shielded = 0
- var/b_loss = null
- var/f_loss = null
- switch (severity)
- if (1.0)
- b_loss += 500
- if (!prob(getarmor(null, "bomb")))
- gib()
- return
- else
- var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
- throw_at(target, 200, 4)
-
- if (2.0)
- if (!shielded)
- b_loss += 60
-
- f_loss += 60
-
- if (!prob(getarmor(null, "bomb")))
- b_loss = b_loss/1.5
- f_loss = f_loss/1.5
-
- if(3.0)
- b_loss += 30
- if (!prob(getarmor(null, "bomb")))
- b_loss = b_loss/2
- if (prob(50) && !shielded)
- Paralyse(10)
-
- src.bruteloss += b_loss
- src.fireloss += f_loss
-
- UpdateDamageIcon()
-
-
-/mob/living/carbon/amorph/blob_act()
- if(stat == 2) return
- show_message("\red The blob attacks you!")
- src.bruteloss += rand(30,40)
- UpdateDamageIcon()
- return
-
-/mob/living/carbon/amorph/u_equip(obj/item/W as obj)
- // These are the only slots an amorph has
- if (W == l_ear)
- l_ear = null
- else if (W == r_hand)
- r_hand = null
-
- update_clothing()
-
-/mob/living/carbon/amorph/db_click(text, t1)
- var/obj/item/W = equipped()
- var/emptyHand = (W == null)
- if ((!emptyHand) && (!istype(W, /obj/item)))
- return
- if (emptyHand)
- usr.next_move = usr.prev_move
- usr:lastDblClick -= 3 //permit the double-click redirection to proceed.
- switch(text)
- if("l_ear")
- if (l_ear)
- if (emptyHand)
- l_ear.DblClick()
- return
- else if(emptyHand)
- return
- if (!( istype(W, /obj/item/clothing/ears) ) && !( istype(W, /obj/item/device/radio/headset) ) && W.w_class != 1)
- return
- u_equip(W)
- l_ear = W
- W.equipped(src, text)
-
- update_clothing()
-
- return
-
-/mob/living/carbon/amorph/meteorhit(O as obj)
- for(var/mob/M in viewers(src, null))
- if ((M.client && !( M.blinded )))
- M.show_message(text("\red [] has been hit by []", src, O), 1)
- if (health > 0)
- if (istype(O, /obj/effect/immovablerod))
- src.bruteloss += 101
- else
- src.bruteloss += 25
- UpdateDamageIcon()
- updatehealth()
- return
-
-/mob/living/carbon/amorph/Move(a, b, flag)
-
- if (buckled)
- return
-
- if (restrained())
- pulling = null
-
-
- var/t7 = 1
- if (restrained())
- for(var/mob/M in range(src, 1))
- if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
- t7 = null
- if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
- var/turf/T = loc
- . = ..()
-
- if (pulling && pulling.loc)
- if(!( isturf(pulling.loc) ))
- pulling = null
- return
- else
- if(Debug)
- diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]"
- diary <<"REPORT THIS"
-
- /////
- if(pulling && pulling.anchored)
- pulling = null
- return
-
- if (!restrained())
- var/diag = get_dir(src, pulling)
- if ((diag - 1) & diag)
- else
- diag = null
- if ((get_dist(src, pulling) > 1 || diag))
- if (ismob(pulling))
- var/mob/M = pulling
- var/ok = 1
- if (locate(/obj/item/weapon/grab, M.grabbed_by))
- if (prob(75))
- var/obj/item/weapon/grab/G = pick(M.grabbed_by)
- if (istype(G, /obj/item/weapon/grab))
- for(var/mob/O in viewers(M, null))
- O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
- //G = null
- del(G)
- else
- ok = 0
- if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
- ok = 0
- if (ok)
- var/t = M.pulling
- M.pulling = null
-
- //this is the gay blood on floor shit -- Added back -- Skie
- if (M.lying && (prob(M.getBruteLoss() / 6)))
- var/turf/location = M.loc
- if (istype(location, /turf/simulated))
- location.add_blood(M)
- if(ishuman(M))
- var/mob/living/carbon/H = M
- var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
- if(blood_volume > 0)
- H:vessel.remove_reagent("blood",1)
- if(prob(5))
- M.adjustBruteLoss(1)
- visible_message("\red \The [M]'s wounds open more from being dragged!")
- if(M.pull_damage())
- if(prob(25))
- M.adjustBruteLoss(2)
- visible_message("\red \The [M]'s wounds worsen terribly from being dragged!")
- var/turf/location = M.loc
- if (istype(location, /turf/simulated))
- location.add_blood(M)
- if(ishuman(M))
- var/mob/living/carbon/H = M
- var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
- if(blood_volume > 0)
- H:vessel.remove_reagent("blood",1)
-
- step(pulling, get_dir(pulling.loc, T))
- M.pulling = t
- else
- if (pulling)
- if (istype(pulling, /obj/structure/window))
- if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
- for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
- pulling = null
- if (pulling)
- step(pulling, get_dir(pulling.loc, T))
- else
- pulling = null
- . = ..()
- if ((s_active && !( s_active in contents ) ))
- s_active.close(src)
-
- for(var/mob/living/carbon/metroid/M in view(1,src))
- M.UpdateFeed(src)
- return
-
-/mob/living/carbon/amorph/proc/misc_clothing_updates()
- // Temporary proc to shove stuff in that was put into update_clothing()
- // for questionable reasons
-
- if (client)
- if (i_select)
- if (intent)
- client.screen += hud_used.intents
-
- var/list/L = dd_text2list(intent, ",")
- L[1] += ":-11"
- i_select.screen_loc = dd_list2text(L,",") //ICONS4
- else
- i_select.screen_loc = null
- if (m_select)
- if (m_int)
- client.screen += hud_used.mov_int
-
- var/list/L = dd_text2list(m_int, ",")
- L[1] += ":-11"
- m_select.screen_loc = dd_list2text(L,",") //ICONS4
- else
- m_select.screen_loc = null
-
- // Probably a lazy way to make sure all items are on the screen exactly once
- if (client)
- client.screen -= contents
- client.screen += contents
-
-/mob/living/carbon/amorph/rebuild_appearance()
- // Lazy method: Just rebuild everything.
- // This can be called when the mob is created, but on other occasions, rebuild_body_overlays(),
- // rebuild_clothing_overlays() etc. should be called individually.
-
- misc_clothing_updates() // silly stuff
-
-/mob/living/carbon/amorph/update_body_appearance()
- // Should be called whenever something about the body appearance itself changes.
-
- misc_clothing_updates() // silly stuff
-
- if(lying)
- icon_state = "lying"
- else
- icon_state = "standing"
-
-/mob/living/carbon/amorph/update_lying()
- // Should be called whenever something about the lying status of the mob might have changed.
-
- if(lying)
- icon_state = "lying"
- else
- icon_state = "standing"
-
-/mob/living/carbon/amorph/hand_p(mob/M as mob)
- // not even sure what this is meant to do
- return
-
-/mob/living/carbon/amorph/restrained()
- if (handcuffed)
- return 0 // handcuffs don't work on amorphs
- return 0
-
-/mob/living/carbon/amorph/var/co2overloadtime = null
-/mob/living/carbon/amorph/var/temperature_resistance = T0C+75
-
-/mob/living/carbon/amorph/show_inv(mob/user as mob)
- // TODO: add a window for extracting stuff from an amorph's mouth
-
-// called when something steps onto an amorph
-// this could be made more general, but for now just handle mulebot
-/mob/living/carbon/amorph/HasEntered(var/atom/movable/AM)
- var/obj/machinery/bot/mulebot/MB = AM
- if(istype(MB))
- MB.RunOver(src)
-
-//gets assignment from ID or ID inside PDA or PDA itself
-//Useful when player do something with computers
-/mob/living/carbon/amorph/proc/get_assignment(var/if_no_id = "No id", var/if_no_job = "No job")
- // TODO: get the ID from the amorph's contents
- return
-
-//gets name from ID or ID inside PDA or PDA itself
-//Useful when player do something with computers
-/mob/living/carbon/amorph/proc/get_authentification_name(var/if_no_id = "Unknown")
- // TODO: get the ID from the amorph's contents
- return
-
-//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere
-/mob/living/carbon/amorph/proc/get_visible_name()
- // amorphs can't wear clothes or anything, so always return face_name
- return get_face_name()
-
-//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
-/mob/living/carbon/amorph/proc/get_face_name()
- // there might later be ways for amorphs to change the appearance of their face
- return "[real_name]"
-
-
-//gets ID card object from special clothes slot or null.
-/mob/living/carbon/amorph/proc/get_idcard()
- // TODO: get the ID from the amorph's contents
-
-
-// heal the amorph
-/mob/living/carbon/amorph/heal_overall_damage(var/brute, var/burn)
- bruteloss -= brute
- fireloss -= burn
- bruteloss = max(bruteloss, 0)
- fireloss = max(fireloss, 0)
-
- updatehealth()
- UpdateDamageIcon()
-
-// damage MANY external organs, in random order
-/mob/living/carbon/amorph/take_overall_damage(var/brute, var/burn, var/used_weapon = null)
- bruteloss += brute
- fireloss += burn
-
- updatehealth()
- UpdateDamageIcon()
-
-/mob/living/carbon/amorph/Topic(href, href_list)
- if (href_list["refresh"])
- if((machine)&&(in_range(src, usr)))
- show_inv(machine)
-
- if (href_list["mach_close"])
- var/t1 = text("window=[]", href_list["mach_close"])
- machine = null
- src << browse(null, t1)
-
- if ((href_list["item"] && !( usr.stat ) && usr.canmove && !( usr.restrained() ) && in_range(src, usr) && ticker)) //if game hasn't started, can't make an equip_e
- var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
- O.source = usr
- O.target = src
- O.item = usr.equipped()
- O.s_loc = usr.loc
- O.t_loc = loc
- O.place = href_list["item"]
- if(href_list["loc"])
- O.internalloc = href_list["loc"]
- requests += O
- spawn( 0 )
- O.process()
- return
-
- if (href_list["criminal"])
- if(istype(usr, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = usr
- if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
- var/perpname = "wot"
- var/modified = 0
-
- /*if(wear_id)
- if(istype(wear_id,/obj/item/weapon/card/id))
- perpname = wear_id:registered_name
- else if(istype(wear_id,/obj/item/device/pda))
- var/obj/item/device/pda/tempPda = wear_id
- perpname = tempPda.owner
- else*/
- perpname = src.name
-
- for (var/datum/data/record/E in data_core.general)
- if (E.fields["name"] == perpname)
- for (var/datum/data/record/R in data_core.security)
- if (R.fields["id"] == E.fields["id"])
-
- var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
-
- if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
- if(setcriminal != "Cancel")
- R.fields["criminal"] = setcriminal
- modified = 1
-
- spawn()
- H.handle_regular_hud_updates()
-
- if(!modified)
- usr << "\red Unable to locate a data core entry for this person."
- ..()
- return
-
-
-///eyecheck()
-///Returns a number between -1 to 2
-/mob/living/carbon/amorph/eyecheck()
- return 1
-
-
-/mob/living/carbon/amorph/IsAdvancedToolUser()
- return 1//Amorphs can use guns and such
-
-
-/mob/living/carbon/amorph/updatehealth()
- if(src.nodamage)
- src.health = 100
- src.stat = 0
- return
- src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() -src.halloss
- return
-
-/mob/living/carbon/amorph/abiotic(var/full_body = 0)
- return 0
-
-/mob/living/carbon/amorph/abiotic2(var/full_body2 = 0)
- return 0
-
-/mob/living/carbon/amorph/getBruteLoss()
- return src.bruteloss
-
-/mob/living/carbon/amorph/adjustBruteLoss(var/amount, var/used_weapon = null)
- src.bruteloss += amount
- if(bruteloss < 0) bruteloss = 0
-
-/mob/living/carbon/amorph/getFireLoss()
- return src.fireloss
-
-/mob/living/carbon/amorph/adjustFireLoss(var/amount,var/used_weapon = null)
- src.fireloss += amount
- if(fireloss < 0) fireloss = 0
-
-/mob/living/carbon/amorph/get_visible_gender()
- return gender
+/mob/living/carbon/amorph
+ name = "amorph"
+ real_name = "amorph"
+ voice_name = "amorph"
+ icon = 'icons/mob/amorph.dmi'
+ icon_state = ""
+
+
+ var/species = "Amorph"
+ age = 30.0
+
+ var/used_skillpoints = 0
+ var/skill_specialization = null
+ var/list/skills = null
+
+ var/obj/item/l_ear = null
+
+ // might use this later to recolor armorphs with icon.SwapColor
+ var/slime_color = null
+
+ var/examine_text = ""
+
+
+/mob/living/carbon/amorph/New()
+
+ ..()
+
+ // Amorphs don't have a blood vessel, but they can have reagents in their body
+ var/datum/reagents/R = new/datum/reagents(1000)
+ reagents = R
+ R.my_atom = src
+
+ // Amorphs have no DNA(they're more like carbon-based machines)
+
+ // Amorphs don't have organs
+ ..()
+
+/mob/living/carbon/amorph/Bump(atom/movable/AM as mob|obj, yes)
+ if ((!( yes ) || now_pushing))
+ return
+ now_pushing = 1
+ if (ismob(AM))
+ var/mob/tmob = AM
+
+//BubbleWrap - Should stop you pushing a restrained person out of the way
+
+ if(istype(tmob, /mob/living/carbon/human))
+
+ for(var/mob/M in range(tmob, 1))
+ if( ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
+ if ( !(world.time % 5) )
+ src << "\red [tmob] is restrained, you cannot push past"
+ now_pushing = 0
+ return
+ if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
+ if ( !(world.time % 5) )
+ src << "\red [tmob] is restraining [M], you cannot push past"
+ now_pushing = 0
+ return
+
+ //BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
+ if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove) // mutual brohugs all around!
+ var/turf/oldloc = loc
+ loc = tmob.loc
+ tmob.loc = oldloc
+ now_pushing = 0
+ for(var/mob/living/carbon/metroid/Metroid in view(1,tmob))
+ if(Metroid.Victim == tmob)
+ Metroid.UpdateFeed()
+ return
+
+ if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
+ if(prob(99))
+ now_pushing = 0
+ return
+ if(tmob.l_hand && istype(tmob.l_hand, /obj/item/weapon/shield/riot))
+ if(prob(99))
+ now_pushing = 0
+ return
+ if(tmob.nopush)
+ now_pushing = 0
+ return
+
+ tmob.LAssailant = src
+
+ now_pushing = 0
+ spawn(0)
+ ..()
+ if (!istype(AM, /atom/movable))
+ return
+ if (!now_pushing)
+ now_pushing = 1
+
+ if (!AM.anchored)
+ var/t = get_dir(src, AM)
+ if (istype(AM, /obj/structure/window))
+ if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
+ for(var/obj/structure/window/win in get_step(AM,t))
+ now_pushing = 0
+ return
+ step(AM, t)
+ now_pushing = 0
+ return
+ return
+
+/mob/living/carbon/amorph/movement_delay()
+ var/tally = 2 // amorphs are a bit slower than humans
+ var/mob/M = pulling
+
+ if(reagents.has_reagent("hyperzine")) return -1
+
+ if(reagents.has_reagent("nuka_cola")) return -1
+
+ if(analgesic) return -1
+
+ if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
+
+ var/health_deficiency = traumatic_shock
+ if(health_deficiency >= 40) tally += (health_deficiency / 25)
+
+ var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
+ if (hungry >= 70) tally += hungry/300
+
+ if (bodytemperature < 283.222)
+ tally += (283.222 - bodytemperature) / 10 * 1.75
+ if (stuttering < 10)
+ stuttering = 10
+
+ if(shock_stage >= 10) tally += 3
+
+ if(tally < 0)
+ tally = 0
+
+ if(istype(M) && M.lying) //Pulling lying down people is slower
+ tally += 3
+
+ if(mRun in mutations)
+ tally = 0
+
+ return tally
+
+/mob/living/carbon/amorph/Stat()
+ ..()
+ statpanel("Status")
+
+ stat(null, "Intent: [a_intent]")
+ stat(null, "Move Mode: [m_intent]")
+ if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
+ if(ticker.mode:malf_mode_declared)
+ stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
+ if(emergency_shuttle)
+ if(emergency_shuttle.online && emergency_shuttle.location < 2)
+ var/timeleft = emergency_shuttle.timeleft()
+ if (timeleft)
+ stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
+
+ if (client.statpanel == "Status")
+ if (internal)
+ if (!internal.air_contents)
+ del(internal)
+ else
+ stat("Internal Atmosphere Info", internal.name)
+ stat("Tank Pressure", internal.air_contents.return_pressure())
+ stat("Distribution Pressure", internal.distribute_pressure)
+ if (mind)
+ if (mind.special_role == "Changeling" && changeling)
+ stat("Chemical Storage", changeling.chem_charges)
+ stat("Genetic Damage Time", changeling.geneticdamage)
+
+/mob/living/carbon/amorph/ex_act(severity)
+ flick("flash", flash)
+
+ var/shielded = 0
+ var/b_loss = null
+ var/f_loss = null
+ switch (severity)
+ if (1.0)
+ b_loss += 500
+ if (!prob(getarmor(null, "bomb")))
+ gib()
+ return
+ else
+ var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
+ throw_at(target, 200, 4)
+
+ if (2.0)
+ if (!shielded)
+ b_loss += 60
+
+ f_loss += 60
+
+ if (!prob(getarmor(null, "bomb")))
+ b_loss = b_loss/1.5
+ f_loss = f_loss/1.5
+
+ if(3.0)
+ b_loss += 30
+ if (!prob(getarmor(null, "bomb")))
+ b_loss = b_loss/2
+ if (prob(50) && !shielded)
+ Paralyse(10)
+
+ src.bruteloss += b_loss
+ src.fireloss += f_loss
+
+ UpdateDamageIcon()
+
+
+/mob/living/carbon/amorph/blob_act()
+ if(stat == 2) return
+ show_message("\red The blob attacks you!")
+ src.bruteloss += rand(30,40)
+ UpdateDamageIcon()
+ return
+
+/mob/living/carbon/amorph/u_equip(obj/item/W as obj)
+ // These are the only slots an amorph has
+ if (W == l_ear)
+ l_ear = null
+ else if (W == r_hand)
+ r_hand = null
+
+ update_clothing()
+
+/mob/living/carbon/amorph/db_click(text, t1)
+ var/obj/item/W = equipped()
+ var/emptyHand = (W == null)
+ if ((!emptyHand) && (!istype(W, /obj/item)))
+ return
+ if (emptyHand)
+ usr.next_move = usr.prev_move
+ usr:lastDblClick -= 3 //permit the double-click redirection to proceed.
+ switch(text)
+ if("l_ear")
+ if (l_ear)
+ if (emptyHand)
+ l_ear.DblClick()
+ return
+ else if(emptyHand)
+ return
+ if (!( istype(W, /obj/item/clothing/ears) ) && !( istype(W, /obj/item/device/radio/headset) ) && W.w_class != 1)
+ return
+ u_equip(W)
+ l_ear = W
+ W.equipped(src, text)
+
+ update_clothing()
+
+ return
+
+/mob/living/carbon/amorph/meteorhit(O as obj)
+ for(var/mob/M in viewers(src, null))
+ if ((M.client && !( M.blinded )))
+ M.show_message(text("\red [] has been hit by []", src, O), 1)
+ if (health > 0)
+ if (istype(O, /obj/effect/immovablerod))
+ src.bruteloss += 101
+ else
+ src.bruteloss += 25
+ UpdateDamageIcon()
+ updatehealth()
+ return
+
+/mob/living/carbon/amorph/Move(a, b, flag)
+
+ if (buckled)
+ return
+
+ if (restrained())
+ pulling = null
+
+
+ var/t7 = 1
+ if (restrained())
+ for(var/mob/M in range(src, 1))
+ if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
+ t7 = null
+ if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
+ var/turf/T = loc
+ . = ..()
+
+ if (pulling && pulling.loc)
+ if(!( isturf(pulling.loc) ))
+ pulling = null
+ return
+ else
+ if(Debug)
+ diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]"
+ diary <<"REPORT THIS"
+
+ /////
+ if(pulling && pulling.anchored)
+ pulling = null
+ return
+
+ if (!restrained())
+ var/diag = get_dir(src, pulling)
+ if ((diag - 1) & diag)
+ else
+ diag = null
+ if ((get_dist(src, pulling) > 1 || diag))
+ if (ismob(pulling))
+ var/mob/M = pulling
+ var/ok = 1
+ if (locate(/obj/item/weapon/grab, M.grabbed_by))
+ if (prob(75))
+ var/obj/item/weapon/grab/G = pick(M.grabbed_by)
+ if (istype(G, /obj/item/weapon/grab))
+ for(var/mob/O in viewers(M, null))
+ O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
+ //G = null
+ del(G)
+ else
+ ok = 0
+ if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
+ ok = 0
+ if (ok)
+ var/t = M.pulling
+ M.pulling = null
+
+ //this is the gay blood on floor shit -- Added back -- Skie
+ if (M.lying && (prob(M.getBruteLoss() / 6)))
+ var/turf/location = M.loc
+ if (istype(location, /turf/simulated))
+ location.add_blood(M)
+ if(ishuman(M))
+ var/mob/living/carbon/H = M
+ var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
+ if(blood_volume > 0)
+ H:vessel.remove_reagent("blood",1)
+ if(prob(5))
+ M.adjustBruteLoss(1)
+ visible_message("\red \The [M]'s wounds open more from being dragged!")
+ if(M.pull_damage())
+ if(prob(25))
+ M.adjustBruteLoss(2)
+ visible_message("\red \The [M]'s wounds worsen terribly from being dragged!")
+ var/turf/location = M.loc
+ if (istype(location, /turf/simulated))
+ location.add_blood(M)
+ if(ishuman(M))
+ var/mob/living/carbon/H = M
+ var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
+ if(blood_volume > 0)
+ H:vessel.remove_reagent("blood",1)
+
+ step(pulling, get_dir(pulling.loc, T))
+ M.pulling = t
+ else
+ if (pulling)
+ if (istype(pulling, /obj/structure/window))
+ if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
+ for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
+ pulling = null
+ if (pulling)
+ step(pulling, get_dir(pulling.loc, T))
+ else
+ pulling = null
+ . = ..()
+ if ((s_active && !( s_active in contents ) ))
+ s_active.close(src)
+
+ for(var/mob/living/carbon/metroid/M in view(1,src))
+ M.UpdateFeed(src)
+ return
+
+/mob/living/carbon/amorph/proc/misc_clothing_updates()
+ // Temporary proc to shove stuff in that was put into update_clothing()
+ // for questionable reasons
+
+ if (client)
+ if (i_select)
+ if (intent)
+ client.screen += hud_used.intents
+
+ var/list/L = dd_text2list(intent, ",")
+ L[1] += ":-11"
+ i_select.screen_loc = dd_list2text(L,",") //ICONS4
+ else
+ i_select.screen_loc = null
+ if (m_select)
+ if (m_int)
+ client.screen += hud_used.mov_int
+
+ var/list/L = dd_text2list(m_int, ",")
+ L[1] += ":-11"
+ m_select.screen_loc = dd_list2text(L,",") //ICONS4
+ else
+ m_select.screen_loc = null
+
+ // Probably a lazy way to make sure all items are on the screen exactly once
+ if (client)
+ client.screen -= contents
+ client.screen += contents
+
+/mob/living/carbon/amorph/rebuild_appearance()
+ // Lazy method: Just rebuild everything.
+ // This can be called when the mob is created, but on other occasions, rebuild_body_overlays(),
+ // rebuild_clothing_overlays() etc. should be called individually.
+
+ misc_clothing_updates() // silly stuff
+
+/mob/living/carbon/amorph/update_body_appearance()
+ // Should be called whenever something about the body appearance itself changes.
+
+ misc_clothing_updates() // silly stuff
+
+ if(lying)
+ icon_state = "lying"
+ else
+ icon_state = "standing"
+
+/mob/living/carbon/amorph/update_lying()
+ // Should be called whenever something about the lying status of the mob might have changed.
+
+ if(lying)
+ icon_state = "lying"
+ else
+ icon_state = "standing"
+
+/mob/living/carbon/amorph/hand_p(mob/M as mob)
+ // not even sure what this is meant to do
+ return
+
+/mob/living/carbon/amorph/restrained()
+ if (handcuffed)
+ return 0 // handcuffs don't work on amorphs
+ return 0
+
+/mob/living/carbon/amorph/var/co2overloadtime = null
+/mob/living/carbon/amorph/var/temperature_resistance = T0C+75
+
+/mob/living/carbon/amorph/show_inv(mob/user as mob)
+ // TODO: add a window for extracting stuff from an amorph's mouth
+
+// called when something steps onto an amorph
+// this could be made more general, but for now just handle mulebot
+/mob/living/carbon/amorph/HasEntered(var/atom/movable/AM)
+ var/obj/machinery/bot/mulebot/MB = AM
+ if(istype(MB))
+ MB.RunOver(src)
+
+//gets assignment from ID or ID inside PDA or PDA itself
+//Useful when player do something with computers
+/mob/living/carbon/amorph/proc/get_assignment(var/if_no_id = "No id", var/if_no_job = "No job")
+ // TODO: get the ID from the amorph's contents
+ return
+
+//gets name from ID or ID inside PDA or PDA itself
+//Useful when player do something with computers
+/mob/living/carbon/amorph/proc/get_authentification_name(var/if_no_id = "Unknown")
+ // TODO: get the ID from the amorph's contents
+ return
+
+//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere
+/mob/living/carbon/amorph/proc/get_visible_name()
+ // amorphs can't wear clothes or anything, so always return face_name
+ return get_face_name()
+
+//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
+/mob/living/carbon/amorph/proc/get_face_name()
+ // there might later be ways for amorphs to change the appearance of their face
+ return "[real_name]"
+
+
+//gets ID card object from special clothes slot or null.
+/mob/living/carbon/amorph/proc/get_idcard()
+ // TODO: get the ID from the amorph's contents
+
+
+// heal the amorph
+/mob/living/carbon/amorph/heal_overall_damage(var/brute, var/burn)
+ bruteloss -= brute
+ fireloss -= burn
+ bruteloss = max(bruteloss, 0)
+ fireloss = max(fireloss, 0)
+
+ updatehealth()
+ UpdateDamageIcon()
+
+// damage MANY external organs, in random order
+/mob/living/carbon/amorph/take_overall_damage(var/brute, var/burn, var/used_weapon = null)
+ bruteloss += brute
+ fireloss += burn
+
+ updatehealth()
+ UpdateDamageIcon()
+
+/mob/living/carbon/amorph/Topic(href, href_list)
+ if (href_list["refresh"])
+ if((machine)&&(in_range(src, usr)))
+ show_inv(machine)
+
+ if (href_list["mach_close"])
+ var/t1 = text("window=[]", href_list["mach_close"])
+ machine = null
+ src << browse(null, t1)
+
+ if ((href_list["item"] && !( usr.stat ) && usr.canmove && !( usr.restrained() ) && in_range(src, usr) && ticker)) //if game hasn't started, can't make an equip_e
+ var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
+ O.source = usr
+ O.target = src
+ O.item = usr.equipped()
+ O.s_loc = usr.loc
+ O.t_loc = loc
+ O.place = href_list["item"]
+ if(href_list["loc"])
+ O.internalloc = href_list["loc"]
+ requests += O
+ spawn( 0 )
+ O.process()
+ return
+
+ if (href_list["criminal"])
+ if(istype(usr, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = usr
+ if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
+ var/perpname = "wot"
+ var/modified = 0
+
+ /*if(wear_id)
+ if(istype(wear_id,/obj/item/weapon/card/id))
+ perpname = wear_id:registered_name
+ else if(istype(wear_id,/obj/item/device/pda))
+ var/obj/item/device/pda/tempPda = wear_id
+ perpname = tempPda.owner
+ else*/
+ perpname = src.name
+
+ for (var/datum/data/record/E in data_core.general)
+ if (E.fields["name"] == perpname)
+ for (var/datum/data/record/R in data_core.security)
+ if (R.fields["id"] == E.fields["id"])
+
+ var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
+
+ if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
+ if(setcriminal != "Cancel")
+ R.fields["criminal"] = setcriminal
+ modified = 1
+
+ spawn()
+ H.handle_regular_hud_updates()
+
+ if(!modified)
+ usr << "\red Unable to locate a data core entry for this person."
+ ..()
+ return
+
+
+///eyecheck()
+///Returns a number between -1 to 2
+/mob/living/carbon/amorph/eyecheck()
+ return 1
+
+
+/mob/living/carbon/amorph/IsAdvancedToolUser()
+ return 1//Amorphs can use guns and such
+
+
+/mob/living/carbon/amorph/updatehealth()
+ if(src.nodamage)
+ src.health = 100
+ src.stat = 0
+ return
+ src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() -src.halloss
+ return
+
+/mob/living/carbon/amorph/abiotic(var/full_body = 0)
+ return 0
+
+/mob/living/carbon/amorph/abiotic2(var/full_body2 = 0)
+ return 0
+
+/mob/living/carbon/amorph/getBruteLoss()
+ return src.bruteloss
+
+/mob/living/carbon/amorph/adjustBruteLoss(var/amount, var/used_weapon = null)
+ src.bruteloss += amount
+ if(bruteloss < 0) bruteloss = 0
+
+/mob/living/carbon/amorph/getFireLoss()
+ return src.fireloss
+
+/mob/living/carbon/amorph/adjustFireLoss(var/amount,var/used_weapon = null)
+ src.fireloss += amount
+ if(fireloss < 0) fireloss = 0
+
+/mob/living/carbon/amorph/get_visible_gender()
+ return gender
diff --git a/code/modules/mob/living/carbon/amorph/amorph_attack.dm b/code/WorkInProgress/Cib/amorph/amorph_attack.dm
similarity index 96%
rename from code/modules/mob/living/carbon/amorph/amorph_attack.dm
rename to code/WorkInProgress/Cib/amorph/amorph_attack.dm
index b8c4aa8b603..c103d1be67c 100644
--- a/code/modules/mob/living/carbon/amorph/amorph_attack.dm
+++ b/code/WorkInProgress/Cib/amorph/amorph_attack.dm
@@ -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 [M.name] has bit [src]!"), 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 [src] has been touched with the stun gloves by [M]!", 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 [] has [attack_verb]ed [name]!", 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 [] has attempted to [attack_verb] [name]!", 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 [] has disarmed [name]!", 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 [] has slashed [name]!", 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 [] has attempted to lunge at [name]!", 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 [] has tackled down [name]!", M), 1)
- else
- drop_item()
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O.show_message(text("\red [] has disarmed [name]!", 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 [M] [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 The [M.name] has [pick("bit","slashed")] []!", 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 The [M.name] has shocked []!", 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 [M.name] has bit [src]!"), 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 [src] has been touched with the stun gloves by [M]!", 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 [] has [attack_verb]ed [name]!", 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 [] has attempted to [attack_verb] [name]!", 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 [] has disarmed [name]!", 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 [] has slashed [name]!", 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 [] has attempted to lunge at [name]!", 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 [] has tackled down [name]!", M), 1)
+ else
+ drop_item()
+ for(var/mob/O in viewers(src, null))
+ if ((O.client && !( O.blinded )))
+ O.show_message(text("\red [] has disarmed [name]!", 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 [M] [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 The [M.name] has [pick("bit","slashed")] []!", 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 The [M.name] has shocked []!", 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
diff --git a/code/modules/mob/living/carbon/amorph/amorph_damage.dm b/code/WorkInProgress/Cib/amorph/amorph_damage.dm
similarity index 90%
rename from code/modules/mob/living/carbon/amorph/amorph_damage.dm
rename to code/WorkInProgress/Cib/amorph/amorph_damage.dm
index 8e52d042920..d49d679069c 100644
--- a/code/modules/mob/living/carbon/amorph/amorph_damage.dm
+++ b/code/WorkInProgress/Cib/amorph/amorph_damage.dm
@@ -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)
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/amorph/amorph_hud.dm b/code/WorkInProgress/Cib/amorph/amorph_hud.dm
similarity index 96%
rename from code/modules/mob/living/carbon/amorph/amorph_hud.dm
rename to code/WorkInProgress/Cib/amorph/amorph_hud.dm
index 7236790bb79..2f3390342aa 100644
--- a/code/modules/mob/living/carbon/amorph/amorph_hud.dm
+++ b/code/WorkInProgress/Cib/amorph/amorph_hud.dm
@@ -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
diff --git a/code/modules/mob/living/carbon/amorph/life.dm b/code/WorkInProgress/Cib/amorph/life.dm
similarity index 96%
rename from code/modules/mob/living/carbon/amorph/life.dm
rename to code/WorkInProgress/Cib/amorph/life.dm
index 1a1812a6342..14c4d41ccab 100644
--- a/code/modules/mob/living/carbon/amorph/life.dm
+++ b/code/WorkInProgress/Cib/amorph/life.dm
@@ -1,516 +1,516 @@
-/mob/living/carbon/amorph
- var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
-
- var/oxygen_alert = 0
- var/toxins_alert = 0
- var/fire_alert = 0
-
- var/temperature_alert = 0
-
-
-/mob/living/carbon/amorph/Life()
- set invisibility = 0
- set background = 1
-
- if (src.monkeyizing)
- return
-
- ..()
-
- var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
- if(src.loc)
- environment = loc.return_air()
-
- if (src.stat != 2) //still breathing
-
- //First, resolve location and get a breath
-
- if(air_master.current_cycle%4==2)
- //Only try to take a breath every 4 seconds, unless suffocating
- breathe()
-
- else //Still give containing object the chance to interact
- if(istype(loc, /obj/))
- var/obj/location_as_object = loc
- location_as_object.handle_internal_lifeform(src, 0)
-
- //Apparently, the person who wrote this code designed it so that
- //blinded get reset each cycle and then get activated later in the
- //code. Very ugly. I dont care. Moving this stuff here so its easy
- //to find it.
- src.blinded = null
-
- //Disease Check
- handle_virus_updates()
-
- //Handle temperature/pressure differences between body and environment
- if(environment) // More error checking -- TLE
- handle_environment(environment)
-
- //Mutations and radiation
- handle_mutations_and_radiation()
-
- //Chemicals in the body
- handle_chemicals_in_body()
-
- //Disabilities
- handle_disabilities()
-
- //Status updates, death etc.
-// UpdateLuminosity()
- handle_regular_status_updates()
-
- if(client)
- handle_regular_hud_updates()
-
- //Being buckled to a chair or bed
- check_if_buckled()
-
- // Yup.
- update_canmove()
-
- clamp_values()
-
- // Grabbing
- for(var/obj/item/weapon/grab/G in src)
- G.process()
-
-/mob/living/carbon/amorph
- proc
-
- clamp_values()
-
- AdjustStunned(0)
- AdjustParalysis(0)
- AdjustWeakened(0)
-
- handle_disabilities()
- if (src.disabilities & 4)
- if ((prob(5) && src.paralysis <= 1 && src.r_ch_cou < 1))
- src.drop_item()
- spawn( 0 )
- emote("cough")
- return
- if (src.disabilities & 8)
- if ((prob(10) && src.paralysis <= 1 && src.r_Tourette < 1))
- Stun(10)
- spawn( 0 )
- emote("twitch")
- return
- if (src.disabilities & 16)
- if (prob(10))
- src.stuttering = max(10, src.stuttering)
-
- update_mind()
- if(!mind && client)
- mind = new
- mind.current = src
- mind.key = key
-
- handle_mutations_and_radiation()
- // amorphs are immune to this stuff
-
- breathe()
- if(src.reagents)
-
- if(src.reagents.has_reagent("lexorin")) return
-
- if(!loc) return //probably ought to make a proper fix for this, but :effort: --NeoFite
-
- var/datum/gas_mixture/environment = loc.return_air()
- var/datum/gas_mixture/breath
-
- if(losebreath>0) //Suffocating so do not take a breath
- src.losebreath--
- if (prob(75)) //High chance of gasping for air
- spawn emote("gasp")
- if(istype(loc, /obj/))
- var/obj/location_as_object = loc
- location_as_object.handle_internal_lifeform(src, 0)
- else
- //First, check for air from internal atmosphere (using an air tank and mask generally)
- breath = get_breath_from_internal(BREATH_VOLUME)
-
- //No breath from internal atmosphere so get breath from location
- if(!breath)
- if(istype(loc, /obj/))
- var/obj/location_as_object = loc
- breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
- else if(istype(loc, /turf/))
- var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
- breath = loc.remove_air(breath_moles)
-
- // Handle chem smoke effect -- Doohl
- var/block = 0
- if(wear_mask)
- if(istype(wear_mask, /obj/item/clothing/mask/gas))
- block = 1
-
- if(!block)
-
- for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
- if(smoke.reagents.total_volume)
- smoke.reagents.reaction(src, INGEST)
- spawn(5)
- if(smoke)
- smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
- break // If they breathe in the nasty stuff once, no need to continue checking
-
-
- else //Still give containing object the chance to interact
- if(istype(loc, /obj/))
- var/obj/location_as_object = loc
- location_as_object.handle_internal_lifeform(src, 0)
-
- handle_breath(breath)
-
- if(breath)
- loc.assume_air(breath)
-
-
- get_breath_from_internal(volume_needed)
- if(internal)
- if (!contents.Find(src.internal))
- internal = null
- if (!wear_mask || !(wear_mask.flags|MASKINTERNALS) )
- internal = null
- if(internal)
- if (src.internals)
- src.internals.icon_state = "internal1"
- return internal.remove_air_volume(volume_needed)
- else
- if (src.internals)
- src.internals.icon_state = "internal0"
- return null
-
- update_canmove()
- if(paralysis || stunned || weakened || buckled || (changeling && changeling.changeling_fakedeath)) canmove = 0
- else canmove = 1
-
- handle_breath(datum/gas_mixture/breath)
- if(src.nodamage)
- return
-
- if(!breath || (breath.total_moles == 0))
- adjustOxyLoss(7)
-
- oxygen_alert = max(oxygen_alert, 1)
-
- return 0
-
- var/safe_oxygen_min = 8 // Minimum safe partial pressure of O2, in kPa
- //var/safe_oxygen_max = 140 // Maximum safe partial pressure of O2, in kPa (Not used for now)
- var/SA_para_min = 0.5
- var/SA_sleep_min = 5
- var/oxygen_used = 0
- var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
-
- //Partial pressure of the O2 in our breath
- var/O2_pp = (breath.oxygen/breath.total_moles())*breath_pressure
-
- if(O2_pp < safe_oxygen_min) // Too little oxygen
- if(prob(20))
- spawn(0) emote("gasp")
- if (O2_pp == 0)
- O2_pp = 0.01
- var/ratio = safe_oxygen_min/O2_pp
- adjustOxyLoss(min(5*ratio, 7)) // Don't fuck them up too fast (space only does 7 after all!)
- oxygen_used = breath.oxygen*ratio/6
- oxygen_alert = max(oxygen_alert, 1)
- else // We're in safe limits
- adjustOxyLoss(-5)
- oxygen_used = breath.oxygen/6
- oxygen_alert = 0
-
- breath.oxygen -= oxygen_used
- breath.carbon_dioxide += oxygen_used
-
- if(breath.trace_gases.len) // If there's some other shit in the air lets deal with it here.
- for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
- var/SA_pp = (SA.moles/breath.total_moles())*breath_pressure
- if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
- Paralyse(3) // 3 gives them one second to wake up and run away a bit!
- if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
- src.sleeping = max(src.sleeping+2, 10)
- else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
- if(prob(20))
- spawn(0) emote(pick("giggle", "laugh"))
-
- return 1
-
- handle_environment(datum/gas_mixture/environment)
- if(!environment)
- return
- var/environment_heat_capacity = environment.heat_capacity()
- if(istype(loc, /turf/space))
- environment_heat_capacity = loc:heat_capacity
-
- if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
- var/transfer_coefficient
-
- transfer_coefficient = 1
- if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature))
- transfer_coefficient *= wear_mask.heat_transfer_coefficient
-
- handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
-
- if(stat==2)
- bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
-
- //Account for massive pressure differences
-
-
- var/pressure = environment.return_pressure()
-
- // if(!wear_suit) Monkies cannot into space.
- // if(!istype(wear_suit, /obj/item/clothing/suit/space))
-
- /*if(pressure < 20)
- if(prob(25))
- src << "You feel the splittle on your lips and the fluid on your eyes boiling away, the capillteries in your skin breaking."
- adjustBruteLoss(5)
- */
-
- if(pressure > HAZARD_HIGH_PRESSURE)
-
- adjustBruteLoss(min((10+(round(pressure/(HIGH_STEP_PRESSURE)-2)*5)),MAX_PRESSURE_DAMAGE))
-
-
-
- return //TODO: DEFERRED
-
- handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
- if(src.nodamage) return
- var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
- if(exposed_temperature > bodytemperature)
- adjustFireLoss(20.0*discomfort)
-
- else
- adjustFireLoss(5.0*discomfort)
-
- handle_chemicals_in_body()
- // most chemicals will have no effect on amorphs
- //if(reagents) reagents.metabolize(src)
-
- if (src.drowsyness)
- src.drowsyness--
- src.eye_blurry = max(2, src.eye_blurry)
- if (prob(5))
- src.sleeping += 1
- Paralyse(5)
-
- confused = max(0, confused - 1)
- // decrement dizziness counter, clamped to 0
- if(resting)
- dizziness = max(0, dizziness - 5)
- else
- dizziness = max(0, dizziness - 1)
-
- src.updatehealth()
-
- return //TODO: DEFERRED
-
- handle_regular_status_updates()
-
- health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
-
- if(getOxyLoss() > 25) Paralyse(3)
-
- if(src.sleeping)
- Paralyse(5)
- if (prob(1) && health) spawn(0) emote("snore")
-
- if(src.resting)
- Weaken(5)
-
- if(health < config.health_threshold_dead && stat != 2)
- death()
- else if(src.health < config.health_threshold_crit)
- if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
-
- // shuffle around the chemical effects for amorphs a little ;)
- if(!src.reagents.has_reagent("antitoxin") && src.stat != 2) src.adjustOxyLoss(2)
-
- if(src.stat != 2) src.stat = 1
- Paralyse(5)
-
- if (src.stat != 2) //Alive.
-
- if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
- if (src.stunned > 0)
- AdjustStunned(-1)
- src.stat = 0
- if (src.weakened > 0)
- AdjustWeakened(-1)
- src.lying = 1
- src.stat = 0
- if (src.paralysis > 0)
- AdjustParalysis(-1)
- src.blinded = 1
- src.lying = 1
- src.stat = 1
- var/h = src.hand
- src.hand = 0
- drop_item()
- src.hand = 1
- drop_item()
- src.hand = h
-
- else //Not stunned.
- src.lying = 0
- src.stat = 0
-
- else //Dead.
- src.lying = 1
- src.blinded = 1
- src.stat = 2
-
- if (src.stuttering) src.stuttering--
- if (src.slurring) src.slurring--
-
- if (src.eye_blind)
- src.eye_blind--
- src.blinded = 1
-
- if (src.ear_deaf > 0) src.ear_deaf--
- if (src.ear_damage < 25)
- src.ear_damage -= 0.05
- src.ear_damage = max(src.ear_damage, 0)
-
- src.density = !( src.lying )
-
- if (src.disabilities & 128)
- src.blinded = 1
- if (src.disabilities & 32)
- src.ear_deaf = 1
-
- if (src.eye_blurry > 0)
- src.eye_blurry--
- src.eye_blurry = max(0, src.eye_blurry)
-
- if (src.druggy > 0)
- src.druggy--
- src.druggy = max(0, src.druggy)
-
- return 1
-
- handle_regular_hud_updates()
-
- if (src.stat == 2 || (XRAY in mutations))
- src.sight |= SEE_TURFS
- src.sight |= SEE_MOBS
- src.sight |= SEE_OBJS
- src.see_in_dark = 8
- src.see_invisible = 2
- else if (src.stat != 2)
- src.sight &= ~SEE_TURFS
- src.sight &= ~SEE_MOBS
- src.sight &= ~SEE_OBJS
- src.see_in_dark = 2
- src.see_invisible = 0
-
- if (src.sleep)
- src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0)
- src.sleep.overlays = null
- if(src.sleeping_willingly)
- src.sleep.overlays += icon(src.sleep.icon, "sleep_willing")
- if (src.rest) src.rest.icon_state = text("rest[]", src.resting)
-
- if (src.healths)
- if (src.stat != 2)
- switch(health)
- if(100 to INFINITY)
- src.healths.icon_state = "health0"
- if(80 to 100)
- src.healths.icon_state = "health1"
- if(60 to 80)
- src.healths.icon_state = "health2"
- if(40 to 60)
- src.healths.icon_state = "health3"
- if(20 to 40)
- src.healths.icon_state = "health4"
- if(0 to 20)
- src.healths.icon_state = "health5"
- else
- src.healths.icon_state = "health6"
- else
- src.healths.icon_state = "health7"
-
- if (pressure)
- var/datum/gas_mixture/environment = loc.return_air()
- if(environment)
- switch(environment.return_pressure())
-
- if(HAZARD_HIGH_PRESSURE to INFINITY)
- pressure.icon_state = "pressure2"
- if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
- pressure.icon_state = "pressure1"
- if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
- pressure.icon_state = "pressure0"
- if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
- pressure.icon_state = "pressure-1"
- else
- pressure.icon_state = "pressure-2"
-
- if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
-
-
- if (src.toxin) src.toxin.icon_state = "tox[src.toxins_alert ? 1 : 0]"
- if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
- if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]"
- //NOTE: the alerts dont reset when youre out of danger. dont blame me,
- //blame the person who coded them. Temporary fix added.
-
- if(bodytemp)
- switch(src.bodytemperature) //310.055 optimal body temp
- if(345 to INFINITY)
- src.bodytemp.icon_state = "temp4"
- if(335 to 345)
- src.bodytemp.icon_state = "temp3"
- if(327 to 335)
- src.bodytemp.icon_state = "temp2"
- if(316 to 327)
- src.bodytemp.icon_state = "temp1"
- if(300 to 316)
- src.bodytemp.icon_state = "temp0"
- if(295 to 300)
- src.bodytemp.icon_state = "temp-1"
- if(280 to 295)
- src.bodytemp.icon_state = "temp-2"
- if(260 to 280)
- src.bodytemp.icon_state = "temp-3"
- else
- src.bodytemp.icon_state = "temp-4"
-
- src.client.screen -= src.hud_used.blurry
- src.client.screen -= src.hud_used.druggy
- src.client.screen -= src.hud_used.vimpaired
-
- if ((src.blind && src.stat != 2))
- if ((src.blinded))
- src.blind.layer = 18
- else
- src.blind.layer = 0
-
- if (src.disabilities & 1)
- src.client.screen += src.hud_used.vimpaired
-
- if (src.eye_blurry)
- src.client.screen += src.hud_used.blurry
-
- if (src.druggy)
- src.client.screen += src.hud_used.druggy
-
- if (src.stat != 2)
- if (src.machine)
- if (!( src.machine.check_eye(src) ))
- src.reset_view(null)
- else
- if(!client.adminobs)
- reset_view(null)
-
- return 1
-
- handle_virus_updates()
- // amorphs can't come down with human diseases
+/mob/living/carbon/amorph
+ var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
+
+ var/oxygen_alert = 0
+ var/toxins_alert = 0
+ var/fire_alert = 0
+
+ var/temperature_alert = 0
+
+
+/mob/living/carbon/amorph/Life()
+ set invisibility = 0
+ set background = 1
+
+ if (src.monkeyizing)
+ return
+
+ ..()
+
+ var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
+ if(src.loc)
+ environment = loc.return_air()
+
+ if (src.stat != 2) //still breathing
+
+ //First, resolve location and get a breath
+
+ if(air_master.current_cycle%4==2)
+ //Only try to take a breath every 4 seconds, unless suffocating
+ breathe()
+
+ else //Still give containing object the chance to interact
+ if(istype(loc, /obj/))
+ var/obj/location_as_object = loc
+ location_as_object.handle_internal_lifeform(src, 0)
+
+ //Apparently, the person who wrote this code designed it so that
+ //blinded get reset each cycle and then get activated later in the
+ //code. Very ugly. I dont care. Moving this stuff here so its easy
+ //to find it.
+ src.blinded = null
+
+ //Disease Check
+ handle_virus_updates()
+
+ //Handle temperature/pressure differences between body and environment
+ if(environment) // More error checking -- TLE
+ handle_environment(environment)
+
+ //Mutations and radiation
+ handle_mutations_and_radiation()
+
+ //Chemicals in the body
+ handle_chemicals_in_body()
+
+ //Disabilities
+ handle_disabilities()
+
+ //Status updates, death etc.
+// UpdateLuminosity()
+ handle_regular_status_updates()
+
+ if(client)
+ handle_regular_hud_updates()
+
+ //Being buckled to a chair or bed
+ check_if_buckled()
+
+ // Yup.
+ update_canmove()
+
+ clamp_values()
+
+ // Grabbing
+ for(var/obj/item/weapon/grab/G in src)
+ G.process()
+
+/mob/living/carbon/amorph
+ proc
+
+ clamp_values()
+
+ AdjustStunned(0)
+ AdjustParalysis(0)
+ AdjustWeakened(0)
+
+ handle_disabilities()
+ if (src.disabilities & 4)
+ if ((prob(5) && src.paralysis <= 1 && src.r_ch_cou < 1))
+ src.drop_item()
+ spawn( 0 )
+ emote("cough")
+ return
+ if (src.disabilities & 8)
+ if ((prob(10) && src.paralysis <= 1 && src.r_Tourette < 1))
+ Stun(10)
+ spawn( 0 )
+ emote("twitch")
+ return
+ if (src.disabilities & 16)
+ if (prob(10))
+ src.stuttering = max(10, src.stuttering)
+
+ update_mind()
+ if(!mind && client)
+ mind = new
+ mind.current = src
+ mind.key = key
+
+ handle_mutations_and_radiation()
+ // amorphs are immune to this stuff
+
+ breathe()
+ if(src.reagents)
+
+ if(src.reagents.has_reagent("lexorin")) return
+
+ if(!loc) return //probably ought to make a proper fix for this, but :effort: --NeoFite
+
+ var/datum/gas_mixture/environment = loc.return_air()
+ var/datum/gas_mixture/breath
+
+ if(losebreath>0) //Suffocating so do not take a breath
+ src.losebreath--
+ if (prob(75)) //High chance of gasping for air
+ spawn emote("gasp")
+ if(istype(loc, /obj/))
+ var/obj/location_as_object = loc
+ location_as_object.handle_internal_lifeform(src, 0)
+ else
+ //First, check for air from internal atmosphere (using an air tank and mask generally)
+ breath = get_breath_from_internal(BREATH_VOLUME)
+
+ //No breath from internal atmosphere so get breath from location
+ if(!breath)
+ if(istype(loc, /obj/))
+ var/obj/location_as_object = loc
+ breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
+ else if(istype(loc, /turf/))
+ var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
+ breath = loc.remove_air(breath_moles)
+
+ // Handle chem smoke effect -- Doohl
+ var/block = 0
+ if(wear_mask)
+ if(istype(wear_mask, /obj/item/clothing/mask/gas))
+ block = 1
+
+ if(!block)
+
+ for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
+ if(smoke.reagents.total_volume)
+ smoke.reagents.reaction(src, INGEST)
+ spawn(5)
+ if(smoke)
+ smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
+ break // If they breathe in the nasty stuff once, no need to continue checking
+
+
+ else //Still give containing object the chance to interact
+ if(istype(loc, /obj/))
+ var/obj/location_as_object = loc
+ location_as_object.handle_internal_lifeform(src, 0)
+
+ handle_breath(breath)
+
+ if(breath)
+ loc.assume_air(breath)
+
+
+ get_breath_from_internal(volume_needed)
+ if(internal)
+ if (!contents.Find(src.internal))
+ internal = null
+ if (!wear_mask || !(wear_mask.flags|MASKINTERNALS) )
+ internal = null
+ if(internal)
+ if (src.internals)
+ src.internals.icon_state = "internal1"
+ return internal.remove_air_volume(volume_needed)
+ else
+ if (src.internals)
+ src.internals.icon_state = "internal0"
+ return null
+
+ update_canmove()
+ if(paralysis || stunned || weakened || buckled || (changeling && changeling.changeling_fakedeath)) canmove = 0
+ else canmove = 1
+
+ handle_breath(datum/gas_mixture/breath)
+ if(src.nodamage)
+ return
+
+ if(!breath || (breath.total_moles == 0))
+ adjustOxyLoss(7)
+
+ oxygen_alert = max(oxygen_alert, 1)
+
+ return 0
+
+ var/safe_oxygen_min = 8 // Minimum safe partial pressure of O2, in kPa
+ //var/safe_oxygen_max = 140 // Maximum safe partial pressure of O2, in kPa (Not used for now)
+ var/SA_para_min = 0.5
+ var/SA_sleep_min = 5
+ var/oxygen_used = 0
+ var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
+
+ //Partial pressure of the O2 in our breath
+ var/O2_pp = (breath.oxygen/breath.total_moles())*breath_pressure
+
+ if(O2_pp < safe_oxygen_min) // Too little oxygen
+ if(prob(20))
+ spawn(0) emote("gasp")
+ if (O2_pp == 0)
+ O2_pp = 0.01
+ var/ratio = safe_oxygen_min/O2_pp
+ adjustOxyLoss(min(5*ratio, 7)) // Don't fuck them up too fast (space only does 7 after all!)
+ oxygen_used = breath.oxygen*ratio/6
+ oxygen_alert = max(oxygen_alert, 1)
+ else // We're in safe limits
+ adjustOxyLoss(-5)
+ oxygen_used = breath.oxygen/6
+ oxygen_alert = 0
+
+ breath.oxygen -= oxygen_used
+ breath.carbon_dioxide += oxygen_used
+
+ if(breath.trace_gases.len) // If there's some other shit in the air lets deal with it here.
+ for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
+ var/SA_pp = (SA.moles/breath.total_moles())*breath_pressure
+ if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
+ Paralyse(3) // 3 gives them one second to wake up and run away a bit!
+ if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
+ src.sleeping = max(src.sleeping+2, 10)
+ else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
+ if(prob(20))
+ spawn(0) emote(pick("giggle", "laugh"))
+
+ return 1
+
+ handle_environment(datum/gas_mixture/environment)
+ if(!environment)
+ return
+ var/environment_heat_capacity = environment.heat_capacity()
+ if(istype(loc, /turf/space))
+ environment_heat_capacity = loc:heat_capacity
+
+ if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
+ var/transfer_coefficient
+
+ transfer_coefficient = 1
+ if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature))
+ transfer_coefficient *= wear_mask.heat_transfer_coefficient
+
+ handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
+
+ if(stat==2)
+ bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
+
+ //Account for massive pressure differences
+
+
+ var/pressure = environment.return_pressure()
+
+ // if(!wear_suit) Monkies cannot into space.
+ // if(!istype(wear_suit, /obj/item/clothing/suit/space))
+
+ /*if(pressure < 20)
+ if(prob(25))
+ src << "You feel the splittle on your lips and the fluid on your eyes boiling away, the capillteries in your skin breaking."
+ adjustBruteLoss(5)
+ */
+
+ if(pressure > HAZARD_HIGH_PRESSURE)
+
+ adjustBruteLoss(min((10+(round(pressure/(HIGH_STEP_PRESSURE)-2)*5)),MAX_PRESSURE_DAMAGE))
+
+
+
+ return //TODO: DEFERRED
+
+ handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
+ if(src.nodamage) return
+ var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
+ if(exposed_temperature > bodytemperature)
+ adjustFireLoss(20.0*discomfort)
+
+ else
+ adjustFireLoss(5.0*discomfort)
+
+ handle_chemicals_in_body()
+ // most chemicals will have no effect on amorphs
+ //if(reagents) reagents.metabolize(src)
+
+ if (src.drowsyness)
+ src.drowsyness--
+ src.eye_blurry = max(2, src.eye_blurry)
+ if (prob(5))
+ src.sleeping += 1
+ Paralyse(5)
+
+ confused = max(0, confused - 1)
+ // decrement dizziness counter, clamped to 0
+ if(resting)
+ dizziness = max(0, dizziness - 5)
+ else
+ dizziness = max(0, dizziness - 1)
+
+ src.updatehealth()
+
+ return //TODO: DEFERRED
+
+ handle_regular_status_updates()
+
+ health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
+
+ if(getOxyLoss() > 25) Paralyse(3)
+
+ if(src.sleeping)
+ Paralyse(5)
+ if (prob(1) && health) spawn(0) emote("snore")
+
+ if(src.resting)
+ Weaken(5)
+
+ if(health < config.health_threshold_dead && stat != 2)
+ death()
+ else if(src.health < config.health_threshold_crit)
+ if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
+
+ // shuffle around the chemical effects for amorphs a little ;)
+ if(!src.reagents.has_reagent("antitoxin") && src.stat != 2) src.adjustOxyLoss(2)
+
+ if(src.stat != 2) src.stat = 1
+ Paralyse(5)
+
+ if (src.stat != 2) //Alive.
+
+ if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
+ if (src.stunned > 0)
+ AdjustStunned(-1)
+ src.stat = 0
+ if (src.weakened > 0)
+ AdjustWeakened(-1)
+ src.lying = 1
+ src.stat = 0
+ if (src.paralysis > 0)
+ AdjustParalysis(-1)
+ src.blinded = 1
+ src.lying = 1
+ src.stat = 1
+ var/h = src.hand
+ src.hand = 0
+ drop_item()
+ src.hand = 1
+ drop_item()
+ src.hand = h
+
+ else //Not stunned.
+ src.lying = 0
+ src.stat = 0
+
+ else //Dead.
+ src.lying = 1
+ src.blinded = 1
+ src.stat = 2
+
+ if (src.stuttering) src.stuttering--
+ if (src.slurring) src.slurring--
+
+ if (src.eye_blind)
+ src.eye_blind--
+ src.blinded = 1
+
+ if (src.ear_deaf > 0) src.ear_deaf--
+ if (src.ear_damage < 25)
+ src.ear_damage -= 0.05
+ src.ear_damage = max(src.ear_damage, 0)
+
+ src.density = !( src.lying )
+
+ if (src.disabilities & 128)
+ src.blinded = 1
+ if (src.disabilities & 32)
+ src.ear_deaf = 1
+
+ if (src.eye_blurry > 0)
+ src.eye_blurry--
+ src.eye_blurry = max(0, src.eye_blurry)
+
+ if (src.druggy > 0)
+ src.druggy--
+ src.druggy = max(0, src.druggy)
+
+ return 1
+
+ handle_regular_hud_updates()
+
+ if (src.stat == 2 || (XRAY in mutations))
+ src.sight |= SEE_TURFS
+ src.sight |= SEE_MOBS
+ src.sight |= SEE_OBJS
+ src.see_in_dark = 8
+ src.see_invisible = 2
+ else if (src.stat != 2)
+ src.sight &= ~SEE_TURFS
+ src.sight &= ~SEE_MOBS
+ src.sight &= ~SEE_OBJS
+ src.see_in_dark = 2
+ src.see_invisible = 0
+
+ if (src.sleep)
+ src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0)
+ src.sleep.overlays = null
+ if(src.sleeping_willingly)
+ src.sleep.overlays += icon(src.sleep.icon, "sleep_willing")
+ if (src.rest) src.rest.icon_state = text("rest[]", src.resting)
+
+ if (src.healths)
+ if (src.stat != 2)
+ switch(health)
+ if(100 to INFINITY)
+ src.healths.icon_state = "health0"
+ if(80 to 100)
+ src.healths.icon_state = "health1"
+ if(60 to 80)
+ src.healths.icon_state = "health2"
+ if(40 to 60)
+ src.healths.icon_state = "health3"
+ if(20 to 40)
+ src.healths.icon_state = "health4"
+ if(0 to 20)
+ src.healths.icon_state = "health5"
+ else
+ src.healths.icon_state = "health6"
+ else
+ src.healths.icon_state = "health7"
+
+ if (pressure)
+ var/datum/gas_mixture/environment = loc.return_air()
+ if(environment)
+ switch(environment.return_pressure())
+
+ if(HAZARD_HIGH_PRESSURE to INFINITY)
+ pressure.icon_state = "pressure2"
+ if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
+ pressure.icon_state = "pressure1"
+ if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
+ pressure.icon_state = "pressure0"
+ if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
+ pressure.icon_state = "pressure-1"
+ else
+ pressure.icon_state = "pressure-2"
+
+ if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
+
+
+ if (src.toxin) src.toxin.icon_state = "tox[src.toxins_alert ? 1 : 0]"
+ if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
+ if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]"
+ //NOTE: the alerts dont reset when youre out of danger. dont blame me,
+ //blame the person who coded them. Temporary fix added.
+
+ if(bodytemp)
+ switch(src.bodytemperature) //310.055 optimal body temp
+ if(345 to INFINITY)
+ src.bodytemp.icon_state = "temp4"
+ if(335 to 345)
+ src.bodytemp.icon_state = "temp3"
+ if(327 to 335)
+ src.bodytemp.icon_state = "temp2"
+ if(316 to 327)
+ src.bodytemp.icon_state = "temp1"
+ if(300 to 316)
+ src.bodytemp.icon_state = "temp0"
+ if(295 to 300)
+ src.bodytemp.icon_state = "temp-1"
+ if(280 to 295)
+ src.bodytemp.icon_state = "temp-2"
+ if(260 to 280)
+ src.bodytemp.icon_state = "temp-3"
+ else
+ src.bodytemp.icon_state = "temp-4"
+
+ src.client.screen -= src.hud_used.blurry
+ src.client.screen -= src.hud_used.druggy
+ src.client.screen -= src.hud_used.vimpaired
+
+ if ((src.blind && src.stat != 2))
+ if ((src.blinded))
+ src.blind.layer = 18
+ else
+ src.blind.layer = 0
+
+ if (src.disabilities & 1)
+ src.client.screen += src.hud_used.vimpaired
+
+ if (src.eye_blurry)
+ src.client.screen += src.hud_used.blurry
+
+ if (src.druggy)
+ src.client.screen += src.hud_used.druggy
+
+ if (src.stat != 2)
+ if (src.machine)
+ if (!( src.machine.check_eye(src) ))
+ src.reset_view(null)
+ else
+ if(!client.adminobs)
+ reset_view(null)
+
+ return 1
+
+ handle_virus_updates()
+ // amorphs can't come down with human diseases
return
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/amorph/say.dm b/code/WorkInProgress/Cib/amorph/say.dm
similarity index 97%
rename from code/modules/mob/living/carbon/amorph/say.dm
rename to code/WorkInProgress/Cib/amorph/say.dm
index 4663a847a1b..a73c9de5d39 100644
--- a/code/modules/mob/living/carbon/amorph/say.dm
+++ b/code/WorkInProgress/Cib/amorph/say.dm
@@ -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]\"";
diff --git a/code/modules/mob/living/parasite/meme.dm b/code/WorkInProgress/Cib/meme.dm
similarity index 100%
rename from code/modules/mob/living/parasite/meme.dm
rename to code/WorkInProgress/Cib/meme.dm
diff --git a/code/WorkInProgress/Mini/ATM.dm b/code/WorkInProgress/Mini/ATM.dm
index 17b6ef2e47c..68a6c39942e 100644
--- a/code/WorkInProgress/Mini/ATM.dm
+++ b/code/WorkInProgress/Mini/ATM.dm
@@ -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,349 @@ 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 << "You insert [I] into [src]."
+ 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 += "
NanoTrasen Automatic Teller Machine
"
- dat += "For all your monetary needs!
"
- dat += "Welcome, [user_id.registered_name]. "
- dat += "You have $[user_id.money] in your account. "
- dat += "Withdraw "
- user << browse(dat,"window=atm")
+ //js replicated from obj/machinery/computer/card
+ var/dat = "
NanoTrasen Automatic Teller Machine
"
+ dat += "For all your monetary needs! "
+ dat += "This terminal is [machine_id]. Report this code when contacting NanoTrasen IT Support "
+ dat += "Card: [held_card ? held_card.name : "------"]
"
+
+ if(ticks_left_locked_down > 0)
+ dat += "Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."
+ else if(authenticated_account)
+ switch(view_screen)
+ if(CHANGE_SECURITY_LEVEL)
+ dat += "Select a new security level for this account: "
+ 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 = "[text]"
+ dat += "[text]"
+ text = "One - Both an account number and pin is required to access this account and process transactions."
+ if(authenticated_account.security_level != 1)
+ text = "[text]"
+ dat += "[text]"
+ 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 = "[text]"
+ dat += "[text] "
+ dat += "Back"
+ if(VIEW_TRANSACTION_LOGS)
+ dat += "Transaction logs "
+ dat += "Back"
+ dat += "
"
+ dat += "
"
+ dat += "
Date
"
+ dat += "
Time
"
+ dat += "
Target
"
+ dat += "
Purpose
"
+ dat += "
Value
"
+ dat += "
Source terminal ID
"
+ dat += "
"
+ for(var/datum/transaction/T in authenticated_account.transaction_log)
+ dat += "
"
+ dat += "
[T.date]
"
+ dat += "
[T.time]
"
+ dat += "
[T.target_name]
"
+ dat += "
[T.purpose]
"
+ dat += "
$[T.amount]
"
+ dat += "
[T.source_terminal]
"
+ dat += "
"
+ dat += "
"
+ if(TRANSFER_FUNDS)
+ dat += "Account balance: $[authenticated_account.money] "
+ dat += "Back
"
+ dat += ""
+ else
+ dat += "Welcome, [authenticated_account.owner_name]. "
+ dat += "Account balance: $[authenticated_account.money]"
+ dat += ""
+ dat += "Change account security level "
+ dat += "Make transfer "
+ dat += "View transaction log "
+ dat += "Print balance statement "
+ dat += "Logout "
+ else if(linked_db)
+ dat += ""
+ else
+ dat += "Unable to connect to accounts database, please retry and if the issue persists contact NanoTrasen IT support."
+ 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! Back","window=atm")
+ 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]Funds transfer successful."
+ 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]Funds transfer failed."
+
+ else
+ usr << "\icon[src]You don't have enough funds to do that!"
+ 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]You don't have enough funds to do that!"
+ 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 = "NT Automated Teller Account Statement
"
+ R.info += "Service terminal ID: [machine_id] "
+
+ //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 += "This paper has been stamped by the Automatic Teller Machine."
+
+ 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
+ usr << browse(null,"window=atm")
return
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)
diff --git a/code/WorkInProgress/Sigyn/Department Sec/__README.dm b/code/WorkInProgress/Sigyn/Department Sec/__README.dm
new file mode 100644
index 00000000000..e6b3f7967fd
--- /dev/null
+++ b/code/WorkInProgress/Sigyn/Department Sec/__README.dm
@@ -0,0 +1,8 @@
+/*
+
+Hey you!
+You only need to untick maps/tgstation.2.0.9.dmm for this if you download the modified map from:
+http://tgstation13.googlecode.com/files/tgstation.2.1.0_deptsec.zip
+
+Everything else can just be ticked on top of the original stuff.
+*/
\ No newline at end of file
diff --git a/code/WorkInProgress/Sigyn/Department Sec/jobs.dm b/code/WorkInProgress/Sigyn/Department Sec/jobs.dm
new file mode 100644
index 00000000000..66e14b040c3
--- /dev/null
+++ b/code/WorkInProgress/Sigyn/Department Sec/jobs.dm
@@ -0,0 +1,126 @@
+var/list/sec_departments = list("engineering", "supply", "medical", "science")
+
+proc/assign_sec_to_department(var/mob/living/carbon/human/H)
+ if(sec_departments.len)
+ var/department = pick(sec_departments)
+ sec_departments -= department
+ var/access = null
+ var/destination = null
+ switch(department)
+ if("supply")
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/cargo(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/supply(H), slot_ears)
+ access = list(access_mailsorting, access_mining)
+ destination = /area/security/checkpoint/supply
+ if("engineering")
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/engine(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/engi(H), slot_ears)
+ access = list(access_construction, access_engine)
+ destination = /area/security/checkpoint/engineering
+ if("medical")
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/med(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/med(H), slot_ears)
+ access = list(access_medical)
+ destination = /area/security/checkpoint/medical
+ if("science")
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/science(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/sci(H), slot_ears)
+ access = list(access_research)
+ destination = /area/security/checkpoint/science
+ else
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
+
+
+ if(destination)
+ var/teleport = 0
+ if(!ticker || ticker.current_state <= GAME_STATE_SETTING_UP)
+ teleport = 1
+ spawn(15)
+ if(H)
+ if(teleport)
+ var/turf/T
+ var/safety = 0
+ while(safety < 25)
+ T = pick(get_area_turfs(destination))
+ if(!H.Move(T))
+ safety += 1
+ continue
+ else
+ break
+ H << "You have been assigned to [department]!"
+ if(locate(/obj/item/weapon/card/id, H))
+ var/obj/item/weapon/card/id/I = locate(/obj/item/weapon/card/id, H)
+ if(I)
+ I.access |= access
+
+
+/datum/job/officer
+ title = "Security Officer"
+ flag = OFFICER
+ department_flag = ENGSEC
+ faction = "Station"
+ total_positions = 5
+ spawn_positions = 5
+ supervisors = "the head of security, and the head of your assigned department (if applicable)"
+ selection_color = "#ffeeee"
+
+
+ equip(var/mob/living/carbon/human/H)
+ if(!H) return 0
+ if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
+ if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
+ assign_sec_to_department(H)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/device/pda/security(H), slot_belt)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(H), slot_wear_suit)
+ H.equip_to_slot_or_del(new /obj/item/clothing/head/helmet(H), slot_head)
+ H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_s_store)
+ H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
+ if(H.backbag == 1)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
+ H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand)
+ else
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
+ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
+ L.imp_in = H
+ L.implanted = 1
+ return 1
+
+/obj/item/device/radio/headset/headset_sec/department/New()
+ if(radio_controller)
+ initialize()
+ recalculateChannels()
+
+/obj/item/device/radio/headset/headset_sec/department/engi
+ keyslot1 = new /obj/item/device/encryptionkey/headset_sec
+ keyslot2 = new /obj/item/device/encryptionkey/headset_eng
+
+/obj/item/device/radio/headset/headset_sec/department/supply
+ keyslot1 = new /obj/item/device/encryptionkey/headset_sec
+ keyslot2 = new /obj/item/device/encryptionkey/headset_cargo
+
+/obj/item/device/radio/headset/headset_sec/department/med
+ keyslot1 = new /obj/item/device/encryptionkey/headset_sec
+ keyslot2 = new /obj/item/device/encryptionkey/headset_med
+
+/obj/item/device/radio/headset/headset_sec/department/sci
+ keyslot1 = new /obj/item/device/encryptionkey/headset_sec
+ keyslot2 = new /obj/item/device/encryptionkey/headset_sci
+
+/obj/item/clothing/under/rank/security/cargo/New()
+ var/obj/item/clothing/tie/armband/cargo/A = new /obj/item/clothing/tie/armband/cargo
+ hastie = A
+
+/obj/item/clothing/under/rank/security/engine/New()
+ var/obj/item/clothing/tie/armband/engine/A = new /obj/item/clothing/tie/armband/engine
+ hastie = A
+
+/obj/item/clothing/under/rank/security/science/New()
+ var/obj/item/clothing/tie/armband/science/A = new /obj/item/clothing/tie/armband/science
+ hastie = A
+
+/obj/item/clothing/under/rank/security/med/New()
+ var/obj/item/clothing/tie/armband/medgreen/A = new /obj/item/clothing/tie/armband/medgreen
+ hastie = A
\ No newline at end of file
diff --git a/code/WorkInProgress/Sigyn/Softcurity/__README.dm b/code/WorkInProgress/Sigyn/Softcurity/__README.dm
new file mode 100644
index 00000000000..75c62c277d5
--- /dev/null
+++ b/code/WorkInProgress/Sigyn/Softcurity/__README.dm
@@ -0,0 +1,10 @@
+/*
+
+Hey you!
+You'll need to untick code/game/jobs/access.dm for this to all work correctly!
+
+Everything else can just be ticked on top of the original stuff.
+
+You'll also need to download a modified map from http://tgstation13.googlecode.com/files/tgstation.2.0.9_Softcurity.zip.
+Make sure to untick the original map!
+*/
\ No newline at end of file
diff --git a/code/WorkInProgress/Sigyn/Softcurity/access.dm b/code/WorkInProgress/Sigyn/Softcurity/access.dm
new file mode 100644
index 00000000000..d0dace17bf7
--- /dev/null
+++ b/code/WorkInProgress/Sigyn/Softcurity/access.dm
@@ -0,0 +1,522 @@
+//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
+
+/var/const/access_security = 1 // Security equipment
+/var/const/access_brig = 2 // Brig timers and permabrig
+/var/const/access_armory = 3
+/var/const/access_forensics_lockers= 4
+/var/const/access_medical = 5
+/var/const/access_morgue = 6
+/var/const/access_tox = 7
+/var/const/access_tox_storage = 8
+/var/const/access_genetics = 9
+/var/const/access_engine = 10
+/var/const/access_engine_equip= 11
+/var/const/access_maint_tunnels = 12
+/var/const/access_external_airlocks = 13
+/var/const/access_emergency_storage = 14
+/var/const/access_change_ids = 15
+/var/const/access_ai_upload = 16
+/var/const/access_teleporter = 17
+/var/const/access_eva = 18
+/var/const/access_heads = 19
+/var/const/access_captain = 20
+/var/const/access_all_personal_lockers = 21
+/var/const/access_chapel_office = 22
+/var/const/access_tech_storage = 23
+/var/const/access_atmospherics = 24
+/var/const/access_bar = 25
+/var/const/access_janitor = 26
+/var/const/access_crematorium = 27
+/var/const/access_kitchen = 28
+/var/const/access_robotics = 29
+/var/const/access_rd = 30
+/var/const/access_cargo = 31
+/var/const/access_construction = 32
+/var/const/access_chemistry = 33
+/var/const/access_cargo_bot = 34
+/var/const/access_hydroponics = 35
+/var/const/access_manufacturing = 36
+/var/const/access_library = 37
+/var/const/access_lawyer = 38
+/var/const/access_virology = 39
+/var/const/access_cmo = 40
+/var/const/access_qm = 41
+/var/const/access_court = 42
+/var/const/access_clown = 43
+/var/const/access_mime = 44
+/var/const/access_surgery = 45
+/var/const/access_theatre = 46
+/var/const/access_research = 47
+/var/const/access_mining = 48
+/var/const/access_mining_office = 49 //not in use
+/var/const/access_mailsorting = 50
+/var/const/access_mint = 51
+/var/const/access_mint_vault = 52
+/var/const/access_heads_vault = 53
+/var/const/access_mining_station = 54
+/var/const/access_xenobiology = 55
+/var/const/access_ce = 56
+/var/const/access_hop = 57
+/var/const/access_hos = 58
+/var/const/access_RC_announce = 59 //Request console announcements
+/var/const/access_keycard_auth = 60 //Used for events which require at least two people to confirm them
+/var/const/access_tcomsat = 61 // has access to the entire telecomms satellite / machinery
+/var/const/access_gateway = 62
+/var/const/access_sec_doors = 63 // Security front doors
+
+ //BEGIN CENTCOM ACCESS
+ /*Should leave plenty of room if we need to add more access levels.
+/var/const/Mostly for admin fun times.*/
+/var/const/access_cent_general = 101//General facilities.
+/var/const/access_cent_thunder = 102//Thunderdome.
+/var/const/access_cent_specops = 103//Special Ops.
+/var/const/access_cent_medical = 104//Medical/Research
+/var/const/access_cent_living = 105//Living quarters.
+/var/const/access_cent_storage = 106//Generic storage areas.
+/var/const/access_cent_teleporter = 107//Teleporter.
+/var/const/access_cent_creed = 108//Creed's office.
+/var/const/access_cent_captain = 109//Captain's office/ID comp/AI.
+
+ //The Syndicate
+/var/const/access_syndicate = 150//General Syndicate Access
+
+ //MONEY
+/var/const/access_crate_cash = 200
+
+/obj/var/list/req_access = null
+/obj/var/req_access_txt = "0"
+/obj/var/list/req_one_access = null
+/obj/var/req_one_access_txt = "0"
+
+/obj/New()
+ ..()
+ //NOTE: If a room requires more than one access (IE: Morgue + medbay) set the req_acesss_txt to "5;6" if it requires 5 and 6
+ if(src.req_access_txt)
+ var/list/req_access_str = text2list(req_access_txt,";")
+ if(!req_access)
+ req_access = list()
+ for(var/x in req_access_str)
+ var/n = text2num(x)
+ if(n)
+ req_access += n
+
+ if(src.req_one_access_txt)
+ var/list/req_one_access_str = text2list(req_one_access_txt,";")
+ if(!req_one_access)
+ req_one_access = list()
+ for(var/x in req_one_access_str)
+ var/n = text2num(x)
+ if(n)
+ req_one_access += n
+
+
+
+//returns 1 if this mob has sufficient access to use this object
+/obj/proc/allowed(mob/M)
+ //check if it doesn't require any access at all
+ if(src.check_access(null))
+ return 1
+ if(istype(M, /mob/living/silicon))
+ //AI can do whatever he wants
+ return 1
+ else if(istype(M, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = M
+ //if they are holding or wearing a card that has access, that works
+ if(src.check_access(H.get_active_hand()) || src.check_access(H.wear_id))
+ return 1
+ else if(istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/alien/humanoid))
+ var/mob/living/carbon/george = M
+ //they can only hold things :(
+ if(george.get_active_hand() && (istype(george.get_active_hand(), /obj/item/weapon/card/id) || istype(george.get_active_hand(), /obj/item/device/pda)) && src.check_access(george.get_active_hand()))
+ return 1
+ return 0
+
+/obj/item/proc/GetAccess()
+ return list()
+
+/obj/item/proc/GetID()
+ return null
+
+/obj/proc/check_access(obj/item/weapon/card/id/I)
+
+ if (istype(I, /obj/item/device/pda))
+ var/obj/item/device/pda/pda = I
+ I = pda.id
+
+ if(!src.req_access && !src.req_one_access) //no requirements
+ return 1
+ if(!istype(src.req_access, /list)) //something's very wrong
+ return 1
+
+ var/list/L = src.req_access
+ if(!L.len && (!src.req_one_access || !src.req_one_access.len)) //no requirements
+ return 1
+ if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access
+ return 0
+ for(var/req in src.req_access)
+ if(!(req in I.access)) //doesn't have this access
+ return 0
+ if(src.req_one_access && src.req_one_access.len)
+ for(var/req in src.req_one_access)
+ if(req in I.access) //has an access from the single access list
+ return 1
+ return 0
+ return 1
+
+
+/obj/proc/check_access_list(var/list/L)
+ if(!src.req_access && !src.req_one_access) return 1
+ if(!istype(src.req_access, /list)) return 1
+ if(!src.req_access.len && (!src.req_one_access || !src.req_one_access.len)) return 1
+ if(!L) return 0
+ if(!istype(L, /list)) return 0
+ for(var/req in src.req_access)
+ if(!(req in L)) //doesn't have this access
+ return 0
+ if(src.req_one_access && src.req_one_access.len)
+ for(var/req in src.req_one_access)
+ if(req in L) //has an access from the single access list
+ return 1
+ return 0
+ return 1
+
+
+/proc/get_access(job)
+ switch(job)
+ if("Geneticist")
+ return list(access_medical, access_morgue, access_genetics)
+ if("Station Engineer")
+ return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
+ if("Assistant")
+ if(config.assistant_maint)
+ return list(access_maint_tunnels)
+ else
+ return list()
+ if("Chaplain")
+ return list(access_morgue, access_chapel_office, access_crematorium)
+ if("Detective")
+ return list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
+ if("Medical Doctor")
+ return list(access_medical, access_morgue, access_surgery)
+ if("Botanist") // -- TLE
+ return 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.
+ if("Librarian") // -- TLE
+ return list(access_library)
+ if("Lawyer") //Muskets 160910
+ return list(access_lawyer, access_court, access_sec_doors)
+ if("Captain")
+ return get_all_accesses()
+ if("Crew Supervisor")
+ return list(access_security, access_sec_doors, access_brig, access_court)
+ if("Correctional Advisor")
+ return list(access_security, access_sec_doors, access_brig, access_armory, access_court)
+ if("Scientist")
+ return list(access_tox, access_tox_storage, access_research, access_xenobiology)
+ if("Safety Administrator")
+ return list(access_medical, access_morgue, access_tox, access_tox_storage, access_chemistry, access_genetics, access_court,
+ access_teleporter, access_heads, access_tech_storage, access_security, access_sec_doors, access_brig, access_atmospherics,
+ access_maint_tunnels, access_bar, access_janitor, access_kitchen, access_robotics, access_armory, access_hydroponics,
+ access_theatre, access_research, access_hos, access_RC_announce, access_forensics_lockers, access_keycard_auth, access_gateway)
+ if("Head of Personnel")
+ return list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
+ access_tox, access_tox_storage, access_chemistry, access_medical, access_genetics, access_engine,
+ access_emergency_storage, access_change_ids, access_ai_upload, access_eva, access_heads,
+ access_all_personal_lockers, access_tech_storage, access_maint_tunnels, access_bar, access_janitor,
+ access_crematorium, access_kitchen, access_robotics, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
+ access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
+ access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
+ if("Atmospheric Technician")
+ return list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
+ if("Bartender")
+ return list(access_bar)
+ if("Chemist")
+ return list(access_medical, access_chemistry)
+ if("Janitor")
+ return list(access_janitor, access_maint_tunnels)
+ if("Clown")
+ return list(access_clown, access_theatre)
+ if("Mime")
+ return list(access_mime, access_theatre)
+ if("Chef")
+ return list(access_kitchen, access_morgue)
+ if("Roboticist")
+ return list(access_robotics, access_tech_storage, access_morgue) //As a job that handles so many corpses, it makes sense for them to have morgue access.
+ if("Cargo Technician")
+ return list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
+ if("Shaft Miner")
+ return list(access_mining, access_mint, access_mining_station)
+ if("Quartermaster")
+ return list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
+ if("Chief Engineer")
+ return 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_ai_upload, access_construction, access_robotics,
+ access_mint, access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_sec_doors)
+ if("Research Director")
+ return list(access_rd, access_heads, access_tox, access_genetics,
+ access_tox_storage, access_teleporter,
+ access_research, access_robotics, access_xenobiology,
+ access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_sec_doors)
+ if("Virologist")
+ return list(access_medical, access_virology)
+ if("Chief Medical Officer")
+ return list(access_medical, access_morgue, access_genetics, access_heads,
+ access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
+ access_keycard_auth, access_sec_doors)
+ else
+ return list()
+
+/proc/get_centcom_access(job)
+ switch(job)
+ if("VIP Guest")
+ return list(access_cent_general)
+ if("Custodian")
+ return list(access_cent_general, access_cent_living, access_cent_storage)
+ if("Thunderdome Overseer")
+ return list(access_cent_general, access_cent_thunder)
+ if("Intel Officer")
+ return list(access_cent_general, access_cent_living)
+ if("Medical Officer")
+ return list(access_cent_general, access_cent_living, access_cent_medical)
+ if("Death Commando")
+ return list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage)
+ if("Research Officer")
+ return list(access_cent_general, access_cent_specops, access_cent_medical, access_cent_teleporter, access_cent_storage)
+ if("BlackOps Commander")
+ return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_living, access_cent_storage, access_cent_creed)
+ if("Supreme Commander")
+ return get_all_centcom_access()
+
+/proc/get_all_accesses()
+ return list(access_security, access_sec_doors, access_brig, access_armory, access_forensics_lockers, access_court,
+ access_medical, access_genetics, access_morgue, access_rd,
+ access_tox, access_tox_storage, access_chemistry, access_engine, access_engine_equip, access_maint_tunnels,
+ access_external_airlocks, access_emergency_storage, access_change_ids, access_ai_upload,
+ access_teleporter, access_eva, access_heads, access_captain, access_all_personal_lockers,
+ access_tech_storage, access_chapel_office, access_atmospherics, access_kitchen,
+ access_bar, access_janitor, access_crematorium, access_robotics, access_cargo, access_cargo_bot, access_construction,
+ access_hydroponics, access_library, access_manufacturing, access_lawyer, access_virology, access_cmo, access_qm, access_clown, access_mime, access_surgery,
+ access_theatre, access_research, access_mining, access_mailsorting, access_mint_vault, access_mint,
+ access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce,
+ access_keycard_auth, access_tcomsat, access_gateway)
+
+/proc/get_all_centcom_access()
+ return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_medical, access_cent_living, access_cent_storage, access_cent_teleporter, access_cent_creed, access_cent_captain)
+
+/proc/get_all_syndicate_access()
+ return list(access_syndicate)
+
+/proc/get_region_accesses(var/code)
+ switch(code)
+ if(0)
+ return get_all_accesses()
+ if(1) //security
+ return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
+ if(2) //medbay
+ return list(access_medical, access_genetics, access_morgue, access_chemistry, access_virology, access_surgery, access_cmo)
+ if(3) //research
+ return list(access_research, access_tox, access_tox_storage, access_xenobiology, access_rd)
+ if(4) //engineering and maintenance
+ return list(access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_construction, access_robotics, access_ce)
+ if(5) //command
+ return list(access_heads, access_change_ids, access_ai_upload, access_teleporter, access_eva, access_all_personal_lockers, access_heads_vault, access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_hop, access_captain)
+ if(6) //station general
+ return list(access_kitchen,access_bar, access_hydroponics, access_janitor, access_chapel_office, access_crematorium, access_library, access_theatre, access_lawyer, access_clown, access_mime)
+ if(7) //supply
+ return list(access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_mining, access_mining_station)
+
+/proc/get_region_accesses_name(var/code)
+ switch(code)
+ if(0)
+ return "All"
+ if(1) //security
+ return "Security"
+ if(2) //medbay
+ return "Medbay"
+ if(3) //research
+ return "Research"
+ if(4) //engineering and maintenance
+ return "Engineering"
+ if(5) //command
+ return "Command"
+ if(6) //station general
+ return "Station General"
+ if(7) //supply
+ return "Supply"
+
+
+/proc/get_access_desc(A)
+ switch(A)
+ if(access_cargo)
+ return "Cargo Bay"
+ if(access_cargo_bot)
+ return "Cargo Bot Delivery"
+ if(access_security)
+ return "Security"
+ if(access_brig)
+ return "Holding Cells"
+ if(access_court)
+ return "Courtroom"
+ if(access_forensics_lockers)
+ return "Detective's Office"
+ if(access_medical)
+ return "Medical"
+ if(access_genetics)
+ return "Genetics Lab"
+ if(access_morgue)
+ return "Morgue"
+ if(access_tox)
+ return "Research Lab"
+ if(access_tox_storage)
+ return "Toxins Storage"
+ if(access_chemistry)
+ return "Chemistry Lab"
+ if(access_rd)
+ return "RD Private"
+ if(access_bar)
+ return "Bar"
+ if(access_janitor)
+ return "Custodial Closet"
+ if(access_engine)
+ return "Engineering"
+ if(access_engine_equip)
+ return "APCs"
+ if(access_maint_tunnels)
+ return "Maintenance"
+ if(access_external_airlocks)
+ return "External Airlocks"
+ if(access_emergency_storage)
+ return "Emergency Storage"
+ if(access_change_ids)
+ return "ID Computer"
+ if(access_ai_upload)
+ return "AI Upload"
+ if(access_teleporter)
+ return "Teleporter"
+ if(access_eva)
+ return "EVA"
+ if(access_heads)
+ return "Bridge"
+ if(access_captain)
+ return "Captain Private"
+ if(access_all_personal_lockers)
+ return "Personal Lockers"
+ if(access_chapel_office)
+ return "Chapel Office"
+ if(access_tech_storage)
+ return "Technical Storage"
+ if(access_atmospherics)
+ return "Atmospherics"
+ if(access_crematorium)
+ return "Crematorium"
+ if(access_armory)
+ return "Armory"
+ if(access_construction)
+ return "Construction Areas"
+ if(access_kitchen)
+ return "Kitchen"
+ if(access_hydroponics)
+ return "Hydroponics"
+ if(access_library)
+ return "Library"
+ if(access_lawyer)
+ return "Law Office"
+ if(access_robotics)
+ return "Robotics"
+ if(access_virology)
+ return "Virology"
+ if(access_cmo)
+ return "CMO Private"
+ if(access_qm)
+ return "Quartermaster's Office"
+ if(access_clown)
+ return "HONK! Access"
+ if(access_mime)
+ return "Silent Access"
+ if(access_surgery)
+ return "Surgery"
+ if(access_theatre)
+ return "Theatre"
+ if(access_manufacturing)
+ return "Manufacturing"
+ if(access_research)
+ return "Science"
+ if(access_mining)
+ return "Mining"
+ if(access_mining_office)
+ return "Mining Office"
+ if(access_mailsorting)
+ return "Delivery Office"
+ if(access_mint)
+ return "Mint"
+ if(access_mint_vault)
+ return "Mint Vault"
+ if(access_heads_vault)
+ return "Main Vault"
+ if(access_mining_station)
+ return "Mining Station EVA"
+ if(access_xenobiology)
+ return "Xenobiology Lab"
+ if(access_hop)
+ return "HoP Private"
+ if(access_hos)
+ return "HoS Private"
+ if(access_ce)
+ return "CE Private"
+ if(access_RC_announce)
+ return "RC Announcements"
+ if(access_keycard_auth)
+ return "Keycode Auth. Device"
+ if(access_tcomsat)
+ return "Telecommunications"
+ if(access_gateway)
+ return "Gateway"
+ if(access_sec_doors)
+ return "Brig"
+
+/proc/get_centcom_access_desc(A)
+ switch(A)
+ if(access_cent_general)
+ return "Code Grey"
+ if(access_cent_thunder)
+ return "Code Yellow"
+ if(access_cent_storage)
+ return "Code Orange"
+ if(access_cent_living)
+ return "Code Green"
+ if(access_cent_medical)
+ return "Code White"
+ if(access_cent_teleporter)
+ return "Code Blue"
+ if(access_cent_specops)
+ return "Code Black"
+ if(access_cent_creed)
+ return "Code Silver"
+ if(access_cent_captain)
+ return "Code Gold"
+
+/proc/get_all_jobs()
+ return list("Assistant", "Captain", "Head of Personnel", "Bartender", "Chef", "Botanist", "Quartermaster", "Cargo Technician",
+ "Shaft Miner", "Clown", "Mime", "Janitor", "Librarian", "Lawyer", "Chaplain", "Chief Engineer", "Station Engineer",
+ "Atmospheric Technician", "Roboticist", "Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist",
+ "Research Director", "Scientist", "Head of Security", "Warden", "Detective", "Security Officer")
+
+/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()
+ if (!istype(src, /obj/item/device/pda) && !istype(src,/obj/item/weapon/card/id))
+ return
+
+ var/jobName
+
+ if(istype(src, /obj/item/device/pda))
+ if(src:id)
+ jobName = src:id:assignment
+ if(istype(src, /obj/item/weapon/card/id))
+ jobName = src:assignment
+
+ if(jobName in get_all_jobs())
+ return jobName
+ else
+ return "Unknown"
diff --git a/code/WorkInProgress/Sigyn/Softcurity/clothing.dm b/code/WorkInProgress/Sigyn/Softcurity/clothing.dm
new file mode 100644
index 00000000000..057c10cb575
--- /dev/null
+++ b/code/WorkInProgress/Sigyn/Softcurity/clothing.dm
@@ -0,0 +1,33 @@
+/obj/item/clothing/under/rank/administrator
+ name = "safety administrator's jumpsuit"
+ desc = "It's a jumpsuit worn by those few with the dedication to achieve the position of \"Safety Administrator\"."
+ icon_state = "hosblueclothes"
+ item_state = "ba_suit"
+ color = "hosblueclothes"
+ armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
+ flags = FPRINT | TABLEPASS | ONESIZEFITSALL
+
+/obj/item/clothing/under/rank/advisor
+ name = "correctional advisor's jumpsuit"
+ desc = "It's made of a slightly sturdier material than standard jumpsuits, to allow for more robust protection. It has the words \"Correctional Advisor\" written on the shoulders."
+ icon_state = "wardenblueclothes"
+ item_state = "ba_suit"
+ color = "wardenblueclothes"
+ armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
+ flags = FPRINT | TABLEPASS | ONESIZEFITSALL
+
+/obj/item/clothing/under/rank/supervisor
+ name = "crew supervisor's jumpsuit"
+ desc = "It's made of a slightly sturdier material than standard jumpsuits, to allow for robust protection."
+ icon_state = "officerblueclothes"
+ item_state = "ba_suit"
+ color = "officerblueclothes"
+ armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
+ flags = FPRINT | TABLEPASS | ONESIZEFITSALL
+
+/obj/item/clothing/shoes/boots
+ name = "boots"
+ desc = "Nanotrasen-issue hard-toe safety boots."
+ icon_state = "secshoes"
+ item_state = "secshoes"
+ color = "hosred"
\ No newline at end of file
diff --git a/code/WorkInProgress/Sigyn/Softcurity/jobs.dm b/code/WorkInProgress/Sigyn/Softcurity/jobs.dm
new file mode 100644
index 00000000000..a214626d1c6
--- /dev/null
+++ b/code/WorkInProgress/Sigyn/Softcurity/jobs.dm
@@ -0,0 +1,152 @@
+/datum/job/hos
+ title = "Safety Administrator"
+ flag = HOS
+ department_flag = ENGSEC
+ faction = "Station"
+ total_positions = 1
+ spawn_positions = 1
+ supervisors = "the captain"
+ selection_color = "#ffdddd"
+ idtype = /obj/item/weapon/card/id/silver
+ req_admin_notify = 1
+
+
+ equip(var/mob/living/carbon/human/H)
+ if(!H) return 0
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
+ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hos(H), slot_ears)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/administrator(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hos(H), slot_belt)
+ H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(H), slot_wear_suit)
+ H.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/taser(H), slot_s_store)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
+ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
+ L.imp_in = H
+ L.implanted = 1
+ return 1
+
+
+
+/datum/job/warden
+ title = "Correctional Advisor"
+ flag = WARDEN
+ department_flag = ENGSEC
+ faction = "Station"
+ total_positions = 1
+ spawn_positions = 1
+ supervisors = "the safety administrator"
+ selection_color = "#ffeeee"
+
+
+ equip(var/mob/living/carbon/human/H)
+ if(!H) return 0
+ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/advisor(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/device/pda/warden(H), slot_belt)
+ H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
+ H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
+ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
+ L.imp_in = H
+ L.implanted = 1
+ return 1
+
+
+
+/datum/job/detective
+ title = "Detective"
+ flag = DETECTIVE
+ department_flag = ENGSEC
+ faction = "Station"
+ total_positions = 1
+ spawn_positions = 1
+ supervisors = "the safety administrator"
+ selection_color = "#ffeeee"
+
+
+ equip(var/mob/living/carbon/human/H)
+ if(!H) return 0
+ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/det(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/device/pda/detective(H), slot_belt)
+ H.equip_to_slot_or_del(new /obj/item/clothing/head/det_hat(H), slot_head)
+ var/obj/item/clothing/mask/cigarette/CIG = new /obj/item/clothing/mask/cigarette(H)
+ CIG.light("")
+ H.equip_to_slot_or_del(CIG, slot_wear_mask)
+ H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/det_suit(H), slot_wear_suit)
+ H.equip_to_slot_or_del(new /obj/item/weapon/lighter/zippo(H), slot_l_store)
+
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack)
+
+ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
+ L.imp_in = H
+ L.implanted = 1
+ return 1
+
+
+
+/datum/job/officer
+ title = "Crew Supervisor"
+ flag = OFFICER
+ department_flag = ENGSEC
+ faction = "Station"
+ total_positions = 5
+ spawn_positions = 5
+ supervisors = "the safety administrator"
+ selection_color = "#ffeeee"
+
+
+ equip(var/mob/living/carbon/human/H)
+ if(!H) return 0
+ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/supervisor(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/device/pda/security(H), slot_belt)
+ H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_r_store)
+ H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
+ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
+ L.imp_in = H
+ L.implanted = 1
+ return 1
+
+/datum/job/hop
+ title = "Head of Personnel"
+ flag = HOP
+ department_flag = CIVILIAN
+ faction = "Station"
+ total_positions = 1
+ spawn_positions = 1
+ supervisors = "the captain"
+ selection_color = "#ddddff"
+ idtype = /obj/item/weapon/card/id/silver
+ req_admin_notify = 1
+
+
+ equip(var/mob/living/carbon/human/H)
+ if(!H) return 0
+ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_ears)
+ if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
+ if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hop(H), slot_belt)
+ if(H.backbag == 1)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/id_kit(H), slot_r_hand)
+ else
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/id_kit(H.back), slot_in_backpack)
+ return 1
diff --git a/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm b/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm
new file mode 100644
index 00000000000..88f06f98e7c
--- /dev/null
+++ b/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm
@@ -0,0 +1,235 @@
+/obj/structure/closet/secure_closet/captains
+ name = "Captain's Locker"
+ req_access = list(access_captain)
+ icon_state = "capsecure1"
+ icon_closed = "capsecure"
+ icon_locked = "capsecure1"
+ icon_opened = "capsecureopen"
+ icon_broken = "capsecurebroken"
+ icon_off = "capsecureoff"
+
+ New()
+ sleep(2)
+ if(prob(50))
+ new /obj/item/weapon/storage/backpack/captain(src)
+ else
+ new /obj/item/weapon/storage/backpack/satchel_cap(src)
+ new /obj/item/clothing/suit/captunic(src)
+ new /obj/item/clothing/head/helmet/cap(src)
+ new /obj/item/clothing/under/rank/captain(src)
+ new /obj/item/clothing/suit/armor/vest(src)
+ new /obj/item/weapon/cartridge/captain(src)
+ new /obj/item/clothing/head/helmet/swat(src)
+ new /obj/item/clothing/shoes/brown(src)
+ new /obj/item/device/radio/headset/heads/captain(src)
+ new /obj/item/weapon/reagent_containers/food/drinks/flask(src)
+ new /obj/item/clothing/gloves/captain(src)
+ new /obj/item/weapon/gun/energy/gun(src)
+ return
+
+
+
+/obj/structure/closet/secure_closet/hop
+ name = "Head of Personnel's Locker"
+ req_access = list(access_hop)
+ icon_state = "hopsecure1"
+ icon_closed = "hopsecure"
+ icon_locked = "hopsecure1"
+ icon_opened = "hopsecureopen"
+ icon_broken = "hopsecurebroken"
+ icon_off = "hopsecureoff"
+
+ New()
+ sleep(2)
+ new /obj/item/clothing/under/rank/head_of_personnel(src)
+ new /obj/item/clothing/suit/armor/vest(src)
+ new /obj/item/clothing/head/helmet(src)
+ new /obj/item/weapon/cartridge/hop(src)
+ new /obj/item/device/radio/headset/heads/hop(src)
+ new /obj/item/clothing/shoes/brown(src)
+ new /obj/item/weapon/storage/id_kit(src)
+ new /obj/item/weapon/storage/id_kit( src )
+ new /obj/item/device/flash(src)
+ new /obj/item/clothing/glasses/sunglasses(src)
+ return
+
+
+
+/obj/structure/closet/secure_closet/hos
+ name = "Safety Administrator's Locker"
+ req_access = list(access_hos)
+ icon_state = "hossecure1"
+ icon_closed = "hossecure"
+ icon_locked = "hossecure1"
+ icon_opened = "hossecureopen"
+ icon_broken = "hossecurebroken"
+ icon_off = "hossecureoff"
+
+ New()
+ sleep(2)
+ new /obj/item/weapon/storage/backpack/satchel_sec(src)
+ new /obj/item/weapon/cartridge/hos(src)
+ new /obj/item/device/radio/headset/heads/hos(src)
+ new /obj/item/weapon/storage/lockbox/loyalty(src)
+ new /obj/item/weapon/storage/flashbang_kit(src)
+ new /obj/item/weapon/storage/belt/security(src)
+ new /obj/item/device/flash(src)
+ new /obj/item/weapon/melee/baton(src)
+ new /obj/item/weapon/gun/energy/taser(src)
+ new /obj/item/weapon/reagent_containers/spray/pepper(src)
+ return
+
+
+
+/obj/structure/closet/secure_closet/warden
+ name = "Correctional Advisor's Locker"
+ req_access = list(access_armory)
+ icon_state = "wardensecure1"
+ icon_closed = "wardensecure"
+ icon_locked = "wardensecure1"
+ icon_opened = "wardensecureopen"
+ icon_broken = "wardensecurebroken"
+ icon_off = "wardensecureoff"
+
+
+ New()
+ sleep(2)
+ new /obj/item/weapon/storage/backpack/satchel_sec(src)
+ new /obj/item/clothing/under/rank/advisor(src)
+ new /obj/item/device/radio/headset/headset_sec(src)
+ new /obj/item/clothing/glasses/sunglasses(src)
+ new /obj/item/weapon/storage/flashbang_kit(src)
+ new /obj/item/weapon/storage/belt/security(src)
+ new /obj/item/weapon/reagent_containers/spray/pepper(src)
+ new /obj/item/weapon/reagent_containers/spray/pepper(src)
+ new /obj/item/weapon/melee/baton(src)
+ return
+
+
+
+/obj/structure/closet/secure_closet/security
+ name = "Crew Supervisor's Locker"
+ req_access = list(access_security)
+ icon_state = "sec1"
+ icon_closed = "sec"
+ icon_locked = "sec1"
+ icon_opened = "secopen"
+ icon_broken = "secbroken"
+ icon_off = "secoff"
+
+ New()
+ sleep(2)
+ new /obj/item/weapon/storage/backpack/satchel_sec(src)
+ new /obj/item/device/radio/headset/headset_sec(src)
+ new /obj/item/weapon/storage/belt/security(src)
+ new /obj/item/device/flash(src)
+ new /obj/item/weapon/reagent_containers/spray/pepper(src)
+ new /obj/item/weapon/reagent_containers/spray/pepper(src)
+ new /obj/item/clothing/glasses/sunglasses(src)
+ return
+
+
+
+/obj/structure/closet/secure_closet/detective
+ name = "Detective's Cabinet"
+ req_access = list(access_forensics_lockers)
+ icon_state = "cabinetdetective_locked"
+ icon_closed = "cabinetdetective"
+ icon_locked = "cabinetdetective_locked"
+ icon_opened = "cabinetdetective_open"
+ icon_broken = "cabinetdetective_broken"
+ icon_off = "cabinetdetective_broken"
+
+ New()
+ sleep(2)
+ new /obj/item/clothing/under/det(src)
+ new /obj/item/clothing/suit/armor/det_suit(src)
+ new /obj/item/clothing/suit/det_suit(src)
+ new /obj/item/clothing/gloves/black(src)
+ new /obj/item/clothing/head/det_hat(src)
+ new /obj/item/clothing/shoes/brown(src)
+ new /obj/item/device/radio/headset/headset_sec(src)
+ new /obj/item/weapon/cartridge/detective(src)
+ new /obj/item/weapon/clipboard(src)
+ new /obj/item/device/detective_scanner(src)
+ new /obj/item/weapon/storage/box/evidence(src)
+ return
+
+/obj/structure/closet/secure_closet/detective/update_icon()
+ if(broken)
+ icon_state = icon_broken
+ else
+ if(!opened)
+ if(locked)
+ icon_state = icon_locked
+ else
+ icon_state = icon_closed
+ else
+ icon_state = icon_opened
+
+/obj/structure/closet/secure_closet/injection
+ name = "Lethal Injections"
+ req_access = list(access_hos)
+
+
+ New()
+ sleep(2)
+ new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src)
+ new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src)
+ return
+
+
+
+/obj/structure/closet/secure_closet/brig
+ name = "Brig Locker"
+ req_access = list(access_brig)
+ anchored = 1
+
+ New()
+ new /obj/item/clothing/under/color/orange( src )
+ new /obj/item/clothing/shoes/orange( src )
+ return
+
+
+
+/obj/structure/closet/secure_closet/courtroom
+ name = "Courtroom Locker"
+ req_access = list(access_court)
+
+ New()
+ sleep(2)
+ new /obj/item/clothing/shoes/brown(src)
+ new /obj/item/weapon/paper/Court (src)
+ new /obj/item/weapon/paper/Court (src)
+ new /obj/item/weapon/paper/Court (src)
+ new /obj/item/weapon/pen (src)
+ new /obj/item/clothing/suit/judgerobe (src)
+ new /obj/item/clothing/head/powdered_wig (src)
+ new /obj/item/weapon/storage/briefcase(src)
+ return
+
+/obj/structure/closet/secure_closet/wall
+ name = "wall locker"
+ req_access = list(access_security)
+ icon_state = "wall-locker1"
+ density = 1
+ icon_closed = "wall-locker"
+ icon_locked = "wall-locker1"
+ icon_opened = "wall-lockeropen"
+ icon_broken = "wall-lockerbroken"
+ icon_off = "wall-lockeroff"
+
+ //too small to put a man in
+ large = 0
+
+/obj/structure/closet/secure_closet/wall/update_icon()
+ if(broken)
+ icon_state = icon_broken
+ else
+ if(!opened)
+ if(locked)
+ icon_state = icon_locked
+ else
+ icon_state = icon_closed
+ else
+ icon_state = icon_opened
diff --git a/code/WorkInProgress/Sigyn/Softcurity/wardrobe.dm b/code/WorkInProgress/Sigyn/Softcurity/wardrobe.dm
new file mode 100644
index 00000000000..452670091f5
--- /dev/null
+++ b/code/WorkInProgress/Sigyn/Softcurity/wardrobe.dm
@@ -0,0 +1,311 @@
+/obj/structure/closet/wardrobe
+ name = "wardrobe"
+ desc = "It's a storage unit for standard-issue Nanotrasen attire."
+ icon_state = "blue"
+ icon_closed = "blue"
+
+/obj/structure/closet/wardrobe/New()
+ new /obj/item/clothing/under/color/blue(src)
+ new /obj/item/clothing/under/color/blue(src)
+ new /obj/item/clothing/under/color/blue(src)
+ new /obj/item/clothing/shoes/brown(src)
+ new /obj/item/clothing/shoes/brown(src)
+ new /obj/item/clothing/shoes/brown(src)
+ return
+
+
+/obj/structure/closet/wardrobe/red
+ name = "security wardrobe"
+ icon_state = "red"
+ icon_closed = "red"
+
+/obj/structure/closet/wardrobe/red/New()
+ new /obj/item/clothing/under/rank/supervisor(src)
+ new /obj/item/clothing/under/rank/supervisor(src)
+ new /obj/item/clothing/under/rank/supervisor(src)
+ new /obj/item/clothing/shoes/boots(src)
+ new /obj/item/clothing/shoes/boots(src)
+ new /obj/item/clothing/shoes/boots(src)
+ new /obj/item/clothing/head/soft/grey(src)
+ new /obj/item/clothing/head/soft/grey(src)
+ new /obj/item/clothing/head/soft/grey(src)
+ return
+
+
+/obj/structure/closet/wardrobe/pink
+ name = "pink wardrobe"
+ icon_state = "pink"
+ icon_closed = "pink"
+
+/obj/structure/closet/wardrobe/pink/New()
+ new /obj/item/clothing/under/color/pink(src)
+ new /obj/item/clothing/under/color/pink(src)
+ new /obj/item/clothing/under/color/pink(src)
+ new /obj/item/clothing/shoes/brown(src)
+ new /obj/item/clothing/shoes/brown(src)
+ new /obj/item/clothing/shoes/brown(src)
+ return
+
+/obj/structure/closet/wardrobe/black
+ name = "black wardrobe"
+ icon_state = "black"
+ icon_closed = "black"
+
+/obj/structure/closet/wardrobe/black/New()
+ new /obj/item/clothing/under/color/black(src)
+ new /obj/item/clothing/under/color/black(src)
+ new /obj/item/clothing/under/color/black(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/head/that(src)
+ new /obj/item/clothing/head/that(src)
+ new /obj/item/clothing/head/that(src)
+ return
+
+
+/obj/structure/closet/wardrobe/chaplain_black
+ name = "chapel wardrobe"
+ desc = "It's a storage unit for Nanotrasen-approved religious attire."
+ icon_state = "black"
+ icon_closed = "black"
+
+/obj/structure/closet/wardrobe/chaplain_black/New()
+ new /obj/item/clothing/under/rank/chaplain(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/suit/nun(src)
+ new /obj/item/clothing/head/nun_hood(src)
+ new /obj/item/clothing/suit/chaplain_hoodie(src)
+ new /obj/item/clothing/head/chaplain_hood(src)
+ new /obj/item/clothing/suit/holidaypriest(src)
+ new /obj/item/weapon/storage/backpack/cultpack (src)
+ new /obj/item/weapon/storage/fancy/candle_box(src)
+ new /obj/item/weapon/storage/fancy/candle_box(src)
+ return
+
+
+/obj/structure/closet/wardrobe/green
+ name = "green wardrobe"
+ icon_state = "green"
+ icon_closed = "green"
+
+/obj/structure/closet/wardrobe/green/New()
+ new /obj/item/clothing/under/color/green(src)
+ new /obj/item/clothing/under/color/green(src)
+ new /obj/item/clothing/under/color/green(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/shoes/black(src)
+ return
+
+
+/obj/structure/closet/wardrobe/orange
+ name = "prison wardrobe"
+ desc = "It's a storage unit for Nanotrasen-regulation prisoner attire."
+ icon_state = "orange"
+ icon_closed = "orange"
+
+/obj/structure/closet/wardrobe/orange/New()
+ new /obj/item/clothing/under/color/orange(src)
+ new /obj/item/clothing/under/color/orange(src)
+ new /obj/item/clothing/under/color/orange(src)
+ new /obj/item/clothing/shoes/orange(src)
+ new /obj/item/clothing/shoes/orange(src)
+ new /obj/item/clothing/shoes/orange(src)
+ return
+
+
+/obj/structure/closet/wardrobe/yellow
+ name = "yellow wardrobe"
+ icon_state = "wardrobe-y"
+ icon_closed = "wardrobe-y"
+
+/obj/structure/closet/wardrobe/yellow/New()
+ new /obj/item/clothing/under/color/yellow(src)
+ new /obj/item/clothing/under/color/yellow(src)
+ new /obj/item/clothing/under/color/yellow(src)
+ new /obj/item/clothing/shoes/orange(src)
+ new /obj/item/clothing/shoes/orange(src)
+ new /obj/item/clothing/shoes/orange(src)
+ return
+
+
+/obj/structure/closet/wardrobe/atmospherics_yellow
+ name = "atmospherics wardrobe"
+ icon_state = "yellow"
+ icon_closed = "yellow"
+
+/obj/structure/closet/wardrobe/atmospherics_yellow/New()
+ new /obj/item/clothing/under/rank/atmospheric_technician(src)
+ new /obj/item/clothing/under/rank/atmospheric_technician(src)
+ new /obj/item/clothing/under/rank/atmospheric_technician(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/shoes/black(src)
+ return
+
+
+
+/obj/structure/closet/wardrobe/engineering_yellow
+ name = "engineering wardrobe"
+ icon_state = "yellow"
+ icon_closed = "yellow"
+
+/obj/structure/closet/wardrobe/engineering_yellow/New()
+ new /obj/item/clothing/under/rank/engineer(src)
+ new /obj/item/clothing/under/rank/engineer(src)
+ new /obj/item/clothing/under/rank/engineer(src)
+ new /obj/item/clothing/shoes/orange(src)
+ new /obj/item/clothing/shoes/orange(src)
+ new /obj/item/clothing/shoes/orange(src)
+ return
+
+
+/obj/structure/closet/wardrobe/white
+ name = "white wardrobe"
+ icon_state = "white"
+ icon_closed = "white"
+
+/obj/structure/closet/wardrobe/white/New()
+ new /obj/item/clothing/under/color/white(src)
+ new /obj/item/clothing/under/color/white(src)
+ new /obj/item/clothing/under/color/white(src)
+ new /obj/item/clothing/shoes/white(src)
+ new /obj/item/clothing/shoes/white(src)
+ new /obj/item/clothing/shoes/white(src)
+ return
+
+
+/obj/structure/closet/wardrobe/pjs
+ name = "Pajama wardrobe"
+ icon_state = "white"
+ icon_closed = "white"
+
+/obj/structure/closet/wardrobe/pjs/New()
+ new /obj/item/clothing/under/pj/red(src)
+ new /obj/item/clothing/under/pj/red(src)
+ new /obj/item/clothing/under/pj/blue(src)
+ new /obj/item/clothing/under/pj/blue(src)
+ new /obj/item/clothing/shoes/white(src)
+ new /obj/item/clothing/shoes/white(src)
+ new /obj/item/clothing/shoes/white(src)
+ new /obj/item/clothing/shoes/white(src)
+ return
+
+
+/obj/structure/closet/wardrobe/toxins_white
+ name = "toxins wardrobe"
+ icon_state = "white"
+ icon_closed = "white"
+
+/obj/structure/closet/wardrobe/toxins_white/New()
+ new /obj/item/clothing/under/rank/scientist(src)
+ new /obj/item/clothing/under/rank/scientist(src)
+ new /obj/item/clothing/under/rank/scientist(src)
+ new /obj/item/clothing/suit/labcoat(src)
+ new /obj/item/clothing/suit/labcoat(src)
+ new /obj/item/clothing/suit/labcoat(src)
+ new /obj/item/clothing/shoes/white(src)
+ new /obj/item/clothing/shoes/white(src)
+ new /obj/item/clothing/shoes/white(src)
+ return
+
+
+/obj/structure/closet/wardrobe/robotics_black
+ name = "robotics wardrobe"
+ icon_state = "black"
+ icon_closed = "black"
+
+/obj/structure/closet/wardrobe/robotics_black/New()
+ new /obj/item/clothing/under/rank/roboticist(src)
+ new /obj/item/clothing/under/rank/roboticist(src)
+ new /obj/item/clothing/suit/labcoat(src)
+ new /obj/item/clothing/suit/labcoat(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/gloves/black(src)
+ new /obj/item/clothing/gloves/black(src)
+ return
+
+
+/obj/structure/closet/wardrobe/chemistry_white
+ name = "chemistry wardrobe"
+ icon_state = "white"
+ icon_closed = "white"
+
+/obj/structure/closet/wardrobe/chemistry_white/New()
+ new /obj/item/clothing/under/rank/chemist(src)
+ new /obj/item/clothing/under/rank/chemist(src)
+ new /obj/item/clothing/shoes/white(src)
+ new /obj/item/clothing/shoes/white(src)
+ new /obj/item/clothing/suit/labcoat/chemist(src)
+ new /obj/item/clothing/suit/labcoat/chemist(src)
+ return
+
+
+/obj/structure/closet/wardrobe/genetics_white
+ name = "genetics wardrobe"
+ icon_state = "white"
+ icon_closed = "white"
+
+/obj/structure/closet/wardrobe/genetics_white/New()
+ new /obj/item/clothing/under/rank/geneticist(src)
+ new /obj/item/clothing/under/rank/geneticist(src)
+ new /obj/item/clothing/shoes/white(src)
+ new /obj/item/clothing/shoes/white(src)
+ new /obj/item/clothing/suit/labcoat/genetics(src)
+ new /obj/item/clothing/suit/labcoat/genetics(src)
+ return
+
+
+/obj/structure/closet/wardrobe/virology_white
+ name = "virology wardrobe"
+ icon_state = "white"
+ icon_closed = "white"
+
+/obj/structure/closet/wardrobe/virology_white/New()
+ new /obj/item/clothing/under/rank/virologist(src)
+ new /obj/item/clothing/under/rank/virologist(src)
+ new /obj/item/clothing/shoes/white(src)
+ new /obj/item/clothing/shoes/white(src)
+ new /obj/item/clothing/suit/labcoat/virologist(src)
+ new /obj/item/clothing/suit/labcoat/virologist(src)
+ new /obj/item/clothing/mask/surgical(src)
+ new /obj/item/clothing/mask/surgical(src)
+ return
+
+
+/obj/structure/closet/wardrobe/grey
+ name = "grey wardrobe"
+ icon_state = "grey"
+ icon_closed = "grey"
+
+/obj/structure/closet/wardrobe/grey/New()
+ new /obj/item/clothing/under/color/grey(src)
+ new /obj/item/clothing/under/color/grey(src)
+ new /obj/item/clothing/under/color/grey(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/head/soft/grey(src)
+ new /obj/item/clothing/head/soft/grey(src)
+ new /obj/item/clothing/head/soft/grey(src)
+ return
+
+
+/obj/structure/closet/wardrobe/mixed
+ name = "mixed wardrobe"
+ icon_state = "mixed"
+ icon_closed = "mixed"
+
+/obj/structure/closet/wardrobe/mixed/New()
+ new /obj/item/clothing/under/color/white(src)
+ new /obj/item/clothing/under/color/blue(src)
+ new /obj/item/clothing/under/color/yellow(src)
+ new /obj/item/clothing/under/color/green(src)
+ new /obj/item/clothing/under/color/orange(src)
+ new /obj/item/clothing/under/color/pink(src)
+ new /obj/item/clothing/shoes/black(src)
+ new /obj/item/clothing/shoes/brown(src)
+ new /obj/item/clothing/shoes/white(src)
+ return
diff --git a/code/WorkInProgress/Susan/susan_desert_turfs.dm b/code/WorkInProgress/Susan/susan_desert_turfs.dm
index 788e665a815..74c48b4c7b3 100644
--- a/code/WorkInProgress/Susan/susan_desert_turfs.dm
+++ b/code/WorkInProgress/Susan/susan_desert_turfs.dm
@@ -6,12 +6,19 @@ turf/unsimulated/desert
icon_state = "desert"
temperature = 393.15
luminosity = 5
- brightness_on = 1
lighting_lumcount = 8
turf/unsimulated/desert/New()
icon_state = "desert[rand(0,4)]"
+turf/simulated/wall/impassable_rock
+ name = "Mountain Wall"
+
+ //so that you can see the impassable sections in the map editor
+ icon_state = "riveted"
+ New()
+ icon_state = "rock"
+
/area/awaymission/labs/researchdivision
name = "Research"
icon_state = "away3"
@@ -54,47 +61,8 @@ turf/unsimulated/desert/New()
//corpses and possibly other decorative items
-/obj/effect/landmark/corpse/alien/New() //Creates a mob and checks for gear in each slot before attempting to equip it.
- var/mob/living/carbon/human/M = new /mob/living/carbon/human (src.loc)
- M.dna.mutantrace = "lizard"
- M.real_name = src.name
- M.stat = 2 //Kills the new mob
- if(src.corpseuniform)
- M.equip_to_slot_or_del(new src.corpseuniform(M), slot_w_uniform)
- if(src.corpsesuit)
- M.equip_to_slot_or_del(new src.corpsesuit(M), slot_wear_suit)
- if(src.corpseshoes)
- M.equip_to_slot_or_del(new src.corpseshoes(M), slot_shoes)
- if(src.corpsegloves)
- M.equip_to_slot_or_del(new src.corpsegloves(M), slot_gloves)
- if(src.corpseradio)
- M.equip_to_slot_or_del(new src.corpseradio(M), slot_ears)
- if(src.corpseglasses)
- M.equip_to_slot_or_del(new src.corpseglasses(M), slot_glasses)
- if(src.corpsemask)
- M.equip_to_slot_or_del(new src.corpsemask(M), slot_wear_mask)
- if(src.corpsehelmet)
- M.equip_to_slot_or_del(new src.corpsehelmet(M), slot_head)
- if(src.corpsebelt)
- M.equip_to_slot_or_del(new src.corpsebelt(M), slot_belt)
- if(src.corpsepocket1)
- M.equip_to_slot_or_del(new src.corpsepocket1(M), slot_r_store)
- if(src.corpsepocket2)
- M.equip_to_slot_or_del(new src.corpsepocket2(M), slot_l_store)
- if(src.corpseback)
- M.equip_to_slot_or_del(new src.corpseback(M), slot_back)
- if(src.corpseid == 1)
- var/obj/item/weapon/card/id/W = new(M)
- W.name = "[M.real_name]'s ID Card"
- if(src.corpseidicon)
- W.icon_state = corpseidicon
- if(src.corpseidaccess)
- W.access = get_access(corpseidaccess)
- if(corpseidjob)
- W.assignment = corpseidjob
- W.registered_name = M.real_name
- M.equip_to_slot_or_del(W, slot_wear_id)
- del(src)
+/obj/effect/landmark/corpse/alien
+ mutantrace = "lizard"
/obj/effect/landmark/corpse/alien/cargo
name = "Cargo Technician"
diff --git a/code/WorkInProgress/autopsy.dm b/code/WorkInProgress/autopsy.dm
index 2137141996f..8bf45945bc6 100644
--- a/code/WorkInProgress/autopsy.dm
+++ b/code/WorkInProgress/autopsy.dm
@@ -1,3 +1,20 @@
+
+//moved these here from code/defines/obj/weapon.dm
+//please preference put stuff where it's easy to find - C
+
+/obj/item/weapon/autopsy_scanner
+ name = "autopsy scanner"
+ desc = "Extracts information on wounds."
+ icon = 'icons/obj/autopsy_scanner.dmi'
+ icon_state = ""
+ flags = FPRINT | TABLEPASS | CONDUCT
+ w_class = 1.0
+ origin_tech = "materials=1;biotech=1"
+ var/list/datum/autopsy_data_scanner/wdata = list()
+ var/list/datum/autopsy_data_scanner/chemtraces = list()
+ var/target_name = null
+ var/timeofdeath = null
+
/datum/autopsy_data_scanner
var/weapon = null // this is the DEFINITE weapon type that was used
var/list/organs_scanned = list() // this maps a number of scanned organs to
@@ -65,10 +82,6 @@
usr << "No."
return
- if(wdata.len == 0 && chemtraces.len == 0)
- usr << "* 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)
@@ -170,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
diff --git a/code/WorkInProgress/mapload/dmm_suite.dm b/code/WorkInProgress/mapload/dmm_suite.dm
deleted file mode 100644
index f096d555642..00000000000
--- a/code/WorkInProgress/mapload/dmm_suite.dm
+++ /dev/null
@@ -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
- }
- }
- }
diff --git a/code/WorkInProgress/mapload/reader.dm b/code/WorkInProgress/mapload/reader.dm
deleted file mode 100644
index 755b96fc2da..00000000000
--- a/code/WorkInProgress/mapload/reader.dm
+++ /dev/null
@@ -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;lposlength(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
diff --git a/code/WorkInProgress/surgery.dm b/code/WorkInProgress/surgery.dm
deleted file mode 100644
index c262be46f15..00000000000
--- a/code/WorkInProgress/surgery.dm
+++ /dev/null
@@ -1,1303 +0,0 @@
-/datum/surgery_status/
- var/eyes = 0
- var/face = 0
- var/appendix = 0
-
-/mob/living/carbon/var/datum/surgery_status/op_stage = new/datum/surgery_status
-
-/* SURGERY STEPS */
-
-/datum/surgery_step
- // type path referencing the required tool for this step
- var/required_tool = null
-
- // type path referencing tools that can be used as substitude for this step
- var/list/allowed_tools = null
-
- // When multiple steps can be applied with the current tool etc., choose the one with higher priority
-
- // checks whether this step can be applied with the given user and target
- proc/can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return 0
-
- // does stuff to begin the step, usually just printing messages
- proc/begin_step(user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return
-
- // does stuff to end the step, which is normally print a message + do whatever this step changes
- proc/end_step(user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return
-
- // stuff that happens when the step fails
- proc/fail_step(user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return null
-
- // duration of the step
- var/min_duration = 0
- var/max_duration = 0
-
- // evil infection stuff that will make everyone hate me
- var/can_infect = 0
-
- proc/isright(obj/item/tool) //is it is a required surgical tool for this step
- return (istype(tool,required_tool))
-
- proc/isacceptable(obj/item/tool) //is it is an accepted replacement tool for this step
- if (allowed_tools)
- for (var/T in allowed_tools)
- if (istype(tool,T))
- return 1
- return 0
-
-// Build this list by iterating over all typesof(/datum/surgery_step) and sorting the results by priority
-
-
-proc/build_surgery_steps_list()
- surgery_steps = list()
- for(var/T in typesof(/datum/surgery_step)-/datum/surgery_step)
- var/datum/surgery_step/S = new T
- surgery_steps += S
-
-proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
- if(!istype(user) || !istype(E)) return
-
- var/germ_level = user.germ_level
- if(user.gloves)
- germ_level = user.gloves.germ_level
-
- E.germ_level = germ_level
-
-
-//////////////////////////////////////////////////////////////////
-// COMMON STEPS //
-//////////////////////////////////////////////////////////////////
-/datum/surgery_step/generic/
- var/datum/organ/external/affected //affected organ
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- if (target_zone == "eyes") //there are specific steps for eye surgery
- return 0
- if (!hasorgans(target))
- return 0
- affected = target.get_organ(target_zone)
- if (affected == null)
- return 0
- if (affected.status & ORGAN_DESTROYED)
- return 0
- if (affected.status & ORGAN_ROBOT)
- return 0
- return 1
-
-/datum/surgery_step/generic/cut_open
- required_tool = /obj/item/weapon/scalpel
- allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
-
- min_duration = 90
- max_duration = 110
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && affected.open == 0 && target_zone != "mouth"
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] starts the incision on [target]'s [affected.display_name] with \the [tool].", \
- "You start the incision on [target]'s [affected.display_name] with \the [tool].")
- target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.display_name]!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] has made an incision on [target]'s [affected.display_name] with \the [tool].", \
- "\blue You have made an incision on [target]'s [affected.display_name] with \the [tool].",)
- affected.open = 1
- affected.createwound(CUT, 1)
- spread_germs_to_organ(affected, user)
- if (target_zone == "head")
- target.brain_op_stage = 1
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, slicing open [target]'s [affected.display_name] in a wrong spot with \the [tool]!", \
- "\red Your hand slips, slicing open [target]'s [affected.display_name] in a wrong spot with \the [tool]!")
- affected.createwound(CUT, 10)
- if (ishuman(user))
- user:bloody_hands(target, 0)
-
-/datum/surgery_step/generic/clamp_bleeders
- required_tool = /obj/item/weapon/hemostat
- allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
-
- min_duration = 40
- max_duration = 60
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && affected.open && (affected.status & ORGAN_BLEEDING)
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] starts clamping bleeders in [target]'s [affected.display_name] with \the [tool].", \
- "You start clamping bleeders in [target]'s [affected.display_name] with \the [tool].")
- target.custom_pain("The pain in your [affected.display_name] is maddening!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] clamps bleeders in [target]'s [affected.display_name] with \the [tool].", \
- "\blue You clamp bleeders in [target]'s [affected.display_name] with \the [tool].")
- affected.clamp()
- affected.status &= ~ORGAN_BLEEDING
- spread_germs_to_organ(affected, user)
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.display_name] with the \[tool]!", \
- "\red Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.display_name] with \the [tool]!",)
- affected.createwound(CUT, 10)
- if (ishuman(user))
- user:bloody_hands(target, 0)
-
-/datum/surgery_step/generic/retract_skin
- required_tool = /obj/item/weapon/retractor
- allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
-
- min_duration = 30
- max_duration = 40
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && affected.open < 2 && !(affected.status & ORGAN_BLEEDING)
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- var/msg = "[user] starts to pry open the incision on [target]'s [affected.display_name] with \the [tool]."
- var/self_msg = "You start to pry open the incision on [target]'s [affected.display_name] with \the [tool]."
- if (target_zone == "chest")
- msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
- self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
- if (target_zone == "groin")
- msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
- self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
- user.visible_message(msg, self_msg)
- target.custom_pain("It feels like the skin on your [affected.display_name] is on fire!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- var/msg = "\blue [user] keeps the incision open on [target]'s [affected.display_name] with \the [tool]."
- var/self_msg = "\blue You keep the incision open on [target]'s [affected.display_name] with \the [tool]."
- if (target_zone == "chest")
- msg = "\blue [user] keeps the ribcage open on [target]'s torso with \the [tool]."
- self_msg = "\blue You keep the ribcage open on [target]'s torso with \the [tool]."
- if (target_zone == "groin")
- msg = "\blue [user] keeps the incision open on [target]'s lower abdomen with \the [tool]."
- self_msg = "\blue You keep the incision open on [target]'s lower abdomen with \the [tool]."
- user.visible_message(msg, self_msg)
- affected.open = 2
- spread_germs_to_organ(affected, user)
- if (prob(40)) user:bloody_hands(target, 0)
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- var/msg = "\red [user]'s hand slips, tearing the edges of incision on [target]'s [affected.display_name] with \the [tool]!"
- var/self_msg = "\red Your hand slips, tearing the edges of incision on [target]'s [affected.display_name] with \the [tool]!"
- if (target_zone == "chest")
- msg = "\red [user]'s hand slips, damaging several organs [target]'s torso with \the [tool]!"
- self_msg = "\red Your hand slips, damaging several organs [target]'s torso with \the [tool]!"
- if (target_zone == "groin")
- msg = "\red [user]'s hand slips, damaging several organs [target]'s lower abdomen with \the [tool]"
- self_msg = "\red Your hand slips, damaging several organs [target]'s lower abdomen with \the [tool]!"
- user.visible_message(msg, self_msg)
- target.apply_damage(12, BRUTE, affected)
-
-/datum/surgery_step/generic/cauterize
- required_tool = /obj/item/weapon/cautery
- allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
-
- min_duration = 70
- max_duration = 100
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && affected.open && target_zone != "mouth"
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] is beginning to cauterize the incision on [target]'s [affected.display_name] with \the [tool]." , \
- "You are beginning to cauterize the incision on [target]'s [affected.display_name] with \the [tool].")
- target.custom_pain("Your [affected.display_name] is being burned!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] cauterizes the incision on [target]'s [affected.display_name] with \the [tool].", \
- "\blue You cauterize the incision on [target]'s [affected.display_name] with \the [tool].")
- affected.open = 0
- affected.germ_level = 0
- affected.status &= ~ORGAN_BLEEDING
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, leaving a small burn on [target]'s [affected.display_name] with \the [tool]!", \
- "\red Your hand slips, leaving a small burn on [target]'s [affected.display_name] with \the [tool]!")
- target.apply_damage(3, BURN, affected)
-
-//////////////////////////////////////////////////////////////////
-// APPENDECTOMY //
-//////////////////////////////////////////////////////////////////
-
-/datum/surgery_step/appendectomy/
- var/datum/organ/external/groin
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- if (target_zone != "groin")
- return 0
- groin = target.get_organ("groin")
- if (!groin)
- return 0
- if (groin.open < 2)
- return 0
- return 1
-
-/datum/surgery_step/appendectomy/cut_appendix
- required_tool = /obj/item/weapon/scalpel
- allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
-
- min_duration = 70
- max_duration = 90
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target.op_stage.appendix == 0
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] starts to separating [target]'s appendix from the abdominal wall with \the [tool].", \
- "You start to separating [target]'s appendix from the abdominal wall with \the [tool]." )
- target.custom_pain("The pain in your abdomen is living hell!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] has separated [target]'s appendix with \the [tool]." , \
- "\blue You have separated [target]'s appendix with \the [tool].")
- target.op_stage.appendix = 1
- if (ishuman(user) && prob(40)) user:bloody_hands(target, 0)
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/groin = target.get_organ("groin")
- user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!", \
- "\red Your hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!")
- groin.createwound(CUT, 50, 1)
- if (ishuman(user))
- user:bloody_body(target)
-
-/datum/surgery_step/appendectomy/remove_appendix
- required_tool = /obj/item/weapon/hemostat
- allowed_tools = list(/obj/item/weapon/wirecutters)
-
- min_duration = 60
- max_duration = 80
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target.op_stage.appendix == 1
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] starts removing [target]'s appendix with \the [tool].", \
- "You start removing [target]'s appendix with \the [tool].")
- target.custom_pain("Someone's ripping out your bowels!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] has removed [target]'s appendix with \the [tool].", \
- "\blue You have removed [target]'s appendix with \the [tool].")
- var/app = 0
- for(var/datum/disease/appendicitis/appendicitis in target.viruses)
- app = 1
- appendicitis.cure()
- target.resistances += appendicitis
- if (app)
- new /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed(get_turf(target))
- else
- new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(target))
- target.op_stage.appendix = 2
- if (ishuman(user) && prob(40)) user:bloody_hands(target, 0)
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, nicking internal organs in [target]'s abdomen with \the [tool]!", \
- "\red Your hand slips, nicking internal organs in [target]'s abdomen with \the [tool]!")
- affected.createwound(BRUISE, 20)
-
-
-//////////////////////////////////////////////////////////////////
-// INTERNAL WOUND PATCHING //
-//////////////////////////////////////////////////////////////////
-
-
-/datum/surgery_step/fix_vein
- required_tool = /obj/item/weapon/FixOVein
- allowed_tools = list(/obj/item/weapon/cable_coil)
-
- min_duration = 70
- max_duration = 90
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
-
- var/internal_bleeding = 0
- for(var/datum/wound/W in affected.wounds) if(W.internal)
- internal_bleeding = 1
- break
-
- return affected.open == 2 && internal_bleeding
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] starts patching the damaged vein in [target]'s [affected.display_name] with \the [tool]." , \
- "You start patching the damaged vein in [target]'s [affected.display_name] with \the [tool].")
- target.custom_pain("The pain in [affected.display_name] is unbearable!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] has patched the damaged vein in [target]'s [affected.display_name] with \the [tool].", \
- "\blue You have patched the damaged vein in [target]'s [affected.display_name] with \the [tool].")
-
- for(var/datum/wound/W in affected.wounds) if(W.internal)
- affected.wounds -= W
- affected.update_damages()
- if (ishuman(user) && prob(40)) user:bloody_hands(target, 0)
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \
- "\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!")
- affected.take_damage(5, 0)
-
-
-//////////////////////////////////////////////////////////////////
-// BONE SURGERY //
-//////////////////////////////////////////////////////////////////
-
-/datum/surgery_step/glue_bone
- required_tool = /obj/item/weapon/bonegel
- allowed_tools = list(/obj/item/weapon/screwdriver)
-
- min_duration = 50
- max_duration = 60
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- return affected.open == 2 && affected.stage == 0
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- if (affected.stage == 0)
- user.visible_message("[user] starts applying medication to the damaged bones in [target]'s [affected.display_name] with \the [tool]." , \
- "You start applying medication to the damaged bones in [target]'s [affected.display_name] with \the [tool].")
- target.custom_pain("Something in your [affected.display_name] is causing you a lot of pain!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] applies some [tool] to [target]'s bone in [affected.display_name]", \
- "\blue You apply some [tool] to [target]'s bone in [affected.display_name] with \the [tool].")
- affected.stage = 1
- spread_germs_to_organ(affected, user)
- if (ishuman(user) && prob(80)) user:bloody_hands(target, 0)
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \
- "\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!")
-
-/datum/surgery_step/set_bone
- required_tool = /obj/item/weapon/bonesetter
- allowed_tools = list(/obj/item/weapon/wrench)
-
- min_duration = 60
- max_duration = 70
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- return affected.name != "head" && affected.open == 2 && affected.stage == 1
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] is beginning to set the bone in [target]'s [affected.display_name] in place with \the [tool]." , \
- "You are beginning to set the bone in [target]'s [affected.display_name] in place with \the [tool].")
- target.custom_pain("The pain in your [affected.display_name] is going to make you pass out!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- if (affected.status & ORGAN_BROKEN)
- user.visible_message("\blue [user] sets the bone in [target]'s [affected.display_name] in place with \the [tool].", \
- "\blue You set the bone in [target]'s [affected.display_name] in place with \the [tool].")
- affected.stage = 2
- spread_germs_to_organ(affected, user)
- else
- user.visible_message("\blue [user] sets the bone in [target]'s [affected.display_name]\red in the WRONG place with \the [tool].", \
- "\blue You set the bone in [target]'s [affected.display_name]\red in the WRONG place with \the [tool].")
- affected.fracture()
- spread_germs_to_organ(affected, user)
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, damaging the bone in [target]'s [affected.display_name] with \the [tool]!" , \
- "\red Your hand slips, damaging the bone in [target]'s [affected.display_name] with \the [tool]!")
- affected.createwound(BRUISE, 5)
-
-/datum/surgery_step/mend_skull
- required_tool = /obj/item/weapon/bonesetter
- allowed_tools = list(/obj/item/weapon/wrench)
-
- min_duration = 60
- max_duration = 70
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- return affected.name == "head" && affected.open == 2 && affected.stage == 1
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] is beginning piece together [target]'s skull with \the [tool]." , \
- "You are beginning piece together [target]'s skull with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] sets [target]'s skull with \the [tool]." , \
- "\blue You set [target]'s skull with \the [tool].")
- affected.stage = 2
- spread_germs_to_organ(affected, user)
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, damaging [target]'s face with \the [tool]!" , \
- "\red Your hand slips, damaging [target]'s face with \the [tool]!")
- var/datum/organ/external/head/h = affected
- h.createwound(BRUISE, 10)
- h.disfigured = 1
-
-/datum/surgery_step/finish_bone
- required_tool = /obj/item/weapon/bonegel
- allowed_tools = list(/obj/item/weapon/screwdriver)
-
- min_duration = 50
- max_duration = 60
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- return affected.open == 2 && affected.stage == 2
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] starts to finish mending the damaged bones in [target]'s [affected.display_name] with \the [tool].", \
- "You start to finish mending the damaged bones in [target]'s [affected.display_name] with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] has mended the damaged bones in [target]'s [affected.display_name] with \the [tool]." , \
- "\blue You have mended the damaged bones in [target]'s [affected.display_name] with \the [tool]." )
- affected.status &= ~ORGAN_BROKEN
- affected.status &= ~ORGAN_SPLINTED
- affected.stage = 0
- affected.perma_injury = 0
- spread_germs_to_organ(affected, user)
- if (ishuman(user) && prob(80)) user:bloody_hands(target, 0)
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \
- "\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!")
-
-//////////////////////////////////////////////////////////////////
-// EYE SURGERY //
-//////////////////////////////////////////////////////////////////
-
-/datum/surgery_step/eye
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- if (!hasorgans(target))
- return 0
- var/datum/organ/external/affected = target.get_organ(target_zone)
- if (!affected)
- return 0
- return target_zone == "eyes"
-
-/datum/surgery_step/eye/cut_open
- required_tool = /obj/item/weapon/scalpel
- allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
-
- min_duration = 90
- max_duration = 110
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..()
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] starts to separate the corneas on [target]'s eyes with \the [tool].", \
- "You start to separate the corneas on [target]'s eyes with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] has separated the corneas on [target]'s eyes with \the [tool]." , \
- "\blue You have separated the corneas on [target]'s eyes with \the [tool].",)
- target.op_stage.eyes = 1
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, slicing [target]'s eyes wth \the [tool]!" , \
- "\red Your hand slips, slicing [target]'s eyes wth \the [tool]!" )
- affected.createwound(CUT, 10)
-
-/datum/surgery_step/eye/lift_eyes
- required_tool = /obj/item/weapon/retractor
- allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
-
- min_duration = 30
- max_duration = 40
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target.op_stage.eyes == 1
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] starts lifting corneas from [target]'s eyes with \the [tool].", \
- "You start lifting corneas from [target]'s eyes with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] has lifted the corneas from [target]'s eyes from with \the [tool]." , \
- "\blue You has lifted the corneas from [target]'s eyes from with \the [tool]." )
- target.op_stage.eyes = 2
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, damaging [target]'s eyes with \the [tool]!", \
- "\red Your hand slips, damaging [target]'s eyes with \the [tool]!")
- target.apply_damage(10, BRUTE, affected)
-
-/datum/surgery_step/eye/mend_eyes
- required_tool = /obj/item/weapon/hemostat
- allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
-
- min_duration = 80
- max_duration = 100
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target.op_stage.eyes == 2
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] starts mending the nerves and lenses in [target]'s eyes with \the [tool].", \
- "You start mending the nerves and lenses in [target]'s eyes with the [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] mends the nerves and lenses in [target]'s with \the [tool]." , \
- "\blue You mend the nerves and lenses in [target]'s with \the [tool].")
- target.op_stage.eyes = 3
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, stabbing \the [tool] into [target]'s eye!", \
- "\red Your hand slips, stabbing \the [tool] into [target]'s eye!")
- target.apply_damage(10, BRUTE, affected)
-
-/datum/surgery_step/eye/cauterize
- required_tool = /obj/item/weapon/cautery
- allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
-
- min_duration = 70
- max_duration = 100
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..()
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] is beginning to cauterize the incision around [target]'s eyes with \the [tool]." , \
- "You are beginning to cauterize the incision around [target]'s eyes with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] cauterizes the incision around [target]'s eyes with \the [tool].", \
- "\blue You cauterize the incision around [target]'s eyes with \the [tool].")
- if (target.op_stage.eyes == 3)
- target.sdisabilities &= ~BLIND
- target.eye_stat = 0
- target.op_stage.eyes = 0
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, searing [target]'s eyes with \the [tool]!", \
- "\red Your hand slips, searing [target]'s eyes with \the [tool]!")
- target.apply_damage(5, BURN, affected)
- target.eye_stat += 5
-
-//////////////////////////////////////////////////////////////////
-// FACE SURGERY //
-//////////////////////////////////////////////////////////////////
-
-/datum/surgery_step/face
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- if (!hasorgans(target))
- return 0
- var/datum/organ/external/affected = target.get_organ(target_zone)
- if (!affected)
- return 0
- return target_zone == "mouth" && affected.open == 2 && !(affected.status & ORGAN_BLEEDING)
-
-/datum/surgery_step/generic/cut_face
- required_tool = /obj/item/weapon/scalpel
- allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
-
- min_duration = 90
- max_duration = 110
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target_zone == "mouth" && target.op_stage.face == 0
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] starts to cut open [target]'s face and neck with \the [tool].", \
- "You start to cut open [target]'s face and neck with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] has cut open [target]'s face and neck with \the [tool]." , \
- "\blue You have cut open [target]'s face and neck with \the [tool].",)
- target.op_stage.face = 1
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, slicing [target]'s throat wth \the [tool]!" , \
- "\red Your hand slips, slicing [target]'s throat wth \the [tool]!" )
- affected.createwound(CUT, 60)
- target.losebreath += 10
-
-/datum/surgery_step/face/mend_vocal
- required_tool = /obj/item/weapon/hemostat
- allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
-
- min_duration = 70
- max_duration = 90
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target.op_stage.face == 1
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] starts mending [target]'s vocal cords with \the [tool].", \
- "You start mending [target]'s vocal cords with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] mends [target]'s vocal cords with \the [tool].", \
- "\blue You mend [target]'s vocal cords with \the [tool].")
- target.op_stage.face = 2
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\red [user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!", \
- "\red Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!")
- target.losebreath += 10
- if (ishuman(user))
- user:bloody_body(target)
- user:bloody_hands(target, 0)
-
-/datum/surgery_step/face/fix_face
- required_tool = /obj/item/weapon/retractor
- allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
-
- min_duration = 80
- max_duration = 100
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target.op_stage.face == 2
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] starts pulling skin on [target]'s face back in place with \the [tool].", \
- "You start pulling skin on [target]'s face back in place with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] pulls skin on [target]'s face back in place with \the [tool].", \
- "\blue You pull skin on [target]'s face back in place with \the [tool].")
- target.op_stage.face = 3
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, tearing skin on [target]'s face with \the [tool]!", \
- "\red Your hand slips, tearing skin on [target]'s face with \the [tool]!")
- target.apply_damage(10, BRUTE, affected)
-
-/datum/surgery_step/face/cauterize
- required_tool = /obj/item/weapon/cautery
- allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
-
- min_duration = 70
- max_duration = 100
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target.op_stage.face > 0
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] is beginning to cauterize the incision on [target]'s face and neck with \the [tool]." , \
- "You are beginning to cauterize the incision on [target]'s face and neck with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] cauterizes the incision on [target]'s face and neck with \the [tool].", \
- "\blue You cauterize the incision on [target]'s face and neck with \the [tool].")
- affected.open = 0
- affected.status &= ~ORGAN_BLEEDING
- if (target.op_stage.face == 3)
- var/datum/organ/external/head/h = affected
- h.disfigured = 0
- target.op_stage.face = 0
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!", \
- "\red Your hand slips, leaving a small burn on [target]'s face with \the [tool]!")
- target.apply_damage(4, BURN, affected)
-
-//////////////////////////////////////////////////////////////////
-// BRAIN SURGERY //
-//////////////////////////////////////////////////////////////////
-
-/datum/surgery_step/brain/
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return target_zone == "head" && hasorgans(target)
-
-/datum/surgery_step/brain/saw_skull
- required_tool = /obj/item/weapon/circular_saw
-
- min_duration = 50
- max_duration = 70
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target_zone == "head" && target.brain_op_stage == 1
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] begins to cut through [target]'s skull with \the [tool].", \
- "You begin to cut through [target]'s skull with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] has cut through [target]'s skull open with \the [tool].", \
- "\blue You have cut through [target]'s skull open with \the [tool].")
- target.brain_op_stage = 2
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\red [user]'s hand slips, cracking [target]'s skull with \the [tool]!" , \
- "\red Your hand slips, cracking [target]'s skull with \the [tool]!" )
- target.apply_damage(10, BRUTE, "head")
-
-/datum/surgery_step/brain/cut_brain
- required_tool = /obj/item/weapon/scalpel
- allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
-
- min_duration = 80
- max_duration = 100
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target.brain_op_stage == 2
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] starts separating connections to [target]'s brain with \the [tool].", \
- "You start separating connections to [target]'s brain with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] separates connections to [target]'s brain with \the [tool].", \
- "\blue You separate connections to [target]'s brain with \the [tool].")
- target.brain_op_stage = 3
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
- "\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
- target.apply_damage(50, BRUTE, "head", 1)
- if (ishuman(user))
- user:bloody_body(target)
- user:bloody_hands(target, 0)
-
-/datum/surgery_step/brain/saw_spine
- required_tool = /obj/item/weapon/circular_saw
-
- min_duration = 50
- max_duration = 70
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target.brain_op_stage == 3
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] starts separating [target]'s brain from \his spine with \the [tool].", \
- "You start separating [target]'s brain from spine with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] separates [target]'s brain from \his spine with \the [tool].", \
- "\blue You separate [target]'s brain from spine with \the [tool].")
-
- user.attack_log += "\[[time_stamp()]\] Debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])"
- target.attack_log += "\[[time_stamp()]\] Debrained by [user.name] ([user.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])"
-
- log_admin("ATTACK: [user] ([user.ckey]) debrained [target] ([target.ckey]) with [tool].")
- message_admins("ATTACK: [user] ([user.ckey]) debrained [target] ([target.ckey]) with [tool].")
- log_attack("[user.name] ([user.ckey]) debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])")
-
- var/obj/item/brain/B = new(target.loc)
- B.transfer_identity(target)
-
- target:brain_op_stage = 4.0
- target.death()//You want them to die after the brain was transferred, so not to trigger client death() twice.
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
- "\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
- target.apply_damage(30, BRUTE, "head", 1)
- if (ishuman(user))
- user:bloody_body(target)
- user:bloody_hands(target, 0)
-
-
-//////////////////////////////////////////////////////////////////
-// METROID CORE EXTRACTION //
-//////////////////////////////////////////////////////////////////
-
-/datum/surgery_step/metroid/
- can_use(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
- return istype(target, /mob/living/carbon/metroid/) && target.stat == 2
-
-/datum/surgery_step/metroid/cut_flesh
- required_tool = /obj/item/weapon/scalpel
- allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
-
- min_duration = 30
- max_duration = 50
-
- can_use(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
- return ..() && target.brain_op_stage == 0
-
- begin_step(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
- user.visible_message("[user] starts cutting [target]'s flesh with \the [tool].", \
- "You start cutting [target]'s flesh with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] cuts [target]'s flesh with \the [tool].", \
- "\blue You cut [target]'s flesh with \the [tool], exposing the cores")
- target.brain_op_stage = 1
-
- fail_step(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
- user.visible_message("\red [user]'s hand slips, tearing [target]'s flesh with \the [tool]!", \
- "\red Your hand slips, tearing [target]'s flesh with \the [tool]!")
-
-/datum/surgery_step/metroid/cut_innards
- required_tool = /obj/item/weapon/scalpel
- allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
-
- min_duration = 30
- max_duration = 50
-
- can_use(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
- return ..() && target.brain_op_stage == 1
-
- begin_step(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
- user.visible_message("[user] starts cutting [target]'s silky innards apart with \the [tool].", \
- "You start cutting [target]'s silky innards apart with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] cuts [target]'s innards apart with \the [tool], exposing the cores", \
- "\blue You cut [target]'s innards apart with \the [tool], exposing the cores")
- target.brain_op_stage = 2
-
- fail_step(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
- user.visible_message("\red [user]'s hand slips, tearing [target]'s innards with \the [tool]!", \
- "\red Your hand slips, tearing [target]'s innards with \the [tool]!")
-
-/datum/surgery_step/metroid/saw_core
- required_tool = /obj/item/weapon/circular_saw
-
- min_duration = 50
- max_duration = 70
-
- can_use(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
- return ..() && target.brain_op_stage == 2 && target.cores > 0
-
- begin_step(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
- user.visible_message("[user] starts cutting out one of [target]'s cores with \the [tool].", \
- "You start cutting out one of [target]'s cores with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
- target.cores--
- user.visible_message("\blue [user] cuts out one of [target]'s cores with \the [tool].",, \
- "\blue You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.")
- if(target.cores >= 0)
- new/obj/item/metroid_core(target.loc)
- if(target.cores <= 0)
- target.icon_state = "baby roro dead-nocore"
-
- fail_step(mob/user, mob/living/carbon/metroid/target, target_zone, obj/item/tool)
- user.visible_message("\red [user]'s hand slips, failing to cut core out!", \
- "\red Your hand slips, failing to cut core out!")
-
-//////////////////////////////////////////////////////////////////
-// LIMB SURGERY //
-//////////////////////////////////////////////////////////////////
-
-/datum/surgery_step/limb/
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- if (!hasorgans(target))
- return 0
- var/datum/organ/external/affected = target.get_organ(target_zone)
- if (!affected)
- return 0
- if (!(affected.status & ORGAN_DESTROYED))
- return 0
- if (affected.parent)
- if (affected.parent.status & ORGAN_DESTROYED)
- return 0
- return 1
-
-
-/datum/surgery_step/limb/cut
- required_tool = /obj/item/weapon/scalpel
- allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
-
- min_duration = 80
- max_duration = 100
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] starts cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
- "You start cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] cuts away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
- "\blue You cut away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
- affected.status |= ORGAN_CUT_AWAY
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- if (affected.parent)
- affected = affected.parent
- user.visible_message("\red [user]'s hand slips, cutting [target]'s [affected.display_name] open!", \
- "\red Your hand slips, cutting [target]'s [affected.display_name] open!")
- affected.createwound(CUT, 10)
-
-
-/datum/surgery_step/limb/mend
- required_tool = /obj/item/weapon/retractor
- allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
-
- min_duration = 80
- max_duration = 100
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- return ..() && affected.status & ORGAN_CUT_AWAY
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] is beginning reposition flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].", \
- "You start repositioning flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] has finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].", \
- "\blue You have finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].")
- affected.open = 3
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- if (affected.parent)
- affected = affected.parent
- user.visible_message("\red [user]'s hand slips, tearing flesh on [target]'s [affected.display_name]!", \
- "\red Your hand slips, tearing flesh on [target]'s [affected.display_name]!")
- target.apply_damage(10, BRUTE, affected)
-
-
-/datum/surgery_step/limb/prepare
- required_tool = /obj/item/weapon/cautery
- allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
-
- min_duration = 60
- max_duration = 70
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- return ..() && affected.open == 3
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] starts adjusting area around [target]'s [affected.display_name] with \the [tool].", \
- "You start adjusting area around [target]'s [affected.display_name] with \the [tool]..")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] has finished adjusting the area around [target]'s [affected.display_name] with \the [tool].", \
- "\blue You have finished adjusting the area around [target]'s [affected.display_name] with \the [tool].")
- affected.status |= ORGAN_ATTACHABLE
- affected.amputated = 1
- affected.setAmputatedTree()
- affected.open = 0
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- if (affected.parent)
- affected = affected.parent
- user.visible_message("\red [user]'s hand slips, searing [target]'s [affected.display_name]!", \
- "\red Your hand slips, searing [target]'s [affected.display_name]!")
- target.apply_damage(10, BURN, affected)
-
-
-/datum/surgery_step/limb/attach
- required_tool = /obj/item/robot_parts
-
- min_duration = 80
- max_duration = 100
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/obj/item/robot_parts/p = tool
- if (p.part)
- if (!(target_zone in p.part))
- return 0
- var/datum/organ/external/affected = target.get_organ(target_zone)
- return ..() && affected.status & ORGAN_ATTACHABLE
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] starts attaching [tool] where [target]'s [affected.display_name] used to be.", \
- "You start attaching [tool] where [target]'s [affected.display_name] used to be.")
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] has attached [tool] where [target]'s [affected.display_name] used to be.", \
- "\blue You have attached [tool] where [target]'s [affected.display_name] used to be.")
- affected.robotize()
- target.update_body()
- target.updatehealth()
- target.UpdateDamageIcon()
- del(tool)
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, damaging connectors on [target]'s [affected.display_name]!", \
- "\red Your hand slips, damaging connectors on [target]'s [affected.display_name]!")
- target.apply_damage(10, BRUTE, affected)
-
-
-//////////////////////////////////////////////////////////////////
-// RIBCAGE SURGERY(LUNGS AND ALIENS) //
-//////////////////////////////////////////////////////////////////
-
-/datum/surgery_step/ribcage
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return target_zone == "chest"
-
-/datum/surgery_step/ribcage/saw_ribcage
- required_tool = /obj/item/weapon/circular_saw
-
- min_duration = 50
- max_duration = 70
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- return ..() && target.ribcage_op_stage == 0 && affected.open >= 2
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] begins to cut through [target]'s ribcage with \the [tool].", \
- "You begin to cut through [target]'s ribcage with \the [tool].")
- target.custom_pain("Something hurts horribly in your chest!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] has cut through [target]'s ribcage open with \the [tool].", \
- "\blue You have cut through [target]'s ribcage open with \the [tool].")
- target.ribcage_op_stage = 1
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\red [user]'s hand slips, cracking [target]'s ribcage with \the [tool]!" , \
- "\red Your hand slips, cracking [target]'s ribcage with \the [tool]!" )
-
-
-/datum/surgery_step/ribcage/retract_ribcage
- required_tool = /obj/item/weapon/retractor
- allowed_tools = list(/obj/item/weapon/crowbar)
-
- min_duration = 30
- max_duration = 40
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target.ribcage_op_stage == 1
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/msg = "[user] starts to force open the ribcage in [target]'s torso with \the [tool]."
- var/self_msg = "You start to force open the ribcage in [target]'s torso with \the [tool]."
- user.visible_message(msg, self_msg)
- target.custom_pain("Something hurts horribly in your chest!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/msg = "\blue [user] forces open [target]'s ribcage with \the [tool]."
- var/self_msg = "\blue You force open [target]'s ribcage with \the [tool]."
- user.visible_message(msg, self_msg)
- target.ribcage_op_stage = 2
-
- // Whoops!
- if(prob(10))
- var/datum/organ/external/affected = target.get_organ(target_zone)
- affected.fracture()
-
- if (ishuman(user))
- user:bloody_hands(target, 0)
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/msg = "\red [user]'s hand slips, breaking [target]'s ribcage!"
- var/self_msg = "\red Your hand slips, breaking [target]'s ribcage!"
- user.visible_message(msg, self_msg)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- affected.fracture()
-
-/datum/surgery_step/ribcage/close_ribcage
- required_tool = /obj/item/weapon/retractor
- allowed_tools = list(/obj/item/weapon/crowbar)
-
- min_duration = 20
- max_duration = 40
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target.ribcage_op_stage == 2
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/msg = "[user] starts bending [target]'s ribcage back into place with \the [tool]."
- var/self_msg = "You start bending [target]'s ribcage back into place with \the [tool]."
- user.visible_message(msg, self_msg)
- target.custom_pain("Something hurts horribly in your chest!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/msg = "\blue [user] bends [target]'s ribcage back into place with \the [tool]."
- var/self_msg = "\blue You bend [target]'s ribcage back into place with \the [tool]."
- user.visible_message(msg, self_msg)
-
- target.ribcage_op_stage = 1
-
-/datum/surgery_step/ribcage/mend_ribcage
- required_tool = /obj/item/weapon/bonegel
-
- min_duration = 20
- max_duration = 40
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target.ribcage_op_stage == 1
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/msg = "[user] starts applying \the [tool] to [target]'s ribcage."
- var/self_msg = "You start applying \the [tool] to [target]'s ribcage."
- user.visible_message(msg, self_msg)
- target.custom_pain("Something hurts horribly in your chest!",1)
-
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/msg = "\blue [user] applied \the [tool] to [target]'s ribcage."
- var/self_msg = "\blue You applied \the [tool] to [target]'s ribcage."
- user.visible_message(msg, self_msg)
-
- target.ribcage_op_stage = 0
-
-
-/datum/surgery_step/ribcage/remove_embryo
- required_tool = /obj/item/weapon/hemostat
-
- min_duration = 80
- max_duration = 100
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/embryo = 0
- for(var/datum/disease/alien_embryo/A in target.viruses)
- embryo = 1
- break
- return ..() && embryo && target.ribcage_op_stage == 2
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/msg = "[user] starts to pull something out from [target]'s ribcage with \the [tool]."
- var/self_msg = "You start to pull something out from [target]'s ribcage with \the [tool]."
- user.visible_message(msg, self_msg)
- target.custom_pain("Something hurts horribly in your chest!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\red [user] rips the larva out of [target]'s ribcage!",
- "You rip the larva out of [target]'s ribcage!")
-
- var/mob/living/carbon/alien/larva/stupid = new(target.loc)
- stupid.death(0)
-
- for(var/datum/disease/alien_embryo in target.viruses)
- alien_embryo.cure()
-
- if (ishuman(user)) user:bloody_hands(target, 0)
-
-/datum/surgery_step/ribcage/fix_lungs
- required_tool = /obj/item/weapon/scalpel
- allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
-
- min_duration = 70
- max_duration = 90
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target.is_lung_ruptured() && target.ribcage_op_stage == 2
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("[user] starts mending the rupture in [target]'s lungs with \the [tool].", \
- "You start mending the rupture in [target]'s lungs with \the [tool]." )
- target.custom_pain("The pain in your chest is living hell!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/chest/affected = target.get_organ("chest")
- user.visible_message("\blue [user] mends the rupture in [target]'s lungs with \the [tool].", \
- "\blue You mend the rupture in [target]'s lungs with \the [tool]." )
- affected.ruptured_lungs = 0
- if (ishuman(user) && prob(80)) user:bloody_hands(target, 0)
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/chest/affected = target.get_organ("chest")
- user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s chest with \the [tool]!", \
- "\red Your hand slips, slicing an artery inside [target]'s chest with \the [tool]!")
- affected.createwound(CUT, 20)
- if (ishuman(user))
- user:bloody_hands(target, 0)
- user:bloody_body(target)
-
-//////////////////////////////////////////////////////////////////
-// IMPLANT REMOVAL SURGERY //
-//////////////////////////////////////////////////////////////////
-
-/datum/surgery_step/implant_removal
- required_tool = /obj/item/weapon/hemostat
- allowed_tools = list(/obj/item/weapon/wirecutters, /obj/item/weapon/kitchen/utensil/fork)
-
- min_duration = 80
- max_duration = 100
-
- can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- return affected.open == 2 && !(affected.status & ORGAN_BLEEDING)
-
- begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] starts poking around inside the incision on [target]'s [affected.display_name] with \the [tool].", \
- "You start poking around inside the incision on [target]'s [affected.display_name] with \the [tool]" )
- target.custom_pain("The pain in your chest is living hell!",1)
-
- end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/chest/affected = target.get_organ(target_zone)
-
- var/find_prob = 0
- if (affected.implants.len)
- var/obj/item/weapon/implant/imp = affected.implants[1]
- if (imp.islegal())
- find_prob +=60
- else
- find_prob +=40
- if (isright(tool))
- find_prob +=20
-
- if (prob(find_prob))
- user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.display_name] with \the [tool].", \
- "\blue You take something out of incision on [target]'s [affected.display_name]s with \the [tool]." )
- var/obj/item/weapon/implant/imp = affected.implants[1]
- affected.implants -= imp
- imp.loc = get_turf(target)
- imp.imp_in = null
- imp.implanted = 0
- else
- user.visible_message("\blue [user] could not find anything inside [target]'s [affected.display_name], and pulls \the [tool] out.", \
- "\blue You could not find anything inside [target]'s [affected.display_name]." )
- if (ishuman(user) && prob(80)) user:bloody_hands(target, 0)
-
- fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- var/datum/organ/external/chest/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!", \
- "\red Your hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!")
- affected.createwound(CUT, 20)
- if (affected.implants.len)
- var/fail_prob = 10
- if (!isright(tool))
- fail_prob += 30
- if (prob(fail_prob))
- var/obj/item/weapon/implant/imp = affected.implants[1]
- user.visible_message("\red Something beeps inside [target]'s [affected.display_name]!")
- playsound(imp.loc, 'sound/items/countdown.ogg', 75, 1, -3)
- spawn(25)
- imp.activate()
- if (ishuman(user))
- user:bloody_hands(target, 0)
- user:bloody_body(target)
\ No newline at end of file
diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm
index 88023f7c9a8..167d4368b3c 100644
--- a/code/ZAS/Airflow.dm
+++ b/code/ZAS/Airflow.dm
@@ -148,7 +148,7 @@ proc/Airflow(zone/A, zone/B)
//Check for knocking people over
if(ismob(M) && n > vsc.airflow_stun_pressure)
- if(M:nodamage) continue
+ if(M:status_flags & GODMODE) continue
M:airflow_stun()
if(M.check_airflow_movable(n))
@@ -206,8 +206,9 @@ proc/AirflowSpace(zone/A)
if(M.last_airflow > world.time - vsc.airflow_delay) continue
if(ismob(M) && n > vsc.airflow_stun_pressure)
- if(M:nodamage) continue
- M:airflow_stun()
+ var/mob/O = M
+ if(O.status_flags & GODMODE) continue
+ O.airflow_stun()
if(M.check_airflow_movable(n))
@@ -241,7 +242,7 @@ atom/movable
if(airflow_dest == loc)
step_away(src,loc)
if(ismob(src))
- if(src:nodamage)
+ if(src:status_flags & GODMODE)
return
if(istype(src, /mob/living/carbon/human))
if(src:buckled)
@@ -306,7 +307,7 @@ atom/movable
if(airflow_dest == loc)
step_away(src,loc)
if(ismob(src))
- if(src:nodamage)
+ if(src:status_flags & GODMODE)
return
if(istype(src, /mob/living/carbon/human))
if(src:buckled)
diff --git a/code/ZAS/FEA_gas_mixture.dm b/code/ZAS/FEA_gas_mixture.dm
index 05bb2e4e60f..a4104ab01c7 100644
--- a/code/ZAS/FEA_gas_mixture.dm
+++ b/code/ZAS/FEA_gas_mixture.dm
@@ -4,6 +4,13 @@ What are the archived variables for?
This prevents race conditions that arise based on the order of tile processing.
*/
+#define SPECIFIC_HEAT_TOXIN 200
+#define SPECIFIC_HEAT_AIR 20
+#define SPECIFIC_HEAT_CDO 30
+#define HEAT_CAPACITY_CALCULATION(oxygen,carbon_dioxide,nitrogen,toxins) \
+ (carbon_dioxide*SPECIFIC_HEAT_CDO + (oxygen+nitrogen)*SPECIFIC_HEAT_AIR + toxins*SPECIFIC_HEAT_TOXIN)
+
+#define MINIMUM_HEAT_CAPACITY 0.0003
#define QUANTIZE(variable) (round(variable,0.0001))
#define TRANSFER_FRACTION 5 //What fraction (1/#) of the air difference to try and transfer
diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm
index 3818fb070af..bdd9859ccd8 100644
--- a/code/ZAS/Fire.dm
+++ b/code/ZAS/Fire.dm
@@ -41,9 +41,9 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
return 1
var/datum/gas/volatile_fuel/fuel = locate() in air_contents.trace_gases
var/obj/effect/decal/cleanable/liquid_fuel/liquid = locate() in src
- if(air_contents.calculate_firelevel(liquid) > vsc.IgnitionLevel && (fuel || liquid || air_contents.toxins > 0.5))
+ if(air_contents.calculate_firelevel(liquid) > vsc.IgnitionLevel && (fuel || liquid || air_contents.toxins > 0.1))
igniting = 1
- if(air_contents.oxygen < 0.5)
+ if(air_contents.oxygen < 0.1)
return 0
if(! (locate(/obj/fire) in src))
@@ -97,7 +97,7 @@ obj
firelevel = air_contents.calculate_firelevel(liquid)
//Ensure that there is an appropriate amount of fuel and O2 here.
- if(firelevel > 0.25 && flow.oxygen > 0.3 && (air_contents.toxins || fuel || liquid))
+ if(firelevel > 0.25 && flow.oxygen > 0.1 && (air_contents.toxins || fuel || liquid))
for(var/direction in cardinal)
if(S.air_check_directions&direction) //Grab all valid bordering tiles
@@ -119,7 +119,7 @@ obj
if(flow)
//Ensure adequate oxygen and fuel.
- if(flow.oxygen > 0.3 && (flow.toxins || fuel || liquid))
+ if(flow.oxygen > 0.1 && (flow.toxins || fuel || liquid))
//Change icon depending on the fuel, and thus temperature.
if(firelevel > 6)
@@ -130,7 +130,7 @@ obj
icon_state = "1"
//Ensure flow temperature is higher than minimum fire temperatures.
- flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature)
+ flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.2,flow.temperature)
//Burn the gas mixture.
if(!flow.zburn(liquid))
@@ -205,11 +205,11 @@ datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid)
fuel_sources++
//Toxins
- if(toxins > 0.3) fuel_sources++
+ if(toxins > 0.1) fuel_sources++
if(!fuel_sources) return 0 //If there's no fuel, there's no burn. Can't divide by zero anyway.
- if(oxygen > 0.3)
+ if(oxygen > 0.1)
//Calculate the firelevel.
var/firelevel = calculate_firelevel(liquid)
diff --git a/code/ZAS/ZAS_Zones.dm b/code/ZAS/ZAS_Zones.dm
index 17867abf266..3e62d95d11b 100644
--- a/code/ZAS/ZAS_Zones.dm
+++ b/code/ZAS/ZAS_Zones.dm
@@ -151,8 +151,10 @@ zone/proc/process()
//Sometimes explosions will cause the air to be deleted for some reason.
if(!air)
air = new()
- air.adjust(MOLES_O2STANDARD, 0, MOLES_N2STANDARD, 0, list())
+ air.oxygen = MOLES_O2STANDARD
+ air.nitrogen = MOLES_N2STANDARD
air.temperature = T0C
+ air.total_moles()
world.log << "Air object lost in zone. Regenerating."
progress = "problem with: ShareSpace()"
@@ -409,7 +411,7 @@ zone/proc/Rebuild()
//
var/list/turfs_to_consider = contents.Copy()
- while(!sample.CanPass(null, sample, 1.5, 1))
+ while(!sample || !sample.CanPass(null, sample, 1.5, 1))
if(sample)
turfs_to_consider.Remove(sample)
sample = locate() in turfs_to_consider
@@ -479,11 +481,11 @@ proc/play_wind_sound(var/turf/random_border, var/n)
if(random_border)
var/windsound = 'sound/effects/wind/wind_2_1.ogg'
switch(n)
- if(0 to 30)
- windsound = pick('sound/effects/wind/wind_2_1.ogg', 'sound/effects/wind/wind_2_2.ogg')
if(31 to 40)
+ windsound = pick('sound/effects/wind/wind_2_1.ogg', 'sound/effects/wind/wind_2_2.ogg')
+ if(41 to 50)
windsound = pick('sound/effects/wind/wind_3_1.ogg')
- if(41 to 60)
+ if(51 to 60)
windsound = pick('sound/effects/wind/wind_4_1.ogg', 'sound/effects/wind/wind_4_2.ogg')
if(61 to 1000000)
windsound = pick('sound/effects/wind/wind_5_1.ogg')
diff --git a/code/ZAS_defines.dm b/code/ZAS_defines.dm
deleted file mode 100644
index 6c14fafad4d..00000000000
--- a/code/ZAS_defines.dm
+++ /dev/null
@@ -1,89 +0,0 @@
-//from setup.dm, which was removed in tgcode
-
-#define MINIMUM_AIR_RATIO_TO_SUSPEND 0.05
- //Minimum ratio of air that must move to/from a tile to suspend group processing
-#define MINIMUM_AIR_TO_SUSPEND MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND
- //Minimum amount of air that has to move before a group processing can be suspended
-
-#define MINIMUM_MOLES_DELTA_TO_MOVE MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND //Either this must be active
-#define MINIMUM_TEMPERATURE_TO_MOVE T20C+100 //or this (or both, obviously)
-
-#define MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND 0.012
-#define MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND 4
- //Minimum temperature difference before group processing is suspended
-#define MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER 0.5
- //Minimum temperature difference before the gas temperatures are just set to be equal
-
-#define MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION T20C+10
-#define MINIMUM_TEMPERATURE_START_SUPERCONDUCTION T20C+200
-
-#define FLOOR_HEAT_TRANSFER_COEFFICIENT 0.08
-#define WALL_HEAT_TRANSFER_COEFFICIENT 0.03
-#define SPACE_HEAT_TRANSFER_COEFFICIENT 0.20 //a hack to partly simulate radiative heat
-#define OPEN_HEAT_TRANSFER_COEFFICIENT 0.40
-#define WINDOW_HEAT_TRANSFER_COEFFICIENT 0.10 //a hack for now
- //Must be between 0 and 1. Values closer to 1 equalize temperature faster
- //Should not exceed 0.4 else strange heat flow occur
-
-#define FIRE_MINIMUM_TEMPERATURE_TO_SPREAD 150+T0C
-#define FIRE_MINIMUM_TEMPERATURE_TO_EXIST 100+T0C
-#define FIRE_SPREAD_RADIOSITY_SCALE 0.85
-#define FIRE_CARBON_ENERGY_RELEASED 500000 //Amount of heat released per mole of burnt carbon into the tile
-#define FIRE_PLASMA_ENERGY_RELEASED 3000000 //Amount of heat released per mole of burnt plasma into the tile
-#define FIRE_GROWTH_RATE 25000 //For small fires
-
-//Plasma fire properties
-#define PLASMA_MINIMUM_BURN_TEMPERATURE 100+T0C
-#define PLASMA_UPPER_TEMPERATURE 1370+T0C
-#define PLASMA_MINIMUM_OXYGEN_NEEDED 2
-#define PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO 30
-#define PLASMA_OXYGEN_FULLBURN 10
-
-#define T0C 273.15 // 0degC
-#define T20C 293.15 // 20degC
-#define TCMB 2.7 // -270.3degC
-
-#define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) // Tank starts leaking
-#define TANK_RUPTURE_PRESSURE (40.*ONE_ATMOSPHERE) // Tank spills all contents into atmosphere
-
-#define TANK_FRAGMENT_PRESSURE (50.*ONE_ATMOSPHERE) // Boom 3x3 base explosion
-#define TANK_FRAGMENT_SCALE (10.*ONE_ATMOSPHERE) // +1 for each SCALE kPa aboe threshold
- // was 2 atm
-
-#define NORMPIPERATE 30 //pipe-insulation rate divisor
-#define HEATPIPERATE 8 //heat-exch pipe insulation
-
-#define FLOWFRAC 0.99 // fraction of gas transfered per process
-
-#define CELL_VOLUME 2500 //liters in a cell
-#define MOLES_CELLSTANDARD (ONE_ATMOSPHERE*CELL_VOLUME/(T20C*R_IDEAL_GAS_EQUATION)) //moles in a 2.5 m^3 cell at 101.325 Pa and 20 degC
-
-#define O2STANDARD 0.21
-#define N2STANDARD 0.79
-
-#define MOLES_O2STANDARD MOLES_CELLSTANDARD*O2STANDARD // O2 standard value (21%)
-#define MOLES_N2STANDARD MOLES_CELLSTANDARD*N2STANDARD // N2 standard value (79%)
-
-#define MOLES_PLASMA_VISIBLE 0.5 //Moles in a standard cell after which plasma is visible
-
-#define SPECIFIC_HEAT_TOXIN 200
-#define SPECIFIC_HEAT_AIR 20
-#define SPECIFIC_HEAT_CDO 30
-#define HEAT_CAPACITY_CALCULATION(oxygen,carbon_dioxide,nitrogen,toxins) \
- (carbon_dioxide*SPECIFIC_HEAT_CDO + (oxygen+nitrogen)*SPECIFIC_HEAT_AIR + toxins*SPECIFIC_HEAT_TOXIN)
-
-#define MINIMUM_HEAT_CAPACITY 0.0003
-#define QUANTIZE(variable) (round(variable,0.0001))
-#define TRANSFER_FRACTION 5 //What fraction (1/#) of the air difference to try and transfer
-
-//from FEA_gas_mixture.dm
-
-#define SPECIFIC_HEAT_TOXIN 200
-#define SPECIFIC_HEAT_AIR 20
-#define SPECIFIC_HEAT_CDO 30
-#define HEAT_CAPACITY_CALCULATION(oxygen,carbon_dioxide,nitrogen,toxins) \
- (carbon_dioxide*SPECIFIC_HEAT_CDO + (oxygen+nitrogen)*SPECIFIC_HEAT_AIR + toxins*SPECIFIC_HEAT_TOXIN)
-
-#define MINIMUM_HEAT_CAPACITY 0.0003
-#define QUANTIZE(variable) (round(variable,0.0001))
-#define TRANSFER_FRACTION 5 //What fraction (1/#) of the air difference to try and transfer
diff --git a/code/__HELPERS/files.dm b/code/__HELPERS/files.dm
index 9d9a3140d26..d804dcb06a9 100644
--- a/code/__HELPERS/files.dm
+++ b/code/__HELPERS/files.dm
@@ -15,4 +15,46 @@
//Sends resource files to client cache
/client/proc/getFiles()
for(var/file in args)
- src << browse_rsc(file)
\ No newline at end of file
+ src << browse_rsc(file)
+
+/client/proc/browse_files(root="data/logs/", max_iterations=10, list/valid_extensions=list(".txt",".log",".htm"))
+ var/path = root
+
+ for(var/i=0, iError: browse_files(): File not found/Invalid file([path])."
+ return
+
+ return path
+
+#define FTPDELAY 200 //200 tick delay to discourage spam
+/* This proc is a failsafe to prevent spamming of file requests.
+ It is just a timer that only permits a download every [FTPDELAY] ticks.
+ This can be changed by modifying FTPDELAY's value above.
+
+ PLEASE USE RESPONSIBLY, Some log files canr each sizes of 4MB! */
+/client/proc/file_spam_check()
+ var/time_to_wait = fileaccess_timer - world.time
+ if(time_to_wait > 0)
+ src << "Error: file_spam_check(): Spam. Please wait [round(time_to_wait/10)] seconds."
+ return 1
+ fileaccess_timer = world.time + FTPDELAY
+ return 0
+#undef FTPDELAY
\ No newline at end of file
diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index 51a3050c1c3..fcdda875a79 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -188,24 +188,29 @@
/proc/get_mobs_in_radio_ranges(var/list/obj/item/device/radio/radios)
- . = list()
+ set background = 1
+
+ . = list()
// Returns a list of mobs who can hear any of the radios given in @radios
var/list/speaker_coverage = list()
- for(var/obj/item/device/radio/R in radios)
+ for(var/i = 1; i <= radios.len; i++)
+ var/obj/item/device/radio/R = radios[i]
+ if(R)
+ var/turf/speaker = get_turf(R)
+ if(speaker)
+ for(var/turf/T in hear(R.canhear_range,speaker))
+ speaker_coverage[T] = T
- var/turf/speaker = get_turf(R)
- if(speaker)
- for(var/turf/T in hear(R.canhear_range,speaker))
- speaker_coverage[T] = T
// Try to find all the players who can hear the message
- for(var/mob/M in player_list)
- var/turf/ear = get_turf(M)
- if(ear)
- if(speaker_coverage[ear])
- . |= M
-
+ for(var/i = 1; i <= player_list.len; i++)
+ var/mob/M = player_list[i]
+ if(M)
+ var/turf/ear = get_turf(M)
+ if(ear)
+ if(speaker_coverage[ear])
+ . |= M
return .
#define SIGN(X) ((X<0)?-1:1)
@@ -275,6 +280,8 @@ proc/isInSight(var/atom/A, var/atom/B)
if(M.ckey == lowertext(key))
return M
return null
+
+//i think this is used soley by verb/give(), cael
proc/check_can_reach(atom/user, atom/target)
if(!in_range(user,target))
return 0
@@ -316,7 +323,6 @@ var/list/DummyCache = list()
return 1
// Will return a list of active candidates. It increases the buffer 5 times until it finds a candidate which is active within the buffer.
-
/proc/get_active_candidates(var/buffer = 1)
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
@@ -344,3 +350,20 @@ var/list/DummyCache = list()
i++
return candidates
+/proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480)
+ if(!isobj(O)) O = new /obj/screen/text()
+ O.maptext = maptext
+ O.maptext_height = maptext_height
+ O.maptext_width = maptext_width
+ O.screen_loc = screen_loc
+ return O
+
+/proc/Show2Group4Delay(obj/O, list/group, delay=0)
+ if(!isobj(O)) return
+ if(!group) group = clients
+ for(var/client/C in group)
+ C.screen += O
+ if(delay)
+ spawn(delay)
+ for(var/client/C in group)
+ C.screen -= O
diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm
index 9cb460a2cbd..d0b8b90d6b5 100644
--- a/code/__HELPERS/global_lists.dm
+++ b/code/__HELPERS/global_lists.dm
@@ -66,4 +66,14 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
for(var/T in paths)
var/datum/surgery_step/S = new T
surgery_steps += S
+/* // Uncomment to debug chemical reaction list.
+/client/verb/debug_chemical_list()
+ for (var/reaction in chemical_reactions_list)
+ . += "chemical_reactions_list\[\"[reaction]\"\] = \"[chemical_reactions_list[reaction]]\"\n"
+ if(islist(chemical_reactions_list[reaction]))
+ var/list/L = chemical_reactions_list[reaction]
+ for(var/t in L)
+ . += " has: [t]\n"
+ world << .
+*/
\ No newline at end of file
diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm
index cfb6d9d2108..7076565f541 100644
--- a/code/__HELPERS/lists.dm
+++ b/code/__HELPERS/lists.dm
@@ -313,4 +313,11 @@ proc/listclearnulls(list/list)
if(index == i)
return key
i++
- return null
\ No newline at end of file
+ return null
+
+/proc/count_by_type(var/list/L, type)
+ var/i = 0
+ for(var/T in L)
+ if(istype(T, type))
+ i++
+ return i
\ No newline at end of file
diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index 68b8db0712a..9156b5b416a 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -15,7 +15,7 @@ proc/random_name(gender, species = "Human")
else return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
proc/random_skin_tone()
- switch(pick(55;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino", 5;"weird"))
+ switch(pick(60;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino"))
if("caucasian") . = -10
if("afroamerican") . = -115
if("african") . = -165
diff --git a/code/__HELPERS/names.dm b/code/__HELPERS/names.dm
index 17488a3d794..7dd535a2fe9 100644
--- a/code/__HELPERS/names.dm
+++ b/code/__HELPERS/names.dm
@@ -265,7 +265,7 @@ var/syndicate_code_response//Code response for traitors.
if(4)
syndicate_code_phrase += pick("I wish I was","My dad was","His mom was","Where do I find","The hero this station needs is","I'd fuck","I wouldn't trust","Someone caught","HoS caught","Someone found","I'd wrestle","I wanna kill")
syndicate_code_phrase += " [pick("a","the")] "
- syndicate_code_phrase += pick("wizard","ninja","xeno","lizard","metroid","monkey","syndicate","cyborg","clown","space carp","singularity","singulo","mime")
+ syndicate_code_phrase += pick("wizard","ninja","xeno","lizard","slime","monkey","syndicate","cyborg","clown","space carp","singularity","singulo","mime")
syndicate_code_phrase += "."
if(5)
syndicate_code_phrase += pick("Do we have","Is there","Where is","Where's","Who's")
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 58150d4ab18..659948266e3 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -474,7 +474,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
moblist.Add(M)
for(var/mob/living/carbon/monkey/M in sortmob)
moblist.Add(M)
- for(var/mob/living/carbon/metroid/M in sortmob)
+ for(var/mob/living/carbon/slime/M in sortmob)
moblist.Add(M)
for(var/mob/living/simple_animal/M in sortmob)
moblist.Add(M)
@@ -1227,6 +1227,13 @@ proc/get_mob_with_client_list()
location = location.loc
return null
+/proc/get(atom/loc, type)
+ while(loc)
+ if(istype(loc, type))
+ return loc
+ loc = loc.loc
+ return null
+
/proc/get_turf_or_move(turf/location)
return get_turf(location)
@@ -1281,6 +1288,11 @@ var/global/list/common_tools = list(
return 1
return 0
+/proc/iswire(O)
+ if(istype(O, /obj/item/weapon/cable_coil))
+ return 1
+ return 0
+
proc/is_hot(obj/item/W as obj)
switch(W.type)
if(/obj/item/weapon/weldingtool)
@@ -1384,7 +1396,7 @@ var/list/WALLITEMS = list(
"/obj/machinery/status_display", "/obj/machinery/requests_console", "/obj/machinery/light_switch", "/obj/effect/sign",
"/obj/machinery/newscaster", "/obj/machinery/firealarm", "/obj/structure/noticeboard", "/obj/machinery/door_control",
"/obj/machinery/computer/security/telescreen", "/obj/machinery/embedded_controller/radio/simple_vent_controller",
- "/obj/item/weapon/secstorage/ssafe", "/obj/machinery/door_timer", "/obj/machinery/flasher", "/obj/machinery/keycard_auth",
+ "/obj/item/weapon/storage/secure/safe", "/obj/machinery/door_timer", "/obj/machinery/flasher", "/obj/machinery/keycard_auth",
"/obj/structure/mirror", "/obj/structure/closet/fireaxecabinet", "/obj/machinery/computer/security/telescreen/entertainment"
)
/proc/gotwallitem(loc, dir)
diff --git a/code/controllers/_DynamicAreaLighting_TG.dm b/code/controllers/_DynamicAreaLighting_TG.dm
index c8f52ef9365..5f876207808 100644
--- a/code/controllers/_DynamicAreaLighting_TG.dm
+++ b/code/controllers/_DynamicAreaLighting_TG.dm
@@ -236,18 +236,24 @@ turf/proc/update_lumcount(amount)
turf/proc/shift_to_subarea()
lighting_changed = 0
-
var/area/Area = loc
+
if(!istype(Area) || !Area.lighting_use_dynamic) return
// change the turf's area depending on its brightness
// restrict light to valid levels
var/light = min(max(round(lighting_lumcount,1),0),lighting_controller.lighting_states)
- var/new_tag = "[Area.type]sd_L[light]"
+
+ var/find = findtextEx(Area.tag, "sd_L")
+ var/new_tag = copytext(Area.tag, 1, find)
+ new_tag += "sd_L[light]"
if(Area.tag!=new_tag) //skip if already in this area
+
var/area/A = locate(new_tag) // find an appropriate area
+
if(!A)
+
A = new Area.type() // create area if it wasn't found
// replicate vars
for(var/V in Area.vars)
@@ -294,73 +300,6 @@ area
//show the dark overlay so areas, not yet in a lighting subarea, won't be bright as day and look silly.
SetLightLevel(4)
-atom
- var/light_on = 0 //Am I emitting light?
- var/brightness_on = 0 //Luminosity when the above: light_on = 1
-
- //Called when turning off or dropping a flashlight for ex.
- //It checks the users slots for another source of light, and return the appropriate brightness. 0 if no other source is found
- proc/search_light(mob/M, obj/item/W as obj)
- var/list/slots
- var/obj/item/I
- var brightness = 0 //the new brightness to be returned
-
- if (istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
- slots = list (
- "l_hand",
- "r_hand",
- "belt",
- "head",
- "l_pocket",
- "r_pocket",
- "s_store")
-
- for (var/slot in slots)
- switch(slot)
- if("belt")
- I = H.belt
- if("head")
- I = H.head
- if("l_hand")
- I = H.l_hand
- if("r_hand")
- I = H.r_hand
- if("l_pocket")
- I = H.l_store
- if("r_pocket")
- I = H.r_store
- if("s_store")
- I = H.s_store
- if (I)
- if ((I.light_on) && (I != W)) //an item emitting light other than itself
- if (I.brightness_on > brightness)
- brightness = I.brightness_on
-
- else if (istype(M, /mob/living/carbon/monkey))
- slots = list (
- "l_hand",
- "r_hand")
-
- for (var/slot in slots)
- switch(slot)
- if("l_hand")
- I = M.l_hand
- if("r_hand")
- I = M.r_hand
- if (I)
- if ((I.light_on) && (I != W)) //an item emitting light other than itself
- if (I.brightness_on > brightness)
- brightness = I.brightness_on
-
- else
- for (I in M.contents) //Justin Case
- if (I)
- if ((I.light_on) && (I != W)) //an item emitting light other than itself
- if (I.brightness_on > brightness)
- brightness = I.brightness_on
-
- return brightness
#undef LIGHTING_MAX_LUMINOSITY
#undef LIGHTING_MAX_LUMINOSITY_MOB
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index fd5ce162544..4311007cbf7 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -33,6 +33,7 @@
var/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other
+ var/continous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
var/allow_Metadata = 0 // Metadata is supported.
var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1.
var/Ticklag = 0.9
@@ -54,6 +55,7 @@
var/load_jobs_from_txt = 0
var/ToRban = 0
var/automute_on = 0 //enables automuting/spam prevention
+ var/jobs_have_minimal_access = 0 //determines whether jobs use minimal access or expanded access.
var/usealienwhitelist = 0
var/limitalienplayers = 0
@@ -100,14 +102,19 @@
var/robot_delay = 0
var/monkey_delay = 0
var/alien_delay = 0
- var/metroid_delay = 0
+ var/slime_delay = 0
var/animal_delay = 0
var/admin_legacy_system = 0 //Defines whether the server uses the legacy admin system with admins.txt or the SQL system. Config option in config.txt
var/ban_legacy_system = 0 //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt
+ var/use_age_restriction_for_jobs = 0 //Do jobs use account age restrictions? --requires database
+
+ var/use_recursive_explosions //Defines whether the server uses recursive or circular explosions.
var/assistant_maint = 0 //Do assistants get maint access?
var/gateway_delay = 18000 //How long the gateway takes before it activates. Default is half an hour.
+ var/ghost_interaction = 0
+
/datum/configuration/New()
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
@@ -160,6 +167,15 @@
if ("ban_legacy_system")
config.ban_legacy_system = 1
+ if ("use_age_restriction_for_jobs")
+ config.use_age_restriction_for_jobs = 1
+
+ if ("jobs_have_minimal_access")
+ config.jobs_have_minimal_access = 1
+
+ if ("use_recursive_explosions")
+ use_recursive_explosions = 1
+
if ("log_ooc")
config.log_ooc = 1
@@ -371,6 +387,12 @@
if("gateway_delay")
config.gateway_delay = text2num(value)
+ if("continuous_rounds")
+ config.continous_rounds = 1
+
+ if("ghost_interaction")
+ config.ghost_interaction = 1
+
else
diary << "Unknown setting in configuration: '[name]'"
@@ -403,8 +425,8 @@
config.monkey_delay = value
if("alien_delay")
config.alien_delay = value
- if("metroid_delay")
- config.metroid_delay = value
+ if("slime_delay")
+ config.slime_delay = value
if("animal_delay")
config.animal_delay = value
if("organ_health_multiplier")
diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm
index 8febf1f0c1e..2247b7c8f30 100644
--- a/code/controllers/master_controller.dm
+++ b/code/controllers/master_controller.dm
@@ -8,6 +8,9 @@ var/global/controller_iteration = 0
var/global/last_tick_timeofday = world.timeofday
var/global/last_tick_duration = 0
+var/global/air_processing_killed = 0
+var/global/pipe_processing_killed = 0
+
datum/controller/game_controller
var/processing = 0
var/breather_ticks = 2 //a somewhat crude attempt to iron over the 'bumps' caused by high-cpu use by letting the MC have a breather for this many ticks after every loop
@@ -21,6 +24,7 @@ datum/controller/game_controller
var/objects_cost = 0
var/networks_cost = 0
var/powernets_cost = 0
+ var/events_cost = 0
var/ticker_cost = 0
var/total_cost = 0
@@ -69,7 +73,7 @@ datum/controller/game_controller/proc/setup()
datum/controller/game_controller/proc/setup_objects()
world << "\red \b Initializing objects"
sleep(-1)
- for(var/obj/object in world)
+ for(var/atom/movable/object in world)
object.initialize()
world << "\red \b Initializing pipe networks"
@@ -110,15 +114,14 @@ datum/controller/game_controller/proc/process()
vote.process()
//AIR
- /*timer = world.timeofday
- last_thing_processed = air_master.type
- air_master.process()
- air_cost = (world.timeofday - timer) / 10*/
- // this might make atmos slower
+ if(!air_processing_killed)
+ timer = world.timeofday
+ last_thing_processed = air_master.type
+ air_master.tick()
+ air_cost = (world.timeofday - timer) / 10 // this might make atmos slower
// 1. atmos won't process if the game is generally lagged out(no deadlocks)
- // 2. if the server frequently crashes during atmos processing we will know
- if(!kill_air)
+ // 2. if the server frequently crashes during atmos processing we will knowif(!kill_air)
//src.set_debug_state("Air Master")
air_master.current_cycle++
@@ -130,10 +133,7 @@ datum/controller/game_controller/proc/process()
world << "RUNTIMES IN ATMOS TICKER. Killing air simulation!"
kill_air = 1
air_master.failed_ticks = 0
- /*else if (air_master.failed_ticks > 10)
- air_master.failed_ticks = 0*/
- //air_master_ready = 1
-
+ air_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
@@ -147,97 +147,51 @@ datum/controller/game_controller/proc/process()
//MOBS
timer = world.timeofday
- var/i = 1
- while(i<=mob_list.len)
- var/mob/M = mob_list[i]
- if(M)
- last_thing_processed = M.type
- M.Life()
- i++
- continue
- mob_list.Cut(i,i+1)
+ process_mobs()
mobs_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//DISEASES
timer = world.timeofday
- i = 1
- while(i<=active_diseases.len)
- var/datum/disease/Disease = active_diseases[i]
- if(Disease)
- last_thing_processed = Disease.type
- Disease.process()
- i++
- continue
- active_diseases.Cut(i,i+1)
+ process_diseases()
diseases_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//MACHINES
timer = world.timeofday
- i = 1
- while(i<=machines.len)
- var/obj/machinery/Machine = machines[i]
- if(Machine)
- last_thing_processed = Machine.type
- if(Machine.process() != PROCESS_KILL)
- if(Machine)
- if(Machine.use_power)
- Machine.auto_use_power()
- i++
- continue
- machines.Cut(i,i+1)
+ process_machines()
machines_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//OBJECTS
timer = world.timeofday
- i = 1
- while(i<=processing_objects.len)
- var/obj/Object = processing_objects[i]
- if(Object)
- last_thing_processed = Object.type
- Object.process()
- i++
- continue
- processing_objects.Cut(i,i+1)
+ process_objects()
objects_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//PIPENETS
- timer = world.timeofday
- last_thing_processed = /datum/pipe_network
- i = 1
- while(i<=pipe_networks.len)
- var/datum/pipe_network/Network = pipe_networks[i]
- if(Network)
- Network.process()
- i++
- continue
- pipe_networks.Cut(i,i+1)
- networks_cost = (world.timeofday - timer) / 10
+ if(!pipe_processing_killed)
+ timer = world.timeofday
+ process_pipenets()
+ networks_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//POWERNETS
timer = world.timeofday
- last_thing_processed = /datum/powernet
- i = 1
- while(i<=powernets.len)
- var/datum/powernet/Powernet = powernets[i]
- if(Powernet)
- Powernet.reset()
- i++
- continue
- powernets.Cut(i,i+1)
+ process_powernets()
powernets_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
+ //EVENTS
+ timer = world.timeofday
+ events_cost = (world.timeofday - timer) / 10
+
//TICKER
timer = world.timeofday
last_thing_processed = ticker.type
@@ -245,7 +199,7 @@ datum/controller/game_controller/proc/process()
ticker_cost = (world.timeofday - timer) / 10
//TIMING
- total_cost = air_cost + sun_cost + mobs_cost + diseases_cost + machines_cost + objects_cost + networks_cost + powernets_cost + ticker_cost
+ total_cost = air_cost + sun_cost + mobs_cost + diseases_cost + machines_cost + objects_cost + networks_cost + powernets_cost + events_cost + ticker_cost
var/end_time = world.timeofday
if(end_time < start_time)
@@ -254,6 +208,75 @@ datum/controller/game_controller/proc/process()
else
sleep(10)
+datum/controller/game_controller/proc/process_mobs()
+ var/i = 1
+ while(i<=mob_list.len)
+ var/mob/M = mob_list[i]
+ if(M)
+ last_thing_processed = M.type
+ M.Life()
+ i++
+ continue
+ mob_list.Cut(i,i+1)
+
+datum/controller/game_controller/proc/process_diseases()
+ var/i = 1
+ while(i<=active_diseases.len)
+ var/datum/disease/Disease = active_diseases[i]
+ if(Disease)
+ last_thing_processed = Disease.type
+ Disease.process()
+ i++
+ continue
+ active_diseases.Cut(i,i+1)
+
+datum/controller/game_controller/proc/process_machines()
+ var/i = 1
+ while(i<=machines.len)
+ var/obj/machinery/Machine = machines[i]
+ if(Machine)
+ last_thing_processed = Machine.type
+ if(Machine.process() != PROCESS_KILL)
+ if(Machine)
+ if(Machine.use_power)
+ Machine.auto_use_power()
+ i++
+ continue
+ machines.Cut(i,i+1)
+
+datum/controller/game_controller/proc/process_objects()
+ var/i = 1
+ while(i<=processing_objects.len)
+ var/obj/Object = processing_objects[i]
+ if(Object)
+ last_thing_processed = Object.type
+ Object.process()
+ i++
+ continue
+ processing_objects.Cut(i,i+1)
+
+datum/controller/game_controller/proc/process_pipenets()
+ last_thing_processed = /datum/pipe_network
+ var/i = 1
+ while(i<=pipe_networks.len)
+ var/datum/pipe_network/Network = pipe_networks[i]
+ if(Network)
+ Network.process()
+ i++
+ continue
+ pipe_networks.Cut(i,i+1)
+
+datum/controller/game_controller/proc/process_powernets()
+ last_thing_processed = /datum/powernet
+ var/i = 1
+ while(i<=powernets.len)
+ var/datum/powernet/Powernet = powernets[i]
+ if(Powernet)
+ Powernet.reset()
+ i++
+ continue
+ powernets.Cut(i,i+1)
+
datum/controller/game_controller/proc/Recover() //Mostly a placeholder for now.
var/msg = "## DEBUG: [time2text(world.timeofday)] MC restarted. Reports:\n"
for(var/varname in master_controller.vars)
diff --git a/code/controllers/shuttle_controller.dm b/code/controllers/shuttle_controller.dm
index 7a4dc5f533f..4468f476b2e 100644
--- a/code/controllers/shuttle_controller.dm
+++ b/code/controllers/shuttle_controller.dm
@@ -22,29 +22,29 @@ datum/shuttle_controller
var/timelimit //important when the shuttle gets called for more than shuttlearrivetime
//timeleft = 360 //600
var/fake_recall = 0 //Used in rounds to prevent "ON NOES, IT MUST [INSERT ROUND] BECAUSE SHUTTLE CAN'T BE CALLED"
+
+ var/always_fake_recall = 0
var/deny_shuttle = 0 //for admins not allowing it to be called.
var/departed = 0
-
// call the shuttle
// if not called before, set the endtime to T+600 seconds
// otherwise if outgoing, switch to incoming
proc/incall(coeff = 1)
if(deny_shuttle && alert == 1) //crew transfer shuttle does not gets recalled by gamemode
return
-
if(endtime)
if(direction == -1)
setdirection(1)
else
settimeleft(SHUTTLEARRIVETIME*coeff)
online = 1
- //turning on the red lights in hallways
+ if(always_fake_recall)
+ fake_recall = rand(300,500) //turning on the red lights in hallways
if(alert == 0)
for(var/area/A in world)
if(istype(A, /area/hallway))
A.readyalert()
-
proc/shuttlealert(var/X)
alert = X
@@ -241,7 +241,7 @@ datum/shuttle_controller
else if((fake_recall != 0) && (timeleft <= fake_recall))
recall()
-
+ fake_recall = 0
return 0
/* --- Shuttle has docked with the station - begin countdown to transit --- */
diff --git a/code/controllers/voting.dm b/code/controllers/voting.dm
index e86fed1747b..a7e8e4b230a 100644
--- a/code/controllers/voting.dm
+++ b/code/controllers/voting.dm
@@ -174,6 +174,8 @@ datum/controller/vote
initiator = initiator_key
started_time = world.time
var/text = "[capitalize(mode)] vote started by [initiator]."
+ if(mode == "custom")
+ text += "\n[question]"
log_vote(text)
world << "[text]\nType vote to place your votes.\nYou have [config.vote_period/10] seconds to vote."
time_remaining = round(config.vote_period/10)
diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index 30b166862bc..6d9ecca0efb 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -246,12 +246,15 @@ client
if(ismob(D))
body += ""
body += ""
- body += ""
body += ""
body += ""
- body += ""
+
+ body += ""
body += ""
+
+ body += ""
body += ""
+
body += ""
if(ishuman(D))
body += ""
@@ -260,7 +263,7 @@ client
body += ""
body += ""
body += ""
- body += ""
+ body += ""
body += ""
body += ""
if(isobj(D))
@@ -407,7 +410,7 @@ client
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
else if(href_list["rename"])
- if(!check_rights(0)) return
+ if(!check_rights(R_VAREDIT)) return
var/mob/M = locate(href_list["rename"])
if(!istype(M))
@@ -422,7 +425,7 @@ client
href_list["datumrefresh"] = href_list["rename"]
else if(href_list["varnameedit"] && href_list["datumedit"])
- if(!check_rights(0)) return
+ if(!check_rights(R_VAREDIT)) return
var/D = locate(href_list["datumedit"])
if(!istype(D,/datum) && !istype(D,/client))
@@ -432,7 +435,7 @@ client
modify_variables(D, href_list["varnameedit"], 1)
else if(href_list["varnamechange"] && href_list["datumchange"])
- if(!check_rights(0)) return
+ if(!check_rights(R_VAREDIT)) return
var/D = locate(href_list["datumchange"])
if(!istype(D,/datum) && !istype(D,/client))
@@ -442,7 +445,7 @@ client
modify_variables(D, href_list["varnamechange"], 0)
else if(href_list["varnamemass"] && href_list["datummass"])
- if(!check_rights(0)) return
+ if(!check_rights(R_VAREDIT)) return
var/atom/A = locate(href_list["datummass"])
if(!istype(A))
@@ -463,7 +466,7 @@ client
href_list["datumrefresh"] = href_list["mob_player_panel"]
else if(href_list["give_spell"])
- if(!check_rights(0)) return
+ if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_spell"])
if(!istype(M))
@@ -474,7 +477,7 @@ client
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["give_disease"])
- if(!check_rights(0)) return
+ if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_disease"])
if(!istype(M))
@@ -485,7 +488,7 @@ client
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["ninja"])
- if(!check_rights(0)) return
+ if(!check_rights(R_SPAWN)) return
var/mob/M = locate(href_list["ninja"])
if(!istype(M))
@@ -528,7 +531,7 @@ client
href_list["datumrefresh"] = href_list["build_mode"]
else if(href_list["drop_everything"])
- if(!check_rights(0)) return
+ if(!check_rights(R_DEBUG|R_ADMIN)) return
var/mob/M = locate(href_list["drop_everything"])
if(!istype(M))
@@ -550,7 +553,7 @@ client
usr.client.cmd_assume_direct_control(M)
else if(href_list["make_skeleton"])
- if(!check_rights(0)) return
+ if(!check_rights(R_FUN)) return
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
if(!istype(H))
@@ -604,7 +607,7 @@ client
message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
else if(href_list["explode"])
- if(!check_rights(0)) return
+ if(!check_rights(R_DEBUG|R_FUN)) return
var/atom/A = locate(href_list["explode"])
if(!isobj(A) && !ismob(A) && !isturf(A))
@@ -615,7 +618,7 @@ client
href_list["datumrefresh"] = href_list["explode"]
else if(href_list["emp"])
- if(!check_rights(0)) return
+ if(!check_rights(R_DEBUG|R_FUN)) return
var/atom/A = locate(href_list["emp"])
if(!isobj(A) && !ismob(A) && !isturf(A))
@@ -650,7 +653,7 @@ client
href_list["datumrefresh"] = href_list["rotatedatum"]
else if(href_list["makemonkey"])
- if(!check_rights(0)) return
+ if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
if(!istype(H))
@@ -664,7 +667,7 @@ client
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
else if(href_list["makerobot"])
- if(!check_rights(0)) return
+ if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
if(!istype(H))
@@ -678,7 +681,7 @@ client
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
else if(href_list["makealien"])
- if(!check_rights(0)) return
+ if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makealien"])
if(!istype(H))
@@ -691,10 +694,10 @@ client
return
holder.Topic(href, list("makealien"=href_list["makealien"]))
- else if(href_list["makemetroid"])
- if(!check_rights(0)) return
+ else if(href_list["makeslime"])
+ if(!check_rights(R_SPAWN)) return
- var/mob/living/carbon/human/H = locate(href_list["makemetroid"])
+ var/mob/living/carbon/human/H = locate(href_list["makeslime"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
@@ -703,10 +706,10 @@ client
if(!H)
usr << "Mob doesn't exist anymore"
return
- holder.Topic(href, list("makemetroid"=href_list["makemetroid"]))
+ holder.Topic(href, list("makeslime"=href_list["makeslime"]))
else if(href_list["makeai"])
- if(!check_rights(0)) return
+ if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makeai"])
if(!istype(H))
@@ -720,17 +723,19 @@ client
holder.Topic(href, list("makeai"=href_list["makeai"]))
else if(href_list["setmutantrace"])
- if(!check_rights(0)) return
+ if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["setmutantrace"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
- var/new_mutantrace = input("Please choose a new mutantrace","Mutantrace",null) as null|anything in list("NONE","golem","lizard","metroid","plant","shadow","tajaran","skrell")
+ var/new_mutantrace = input("Please choose a new mutantrace","Mutantrace",null) as null|anything in list("NONE","golem","lizard","slime","plant","shadow","tajaran","skrell")
switch(new_mutantrace)
- if(null) return
- if("NONE") new_mutantrace = ""
+ if(null)
+ return
+ if("NONE")
+ new_mutantrace = ""
if(!H)
usr << "Mob doesn't exist anymore"
return
@@ -748,7 +753,7 @@ client
M.regenerate_icons()
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
- if(!check_rights(0)) return
+ if(!check_rights(R_DEBUG|R_ADMIN|R_FUN)) return
var/mob/living/L = locate(href_list["mobToDamage"])
if(!istype(L)) return
diff --git a/code/datums/disease.dm b/code/datums/disease.dm
index 20ae8d54c7e..68c1bf105d3 100644
--- a/code/datums/disease.dm
+++ b/code/datums/disease.dm
@@ -44,7 +44,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
var/permeability_mod = 1//permeability modifier coefficient.
var/desc = null//description. Leave it null and this disease won't show in med records.
var/severity = null//severity descr
- var/longevity = 250//time in "ticks" the virus stays in inanimate object (blood stains, corpses, etc). In syringes, bottles and beakers it stays infinitely.
+ var/longevity = 150//time in "ticks" the virus stays in inanimate object (blood stains, corpses, etc). In syringes, bottles and beakers it stays infinitely.
var/list/hidden = list(0, 0)
var/can_carry = 1 // If the disease allows "carriers".
var/age = 0 // age of the disease in the current mob
@@ -62,19 +62,17 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
return
spread = (cure_present?"Remissive":initial_spread)
-
if(stage > max_stages)
stage = max_stages
- if(stage < max_stages && prob(stage_prob) && !cure_present) //now the disease shouldn't get back up to stage 4 in no time
- stage++
- //world << "up"
- if(stage > 0 && (cure_present && prob(cure_chance)))
- stage--
- //world << "down"
+ if(!cure_present && prob(stage_prob) && age > stage_minimum_age) //now the disease shouldn't get back up to stage 4 in no time
+ stage = min(stage + 1, max_stages)
+ age = 0
+
+ else if(cure_present && prob(cure_chance))
+ stage = max(stage - 1, 1)
if(stage <= 1 && ((prob(1) && curable) || (cure_present && prob(cure_chance))))
-// world << "Cured as stage act"
cure()
return
return
@@ -178,8 +176,8 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
if(resistance && !(type in affected_mob.resistances))
var/saved_type = "[type]"
affected_mob.resistances += text2path(saved_type)
- if(istype(src, /datum/disease/alien_embryo)) //Get rid of the infection flag if it's a xeno embryo.
- affected_mob.status_flags &= ~(XENO_HOST)
+ /*if(istype(src, /datum/disease/alien_embryo)) //Get rid of the infection flag if it's a xeno embryo.
+ affected_mob.status_flags &= ~(XENO_HOST)*/
affected_mob.viruses -= src //remove the datum from the list
del(src) //delete the datum to stop it processing
return
@@ -187,7 +185,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
/datum/disease/New(var/process=1, var/datum/disease/D)//process = 1 - adding the object to global list. List is processed by master controller.
cure_list = list(cure_id) // to add more cures, add more vars to this list in the actual disease's New()
- if(process) // Viruses in list are considered active.
+ if(process) // Viruses in list are considered active.
active_diseases += src
initial_spread = spread
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index 939960d5fe9..95adc92dcc3 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -94,15 +94,12 @@ var/list/advance_cures = list(
// Compares type then ID.
/datum/disease/advance/IsSame(var/datum/disease/advance/D)
- if(!(istype(D, /datum/disease/advance)))
- //error("Returning 0 because not same type.")
+ if(!(istype(D, /datum/disease/advance)))
return 0
- //error("Comparing [src.GetDiseaseID()] [D.GetDiseaseID()]")
+
if(src.GetDiseaseID() != D.GetDiseaseID())
- //error("Returing 0")
return 0
- //error("Returning 1")
return 1
// To add special resistances.
@@ -416,4 +413,11 @@ var/list/advance_cures = list(
name_symptoms += S.name
message_admins("[key_name_admin(user)] has triggered a custom virus outbreak of [D.name]! It has these symptoms: [english_list(name_symptoms)]")
+/*
+/mob/verb/test()
+
+ for(var/datum/disease/D in active_diseases)
+ src << "[D.name] - [D.holder]"
+*/
+
#undef RANDOM_STARTING_LEVEL
\ No newline at end of file
diff --git a/code/datums/diseases/advance/symptoms/vomit.dm b/code/datums/diseases/advance/symptoms/vomit.dm
index 1fe08646e88..79a3d82c7c4 100644
--- a/code/datums/diseases/advance/symptoms/vomit.dm
+++ b/code/datums/diseases/advance/symptoms/vomit.dm
@@ -86,7 +86,7 @@ Bonus
// They lose blood and health.
var/brute_dam = M.getBruteLoss()
- if(brute_dam >= 50)
+ if(brute_dam < 50)
M.adjustBruteLoss(3)
var/turf/pos = get_turf(M)
diff --git a/code/datums/diseases/alien_embryo.dm b/code/datums/diseases/alien_embryo.dm
index 9d3fcd6d4ae..631c93b26c4 100644
--- a/code/datums/diseases/alien_embryo.dm
+++ b/code/datums/diseases/alien_embryo.dm
@@ -1,5 +1,7 @@
//affected_mob.contract_disease(new /datum/disease/alien_embryo)
+//cael - retained this file for legacy reference, see code\modules\mob\living\carbon\alien\special\alien_embryo.dm for replacement
+
//Our own special process so that dead hosts still chestburst
/datum/disease/alien_embryo/process()
if(!holder) return
@@ -98,6 +100,9 @@
gibbed = 1
return
+/datum/disease/alien_embryo/stage_change(var/old_stage)
+ RefreshInfectionImage()
+
/*----------------------------------------
Proc: RefreshInfectionImage()
Des: Removes all infection images from aliens and places an infection image on all infected mobs for aliens.
@@ -107,7 +112,7 @@ Des: Removes all infection images from aliens and places an infection image on a
for (var/mob/living/carbon/alien/alien in player_list)
if (alien.client)
for(var/image/I in alien.client.images)
- if(I.icon_state == "infected")
+ if(dd_hasprefix_case(I.icon_state, "infected"))
del(I)
for (var/mob/living/carbon/alien/alien in player_list)
@@ -115,7 +120,7 @@ Des: Removes all infection images from aliens and places an infection image on a
for (var/mob/living/carbon/C in mob_list)
if(C)
if (C.status_flags & XENO_HOST)
- var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected")
+ var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[stage]")
alien.client.images += I
return
@@ -128,7 +133,7 @@ Des: Checks if the passed mob (C) is infected with the alien egg, then gives eac
for (var/mob/living/carbon/alien/alien in player_list)
if (alien.client)
if (C.status_flags & XENO_HOST)
- var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected")
+ var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[stage]")
alien.client.images += I
return
@@ -143,6 +148,6 @@ Des: Removes the alien infection image from all aliens in the world located in p
if (alien.client)
for(var/image/I in alien.client.images)
if(I.loc == C)
- if(I.icon_state == "infected")
+ if(dd_hasprefix_case(I.icon_state, "infected"))
del(I)
return
diff --git a/code/datums/diseases/appendicitis.dm b/code/datums/diseases/appendicitis.dm
index ee579a294d5..16b4008fef0 100644
--- a/code/datums/diseases/appendicitis.dm
+++ b/code/datums/diseases/appendicitis.dm
@@ -12,43 +12,40 @@
severity = "Medium"
longevity = 1000
hidden = list(0, 1)
- stage_minimum_age = 300 // at least 200 life ticks per stage
+ stage_minimum_age = 160 // at least 200 life ticks per stage
/datum/disease/appendicitis/stage_act()
..()
- switch(stage)
- if(1)
- if(affected_mob.op_stage.appendix == 2.0)
- // appendix is removed, can't get infected again
- src.cure()
- if(prob(5))
- affected_mob << "\red You feel a stinging pain in your abdomen!"
- affected_mob.emote("me",1,"winces slightly.")
- if(2)
- if(prob(3))
- affected_mob << "\red You feel a stabbing pain in your abdomen!"
- affected_mob.emote("me",1,"winces painfully.")
- affected_mob.adjustToxLoss(1)
- if(3)
- if(prob(1))
- if (affected_mob.nutrition > 100)
- var/mob/living/carbon/human/H = affected_mob
- H.vomit()
- else
- affected_mob << "\red You gag as you want to throw up, but there's nothing in your stomach!"
- affected_mob.Weaken(10)
- affected_mob.adjustToxLoss(3)
-
- if(4)
- if(prob(1) && ishuman(affected_mob))
+ if(stage == 1)
+ if(affected_mob.op_stage.appendix == 2.0)
+ // appendix is removed, can't get infected again
+ src.cure()
+ if(prob(5))
+ affected_mob << "\red You feel a stinging pain in your abdomen!"
+ affected_mob.emote("me",1,"winces slightly.")
+ if(stage > 1)
+ if(prob(3))
+ affected_mob << "\red You feel a stabbing pain in your abdomen!"
+ affected_mob.emote("me",1,"winces painfully.")
+ affected_mob.adjustToxLoss(1)
+ if(stage > 2)
+ if(prob(1))
+ if (affected_mob.nutrition > 100)
var/mob/living/carbon/human/H = affected_mob
- H << "\red Your abdomen is a world of pain!"
- H.Weaken(10)
- H.op_stage.appendix = 2.0
+ H.vomit()
+ else
+ affected_mob << "\red You gag as you want to throw up, but there's nothing in your stomach!"
+ affected_mob.Weaken(10)
+ affected_mob.adjustToxLoss(3)
+ if(stage > 3)
+ if(prob(1) && ishuman(affected_mob))
+ var/mob/living/carbon/human/H = affected_mob
+ H << "\red Your abdomen is a world of pain!"
+ H.Weaken(10)
+ H.op_stage.appendix = 2.0
- var/datum/organ/external/groin = H.get_organ("groin")
- var/datum/wound/W = new /datum/wound/internal_bleeding(25)
- H.adjustToxLoss(25)
- groin.wounds += W
-
- src.cure()
+ var/datum/organ/external/groin = H.get_organ("groin")
+ var/datum/wound/W = new /datum/wound/internal_bleeding(25)
+ H.adjustToxLoss(25)
+ groin.wounds += W
+ src.cure()
diff --git a/code/datums/diseases/brainrot.dm b/code/datums/diseases/brainrot.dm
index ea43be7f751..55e5db82d6b 100644
--- a/code/datums/diseases/brainrot.dm
+++ b/code/datums/diseases/brainrot.dm
@@ -3,8 +3,8 @@
max_stages = 4
spread = "On contact"
spread_type = CONTACT_GENERAL
- cure = "Spaceacillin & Alkysine"
- cure_id = list("alkysine","spaceacillin")
+ cure = "Alkysine"
+ cure_id = list("alkysine")
agent = "Cryptococcus Cosmosis"
affected_species = list("Human")
curable = 0
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 3902fb2ce4d..82f2e0ffad3 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -368,7 +368,7 @@ datum/mind
if(!def_value)//If it's a custom objective, it will be an empty string.
def_value = "custom"
- var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "debrain", "protect", "hijack", "escape", "survive", "steal", "download", "nuclear", "capture", "absorb", "custom")
+ var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "debrain", "protect", "prevent", "hijack", "escape", "survive", "steal", "download", "nuclear", "capture", "absorb", "custom")
if (!new_obj_type) return
var/datum/objective/new_objective = null
@@ -406,6 +406,10 @@ datum/mind
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
new_objective.explanation_text = "[objective_type] [new_target:real_name], the [new_target:mind:assigned_role=="MODE" ? (new_target:mind:special_role) : (new_target:mind:assigned_role)]."
+ if ("prevent")
+ new_objective = new /datum/objective/block
+ new_objective.owner = src
+
if ("hijack")
new_objective = new /datum/objective/hijack
new_objective.owner = src
@@ -647,6 +651,7 @@ datum/mind
ticker.mode.changelings -= src
special_role = null
current.remove_changeling_powers()
+ current.verbs -= /datum/changeling/proc/EvolutionMenu
if(changeling) del(changeling)
current << "You grow weak and lose your powers! You are no longer a changeling and are stuck in your current form!"
log_admin("[key_name_admin(usr)] has de-changeling'ed [current].")
@@ -1139,10 +1144,10 @@ datum/mind
/mob/living/carbon/monkey/mind_initialize()
..()
-//METROID
-/mob/living/carbon/metroid/mind_initialize()
+//slime
+/mob/living/carbon/slime/mind_initialize()
..()
- mind.assigned_role = "Metroid"
+ mind.assigned_role = "slime"
//XENO
/mob/living/carbon/alien/mind_initialize()
diff --git a/code/datums/organs/organ_external.dm b/code/datums/organs/organ_external.dm
index 4b92cb04e17..74c28006266 100644
--- a/code/datums/organs/organ_external.dm
+++ b/code/datums/organs/organ_external.dm
@@ -175,7 +175,7 @@
else if(W.damage_type == BURN)
burn_dam += W.damage
- if(W.bleeding())
+ if(!(status & ORGAN_ROBOT) && W.bleeding())
status |= ORGAN_BLEEDING
number_wounds += W.amount
@@ -224,6 +224,7 @@
proc/clamp()
var/rval = 0
+ src.status &= ~ORGAN_BLEEDING
for(var/datum/wound/W in wounds)
if(W.internal) continue
rval |= !W.clamped
@@ -272,6 +273,7 @@
if(germ_level > 0)
for(var/datum/wound/W in wounds) if(!W.bandaged && !W.salved)
W.germ_level = max(W.germ_level, germ_level)
+ update_icon()
return
proc/fracture()
@@ -489,7 +491,8 @@
switch(type)
if(CUT)
- src.status |= ORGAN_BLEEDING
+ if(!(status & ORGAN_ROBOT))
+ src.status |= ORGAN_BLEEDING
var/list/size_names = list(/datum/wound/cut, /datum/wound/deep_cut, /datum/wound/flesh_wound, /datum/wound/gaping_wound, /datum/wound/big_gaping_wound, /datum/wound/massive_wound)
wound_type = size_names[size]
@@ -508,7 +511,7 @@
// Possibly trigger an internal wound, too.
var/local_damage = brute_dam + burn_dam + damage
- if(damage > 10 && type != BURN && local_damage > 20 && prob(damage))
+ if(damage > 10 && type != BURN && local_damage > 20 && prob(damage) && !(status & ORGAN_ROBOT))
var/datum/wound/internal_bleeding/I = new (15)
wounds += I
owner.custom_pain("You feel something rip in your [display_name]!", 1)
@@ -610,11 +613,12 @@
take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
..(brute, burn, sharp, used_weapon, forbidden_limbs)
- if (brute_dam > 40)
- if (prob(50))
- disfigure("brute")
- if (burn_dam > 40)
- disfigure("burn")
+ if (!disfigured)
+ if (brute_dam > 40)
+ if (prob(50))
+ disfigure("brute")
+ if (burn_dam > 40)
+ disfigure("burn")
proc/disfigure(var/type = "brute")
if (disfigured)
diff --git a/code/datums/spells/area_teleport.dm b/code/datums/spells/area_teleport.dm
index 741055f984d..b2ced9fa0d5 100644
--- a/code/datums/spells/area_teleport.dm
+++ b/code/datums/spells/area_teleport.dm
@@ -42,11 +42,24 @@
if(clear)
L+=T
- var/attempt = 0
+ if(!L.len)
+ usr <<"The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry."
+ return
+
+ if(target && target.buckled)
+ target.buckled.unbuckle()
+
+ var/list/tempL = L
+ var/attempt = null
var/success = 0
- while(!success)
- success = target.Move(pick(L))
- if(attempt > 20) break //Failsafe
+ while(tempL.len)
+ attempt = pick(tempL)
+ success = target.Move(attempt)
+ if(!success)
+ tempL.Remove(attempt)
+ else
+ break
+
if(!success)
target.loc = pick(L)
diff --git a/code/datums/spells/conjure.dm b/code/datums/spells/conjure.dm
index 7abd31fa381..233b60d31c1 100644
--- a/code/datums/spells/conjure.dm
+++ b/code/datums/spells/conjure.dm
@@ -25,7 +25,7 @@
for(var/i=0,iNo target found in range."
+ return
+
+ var/mob/living/carbon/target = targets[1]
+
+ if(!(target.type in compatible_mobs))
+ user << "It'd be stupid to curse [target] with a horse's head!"
+ return
+
+ if(!(target in oview(range)))//If they are not in overview after selection.
+ user << "They are too far away!"
+ return
+
+ var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead
+ magichead.canremove = 0 //curses!
+ magichead.flags_inv = null //so you can still see their face
+ magichead.voicechange = 1 //NEEEEIIGHH
+ target.visible_message( "[target]'s face lights up in fire, and after the event a horse's head takes its place!", \
+ "Your face burns up, and shortly after the fire you realise you have the face of a horse!")
+ target.equip_to_slot(magichead, slot_wear_mask)
+
+ flick("e_flash", target.flash)
diff --git a/code/datums/spells/inflict_handler.dm b/code/datums/spells/inflict_handler.dm
index 58783eb9c2b..ac85b18ae3b 100644
--- a/code/datums/spells/inflict_handler.dm
+++ b/code/datums/spells/inflict_handler.dm
@@ -23,6 +23,13 @@
switch(destroys)
if("gib")
target.gib()
+ if("gib_brain")
+ if(ishuman(target) || ismonkey(target))
+ var/mob/living/carbon/C = target
+ if(C.brain_op_stage != 4) // Their brain is already taken out
+ var/obj/item/brain/B = new(C.loc)
+ B.transfer_identity(C)
+ target.gib()
if("disintegrate")
target.dust()
diff --git a/code/datums/spells/wizard.dm b/code/datums/spells/wizard.dm
index 760079bc9ac..6e9db54b477 100644
--- a/code/datums/spells/wizard.dm
+++ b/code/datums/spells/wizard.dm
@@ -54,7 +54,7 @@
invocation_type = "shout"
range = 1
- destroys = "gib"
+ destroys = "gib_brain"
sparks_spread = 1
sparks_amt = 4
@@ -138,8 +138,8 @@
/obj/effect/proc_holder/spell/aoe_turf/conjure/carp
- name = "Summon Bigger Carp"
- desc = "This spell conjures an elite carp."
+ name = "Summon Carp"
+ desc = "This spell conjures a simple carp."
school = "conjuration"
charge_max = 1200
@@ -148,7 +148,7 @@
invocation_type = "shout"
range = 1
- summon_type = list("/obj/effect/critter/spesscarp/elite")
+ summon_type = list(/mob/living/simple_animal/hostile/carp)
/obj/effect/proc_holder/spell/aoe_turf/conjure/construct
@@ -162,7 +162,7 @@
invocation_type = "none"
range = 0
- summon_type = list("/obj/structure/constructshell")
+ summon_type = list(/obj/structure/constructshell)
/obj/effect/proc_holder/spell/aoe_turf/conjure/creature
@@ -177,7 +177,7 @@
summon_amt = 10
range = 3
- summon_type = list("/obj/effect/critter/creature")
+ summon_type = list(/mob/living/simple_animal/hostile/creature)
/obj/effect/proc_holder/spell/targeted/trigger/blind
name = "Blind"
@@ -200,26 +200,27 @@
disabilities = 1
duration = 300
-/obj/effect/proc_holder/spell/targeted/projectile/fireball
+/obj/effect/proc_holder/spell/dumbfire/fireball
name = "Fireball"
desc = "This spell fires a fireball at a target and does not require wizard garb."
school = "evocation"
- charge_max = 200
+ charge_max = 100
clothes_req = 0
invocation = "ONI SOMA"
invocation_type = "shout"
+ range = 20
proj_icon_state = "fireball"
proj_name = "a fireball"
- proj_lingering = 1
- proj_type = "/obj/effect/proc_holder/spell/targeted/trigger/fireball"
+ proj_type = "/obj/effect/proc_holder/spell/turf/fireball"
proj_lifespan = 200
proj_step_delay = 1
-/obj/effect/proc_holder/spell/targeted/trigger/fireball
- starting_spells = list("/obj/effect/proc_holder/spell/targeted/inflict_handler/fireball","/obj/effect/proc_holder/spell/targeted/explosion/fireball")
+/obj/effect/proc_holder/spell/turf/fireball/cast(var/turf/T)
+ explosion(T, -1, 1, 2, 3)
+
/obj/effect/proc_holder/spell/targeted/inflict_handler/fireball
amt_dam_brute = 20
@@ -251,7 +252,7 @@
invocation = "none"
invocation_type = "none"
range = 0
- summon_type = list("/turf/simulated/floor/engine/cult")
+ summon_type = list(/turf/simulated/floor/engine/cult)
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall
@@ -264,7 +265,7 @@
invocation = "none"
invocation_type = "none"
range = 0
- summon_type = list("/turf/simulated/wall/cult")
+ summon_type = list(/turf/simulated/wall/cult)
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall/reinforced
@@ -280,7 +281,7 @@
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
delay = 50
- summon_type = list("/turf/simulated/wall/r_wall")
+ summon_type = list(/turf/simulated/wall/r_wall)
/obj/effect/proc_holder/spell/aoe_turf/conjure/soulstone
name = "Summon Soulstone"
@@ -293,7 +294,7 @@
invocation_type = "none"
range = 0
- summon_type = list("/obj/item/device/soulstone")
+ summon_type = list(/obj/item/device/soulstone)
/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall
@@ -306,7 +307,7 @@
invocation = "none"
invocation_type = "none"
range = 0
- summon_type = list("/obj/effect/forcefield")
+ summon_type = list(/obj/effect/forcefield)
summon_lifespan = 50
diff --git a/code/datums/sun.dm b/code/datums/sun.dm
index e26517c8810..3517ad6d98e 100644
--- a/code/datums/sun.dm
+++ b/code/datums/sun.dm
@@ -4,8 +4,11 @@
var/dy
var/counter = 50 // to make the vars update during 1st call
var/rate
+ var/list/solars // for debugging purposes, references solars_list at the constructor
/datum/sun/New()
+
+ solars = solars_list
rate = rand(75,125)/100 // 75% - 125% of standard rotation
if(prob(50))
rate = -rate
@@ -41,12 +44,23 @@
dy = c / abs(s)
- for(var/obj/machinery/power/tracker/T in machines)
- T.set_angle(angle)
+ for(var/obj/machinery/power/M in solars_list)
+
+ if(!M.powernet)
+ solars_list.Remove(M)
+ continue
+
+ // Solar Tracker
+ if(istype(M, /obj/machinery/power/tracker))
+ var/obj/machinery/power/tracker/T = M
+ T.set_angle(angle)
+
+ // Solar Panel
+ else if(istype(M, /obj/machinery/power/solar))
+ var/obj/machinery/power/solar/S = M
+ if(S.control)
+ occlusion(S)
- for(var/obj/machinery/power/solar/S in machines)
- if(S.control)
- occlusion(S)
// for a solar panel, trace towards sun to see if we're in shadow
diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm
index 5ba5a320fd7..42b5f0ba7bd 100755
--- a/code/datums/supplypacks.dm
+++ b/code/datums/supplypacks.dm
@@ -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()
@@ -29,7 +31,7 @@
/datum/supply_packs/specialops
name = "Special Ops supplies"
- contains = list(/obj/item/weapon/storage/emp_kit,
+ contains = list(/obj/item/weapon/storage/box/emps,
/obj/item/weapon/grenade/smokebomb,
/obj/item/weapon/grenade/smokebomb,
/obj/item/weapon/grenade/smokebomb,
@@ -38,6 +40,7 @@
cost = 20
containertype = /obj/structure/closet/crate
containername = "Special Ops crate"
+ group = "Security"
hidden = 1
/datum/supply_packs/food
@@ -53,13 +56,15 @@
cost = 10
containertype = /obj/structure/closet/crate/freezer
containername = "Food crate"
+ group = "Hospitality"
/datum/supply_packs/monkey
name = "Monkey crate"
- contains = list (/obj/item/weapon/storage/monkeycube_box)
+ contains = list (/obj/item/weapon/storage/box/monkeycubes)
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,24 +95,26 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Toner Cartridges"
+ group = "Operations"
/datum/supply_packs/party
name = "Party equipment"
- contains = list(/obj/item/weapon/storage/drinkingglasses,
+ contains = list(/obj/item/weapon/storage/box/drinkingglasses,
/obj/item/weapon/reagent_containers/food/drinks/shaker,
/obj/item/weapon/reagent_containers/food/drinks/bottle/patron,
/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager,
+ /obj/item/weapon/storage/fancy/cigarettes/dromedaryco,
+ /obj/item/weapon/lipstick/random,
/obj/item/weapon/reagent_containers/food/drinks/ale,
/obj/item/weapon/reagent_containers/food/drinks/ale,
/obj/item/weapon/reagent_containers/food/drinks/beer,
/obj/item/weapon/reagent_containers/food/drinks/beer,
/obj/item/weapon/reagent_containers/food/drinks/beer,
- /obj/item/weapon/reagent_containers/food/drinks/beer,
- /obj/item/weapon/cigpacket/dromedaryco,
- /obj/item/weapon/lipstick/random)
+ /obj/item/weapon/reagent_containers/food/drinks/beer)
cost = 20
containertype = /obj/structure/closet/crate
containername = "Party equipment"
+ group = "Hospitality"
/datum/supply_packs/internals
name = "Internals crate"
@@ -119,18 +127,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,
@@ -139,6 +148,7 @@
cost = 35
containertype = /obj/structure/closet/crate/internals
containername = "Emergency Crate"
+ group = "Engineering"
/datum/supply_packs/janitor
name = "Janitorial supplies"
@@ -149,6 +159,7 @@
/obj/item/weapon/caution,
/obj/item/weapon/caution,
/obj/item/weapon/caution,
+ /obj/item/weapon/storage/bag/trash,
/obj/item/weapon/reagent_containers/spray/cleaner,
/obj/item/weapon/reagent_containers/glass/rag,
/obj/item/weapon/grenade/chem_grenade/cleaner,
@@ -158,17 +169,18 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Janitorial supplies"
+ group = "Operations"
/datum/supply_packs/lightbulbs
name = "Replacement lights"
- contains = list(/obj/item/weapon/storage/lightbox/mixed,
- /obj/item/weapon/storage/lightbox/mixed,
- /obj/item/weapon/storage/lightbox/mixed)
+ contains = list(/obj/item/weapon/storage/box/lights/mixed,
+ /obj/item/weapon/storage/box/lights/mixed,
+ /obj/item/weapon/storage/box/lights/mixed)
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,
@@ -187,7 +199,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,
@@ -197,6 +210,7 @@
cost = 20
containertype = /obj/structure/closet/crate
containername = "Wizard costume crate"
+ group = "Operations"
/datum/supply_packs/mule
name = "MULEbot Crate"
@@ -204,6 +218,7 @@
cost = 20
containertype = /obj/structure/largecrate/mule
containername = "MULEbot Crate"
+ group = "Operations"
/datum/supply_packs/lisa
name = "Corgi Crate"
@@ -211,7 +226,7 @@
cost = 50
containertype = /obj/structure/largecrate/lisa
containername = "Corgi Crate"
-
+ group = "Hydroponics"
/datum/supply_packs/hydroponics // -- Skie
name = "Hydroponics Supply Crate"
contains = list(/obj/item/weapon/reagent_containers/spray/plantbgone,
@@ -227,6 +242,36 @@
containertype = /obj/structure/closet/crate/hydroponics
containername = "Hydroponics crate"
access = access_hydroponics
+ group = "Hydroponics"
+
+//farm animals - useless and annoying, but potentially a good source of food
+/datum/supply_packs/cow
+ name = "Cow Crate"
+ cost = 30
+ containertype = /obj/structure/largecrate/cow
+ containername = "Cow Crate"
+ access = access_hydroponics
+
+/datum/supply_packs/goat
+ name = "Goat Crate"
+ cost = 25
+ containertype = /obj/structure/largecrate/goat
+ containername = "Goat Crate"
+ access = access_hydroponics
+
+/datum/supply_packs/chicken
+ name = "Chicken Crate"
+ cost = 20
+ containertype = /obj/structure/largecrate/chick
+ containername = "Chicken Crate"
+ access = access_hydroponics
+
+/datum/supply_packs/lisa
+ name = "Corgi Crate"
+ contains = list()
+ cost = 50
+ containertype = /obj/structure/largecrate/lisa
+ containername = "Corgi Crate"
/datum/supply_packs/seeds
name = "Seeds Crate"
@@ -246,7 +291,19 @@
containertype = /obj/structure/closet/crate/hydroponics
containername = "Seeds crate"
access = access_hydroponics
+ group = "Hydroponics"
+/datum/supply_packs/weedcontrol
+ name = "Weed Control Crate"
+ contains = list(/obj/item/weapon/scythe,
+ /obj/item/clothing/mask/gas,
+ /obj/item/weapon/grenade/chem_grenade/antiweed,
+ /obj/item/weapon/grenade/chem_grenade/antiweed)
+ cost = 20
+ containertype = /obj/structure/closet/crate/secure/hydrosec
+ containername = "Weed control crate"
+ access = access_hydroponics
+ group = "Hydroponics"
/datum/supply_packs/exoticseeds
name = "Exotic Seeds Crate"
@@ -264,6 +321,7 @@
containertype = /obj/structure/closet/crate/hydroponics
containername = "Exotic Seeds crate"
access = access_hydroponics
+ group = "Hydroponics"
/datum/supply_packs/medical
name = "Medical crate"
@@ -274,10 +332,11 @@
/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/storage/syringes)
+ /obj/item/weapon/storage/box/syringes)
cost = 10
containertype = /obj/structure/closet/crate/medical
containername = "Medical crate"
+ group = "Medical / Science"
/datum/supply_packs/virus
@@ -291,11 +350,12 @@
/obj/item/weapon/reagent_containers/glass/bottle/pierrot_throat,
/obj/item/weapon/reagent_containers/glass/bottle/brainrot,
/obj/item/weapon/reagent_containers/glass/bottle/hullucigen_virion,
- /obj/item/weapon/storage/syringes,
- /obj/item/weapon/storage/beakerbox,
+ /obj/item/weapon/storage/box/syringes,
+ /obj/item/weapon/storage/box/beakers,
/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"
@@ -304,6 +364,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Metal sheets crate"
+ group = "Engineering"
/datum/supply_packs/glass50
name = "50 Glass Sheets"
@@ -312,6 +373,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Glass sheets crate"
+ group = "Engineering"
/datum/supply_packs/electrical
name = "Electrical maintenance crate"
@@ -326,6 +388,7 @@
cost = 15
containertype = /obj/structure/closet/crate
containername = "Electrical maintenance crate"
+ group = "Engineering"
/datum/supply_packs/mechanical
name = "Mechanical maintenance crate"
@@ -341,6 +404,7 @@
cost = 10
containertype = /obj/structure/closet/crate
containername = "Mechanical maintenance crate"
+ group = "Engineering"
/datum/supply_packs/watertank
name = "Water tank crate"
@@ -348,6 +412,7 @@
cost = 8
containertype = /obj/structure/largecrate
containername = "water tank crate"
+ group = "Hydroponics"
/datum/supply_packs/fueltank
name = "Fuel tank crate"
@@ -355,26 +420,65 @@
cost = 8
containertype = /obj/structure/largecrate
containername = "fuel tank crate"
+ group = "Engineering"
+
+/datum/supply_packs/solar
+ name = "Solar Pack crate"
+ contains = list(/obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly,
+ /obj/item/solar_assembly, // 21 Solar Assemblies. 1 Extra for the controller
+ /obj/item/weapon/circuitboard/solar_control,
+ /obj/item/weapon/tracker_electronics,
+ /obj/item/weapon/paper/solar)
+ cost = 20
+ containertype = /obj/structure/closet/crate
+ containername = "solar pack crate"
+ group = "Engineering"
/datum/supply_packs/engine
name = "Emitter crate"
- contains = list(/obj/machinery/emitter,
- /obj/machinery/emitter)
+ contains = list(/obj/machinery/power/emitter,
+ /obj/machinery/power/emitter)
cost = 10
containertype = /obj/structure/closet/crate/secure
containername = "Emitter crate"
- access = access_heads
+ access = access_ce
+ group = "Engineering"
/datum/supply_packs/engine/field_gen
name = "Field Generator crate"
contains = list(/obj/machinery/field_generator,
/obj/machinery/field_generator)
+ 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"
contains = list(/obj/machinery/the_singularitygen)
+ containertype = /obj/structure/closet/crate/secure
containername = "Singularity Generator crate"
+ access = access_ce
+ group = "Engineering"
/datum/supply_packs/engine/collector
name = "Collector crate"
@@ -382,6 +486,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"
@@ -393,7 +498,10 @@
/obj/structure/particle_accelerator/particle_emitter/right,
/obj/structure/particle_accelerator/power_box,
/obj/structure/particle_accelerator/end_cap)
+ 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)"
@@ -404,6 +512,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\")"
@@ -413,6 +522,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "\"Odysseus\" Circuit Crate"
access = access_robotics
+ group = "Engineering"
/datum/supply_packs/robotics
@@ -431,6 +541,7 @@
containertype = /obj/structure/closet/crate/secure/gear
containername = "Robotics Assembly"
access = access_robotics
+ group = "Engineering"
/datum/supply_packs/plasma
name = "Plasma assembly crate"
@@ -449,7 +560,8 @@
cost = 10
containertype = /obj/structure/closet/crate/secure/plasma
containername = "Plasma assembly crate"
- access = access_tox
+ access = access_tox_storage
+ group = "Medical / Science"
/datum/supply_packs/weapons
name = "Weapons crate"
@@ -459,12 +571,13 @@
/obj/item/weapon/gun/energy/laser,
/obj/item/weapon/gun/energy/taser,
/obj/item/weapon/gun/energy/taser,
- /obj/item/weapon/storage/flashbang_kit,
- /obj/item/weapon/storage/flashbang_kit)
+ /obj/item/weapon/storage/box/flashbangs,
+ /obj/item/weapon/storage/box/flashbangs)
cost = 30
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Weapons crate"
access = access_security
+ group = "Security"
/datum/supply_packs/eweapons
name = "Experimental weapons crate"
@@ -479,6 +592,7 @@
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Experimental weapons crate"
access = access_heads
+ group = "Security"
/datum/supply_packs/armor
name = "Armor crate"
@@ -490,6 +604,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Armor crate"
access = access_security
+ group = "Security"
/datum/supply_packs/riot
name = "Riot gear crate"
@@ -499,9 +614,9 @@
/obj/item/weapon/shield/riot,
/obj/item/weapon/shield/riot,
/obj/item/weapon/shield/riot,
- /obj/item/weapon/storage/flashbang_kit,
- /obj/item/weapon/storage/flashbang_kit,
- /obj/item/weapon/storage/flashbang_kit,
+ /obj/item/weapon/storage/box/flashbangs,
+ /obj/item/weapon/storage/box/flashbangs,
+ /obj/item/weapon/storage/box/flashbangs,
/obj/item/weapon/handcuffs,
/obj/item/weapon/handcuffs,
/obj/item/weapon/handcuffs,
@@ -515,6 +630,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Riot gear crate"
access = access_armory
+ group = "Security"
/datum/supply_packs/loyalty
name = "Loyalty implant crate"
@@ -523,6 +639,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Loyalty implant crate"
access = access_armory
+ group = "Security"
/datum/supply_packs/ballistic
name = "Ballistic gear crate"
@@ -534,6 +651,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"
@@ -545,6 +663,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"
@@ -556,6 +675,7 @@
containertype = /obj/structure/closet/crate/secure
containername = "Experimental armor crate"
access = access_armory
+ group = "Security"
/datum/supply_packs/securitybarriers
name = "Security Barriers"
@@ -566,6 +686,19 @@
cost = 20
containertype = /obj/structure/closet/crate/secure/gear
containername = "Security Barriers crate"
+ group = "Security"
+
+/datum/supply_packs/securitybarriers
+ name = "Shield Generators"
+ contains = list(/obj/machinery/shieldwallgen,
+ /obj/machinery/shieldwallgen,
+ /obj/machinery/shieldwallgen,
+ /obj/machinery/shieldwallgen)
+ cost = 20
+ 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
@@ -584,7 +717,7 @@
/obj/item/clothing/head/collectable/HoS,
/obj/item/clothing/head/collectable/thunderdome,
/obj/item/clothing/head/collectable/swat,
- /obj/item/clothing/head/collectable/metroid,
+ /obj/item/clothing/head/collectable/slime,
/obj/item/clothing/head/collectable/police,
/obj/item/clothing/head/collectable/slime,
/obj/item/clothing/head/collectable/xenom,
@@ -593,6 +726,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:"
@@ -600,7 +734,7 @@
/datum/supply_packs/artscrafts
name = "Arts and Crafts supplies"
- contains = list(/obj/item/weapon/storage/crayonbox,
+ contains = list(/obj/item/weapon/storage/fancy/crayons,
/obj/item/device/camera,
/obj/item/device/camera_film,
/obj/item/device/camera_film,
@@ -614,26 +748,28 @@
/obj/item/weapon/reagent_containers/glass/paint/black,
/obj/item/weapon/reagent_containers/glass/paint/white,
/obj/item/weapon/reagent_containers/glass/paint/remover,
+ /obj/item/weapon/contraband/poster,
/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
contains = list(/obj/item/seeds/bloodtomatoseed,
- /obj/item/weapon/storage/pill_bottle/zoom,
- /obj/item/weapon/storage/pill_bottle/happy,
- /obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe)
+ /obj/item/weapon/storage/pill_bottle/zoom,
+ /obj/item/weapon/storage/pill_bottle/happy,
+ /obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe)
+
name = "Contraband crate"
cost = 30
containertype = /obj/structure/closet/crate
containername = "Unlabeled crate"
contraband = 1
+ group = "Operations"
/datum/supply_packs/boxes
name = "Empty Box supplies"
@@ -647,9 +783,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"
@@ -674,9 +811,39 @@
name = "Sterile equipment crate"
contains = list(/obj/item/clothing/under/rank/medical/green,
/obj/item/clothing/under/rank/medical/green,
- /obj/item/weapon/storage/stma_kit,
- /obj/item/weapon/storage/lglo_kit)
- cost = 10
+ /obj/item/weapon/storage/box/masks,
+ /obj/item/weapon/storage/box/gloves)
+ 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"
diff --git a/code/datums/vote.dm b/code/datums/vote.dm
deleted file mode 100644
index 3824d3c2dcd..00000000000
--- a/code/datums/vote.dm
+++ /dev/null
@@ -1,13 +0,0 @@
-/datum/vote
- var/voting = 0 // true if currently voting
- var/nextvotetime = 0 // time at which next vote can be started
- var/votetime = 60 // time at which voting will end
- var/mode = 0 // 0 = restart vote, 1 = mode vote
- // modes which can be voted for
- var/winner = null // the vote winner
-
- var/customname
- var/choices = list()
- var/enteringchoices = 0
-
- var/instant_restart = 0
\ No newline at end of file
diff --git a/code/defines/atom.dm b/code/defines/atom.dm
deleted file mode 100644
index 7bf9958693a..00000000000
--- a/code/defines/atom.dm
+++ /dev/null
@@ -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.timelength)
- 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
\ No newline at end of file
diff --git a/code/defines/global.dm b/code/defines/global.dm
deleted file mode 100644
index 14eff68194c..00000000000
--- a/code/defines/global.dm
+++ /dev/null
@@ -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,
- )
diff --git a/code/defines/obj.dm b/code/defines/obj.dm
index ef02659b30c..46ac27bad0c 100644
--- a/code/defines/obj.dm
+++ b/code/defines/obj.dm
@@ -238,7 +238,7 @@
var/moving = null
var/list/parts = list( )
-/obj/effect/showcase
+/obj/structure/showcase
name = "Showcase"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "showcase_1"
@@ -249,23 +249,6 @@
/obj/item/mouse_drag_pointer = MOUSE_ACTIVE_POINTER
-// TODO: robust mixology system! (and merge with beakers, maybe)
-/obj/item/weapon/glass
- name = "empty glass"
- desc = "Emptysville."
- icon = 'icons/obj/kitchen.dmi'
- icon_state = "glass_empty"
- item_state = "beaker"
- flags = FPRINT | TABLEPASS | OPENCONTAINER
- var/datum/substance/inside = null
- throwforce = 5
- g_amt = 100
- New()
- ..()
- src.pixel_x = rand(-5, 5)
- src.pixel_y = rand(-5, 5)
-
-
/obj/item/weapon/beach_ball
icon = 'icons/misc/beach.dmi'
icon_state = "ball"
diff --git a/code/defines/obj/clothing/costume.dm b/code/defines/obj/clothing/costume.dm
deleted file mode 100644
index f6015a345b0..00000000000
--- a/code/defines/obj/clothing/costume.dm
+++ /dev/null
@@ -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
\ No newline at end of file
diff --git a/code/defines/obj/costume.dm b/code/defines/obj/costume.dm
deleted file mode 100644
index f6015a345b0..00000000000
--- a/code/defines/obj/costume.dm
+++ /dev/null
@@ -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
\ No newline at end of file
diff --git a/code/defines/obj/door.dm b/code/defines/obj/door.dm
deleted file mode 100644
index 355cfeda644..00000000000
--- a/code/defines/obj/door.dm
+++ /dev/null
@@ -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"
-
diff --git a/code/defines/obj/hydro.dm b/code/defines/obj/hydro.dm
index 0aa9992b305..aae29bdf3c1 100644
--- a/code/defines/obj/hydro.dm
+++ b/code/defines/obj/hydro.dm
@@ -43,6 +43,8 @@
user << "-Plant Production: \blue [production]"
if(potency != -1)
user << "-Plant Potency: \blue [potency]"
+ return
+ ..() // Fallthrough to item/attackby() so that bags can pick seeds up
/obj/item/seeds/chiliseed
name = "pack of chili seeds"
@@ -1217,6 +1219,10 @@
reagents.add_reagent("pacid", round(potency, 1))
force = round((5+potency/2.5), 1)
+ suicide_act(mob/user)
+ viewers(user) << "\red [user] is eating some of the [src.name]! It looks like \he's trying to commit suicide."
+ return (BRUTELOSS|TOXLOSS)
+
// *************************************
// Pestkiller defines for hydroponics
// *************************************
@@ -1284,6 +1290,10 @@
var/toxicity = 4
var/WeedKillStr = 2
+ suicide_act(mob/user)
+ viewers(user) << "\red [user] is huffing the [src.name]! It looks like \he's trying to commit suicide."
+ return (TOXLOSS)
+
/obj/item/weapon/pestspray // -- Skie
desc = "It's some pest eliminator spray! Do not inhale!"
icon = 'icons/obj/hydroponics.dmi'
@@ -1299,6 +1309,10 @@
var/toxicity = 4
var/PestKillStr = 2
+ suicide_act(mob/user)
+ viewers(user) << "\red [user] is huffing the [src.name]! It looks like \he's trying to commit suicide."
+ return (TOXLOSS)
+
/obj/item/weapon/minihoe // -- Numbers
name = "mini hoe"
desc = "It's used for removing weeds or scratching your back."
diff --git a/code/defines/obj/machinery.dm b/code/defines/obj/machinery.dm
deleted file mode 100644
index 89413fce523..00000000000
--- a/code/defines/obj/machinery.dm
+++ /dev/null
@@ -1,339 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-
-/obj/machinery
- name = "machinery"
- icon = 'icons/obj/stationobjs.dmi'
- var/stat = 0
- var/emagged = 0
- var/use_power = 0
- //0 = dont run the auto
- //1 = run auto, use idle
- //2 = run auto, use active
- var/idle_power_usage = 0
- var/active_power_usage = 0
- var/power_channel = EQUIP
- //EQUIP,ENVIRON or LIGHT
- var/list/component_parts = null //list of all the parts used to build it, if made from certain kinds of frames.
- var/uid
- var/manual = 0
- var/global/gl_uid = 1
-
-/obj/machinery/autolathe
- name = "\improper Autolathe"
- desc = "It produces items using metal and glass."
- icon_state = "autolathe"
- density = 1
- var/m_amount = 0.0
- var/g_amount = 0.0
- var/operating = 0.0
- var/opened = 0.0
- anchored = 1.0
- var/list/L = list()
- var/list/LL = list()
- var/hacked = 0
- var/disabled = 0
- var/shocked = 0
- var/list/wires = list()
- var/hack_wire
- var/disable_wire
- var/shock_wire
- use_power = 1
- idle_power_usage = 10
- active_power_usage = 100
-
-/obj/machinery/dna_scanner
- name = "\improper DNA scanner/implanter"
- desc = "It scans DNA structures."
- icon = 'icons/obj/Cryogenic2.dmi'
- icon_state = "scanner_0"
- density = 1
- var/locked = 0.0
- var/mob/occupant = null
- anchored = 1.0
- use_power = 1
- idle_power_usage = 50
- active_power_usage = 300
-
-/obj/machinery/dna_scannernew
- name = "\improper DNA modifier"
- desc = "It scans DNA structures."
- icon = 'icons/obj/Cryogenic2.dmi'
- icon_state = "scanner_0"
- density = 1
- var/locked = 0.0
- var/mob/occupant = null
- anchored = 1.0
- use_power = 1
- idle_power_usage = 50
- active_power_usage = 300
-
-/obj/machinery/firealarm
- name = "fire alarm"
- desc = "\"Pull this in case of emergency\". Thus, keep pulling it forever."
- icon = 'icons/obj/monitors.dmi'
- icon_state = "fire0"
- var/detecting = 1.0
- var/working = 1.0
- var/time = 10.0
- var/timing = 0.0
- var/lockdownbyai = 0
- anchored = 1.0
- use_power = 1
- idle_power_usage = 2
- active_power_usage = 6
- power_channel = ENVIRON
-
- New()
- if(z == 1)
- if(security_level)
- src.overlays += image('icons/obj/monitors.dmi', "overlay_[get_security_level()]")
- else
- src.overlays += image('icons/obj/monitors.dmi', "overlay_green")
-
-/obj/machinery/partyalarm
- name = "\improper PARTY BUTTON"
- desc = "Cuban Pete is in the house!"
- icon = 'icons/obj/monitors.dmi'
- icon_state = "fire0"
- var/detecting = 1.0
- var/working = 1.0
- var/time = 10.0
- var/timing = 0.0
- var/lockdownbyai = 0
- anchored = 1.0
- use_power = 1
- idle_power_usage = 2
- active_power_usage = 6
-
-
-/obj/machinery/igniter
- name = "igniter"
- desc = "It's useful for igniting plasma."
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "igniter1"
- var/id = null
- var/on = 1.0
- anchored = 1.0
- use_power = 1
- idle_power_usage = 2
- active_power_usage = 4
-
-/obj/machinery/injector
- name = "injector"
- desc = "It injects gas into a chamber."
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "injector"
- density = 1
- anchored = 1.0
- flags = ON_BORDER
- use_power = 1
- idle_power_usage = 2
- active_power_usage = 4
- layer = TURF_LAYER
-
-/obj/machinery/meter
- name = "meter"
- desc = "It measures something."
- icon = 'icons/obj/meter.dmi'
- icon_state = "meterX"
- var/obj/machinery/atmospherics/pipe/target = null
- anchored = 1.0
- power_channel = ENVIRON
- var/frequency = 0
- var/id
- use_power = 1
- idle_power_usage = 2
- active_power_usage = 4
-
-/obj/machinery/restruct
- name = "\improper DNA physical restructurization accelerator"
- desc = "It looks ridiculously complex."
- icon = 'icons/obj/Cryogenic2.dmi'
- icon_state = "restruct_0"
- density = 1
- var/locked = 0.0
- var/mob/occupant = null
- anchored = 1.0
- use_power = 1
- idle_power_usage = 10
- active_power_usage = 600
-
-/obj/machinery/scan_console
- name = "\improper DNA Scanner Access Console"
- desc = "It scans DNA structures."
- icon = 'icons/obj/computer.dmi'
- icon_state = "scanner"
- density = 1
- var/obj/item/weapon/card/data/scan = null
- var/func = ""
- var/data = ""
- var/special = ""
- var/status = null
- var/prog_p1 = null
- var/prog_p2 = null
- var/prog_p3 = null
- var/prog_p4 = null
- var/temp = null
- var/obj/machinery/dna_scanner/connected = null
- anchored = 1.0
- use_power = 1
- idle_power_usage = 10
- active_power_usage = 400
-
-/obj/machinery/door_control
- name = "remote door-control"
- desc = "It controls doors, remotely."
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "doorctrl0"
- desc = "A remote control-switch for a door."
- power_channel = ENVIRON
- var/id = null
- var/range = 10
- var/normaldoorcontrol = 0
- var/desiredstate = 0 // Zero is closed, 1 is open.
- var/specialfunctions = 1
- /*
- Bitflag, 1= open
- 2= idscan,
- 4= bolts
- 8= shock
- 16= door safties
-
- */
-
- var/exposedwires = 0
- var/wires = 3
- /*
- Bitflag, 1=checkID
- 2=Network Access
- */
-
- anchored = 1.0
- use_power = 1
- idle_power_usage = 2
- active_power_usage = 4
-
-/obj/machinery/driver_button
- name = "mass driver button"
- icon = 'icons/obj/objects.dmi'
- icon_state = "launcherbtt"
- desc = "A remote control switch for a mass driver."
- var/id = null
- var/active = 0
- anchored = 1.0
- use_power = 1
- idle_power_usage = 2
- active_power_usage = 4
-
-/obj/machinery/ignition_switch
- name = "ignition switch"
- icon = 'icons/obj/objects.dmi'
- icon_state = "launcherbtt"
- desc = "A remote control switch for a mounted igniter."
- var/id = null
- var/active = 0
- anchored = 1.0
- use_power = 1
- idle_power_usage = 2
- active_power_usage = 4
-
-/obj/machinery/flasher_button
- name = "flasher button"
- desc = "A remote control switch for a mounted flasher."
- icon = 'icons/obj/objects.dmi'
- icon_state = "launcherbtt"
- var/id = null
- var/active = 0
- anchored = 1.0
- use_power = 1
- idle_power_usage = 2
- active_power_usage = 4
-
-/obj/machinery/teleport
- name = "teleport"
- icon = 'icons/obj/stationobjs.dmi'
- density = 1
- anchored = 1.0
- var/lockeddown = 0
-
-/obj/machinery/teleport/hub
- name = "teleporter hub"
- desc = "It's the hub of a teleporting machine."
- icon_state = "tele0"
- var/accurate = 0
- use_power = 1
- idle_power_usage = 10
- active_power_usage = 2000
-
-/obj/machinery/teleport/station
- name = "station"
- desc = "It's the station thingy of a teleport thingy." //seriously, wtf.
- icon_state = "controller"
- var/active = 0
- var/engaged = 0
- use_power = 1
- idle_power_usage = 10
- active_power_usage = 2000
-/*
-/obj/machinery/wire
- name = "wire"
- icon = 'icons/obj/power_cond_red.dmi'
- use_power = 1
- idle_power_usage = 0
- active_power_usage = 1
-*/
-
-/obj/machinery/light_switch
- name = "light switch"
- desc = "It turns lights on and off. What are you, simple?"
- icon = 'icons/obj/power.dmi'
- icon_state = "light1"
- anchored = 1.0
- var/on = 1
- var/area/area = null
- var/otherarea = null
- // luminosity = 1
-
-/obj/machinery/crema_switch
- desc = "Burn baby burn!"
- name = "crematorium igniter"
- icon = 'icons/obj/power.dmi'
- icon_state = "crema_switch"
- anchored = 1.0
- req_access = list(access_crematorium)
- var/on = 0
- var/area/area = null
- var/otherarea = null
- var/id = 1
-
-/obj/machinery/hologram
- anchored = 1
- use_power = 1
- idle_power_usage = 5
- active_power_usage = 100
- var/obj/effect/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise.
-
-/obj/machinery/hologram/holopad
- name = "\improper AI holopad"
- desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely."
- icon_state = "holopad0"
- var/mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time.
- var/last_request = 0 //to prevent request spam. ~Carn
- var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
-
-/obj/machinery/hologram/projector
- name = "hologram projector"
- desc = "It makes a hologram appear...with magnets or something..."
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "hologram0"
-
-/obj/machinery/hologram/proj_ai
- name = "hologram projector platform"
- desc = "It's used by the AI for fooling around."
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "hologram0"
- var/temp = null
- var/lumens = 0.0
- var/h_r = 245.0
- var/h_g = 245.0
- var/h_b = 245.0
diff --git a/code/defines/obj/storage.dm b/code/defines/obj/storage.dm
deleted file mode 100644
index bb9783f1aee..00000000000
--- a/code/defines/obj/storage.dm
+++ /dev/null
@@ -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 -spontaneously- 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 = "WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use."
- 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 = "WARNING:Keep out of reach of children."
- 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 = "Instructions:Heat in microwave. Product will cool if not eaten within seven minutes."
- 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"
- )
\ No newline at end of file
diff --git a/code/defines/obj/vending.dm b/code/defines/obj/vending.dm
deleted file mode 100755
index efd1d0b5bd6..00000000000
--- a/code/defines/obj/vending.dm
+++ /dev/null
@@ -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 = ""
diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index 1108023598c..13249887f87 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -1,10 +1,3 @@
-/obj/item/weapon
- name = "weapon"
- icon = 'icons/obj/weapons.dmi'
-
-/obj/item/weapon/shield
- name = "shield"
-
/obj/item/weapon/phone
name = "red phone"
desc = "Should anything ever go wrong..."
@@ -19,185 +12,6 @@
attack_verb = list("called", "rang")
hitsound = 'sound/weapons/ring.ogg'
-/obj/item/weapon/shield/riot
- name = "riot shield"
- desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder."
- icon = 'icons/obj/weapons.dmi'
- icon_state = "riot"
- flags = FPRINT | TABLEPASS| CONDUCT
- slot_flags = SLOT_BACK
- force = 5.0
- throwforce = 5.0
- throw_speed = 1
- throw_range = 4
- w_class = 4.0
- g_amt = 7500
- m_amt = 1000
- origin_tech = "materials=2"
- attack_verb = list("shoved", "bashed")
- var/cooldown = 0 //shield bash cooldown. based on world.time
-
- IsShield()
- return 1
-
- attackby(obj/item/weapon/W as obj, mob/user as mob)
- if(istype(W, /obj/item/weapon/melee/baton))
- if(cooldown < world.time - 25)
- user.visible_message("[user] bashes [src] with [W]!")
- playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
- cooldown = world.time
- else
- ..()
-
-/obj/item/weapon/shield/energy
- name = "energy combat shield"
- desc = "A shield capable of stopping most projectile and melee attacks. It can be retracted, expanded, and stored anywhere."
- icon = 'icons/obj/weapons.dmi'
- icon_state = "eshield0" // eshield1 for expanded
- flags = FPRINT | TABLEPASS| CONDUCT
- force = 3.0
- throwforce = 5.0
- throw_speed = 1
- throw_range = 4
- w_class = 1
- origin_tech = "materials=4;magnets=3;syndicate=4"
- attack_verb = list("shoved", "bashed")
- var/active = 0
-
-
-/obj/item/weapon/nullrod
- name = "null rod"
- desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of Nar-Sie's followers."
- icon_state = "nullrod"
- item_state = "nullrod"
- flags = FPRINT | TABLEPASS
- slot_flags = SLOT_BELT
- force = 15
- throw_speed = 1
- throw_range = 4
- throwforce = 10
- w_class = 1
-
-//BS12 EDIT
-/obj/item/weapon/nullrod/attack(mob/M as mob, mob/living/user as mob)
-
- M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])")
- user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])")
-
- log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
-
- if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
- user << "\red You don't have the dexterity to do this!"
- return
-
- if ((CLUMSY in user.mutations) && prob(50))
- user << "\red The rod slips out of your hand and hits your head."
- user.take_organ_damage(10)
- user.Paralyse(20)
- return
-
- if (M.stat !=2)
- if((M.mind in ticker.mode.cult) && prob(33))
- M << "\red The power of [src] clears your mind of the cult's influence!"
- user << "\red You wave [src] over [M]'s head and see their eyes become clear, their mind returning to normal."
- ticker.mode.remove_cultist(M.mind)
- for(var/mob/O in viewers(M, null))
- O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1)
- else if(prob(10))
- user << "\red The rod slips in your hand."
- ..()
- else
- user << "\red The rod appears to do nothing."
- for(var/mob/O in viewers(M, null))
- O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1)
- return
-
-/obj/item/weapon/nullrod/afterattack(atom/A, mob/user as mob)
- if (istype(A, /turf/simulated/floor))
- user << "\blue You hit the floor with the [src]."
- call(/obj/effect/rune/proc/revealrunes)(src)
-
-/*/obj/item/weapon/sord
- name = "\improper SORD"
- desc = "This thing is so unspeakably shitty you are having a hard time even holding it."
- icon_state = "sord"
- item_state = "sord"
- flags = FPRINT | TABLEPASS
- slot_flags = SLOT_BELT
- force = 2
- throwforce = 1
- w_class = 3
- attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
-*/ //BS12 EDIT
-/obj/item/weapon/sord/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
- playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
- return ..()
-
-/obj/item/weapon/claymore
- name = "claymore"
- desc = "What are you standing around staring at this for? Get to killing!"
- icon_state = "claymore"
- item_state = "claymore"
- flags = FPRINT | TABLEPASS | CONDUCT
- slot_flags = SLOT_BELT
- force = 40
- throwforce = 10
- w_class = 3
- attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
-
- IsShield()
- return 1
-
-/obj/item/weapon/claymore/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
- playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
- return ..()
-
-/obj/item/weapon/katana
- name = "katana"
- desc = "Woefully underpowered in D20"
- icon_state = "katana"
- item_state = "katana"
- flags = FPRINT | TABLEPASS | CONDUCT
- slot_flags = SLOT_BELT | SLOT_BACK
- force = 40
- throwforce = 10
- w_class = 3
- attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
-
-/obj/item/weapon/katana/IsShield()
- return 1
-
-/obj/item/weapon/katana/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
- playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
- return ..()
-
-/obj/item/weapon/bodybag
- name = "body bag"
- desc = "A plastic bag designed for the storage and transportation of cadavers."
- icon = 'icons/obj/closet.dmi'
- icon_state = "bodybag"
- force = 5.0
- throwforce = 5.0
- throw_speed = 1
- throw_range = 4
- w_class = 1.0
- g_amt = 7500
- m_amt = 1000
- origin_tech = "materials=2"
-
-/obj/item/weapon/rsf
- name = "\improper Rapid-Service-Fabricator"
- desc = "A device used to rapidly deploy service items."
- icon = 'icons/obj/items.dmi'
- icon_state = "rcd"
- opacity = 0
- density = 0
- anchored = 0.0
- var/matter = 0
- var/mode = 1
- flags = TABLEPASS
- w_class = 3.0
-
/obj/item/weapon/rsp
name = "\improper Rapid-Seed-Producer (RSP)"
desc = "A device used to rapidly deploy seeds."
@@ -211,22 +25,10 @@
flags = TABLEPASS
w_class = 3.0
-/obj/item/weapon/rcd_ammo
- name = "compressed matter cartridge"
- desc = "Highly compressed matter for the RCD."
- icon = 'icons/obj/ammo.dmi'
- icon_state = "rcd"
- item_state = "rcdammo"
- opacity = 0
- density = 0
- anchored = 0.0
- origin_tech = "materials=2"
- m_amt = 30000
- g_amt = 15000
/obj/item/weapon/spacecash
- name = "stack of credits"
- desc = "1 credit."
+ name = "1 credit chip"
+ desc = "It's worth 1 credit."
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "spacecash"
@@ -238,224 +40,59 @@
throw_speed = 1
throw_range = 2
w_class = 1.0
- var/currency
- var/worth
- var/split = 5
- var/round = 0.01
var/access = list()
access = access_crate_cash
-
-
-/obj/item/weapon/spacecash/proc/updatedesc()
- name = "stack of [currency]"
- desc = "A pile of [worth] [currency]"
-
-/obj/item/weapon/spacecash/New(var/nloc, var/nworth=1,var/ncurrency = "credits")
- if(!worth)
- worth = nworth
- if(!currency)
- currency = ncurrency
- split = round(worth/2,round)
- updatedesc()
- return ..(nloc)
+ var/worth = 1
/obj/item/weapon/spacecash/c10
+ name = "10 credit chip"
icon_state = "spacecash10"
access = access_crate_cash
- desc = "A pile of 10 credits."
+ 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 = "A pile of 20 credits."
+ 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 = "A pile of 50 credits."
+ 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 = "A pile of 100 credits."
+ 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 = "A pile of 200 credits."
+ 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 = "A pile of 500 credits."
+ 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 = "A pile of 1000 credits."
+ desc = "It's worth 1000 credits."
worth = 1000
-/obj/item/weapon/spacecash/attack_self(var/mob/user)
- interact(user)
-
-/obj/item/weapon/spacecash/interact(var/mob/user)
-
- user.machine = src
-
- var/dat
-
- dat += " [worth] [currency]"
- dat += " New pile:"
-
- dat += "-"
- dat += "-"
- if(round<=0.1)
- dat += "-"
- if(round<=0.01)
- dat += "-"
- dat += "[split]"
- if(round<=0.01)
- dat += "+"
- if(round<=0.1)
- dat += "+"
- dat += "+"
- dat += "+"
- dat += " split"
-
-
- user << browse(dat, "window=computer;size=400x500")
-
- onclose(user, "computer")
- return
-
-/obj/item/weapon/spacecash/Topic(href, href_list)
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
- usr.machine = src
-
- if (href_list["su"])
- var/samt = text2num(href_list["su"])
- if(split+samt0)
- split-=samt
- if(href_list["split"])
- new /obj/item/weapon/spacecash(get_turf(src),split,currency)
- worth-=split
- split = round(worth/2,round)
- updatedesc()
-
-
- src.add_fingerprint(usr)
- src.updateUsrDialog()
- for (var/mob/M in viewers(1, src.loc))
- if (M.client && M.machine == src)
- src.attack_self(M)
- return
-
-/obj/item/weapon/spacecash/attackby(var/obj/I as obj, var/mob/user as mob)
- if(istype(I,/obj/item/weapon/spacecash))
- var/mob/living/carbon/c = user
- if(!uppertext(I:currency)==uppertext(currency))
- c<<"You can't mix currencies!"
- return ..()
- else
- worth+=I:worth
- c<<"You combine the piles."
- updatedesc()
- del I
- return ..()
-
-/obj/item/device/mass_spectrometer
- desc = "A hand-held mass spectrometer which identifies trace chemicals in a blood sample."
- name = "mass-spectrometer"
- icon_state = "spectrometer"
- item_state = "analyzer"
- w_class = 2.0
- flags = FPRINT | TABLEPASS| CONDUCT | OPENCONTAINER
- slot_flags = SLOT_BELT
- throwforce = 5
- throw_speed = 4
- throw_range = 20
- m_amt = 30
- g_amt = 20
- origin_tech = "magnets=2;biotech=2"
- var/details = 0
- var/recent_fail = 0
-
-/obj/item/device/mass_spectrometer/adv
- name = "advanced mass-spectrometer"
- icon_state = "adv_spectrometer"
- details = 1
- origin_tech = "magnets=4;biotech=2"
-
-/obj/item/weapon/melee/chainofcommand
- name = "chain of command"
- desc = "A tool used by great men to placate the frothing masses."
- icon_state = "chain"
- item_state = "chain"
- flags = FPRINT | TABLEPASS | CONDUCT
- slot_flags = SLOT_BELT
- force = 10
- throwforce = 7
- w_class = 3
- origin_tech = "combat=4"
- attack_verb = list("flogged", "whipped", "lashed", "disciplined")
-
-/obj/item/weapon/melee/energy
- var/active = 0
-
-/obj/item/weapon/melee/energy/axe
- name = "energy axe"
- desc = "An energised battle axe."
- icon_state = "axe0"
- force = 40.0
- throwforce = 25.0
- throw_speed = 1
- throw_range = 5
- w_class = 3.0
- flags = FPRINT | CONDUCT | NOSHIELD | TABLEPASS
- origin_tech = "combat=3"
- attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
-
-/obj/item/weapon/melee/energy/sword
- color
- name = "energy sword"
- desc = "May the force be within you."
- icon_state = "sword0"
- force = 3.0
- throwforce = 5.0
- throw_speed = 1
- throw_range = 5
- w_class = 2.0
- flags = FPRINT | TABLEPASS | NOSHIELD
- origin_tech = "magnets=3;syndicate=4"
- attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
-
-/obj/item/weapon/melee/energy/sword/pirate
- name = "energy cutlass"
- desc = "Arrrr matey."
- icon_state = "cutlass0"
-
-/obj/item/weapon/melee/energy/blade
- name = "energy blade"
- desc = "A concentrated beam of energy in the shape of a blade. Very stylish... and lethal."
- icon_state = "blade"
- force = 70.0//Normal attacks deal very high damage.
- throwforce = 1//Throwing or dropping the item deletes it.
- throw_speed = 1
- throw_range = 1
- w_class = 4.0//So you can't hide it in your pocket or some such.
- flags = FPRINT | TABLEPASS | NOSHIELD
- attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
- var/datum/effect/effect/system/spark_spread/spark_system
/obj/item/weapon/bananapeel
name = "banana peel"
@@ -515,76 +152,6 @@
attack_verb = list("HONKED")
var/spam_flag = 0
-/obj/item/stack/medical
- name = "medical pack"
- singular_name = "medical pack"
- icon = 'items.dmi'
- amount = 5 //To compensate for wounds
- max_amount = 5
- w_class = 1
- throw_speed = 4
- throw_range = 20
- var/heal_brute = 0
- var/heal_burn = 0
-
-/obj/item/stack/medical/bruise_pack
- name = "roll of gauze"
- singular_name = "roll of gauze"
- desc = "A roll of gauze for sealing up wounds."
- icon_state = "brutepack"
- heal_brute = 7
- origin_tech = "biotech=1"
-
-/obj/item/stack/medical/bruise_pack/tajaran
- name = "\improper S'rendarr's Hand leaf"
- singular_name = "S'rendarr's Hand leaf"
- desc = "A soft leaf that is rubbed on bruises."
- icon = 'harvest.dmi'
- icon_state = "cabbage"
- heal_brute = 7
-
-/obj/item/stack/medical/ointment
- name = "ointment"
- desc = "Used to treat those nasty burns."
- gender = PLURAL
- singular_name = "ointment"
- icon_state = "ointment"
- heal_burn = 7
- origin_tech = "biotech=1"
-
-/obj/item/stack/medical/ointment/tajaran
- name = "\improper Messa's Tear leaf"
- singular_name = "Messa's Tear leaf"
- desc = "A cold leaf that is rubbed on burns."
- icon = 'harvest.dmi'
- icon_state = "ambrosiavulgaris"
- heal_burn = 7
-
-/obj/item/stack/medical/advanced/bruise_pack
- name = "advanced trauma kit"
- singular_name = "advanced trauma kit"
- desc = "An advanced trauma kit for severe injuries."
- icon_state = "traumakit"
- heal_brute = 12
- origin_tech = "biotech=1"
-
-/obj/item/stack/medical/advanced/ointment
- name = "advanced burn kit"
- singular_name = "advanced burn kit"
- desc = "An advanced treatment kit for severe burns."
- icon_state = "burnkit"
- heal_burn = 12
- origin_tech = "biotech=1"
-
-/obj/item/stack/medical/splint
- name = "medical splint"
- singular_name = "medical splint"
- icon_state = "splint"
- amount = 5
- max_amount = 5
-
-/obj/item/stack/medical/splint/single
- amount = 1
/obj/item/weapon/c_tube
name = "cardboard tube"
@@ -596,186 +163,10 @@
throw_speed = 4
throw_range = 5
-/obj/item/weapon/card
- name = "card"
- desc = "Does card things."
- icon = 'icons/obj/card.dmi'
- w_class = 1.0
-
- var/list/files = list( )
-
-/obj/item/weapon/card/data
- name = "data disk"
- desc = "A disk of data."
- icon_state = "data"
- var/function = "storage"
- var/data = "null"
- var/special = null
- item_state = "card-id"
-
-/obj/item/weapon/card/data/clown
- name = "coordinates to clown planet"
- icon_state = "data"
- item_state = "card-id"
- layer = 3
- level = 2
- desc = "This card contains coordinates to the fabled Clown Planet. Handle with care."
- function = "teleporter"
- data = "Clown Land"
-
-/obj/item/weapon/card/emag
- desc = "It's a card with a magnetic strip attached to some circuitry."
- name = "cryptographic sequencer"
- icon_state = "emag"
- item_state = "card-id"
- origin_tech = "magnets=2;syndicate=2"
- var/uses = 5
-
-/obj/item/weapon/card/id
- name = "identification card"
- desc = "A card used to provide ID and determine access across the station."
- icon_state = "id"
- item_state = "card-id"
- var/access = list()
- var/registered_name = null // The name registered_name on the card
- slot_flags = SLOT_ID
- var/obj/item/weapon/credit_card/card
- var/blood_type = "\[UNSET\]"
- var/dna_hash = "\[UNSET\]"
- var/fingerprint_hash = "\[UNSET\]"
-
- var/assignment = null
- var/assignment_real_title = null
- var/dorm = 0 // determines if this ID has claimed a dorm already
-
- var/money
- var/pin
-
-/obj/item/weapon/card/id/silver
- name = "identification card"
- desc = "A silver card which shows honour and dedication."
- icon_state = "silver"
- item_state = "silver_id"
-
-/obj/item/weapon/card/id/gold
- name = "identification card"
- desc = "A golden card which shows power and might."
- icon_state = "gold"
- item_state = "gold_id"
-
-/obj/item/weapon/card/id/syndicate
- name = "agent card"
- desc = "Shhhhh."
- access = list(access_maint_tunnels)
- origin_tech = "syndicate=3"
-
-/obj/item/weapon/card/id/syndicate_command
- name = "syndicate ID card"
- desc = "An ID straight from the Syndicate."
- registered_name = "Syndicate"
- assignment = "Syndicate Overlord"
- access = list(access_syndicate)
-
-/obj/item/weapon/card/id/captains_spare
- name = "captain's spare ID"
- desc = "The spare ID of the High Lord himself."
- icon_state = "gold"
- item_state = "gold_id"
- registered_name = "Captain"
- assignment = "Captain"
- New()
- access = get_access("Captain")
- ..()
-
-/obj/item/weapon/card/id/centcom
- name = "\improper CentCom. ID"
- desc = "An ID straight from Cent. Com."
- icon_state = "centcom"
- registered_name = "Central Command"
- assignment = "General"
- New()
- access = get_all_centcom_access()
- ..()
-
-#define MAXCOIL 30
-/obj/item/weapon/cable_coil
- name = "cable coil"
- icon = 'icons/obj/power.dmi'
- icon_state = "coil_red"
- var/amount = MAXCOIL
- color = "red"
- desc = "A coil of power cable."
- throwforce = 10
- w_class = 2.0
- throw_speed = 2
- throw_range = 5
- m_amt = 50
- g_amt = 20
- flags = TABLEPASS | USEDELAY | FPRINT | CONDUCT
- slot_flags = SLOT_BELT
- item_state = "coil_red"
- attack_verb = list("whipped", "lashed", "disciplined", "flogged")
-
-/obj/item/weapon/cable_coil/cut
- item_state = "coil_red2"
-
-/obj/item/weapon/cable_coil/yellow
- color = "yellow"
- icon_state = "coil_yellow"
-
-/obj/item/weapon/cable_coil/blue
- color = "blue"
- icon_state = "coil_blue"
-
-/obj/item/weapon/cable_coil/green
- color = "green"
- icon_state = "coil_green"
-
-/obj/item/weapon/cable_coil/pink
- color = "pink"
- icon_state = "coil_pink"
-
-/obj/item/weapon/cable_coil/orange
- color = "orange"
- icon_state = "coil_orange"
-
-/obj/item/weapon/cable_coil/cyan
- color = "cyan"
- icon_state = "coil_cyan"
-
-/obj/item/weapon/cable_coil/white
- color = "white"
- icon_state = "coil_white"
-
-/obj/item/weapon/cable_coil/random/New()
- color = pick("red","yellow","green","blue","pink")
- icon_state = "coil_[color]"
- ..()
-
-
-/obj/item/weapon/crowbar
- name = "crowbar"
- desc = "Used to hit floors"
- icon = 'icons/obj/items.dmi'
- icon_state = "crowbar"
- flags = FPRINT | TABLEPASS| CONDUCT
- slot_flags = SLOT_BELT
- force = 5.0
- throwforce = 7.0
- item_state = "crowbar"
- w_class = 2.0
- m_amt = 50
- origin_tech = "engineering=1"
- attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
-
-/obj/item/weapon/crowbar/red
- icon = 'icons/obj/items.dmi'
- icon_state = "red_crowbar"
- item_state = "crowbar_red"
/obj/item/weapon/cane
name = "cane"
- desc = "A cane used by a true gentlemen."
+ desc = "A cane used by a true gentlemen. Or a clown."
icon = 'icons/obj/weapons.dmi'
icon_state = "cane"
item_state = "stick"
@@ -834,70 +225,6 @@
item_state = "gift"
w_class = 4.0
-/obj/item/weapon/hand_tele
- name = "hand tele"
- desc = "A portable item using blue-space technology."
- icon = 'icons/obj/device.dmi'
- icon_state = "hand_tele"
- item_state = "electronic"
- throwforce = 5
- w_class = 2.0
- throw_speed = 3
- throw_range = 5
- m_amt = 10000
- origin_tech = "magnets=1;bluespace=3"
-
-/obj/item/weapon/handcuffs
- name = "handcuffs"
- desc = "Use this to keep prisoners in line."
- gender = PLURAL
- icon = 'icons/obj/items.dmi'
- icon_state = "handcuff"
- flags = FPRINT | TABLEPASS | CONDUCT
- slot_flags = SLOT_BELT
- throwforce = 5
- w_class = 2.0
- throw_speed = 2
- throw_range = 5
- m_amt = 500
- origin_tech = "materials=1"
- var/dispenser = 0
- var/breakouttime = 1200 //Deciseconds = 120s = 2 minutes
-
-/obj/item/weapon/handcuffs/cable
- name = "cable restraints"
- desc = "Looks like some cables tied together. Could be used to tie something up."
- icon_state = "cuff_red"
- breakouttime = 300 //Deciseconds = 30s
-
-/obj/item/weapon/handcuffs/cable/red
- icon_state = "cuff_red"
-
-/obj/item/weapon/handcuffs/cable/yellow
- icon_state = "cuff_yellow"
-
-/obj/item/weapon/handcuffs/cable/blue
- icon_state = "cuff_blue"
-
-/obj/item/weapon/handcuffs/cable/green
- icon_state = "cuff_green"
-
-/obj/item/weapon/handcuffs/cable/pink
- icon_state = "cuff_pink"
-
-/obj/item/weapon/handcuffs/cable/orange
- icon_state = "cuff_orange"
-
-/obj/item/weapon/handcuffs/cable/cyan
- icon_state = "cuff_cyan"
-
-/obj/item/weapon/handcuffs/cable/white
- icon_state = "cuff_white"
-
-/obj/item/weapon/handcuffs/cyborg
- dispenser = 1
-
-
/obj/item/weapon/legcuffs
name = "legcuffs"
desc = "Use this to keep prisoners in line."
@@ -918,6 +245,10 @@
desc = "A trap used to catch bears and other legged creatures."
var/armed = 0
+ suicide_act(mob/user)
+ viewers(user) << "\red [user] is putting the [src.name] on \his head! It looks like \he's trying to commit suicide."
+ return (BRUTELOSS)
+
/obj/item/weapon/legcuffs/beartrap/attack_self(mob/user as mob)
..()
if(ishuman(user) && !user.stat && !user.restrained())
@@ -941,28 +272,13 @@
if(O == H)
continue
O.show_message("\red [H] steps on \the [src].", 1)
- if(isanimal(AM) && !istype(AM, /mob/living/simple_animal/parrot))
+ if(isanimal(AM) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator))
armed = 0
var/mob/living/simple_animal/SA = AM
- SA.health = 0
+ SA.health -= 20
..()
-/obj/item/weapon/locator
- name = "locator"
- desc = "Used to track those with locater implants."
- icon = 'icons/obj/device.dmi'
- icon_state = "locator"
- var/temp = null
- var/frequency = 1451
- var/broadcasting = null
- var/listening = 1.0
- flags = FPRINT | TABLEPASS| CONDUCT
- w_class = 2.0
- item_state = "electronic"
- throw_speed = 4
- throw_range = 20
- m_amt = 400
- origin_tech = "magnets=1"
+
/obj/item/weapon/caution
desc = "Caution! Wet Floor!"
@@ -982,84 +298,6 @@
name = "warning cone"
icon_state = "cone"
-/obj/item/weapon/directions
- name = "crumpled paper"
- gender = PLURAL
- desc = "This is a crumpled piece of paper."
- icon = 'icons/obj/weapons.dmi'
- icon_state = "crumpled"
- throwforce = 0
- w_class = 1.0
- throw_speed = 3
- throw_range = 15
- //layer = 4
-
-/obj/item/weapon/paper/Court
- name = "paper- 'Judgement'"
- info = "For crimes against the station, the offender is sentenced to: \n \n"
-
-/obj/item/weapon/paper/Toxin
- name = "paper- 'Chemical Information'"
- info = "Known Onboard Toxins: \n\tGrade A Semi-Liquid Plasma: \n\t\tHighly poisonous. You cannot sustain concentrations above 15 units. \n\t\tA gas mask fails to filter plasma after 50 units. \n\t\tWill attempt to diffuse like a gas. \n\t\tFiltered by scrubbers. \n\t\tThere is a bottled version which is very different \n\t\t\tfrom the version found in canisters! \n \n\t\tWARNING: Highly Flammable. Keep away from heat sources \n\t\texcept in a enclosed fire area! \n\t\tWARNING: It is a crime to use this without authorization. \nKnown Onboard Anti-Toxin: \n\tAnti-Toxin Type 01P: Works against Grade A Plasma. \n\t\tBest if injected directly into bloodstream. \n\t\tA full injection is in every regular Med-Kit. \n\t\tSpecial toxin Kits hold around 7. \n \nKnown Onboard Chemicals (other): \n\tRejuvenation T#001: \n\t\tEven 1 unit injected directly into the bloodstream \n\t\t\twill cure paralysis and sleep toxins. \n\t\tIf administered to a dying patient it will prevent \n\t\t\tfurther damage for about units*3 seconds. \n\t\t\tit will not cure them or allow them to be cured. \n\t\tIt can be administeredd to a non-dying patient \n\t\t\tbut the chemicals disappear just as fast. \n\tSleep Toxin T#054: \n\t\t5 units wilkl induce precisely 1 minute of sleep. \n\t\t\tThe effect are cumulative. \n\t\tWARNING: It is a crime to use this without authorization"
-
-/obj/item/weapon/paper/courtroom
- name = "paper- 'A Crash Course in Legal SOP on SS13'"
- info = "Roles: \nThe Detective is basically the investigator and prosecutor. \nThe Staff Assistant can perform these functions with written authority from the Detective. \nThe Captain/HoP/Warden is ct as the judicial authority. \nThe Security Officers are responsible for executing warrants, security during trial, and prisoner transport. \n \nInvestigative Phase: \nAfter the crime has been committed the Detective's job is to gather evidence and try to ascertain not only who did it but what happened. He must take special care to catalogue everything and don't leave anything out. Write out all the evidence on paper. Make sure you take an appropriate number of fingerprints. IF he must ask someone questions he has permission to confront them. If the person refuses he can ask a judicial authority to write a subpoena for questioning. If again he fails to respond then that person is to be jailed as insubordinate and obstructing justice. Said person will be released after he cooperates. \n \nONCE the FT has a clear idea as to who the criminal is he is to write an arrest warrant on the piece of paper. IT MUST LIST THE CHARGES. The FT is to then go to the judicial authority and explain a small version of his case. If the case is moderately acceptable the authority should sign it. Security must then execute said warrant. \n \nPre-Pre-Trial Phase: \nNow a legal representative must be presented to the defendant if said defendant requests one. That person and the defendant are then to be given time to meet (in the jail IS ACCEPTABLE). The defendant and his lawyer are then to be given a copy of all the evidence that will be presented at trial (rewriting it all on paper is fine). THIS IS CALLED THE DISCOVERY PACK. With a few exceptions, THIS IS THE ONLY EVIDENCE BOTH SIDES MAY USE AT TRIAL. IF the prosecution will be seeking the death penalty it MUST be stated at this time. ALSO if the defense will be seeking not guilty by mental defect it must state this at this time to allow ample time for examination. \nNow at this time each side is to compile a list of witnesses. By default, the defendant is on both lists regardless of anything else. Also the defense and prosecution can compile more evidence beforehand BUT in order for it to be used the evidence MUST also be given to the other side.\nThe defense has time to compile motions against some evidence here. \nPossible Motions: \n1. Invalidate Evidence- Something with the evidence is wrong and the evidence is to be thrown out. This includes irrelevance or corrupt security. \n2. Free Movement- Basically the defendant is to be kept uncuffed before and during the trial. \n3. Subpoena Witness- If the defense presents god reasons for needing a witness but said person fails to cooperate then a subpoena is issued. \n4. Drop the Charges- Not enough evidence is there for a trial so the charges are to be dropped. The FT CAN RETRY but the judicial authority must carefully reexamine the new evidence. \n5. Declare Incompetent- Basically the defendant is insane. Once this is granted a medical official is to examine the patient. If he is indeed insane he is to be placed under care of the medical staff until he is deemed competent to stand trial. \n \nALL SIDES MOVE TO A COURTROOM \nPre-Trial Hearings: \nA judicial authority and the 2 sides are to meet in the trial room. NO ONE ELSE BESIDES A SECURITY DETAIL IS TO BE PRESENT. The defense submits a plea. If the plea is guilty then proceed directly to sentencing phase. Now the sides each present their motions to the judicial authority. He rules on them. Each side can debate each motion. Then the judicial authority gets a list of crew members. He first gets a chance to look at them all and pick out acceptable and available jurors. Those jurors are then called over. Each side can ask a few questions and dismiss jurors they find too biased. HOWEVER before dismissal the judicial authority MUST agree to the reasoning. \n \nThe Trial: \nThe trial has three phases. \n1. Opening Arguments- Each side can give a short speech. They may not present ANY evidence. \n2. Witness Calling/Evidence Presentation- The prosecution goes first and is able to call the witnesses on his approved list in any order. He can recall them if necessary. During the questioning the lawyer may use the evidence in the questions to help prove a point. After every witness the other side has a chance to cross-examine. After both sides are done questioning a witness the prosecution can present another or recall one (even the EXACT same one again!). After prosecution is done the defense can call witnesses. After the initial cases are presented both sides are free to call witnesses on either list. \nFINALLY once both sides are done calling witnesses we move onto the next phase. \n3. Closing Arguments- Same as opening. \nThe jury then deliberates IN PRIVATE. THEY MUST ALL AGREE on a verdict. REMEMBER: They mix between some charges being guilty and others not guilty (IE if you supposedly killed someone with a gun and you unfortunately picked up a gun without authorization then you CAN be found not guilty of murder BUT guilty of possession of illegal weaponry.). Once they have agreed they present their verdict. If unable to reach a verdict and feel they will never they call a deadlocked jury and we restart at Pre-Trial phase with an entirely new set of jurors. \n \nSentencing Phase: \nIf the death penalty was sought (you MUST have gone through a trial for death penalty) then skip to the second part. \nI. Each side can present more evidence/witnesses in any order. There is NO ban on emotional aspects or anything. The prosecution is to submit a suggested penalty. After all the sides are done then the judicial authority is to give a sentence. \nII. The jury stays and does the same thing as I. Their sole job is to determine if the death penalty is applicable. If NOT then the judge selects a sentence. \n \nTADA you're done. Security then executes the sentence and adds the applicable convictions to the person's record. \n"
-
-/obj/item/weapon/paper/hydroponics
- name = "paper- 'Greetings from Billy Bob'"
- info = "Hey fellow botanist! \n \nI didn't trust the station folk so I left \na couple of weeks ago. But here's some \ninstructions on how to operate things here. \nYou can grow plants and each iteration they become \nstronger, more potent and have better yield, if you \nknow which ones to pick. Use your botanist's analyzer \nfor that. You can turn harvested plants into seeds \nat the seed extractor, and replant them for better stuff! \nSometimes if the weed level gets high in the tray \nmutations into different mushroom or weed species have \nbeen witnessed. On the rare occassion even weeds mutate! \n \nEither way, have fun! \n \nBest regards, \nBilly Bob Johnson. \n \nPS. \nHere's a few tips: \nIn nettles, potency = damage \nIn amanitas, potency = deadliness + side effect \nIn Liberty caps, potency = drug power + effect \nIn chilis, potency = heat \nNutrients keep mushrooms alive! \nWater keeps weeds such as nettles alive! \nAll other plants need both."
-
-/obj/item/weapon/paper/djstation
- name = "paper - 'DJ Listening Outpost'"
- info = "Welcome new owner!
You have purchased the latest in listening equipment. The telecommunication setup we created is the best in listening to common and private radio fequencies. Here is a step by step guide to start listening in on those saucy radio channels:
Equip yourself with a multi-tool
Use the multitool on each machine, that is the broadcaster, receiver and the relay.
Turn all the machines on, it has already been configured for you to listen on.
Simple as that. Now to listen to the private channels, you'll have to configure the intercoms, located on the front desk. Here is a list of frequencies for you to listen on.
145.7 - Common Channel
144.7 - Private AI Channel
135.9 - Security Channel
135.7 - Engineering Channel
135.5 - Medical Channel
135.3 - Command Channel
135.1 - Science Channel
134.9 - Mining Channel
134.7 - Cargo Channel
"
-
-/obj/item/weapon/paper/flag
- icon_state = "flag_neutral"
- item_state = "paper"
- anchored = 1.0
-
-/obj/item/weapon/paper/jobs
- name = "paper- 'Job Information'"
- info = "Information on all formal jobs that can be assigned on Space Station 13 can be found on this document. \nThe data will be in the following form. \nGenerally lower ranking positions come first in this list. \n \nJob Name general access>lab access-engine access-systems access (atmosphere control) \n\tJob Description \nJob Duties (in no particular order) \nTips (where applicable) \n \nResearch Assistant 1>1-0-0 \n\tThis is probably the lowest level position. Anyone who enters the space station after the initial job\nassignment will automatically receive this position. Access with this is restricted. Head of Personnel should\nappropriate the correct level of assistance. \n1. Assist the researchers. \n2. Clean up the labs. \n3. Prepare materials. \n \nStaff Assistant 2>0-0-0 \n\tThis position assists the security officer in his duties. The staff assisstants should primarily br\npatrolling the ship waiting until they are needed to maintain ship safety.\n(Addendum: Updated/Elevated Security Protocols admit issuing of low level weapons to security personnel) \n1. Patrol ship/Guard key areas \n2. Assist security officer \n3. Perform other security duties. \n \nTechnical Assistant 1>0-0-1 \n\tThis is yet another low level position. The technical assistant helps the engineer and the statian\ntechnician with the upkeep and maintenance of the station. This job is very important because it usually\ngets to be a heavy workload on station technician and these helpers will alleviate that. \n1. Assist Station technician and Engineers. \n2. Perform general maintenance of station. \n3. Prepare materials. \n \nMedical Assistant 1>1-0-0 \n\tThis is the fourth position yet it is slightly less common. This position doesn't have much power\noutside of the med bay. Consider this position like a nurse who helps to upkeep medical records and the\nmaterials (filling syringes and checking vitals) \n1. Assist the medical personnel. \n2. Update medical files. \n3. Prepare materials for medical operations. \n \nResearch Technician 2>3-0-0 \n\tThis job is primarily a step up from research assistant. These people generally do not get their own lab\nbut are more hands on in the experimentation process. At this level they are permitted to work as consultants to\nthe others formally. \n1. Inform superiors of research. \n2. Perform research alongside of official researchers. \n \nDetective 3>2-0-0 \n\tThis job is in most cases slightly boring at best. Their sole duty is to\nperform investigations of crine scenes and analysis of the crime scene. This\nalleviates SOME of the burden from the security officer. This person's duty\nis to draw conclusions as to what happened and testify in court. Said person\nalso should stroe the evidence ly. \n1. Perform crime-scene investigations/draw conclusions. \n2. Store and catalogue evidence properly. \n3. Testify to superiors/inquieries on findings. \n \nStation Technician 2>0-2-3 \n\tPeople assigned to this position must work to make sure all the systems aboard Space Station 13 are operable.\nThey should primarily work in the computer lab and repairing faulty equipment. They should work with the\natmospheric technician. \n1. Maintain SS13 systems. \n2. Repair equipment. \n \nAtmospheric Technician 3>0-0-4 \n\tThese people should primarily work in the atmospheric control center and lab. They have the very important\njob of maintaining the delicate atmosphere on SS13. \n1. Maintain atmosphere on SS13 \n2. Research atmospheres on the space station. (safely please!) \n \nEngineer 2>1-3-0 \n\tPeople working as this should generally have detailed knowledge as to how the propulsion systems on SS13\nwork. They are one of the few classes that have unrestricted access to the engine area. \n1. Upkeep the engine. \n2. Prevent fires in the engine. \n3. Maintain a safe orbit. \n \nMedical Researcher 2>5-0-0 \n\tThis position may need a little clarification. Their duty is to make sure that all experiments are safe and\nto conduct experiments that may help to improve the station. They will be generally idle until a new laboratory\nis constructed. \n1. Make sure the station is kept safe. \n2. Research medical properties of materials studied of Space Station 13. \n \nScientist 2>5-0-0 \n\tThese people study the properties, particularly the toxic properties, of materials handled on SS13.\nTechnically they can also be called Plasma Technicians as plasma is the material they routinly handle. \n1. Research plasma \n2. Make sure all plasma is properly handled. \n \nMedical Doctor (Officer) 2>0-0-0 \n\tPeople working this job should primarily stay in the medical area. They should make sure everyone goes to\nthe medical bay for treatment and examination. Also they should make sure that medical supplies are kept in\norder. \n1. Heal wounded people. \n2. Perform examinations of all personnel. \n3. Moniter usage of medical equipment. \n \nSecurity Officer 3>0-0-0 \n\tThese people should attempt to keep the peace inside the station and make sure the station is kept safe. One\nside duty is to assist in repairing the station. They also work like general maintenance personnel. They are not\ngiven a weapon and must use their own resources. \n(Addendum: Updated/Elevated Security Protocols admit issuing of weapons to security personnel) \n1. Maintain order. \n2. Assist others. \n3. Repair structural problems. \n \nHead of Security 4>5-2-2 \n\tPeople assigned as Head of Security should issue orders to the security staff. They should\nalso carefully moderate the usage of all security equipment. All security matters should be reported to this person. \n1. Oversee security. \n2. Assign patrol duties. \n3. Protect the station and staff. \n \nHead of Personnel 4>4-2-2 \n\tPeople assigned as head of personnel will find themselves moderating all actions done by personnel. \nAlso they have the ability to assign jobs and access levels. \n1. Assign duties. \n2. Moderate personnel. \n3. Moderate research. \n \nCaptain 5>5-5-5 (unrestricted station wide access) \n\tThis is the highest position youi can aquire on Space Station 13. They are allowed anywhere inside the\nspace station and therefore should protect their ID card. They also have the ability to assign positions\nand access levels. They should not abuse their power. \n1. Assign all positions on SS13 \n2. Inspect the station for any problems. \n3. Perform administrative duties. \n"
-
-/obj/item/weapon/paper/photograph
- name = "photo"
- icon_state = "photo"
- var/photo_id = 0.0
- item_state = "paper"
-
-/obj/item/weapon/paper/sop
- name = "paper- 'Standard Operating Procedure'"
- info = "Alert Levels: \nBlue- Emergency \n\t1. Caused by fire \n\t2. Caused by manual interaction \n\tAction: \n\t\tClose all fire doors. These can only be opened by reseting the alarm \nRed- Ejection/Self Destruct \n\t1. Caused by module operating computer. \n\tAction: \n\t\tAfter the specified time the module will eject completely. \n \nEngine Maintenance Instructions: \n\tShut off ignition systems: \n\tActivate internal power \n\tActivate orbital balance matrix \n\tRemove volatile liquids from area \n\tWear a fire suit \n \n\tAfter \n\t\tDecontaminate \n\t\tVisit medical examiner \n \nToxin Laboratory Procedure: \n\tWear a gas mask regardless \n\tGet an oxygen tank. \n\tActivate internal atmosphere \n \n\tAfter \n\t\tDecontaminate \n\t\tVisit medical examiner \n \nDisaster Procedure: \n\tFire: \n\t\tActivate sector fire alarm. \n\t\tMove to a safe area. \n\t\tGet a fire suit \n\t\tAfter: \n\t\t\tAssess Damage \n\t\t\tRepair damages \n\t\t\tIf needed, Evacuate \n\tMeteor Shower: \n\t\tActivate fire alarm \n\t\tMove to the back of ship \n\t\tAfter \n\t\t\tRepair damage \n\t\t\tIf needed, Evacuate \n\tAccidental Reentry: \n\t\tActivate fire alrms in front of ship. \n\t\tMove volatile matter to a fire proof area! \n\t\tGet a fire suit. \n\t\tStay secure until an emergency ship arrives. \n \n\t\tIf ship does not arrive- \n\t\t\tEvacuate to a nearby safe area!"
-
-/obj/item/weapon/paper/genetics_side_effects
- name = "paper - 'Genetical Side-Effects and Treatments'"
-
- New()
- ..()
- info = ""
- for(var/tp in typesof(/datum/genetics/side_effect) - /datum/genetics/side_effect)
- var/datum/genetics/side_effect/S = new tp
- info += "Name:\t [S.name] "
- info += "Symptom:\t [S.symptom] "
- info += "Treatment:\t [S.treatment] "
- info += "Effect:\t [S.effect] "
- info += " "
-
-/obj/item/weapon/banhammer
- desc = "A banhammer"
- name = "banhammer"
- icon = 'icons/obj/items.dmi'
- icon_state = "toyhammer"
- flags = FPRINT | TABLEPASS
- slot_flags = SLOT_BELT
- throwforce = 0
- w_class = 1.0
- throw_speed = 7
- throw_range = 15
- attack_verb = list("banned")
-
/obj/item/weapon/rack_parts
name = "rack parts"
desc = "Parts of a rack."
@@ -1068,32 +306,6 @@
flags = FPRINT | TABLEPASS| CONDUCT
m_amt = 3750
-/* //gtfo my object tree
-/obj/item/weapon/rubber_chicken
- name = "rubber chicken"
- desc = "A rubber chicken, isn't that hilarious?"
- icon = 'icons/obj/items.dmi'
- icon_state = "rubber_chicken"
- item_state = "rubber_chicken"
- w_class = 2.0
-*/
-
-/obj/item/weapon/screwdriver
- name = "screwdriver"
- desc = "You can be totally screwwy with this."
- icon = 'icons/obj/items.dmi'
- icon_state = "screwdriver"
- flags = FPRINT | TABLEPASS| CONDUCT
- slot_flags = SLOT_BELT
- force = 5.0
- w_class = 1.0
- throwforce = 5.0
- throw_speed = 3
- throw_range = 5
- g_amt = 0
- m_amt = 75
- attack_verb = list("stabbed")
-
/obj/item/weapon/shard
name = "shard"
icon = 'icons/obj/shards.dmi'
@@ -1106,6 +318,11 @@
g_amt = 3750
attack_verb = list("stabbed", "slashed", "sliced", "cut")
+ suicide_act(mob/user)
+ viewers(user) << pick("/red [user] is slitting \his wrists with the shard of glass! It looks like \he's trying to commit suicide.", \
+ "\red [user] is slitting \his throat with the shard of glass! It looks like \he's trying to commit suicide.")
+ return (BRUTELOSS)
+
/obj/item/weapon/shard/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
@@ -1149,20 +366,6 @@
m_amt = 100
origin_tech = "magnets=1"
-/obj/item/weapon/spellbook
- name = "spell book"
- desc = "The legendary book of spells of the wizard."
- icon = 'icons/obj/library.dmi'
- icon_state ="book"
- throw_speed = 1
- throw_range = 5
- w_class = 1.0
- flags = FPRINT | TABLEPASS
- var/uses = 5.0
- var/temp = null
- var/max_uses = 5
- var/op = 1
-
/obj/item/weapon/staff
name = "wizards staff"
desc = "Apparently a staff used by the wizard."
@@ -1230,138 +433,9 @@
m_amt = 40
attack_verb = list("whipped", "lashed", "disciplined", "tickled")
-/obj/item/weapon/wrapping_paper
- name = "wrapping paper"
- desc = "You can use this to wrap items in."
- icon = 'icons/obj/items.dmi'
- icon_state = "wrap_paper"
- var/amount = 20.0
-
-/obj/item/weapon/cell
- name = "power cell"
- desc = "A rechargable electrochemical power cell."
- icon = 'icons/obj/power.dmi'
- icon_state = "cell"
- item_state = "cell"
- origin_tech = "powerstorage=1"
- flags = FPRINT|TABLEPASS
- force = 5.0
- throwforce = 5.0
- throw_speed = 3
- throw_range = 5
- w_class = 3.0
- pressure_resistance = 80
- var/charge = 0 // note %age conveted to actual charge in New
- var/maxcharge = 1000
- m_amt = 700
- g_amt = 50
- var/rigged = 0 // true if rigged to explode
- var/minor_fault = 0 //If not 100% reliable, it will build up faults.
- var/construction_cost = list("metal"=750,"glass"=75)
- var/construction_time=100
-
-/obj/item/weapon/cell/crap
- name = "\improper Nanotrasen brand rechargable AA battery"
- desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
- origin_tech = "powerstorage=0"
- maxcharge = 500
- g_amt = 40
-
-/obj/item/weapon/cell/crap/empty/New()
- ..()
- charge = 0
-
-/obj/item/weapon/cell/secborg
- name = "\improper Security borg rechargable D battery"
- origin_tech = "powerstorage=0"
- maxcharge = 600 //600 max charge / 100 charge per shot = six shots
- g_amt = 40
-
-/obj/item/weapon/cell/secborg/empty/New()
- ..()
- charge = 0
-
-/obj/item/weapon/cell/high
- name = "high-capacity power cell"
- origin_tech = "powerstorage=2"
- icon_state = "hcell"
- maxcharge = 10000
- g_amt = 60
-
-/obj/item/weapon/cell/high/empty/New()
- ..()
- charge = 0
-
-/obj/item/weapon/cell/super
- name = "super-capacity power cell"
- origin_tech = "powerstorage=5"
- icon_state = "scell"
- maxcharge = 20000
- g_amt = 70
- construction_cost = list("metal"=750,"glass"=100)
-
-/obj/item/weapon/cell/super/empty/New()
- ..()
- charge = 0
-
-/obj/item/weapon/cell/hyper
- name = "hyper-capacity power cell"
- origin_tech = "powerstorage=6"
- icon_state = "hpcell"
- maxcharge = 30000
- g_amt = 80
- construction_cost = list("metal"=500,"glass"=150,"gold"=200,"silver"=200)
-
-/obj/item/weapon/cell/hyper/empty/New()
- ..()
- charge = 0
-
-/obj/item/weapon/cell/infinite
- name = "infinite-capacity power cell!"
- icon_state = "icell"
- origin_tech = null
- maxcharge = 30000
- g_amt = 80
- use()
- return 1
-
-/obj/item/weapon/cell/potato
- name = "potato battery"
- desc = "A rechargable starch based power cell."
- origin_tech = "powerstorage=1"
- icon = 'icons/obj/power.dmi' //'icons/obj/harvest.dmi'
- icon_state = "potato_cell" //"potato_battery"
- charge = 100
- maxcharge = 300
- m_amt = 0
- g_amt = 0
- minor_fault = 1
-
-/obj/item/weapon/camera_bug/attack_self(mob/usr as mob)
- var/list/cameras = new/list()
- for (var/obj/machinery/camera/C in cameranet.cameras)
- if (C.bugged && C.status)
- cameras.Add(C)
- if (length(cameras) == 0)
- usr << "\red No bugged functioning cameras found."
- return
-
- var/list/friendly_cameras = new/list()
-
- for (var/obj/machinery/camera/C in cameras)
- friendly_cameras.Add(C.c_tag)
-
- var/target = input("Select the camera to observe", null) as null|anything in friendly_cameras
- if (!target)
- return
- for (var/obj/machinery/camera/C in cameras)
- if (C.c_tag == target)
- target = C
- break
- if (usr.stat == 2) return
-
- usr.client.eye = target
-
+ suicide_act(mob/user)
+ viewers(user) << "\red [user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide."
+ return (OXYLOSS)
/obj/item/weapon/module
icon = 'icons/obj/module.dmi'
@@ -1397,15 +471,6 @@
desc = "Charging circuits for power cells."
-/obj/item/weapon/a_gift
- name = "gift"
- desc = "A gift it appears."
- icon = 'icons/obj/items.dmi'
- icon_state = "gift"
- item_state = "gift"
- pressure_resistance = 70
-
-
/obj/item/device/camera_bug
name = "camera bug"
icon = 'icons/obj/device.dmi'
@@ -1415,240 +480,31 @@
throw_speed = 4
throw_range = 20
+/obj/item/weapon/camera_bug/attack_self(mob/usr as mob)
+ var/list/cameras = new/list()
+ for (var/obj/machinery/camera/C in cameranet.cameras)
+ if (C.bugged && C.status)
+ cameras.Add(C)
+ if (length(cameras) == 0)
+ usr << "\red No bugged functioning cameras found."
+ return
-/obj/item/weapon/kitchen
- icon = 'icons/obj/kitchen.dmi'
+ var/list/friendly_cameras = new/list()
-/obj/item/weapon/kitchen/rollingpin
- name = "rolling pin"
- desc = "Used to knock out the Bartender."
- icon_state = "rolling_pin"
- force = 8.0
- throwforce = 10.0
- throw_speed = 2
- throw_range = 7
- w_class = 3.0
- attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") //I think the rollingpin attackby will end up ignoring this anyway.
+ for (var/obj/machinery/camera/C in cameras)
+ friendly_cameras.Add(C.c_tag)
-/obj/item/weapon/kitchenknife
- name = "kitchen knife"
- icon = 'icons/obj/kitchen.dmi'
- icon_state = "knife"
- desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
- flags = FPRINT | TABLEPASS | CONDUCT
- force = 10.0
- w_class = 3.0
- throwforce = 6.0
- throw_speed = 3
- throw_range = 6
- m_amt = 12000
- origin_tech = "materials=1"
- attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
- sharp = 1
+ var/target = input("Select the camera to observe", null) as null|anything in friendly_cameras
+ if (!target)
+ return
+ for (var/obj/machinery/camera/C in cameras)
+ if (C.c_tag == target)
+ target = C
+ break
+ if (usr.stat == 2) return
-/obj/item/weapon/kitchenknife/ritual
- name = "ritual knife"
- desc = "The unearthly energies that once powered this blade are now dormant."
- icon = 'icons/obj/wizard.dmi'
- icon_state = "render"
+ usr.client.eye = target
-/obj/item/weapon/butch
- name = "butcher's Cleaver"
- icon = 'icons/obj/kitchen.dmi'
- icon_state = "butch"
- desc = "A huge thing used for chopping and chopping up meat."
- flags = FPRINT | TABLEPASS | CONDUCT
- force = 15.0
- w_class = 2.0
- throwforce = 8.0
- throw_speed = 3
- throw_range = 6
- m_amt = 12000
- origin_tech = "materials=1"
- attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
- sharp = 1
-
-/obj/item/weapon/butch/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
- playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
- return ..()
-
-/obj/item/weapon/tray
- name = "tray"
- icon = 'icons/obj/food.dmi'
- icon_state = "tray"
- desc = "A metal tray to lay food on."
- throwforce = 12.0
- throwforce = 10.0
- throw_speed = 1
- throw_range = 5
- w_class = 3.0
- flags = FPRINT | TABLEPASS | CONDUCT
- m_amt = 3000
- /* // NOPE
- var/food_total= 0
- var/burger_amt = 0
- var/cheese_amt = 0
- var/fries_amt = 0
- var/classyalcdrink_amt = 0
- var/alcdrink_amt = 0
- var/bottle_amt = 0
- var/soda_amt = 0
- var/carton_amt = 0
- var/pie_amt = 0
- var/meatbreadslice_amt = 0
- var/salad_amt = 0
- var/miscfood_amt = 0
- */
- var/list/carrying = list() // List of things on the tray. - Doohl
- var/max_carry = 10 // w_class = 1 -- takes up 1
- // w_class = 2 -- takes up 3
- // w_class = 3 -- takes up 5
-
-
-/obj/item/weapon/kitchen/utensil
- force = 5.0
- w_class = 1.0
- throwforce = 5.0
- throw_speed = 3
- throw_range = 5
- flags = FPRINT | TABLEPASS | CONDUCT
- origin_tech = "materials=1"
- attack_verb = list("attacked", "stabbed", "poked")
-
-
-/obj/item/weapon/kitchen/utensil/fork
- name = "fork"
- desc = "Pointy."
- icon_state = "fork"
-
-/obj/item/weapon/kitchen/utensil/knife
- name = "knife"
- desc = "Can cut through any food."
- icon_state = "knife"
- force = 10.0
- throwforce = 10.0
- sharp = 1
-
-/obj/item/weapon/kitchen/utensil/spoon
- name = "spoon"
- desc = "SPOON!"
- icon_state = "spoon"
- attack_verb = list("attacked", "poked")
-
-/obj/item/weapon/scalpel
- name = "scalpel"
- desc = "Cut, cut, and once more cut."
- icon = 'icons/obj/surgery.dmi'
- icon_state = "scalpel"
- flags = FPRINT | TABLEPASS | CONDUCT
- force = 10.0
- w_class = 1.0
- throwforce = 5.0
- throw_speed = 3
- throw_range = 5
- m_amt = 10000
- g_amt = 5000
- origin_tech = "materials=1;biotech=1"
- attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
- sharp = 1
-
-/obj/item/weapon/scalpel/stabslash
- name = "\proper Stabslash The Pains of Healing"
- desc = "All craftsmanship is of highest quality. On it is image of doctor and patient. Doctor is panicing. Patien is asleep."
- icon_state = "stabslash"
-
-/obj/item/weapon/retractor
- name = "retractor"
- desc = "Retracts stuff."
- icon = 'icons/obj/surgery.dmi'
- icon_state = "retractor"
- m_amt = 10000
- g_amt = 5000
- flags = FPRINT | TABLEPASS | CONDUCT
- w_class = 1.0
- origin_tech = "materials=1;biotech=1"
-
-/obj/item/weapon/hemostat
- name = "hemostat"
- desc = "You think you have seen this before."
- icon = 'icons/obj/surgery.dmi'
- icon_state = "hemostat"
- m_amt = 5000
- g_amt = 2500
- flags = FPRINT | TABLEPASS | CONDUCT
- w_class = 1.0
- origin_tech = "materials=1;biotech=1"
- attack_verb = list("attacked", "pinched")
-
-/obj/item/weapon/cautery
- name = "cautery"
- desc = "This stops bleeding."
- icon = 'icons/obj/surgery.dmi'
- icon_state = "cautery"
- m_amt = 5000
- g_amt = 2500
- flags = FPRINT | TABLEPASS | CONDUCT
- w_class = 1.0
- origin_tech = "materials=1;biotech=1"
- attack_verb = list("burnt")
-
-/obj/item/weapon/surgicaldrill
- name = "surgical drill"
- desc = "You can drill using this item. You dig?"
- icon = 'icons/obj/surgery.dmi'
- icon_state = "drill"
- hitsound = 'sound/weapons/circsawhit.ogg'
- m_amt = 15000
- g_amt = 10000
- flags = FPRINT | TABLEPASS | CONDUCT
- force = 15.0
- w_class = 1.0
- origin_tech = "materials=1;biotech=1"
- attack_verb = list("drilled")
-
-/obj/item/weapon/circular_saw
- name = "circular saw"
- desc = "For heavy duty cutting."
- icon = 'icons/obj/surgery.dmi'
- icon_state = "saw3"
- hitsound = 'sound/weapons/circsawhit.ogg'
- flags = FPRINT | TABLEPASS | CONDUCT
- force = 15.0
- w_class = 1.0
- throwforce = 9.0
- throw_speed = 3
- throw_range = 5
- m_amt = 20000
- g_amt = 10000
- origin_tech = "materials=1;biotech=1"
- attack_verb = list("attacked", "slashed", "sawed", "cut")
- sharp = 1
-
-/obj/item/weapon/bonegel
- name = "bone gel"
- icon = 'surgery.dmi'
- icon_state = "bone-gel"
- force = 0
- throwforce = 1.0
-
-/obj/item/weapon/FixOVein
- name = "FixOVein"
- icon = 'surgery.dmi'
- icon_state = "fixovein"
- force = 0
- throwforce = 1.0
- origin_tech = "materials=1;biotech=3"
- var/usage_amount = 10
-
-/obj/item/weapon/bonesetter
- name = "bone setter"
- icon = 'surgery.dmi'
- icon_state = "bone setter"
- force = 8.0
- throwforce = 9.0
- throw_speed = 3
- throw_range = 5
- attack_verb = list("attacked", "hit", "bludgeoned")
/obj/item/weapon/syntiflesh
name = "syntiflesh"
@@ -1678,6 +534,27 @@
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
+/obj/item/weapon/scythe
+ icon_state = "scythe0"
+ name = "scythe"
+ desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow."
+ force = 13.0
+ throwforce = 5.0
+ throw_speed = 1
+ throw_range = 3
+ w_class = 4.0
+ flags = FPRINT | TABLEPASS | NOSHIELD
+ slot_flags = SLOT_BACK
+ origin_tech = "materials=2;combat=2"
+ attack_verb = list("chopped", "sliced", "cut", "reaped")
+
+/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob)
+ if(istype(A, /obj/effect/spacevine))
+ for(var/obj/effect/spacevine/B in orange(A,1))
+ if(prob(80))
+ del B
+ del A
+
/*
/obj/item/weapon/cigarpacket
name = "Pete's Cuban Cigars"
@@ -1793,7 +670,7 @@
/obj/item/weapon/stock_parts/manipulator/nano
name = "nano-manipulator"
desc = "A tiny little manipulator used in the construction of certain devices."
- icon_state = "micro_mani"
+ icon_state = "nano_mani"
origin_tech = "materials=3,programming=2"
rating = 2
m_amt = 30
@@ -1801,7 +678,7 @@
/obj/item/weapon/stock_parts/micro_laser/high
name = "high-power micro-laser"
desc = "A tiny laser used in certain devices."
- icon_state = "micro_laser"
+ icon_state = "high_micro_laser"
origin_tech = "magnets=3"
rating = 2
m_amt = 10
@@ -1810,7 +687,7 @@
/obj/item/weapon/stock_parts/matter_bin/adv
name = "advanced matter bin"
desc = "A container for hold compressed matter awaiting re-construction."
- icon_state = "matter_bin"
+ icon_state = "advanced_matter_bin"
origin_tech = "materials=3"
rating = 2
m_amt = 80
@@ -1836,12 +713,14 @@
/obj/item/weapon/stock_parts/manipulator/pico
name = "pico-manipulator"
desc = "A tiny little manipulator used in the construction of certain devices."
+ icon_state = "pico_mani"
origin_tech = "materials=5,programming=2"
rating = 3
m_amt = 30
/obj/item/weapon/stock_parts/micro_laser/ultra
name = "ultra-high-power micro-laser"
+ icon_state = "ultra_high_micro_laser"
desc = "A tiny laser used in certain devices."
origin_tech = "magnets=5"
rating = 3
@@ -1851,6 +730,7 @@
/obj/item/weapon/stock_parts/matter_bin/super
name = "super matter bin"
desc = "A container for hold compressed matter awaiting re-construction."
+ icon_state = "super_matter_bin"
origin_tech = "materials=5"
rating = 3
m_amt = 80
@@ -1924,17 +804,3 @@
icon_state = "capacitor"
desc = "A debug item for research."
origin_tech = "materials=8;programming=8;magnets=8;powerstorage=8;bluespace=8;combat=8;biotech=8;syndicate=8"
-
-/obj/item/weapon/autopsy_scanner
- name = "autopsy scanner"
- desc = "Extracts information on wounds."
- icon = 'icons/obj/autopsy_scanner.dmi'
- icon_state = ""
- flags = FPRINT | TABLEPASS | CONDUCT
- w_class = 1.0
- origin_tech = "materials=1;biotech=1"
-
-/obj/item/weapon/autopsy_scanner/var/list/datum/autopsy_data_scanner/wdata = list()
-/obj/item/weapon/autopsy_scanner/var/list/datum/autopsy_data_scanner/chemtraces = list()
-/obj/item/weapon/autopsy_scanner/var/target_name = null
-/obj/item/weapon/autopsy_scanner/var/timeofdeath = null
diff --git a/code/defines/procs/command_alert.dm b/code/defines/procs/command_alert.dm
index d7a97fe2547..6545307fa1a 100644
--- a/code/defines/procs/command_alert.dm
+++ b/code/defines/procs/command_alert.dm
@@ -1,9 +1,11 @@
-/proc/command_alert(var/text, var/title = "", var/maintitle = "NanoTrasen Update")
- world << "
"
-
- world << "[html_encode(text)]"
- world << " "
+ command += "
[html_encode(title)]
"
+ command += " [html_encode(text)] "
+ command += " "
+ for(var/mob/M in player_list)
+ if(!istype(M,/mob/new_player))
+ M << command
diff --git a/code/defines/sd_procs/atom.dm b/code/defines/sd_procs/atom.dm
deleted file mode 100644
index 54cbe0ff1d5..00000000000
--- a/code/defines/sd_procs/atom.dm
+++ /dev/null
@@ -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)
- ..()
\ No newline at end of file
diff --git a/code/defines/sd_procs/base64.dm b/code/defines/sd_procs/base64.dm
deleted file mode 100644
index c285142ca0c..00000000000
--- a/code/defines/sd_procs/base64.dm
+++ /dev/null
@@ -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
diff --git a/code/defines/sd_procs/color.dm b/code/defines/sd_procs/color.dm
deleted file mode 100644
index 205ebecd3f7..00000000000
--- a/code/defines/sd_procs/color.dm
+++ /dev/null
@@ -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
diff --git a/code/defines/sd_procs/constants.dm b/code/defines/sd_procs/constants.dm
deleted file mode 100644
index bb3664aabbc..00000000000
--- a/code/defines/sd_procs/constants.dm
+++ /dev/null
@@ -1 +0,0 @@
-#define PI 3.141592654
diff --git a/code/defines/sd_procs/direction.dm b/code/defines/sd_procs/direction.dm
deleted file mode 100644
index 45a38173fd4..00000000000
--- a/code/defines/sd_procs/direction.dm
+++ /dev/null
@@ -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
diff --git a/code/defines/sd_procs/hsl.dm b/code/defines/sd_procs/hsl.dm
deleted file mode 100644
index 7bea3d52807..00000000000
--- a/code/defines/sd_procs/hsl.dm
+++ /dev/null
@@ -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)
diff --git a/code/defines/sd_procs/math.dm b/code/defines/sd_procs/math.dm
deleted file mode 100644
index cd3f4ea6ce3..00000000000
--- a/code/defines/sd_procs/math.dm
+++ /dev/null
@@ -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
diff --git a/code/defines/sd_procs/nybble.dm b/code/defines/sd_procs/nybble.dm
deleted file mode 100644
index eca85c49ec7..00000000000
--- a/code/defines/sd_procs/nybble.dm
+++ /dev/null
@@ -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
diff --git a/code/defines/sd_procs/samplecolors.dm b/code/defines/sd_procs/samplecolors.dm
deleted file mode 100644
index 96a6bebebdb..00000000000
--- a/code/defines/sd_procs/samplecolors.dm
+++ /dev/null
@@ -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"
diff --git a/code/defines/sd_procs/sd_procs.dm b/code/defines/sd_procs/sd_procs.dm
deleted file mode 100644
index 16de19f4743..00000000000
--- a/code/defines/sd_procs/sd_procs.dm
+++ /dev/null
@@ -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.
-
-*/
\ No newline at end of file
diff --git a/code/defines/sd_procs/text.dm b/code/defines/sd_procs/text.dm
deleted file mode 100644
index 88b410bd2b7..00000000000
--- a/code/defines/sd_procs/text.dm
+++ /dev/null
@@ -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, " ","")
- var/open = findtext(T,"<")
- while(open)
- var/close = findtext(T,">",open)
- if(close)
- if(close 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()
-*/
diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm
index 56bfcb5f4d7..a60e2f0e160 100755
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -598,7 +598,7 @@ proc/process_ghost_teleport_locs()
icon_state = "fpmaint"
/area/maintenance/fsmaint
- name = "Security Maintenance"
+ name = "Dormitory Maintenance"
icon_state = "fsmaint"
/area/maintenance/fsmaint2
@@ -606,11 +606,11 @@ proc/process_ghost_teleport_locs()
icon_state = "fsmaint"
/area/maintenance/asmaint
- name = "Library Maintenance"
+ name = "Medbay Maintenance"
icon_state = "asmaint"
/area/maintenance/asmaint2
- name = "Med-Sci Maintenance"
+ name = "Science Maintenance"
icon_state = "asmaint"
/area/maintenance/apmaint
@@ -634,7 +634,7 @@ proc/process_ghost_teleport_locs()
icon_state = "pmaint"
/area/maintenance/aft
- name = "Robotics Maintenance"
+ name = "Engineering Maintenance"
icon_state = "amaint"
/area/maintenance/storage
@@ -696,7 +696,7 @@ proc/process_ghost_teleport_locs()
music = null
/area/crew_quarters/captain
- name = "\improper Captain's Quarters"
+ name = "\improper Captain's Office"
icon_state = "captain"
/area/crew_quarters/heads/hop
@@ -887,10 +887,10 @@ proc/process_ghost_teleport_locs()
engineering
name = "Engineering"
- icon_state = "engine"
+ icon_state = "engine_smes"
break_room
- name = "\improper Engineering Break Room"
+ name = "\improper Engineering Foyer"
icon_state = "engine"
chiefs_office
@@ -947,17 +947,24 @@ proc/process_ghost_teleport_locs()
/area/assembly/chargebay
- name = "\improper Recharging Bay"
+ name = "\improper Mech Bay"
icon_state = "mechbay"
/area/assembly/showroom
name = "\improper Robotics Showroom"
icon_state = "showroom"
-/area/assembly/assembly_line
- name = "\improper Robotics Assembly Line"
+/area/assembly/robotics
+ name = "\improper Robotics Lab"
icon_state = "ass_line"
+/area/assembly/assembly_line //Derelict Assembly Line
+ name = "\improper Assembly Line"
+ icon_state = "ass_line"
+ power_equip = 0
+ power_light = 0
+ power_environ = 0
+
//Teleporter
/area/teleporter
@@ -965,7 +972,7 @@ proc/process_ghost_teleport_locs()
icon_state = "teleporter"
music = "signal"
-/area/teleporter/gateway
+/area/gateway
name = "\improper Gateway"
icon_state = "teleporter"
music = "signal"
@@ -1042,7 +1049,7 @@ proc/process_ghost_teleport_locs()
icon_state = "cloning"
/area/medical/sleeper
- name = "\improper Medical Sleeper Room"
+ name = "Medbay Treatment Center"
icon_state = "exam_room"
//Security
@@ -1112,6 +1119,22 @@ proc/process_ghost_teleport_locs()
name = "\improper Security Checkpoint"
icon_state = "security"
+/area/security/checkpoint/supply
+ name = "Security Post - Cargo Bay"
+ icon_state = "checkpoint1"
+
+/area/security/checkpoint/engineering
+ name = "Security Post - Engineering"
+ icon_state = "checkpoint1"
+
+/area/security/checkpoint/medical
+ name = "Security Post - Medbay"
+ icon_state = "checkpoint1"
+
+/area/security/checkpoint/science
+ name = "Security Post - Science"
+ icon_state = "checkpoint1"
+
/area/security/vacantoffice
name = "\improper Vacant Office"
icon_state = "security"
@@ -1163,7 +1186,7 @@ proc/process_ghost_teleport_locs()
//Toxins
/area/toxins/lab
- name = "\improper Research Hallway"
+ name = "\improper Research and Development"
icon_state = "toxlab"
/area/toxins/hallway
@@ -1400,7 +1423,7 @@ proc/process_ghost_teleport_locs()
icon_state = "ai_upload"
/area/turret_protected/ai_upload_foyer
- name = "Secure Network Access"
+ name = "AI Upload Access"
icon_state = "ai_foyer"
/area/turret_protected/ai
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index fd88f79c291..19cb67e8ceb 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -236,6 +236,9 @@ its easier to just keep the beam vertical.
/atom/proc/blob_act()
return
+/atom/proc/fire_act()
+ return
+
/atom/proc/attack_hand(mob/user as mob)
return
@@ -270,8 +273,8 @@ its easier to just keep the beam vertical.
/atom/proc/attack_larva(mob/user as mob)
return
-// for metroids
-/atom/proc/attack_metroid(mob/user as mob)
+// for slimes
+/atom/proc/attack_slime(mob/user as mob)
return
/atom/proc/hand_h(mob/user as mob) //human (hand) - restrained
@@ -291,7 +294,7 @@ its easier to just keep the beam vertical.
src.hand_p(user)
return
-/atom/proc/hand_m(mob/user as mob) //metroid - restrained
+/atom/proc/hand_m(mob/user as mob) //slime - restrained
return
@@ -462,19 +465,19 @@ its easier to just keep the beam vertical.
for(var/obj/effect/decal/cleanable/blood/B in T.contents)
if(!B.blood_DNA[M.dna.unique_enzymes])
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
- for(var/datum/disease/D in M.viruses)
+ /*for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = D.Copy(1)
B.viruses += newDisease
- newDisease.holder = B
+ newDisease.holder = B*/
return 1 //we bloodied the floor
//if there isn't a blood decal already, make one.
var/obj/effect/decal/cleanable/blood/newblood = new /obj/effect/decal/cleanable/blood(T)
newblood.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
- for(var/datum/disease/D in M.viruses)
+ /*for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = D.Copy(1)
newblood.viruses += newDisease
- newDisease.holder = newblood
+ newDisease.holder = newblood*/
return 1 //we bloodied the floor
//adding blood to humans
@@ -496,10 +499,10 @@ its easier to just keep the beam vertical.
if(toxvomit)
this.icon_state = "vomittox_[pick(1,4)]"
- for(var/datum/disease/D in M.viruses)
+ /*for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = D.Copy(1)
this.viruses += newDisease
- newDisease.holder = this
+ newDisease.holder = this*/
// Only adds blood on the floor -- Skie
/atom/proc/add_blood_floor(mob/living/carbon/M as mob)
@@ -508,40 +511,27 @@ its easier to just keep the beam vertical.
var/turf/simulated/source1 = src
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(source1)
this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
- for(var/datum/disease/D in M.viruses)
+ /*for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = D.Copy(1)
this.viruses += newDisease
- newDisease.holder = this
+ newDisease.holder = this*/
else if( istype(M, /mob/living/carbon/alien ))
if( istype(src, /turf/simulated) )
var/turf/simulated/source2 = src
var/obj/effect/decal/cleanable/xenoblood/this = new /obj/effect/decal/cleanable/xenoblood(source2)
this.blood_DNA["UNKNOWN BLOOD"] = "X*"
- for(var/datum/disease/D in M.viruses)
+ /*for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = D.Copy(1)
this.viruses += newDisease
- newDisease.holder = this
+ newDisease.holder = this*/
else if( istype(M, /mob/living/silicon/robot ))
if( istype(src, /turf/simulated) )
var/turf/simulated/source2 = src
new /obj/effect/decal/cleanable/oil(source2)
-/atom/proc/clean_prints()
- if(istype(fingerprints, /list))
- //Smudge up dem prints some
- for(var/P in fingerprints)
- var/test_print = stars(fingerprints[P], rand(10,20))
- if(stringpercent(test_print) == 32) //She's full of stars! (No actual print left)
- fingerprints.Remove(P)
- else
- fingerprints[P] = test_print
- if(!fingerprints.len)
- del(fingerprints)
-
/atom/proc/clean_blood()
- clean_prints()
src.germ_level = 0
if(istype(blood_DNA, /list))
del(blood_DNA)
@@ -602,8 +592,8 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
src.attack_paw(usr)
else if(isalienadult(usr))
src.attack_alien(usr)
- else if(ismetroid(usr))
- src.attack_metroid(usr)
+ else if(isslime(usr))
+ src.attack_slime(usr)
else if(isanimal(usr))
src.attack_animal(usr)
else
@@ -621,7 +611,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
src.hand_p(usr, usr.hand)
else if(isalienadult(usr))
src.hand_al(usr, usr.hand)
- else if(ismetroid(usr))
+ else if(isslime(usr))
return
else if(isanimal(usr))
return
@@ -832,28 +822,28 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
if ( !alien.restrained() )
attack_larva(alien)
- else if(ismetroid(usr))
- var/mob/living/carbon/metroid/metroid = usr
- //-metroid stuff-
+ else if(isslime(usr))
+ var/mob/living/carbon/slime/slime = usr
+ //-slime stuff-
- if(metroid.stat)
+ if(slime.stat)
return
- var/in_range = in_range(src, metroid) || src.loc == metroid
+ var/in_range = in_range(src, slime) || src.loc == slime
if (in_range)
- if ( !metroid.restrained() )
+ if ( !slime.restrained() )
if (W)
- attackby(W,metroid)
+ attackby(W,slime)
if (W)
- W.afterattack(src, metroid)
+ W.afterattack(src, slime)
else
- attack_metroid(metroid)
+ attack_slime(slime)
else
- hand_m(metroid, metroid.hand)
+ hand_m(slime, slime.hand)
else
- if ( (W) && !metroid.restrained() )
- W.afterattack(src, metroid)
+ if ( (W) && !slime.restrained() )
+ W.afterattack(src, slime)
else if(isanimal(usr))
@@ -1014,7 +1004,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
// world << "according to dblclick(), t5 is [t5]"
// ------- ACTUALLY DETERMINING STUFF -------
- if (((t5 || (W && (W.flags & 16))) && !( istype(src, /obj/screen) )))
+ if (((t5 || (W && (W.flags & USEDELAY))) && !( istype(src, /obj/screen) )))
// ------- ( CAN USE ITEM OR HAS 1 SECOND USE DELAY ) AND NOT CLICKING ON SCREEN -------
@@ -1165,8 +1155,8 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
src.attack_larva(usr)
else if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
src.attack_ai(usr, usr.hand)
- else if(istype(usr, /mob/living/carbon/metroid))
- src.attack_metroid(usr)
+ else if(istype(usr, /mob/living/carbon/slime))
+ src.attack_slime(usr)
else if(istype(usr, /mob/living/simple_animal))
src.attack_animal(usr)
else
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 86bce8b00ce..087d6fa6795 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -65,7 +65,7 @@
src.throwing = 1
if(usr)
- if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
+ if(HULK in usr.mutations)
src.throwing = 2 // really strong throw!
var/dist_x = abs(target.x - src.x)
@@ -90,7 +90,7 @@
- while(src && target &&((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
+ while(src && target &&((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a && a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
// only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up
if(error < 0)
var/atom/step = get_step(src, dy)
diff --git a/code/game/communications.dm b/code/game/communications.dm
index b79d1f95975..e3a42c0fb09 100644
--- a/code/game/communications.dm
+++ b/code/game/communications.dm
@@ -106,11 +106,10 @@ var/list/radiochannels = list(
"Security" = 1359,
"Deathsquad" = 1441,
"Syndicate" = 1213,
- "Mining" = 1349,
- "Cargo" = 1347,
+ "Supply" = 1347,
)
//depenging helpers
-var/list/DEPT_FREQS = list(1351,1355,1357,1359,1213,1441,1349,1347)
+var/list/DEPT_FREQS = list(1351,1355,1357,1359,1213,1441,1347)
var/const/COMM_FREQ = 1353 //command, colored gold in chat window
var/const/SYND_FREQ = 1213
@@ -229,7 +228,7 @@ datum/radio_frequency
// log_admin("DEBUG: post_signal(source=[source] ([source.x], [source.y], [source.z]),filter=[filter]) frequency=[frequency], N_f=[N_f], N_nf=[N_nf]")
- del(signal)
+// del(signal)
add_listener(obj/device as obj, var/filter as text|null)
if (!filter)
diff --git a/code/game/dna.dm b/code/game/dna.dm
index 2ff33521bbd..f450fcaed08 100644
--- a/code/game/dna.dm
+++ b/code/game/dna.dm
@@ -680,6 +680,19 @@
/////////////////////////// DNA MACHINES
+/obj/machinery/dna_scannernew
+ name = "\improper DNA modifier"
+ desc = "It scans DNA structures."
+ icon = 'icons/obj/Cryogenic2.dmi'
+ icon_state = "scanner_0"
+ density = 1
+ var/locked = 0.0
+ var/mob/occupant = null
+ anchored = 1.0
+ use_power = 1
+ idle_power_usage = 50
+ active_power_usage = 300
+
/obj/machinery/dna_scannernew/New()
..()
component_parts = list()
@@ -838,6 +851,7 @@
A.loc = src.loc
del(src)
+
/obj/machinery/computer/scan_consolenew/ex_act(severity)
switch(severity)
@@ -993,31 +1007,32 @@
src.temphtml = text("No viable occupant detected.")//More than anything, this just acts as a sanity check in case the option DOES appear for whatever reason
usr << browse(temphtml, "window=scannernew;size=550x650")
onclose(usr, "scannernew")
- src.delete = 1
- src.temphtml = text("Working ... Please wait ([] Seconds)", src.radduration)
- usr << browse(temphtml, "window=scannernew;size=550x650")
- onclose(usr, "scannernew")
- var/lock_state = src.connected.locked
- src.connected.locked = 1//lock it
- sleep(10*src.radduration)
- if (!src.connected.occupant)
+ else
+ src.delete = 1
+ src.temphtml = text("Working ... Please wait ([] Seconds)", src.radduration)
+ usr << browse(temphtml, "window=scannernew;size=550x650")
+ onclose(usr, "scannernew")
+ var/lock_state = src.connected.locked
+ src.connected.locked = 1//lock it
+ sleep(10*src.radduration)
+ if (!src.connected.occupant)
+ temphtml = null
+ delete = 0
+ return null
+ if (prob(95))
+ if(prob(75))
+ randmutb(src.connected.occupant)
+ else
+ randmuti(src.connected.occupant)
+ else
+ if(prob(95))
+ randmutg(src.connected.occupant)
+ else
+ randmuti(src.connected.occupant)
+ src.connected.occupant.radiation += ((src.radstrength*3)+src.radduration*3)
+ src.connected.locked = lock_state
temphtml = null
delete = 0
- return null
- if (prob(95))
- if(prob(75))
- randmutb(src.connected.occupant)
- else
- randmuti(src.connected.occupant)
- else
- if(prob(95))
- randmutg(src.connected.occupant)
- else
- randmuti(src.connected.occupant)
- src.connected.occupant.radiation += ((src.radstrength*3)+src.radduration*3)
- src.connected.locked = lock_state
- temphtml = null
- delete = 0
if (href_list["radset"])
src.temphtml = text("Radiation Duration: [] ", src.radduration)
src.temphtml += text("Radiation Intensity: []
")
- // New way of displaying DNA blocks
- src.temphtml = text("Unique Identifier: [getblockstring(src.connected.occupant.dna.uni_identity,uniblock,subblock,3, src,1)]
")
+ // New way of displaying DNA blocks
+ src.temphtml = text("Unique Identifier: [getblockstring(src.connected.occupant.dna.uni_identity,uniblock,subblock,3, src,1)]
", src, src)
+ src.temphtml += "Modify Block: "
+ src.temphtml += text("Irradiate ", src)
+ src.delete = 0
if (href_list["unimenuplus"])
if (src.uniblock < 13)
src.uniblock++
@@ -1188,15 +1204,20 @@
src.temphtml = text("No viable occupant detected.")
usr << browse(temphtml, "window=scannernew;size=550x650")
onclose(usr, "scannernew")
- var/mob/living/carbon/human/H = src.connected.occupant
- if(H)
- if (H.reagents.get_reagent_amount("inaprovaline") < 60)
- H.reagents.add_reagent("inaprovaline", 30)
- usr << text("Occupant now has [] units of rejuvenation in his/her bloodstream.", H.reagents.get_reagent_amount("inaprovaline"))
- src.delete = 0
+ else
+ var/mob/living/carbon/human/H = src.connected.occupant
+ if(H)
+ if (H.reagents.get_reagent_amount("inaprovaline") < 60)
+ H.reagents.add_reagent("inaprovaline", 30)
+ usr << text("Occupant now has [] units of rejuvenation in his/her bloodstream.", H.reagents.get_reagent_amount("inaprovaline"))
+ src.delete = 0
////////////////////////////////////////////////////////
if (href_list["strucmenu"])
- if(src.connected.occupant)
+ if(!src.connected.occupant || !src.connected.occupant.dna)
+ src.temphtml = text("No viable occupant detected.")
+ usr << browse(temphtml, "window=scannernew;size=550x650")
+ onclose(usr, "scannernew")
+ else
// Get this shit outta here it sucks
//src.temphtml = text("Structural Enzymes: [getleftblocks(src.connected.occupant.dna.struc_enzymes,strucblock,3)][src.subblock == 1 ? ""+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)+"" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)][src.subblock == 2 ? ""+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)+"" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)][src.subblock == 3 ? ""+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)+"" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)][getrightblocks(src.connected.occupant.dna.struc_enzymes,strucblock,3)]
")
//src.temphtml = text("Structural Enzymes: []
", src.connected.occupant.dna.struc_enzymes)
diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm
index 74543700308..7cca20dfac0 100644
--- a/code/game/gamemodes/blob/blob.dm
+++ b/code/game/gamemodes/blob/blob.dm
@@ -109,7 +109,9 @@ var/list/blob_nodes = list()
if (1)
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
- world << sound('sound/AI/outbreak5.ogg')
+ for(var/mob/M in player_list)
+ if(!istype(M,/mob/new_player))
+ M << sound('sound/AI/outbreak5.ogg')
autoexpand = 0//No more extra pulses
stage = -1
//next stage in 4-5 minutes
diff --git a/code/game/gamemodes/blob/blobs/factory.dm b/code/game/gamemodes/blob/blobs/factory.dm
index bc83a3bb3b9..ca1c3f206e8 100644
--- a/code/game/gamemodes/blob/blobs/factory.dm
+++ b/code/game/gamemodes/blob/blobs/factory.dm
@@ -19,5 +19,48 @@
run_action()
if(spores.len >= max_spores) return 0
- new/obj/effect/critter/blob(src.loc, src)
+ new/mob/living/simple_animal/hostile/blobspore(src.loc, src)
return 1
+
+
+/mob/living/simple_animal/hostile/blobspore
+ name = "blob"
+ desc = "Some blob thing."
+ icon = 'icons/mob/critter.dmi'
+ icon_state = "blobsquiggle"
+ icon_living = "blobsquiggle"
+ pass_flags = PASSBLOB
+ health = 20
+ maxHealth = 20
+ melee_damage_lower = 4
+ melee_damage_upper = 8
+ attacktext = "hits"
+ attack_sound = 'sound/weapons/genhit1.ogg'
+ var/obj/effect/blob/factory/factory = null
+ faction = "blob"
+ min_oxy = 0
+ max_oxy = 0
+ min_tox = 0
+ max_tox = 0
+ min_co2 = 0
+ max_co2 = 0
+ min_n2 = 0
+ max_n2 = 0
+ minbodytemp = 0
+ maxbodytemp = 360
+
+
+ New(loc, var/obj/effect/blob/factory/linked_node)
+ ..()
+ if(istype(linked_node))
+ factory = linked_node
+ factory.spores += src
+ ..(loc)
+ return
+ Die()
+ ..()
+ if(factory)
+ factory.spores -= src
+ ..()
+ del(src)
+
diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm
index b988cf24470..da377f25131 100644
--- a/code/game/gamemodes/changeling/changeling.dm
+++ b/code/game/gamemodes/changeling/changeling.dm
@@ -9,7 +9,8 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
config_tag = "changeling"
restricted_jobs = list("AI", "Cyborg")
protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain")
- required_players = 15
+ required_players = 2
+ required_players_secret = 5
required_enemies = 1
recommended_enemies = 4
diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm
index 3db2e1a1444..63ba22d87f8 100644
--- a/code/game/gamemodes/changeling/changeling_powers.dm
+++ b/code/game/gamemodes/changeling/changeling_powers.dm
@@ -35,29 +35,29 @@
//Helper proc. Does all the checks and stuff for us to avoid copypasta
/mob/proc/changeling_power(var/required_chems=0, var/required_dna=0, var/max_genetic_damage=100, var/max_stat=0)
- if(!usr) return
- if(!usr.mind) return
- if(!iscarbon(usr)) return
- var/datum/changeling/changeling = usr.mind.changeling
+ if(!src.mind) return
+ if(!iscarbon(src)) return
+
+ var/datum/changeling/changeling = src.mind.changeling
if(!changeling)
- world.log << "[usr] has the changeling_transform() verb but is not a changeling."
+ world.log << "[src] has the changeling_transform() verb but is not a changeling."
return
- if(usr.stat > max_stat)
- usr << "We are incapacitated."
+ if(src.stat > max_stat)
+ src << "We are incapacitated."
return
if(changeling.absorbed_dna.len < required_dna)
- usr << "We require at least [required_dna] samples of compatible DNA."
+ src << "We require at least [required_dna] samples of compatible DNA."
return
if(changeling.chem_charges < required_chems)
- usr << "We require at least [required_chems] units of chemicals to do that!"
+ src << "We require at least [required_chems] units of chemicals to do that!"
return
if(changeling.geneticdamage > max_genetic_damage)
- usr << "Our geneomes are still reassembling. We need time to recover first."
+ src << "Our geneomes are still reassembling. We need time to recover first."
return
return changeling
@@ -72,55 +72,55 @@
var/datum/changeling/changeling = changeling_power(0,0,100)
if(!changeling) return
- var/obj/item/weapon/grab/G = usr.get_active_hand()
+ var/obj/item/weapon/grab/G = src.get_active_hand()
if(!istype(G))
- usr << "We must be grabbing a creature in our active hand to absorb them."
+ src << "We must be grabbing a creature in our active hand to absorb them."
return
var/mob/living/carbon/human/T = G.affecting
if(!istype(T))
- usr << "[T] is not compatible with our biology."
+ src << "[T] is not compatible with our biology."
return
if(NOCLONE in T.mutations)
- usr << "This creature's DNA is ruined beyond useability!"
+ src << "This creature's DNA is ruined beyond useability!"
return
if(!G.killing)
- usr << "We must have a tighter grip to absorb this creature."
+ src << "We must have a tighter grip to absorb this creature."
return
if(changeling.isabsorbing)
- usr << "We are already absorbing!"
+ src << "We are already absorbing!"
return
changeling.isabsorbing = 1
for(var/stage = 1, stage<=3, stage++)
switch(stage)
if(1)
- usr << "This creature is compatible. We must hold still..."
+ src << "This creature is compatible. We must hold still..."
if(2)
- usr << "We extend a proboscis."
- usr.visible_message("[usr] extends a proboscis!")
+ src << "We extend a proboscis."
+ src.visible_message("[src] extends a proboscis!")
if(3)
- usr << "We stab [T] with the proboscis."
- usr.visible_message("[usr] stabs [T] with the proboscis!")
+ src << "We stab [T] with the proboscis."
+ src.visible_message("[src] stabs [T] with the proboscis!")
T << "You feel a sharp stabbing pain!"
T.take_overall_damage(40)
feedback_add_details("changeling_powers","A[stage]")
- if(!do_mob(usr, T, 150))
- usr << "Our absorption of [T] has been interrupted!"
+ if(!do_mob(src, T, 150))
+ src << "Our absorption of [T] has been interrupted!"
changeling.isabsorbing = 0
return
- usr << "We have absorbed [T]!"
- usr.visible_message("[usr] sucks the fluids from [T]!")
+ src << "We have absorbed [T]!"
+ src.visible_message("[src] sucks the fluids from [T]!")
T << "You have been absorbed by the changeling!"
T.dna.real_name = T.real_name //Set this again, just to be sure that it's properly set.
changeling.absorbed_dna |= T.dna
- if(usr.nutrition < 400) usr.nutrition = min((usr.nutrition + T.nutrition), 400)
+ if(src.nutrition < 400) src.nutrition = min((src.nutrition + T.nutrition), 400)
changeling.chem_charges += 10
changeling.geneticpoints += 2
@@ -143,7 +143,7 @@
if(!Tp.isVerb)
call(Tp.verbpath)()
else
- usr.make_changeling()
+ src.make_changeling()
changeling.chem_charges += T.mind.changeling.chem_charges
changeling.geneticpoints += T.mind.changeling.geneticpoints
@@ -179,15 +179,15 @@
return
changeling.chem_charges -= 5
- usr.visible_message("[usr] transforms!")
+ src.visible_message("[src] transforms!")
changeling.geneticdamage = 30
- usr.dna = chosen_dna
- usr.real_name = chosen_dna.real_name
- updateappearance(usr, usr.dna.uni_identity)
- domutcheck(usr, null)
+ src.dna = chosen_dna
+ src.real_name = chosen_dna.real_name
+ updateappearance(src, src.dna.uni_identity)
+ domutcheck(src, null)
- usr.verbs -= /mob/proc/changeling_transform
- spawn(10) usr.verbs += /mob/proc/changeling_transform
+ src.verbs -= /mob/proc/changeling_transform
+ spawn(10) src.verbs += /mob/proc/changeling_transform
feedback_add_details("changeling_powers","TR")
return 1
@@ -201,7 +201,7 @@
var/datum/changeling/changeling = changeling_power(1,0,0)
if(!changeling) return
- var/mob/living/carbon/C = usr
+ var/mob/living/carbon/C = src
changeling.chem_charges--
C.remove_changeling_powers()
C.visible_message("[C] transforms!")
@@ -216,7 +216,7 @@
C.monkeyizing = 1
C.canmove = 0
C.icon = null
- C.overlays = null
+ C.overlays.Cut()
C.invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( C.loc )
@@ -276,7 +276,7 @@
if(!chosen_dna)
return
- var/mob/living/carbon/C = usr
+ var/mob/living/carbon/C = src
changeling.chem_charges--
C.remove_changeling_powers()
@@ -290,7 +290,7 @@
C.monkeyizing = 1
C.canmove = 0
C.icon = null
- C.overlays = null
+ C.overlays.Cut()
C.invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( C.loc )
animation.icon_state = "blank"
@@ -300,7 +300,7 @@
sleep(48)
del(animation)
- for(var/obj/item/W in usr)
+ for(var/obj/item/W in src)
C.u_equip(W)
if (C.client)
C.client.screen -= W
@@ -350,7 +350,7 @@
var/datum/changeling/changeling = changeling_power(20,1,100,DEAD)
if(!changeling) return
- var/mob/living/carbon/C = usr
+ var/mob/living/carbon/C = src
if(!C.stat && alert("Are we sure we wish to fake our death?",,"Yes","No") == "No")//Confirmation for living changelings if they want to fake their death
return
C << "We will attempt to regenerate our form."
@@ -380,7 +380,7 @@
C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss())
C.reagents.clear_reagents()
C << "We have regenerated."
- C.visible_message("[usr] appears to wake from the dead, having healed all wounds.")
+ C.visible_message("[src] appears to wake from the dead, having healed all wounds.")
C.status_flags &= ~(FAKEDEATH)
C.update_canmove()
@@ -398,10 +398,10 @@
var/datum/changeling/changeling = changeling_power(10,0,100)
if(!changeling) return 0
changeling.chem_charges -= 10
- usr << "Your throat adjusts to launch the sting."
+ src << "Your throat adjusts to launch the sting."
changeling.sting_range = 2
- usr.verbs -= /mob/proc/changeling_boost_range
- spawn(5) usr.verbs += /mob/proc/changeling_boost_range
+ src.verbs -= /mob/proc/changeling_boost_range
+ spawn(5) src.verbs += /mob/proc/changeling_boost_range
feedback_add_details("changeling_powers","RS")
return 1
@@ -416,7 +416,7 @@
if(!changeling) return 0
changeling.chem_charges -= 45
- var/mob/living/carbon/human/C = usr
+ var/mob/living/carbon/human/C = src
C.stat = 0
C.SetParalysis(0)
C.SetStunned(0)
@@ -424,45 +424,44 @@
C.lying = 0
C.update_canmove()
- usr.verbs -= /mob/proc/changeling_unstun
- spawn(5) usr.verbs += /mob/proc/changeling_unstun
+ src.verbs -= /mob/proc/changeling_unstun
+ spawn(5) src.verbs += /mob/proc/changeling_unstun
feedback_add_details("changeling_powers","UNS")
return 1
//Speeds up chemical regeneration
/mob/proc/changeling_fastchemical()
- usr.mind.changeling.chem_recharge_rate *= 2
+ src.mind.changeling.chem_recharge_rate *= 2
return 1
//Increases macimum chemical storage
/mob/proc/changeling_engorgedglands()
- usr.mind.changeling.chem_storage += 25
+ src.mind.changeling.chem_storage += 25
return 1
//Prevents AIs tracking you but makes you easily detectable to the human-eye.
/mob/proc/changeling_digitalcamo()
set category = "Changeling"
- set name = "Toggle Digital Camoflague (10)"
+ set name = "Toggle Digital Camoflague"
set desc = "The AI can no longer track us, but we will look different if examined. Has a constant cost while active."
- var/datum/changeling/changeling = changeling_power(10)
+ var/datum/changeling/changeling = changeling_power()
if(!changeling) return 0
- usr.mind.changeling.chem_charges -= 10
- var/mob/living/carbon/human/C = usr
+ var/mob/living/carbon/human/C = src
if(C.digitalcamo) C << "We return to normal."
else C << "We distort our form to prevent AI-tracking."
C.digitalcamo = !C.digitalcamo
spawn(0)
- while(C && C.digitalcamo)
- C.mind.changeling.chem_charges -= 1
+ while(C && C.digitalcamo && C.mind && C.mind.changeling)
+ C.mind.changeling.chem_charges = max(C.mind.changeling.chem_charges - 1, 0)
sleep(40)
- usr.verbs -= /mob/proc/changeling_digitalcamo
- spawn(5) usr.verbs += /mob/proc/changeling_digitalcamo
+ src.verbs -= /mob/proc/changeling_digitalcamo
+ spawn(5) src.verbs += /mob/proc/changeling_digitalcamo
feedback_add_details("changeling_powers","CAM")
return 1
@@ -475,9 +474,9 @@
var/datum/changeling/changeling = changeling_power(30,0,100,UNCONSCIOUS)
if(!changeling) return 0
- usr.mind.changeling.chem_charges -= 30
+ src.mind.changeling.chem_charges -= 30
- var/mob/living/carbon/human/C = usr
+ var/mob/living/carbon/human/C = src
spawn(0)
for(var/i = 0, i<10,i++)
if(C)
@@ -487,8 +486,8 @@
C.adjustFireLoss(-10)
sleep(10)
- usr.verbs -= /mob/proc/changeling_rapidregen
- spawn(5) usr.verbs += /mob/proc/changeling_rapidregen
+ src.verbs -= /mob/proc/changeling_rapidregen
+ spawn(5) src.verbs += /mob/proc/changeling_rapidregen
feedback_add_details("changeling_powers","RR")
return 1
@@ -510,7 +509,7 @@ var/list/datum/dna/hivemind_bank = list()
names += DNA.real_name
if(names.len <= 0)
- usr << "The airwaves already have all of our DNA."
+ src << "The airwaves already have all of our DNA."
return
var/S = input("Select a DNA to channel: ", "Channel DNA", null) as null|anything in names
@@ -522,7 +521,7 @@ var/list/datum/dna/hivemind_bank = list()
changeling.chem_charges -= 10
hivemind_bank += chosen_dna
- usr << "We channel the DNA of [S] to the air."
+ src << "We channel the DNA of [S] to the air."
feedback_add_details("changeling_powers","HU")
return 1
@@ -540,7 +539,7 @@ var/list/datum/dna/hivemind_bank = list()
names[DNA.real_name] = DNA
if(names.len <= 0)
- usr << "There's no new DNA to absorb from the air."
+ src << "There's no new DNA to absorb from the air."
return
var/S = input("Select a DNA absorb from the air: ", "Absorb DNA", null) as null|anything in names
@@ -551,7 +550,7 @@ var/list/datum/dna/hivemind_bank = list()
changeling.chem_charges -= 20
changeling.absorbed_dna += chosen_dna
- usr << "We absorb the DNA of [S] from the air."
+ src << "We absorb the DNA of [S] from the air."
feedback_add_details("changeling_powers","HD")
return 1
@@ -559,32 +558,32 @@ var/list/datum/dna/hivemind_bank = list()
/mob/proc/changeling_mimicvoice()
set category = "Changeling"
- set name = "Mimic Voice (10)"
- set desc = "Shape our vocal glands to form a voice of someone we choose."
+ set name = "Mimic Voice"
+ set desc = "Shape our vocal glands to form a voice of someone we choose. We cannot regenerate chemicals when mimicing."
- var/datum/changeling/changeling = changeling_power(10,1)
+
+ var/datum/changeling/changeling = changeling_power()
if(!changeling) return
if(changeling.mimicing)
changeling.mimicing = ""
- usr << "We return our vocal glands to their original location."
+ src << "We return our vocal glands to their original location."
return
var/mimic_voice = input("Enter a name to mimic.", "Mimic Voice", null) as text
if(!mimic_voice)
return
- changeling.chem_charges -= 10
changeling.mimicing = mimic_voice
- usr << "We shape our glands to take the voice of [mimic_voice], this will stop us from regenerating chemicals while active."
- usr << "Use this power again to return to our original voice and reproduce chemicals again."
+ src << "We shape our glands to take the voice of [mimic_voice], this will stop us from regenerating chemicals while active."
+ src << "Use this power again to return to our original voice and reproduce chemicals again."
feedback_add_details("changeling_powers","MV")
spawn(0)
while(src && src.mind && src.mind.changeling && src.mind.changeling.mimicing)
- src.mind.changeling.chem_charges -= 1
+ src.mind.changeling.chem_charges = max(src.mind.changeling.chem_charges - 1, 0)
sleep(40)
if(src && src.mind && src.mind.changeling)
src.mind.changeling.mimicing = ""
@@ -607,7 +606,7 @@ var/list/datum/dna/hivemind_bank = list()
var/list/victims = list()
for(var/mob/living/carbon/C in oview(changeling.sting_range))
victims += C
- var/mob/living/carbon/T = input(usr, "Who will we sting?") as null|anything in victims
+ var/mob/living/carbon/T = input(src, "Who will we sting?") as null|anything in victims
if(!T) return
if(!(T in view(changeling.sting_range))) return
@@ -616,10 +615,10 @@ var/list/datum/dna/hivemind_bank = list()
changeling.chem_charges -= required_chems
changeling.sting_range = 1
- usr.verbs -= verb_path
- spawn(10) usr.verbs += verb_path
+ src.verbs -= verb_path
+ spawn(10) src.verbs += verb_path
- usr << "We stealthily sting [T]."
+ src << "We stealthily sting [T]."
if(!T.mind || !T.mind.changeling) return T //T will be affected by the sting
T << "You feel a tiny prick."
return
@@ -712,7 +711,7 @@ var/list/datum/dna/hivemind_bank = list()
var/mob/living/carbon/T = changeling_sting(40,/mob/proc/changeling_transformation_sting)
if(!T) return 0
if((HUSK in T.mutations) || (!ishuman(T) && !ismonkey(T)))
- usr << "Our sting appears ineffective against its DNA."
+ src << "Our sting appears ineffective against its DNA."
return 0
T.visible_message("[T] transforms!")
T.dna = chosen_dna
@@ -756,8 +755,8 @@ var/list/datum/dna/hivemind_bank = list()
set desc="Stealthily sting a target to extract their DNA."
var/datum/changeling/changeling = null
- if(usr.mind && usr.mind.changeling)
- changeling = usr.mind.changeling
+ if(src.mind && src.mind.changeling)
+ changeling = src.mind.changeling
if(!changeling)
return 0
diff --git a/code/game/gamemodes/changeling/modularchangling.dm b/code/game/gamemodes/changeling/modularchangling.dm
index 2f3659bc7ac..2395e63b270 100644
--- a/code/game/gamemodes/changeling/modularchangling.dm
+++ b/code/game/gamemodes/changeling/modularchangling.dm
@@ -81,7 +81,7 @@ var/list/datum/power/changeling/powerinstances = list()
/datum/power/changeling/mimicvoice
name = "Mimic Voice"
desc = "We shape our vocal glands to sound like a desired voice."
- helptext = "Will turn your voice into the name that you enter."
+ helptext = "Will turn your voice into the name that you enter. We must constantly expend chemicals to maintain our form like this"
genomecost = 3
verbpath = /mob/proc/changeling_mimicvoice
@@ -494,7 +494,7 @@ var/list/datum/power/changeling/powerinstances = list()
purchasedpowers += Thepower
if(!Thepower.isVerb && Thepower.verbpath)
- call(Thepower.verbpath)()
+ call(M.current, Thepower.verbpath)()
else if(remake_verbs)
M.current.make_changeling()
diff --git a/code/game/gamemodes/changeling/traitor_chan.dm b/code/game/gamemodes/changeling/traitor_chan.dm
index d8afb69ed0f..12a5525428e 100644
--- a/code/game/gamemodes/changeling/traitor_chan.dm
+++ b/code/game/gamemodes/changeling/traitor_chan.dm
@@ -3,7 +3,8 @@
config_tag = "traitorchan"
traitors_possible = 3 //hard limit on traitors if scaling is turned off
restricted_jobs = list("AI", "Cyborg")
- required_players = 20
+ required_players = 3
+ required_players_secret = 10
required_enemies = 2
recommended_enemies = 3
diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm
index 98012439623..ee16e21a771 100644
--- a/code/game/gamemodes/cult/cult.dm
+++ b/code/game/gamemodes/cult/cult.dm
@@ -22,7 +22,8 @@
config_tag = "cult"
restricted_jobs = list("Chaplain","AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain")
protected_jobs = list()
- required_players = 15
+ required_players = 5
+ required_players_secret = 15
required_enemies = 3
recommended_enemies = 4
@@ -255,7 +256,7 @@
if(objectives.Find("eldergod"))
cult_fail += eldergod //1 by default, 0 if the elder god has been summoned at least once
if(objectives.Find("sacrifice"))
- if(!sacrificed.Find(sacrifice_target)) //if the target has been sacrificed, ignore this step. otherwise, add 1 to cult_fail
+ if(sacrifice_target && !sacrificed.Find(sacrifice_target)) //if the target has been sacrificed, ignore this step. otherwise, add 1 to cult_fail
cult_fail++
return cult_fail //if any objectives aren't met, failure
diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm
index 00e5ff34a17..52b66b79ef8 100644
--- a/code/game/gamemodes/cult/ritual.dm
+++ b/code/game/gamemodes/cult/ritual.dm
@@ -654,24 +654,3 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
R.word3=cultwords["technology"]
R.loc = user.loc
R.check_icon()
-
-
-/obj/item/weapon/paperscrap
- name = "scrap of paper"
- icon_state = "scrap"
- throw_speed = 1
- throw_range = 2
- w_class = 1.0
- flags = FPRINT | TABLEPASS
-
- var/data
-
- attack_self(mob/user as mob)
- view_scrap(user)
-
- examine()
- set src in usr
- view_scrap(usr)
-
- proc/view_scrap(var/viewer)
- viewer << browse(data)
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index c387edf840a..b2972d2ff2a 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -377,10 +377,14 @@ var/list/sacrificed = list()
"\red A shape forms in the center of the rune. A shape of... a man.", \
"\red You hear liquid flowing.")
D.real_name = "Unknown"
+ var/chose_name = 0
for(var/obj/item/weapon/paper/P in this_rune.loc)
if(P.info)
D.real_name = copytext(P.info, 1, MAX_NAME_LEN)
+ chose_name = 1
break
+ if(!chose_name)
+ D.real_name = "[pick(first_names_male)] [pick(last_names)]"
D.universal_speak = 1
D.status_flags &= ~GODMODE
diff --git a/code/game/gamemodes/epidemic/epidemic.dm b/code/game/gamemodes/epidemic/epidemic.dm
index 03cc1104e28..0d4a20ff2fe 100644
--- a/code/game/gamemodes/epidemic/epidemic.dm
+++ b/code/game/gamemodes/epidemic/epidemic.dm
@@ -1,7 +1,8 @@
/datum/game_mode/epidemic
name = "epidemic"
config_tag = "epidemic"
- required_players = 6
+ required_players = 1
+ required_players_secret = 15
var/const/waittime_l = 300 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 600 //upper bound on time before intercept arrives (in tenths of seconds)
diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm
index 9e0ba0a37d8..553735edb7c 100644
--- a/code/game/gamemodes/events.dm
+++ b/code/game/gamemodes/events.dm
@@ -8,7 +8,7 @@
/*if(prob(50))//Every 120 seconds and prob 50 2-4 weak spacedusts will hit the station
spawn(1)
dust_swarm("weak")*/
- if (!event)
+ if(!event)
//CARN: checks to see if random events are enabled.
if(config.allow_random_events)
hadevent = event()
@@ -44,13 +44,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]
@@ -71,21 +73,21 @@
base_chance = 1.1
// Trigger the event based on how likely it currently is.
- if(!prob(chance * eventchance * base_chance / 100)) // "normal" event chance at 20 players
+ if(!prob(chance * eventchance * base_chance / 100))
return 0
switch(picked_event)
if("Meteor")
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
- world << sound('sound/AI/meteors.ogg')
+ for(var/mob/M in player_list)
+ if(!istype(M,/mob/new_player))
+ M << sound('sound/AI/meteors.ogg')
spawn(100)
- meteor_wave()
+ meteor_wave(10)
spawn_meteors()
spawn(700)
- meteor_wave()
+ meteor_wave(10)
spawn_meteors()
- if("Blob")
- mini_blob_event()
if("Space Ninja")
//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
space_ninja_arrival()
@@ -109,6 +111,10 @@
spacevine_infestation()
if("Communications")
communications_blackout()
+ if("Grid Check")
+ grid_check()
+ if("Meteor")
+ meteor_shower()
return 1
@@ -118,13 +124,17 @@
command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
for(var/mob/living/silicon/ai/A in player_list)
- A << "Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT"
+ A << " "
+ A << "Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT"
+ A << " "
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")
- world << sound('sound/AI/poweroff.ogg')
+/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)
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
continue
@@ -172,7 +182,8 @@
/proc/power_restore()
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
- world << sound('sound/AI/poweron.ogg')
+ for(var/mob/M in player_list)
+ M << sound('sound/AI/poweron.ogg')
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
C.cell.charge = C.cell.maxcharge
@@ -194,7 +205,8 @@
/proc/power_restore_quick()
command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal")
- world << sound('sound/AI/poweron.ogg')
+ for(var/mob/M in player_list)
+ M << sound('sound/AI/poweron.ogg')
for(var/obj/machinery/power/smes/S in world)
if(S.z != 1)
continue
@@ -219,64 +231,14 @@
break
/proc/viral_outbreak(var/virus = null)
-// command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
-// world << sound('sound/AI/outbreak7.ogg')
- var/virus_type
- if(!virus)
- virus_type = pick(/datum/disease/dnaspread,/datum/disease/advance/flu,/datum/disease/advance/cold,/datum/disease/brainrot,/datum/disease/magnitis,/datum/disease/pierrot_throat)
- else
- switch(virus)
- if("fake gbs")
- virus_type = /datum/disease/fake_gbs
- if("gbs")
- virus_type = /datum/disease/gbs
- if("magnitis")
- virus_type = /datum/disease/magnitis
- if("rhumba beat")
- virus_type = /datum/disease/rhumba_beat
- if("brain rot")
- virus_type = /datum/disease/brainrot
- if("cold")
- virus_type = /datum/disease/advance/cold
- if("retrovirus")
- virus_type = /datum/disease/dnaspread
- if("flu")
- virus_type = /datum/disease/advance/flu
-// if("t-virus")
-// virus_type = /datum/disease/t_virus
- if("pierrot's throat")
- virus_type = /datum/disease/pierrot_throat
- for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
-
- var/foundAlready = 0 // don't infect someone that already has the virus
- var/turf/T = get_turf(H)
- if(T.z != 1)
- continue
- for(var/datum/disease/D in H.viruses)
- foundAlready = 1
- if(H.stat == 2 || foundAlready)
+ for(var/mob/living/carbon/human/H in world)
+ if((H.virus2) || (H.stat == 2) || prob(30))
continue
- if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
- if((!H.dna) || (H.sdisabilities & BLIND)) //A blindness disease would be the worst.
- continue
- var/datum/disease/dnaspread/D = new
- D.strain_data["name"] = H.real_name
- D.strain_data["UI"] = H.dna.uni_identity
- D.strain_data["SE"] = H.dna.struc_enzymes
- D.carrier = 1
- D.holder = H
- D.affected_mob = H
- H.viruses += D
- break
- else
- var/datum/disease/D = new virus_type
- D.carrier = 1
- D.holder = H
- D.affected_mob = H
- H.viruses += D
- break
- spawn(rand(1500, 3000)) //Delayed announcements to keep the crew on their toes.
+ infect_mob_random_lesser(H)
+ break
+
+ spawn(rand(0, 3000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak7.ogg')
@@ -306,7 +268,8 @@
spawn(rand(5000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
- world << sound('sound/AI/aliens.ogg')
+ for(var/mob/M in player_list)
+ M << sound('sound/AI/aliens.ogg')
/proc/high_radiation_event()
@@ -321,6 +284,8 @@
sleep(600)
for(var/mob/living/carbon/human/H in living_mob_list)
var/turf/T = get_turf(H)
+ if(!T)
+ continue
if(T.z != 1)
continue
if(istype(H,/mob/living/carbon/human))
@@ -329,12 +294,15 @@
H.apply_effect((rand(90,150)),IRRADIATE,0)
for(var/mob/living/carbon/monkey/M in living_mob_list)
var/turf/T = get_turf(M)
+ if(!T)
+ continue
if(T.z != 1)
continue
M.apply_effect((rand(15,75)),IRRADIATE,0)
sleep(100)
command_alert("Radiation levels are within standard parameters again.", "Anomaly Alert")
- world << sound('sound/AI/radiation.ogg')
+ for(var/mob/M in player_list)
+ M << sound('sound/AI/radiation.ogg')
@@ -384,7 +352,8 @@
//sleep(100)
spawn(rand(300, 600)) //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('sound/AI/commandreport.ogg')
+ for(var/mob/M in player_list)
+ M << sound('sound/AI/commandreport.ogg')
/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights
if(isEvent)
@@ -451,46 +420,74 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
crew = "Any Human"
switch(rand(1,14))
if(1)
+ M << " "
M << "\red THERE ARE [amount] [who2] ON THE STATION...LAWS UPDATED"
+ M << " "
M.add_ion_law("THERE ARE [amount] [who2] ON THE STATION")
if(2)
+ M << " "
M << "\red [what2] ARE DANGEROUS TO HUMANS...LAWS UPDATED"
+ M << " "
M.add_ion_law("[what2] ARE DANGEROUS TO HUMANS")
if(3)
+ M << " "
M << "\red THE ESCAPE-SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION...LAWS UPDATED"
+ M << " "
M.add_ion_law("THE ESCAPE SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION")
if(4)
+ M << " "
M << "\red HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE...LAWS UPDATED"
+ M << " "
M.add_ion_law("HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE")
if(5)
+ M << " "
M << "\red THE CAPTAIN, HOP AND HOS ARE [who2]...LAWS UPDATED"
+ M << " "
M.add_ion_law("THE CAPTAIN, HOP AND HOS ARE [who2]")
if(6)
+ M << " "
M << "\red THE STATION IS BUILT FOR [who2]...LAWS UPDATED"
+ M << " "
M.add_ion_law("THE STATION IS BUILT FOR [who2]")
if(7)
+ M << " "
M << "\red YOU ARE [amount] [who2]...LAWS UPDATED"
+ M << " "
M.add_ion_law("YOU ARE [amount] [who2]")
if(8)
+ M << " "
M << "\red YOU MUST ALWAYS [aimust]...LAWS UPDATED"
+ M << " "
M.add_ion_law("YOU MUST ALWAYS [aimust]")
if(9)
+ M << " "
M << "\red [area] [area2] [amount] [what2]...LAWS UPDATED"
+ M << " "
M.add_ion_law("[area] [area2] [amount] [what2]")
if(10)
+ M << " "
M << "\red [crew] is [target]...LAWS UPDATED"
+ M << " "
M.add_ion_law("[crew] is [target]")
if(11)
+ M << " "
M << "\red [define] IS A FORM OF HARM...LAWS UPDATED"
+ M << " "
M.add_ion_law("[define] IS A FORM OF HARM")
if(12)
+ M << " "
M << "\red YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS... LAWS UPDATED"
+ M << " "
M.add_ion_law("YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS")
if(13)
+ M << " "
M << "\red [crew] is [allergysev] to [allergy]...LAWS UPDATED"
+ M << " "
M.add_ion_law("[crew] is [allergysev] to [allergy]")
if(14)
+ M << " "
M << "\red THE STATION IS [who2pref] [who2]...LAWS UPDATED"
+ M << " "
M.add_ion_law("THE STATION IS [who2pref] [who2]")
if(botEmagChance)
@@ -542,10 +539,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
@@ -575,4 +590,4 @@ proc/number_active_with_role(role)
if("Cyborg")
if(M.mind.assigned_role == "Cyborg")
count++
- return count
\ No newline at end of file
+ return count
diff --git a/code/game/gamemodes/events/BlowOut.dm b/code/game/gamemodes/events/BlowOut.dm
deleted file mode 100644
index 1d660989d96..00000000000
--- a/code/game/gamemodes/events/BlowOut.dm
+++ /dev/null
@@ -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.")
\ No newline at end of file
diff --git a/code/game/gamemodes/events/ElectricalStorm.dm b/code/game/gamemodes/events/ElectricalStorm.dm
deleted file mode 100644
index 58d42c23d01..00000000000
--- a/code/game/gamemodes/events/ElectricalStorm.dm
+++ /dev/null
@@ -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
diff --git a/code/game/gamemodes/events/GravitationalAnomaly.dm b/code/game/gamemodes/events/GravitationalAnomaly.dm
deleted file mode 100644
index 8b7d2186cf5..00000000000
--- a/code/game/gamemodes/events/GravitationalAnomaly.dm
+++ /dev/null
@@ -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)
diff --git a/code/game/gamemodes/events/ImmovableRod.dm b/code/game/gamemodes/events/ImmovableRod.dm
deleted file mode 100644
index 27956c7e35c..00000000000
--- a/code/game/gamemodes/events/ImmovableRod.dm
+++ /dev/null
@@ -1,5 +0,0 @@
-/datum/event/immovablerod
-
- Announce()
-
- immovablerod()
\ No newline at end of file
diff --git a/code/game/gamemodes/events/MeteorStorm.dm b/code/game/gamemodes/events/MeteorStorm.dm
deleted file mode 100644
index 10cb7ef6767..00000000000
--- a/code/game/gamemodes/events/MeteorStorm.dm
+++ /dev/null
@@ -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")
\ No newline at end of file
diff --git a/code/game/gamemodes/events/PowerOffline.dm b/code/game/gamemodes/events/PowerOffline.dm
deleted file mode 100644
index c6e8a8b6574..00000000000
--- a/code/game/gamemodes/events/PowerOffline.dm
+++ /dev/null
@@ -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()
\ No newline at end of file
diff --git a/code/game/gamemodes/events/PrisonBreak.dm b/code/game/gamemodes/events/PrisonBreak.dm
deleted file mode 100644
index e51c5c8e774..00000000000
--- a/code/game/gamemodes/events/PrisonBreak.dm
+++ /dev/null
@@ -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")
diff --git a/code/game/gamemodes/events/RadiationBelt.dm b/code/game/gamemodes/events/RadiationBelt.dm
deleted file mode 100644
index 15a4e6407c8..00000000000
--- a/code/game/gamemodes/events/RadiationBelt.dm
+++ /dev/null
@@ -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")
diff --git a/code/game/gamemodes/events/SpaceCarp.dm b/code/game/gamemodes/events/SpaceCarp.dm
deleted file mode 100644
index 5decc7636f1..00000000000
--- a/code/game/gamemodes/events/SpaceCarp.dm
+++ /dev/null
@@ -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')
\ No newline at end of file
diff --git a/code/game/gamemodes/events/SpaceNinja.dm b/code/game/gamemodes/events/SpaceNinja.dm
deleted file mode 100644
index 63d82117072..00000000000
--- a/code/game/gamemodes/events/SpaceNinja.dm
+++ /dev/null
@@ -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.
\ No newline at end of file
diff --git a/code/game/gamemodes/events/biomass.dm b/code/game/gamemodes/events/biomass.dm
new file mode 100644
index 00000000000..8cbfe8cc470
--- /dev/null
+++ b/code/game/gamemodes/events/biomass.dm
@@ -0,0 +1,174 @@
+// BIOMASS (Note that this code is very similar to Space Vine code)
+/obj/effect/biomass
+ name = "biomass"
+ desc = "Space barf from another dimension. It just keeps spreading!"
+ icon = 'icons/obj/biomass.dmi'
+ icon_state = "stage1"
+ anchored = 1
+ density = 0
+ layer = 5
+ pass_flags = PASSTABLE | PASSGRILLE
+ var/energy = 0
+ var/obj/effect/biomass_controller/master = null
+
+ New()
+ return
+
+ Del()
+ if(master)
+ master.vines -= src
+ master.growth_queue -= src
+ ..()
+
+/obj/effect/biomass/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if (!W || !user || !W.type) return
+ switch(W.type)
+ if(/obj/item/weapon/circular_saw) del src
+ if(/obj/item/weapon/kitchen/utensil/knife) del src
+ if(/obj/item/weapon/scalpel) del src
+ if(/obj/item/weapon/twohanded/fireaxe) del src
+ if(/obj/item/weapon/hatchet) del src
+ if(/obj/item/weapon/melee/energy) del src
+
+ //less effective weapons
+ if(/obj/item/weapon/wirecutters)
+ if(prob(25)) del src
+ if(/obj/item/weapon/shard)
+ if(prob(25)) del src
+
+ else //weapons with subtypes
+ if(istype(W, /obj/item/weapon/melee/energy/sword)) del src
+ else if(istype(W, /obj/item/weapon/weldingtool))
+ var/obj/item/weapon/weldingtool/WT = W
+ if(WT.remove_fuel(0, user)) del src
+ else
+ return
+ ..()
+
+/obj/effect/biomass_controller
+ var/list/obj/effect/biomass/vines = list()
+ var/list/growth_queue = list()
+ var/reached_collapse_size
+ var/reached_slowdown_size
+ //What this does is that instead of having the grow minimum of 1, required to start growing, the minimum will be 0,
+ //meaning if you get the biomasssss..s' size to something less than 20 plots, it won't grow anymore.
+
+ New()
+ if(!istype(src.loc,/turf/simulated/floor))
+ del(src)
+
+ spawn_biomass_piece(src.loc)
+ processing_objects.Add(src)
+
+ Del()
+ processing_objects.Remove(src)
+ ..()
+
+ proc/spawn_biomass_piece(var/turf/location)
+ var/obj/effect/biomass/BM = new(location)
+ growth_queue += BM
+ vines += BM
+ BM.master = src
+
+ process()
+ if(!vines)
+ del(src) //space vines exterminated. Remove the controller
+ return
+ if(!growth_queue)
+ del(src) //Sanity check
+ return
+ if(vines.len >= 250 && !reached_collapse_size)
+ reached_collapse_size = 1
+ if(vines.len >= 30 && !reached_slowdown_size )
+ reached_slowdown_size = 1
+
+ var/maxgrowth = 0
+ if(reached_collapse_size)
+ maxgrowth = 0
+ else if(reached_slowdown_size)
+ if(prob(25))
+ maxgrowth = 1
+ else
+ maxgrowth = 0
+ else
+ maxgrowth = 4
+ var/length = min( 30 , vines.len / 5 )
+ var/i = 0
+ var/growth = 0
+ var/list/obj/effect/biomass/queue_end = list()
+
+ for( var/obj/effect/biomass/BM in growth_queue )
+ i++
+ queue_end += BM
+ growth_queue -= BM
+ if(BM.energy < 2) //If tile isn't fully grown
+ if(prob(20))
+ BM.grow()
+
+ if(BM.spread())
+ growth++
+ if(growth >= maxgrowth)
+ break
+ if(i >= length)
+ break
+
+ growth_queue = growth_queue + queue_end
+
+/obj/effect/biomass/proc/grow()
+ if(!energy)
+ src.icon_state = "stage2"
+ energy = 1
+ src.opacity = 0
+ src.density = 0
+ layer = 5
+ else
+ src.icon_state = "stage3"
+ src.opacity = 0
+ src.density = 1
+ energy = 2
+
+/obj/effect/biomass/proc/spread()
+ var/direction = pick(cardinal)
+ var/step = get_step(src,direction)
+ if(istype(step,/turf/simulated/floor))
+ var/turf/simulated/floor/F = step
+ if(!locate(/obj/effect/biomass,F))
+ if(F.Enter(src))
+ if(master)
+ master.spawn_biomass_piece( F )
+ return 1
+ return 0
+
+/obj/effect/biomass/ex_act(severity)
+ switch(severity)
+ if(1.0)
+ del(src)
+ return
+ if(2.0)
+ if (prob(90))
+ del(src)
+ return
+ if(3.0)
+ if (prob(50))
+ del(src)
+ return
+ return
+
+/obj/effect/biomass/temperature_expose(null, temp, volume) //hotspots kill biomass
+ del src
+
+
+/proc/biomass_infestation()
+
+ spawn() //to stop the secrets panel hanging
+ var/list/turf/simulated/floor/turfs = list() //list of all the empty floor turfs in the hallway areas
+ for(var/areapath in typesof(/area/hallway))
+ var/area/hallway/A = locate(areapath)
+ for(var/turf/simulated/floor/F in A)
+ if(!F.contents.len)
+ turfs += F
+
+ if(turfs.len) //Pick a turf to spawn at if we can
+ var/turf/simulated/floor/T = pick(turfs)
+ new/obj/effect/biomass_controller(T) //spawn a controller at turf
+ message_admins("\blue Event: Biomass spawned at [T.loc.loc] ([T.x],[T.y],[T.z])")
diff --git a/code/game/gamemodes/events/dust.dm b/code/game/gamemodes/events/dust.dm
index fb1f167c340..378c6b24685 100644
--- a/code/game/gamemodes/events/dust.dm
+++ b/code/game/gamemodes/events/dust.dm
@@ -100,7 +100,7 @@ The "dust" will damage the hull of the station causin minor hull breaches.
if(ismob(A))
A.meteorhit(src)//This should work for now I guess
- else if(!istype(A,/obj/machinery/emitter) && !istype(A,/obj/machinery/field_generator)) //Protect the singularity from getting released every round!
+ else if(!istype(A,/obj/machinery/power/emitter) && !istype(A,/obj/machinery/field_generator)) //Protect the singularity from getting released every round!
A.ex_act(strength) //Changing emitter/field gen ex_act would make it immune to bombs and C4
life--
diff --git a/code/game/gamemodes/events/holidays/Christmas.dm b/code/game/gamemodes/events/holidays/Christmas.dm
index 2b4a1008ff1..2ee79e7c65b 100644
--- a/code/game/gamemodes/events/holidays/Christmas.dm
+++ b/code/game/gamemodes/events/holidays/Christmas.dm
@@ -1 +1,63 @@
-//placeholder for holiday stuff
\ No newline at end of file
+/proc/Christmas_Game_Start()
+ for(var/obj/structure/flora/tree/pine/xmas in world)
+ if(xmas.z != 1) continue
+ for(var/turf/simulated/floor/T in orange(1,xmas))
+ for(var/i=1,i<=rand(1,5),i++)
+ new /obj/item/weapon/a_gift(T)
+ for(var/mob/living/simple_animal/corgi/Ian/Ian in mob_list)
+ Ian.place_on_head(new /obj/item/clothing/head/helmet/space/santahat(Ian))
+
+/proc/ChristmasEvent()
+ for(var/obj/structure/flora/tree/pine/xmas in world)
+ var/mob/living/simple_animal/hostile/tree/evil_tree = new /mob/living/simple_animal/hostile/tree(xmas.loc)
+ evil_tree.icon_state = xmas.icon_state
+ evil_tree.icon_living = evil_tree.icon_state
+ evil_tree.icon_dead = evil_tree.icon_state
+ evil_tree.icon_gib = evil_tree.icon_state
+ del(xmas)
+
+/obj/item/weapon/toy/xmas_cracker
+ name = "xmas cracker"
+ icon = 'icons/obj/christmas.dmi'
+ icon_state = "cracker"
+ desc = "Directions for use: Requires two people, one to pull each end."
+ var/cracked = 0
+
+/obj/item/weapon/toy/xmas_cracker/New()
+ ..()
+
+/obj/item/weapon/toy/xmas_cracker/attack(mob/target, mob/user)
+ if( !cracked && istype(target,/mob/living/carbon/human) && (target.stat == CONSCIOUS) && !target.get_active_hand() )
+ target.visible_message("[user] and [target] pop \an [src]! *pop*", "You pull \an [src] with [target]! *pop*", "You hear a *pop*.")
+ var/obj/item/weapon/paper/Joke = new /obj/item/weapon/paper(user.loc)
+ Joke.name = "[pick("awful","terrible","unfunny")] joke"
+ Joke.info = pick("What did one snowman say to the other?\n\n'Is it me or can you smell carrots?'",
+ "Why couldn't the snowman get laid?\n\nHe was frigid!",
+ "Where are santa's helpers educated?\n\nNowhere, they're ELF-taught.",
+ "What happened to the man who stole advent calanders?\n\nHe got 25 days.",
+ "What does Santa get when he gets stuck in a chimney?\n\nClaus-trophobia.",
+ "Where do you find chili beans?\n\nThe north pole.",
+ "What do you get from eating tree decorations?\n\nTinsilitis!",
+ "What do snowmen wear on their heads?\n\nIce caps!",
+ "Why is Christmas just like life on ss13?\n\nYou do all the work and the fat guy gets all the credit.",
+ "Why doesn’t Santa have any children?\n\nBecause he only comes down the chimney.")
+ new /obj/item/clothing/head/festive(target.loc)
+ user.update_icons()
+ cracked = 1
+ icon_state = "cracker1"
+ var/obj/item/weapon/toy/xmas_cracker/other_half = new /obj/item/weapon/toy/xmas_cracker(target)
+ other_half.cracked = 1
+ other_half.icon_state = "cracker2"
+ target.put_in_active_hand(other_half)
+ playsound(user, 'sound/effects/snap.ogg', 50, 1)
+ return 1
+ return ..()
+
+/obj/item/clothing/head/festive
+ name = "festive paper hat"
+ icon_state = "xmashat"
+ desc = "A crappy paper hat that you are REQUIRED to wear."
+ flags_inv = 0
+ flags = FPRINT|TABLEPASS
+ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
+
diff --git a/code/game/gamemodes/events/holidays/Holidays.dm b/code/game/gamemodes/events/holidays/Holidays.dm
index eed0a083324..d2481eae441 100644
--- a/code/game/gamemodes/events/holidays/Holidays.dm
+++ b/code/game/gamemodes/events/holidays/Holidays.dm
@@ -101,6 +101,7 @@ var/global/Holiday = null
switch(DD)
if(10) Holiday = "Human-Rights Day"
if(14) Holiday = "Monkey Day"
+ if(21) if(YY==12) Holiday = "End of the World"
if(22) Holiday = "Orgasming Day" //lol. These all actually exist
if(24) Holiday = "Christmas Eve"
if(25) Holiday = "Christmas"
@@ -120,14 +121,13 @@ var/global/Holiday = null
set desc = "Force-set the Holiday variable to make the game think it's a certain day."
if(!check_rights(R_SERVER)) return
- if(!T) return
Holiday = T
//get a new station name
station_name = null
station_name()
//update our hub status
world.update_status()
-// Holiday_Game_Start()
+ Holiday_Game_Start()
message_admins("\blue ADMIN: Event: [key_name(src)] force-set Holiday to \"[Holiday]\"")
log_admin("[key_name(src)] force-set Holiday to \"[Holiday]\"")
@@ -141,10 +141,9 @@ var/global/Holiday = null
switch(Holiday) //special holidays
if("Easter")
//do easter stuff
- if("Christmas ")
- //do christmas stuff
- else
- //etc. you get what I'm getting at
+ if("Christmas Eve","Christmas")
+ Christmas_Game_Start()
+
return
//Nested in the random events loop. Will be triggered every 2 minutes
@@ -171,4 +170,9 @@ var/global/Holiday = null
if(S.z != 1) continue
containers += S
- message_admins("\blue DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])")*/
\ No newline at end of file
+ message_admins("\blue DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])")*/
+ if("End of the World")
+ if(prob(eventchance)) GameOver()
+
+ if("Christmas","Christmas Eve")
+ if(prob(eventchance)) ChristmasEvent()
diff --git a/code/game/gamemodes/events/holidays/Other.dm b/code/game/gamemodes/events/holidays/Other.dm
new file mode 100644
index 00000000000..b520bbe3424
--- /dev/null
+++ b/code/game/gamemodes/events/holidays/Other.dm
@@ -0,0 +1,10 @@
+/proc/GameOver()
+ if(!hadevent)
+ hadevent = 1
+ message_admins("The apocalypse has begun! (this holiday event can be disabled by toggling events off within 60 seconds)")
+ spawn(600)
+ if(!config.allow_random_events) return
+ Show2Group4Delay(ScreenText(null,"
GAME OVER
"),null,150)
+ for(var/i=1,i<=4,i++)
+ event()
+ sleep(50)
\ No newline at end of file
diff --git a/code/game/gamemodes/events/miniblob.dm b/code/game/gamemodes/events/miniblob.dm
index 93f3c2a7172..663dff0f2ed 100644
--- a/code/game/gamemodes/events/miniblob.dm
+++ b/code/game/gamemodes/events/miniblob.dm
@@ -9,11 +9,13 @@
blobevent = 1
spawn(0)
dotheblobbaby()
- spawn(12000) // blob event can last up to 20 minutes
+ spawn(3000)
blobevent = 0
spawn(rand(1000, 2000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
- world << sound('sound/AI/outbreak5.ogg')
+ for(var/mob/M in player_list)
+ if(!istype(M,/mob/new_player))
+ M << sound('sound/AI/outbreak5.ogg')
/proc/dotheblobbaby()
if (blobevent)
@@ -25,5 +27,5 @@
if(B.z != 1)
continue
B.Life()
- spawn(280) // advance 1 tile every 30 seconds
- dotheblobbaby()
+ spawn(30)
+ dotheblobbaby()
\ No newline at end of file
diff --git a/code/game/gamemodes/events/ninja_equipment.dm b/code/game/gamemodes/events/ninja_equipment.dm
index 41f39f3baca..8f66ca56a32 100644
--- a/code/game/gamemodes/events/ninja_equipment.dm
+++ b/code/game/gamemodes/events/ninja_equipment.dm
@@ -540,7 +540,7 @@ ________________________________________________________________________________
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, P.loc))
O.show_message(text("\icon[P] *[P.ttone]*"))
- P.overlays = null
+ P.overlays.Cut()
P.overlays += image('icons/obj/pda.dmi', "pda-r")
if("Inject")
@@ -976,7 +976,7 @@ ________________________________________________________________________________
flick("apc-spark", src)
A.emagged = 1
A.locked = 0
- A.updateicon()
+ A.update_icon()
else
U << "\red This APC has run dry of power. You must find another source."
@@ -1428,7 +1428,7 @@ It is possible to destroy the net by the occupant or someone else.
return
attack_hand()
- if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
+ if (HULK in usr.mutations)
usr << text("\blue You easily destroy the energy net.")
for(var/mob/O in oviewers(src))
O.show_message(text("\red [] rips the energy net apart!", usr), 1)
diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm
index 70aaf9b1dbd..6bf06ceeb0c 100644
--- a/code/game/gamemodes/events/space_ninja.dm
+++ b/code/game/gamemodes/events/space_ninja.dm
@@ -1024,4 +1024,33 @@ That is why you attached them to objects.
step_to(current_clone,src,1)
sleep(5)
if(safety<=0) break
- return */
\ No newline at end of file
+ return */
+
+//Alternate ninja speech replacement.
+/*This text is hilarious but also absolutely retarded.
+message = replacetext(message, "l", "r")
+message = replacetext(message, "rr", "ru")
+message = replacetext(message, "v", "b")
+message = replacetext(message, "f", "hu")
+message = replacetext(message, "'t", "")
+message = replacetext(message, "t ", "to ")
+message = replacetext(message, " I ", " ai ")
+message = replacetext(message, "th", "z")
+message = replacetext(message, "ish", "isu")
+message = replacetext(message, "is", "izu")
+message = replacetext(message, "ziz", "zis")
+message = replacetext(message, "se", "su")
+message = replacetext(message, "br", "bur")
+message = replacetext(message, "ry", "ri")
+message = replacetext(message, "you", "yuu")
+message = replacetext(message, "ck", "cku")
+message = replacetext(message, "eu", "uu")
+message = replacetext(message, "ow", "au")
+message = replacetext(message, "are", "aa")
+message = replacetext(message, "ay", "ayu")
+message = replacetext(message, "ea", "ii")
+message = replacetext(message, "ch", "chi")
+message = replacetext(message, "than", "sen")
+message = replacetext(message, ".", "")
+message = lowertext(message)
+*/
\ No newline at end of file
diff --git a/code/game/gamemodes/events/spacevines.dm b/code/game/gamemodes/events/spacevines.dm
index 8f3e03bd8d3..bf0b0fe99f3 100644
--- a/code/game/gamemodes/events/spacevines.dm
+++ b/code/game/gamemodes/events/spacevines.dm
@@ -1,4 +1,4 @@
-// SPACE VINES
+// SPACE VINES (Note that this code is very similar to Biomass code)
/obj/effect/spacevine
name = "space vines"
desc = "An extremely expansionistic species of vine."
@@ -6,6 +6,7 @@
icon_state = "Light1"
anchored = 1
density = 0
+ layer = 5
pass_flags = PASSTABLE | PASSGRILLE
var/energy = 0
var/obj/effect/spacevine_controller/master = null
diff --git a/code/game/gamemodes/events/wormholes.dm b/code/game/gamemodes/events/wormholes.dm
index 45f2993b206..1ef19e24ac7 100644
--- a/code/game/gamemodes/events/wormholes.dm
+++ b/code/game/gamemodes/events/wormholes.dm
@@ -8,7 +8,9 @@
if(pick_turfs.len)
//All ready. Announce that bad juju is afoot.
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
- world << sound('sound/AI/spanomalies.ogg')
+ for(var/mob/M in player_list)
+ if(!istype(M,/mob/new_player))
+ M << sound('sound/AI/spanomalies.ogg')
//prob(20) can be approximated to 1 wormhole every 5 turfs!
//admittedly less random but totally worth it >_<
diff --git a/code/game/gamemodes/factions.dm b/code/game/gamemodes/factions.dm
index cd7ae219ab3..1aaa70e2a54 100644
--- a/code/game/gamemodes/factions.dm
+++ b/code/game/gamemodes/factions.dm
@@ -124,7 +124,7 @@
/obj/item/weapon/gun/energy/crossbow:5:Energy Crossbow;
/obj/item/weapon/melee/energy/sword:4:Energy Sword;
/obj/item/weapon/storage/box/syndicate:10:Syndicate Bundle;
-/obj/item/weapon/storage/emp_kit:3:5 EMP Grenades;
+/obj/item/weapon/storage/box/emps:3:5 EMP Grenades;
Whitespace:Seperator;
Stealthy and Inconspicuous Weapons;
/obj/item/weapon/pen/paralysis:3:Paralysis Pen;
@@ -141,7 +141,7 @@ Whitespace:Seperator;
Devices and Tools;
/obj/item/weapon/card/emag:3:Cryptographic Sequencer;
/obj/item/weapon/storage/toolbox/syndicate:1:Fully Loaded Toolbox;
-/obj/item/weapon/storage/syndie_kit/space:3:Space Suit;
+/obj/item/weapon/storage/box/syndie_kit/space:3:Space Suit;
/obj/item/clothing/glasses/thermal/syndi:3:Thermal Imaging Glasses;
/obj/item/device/encryptionkey/binary:3:Binary Translator Key;
/obj/item/weapon/aiModule/syndicate:7:Hacked AI Upload Module;
@@ -151,8 +151,8 @@ Devices and Tools;
/obj/item/weapon/circuitboard/teleporter:20:Teleporter Circuit Board;
Whitespace:Seperator;
Implants;
-/obj/item/weapon/storage/syndie_kit/imp_freedom:3:Freedom Implant;
-/obj/item/weapon/storage/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
+/obj/item/weapon/storage/box/syndie_kit/imp_freedom:3:Freedom Implant;
+/obj/item/weapon/storage/box/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
Whitespace:Seperator;
(Pointless) Badassery;
/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon);"}
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 08fbed7c2cd..ecac47c66df 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -24,6 +24,7 @@
var/list/restricted_jobs = list() // Jobs it doesn't make sense to be. I.E chaplain or AI cultist
var/list/protected_jobs = list() // Jobs that can't be tratiors because
var/required_players = 0
+ var/required_players_secret = 0 //Minimum number of players for that game mode to be chose in Secret
var/required_enemies = 0
var/recommended_enemies = 0
var/uplink_welcome = "Syndicate Uplink Console:"
@@ -34,7 +35,7 @@
/obj/item/weapon/gun/energy/crossbow:5:Energy Crossbow;
/obj/item/weapon/melee/energy/sword:4:Energy Sword;
/obj/item/weapon/storage/box/syndicate:10:Syndicate Bundle;
-/obj/item/weapon/storage/emp_kit:3:5 EMP Grenades;
+/obj/item/weapon/storage/box/emps:3:5 EMP Grenades;
Whitespace:Seperator;
Stealthy and Inconspicuous Weapons;
/obj/item/weapon/pen/paralysis:3:Paralysis Pen;
@@ -51,7 +52,7 @@ Whitespace:Seperator;
Devices and Tools;
/obj/item/weapon/card/emag:3:Cryptographic Sequencer;
/obj/item/weapon/storage/toolbox/syndicate:1:Fully Loaded Toolbox;
-/obj/item/weapon/storage/syndie_kit/space:3:Space Suit;
+/obj/item/weapon/storage/box/syndie_kit/space:3:Space Suit;
/obj/item/clothing/glasses/thermal/syndi:3:Thermal Imaging Glasses;
/obj/item/device/encryptionkey/binary:3:Binary Translator Key;
/obj/item/weapon/aiModule/syndicate:7:Hacked AI Upload Module;
@@ -61,11 +62,10 @@ Devices and Tools;
/obj/item/weapon/circuitboard/teleporter:20:Teleporter Circuit Board;
Whitespace:Seperator;
Implants;
-/obj/item/weapon/storage/syndie_kit/imp_freedom:3:Freedom Implant;
+/obj/item/weapon/storage/box/syndie_kit/imp_freedom:3:Freedom Implant;
+/obj/item/weapon/storage/box/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
/obj/item/weapon/implant/explosive:6:Explosive Implant (DANGER!);
-/obj/item/weapon/implant/compressed:4:Compressed Matter Implant;
-/obj/item/weapon/storage/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
-Whitespace:Seperator;
+/obj/item/weapon/implant/compressed:4:Compressed Matter Implant;Whitespace:Seperator;
(Pointless) Badassery;
/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon);"}
@@ -85,8 +85,13 @@ Whitespace:Seperator;
for(var/mob/new_player/player in player_list)
if((player.client)&&(player.ready))
playerC++
- if(playerC >= required_players)
- return 1
+
+ if(master_mode=="secret")
+ if(playerC >= required_players_secret)
+ return 1
+ else
+ if(playerC >= required_players)
+ return 1
return 0
@@ -233,7 +238,9 @@ Whitespace:Seperator;
world << sound('commandreport.ogg')
/* command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.")
- world << sound('sound/AI/intercept.ogg')
+ for(var/mob/M in player_list)
+ if(!istype(M,/mob/new_player))
+ M << sound('sound/AI/intercept.ogg')
if(security_level < SEC_LEVEL_BLUE)
set_security_level(SEC_LEVEL_BLUE)*/
@@ -320,7 +327,6 @@ Whitespace:Seperator;
if(applicant)
candidates += applicant
drafted.Remove(applicant)
- log_admin("[applicant.key] drafted into antagonist role against their preferences.")
message_admins("[applicant.key] drafted into antagonist role against their preferences.")
else // Not enough scrubs, ABORT ABORT ABORT
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index 32eda4be3de..ffacec3aa2d 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -37,9 +37,9 @@ var/global/datum/controller/gameticker/ticker
var/triai = 0//Global holder for Triumvirate
/datum/controller/gameticker/proc/pregame()
- login_music = pick('sound/ambience/title1.ogg','sound/ambience/title2.ogg','sound/ambience/b12_combined_start.ogg') // choose title music!
-/* for(var/mob/new_player/M in mob_list)
- if(M.client) M.client.playtitlemusic()*/
+ login_music = pick('sound/ambience/title2.ogg','sound/ambience/title1.ogg','sound/ambience/b12_combined_start.ogg') // choose title music!
+ for(var/mob/new_player/M in mob_list)
+ if(M.client) M.client.playtitlemusic()
do
pregame_timeleft = 180
world << "Welcome to the pre-game lobby!"
@@ -124,6 +124,7 @@ var/global/datum/controller/gameticker/ticker
Holiday_Game_Start()
start_events() //handles random events and space dust.
+//new random event system is handled from the MC.
var/admins_number = 0
for(var/client/C)
@@ -274,7 +275,9 @@ var/global/datum/controller/gameticker/ticker
job_master.EquipRank(player, player.mind.assigned_role, 0)
EquipCustomItems(player)
if(captainless)
- world << "Captainship not forced on anyone."
+ for(var/mob/M in player_list)
+ if(!istype(M,/mob/new_player))
+ M << "Captainship not forced on anyone."
proc/process()
@@ -308,7 +311,10 @@ var/global/datum/controller/gameticker/ticker
if(!delay_end)
sleep(restart_timeout)
- world.Reboot()
+ if(!delay_end)
+ world.Reboot()
+ else
+ world << "\blue An admin has delayed the round end"
else
world << "\blue An admin has delayed the round end"
diff --git a/code/game/gamemodes/intercept_report.dm b/code/game/gamemodes/intercept_report.dm
index f07934fd2ca..35b5f42c699 100644
--- a/code/game/gamemodes/intercept_report.dm
+++ b/code/game/gamemodes/intercept_report.dm
@@ -1,5 +1,6 @@
/datum/intercept_text
var/text
+ /*
var/prob_correct_person_lower = 20
var/prob_correct_person_higher = 80
var/prob_correct_job_lower = 20
@@ -8,6 +9,7 @@
var/prob_correct_print_higher = 80
var/prob_correct_objective_lower = 20
var/prob_correct_objective_higher = 80
+ */
var/list/org_names_1 = list(
"Blighted",
"Defiled",
@@ -48,7 +50,8 @@
"Booga",
"The Goatee of Wrath",
"Tam Lin",
- "Species 3157"
+ "Species 3157",
+ "Small Prick"
)
@@ -85,7 +88,9 @@
else
return null
+// NOTE: Commentted out was the code which showed the chance of someone being an antag. If you want to re-add it, just uncomment the code.
+/*
/datum/intercept_text/proc/pick_mob()
var/list/dudes = list()
for(var/mob/living/carbon/human/man in player_list)
@@ -104,11 +109,13 @@
return num2text(md5(dude.dna.uni_identity))
else
return num2text(md5(num2text(rand(1,10000))))
-
+*/
/datum/intercept_text/proc/build_traitor(datum/mind/correct_person)
var/name_1 = pick(src.org_names_1)
var/name_2 = pick(src.org_names_2)
+
+ /*
var/fingerprints
var/traitor_name
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
@@ -121,8 +128,11 @@
traitor_name = pick_mob()
else
fingerprints = pick_fingerprints()
+ */
- src.text += "
The [name_1] [name_2] implied an undercover operative was acting on their behalf on the station currently. "
+ src.text += "
The [name_1] [name_2] implied an undercover operative was acting on their behalf on the station currently."
+ src.text += "It would be in your best interests to suspect everybody, as these undercover operatives could have implants which trigger them to have their memories removed until they are needed. He, or she, could even be a high ranking officer."
+ /*
src.text += "After some investigation, we "
if(traitor_name)
src.text += "are [prob_right_dude]% sure that [traitor_name] may have been involved, and should be closely observed."
@@ -130,11 +140,13 @@
else
src.text += "discovered the following set of fingerprints ([fingerprints]) on sensitive materials, and their owner should be closely observed."
src.text += "However, these could also belong to a current Cent. Com employee, so do not act on this without reason."
+ */
/datum/intercept_text/proc/build_cult(datum/mind/correct_person)
var/name_1 = pick(src.org_names_1)
var/name_2 = pick(src.org_names_2)
+ /*
var/traitor_name
var/traitor_job
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
@@ -156,19 +168,23 @@
traitor_name = correct_person:current
else
traitor_name = pick_mob()
-
- src.text += "
It has been brought to our attention that the [name_1] [name_2] have stumbled upon some dark secrets. They apparently want to spread the dangerous knowledge on as many stations as they can. "
+ */
+ src.text += "
It has been brought to our attention that the [name_1] [name_2] have stumbled upon some dark secrets. They apparently want to spread the dangerous knowledge onto as many stations as they can."
+ src.text += "Watch out for the following: praying to an unfamilar god, preaching the word of \[REDACTED\], sacrifices, magical dark power, living constructs of evil and a portal to the dimension of the underworld."
+ /*
src.text += "Based on our intelligence, we are [prob_right_job]% sure that if true, someone doing the job of [traitor_job] on your station may have been converted "
src.text += "and instilled with the idea of the flimsiness of the real world, seeking to destroy it. "
if(prob(prob_right_dude))
src.text += " In addition, we are [prob_right_dude]% sure that [traitor_name] may have also some in to contact with this "
src.text += "organisation."
src.text += " However, if this information is acted on without substantial evidence, those responsible will face severe repercussions."
+ */
/datum/intercept_text/proc/build_rev(datum/mind/correct_person)
var/name_1 = pick(src.org_names_1)
var/name_2 = pick(src.org_names_2)
+ /*
var/traitor_name
var/traitor_job
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
@@ -192,14 +208,17 @@
traitor_name = correct_person.current
else
traitor_name = src.pick_mob()
-
- src.text += "
It has been brought to our attention that the [name_1] [name_2] are attempting to stir unrest on one of our stations in your sector. "
+ */
+ src.text += "
It has been brought to our attention that the [name_1] [name_2] are attempting to stir unrest on one of our stations in your sector."
+ src.text += "Watch out for suspicious activity among the crew and make sure that all heads of staff report in periodically."
+ /*
src.text += "Based on our intelligence, we are [prob_right_job]% sure that if true, someone doing the job of [traitor_job] on your station may have been brainwashed "
src.text += "at a recent conference, and their department should be closely monitored for signs of mutiny. "
if(prob(prob_right_dude))
src.text += " In addition, we are [prob_right_dude]% sure that [traitor_name] may have also some in to contact with this "
src.text += "organisation."
src.text += " However, if this information is acted on without substantial evidence, those responsible will face severe repercussions."
+ */
/datum/intercept_text/proc/build_wizard(datum/mind/correct_person)
@@ -211,7 +230,7 @@
src.text += "Known attributes include: Brown sandals, a large blue hat, a voluptous white beard, and an inclination to cast spells."
/datum/intercept_text/proc/build_nuke(datum/mind/correct_person)
- src.text += "
Cent. Com recently recieved a report of a plot to destory one of our stations in your area. We believe the Nuclear Authentication Disc "
+ src.text += "
Cent. Com recently recieved a report of a plot to destroy one of our stations in your area. We believe the Nuclear Authentication Disc "
src.text += "that is standard issue aboard your vessel may be a target. We recommend removal of this object, and it's storage in a safe "
src.text += "environment. As this may cause panic among the crew, all efforts should be made to keep this information a secret from all but "
src.text += "the most trusted crew-members."
@@ -226,6 +245,7 @@
var/cname = pick(src.changeling_names)
var/orgname1 = pick(src.org_names_1)
var/orgname2 = pick(src.org_names_2)
+ /*
var/changeling_name
var/changeling_job
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
@@ -245,9 +265,12 @@
changeling_name = src.pick_mob()
else
changeling_name = src.pick_mob()
+ */
src.text += "
We have received a report that a dangerous alien lifeform known only as \"[cname]\" may have infiltrated your crew. "
+ /*
src.text += "Our intelligence suggests a [prob_right_job]% chance that a [changeling_job] on board your station has been replaced by the alien. "
src.text += "Additionally, the report indicates a [prob_right_dude]% chance that [changeling_name] may have been in contact with the lifeform at a recent social gathering. "
+ */
src.text += "These lifeforms are assosciated with the [orgname1] [orgname2] and may be attempting to acquire sensitive materials on their behalf. "
- src.text += "Please take care not to alarm the crew, as [cname] may take advantage of a panic situation."
+ src.text += "Please take care not to alarm the crew, as [cname] may take advantage of a panic situation. Remember, they can be anybody, suspect everybody!"
diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm
index 34545842ccf..1fb1aff61a8 100644
--- a/code/game/gamemodes/malfunction/malfunction.dm
+++ b/code/game/gamemodes/malfunction/malfunction.dm
@@ -4,7 +4,8 @@
/datum/game_mode/malfunction
name = "AI malfunction"
config_tag = "malfunction"
- required_players = 20
+ required_players = 2
+ required_players_secret = 15
required_enemies = 1
recommended_enemies = 1
@@ -65,6 +66,8 @@
if(alert(AI_mind.current,"Do you want to use an alternative sprite for your real core?",,"Yes","No")=="Yes")
AI_mind.current.icon_state = "ai-malf2"
*/
+ if(emergency_shuttle)
+ emergency_shuttle.always_fake_recall = 1
spawn (rand(waittime_l, waittime_h))
send_intercept()
..()
@@ -131,7 +134,12 @@
if (station_captured && !to_nuke_or_not_to_nuke)
return 1
if (is_malf_ai_dead())
- return 1
+ if(config.continous_rounds)
+ if(emergency_shuttle)
+ emergency_shuttle.always_fake_recall = 0
+ malf_mode_declared = 0
+ else
+ return 1
return ..() //check for shuttle and nuke
@@ -165,7 +173,9 @@
ticker.mode:malf_mode_declared = 1
for(var/datum/mind/AI_mind in ticker.mode:malf_ai)
AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/takeover
- world << sound('sound/AI/aimalf.ogg')
+ for(var/mob/M in player_list)
+ if(!istype(M,/mob/new_player))
+ M << sound('sound/AI/aimalf.ogg')
/datum/game_mode/malfunction/proc/ai_win()
diff --git a/code/game/gamemodes/meme/meme.dm b/code/game/gamemodes/meme/meme.dm
index 30bb4e1d43f..0f9bb44babe 100644
--- a/code/game/gamemodes/meme/meme.dm
+++ b/code/game/gamemodes/meme/meme.dm
@@ -5,7 +5,8 @@
/datum/game_mode/meme
name = "Memetic Anomaly"
config_tag = "meme"
- required_players = 6
+ required_players = 3
+ required_players_secret = 10
restricted_jobs = list("AI", "Cyborg")
recommended_enemies = 2 // need at least a meme and a host
votable = 0 // temporarily disable this mode for voting
diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm
index 0aa28f8cf0d..c3720275ee2 100644
--- a/code/game/gamemodes/meteor/meteors.dm
+++ b/code/game/gamemodes/meteor/meteors.dm
@@ -114,7 +114,7 @@
//Prevent meteors from blowing up the singularity's containment.
//Changing emitter and generator ex_act would result in them being bomb and C4 proof.
- if(!istype(A,/obj/machinery/emitter) && \
+ if(!istype(A,/obj/machinery/power/emitter) && \
!istype(A,/obj/machinery/field_generator) && \
prob(15))
@@ -141,7 +141,7 @@
spawn(0)
//Prevent meteors from blowing up the singularity's containment.
//Changing emitter and generator ex_act would result in them being bomb and C4 proof
- if(!istype(A,/obj/machinery/emitter) && \
+ if(!istype(A,/obj/machinery/power/emitter) && \
!istype(A,/obj/machinery/field_generator))
if(--src.hits <= 0)
del(src) //Dont blow up singularity containment if we get stuck there.
diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm
index 71f41ca1279..efa216c2ee1 100644
--- a/code/game/gamemodes/nuclear/nuclear.dm
+++ b/code/game/gamemodes/nuclear/nuclear.dm
@@ -5,7 +5,8 @@
/datum/game_mode/nuclear
name = "nuclear emergency"
config_tag = "nuclear"
- required_players = 20 // 20 players - 5 players to be the nuke ops = 15 players remaining
+ required_players = 6
+ required_players_secret = 15 // 15 players - 5 players to be the nuke ops = 10 players remaining
required_enemies = 5
recommended_enemies = 5
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index d9bfca2b0e2..a8d629f2fd8 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -295,7 +295,7 @@ datum/objective/hijack
datum/objective/block
- explanation_text = "Do not allow any humans to escape on the shuttle alive."
+ explanation_text = "Do not allow any organic lifeforms to escape on the shuttle alive."
check_completion()
@@ -474,16 +474,26 @@ datum/objective/steal
"a hand teleporter" = /obj/item/weapon/hand_tele,
"an RCD" = /obj/item/weapon/rcd,
"a jetpack" = /obj/item/weapon/tank/jetpack,
- "a captains jumpsuit" = /obj/item/clothing/under/rank/captain,
+ "a captain's jumpsuit" = /obj/item/clothing/under/rank/captain,
"a functional AI" = /obj/item/device/aicard,
"a pair of magboots" = /obj/item/clothing/shoes/magboots,
"the station blueprints" = /obj/item/blueprints,
"a nasa voidsuit" = /obj/item/clothing/suit/space/nasavoid,
"28 moles of plasma (full tank)" = /obj/item/weapon/tank,
+ "a sample of slime extract" = /obj/item/slime_extract,
+ "a piece of corgi meat" = /obj/item/weapon/reagent_containers/food/snacks/meat/corgi,
+ "a research director's jumpsuit" = /obj/item/clothing/under/rank/research_director,
+ "a chief engineer's jumpsuit" = /obj/item/clothing/under/rank/chief_engineer,
+ "a chief medical officer's jumpsuit" = /obj/item/clothing/under/rank/chief_medical_officer,
+ "a head of security's jumpsuit" = /obj/item/clothing/under/rank/head_of_security,
+ "a head of personnel's jumpsuit" = /obj/item/clothing/under/rank/head_of_personnel,
+ "the hypospray" = /obj/item/weapon/reagent_containers/hypospray,
+ "the captain's pinpointer" = /obj/item/weapon/pinpointer,
+ "an ablative armor vest" = /obj/item/clothing/suit/armor/laserproof,
)
var/global/possible_items_special[] = list(
- "nuclear authentication disk" = /obj/item/weapon/disk/nuclear,
+ /*"nuclear authentication disk" = /obj/item/weapon/disk/nuclear,*///Broken with the change to nuke disk making it respawn on z level change.
"nuclear gun" = /obj/item/weapon/gun/energy/gun/nuclear,
"diamond drill" = /obj/item/weapon/pickaxe/diamonddrill,
"bag of holding" = /obj/item/weapon/storage/backpack/holding,
diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm
index a210d856cde..e94baa3ede0 100644
--- a/code/game/gamemodes/revolution/revolution.dm
+++ b/code/game/gamemodes/revolution/revolution.dm
@@ -15,7 +15,8 @@
name = "revolution"
config_tag = "revolution"
restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
- required_players = 20
+ required_players = 4
+ required_players_secret = 15
required_enemies = 3
recommended_enemies = 3
@@ -89,6 +90,8 @@
for(var/datum/mind/rev_mind in head_revolutionaries)
greet_revolutionary(rev_mind)
modePlayer += head_revolutionaries
+ if(emergency_shuttle)
+ emergency_shuttle.always_fake_recall = 1
spawn (rand(waittime_l, waittime_h))
send_intercept()
..()
@@ -165,6 +168,11 @@
//Checks if the round is over//
///////////////////////////////
/datum/game_mode/revolution/check_finished()
+ if(config.continous_rounds)
+ if(finished != 0)
+ if(emergency_shuttle)
+ emergency_shuttle.always_fake_recall = 0
+ return ..()
if(finished != 0)
return 1
else
diff --git a/code/game/gamemodes/revolution/rp_revolution.dm b/code/game/gamemodes/revolution/rp_revolution.dm
index 893d68749f7..296792808d1 100644
--- a/code/game/gamemodes/revolution/rp_revolution.dm
+++ b/code/game/gamemodes/revolution/rp_revolution.dm
@@ -3,7 +3,8 @@
/datum/game_mode/revolution/rp_revolution
name = "rp-revolution"
config_tag = "rp-revolution"
- required_players = 12
+ required_players = 4
+ required_players_secret = 12
required_enemies = 3
recommended_enemies = 3
diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm
index 64e418f0ee0..439befdc63a 100644
--- a/code/game/gamemodes/sandbox/h_sandbox.dm
+++ b/code/game/gamemodes/sandbox/h_sandbox.dm
@@ -144,8 +144,6 @@ datum/hSB
continue
if(istype(O, /obj/item/weapon/melee/energy/sword))
continue
- if(istype(O, /obj/effect/critter))
- continue
if(istype(O, /obj/structure))
continue
selectable += O
diff --git a/code/game/gamemodes/sandbox/sandbox.dm b/code/game/gamemodes/sandbox/sandbox.dm
index 3bace4756ed..475c3d22aa5 100644
--- a/code/game/gamemodes/sandbox/sandbox.dm
+++ b/code/game/gamemodes/sandbox/sandbox.dm
@@ -15,5 +15,7 @@
M.CanBuild()
return 1
-/datum/game_mode/sandbox/check_finished()
- return 0
+/datum/game_mode/sandbox/post_setup()
+ ..()
+ if(emergency_shuttle)
+ emergency_shuttle.always_fake_recall = 1
diff --git a/code/game/gamemodes/traitor/traitor_info.dm b/code/game/gamemodes/traitor/traitor_info.dm
deleted file mode 100644
index d3d4b1a47d4..00000000000
--- a/code/game/gamemodes/traitor/traitor_info.dm
+++ /dev/null
@@ -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()
\ No newline at end of file
diff --git a/code/game/gamemodes/wizard/rightandwrong.dm b/code/game/gamemodes/wizard/rightandwrong.dm
index e07bc1998eb..23a04161120 100644
--- a/code/game/gamemodes/wizard/rightandwrong.dm
+++ b/code/game/gamemodes/wizard/rightandwrong.dm
@@ -17,7 +17,7 @@
for(var/datum/objective/OBJ in H.mind.objectives)
H << "Objective #[obj_count]: [OBJ.explanation_text]"
obj_count++
- var/randomize = pick("taser","egun","laser","revolver","smg","nuclear","deagle","gyrojet","pulse","silenced","cannon","shotgun","mateba","uzi","crossbow","saw")
+ var/randomize = pick("taser","egun","laser","revolver","detective","smg","nuclear","deagle","gyrojet","pulse","silenced","cannon","doublebarrel","shotgun","combatshotgun","mateba","smg","uzi","crossbow","saw")
switch (randomize)
if("taser")
new /obj/item/weapon/gun/energy/taser(get_turf(H))
@@ -27,6 +27,8 @@
new /obj/item/weapon/gun/energy/laser(get_turf(H))
if("revolver")
new /obj/item/weapon/gun/projectile(get_turf(H))
+ if("detective")
+ new /obj/item/weapon/gun/projectile/detective(get_turf(H))
if("smg")
new /obj/item/weapon/gun/projectile/automatic/c20r(get_turf(H))
if("nuclear")
@@ -38,13 +40,20 @@
if("pulse")
new /obj/item/weapon/gun/energy/pulse_rifle(get_turf(H))
if("silenced")
- new /obj/item/weapon/gun/projectile/silenced(get_turf(H))
+ new /obj/item/weapon/gun/projectile/pistol(get_turf(H))
+ new /obj/item/weapon/silencer(get_turf(H))
if("cannon")
new /obj/item/weapon/gun/energy/lasercannon(get_turf(H))
+ if("doublebarrel")
+ new /obj/item/weapon/gun/projectile/shotgun/pump/(get_turf(H))
if("shotgun")
+ new /obj/item/weapon/gun/projectile/shotgun/pump/(get_turf(H))
+ if("combatshotgun")
new /obj/item/weapon/gun/projectile/shotgun/pump/combat(get_turf(H))
if("mateba")
new /obj/item/weapon/gun/projectile/mateba(get_turf(H))
+ if("smg")
+ new /obj/item/weapon/gun/projectile/automatic(get_turf(H))
if("uzi")
new /obj/item/weapon/gun/projectile/automatic/mini_uzi(get_turf(H))
if("crossbow")
diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm
index 474aa85eff5..f1ad3a10f8c 100644
--- a/code/game/gamemodes/wizard/spellbook.dm
+++ b/code/game/gamemodes/wizard/spellbook.dm
@@ -1,160 +1,189 @@
+/obj/item/weapon/spellbook
+ name = "spell book"
+ desc = "The legendary book of spells of the wizard."
+ icon = 'icons/obj/library.dmi'
+ icon_state ="book"
+ throw_speed = 1
+ throw_range = 5
+ w_class = 1.0
+ flags = FPRINT | TABLEPASS
+ var/uses = 5
+ var/temp = null
+ var/max_uses = 5
+ var/op = 1
-//SPELL BOOK PROCS
/obj/item/weapon/spellbook/attack_self(mob/user as mob)
user.set_machine(src)
var/dat
- if (src.temp)
- dat = "[src.temp]
"}
else
- sensor_data = "No scrubbers connected. "
- output = {"Main menu [sensor_data]"}
-
- if (AALARM_SCREEN_MODE)
- output += "Main menu Air machinery mode for the area:
"
+ logs += log
+ logs = sortList(logs)
+ for(var/log in logs)
+ t += log
+ t += "
"
+ t += ""
+ user << browse(t, "window=crewcomp;size=900x600")
+ onclose(user, "crewcomp")
- proc/scan()
- for(var/obj/item/clothing/under/C in world)
- if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human)))
- var/check = 0
- for(var/O in src.tracked)
- if(O == C)
- check = 1
- break
- if(!check)
- src.tracked.Add(C)
- return 1
\ No newline at end of file
+/obj/machinery/computer/crew/proc/scan()
+ for(var/obj/item/clothing/under/C in world)
+ if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human)))
+ var/check = 0
+ for(var/O in src.tracked)
+ if(O == C)
+ check = 1
+ break
+ if(!check)
+ src.tracked.Add(C)
+ return 1
\ No newline at end of file
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index 3f7af0a0758..d3e7e4c178c 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -309,7 +309,7 @@
if("watch")
src.active1.fields["m_stat"] = "*Watch*"
if("stable")
- src.active2.fields["m_stat"] = "Stable"
+ src.active1.fields["m_stat"] = "Stable"
if (href_list["b_type"])
@@ -442,6 +442,34 @@
src.updateUsrDialog()
return
+/obj/machinery/computer/med_data/emp_act(severity)
+ if(stat & (BROKEN|NOPOWER))
+ ..(severity)
+ return
+
+ for(var/datum/data/record/R in data_core.medical)
+ if(prob(10/severity))
+ switch(rand(1,6))
+ if(1)
+ R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]"
+ if(2)
+ R.fields["sex"] = pick("Male", "Female")
+ if(3)
+ R.fields["age"] = rand(5, 85)
+ if(4)
+ R.fields["b_type"] = pick("A-", "B-", "AB-", "O-", "A+", "B+", "AB+", "O+")
+ if(5)
+ R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit")
+ if(6)
+ R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable")
+ continue
+
+ else if(prob(1))
+ del(R)
+ continue
+
+ ..(severity)
+
/obj/machinery/computer/med_data/laptop
name = "Medical Laptop"
diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm
index f4a07ca6812..ed164896369 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -65,7 +65,7 @@
..()
return
-/obj/machinery/computer/message_monitor/power_change()
+/obj/machinery/computer/message_monitor/update_icon()
..()
if(stat & (NOPOWER|BROKEN))
return
@@ -74,7 +74,7 @@
else
icon_state = normal_icon
-/obj/machinery/computer/message_monitor/process()
+/obj/machinery/computer/message_monitor/initialize()
//Is the server isn't linked to a server, and there's a server available, default it to the first one in the list.
if(!linkedServer)
if(message_servers && message_servers.len > 0)
@@ -405,7 +405,7 @@
//Get out list of viable PDAs
var/list/obj/item/device/pda/sendPDAs = list()
for(var/obj/item/device/pda/P in PDAs)
- if(!P.owner || P.toff) continue
+ if(!P.owner || P.toff || P.hidden) continue
sendPDAs += P
if(PDAs && PDAs.len > 0)
customrecepient = input(usr, "Select a PDA from the list.") as null|anything in sortAtom(sendPDAs)
@@ -437,7 +437,7 @@
var/obj/item/device/pda/PDARec = null
for (var/obj/item/device/pda/P in PDAs)
- if (!P.owner||P.toff) continue
+ if (!P.owner || P.toff || P.hidden) continue
if(P.owner == customsender)
PDARec = P
//Sender isn't faking as someone who exists
@@ -452,7 +452,7 @@
var/mob/living/carbon/human/H = customrecepient.loc
H << "\icon[customrecepient] Message from [customsender] ([customjob]), \"[custommessage]\" (Reply)"
log_pda("[usr] (PDA: [customsender]) sent \"[custommessage]\" to [customrecepient.owner]")
- customrecepient.overlays = null
+ customrecepient.overlays.Cut()
customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r")
//Sender is faking as someone who exists
else
@@ -466,7 +466,7 @@
var/mob/living/carbon/human/H = customrecepient.loc
H << "\icon[customrecepient] Message from [PDARec.owner] ([customjob]), \"[custommessage]\" (Reply)"
log_pda("[usr] (PDA: [PDARec.owner]) sent \"[custommessage]\" to [customrecepient.owner]")
- customrecepient.overlays = null
+ customrecepient.overlays.Cut()
customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r")
//Finally..
ResetMessage()
@@ -499,7 +499,7 @@
for(var/obj/machinery/message_server/server in message_servers)
if(!isnull(server))
if(!isnull(server.decryptkey))
- info = "
Daily Key Reset
The new message monitor key is '[server.decryptkey]'. Please keep this a secret. If necessary, change the password to a more secure one."
+ info = "
Daily Key Reset
The new message monitor key is '[server.decryptkey]'. Please keep this a secret and away from the clown. If necessary, change the password to a more secure one."
info_links = info
overlays += "paper_words"
break
diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm
index e557cbc212d..0a5696ee4ce 100644
--- a/code/game/machinery/computer/pod.dm
+++ b/code/game/machinery/computer/pod.dm
@@ -146,7 +146,8 @@
/obj/machinery/computer/pod/process()
- ..()
+ if(!..())
+ return
if(timing)
if(time > 0)
time = round(time) - 1
@@ -199,8 +200,14 @@
name = "ProComp Executive IIc"
desc = "The Syndicate operate on a tight budget. Operates external airlocks."
title = "External Airlock Controls"
+ req_access = list(access_syndicate)
-
+/obj/machinery/computer/pod/old/syndicate/attack_hand(var/mob/user as mob)
+ if(!allowed(user))
+ user << "\red Access Denied"
+ return
+ else
+ ..()
/obj/machinery/computer/pod/old/swf
name = "Magix System IV"
diff --git a/code/game/machinery/computer/power.dm b/code/game/machinery/computer/power.dm
index ce441f00d0b..b3b017565c4 100644
--- a/code/game/machinery/computer/power.dm
+++ b/code/game/machinery/computer/power.dm
@@ -126,10 +126,6 @@
return
-/obj/machinery/power/monitor/process()
- if(!(stat & (NOPOWER|BROKEN)) )
- use_power(250)
-
/obj/machinery/power/monitor/power_change()
if(stat & BROKEN)
diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm
index c4251f71452..ca0512e2cbd 100644
--- a/code/game/machinery/computer/prisoner.dm
+++ b/code/game/machinery/computer/prisoner.dm
@@ -65,10 +65,8 @@
process()
- if(stat & (NOPOWER|BROKEN))
- return
- use_power(500)
- src.updateDialog()
+ if(!..())
+ src.updateDialog()
return
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index 318f4fd7fa2..deb6e9e8c88 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -549,6 +549,34 @@ What a mess.*/
updateUsrDialog()
return
+/obj/machinery/computer/secure_data/emp_act(severity)
+ if(stat & (BROKEN|NOPOWER))
+ ..(severity)
+ return
+
+ for(var/datum/data/record/R in data_core.security)
+ if(prob(10/severity))
+ switch(rand(1,6))
+ if(1)
+ R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]"
+ if(2)
+ R.fields["sex"] = pick("Male", "Female")
+ if(3)
+ R.fields["age"] = rand(5, 85)
+ if(4)
+ R.fields["criminal"] = pick("None", "*Arrest*", "Incarcerated", "Parolled", "Released")
+ if(5)
+ R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit")
+ if(6)
+ R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable")
+ continue
+
+ else if(prob(1))
+ del(R)
+ continue
+
+ ..(severity)
+
/obj/machinery/computer/secure_data/detective_computer
icon = 'icons/obj/computer.dmi'
icon_state = "messyfiles"
diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm
index 23c1c3b4a2c..978db653f94 100644
--- a/code/game/machinery/computer/shuttle.dm
+++ b/code/game/machinery/computer/shuttle.dm
@@ -52,7 +52,7 @@
world << text("\blue Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len)
if("Abort")
- world << "\blue All authorizations to shorting time for shuttle launch have been revoked!"
+ world << "\blue All authorizations to shortening time for shuttle launch have been revoked!"
src.authorized.len = 0
src.authorized = list( )
diff --git a/code/game/machinery/computer/syndicate_shuttle.dm b/code/game/machinery/computer/syndicate_shuttle.dm
index a421d2c21a6..681fc65fe97 100644
--- a/code/game/machinery/computer/syndicate_shuttle.dm
+++ b/code/game/machinery/computer/syndicate_shuttle.dm
@@ -5,7 +5,7 @@
name = "syndicate shuttle terminal"
icon = 'icons/obj/computer.dmi'
icon_state = "syndishuttle"
- req_access = list()
+ req_access = list(access_syndicate)
var/area/curr_location
var/moving = 0
var/lastMove = 0
@@ -47,7 +47,7 @@
/obj/machinery/computer/syndicate_station/attack_hand(mob/user as mob)
if(!allowed(user))
- user << "Access Denied."
+ user << "\red Access Denied"
return
user.set_machine(src)
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index 7790526dd77..b9b4fe0a04e 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -35,18 +35,17 @@
switch(state)
if(1)
if(istype(P, /obj/item/weapon/cable_coil))
- if(P:amount >= 5)
+ var/obj/item/weapon/cable_coil/C = P
+ if(C.amount >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "\blue You start to add cables to the frame."
if(do_after(user, 20))
- if(!P)
- user << "\blue You realize the cable coil no longer exist."
- return;
- P:amount -= 5
- if(!P:amount) del(P)
- user << "\blue You add cables to the frame."
- state = 2
- icon_state = "box_1"
+ if(C)
+ C.amount -= 5
+ if(!C.amount) del(C)
+ user << "\blue You add cables to the frame."
+ state = 2
+ icon_state = "box_1"
else
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index 6669ad5137a..1a78d4be758 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -4,7 +4,7 @@
icon_state = "cell-off"
density = 1
anchored = 1.0
- layer = 5
+ layer = 2.8
var/on = 0
var/temperature_archived
@@ -100,8 +100,10 @@
on = !on
update_icon()
if(href_list["eject"])
- beaker:loc = loc
- beaker = null
+ if (beaker)
+ var/obj/item/weapon/reagent_containers/glass/B = beaker
+ B.loc = get_step(loc, SOUTH)
+ beaker = null
updateUsrDialog()
add_fingerprint(usr)
@@ -120,9 +122,9 @@
else if(istype(G, /obj/item/weapon/grab))
if(!ismob(G:affecting))
return
- for(var/mob/living/carbon/metroid/M in range(1,G:affecting))
+ for(var/mob/living/carbon/slime/M in range(1,G:affecting))
if(M.Victim == G:affecting)
- usr << "[G:affecting:name] will not fit into the cryo because they have a Metroid latched onto their head."
+ usr << "[G:affecting:name] will not fit into the cryo because they have a slime latched onto their head."
return
var/mob/M = G:affecting
if(put_mob(M))
@@ -253,7 +255,7 @@
set name = "Move Inside"
set category = "Object"
set src in oview(1)
- for(var/mob/living/carbon/metroid/M in range(1,usr))
+ for(var/mob/living/carbon/slime/M in range(1,usr))
if(M.Victim == usr)
usr << "You're too busy getting your life sucked out of you."
return
diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm
index 171608be173..70010a74d5d 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -229,6 +229,13 @@ for reference:
if (src.health <= 0)
src.explode()
return
+ emp_act(severity)
+ if(stat & (BROKEN|NOPOWER))
+ return
+ if(prob(50/severity))
+ locked = !locked
+ anchored = !anchored
+ icon_state = "barrier[src.locked]"
meteorhit()
src.explode()
diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm
index 6dfa0da691c..c4e9fd0230d 100644
--- a/code/game/machinery/door_control.dm
+++ b/code/game/machinery/door_control.dm
@@ -1,3 +1,36 @@
+/obj/machinery/door_control
+ name = "remote door-control"
+ desc = "It controls doors, remotely."
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "doorctrl0"
+ desc = "A remote control-switch for a door."
+ power_channel = ENVIRON
+ var/id = null
+ var/range = 10
+ var/normaldoorcontrol = 0
+ var/desiredstate = 0 // Zero is closed, 1 is open.
+ var/specialfunctions = 1
+ /*
+ Bitflag, 1= open
+ 2= idscan,
+ 4= bolts
+ 8= shock
+ 16= door safties
+
+ */
+
+ var/exposedwires = 0
+ var/wires = 3
+ /*
+ Bitflag, 1=checkID
+ 2=Network Access
+ */
+
+ anchored = 1.0
+ use_power = 1
+ idle_power_usage = 2
+ active_power_usage = 4
+
/obj/machinery/door_control/attack_ai(mob/user as mob)
if(wires & 2)
return src.attack_hand(user)
@@ -24,6 +57,10 @@
*/
if(istype(W, /obj/item/device/detective_scanner))
return
+ if(istype(W, /obj/item/weapon/card/emag))
+ req_access = list()
+ req_one_access = list()
+ playsound(src.loc, "sparks", 100, 1)
return src.attack_hand(user)
/obj/machinery/door_control/attack_hand(mob/user as mob)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index f6592af5225..5d6aa3823ff 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -216,6 +216,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
opacity = 0
doortype = 21
glass = 1
+ heat_proof = 1
/obj/machinery/door/airlock/glass_mining
name = "Maintenance Hatch"
@@ -631,7 +632,7 @@ About the new airlock wires panel:
/obj/machinery/door/airlock/update_icon()
- if(overlays) overlays = null
+ if(overlays) overlays.Cut()
if(density)
if(locked && lights)
icon_state = "door_locked"
@@ -651,14 +652,14 @@ About the new airlock wires panel:
/obj/machinery/door/airlock/animate(animation)
switch(animation)
if("opening")
- if(overlays) overlays = null
+ if(overlays) overlays.Cut()
if(p_open)
spawn(2) // The only work around that works. Downside is that the door will be gone for a millisecond.
flick("o_door_opening", src) //can not use flick due to BYOND bug updating overlays right before flicking
else
flick("door_opening", src)
if("closing")
- if(overlays) overlays = null
+ if(overlays) overlays.Cut()
if(p_open)
flick("o_door_closing", src)
else
@@ -825,7 +826,8 @@ About the new airlock wires panel:
sleep(10)
//bring up airlock dialog
src.aiHacking = 0
- src.attack_ai(user)
+ if (user)
+ src.attack_ai(user)
/obj/machinery/door/airlock/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if (src.isElectrified())
diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm
index 6a57e7cc5ed..2310e85c07c 100644
--- a/code/game/machinery/doors/airlock_electronics.dm
+++ b/code/game/machinery/doors/airlock_electronics.dm
@@ -1,7 +1,7 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/obj/item/weapon/airlock_electronics
- name = "Airlock Electronics"
+ name = "airlock electronics"
icon = 'icons/obj/doors/door_assembly.dmi'
icon_state = "door_electronics"
w_class = 2.0 //It should be tiny! -Agouri
diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm
index 6e95c932ef7..4d634d45895 100644
--- a/code/game/machinery/doors/brigdoors.dm
+++ b/code/game/machinery/doors/brigdoors.dm
@@ -219,7 +219,7 @@
// Adds an icon in case the screen is broken/off, stolen from status_display.dm
proc/set_picture(var/state)
picture_state = state
- overlays = null
+ overlays.Cut()
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
@@ -227,10 +227,10 @@
// Stolen from status_display
proc/update_display(var/line1, var/line2)
if(line2 == null) // single line display
- overlays = null
+ overlays.Cut()
overlays += texticon(line1, 23, -13)
else // dual line display
- overlays = null
+ overlays.Cut()
overlays += texticon(line1, 23, -9)
overlays += texticon(line2, 23, -17)
// return an icon of a time text string (tn)
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index c8ad53eb191..9405732d940 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -17,288 +17,248 @@
var/autoclose = 0
var/glass = 0
var/normalspeed = 1
+ var/heat_proof = 0 // For glass airlocks/opacity firedoors
- proc/bumpopen(mob/user as mob)
- proc/update_nearby_tiles(need_rebuild)
- proc/requiresID() return 1
- proc/animate(animation)
- proc/open()
- proc/close()
+/obj/machinery/door/New()
+ ..()
+ if(density)
+ layer = 3.1 //Above most items if closed
+ explosion_resistance = initial(explosion_resistance)
+ update_heat_protection(get_turf(src))
+ else
+ layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6
+ explosion_resistance = 0
+ update_nearby_tiles(need_rebuild=1)
+ return
- New()
- ..()
- if(density)
- layer = 3.1 //Above most items if closed
- explosion_resistance = initial(explosion_resistance)
- if(opacity)
- var/turf/T = get_turf(src)
- T.thermal_conductivity = DOOR_HEAT_TRANSFER_COEFFICIENT
- else
- layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6
- explosion_resistance = 0
- update_nearby_tiles(need_rebuild=1)
+
+/obj/machinery/door/Del()
+ density = 0
+ update_nearby_tiles()
+ ..()
+ return
+
+//process()
+ //return
+
+/obj/machinery/door/Bumped(atom/AM)
+ if(p_open || operating) return
+ if(ismob(AM))
+ var/mob/M = AM
+ if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent shock spam.
+ M.last_bumped = world.time
+ if(!M.restrained())
+ bumpopen(M)
return
-
- Del()
- density = 0
- update_nearby_tiles()
- ..()
- return
-
- //process()
- //return
-
- Bumped(atom/AM)
- if(p_open || operating) return
- if(ismob(AM))
- var/mob/M = AM
- if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent shock spam.
- M.last_bumped = world.time
- if(!M.restrained())
- bumpopen(M)
- return
-
- if(istype(AM, /obj/machinery/bot))
- var/obj/machinery/bot/bot = AM
- if(src.check_access(bot.botcard))
- if(density)
- open()
- return
-
- if(istype(AM, /obj/effect/critter))
- var/obj/effect/critter/critter = AM
- if(critter.opensdoors) return
- if(src.check_access_list(critter.access_list))
- if(density)
- open()
- return
-
- if(istype(AM, /obj/mecha))
- var/obj/mecha/mecha = AM
+ if(istype(AM, /obj/machinery/bot))
+ var/obj/machinery/bot/bot = AM
+ if(src.check_access(bot.botcard))
if(density)
- if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
- open()
- else
- flick("door_deny", src)
- return
+ open()
return
-
- CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
- if(air_group) return 0
- if(istype(mover) && mover.checkpass(PASSGLASS))
- return !opacity
- return !density
-
-
- bumpopen(mob/user as mob)
- if(operating) return
- src.add_fingerprint(user)
- if(!src.requiresID())
- user = null
-
+ if(istype(AM, /obj/mecha))
+ var/obj/mecha/mecha = AM
if(density)
- if(allowed(user)) open()
- else flick("door_deny", src)
- return
-
- meteorhit(obj/M as obj)
- src.open()
- return
-
-
- attack_ai(mob/user as mob)
- return src.attack_hand(user)
-
-
- attack_paw(mob/user as mob)
- return src.attack_hand(user)
-
-
- attack_hand(mob/user as mob)
- return src.attackby(user, user)
-
-
- attackby(obj/item/I as obj, mob/user as mob)
- if(istype(I, /obj/item/device/detective_scanner))
- return
- if(src.operating || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
- src.add_fingerprint(user)
- if(!src.requiresID())
- user = null
- if(src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade)))
- flick("door_spark", src)
- sleep(6)
- open()
- operating = -1
- return 1
- if(src.allowed(user))
- if(src.density)
+ if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
open()
else
- close()
- return
- if(src.density)
- flick("door_deny", src)
- return
-
-
- blob_act()
- if(prob(40))
- del(src)
- return
-
-
- emp_act(severity)
- if(prob(20/severity) && (istype(src,/obj/machinery/door/airlock) || istype(src,/obj/machinery/door/window)) )
- open()
- if(prob(40/severity))
- if(secondsElectrified == 0)
- secondsElectrified = -1
- spawn(300)
- secondsElectrified = 0
- ..()
-
-
- ex_act(severity)
- switch(severity)
- if(1.0)
- del(src)
- if(2.0)
- if(prob(25))
- del(src)
- if(3.0)
- if(prob(80))
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(2, 1, src)
- s.start()
- return
-
-
- update_icon()
- if(density)
- icon_state = "door1"
- else
- icon_state = "door0"
- return
-
-
- animate(animation)
- switch(animation)
- if("opening")
- if(p_open)
- flick("o_doorc0", src)
- else
- flick("doorc0", src)
- if("closing")
- if(p_open)
- flick("o_doorc1", src)
- else
- flick("doorc1", src)
- if("deny")
flick("door_deny", src)
return
+ return
- open()
- if(!density) return 1
- if(operating > 0) return
- if(!ticker) return 0
- if(!operating) operating = 1
-
- animate("opening")
- icon_state = "door0"
- src.SetOpacity(0)
- sleep(10)
- src.layer = 2.7
- src.density = 0
- explosion_resistance = 0
- update_icon()
- SetOpacity(0)
- update_nearby_tiles()
-
- if(operating) operating = 0
-
- if(autoclose && normalspeed)
- spawn(150)
- autoclose()
- if(autoclose && !normalspeed)
- spawn(5)
- autoclose()
-
- return 1
+/obj/machinery/door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
+ if(air_group) return 0
+ if(istype(mover) && mover.checkpass(PASSGLASS))
+ return !opacity
+ return !density
- close()
- if(density) return 1
- if(operating) return
- operating = 1
+/obj/machinery/door/proc/bumpopen(mob/user as mob)
+ if(operating) return
+ src.add_fingerprint(user)
+ if(!src.requiresID())
+ user = null
- animate("closing")
- src.density = 1
- explosion_resistance = initial(explosion_resistance)
- src.layer = 3.1
- sleep(10)
- update_icon()
- if(visible && !glass)
- SetOpacity(1) //caaaaarn!
- operating = 0
- update_nearby_tiles()
+ if(density)
+ if(allowed(user)) open()
+ else flick("door_deny", src)
+ return
+
+/obj/machinery/door/meteorhit(obj/M as obj)
+ src.open()
+ return
+
+
+/obj/machinery/door/attack_ai(mob/user as mob)
+ return src.attack_hand(user)
+
+
+/obj/machinery/door/attack_paw(mob/user as mob)
+ return src.attack_hand(user)
+
+
+/obj/machinery/door/attack_hand(mob/user as mob)
+ return src.attackby(user, user)
+
+
+/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob)
+ if(istype(I, /obj/item/device/detective_scanner))
return
+ if(src.operating || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
+ src.add_fingerprint(user)
+ if(!src.requiresID())
+ user = null
+ if(src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade)))
+ flick("door_spark", src)
+ sleep(6)
+ open()
+ operating = -1
+ return 1
+ if(src.allowed(user))
+ if(src.density)
+ open()
+ else
+ close()
+ return
+ if(src.density)
+ flick("door_deny", src)
+ return
- update_nearby_tiles(need_rebuild)
- if(!air_master) return 0
+/obj/machinery/door/blob_act()
+ if(prob(40))
+ del(src)
+ return
- var/turf/simulated/source = loc
- var/turf/simulated/north = get_step(source,NORTH)
- var/turf/simulated/south = get_step(source,SOUTH)
- var/turf/simulated/east = get_step(source,EAST)
- var/turf/simulated/west = get_step(source,WEST)
- if(src.density && src.opacity)
+/obj/machinery/door/emp_act(severity)
+ if(prob(20/severity) && (istype(src,/obj/machinery/door/airlock) || istype(src,/obj/machinery/door/window)) )
+ open()
+ if(prob(40/severity))
+ if(secondsElectrified == 0)
+ secondsElectrified = -1
+ spawn(300)
+ secondsElectrified = 0
+ ..()
+
+
+/obj/machinery/door/ex_act(severity)
+ switch(severity)
+ if(1.0)
+ del(src)
+ if(2.0)
+ if(prob(25))
+ del(src)
+ if(3.0)
+ if(prob(80))
+ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ s.set_up(2, 1, src)
+ s.start()
+ return
+
+
+/obj/machinery/door/update_icon()
+ if(density)
+ icon_state = "door1"
+ else
+ icon_state = "door0"
+ return
+
+
+/obj/machinery/door/proc/animate(animation)
+ switch(animation)
+ if("opening")
+ if(p_open)
+ flick("o_doorc0", src)
+ else
+ flick("doorc0", src)
+ if("closing")
+ if(p_open)
+ flick("o_doorc1", src)
+ else
+ flick("doorc1", src)
+ if("deny")
+ flick("door_deny", src)
+ return
+
+
+/obj/machinery/door/proc/open()
+ if(!density) return 1
+ if(operating > 0) return
+ if(!ticker) return 0
+ if(!operating) operating = 1
+
+ animate("opening")
+ icon_state = "door0"
+ src.SetOpacity(0)
+ sleep(10)
+ src.layer = 2.7
+ src.density = 0
+ explosion_resistance = 0
+ update_icon()
+ SetOpacity(0)
+ update_nearby_tiles()
+
+ if(operating) operating = 0
+
+ if(autoclose && normalspeed)
+ spawn(150)
+ autoclose()
+ if(autoclose && !normalspeed)
+ spawn(5)
+ autoclose()
+
+ return 1
+
+
+/obj/machinery/door/proc/close()
+ if(density) return 1
+ if(operating) return
+ operating = 1
+
+ animate("closing")
+ src.density = 1
+ explosion_resistance = initial(explosion_resistance)
+ src.layer = 3.1
+ sleep(10)
+ update_icon()
+ if(visible && !glass)
+ SetOpacity(1) //caaaaarn!
+ operating = 0
+ update_nearby_tiles()
+ return
+
+/obj/machinery/door/proc/requiresID()
+ return 1
+
+/obj/machinery/door/proc/update_nearby_tiles(need_rebuild)
+ if(!air_master) return 0
+
+ var/turf/simulated/source = loc
+ var/turf/simulated/north = get_step(source,NORTH)
+ var/turf/simulated/south = get_step(source,SOUTH)
+ var/turf/simulated/east = get_step(source,EAST)
+ var/turf/simulated/west = get_step(source,WEST)
+
+ update_heat_protection(loc)
+
+ if(istype(source)) air_master.tiles_to_update += source
+ if(istype(north)) air_master.tiles_to_update += north
+ if(istype(south)) air_master.tiles_to_update += south
+ if(istype(east)) air_master.tiles_to_update += east
+ if(istype(west)) air_master.tiles_to_update += west
+ return 1
+
+/obj/machinery/door/proc/update_heat_protection(var/turf/simulated/source)
+ if(istype(source))
+ if(src.density && (src.opacity || src.heat_proof))
source.thermal_conductivity = DOOR_HEAT_TRANSFER_COEFFICIENT
else
source.thermal_conductivity = initial(source.thermal_conductivity)
- //not sure what the equivalent in zas is
- /*if(need_rebuild)
- if(istype(source)) //Rebuild/update nearby group geometry
- if(source.parent)
- air_master.groups_to_rebuild += source.parent
- else
- air_master.tiles_to_update += source
- if(istype(north))
- if(north.parent)
- air_master.groups_to_rebuild += north.parent
- else
- air_master.tiles_to_update += north
- if(istype(south))
- if(south.parent)
- air_master.groups_to_rebuild += south.parent
- else
- air_master.tiles_to_update += south
- if(istype(east))
- if(east.parent)
- air_master.groups_to_rebuild += east.parent
- else
- air_master.tiles_to_update += east
- if(istype(west))
- if(west.parent)
- air_master.groups_to_rebuild += west.parent
- else
- air_master.tiles_to_update += west
- else*/
- if(istype(source)) air_master.tiles_to_update |= source
- if(istype(north)) air_master.tiles_to_update |= north
- if(istype(south)) air_master.tiles_to_update |= south
- if(istype(east)) air_master.tiles_to_update |= east
- if(istype(west)) air_master.tiles_to_update |= west
-
- return 1
-
-
/obj/machinery/door/proc/autoclose()
var/obj/machinery/door/airlock/A = src
if(!A.density && !A.operating && !A.locked && !A.welded && A.autoclose)
@@ -306,33 +266,4 @@
return
/obj/machinery/door/morgue
- icon = 'icons/obj/doors/doormorgue.dmi'
-
-/*
-/obj/machinery/door/airlock/proc/ion_act()
- if(src.z == 1 && src.density)
- if(length(req_access) > 0 && !(12 in req_access))
- if(prob(4))
- world << "\red Airlock emagged in [src.loc.loc]"
- src.operating = -1
- flick("door_spark", src)
- sleep(6)
- open()
- else
- if(prob(8))
- world << "\red non vital Airlock emagged in [src.loc.loc]"
- src.operating = -1
- flick("door_spark", src)
- sleep(6)
- open()
- return
-
-/obj/machinery/door/firedoor/proc/ion_act()
- if(src.z == 1)
- if(prob(15))
- if(density)
- open()
- else
- close()
- return
-*/
\ No newline at end of file
+ icon = 'icons/obj/doors/doormorgue.dmi'
\ No newline at end of file
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index b755f16d0a0..4f8c7ba8c4b 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -123,7 +123,7 @@
else
spawn(0)
close()
-
+ return
var/access_granted = 0
var/users_name
if(!istype(C, /obj)) //If someone hit it with their hand. We need to see if they are allowed.
@@ -209,7 +209,7 @@
update_icon()
- overlays = null
+ overlays.Cut()
if(density)
icon_state = "door_closed"
if(blocked)
@@ -221,4 +221,39 @@
return
-/obj/machinery/door/firedoor/border_only
\ No newline at end of file
+
+/obj/machinery/door/firedoor/border_only
+ icon = 'icons/obj/doors/edge_Doorfire.dmi'
+ glass = 1 //There is a glass window so you can see through the door
+ //This is needed due to BYOND limitations in controlling visibility
+ heat_proof = 1
+
+ CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
+ if(istype(mover) && mover.checkpass(PASSGLASS))
+ return 1
+ if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
+ if(air_group) return 0
+ return !density
+ else
+ return 1
+
+ CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
+ if(istype(mover) && mover.checkpass(PASSGLASS))
+ return 1
+ if(get_dir(loc, target) == dir)
+ return !density
+ else
+ return 1
+
+
+ update_nearby_tiles(need_rebuild)
+ if(!air_master) return 0
+
+ var/turf/simulated/source = loc
+ var/turf/simulated/destination = get_step(source,dir)
+
+ update_heat_protection(loc)
+
+ if(istype(source)) air_master.tiles_to_update += source
+ if(istype(destination)) air_master.tiles_to_update += destination
+ return 1
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 7905fc559d9..55aef446eaa 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -6,6 +6,7 @@
var/base_state = "left"
var/health = 150.0 //If you change this, consiter changing ../door/window/brigdoor/ health at the bottom of this .dm file
visible = 0.0
+ use_power = 0
flags = ON_BORDER
opacity = 0
var/obj/item/weapon/airlock_electronics/electronics = null
@@ -157,7 +158,7 @@
return src.attack_hand(user)
/obj/machinery/door/window/attack_paw(mob/user as mob)
- if(istype(user, /mob/living/carbon/alien/humanoid) || istype(user, /mob/living/carbon/metroid/adult))
+ if(istype(user, /mob/living/carbon/alien/humanoid) || istype(user, /mob/living/carbon/slime/adult))
if(src.operating)
return
src.health = max(0, src.health - 25)
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index ac2ec0da461..9de6b2c6aa8 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -88,6 +88,14 @@
O.eye_stat += rand(0, 2)
+/obj/machinery/flasher/emp_act(severity)
+ if(stat & (BROKEN|NOPOWER))
+ ..(severity)
+ return
+ if(prob(75/severity))
+ flash()
+ ..(severity)
+
/obj/machinery/flasher/portable/HasProximity(atom/movable/AM as mob|obj)
if ((src.disable) || (src.last_flash && world.time < src.last_flash + 150))
return
@@ -104,7 +112,7 @@
if (!src.anchored)
user.show_message(text("\red [src] can now be moved."))
- src.overlays = null
+ src.overlays.Cut()
else if (src.anchored)
user.show_message(text("\red [src] is now secured."))
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index 90b628d93e9..5442248986a 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -1,3 +1,10 @@
+/* Holograms!
+ * Contains:
+ * Holopad
+ * Hologram
+ * Other stuff
+ */
+
/*
Revised. Original based on space ninja hologram code. Which is also mine. /N
How it works:
@@ -12,11 +19,23 @@ Possible to do for anyone motivated enough:
Itegrate EMP effect to disable the unit.
*/
+
+/*
+ * Holopad
+ */
+
// HOLOPAD MODE
// 0 = RANGE BASED
// 1 = AREA BASED
var/const/HOLOPAD_MODE = 0
+/obj/machinery/hologram/holopad
+ name = "\improper AI holopad"
+ desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely."
+ icon_state = "holopad0"
+ var/mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time.
+ var/last_request = 0 //to prevent request spam. ~Carn
+ var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
if(!istype(user))
@@ -120,6 +139,17 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
return 1
+/*
+ * Hologram
+ */
+
+/obj/machinery/hologram
+ anchored = 1
+ use_power = 1
+ idle_power_usage = 5
+ active_power_usage = 100
+ var/obj/effect/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise.
+
/obj/machinery/hologram/power_change()
if (powered())
stat &= ~NOPOWER
@@ -171,4 +201,13 @@ Holographic project of everything else.
world << "Your icon should appear now."
return
-*/
\ No newline at end of file
+*/
+
+/*
+ * Other Stuff: Is this even used?
+ */
+/obj/machinery/hologram/projector
+ name = "hologram projector"
+ desc = "It makes a hologram appear...with magnets or something..."
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "hologram0"
\ No newline at end of file
diff --git a/code/game/machinery/hydroponics.dm b/code/game/machinery/hydroponics.dm
index d1a5a3ff6c0..8d023c29555 100644
--- a/code/game/machinery/hydroponics.dm
+++ b/code/game/machinery/hydroponics.dm
@@ -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
@@ -151,7 +153,7 @@ obj/machinery/hydroponics/process()
obj/machinery/hydroponics/proc/updateicon()
//Refreshes the icon and sets the luminosity
- overlays = null
+ overlays.Cut()
if(planted)
if(dead)
overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-dead")
@@ -712,6 +714,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
user.visible_message("\red [user] starts uprooting the weeds.", "\red You remove the weeds from the [src].")
weedlevel = 0
updateicon()
+ src.updateicon()
else
user << "\red This plot is completely devoid of weeds. It doesn't need uprooting."
@@ -729,15 +732,13 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
del(O)
updateicon()
- else if (istype(O, /obj/item/weapon/plantbag))
+ else if (istype(O, /obj/item/weapon/storage/bag/plants))
attack_hand(user)
- var/obj/item/weapon/plantbag/S = O
+ var/obj/item/weapon/storage/bag/plants/S = O
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(user.x,user.y,user.z))
- if (S.contents.len < S.capacity)
- S.contents += G;
- else
- user << "\blue The plant bag is full."
+ if(!S.can_be_inserted(G))
return
+ S.handle_item_insertion(G, 1)
else if ( istype(O, /obj/item/weapon/pestspray) )
var/obj/item/pestkiller/myPKiller = O
@@ -812,6 +813,16 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
parent.update_tray()
+/obj/item/seeds/grassseed/harvest(mob/user = usr)
+ var/obj/machinery/hydroponics/parent = loc //for ease of access
+ var/t_yield = round(yield*parent.yieldmod)
+
+ if(t_yield > 0)
+ var/obj/item/stack/tile/grass/new_grass = new/obj/item/stack/tile/grass(user.loc)
+ new_grass.amount = t_yield
+
+ parent.update_tray()
+
/obj/item/seeds/gibtomato/harvest(mob/user = usr)
var/produce = text2path(productname)
var/obj/machinery/hydroponics/parent = loc //for ease of access
@@ -1005,10 +1016,10 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
icon = 'icons/obj/hydroponics.dmi'
icon_state = "soil"
density = 0
- New()
- ..()
+ use_power = 0
+
updateicon() // Same as normal but with the overlays removed - Cheridan.
- overlays = null
+ overlays.Cut()
if(planted)
if(dead)
overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-dead")
@@ -1029,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
\ No newline at end of file
+ return
+
+#undef SPEED_MULTIPLIER
diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm
index 0cacca07ed7..817a3603e84 100755
--- a/code/game/machinery/igniter.dm
+++ b/code/game/machinery/igniter.dm
@@ -1,3 +1,15 @@
+/obj/machinery/igniter
+ name = "igniter"
+ desc = "It's useful for igniting plasma."
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "igniter1"
+ var/id = null
+ var/on = 1.0
+ anchored = 1.0
+ use_power = 1
+ idle_power_usage = 2
+ active_power_usage = 4
+
/obj/machinery/igniter/attack_ai(mob/user as mob)
return src.attack_hand(user)
@@ -100,6 +112,12 @@
location.hotspot_expose(1000,500,1)
return 1
+/obj/machinery/sparker/emp_act(severity)
+ if(stat & (BROKEN|NOPOWER))
+ ..(severity)
+ return
+ ignite()
+ ..(severity)
/obj/machinery/ignition_switch/attack_ai(mob/user as mob)
return src.attack_hand(user)
diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm
index c27ae7faa80..311f8d88101 100644
--- a/code/game/machinery/iv_drip.dm
+++ b/code/game/machinery/iv_drip.dm
@@ -69,8 +69,6 @@
/obj/machinery/iv_drip/process()
set background = 1
- ..()
-
if(src.attached)
if(!(get_dist(src, src.attached) <= 1))
visible_message("The needle is ripped out of [src.attached], doesn't that hurt?")
@@ -101,7 +99,12 @@
var/mob/living/carbon/human/T = attached
if(!istype(T)) return
- var/datum/reagent/B = new /datum/reagent/blood
+ var/datum/reagent/B
+ for(var/datum/reagent/blood/Blood in beaker.reagents.reagent_list)
+ if(Blood.data && Blood.data["blood_type"]==T.dna.b_type)
+ B = Blood
+ break
+ if(!B) B = new /datum/reagent/blood
if(!T.dna)
return
if(NOCLONE in T.mutations)
@@ -112,7 +115,7 @@
if(T.vessel.get_reagent_amount("blood") < amount)
return
B.holder = beaker
- B.volume = amount
+ B.volume += amount
//set reagent data
B.data["donor"] = T
@@ -121,7 +124,10 @@
B.data["blood_DNA"] = copytext(T.dna.unique_enzymes,1,0)
if(T.resistances && T.resistances.len)
- B.data["resistances"] = T.resistances.Copy()
+ if(B.data["resistances"])
+ B.data["resistances"] |= T.resistances.Copy()
+ else
+ B.data["resistances"] = T.resistances.Copy()
B.data["blood_type"] = copytext(T.dna.b_type,1,0)
@@ -130,14 +136,15 @@
temp_chem += R.name
temp_chem[R.name] = R.volume
B.data["trace_chem"] = list2params(temp_chem)
- B.data["antibodies"] = T.antibodies
+ B.data["antibodies"] |= T.antibodies
T.vessel.remove_reagent("blood",amount) // Removes blood if human
- beaker.reagents.reagent_list += B
+ beaker.reagents.reagent_list |= B
beaker.reagents.update_total()
beaker.on_reagent_change()
beaker.reagents.handle_reactions()
+ update_icon()
/obj/machinery/iv_drip/attack_hand(mob/user as mob)
if(src.beaker)
@@ -168,6 +175,11 @@
..()
if (!(usr in view(2)) && usr!=src.loc) return
+ if(mode == "take")
+ usr << "The IV drip is taking blood."
+ else if(mode == "give")
+ usr << "The IV drip is injecting."
+
if(beaker)
usr << "\blue Attached is \a [beaker] with:"
if(beaker.reagents && beaker.reagents.reagent_list.len)
diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm
index 57304622656..0a8bde59dde 100644
--- a/code/game/machinery/kitchen/gibber.dm
+++ b/code/game/machinery/kitchen/gibber.dm
@@ -50,7 +50,7 @@
src.overlays += image('icons/obj/kitchen.dmi', "grjam")
/obj/machinery/gibber/update_icon()
- overlays = null
+ overlays.Cut()
if (dirty)
src.overlays += image('icons/obj/kitchen.dmi', "grbloody")
if(stat & (NOPOWER|BROKEN))
diff --git a/code/game/machinery/kitchen/processor.dm b/code/game/machinery/kitchen/processor.dm
index b0e2d2ad4c0..f5e5b2987df 100644
--- a/code/game/machinery/kitchen/processor.dm
+++ b/code/game/machinery/kitchen/processor.dm
@@ -60,9 +60,9 @@
..()
- metroid
- input = /mob/living/carbon/metroid
- output = /obj/item/weapon/reagent_containers/glass/beaker/roro
+ slime
+ input = /mob/living/carbon/slime
+ output = /obj/item/weapon/reagent_containers/glass/beaker/slime
monkey
process(loc, what)
@@ -82,7 +82,7 @@
for(var/datum/disease/D in O.viruses)
if(D.spread_type != SPECIAL)
- B.data["viruses"] = D.Copy()
+ B.data["viruses"] += D.Copy()
B.data["blood_DNA"] = copytext(O.dna.unique_enzymes,1,0)
if(O.resistances&&O.resistances.len)
diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm
index 926e4133788..d02e5fd4f46 100644
--- a/code/game/machinery/kitchen/smartfridge.dm
+++ b/code/game/machinery/kitchen/smartfridge.dm
@@ -12,23 +12,52 @@
active_power_usage = 100
flags = NOREACT
var/global/max_n_of_items = 999 // Sorry but the BYOND infinite loop detector doesn't look things over 1000.
+ var/icon_on = "smartfridge"
+ var/icon_off = "smartfridge-off"
var/item_quants = list()
var/ispowered = 1 //starts powered
var/isbroken = 0
+/obj/machinery/smartfridge/proc/accept_check(var/obj/item/O as obj)
+ if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown/) || istype(O,/obj/item/seeds/))
+ return 1
+ return 0
+
+/obj/machinery/smartfridge/seeds
+ name = "\improper MegaSeed Servitor"
+ desc = "When you need seeds fast!"
+ icon = 'icons/obj/vending.dmi'
+ icon_state = "seeds"
+ icon_on = "seeds"
+ icon_off = "seeds-off"
+
+/obj/machinery/smartfridge/seeds/accept_check(var/obj/item/O as obj)
+ if(istype(O,/obj/item/seeds/))
+ return 1
+ return 0
+
+/obj/machinery/smartfridge/extract
+ name = "\improper Slime Extract Storage"
+ desc = "A refrigerated storage unit for slime extracts"
+
+/obj/machinery/smartfridge/extract/accept_check(var/obj/item/O as obj)
+ if(istype(O,/obj/item/slime_extract))
+ return 1
+ return 0
+
/obj/machinery/smartfridge/power_change()
if( powered() )
src.ispowered = 1
stat &= ~NOPOWER
if(!isbroken)
- icon_state = "smartfridge"
+ icon_state = icon_on
else
spawn(rand(0, 15))
src.ispowered = 0
stat |= NOPOWER
if(!isbroken)
- icon_state = "smartfridge-off"
+ icon_state = icon_off
/*******************
@@ -40,7 +69,7 @@
user << "\The [src] is unpowered and useless."
return
- if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown/))
+ if(accept_check(O))
if(contents.len >= max_n_of_items)
user << "\The [src] is full."
return 1
@@ -54,20 +83,27 @@
user.visible_message("[user] has added \the [O] to \the [src].", \
"You add \the [O] to \the [src].")
- else if(istype(O, /obj/item/weapon/plantbag))
- user.visible_message("[user] loads \the [src] with \the [O].", \
- "You load \the [src] with \the [O].")
- for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
- if(contents.len >= max_n_of_items)
- user << "\The [src] is full."
- return 1
- else
- O.contents -= G
- G.loc = src
- if(item_quants[G.name])
- item_quants[G.name]++
+ else if(istype(O, /obj/item/weapon/storage/bag/plants))
+ var/obj/item/weapon/storage/bag/plants/P = O
+ var/plants_loaded = 0
+ for(var/obj/G in P.contents)
+ if(accept_check(G))
+ if(contents.len >= max_n_of_items)
+ user << "\The [src] is full."
+ return 1
else
- item_quants[G.name] = 1
+ P.remove_from_storage(G,src)
+ if(item_quants[G.name])
+ item_quants[G.name]++
+ else
+ item_quants[G.name] = 1
+ plants_loaded++
+ if(plants_loaded)
+
+ user.visible_message("[user] loads \the [src] with \the [P].", \
+ "You load \the [src] with \the [P].")
+ if(P.contents.len > 0)
+ user << "Some items are refused."
else
user << "\The [src] smartly refuses [O]."
@@ -104,13 +140,18 @@
dat += "[capitalize(O)]:"
dat += " [N] "
dat += "Vend "
- dat += "(x5)"
- dat += "(x10)"
- dat += "(x25)"
+ if(N > 5)
+ dat += "(x5)"
+ if(N > 10)
+ dat += "(x10)"
+ if(N > 25)
+ dat += "(x25)"
+ if(N > 1)
+ dat += "(All)"
dat += " "
dat += ""
- user << browse("SmartFridge Supplies[dat]", "window=smartfridge")
+ user << browse("[src] Supplies[dat]", "window=smartfridge")
onclose(user, "smartfridge")
return
diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm
index 75a307e4781..128292631f0 100644
--- a/code/game/machinery/lightswitch.dm
+++ b/code/game/machinery/lightswitch.dm
@@ -1,6 +1,16 @@
// the light switch
// can have multiple per area
// can also operate on non-loc area through "otherarea" var
+/obj/machinery/light_switch
+ name = "light switch"
+ desc = "It turns lights on and off. What are you, simple?"
+ icon = 'icons/obj/power.dmi'
+ icon_state = "light1"
+ anchored = 1.0
+ var/on = 1
+ var/area/area = null
+ var/otherarea = null
+ // luminosity = 1
/obj/machinery/light_switch/New()
..()
@@ -60,3 +70,9 @@
updateicon()
+/obj/machinery/light_switch/emp_act(severity)
+ if(stat & (BROKEN|NOPOWER))
+ ..(severity)
+ return
+ power_change()
+ ..(severity)
\ No newline at end of file
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index c02d923571f..e94ed011eef 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -91,6 +91,24 @@ Class Procs:
Compiled by Aygar
*/
+/obj/machinery
+ name = "machinery"
+ icon = 'icons/obj/stationobjs.dmi'
+ var/stat = 0
+ var/emagged = 0
+ var/use_power = 1
+ //0 = dont run the auto
+ //1 = run auto, use idle
+ //2 = run auto, use active
+ var/idle_power_usage = 0
+ var/active_power_usage = 0
+ var/power_channel = EQUIP
+ //EQUIP,ENVIRON or LIGHT
+ var/list/component_parts = null //list of all the parts used to build it, if made from certain kinds of frames.
+ var/uid
+ var/manual = 0
+ var/global/gl_uid = 1
+
/obj/machinery/New()
..()
machines += src
diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm
index ee23cc1ff50..036edb8730d 100644
--- a/code/game/machinery/mass_driver.dm
+++ b/code/game/machinery/mass_driver.dm
@@ -34,3 +34,9 @@
O.throw_at(target, drive_range * power, power)
flick("mass_driver1", src)
return
+
+ emp_act(severity)
+ if(stat & (BROKEN|NOPOWER))
+ return
+ drive()
+ ..(severity)
\ No newline at end of file
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 1914780cfa9..c57e5cbb8d6 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -9,6 +9,7 @@
var/backup_body =""
var/backup_author =""
var/is_admin_message = 0
+ var/icon/img = null
/datum/feed_channel
var/channel_name=""
@@ -26,6 +27,7 @@
src.body = ""
src.backup_body = ""
src.backup_author = ""
+ src.img = null
/datum/feed_channel/proc/clear()
src.channel_name = ""
@@ -83,6 +85,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
// 1 = there has
var/scanned_user = "Unknown" //Will contain the name of the person who currently uses the newscaster
var/msg = ""; //Feed message
+ var/obj/item/weapon/photo/photo = null
var/channel_name = ""; //the feed channel which will be receiving the feed, or being created
var/c_locked=0; //Will our new channel be locked to public submissions?
var/hitstaken = 0 //Death at 3 hits from an item with force>=15
@@ -111,11 +114,11 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(!ispowered || isbroken)
icon_state = "newscaster_off"
if(isbroken) //If the thing is smashed, add crack overlay on top of the unpowered sprite.
- src.overlays = null
+ src.overlays.Cut()
src.overlays += image(src.icon, "crack3")
return
- src.overlays = null //reset overlays
+ src.overlays.Cut() //reset overlays
if(news_network.wanted_issue) //wanted icon state, there can be no overlays on it as it's a priority message
icon_state = "newscaster_wanted"
@@ -229,6 +232,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+="Receiving Channel: [src.channel_name] " //MARK
dat+="Message Author: [src.scanned_user] "
dat+="Message Body: [src.msg] "
+ dat+="Attach Photo: [(src.photo ? "Photo Attached" : "No Photo")]"
dat+=" Submit
Cancel "
if(4)
dat+="Feed story successfully submitted to [src.channel_name].
"
@@ -292,8 +296,14 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if( isemptylist(src.viewing_channel.messages) )
dat+="No feed messages found in channel... "
else
+ var/i = 0
for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages)
- dat+="-[MESSAGE.body] \[Story by [MESSAGE.author]\]
"
+ dat+="\[Story by [MESSAGE.author]\] "
dat+=" Refresh"
dat+=" Back"
if(10)
@@ -358,6 +368,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+=""
dat+="Criminal Name: [src.channel_name] "
dat+="Description: [src.msg] "
+ dat+="Attach Photo: [(src.photo ? "Photo Attached" : "No Photo")]"
if(wanted_already)
dat+="Wanted Issue created by: [news_network.wanted_issue.backup_author] "
else
@@ -385,7 +396,13 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+="-- STATIONWIDE WANTED ISSUE -- \[Submitted by: [news_network.wanted_issue.backup_author]\]"
dat+="Criminal: [news_network.wanted_issue.author] "
dat+="Description: [news_network.wanted_issue.body] "
- dat+=" Back "
+ dat+="Photo:: "
+ if(news_network.wanted_issue.img)
+ usr << browse_rsc(news_network.wanted_issue.img, "tmp_photow.png")
+ dat+=" "
+ else
+ dat+="None"
+ dat+="
Back "
if(19)
dat+="Wanted issue for [src.channel_name] successfully edited.
"
dat+=" Return "
@@ -464,7 +481,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
for(var/datum/feed_channel/F in news_network.network_channels)
if( (!F.locked || F.author == scanned_user) && !F.censored)
available_channels += F.channel_name
- src.channel_name = strip_html(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
+ src.channel_name = strip_html_simple(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
src.updateUsrDialog()
else if(href_list["set_new_message"])
@@ -473,6 +490,10 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
src.msg = copytext(src.msg,2,lentext(src.msg)+1)
src.updateUsrDialog()
+ else if(href_list["set_attachment"])
+ AttachPhoto(usr)
+ src.updateUsrDialog()
+
else if(href_list["submit_new_message"])
if(src.msg =="" || src.msg=="\[REDACTED\]" || src.scanned_user == "Unknown" || src.channel_name == "" )
src.screen=6
@@ -480,6 +501,8 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = src.scanned_user
newMsg.body = src.msg
+ if(photo)
+ newMsg.img = photo.img
feedback_inc("newscaster_stories",1)
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == src.channel_name)
@@ -553,6 +576,8 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
WANTED.author = src.channel_name
WANTED.body = src.msg
WANTED.backup_author = src.scanned_user //I know, a bit wacky
+ if(photo)
+ WANTED.img = photo.img
news_network.wanted_issue = WANTED
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.newsAlert()
@@ -565,6 +590,8 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
news_network.wanted_issue.author = src.channel_name
news_network.wanted_issue.body = src.msg
news_network.wanted_issue.backup_author = src.scanned_user
+ if(photo)
+ news_network.wanted_issue.img = photo.img
src.screen = 19
src.updateUsrDialog()
@@ -712,6 +739,16 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
user << "The newscaster controls are far too complicated for your tiny brain!"
return
+/obj/machinery/newscaster/proc/AttachPhoto(mob/user as mob)
+ if(photo)
+ photo.loc = src.loc
+ user.put_in_inactive_hand(photo)
+ photo = null
+ if(istype(user.get_active_hand(), /obj/item/weapon/photo))
+ photo = user.get_active_hand()
+ user.drop_item()
+ photo.loc = src
+
@@ -723,6 +760,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
/obj/item/weapon/newspaper
name = "newspaper"
desc = "An issue of The Griffon, the newspaper circulating aboard Nanotrasen Space Stations."
+ icon = 'icons/obj/bureaucracy.dmi'
icon_state = "newspaper"
w_class = 2 //Let's make it fit in trashbags!
attack_verb = list("bapped")
@@ -778,8 +816,14 @@ obj/item/weapon/newspaper/attack_self(mob/user as mob)
dat+="No Feed stories stem from this channel..."
else
dat+="
"
+ var/i = 0
for(var/datum/feed_message/MESSAGE in C.messages)
- dat+="-[MESSAGE.body] \[Story by [MESSAGE.author]\]
"
+ i++
+ dat+="-[MESSAGE.body] "
+ if(MESSAGE.img)
+ user << browse_rsc(MESSAGE.img, "tmp_photo[i].png")
+ dat+=" "
+ dat+="\[Story by [MESSAGE.author]\]
"
dat+="
"
if(scribble_page==curr_page)
dat+=" There is a small scribble near the end of this page... It reads: \"[src.scribble]\""
@@ -790,7 +834,13 @@ obj/item/weapon/newspaper/attack_self(mob/user as mob)
if(src.important_message!=null)
dat+="
Wanted Issue:
"
dat+="Criminal name: [important_message.author] "
- dat+="Description: [important_message.body]"
+ dat+="Description: [important_message.body] "
+ dat+="Photo:: "
+ if(important_message.img)
+ user << browse_rsc(important_message.img, "tmp_photow.png")
+ dat+=" "
+ else
+ dat+="None"
else
dat+="Apart from some uninteresting Classified ads, there's nothing on this page..."
if(scribble_page==curr_page)
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index 06bd921dfb0..59e5ce13e33 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -449,9 +449,6 @@ Status: [] "},
var/list/secondarytargets = list() // targets that are least important
if(src.check_anomalies) // if its set to check for xenos/carps, check for non-mob "crittersssss"(And simple_animals)
- for (var/obj/effect/critter/L in view(7,src))
- if(L.alive)
- targets += L
for(var/mob/living/simple_animal/C in view(7,src))
if(!C.stat)
targets += C
@@ -506,15 +503,6 @@ Status: [] "},
spawn() popUp() // pop the turret up if it's not already up.
dir=get_dir(src,M) // even if you can't shoot, follow the target
spawn() shootAt(M) // shoot the target, finally
- else
-
- if (istype(t, /obj/effect/critter)) // shoot other things, same process as above
- var/obj/effect/critter/L = t
- if (L.alive==1)
- spawn() popUp()
- dir=get_dir(src,L)
- spawn() shootAt(L)
-
else
if(secondarytargets.len>0) // if there are no primary targets, go for secondary targets
@@ -570,7 +558,7 @@ Status: [] "},
return 10
if(auth_weapons) // check for weapon authorization
- if((isnull(perp:wear_id)) || (istype(perp:wear_id, /obj/item/weapon/card/id/syndicate)))
+ if((isnull(perp.wear_id)) || (istype(perp.wear_id.GetID(), /obj/item/weapon/card/id/syndicate)))
if((src.allowed(perp)) && !(src.lasercolor)) // if the perp has security access, return 0
return 0
@@ -581,40 +569,36 @@ Status: [] "},
if((istype(perp.r_hand, /obj/item/weapon/gun) && !istype(perp.r_hand, /obj/item/weapon/gun/projectile/shotgun)) || istype(perp.r_hand, /obj/item/weapon/melee/baton))
threatcount += 4
- if(istype(perp:belt, /obj/item/weapon/gun) || istype(perp:belt, /obj/item/weapon/melee/baton))
+ if(istype(perp.belt, /obj/item/weapon/gun) || istype(perp.belt, /obj/item/weapon/melee/baton))
threatcount += 2
if((src.lasercolor) == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
threatcount = 0//But does not target anyone else
if(istype(perp.wear_suit, /obj/item/clothing/suit/redtag))
threatcount += 4
- if((istype(perp:r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(perp:l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
+ if((istype(perp.r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(perp.l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
threatcount += 4
- if(istype(perp:belt, /obj/item/weapon/gun/energy/laser/redtag))
+ if(istype(perp.belt, /obj/item/weapon/gun/energy/laser/redtag))
threatcount += 2
if((src.lasercolor) == "r")
threatcount = 0
if(istype(perp.wear_suit, /obj/item/clothing/suit/bluetag))
threatcount += 4
- if((istype(perp:r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(perp:l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
+ if((istype(perp.r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(perp.l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
threatcount += 4
- if(istype(perp:belt, /obj/item/weapon/gun/energy/laser/bluetag))
+ if(istype(perp.belt, /obj/item/weapon/gun/energy/laser/bluetag))
threatcount += 2
if (src.check_records) // if the turret can check the records, check if they are set to *Arrest* on records
for (var/datum/data/record/E in data_core.general)
+
var/perpname = perp.name
- if (perp:wear_id)
- var/obj/item/weapon/card/id/id = perp:wear_id
- if(istype(perp:wear_id, /obj/item/device/pda))
- var/obj/item/device/pda/pda = perp:wear_id
- id = pda.id
+ if (perp.wear_id)
+ var/obj/item/weapon/card/id/id = perp.wear_id.GetID()
if (id)
perpname = id.registered_name
- else
- var/obj/item/device/pda/pda = perp:wear_id
- perpname = pda.owner
+
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index da44e9559b1..10002bc570b 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -80,6 +80,21 @@ obj/machinery/recharger/process()
else
icon_state = "recharger2"
+obj/machinery/recharger/emp_act(severity)
+ if(stat & (NOPOWER|BROKEN) || !anchored)
+ ..(severity)
+ return
+
+ if(istype(charging, /obj/item/weapon/gun/energy))
+ var/obj/item/weapon/gun/energy/E = charging
+ if(E.power_supply)
+ E.power_supply.emp_act(severity)
+
+ else if(istype(charging, /obj/item/weapon/melee/baton))
+ var/obj/item/weapon/melee/baton/B = charging
+ B.charges = 0
+ ..(severity)
+
obj/machinery/recharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
if(charging)
icon_state = "recharger1"
diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm
index 95d0f342e87..9912e2e85db 100644
--- a/code/game/machinery/rechargestation.dm
+++ b/code/game/machinery/rechargestation.dm
@@ -34,6 +34,15 @@
src.go_out()
return
+ emp_act(severity)
+ if(stat & (BROKEN|NOPOWER))
+ ..(severity)
+ return
+ if(occupant)
+ occupant.emp_act(severity)
+ go_out()
+ ..(severity)
+
proc
build_icon()
if(NOPOWER|BROKEN)
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index b294cf026eb..ced7486384d 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -56,6 +56,18 @@ var/list/obj/machinery/requests_console/allConsoles = list()
var/priority = -1 ; //Priority of the message being sent
luminosity = 0
+/obj/machinery/requests_console/power_change()
+ ..()
+ update_icon()
+
+/obj/machinery/requests_console/update_icon()
+ if(stat & NOPOWER)
+ if(icon_state != "req_comp_off")
+ icon_state = "req_comp_off"
+ else
+ if(icon_state == "req_comp_off")
+ icon_state = "req_comp0"
+
/obj/machinery/requests_console/New()
name = "[department] Requests Console"
allConsoles += src
@@ -95,6 +107,8 @@ var/list/obj/machinery/requests_console/allConsoles = list()
/obj/machinery/requests_console/attack_hand(user as mob)
+ if(..(user))
+ return
var/dat
dat = text("Requests Console
"
if (pai)
if(pai.loc != src)
pai = null
@@ -367,7 +372,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (!toff)
for (var/obj/item/device/pda/P in sortAtom(PDAs))
- if (!P.owner||P.toff||P == src) continue
+ if (!P.owner||P.toff||P == src||P.hidden) continue
dat += "
[P]"
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate) && P.detonate)
dat += " (*Detonate*)"
@@ -506,18 +511,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
//MAIN FUNCTIONS===================================
if("Light")
- if(light_on)
- light_on = 0
- if(src in U.contents)
- U.SetLuminosity(search_light(U, src))
- else
- SetLuminosity(0)
+ if(fon)
+ fon = 0
+ if(src in U.contents) U.SetLuminosity(U.luminosity - f_lum)
+ else SetLuminosity(0)
else
- light_on = 1
- if((src in U.contents) && (U.luminosity < brightness_on))
- U.SetLuminosity(brightness_on)
- else
- SetLuminosity(brightness_on)
+ fon = 1
+ if(src in U.contents) U.SetLuminosity(U.luminosity + f_lum)
+ else SetLuminosity(f_lum)
if("Medical Scan")
if(scanmode == 1)
scanmode = 0
@@ -537,6 +538,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
if ( !(last_honk && world.time < last_honk + 20) )
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
last_honk = world.time
+ if("Gas Scan")
+ if(scanmode == 5)
+ scanmode = 0
+ else if((!isnull(cartridge)) && (cartridge.access_atmos))
+ scanmode = 5
//MESSENGER/NOTE FUNCTIONS===================================
@@ -676,7 +682,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
//EXTRA FUNCTIONS===================================
if (mode == 2||mode == 21)//To clear message overlays.
- overlays = null
+ overlays.Cut()
if ((honkamt > 0) && (prob(60)))//For clown virus.
honkamt--
@@ -752,14 +758,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (prob(15)) //Give the AI a chance of intercepting the message
var/who = src.owner
- var/sp_word = "from"
if(prob(50))
who = P:owner
- sp_word = "to"
for(var/mob/living/silicon/ai/ai in mob_list)
// Allows other AIs to intercept the message but the AI won't intercept their own message.
if(ai.aiPDA != P && ai.aiPDA != src)
- ai.show_message("Intercepted message [sp_word] [who]: [t]")
+ ai.show_message("Intercepted message from [who]: [t]")
if (!P.silent)
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
@@ -770,21 +774,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(P.loc && isliving(P.loc))
L = P.loc
//Maybe they are a pAI!
- else if(istype(P, /obj/item/device/pda/pai) && P.loc)
- //Search through the location's contents
- for(var/obj/item/device/paicard/Pcard in P.loc)
- //If there's a Pcard there then get the mind inside
- if(Pcard.pai)
- var/mob/living/silicon/pai/pai = Pcard.pai
- //Is it the pAI that is receiving the message?
- if(pai.pda && pai.pda == P)
- L = pai
- break
+ else
+ L = get(P, /mob/living/silicon)
+
if(L)
L << "\icon[P] Message from [src.owner] ([ownjob]), \"[t]\" (Reply)"
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
- P.overlays = null
+ P.overlays.Cut()
P.overlays += image('icons/obj/pda.dmi', "pda-r")
else
U << "ERROR: Server isn't responding."
@@ -860,6 +857,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
user << "You insert [cartridge] into [src]."
if(cartridge.radio)
cartridge.radio.hostpda = src
+
else if(istype(C, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/idcard = C
if(!idcard.registered_name)
@@ -967,6 +965,64 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
user << "\blue No significant chemical agents found in [A]."
+ if(5)
+ if((istype(A, /obj/item/weapon/tank)) || (istype(A, /obj/machinery/portable_atmospherics)))
+ var/obj/icon = A
+ for (var/mob/O in viewers(user, null))
+ O << "\red [user] has used [src] on \icon[icon] [A]"
+ var/pressure = A:air_contents.return_pressure()
+
+ var/total_moles = A:air_contents.total_moles()
+
+ user << "\blue Results of analysis of \icon[icon]"
+ if (total_moles>0)
+ var/o2_concentration = A:air_contents.oxygen/total_moles
+ var/n2_concentration = A:air_contents.nitrogen/total_moles
+ var/co2_concentration = A:air_contents.carbon_dioxide/total_moles
+ var/plasma_concentration = A:air_contents.toxins/total_moles
+
+ var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
+
+ user << "\blue Pressure: [round(pressure,0.1)] kPa"
+ user << "\blue Nitrogen: [round(n2_concentration*100)]%"
+ user << "\blue Oxygen: [round(o2_concentration*100)]%"
+ user << "\blue CO2: [round(co2_concentration*100)]%"
+ user << "\blue Plasma: [round(plasma_concentration*100)]%"
+ if(unknown_concentration>0.01)
+ user << "\red Unknown: [round(unknown_concentration*100)]%"
+ user << "\blue Temperature: [round(A:air_contents.temperature-T0C)]°C"
+ else
+ user << "\blue Tank is empty!"
+
+ if (istype(A, /obj/machinery/atmospherics/pipe/tank))
+ var/obj/icon = A
+ for (var/mob/O in viewers(user, null))
+ O << "\red [user] has used [src] on \icon[icon] [A]"
+
+ var/obj/machinery/atmospherics/pipe/tank/T = A
+ var/pressure = T.parent.air.return_pressure()
+ var/total_moles = T.parent.air.total_moles()
+
+ user << "\blue Results of analysis of \icon[icon]"
+ if (total_moles>0)
+ var/o2_concentration = T.parent.air.oxygen/total_moles
+ var/n2_concentration = T.parent.air.nitrogen/total_moles
+ var/co2_concentration = T.parent.air.carbon_dioxide/total_moles
+ var/plasma_concentration = T.parent.air.toxins/total_moles
+
+ var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
+
+ user << "\blue Pressure: [round(pressure,0.1)] kPa"
+ user << "\blue Nitrogen: [round(n2_concentration*100)]%"
+ user << "\blue Oxygen: [round(o2_concentration*100)]%"
+ user << "\blue CO2: [round(co2_concentration*100)]%"
+ user << "\blue Plasma: [round(plasma_concentration*100)]%"
+ if(unknown_concentration>0.01)
+ user << "\red Unknown: [round(unknown_concentration*100)]%"
+ user << "\blue Temperature: [round(T.parent.air.temperature-T0C)]°C"
+ else
+ user << "\blue Tank is empty!"
+
if (!scanmode && istype(A, /obj/item/weapon/paper) && owner)
note = A:info
user << "\blue Paper scanned." //concept of scanning paper copyright brainoblivion 2009
@@ -1031,6 +1087,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
for (var/obj/item/device/pda/P in PDAs)
if (!P.owner)
continue
+ else if(P.hidden)
+ continue
else if (P == src)
continue
else if (P.toff)
@@ -1094,39 +1152,27 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
usr << "You do not have a PDA. You should make an issue report about this."
-
-
-
//Some spare PDAs in a box
-
-/obj/item/weapon/storage/PDAbox
+/obj/item/weapon/storage/box/PDAs
name = "spare PDAs"
desc = "A box of spare PDA microcomputers."
icon = 'icons/obj/pda.dmi'
icon_state = "pdabox"
- item_state = "syringe_kit"
- foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
-/obj/item/weapon/storage/PDAbox/New()
- ..()
- new /obj/item/device/pda(src)
- new /obj/item/device/pda(src)
- new /obj/item/device/pda(src)
- new /obj/item/device/pda(src)
-
- var/newcart = pick(1,2,3,4)
- switch(newcart)
- if(1)
- new /obj/item/weapon/cartridge/engineering(src)
- if(2)
- new /obj/item/weapon/cartridge/security(src)
- if(3)
- new /obj/item/weapon/cartridge/medical(src)
- if(4)
- new /obj/item/weapon/cartridge/signal/toxins(src)
-
- new /obj/item/weapon/cartridge/head(src)
+ New()
+ ..()
+ new /obj/item/device/pda(src)
+ new /obj/item/device/pda(src)
+ new /obj/item/device/pda(src)
+ new /obj/item/device/pda(src)
+ new /obj/item/weapon/cartridge/head(src)
+ var/newcart = pick( /obj/item/weapon/cartridge/engineering,
+ /obj/item/weapon/cartridge/security,
+ /obj/item/weapon/cartridge/medical,
+ /obj/item/weapon/cartridge/signal/toxins,
+ /obj/item/weapon/cartridge/quartermaster)
+ new newcart(src)
// Pass along the pulse to atoms in contents, largely added so pAIs are vulnerable to EMP
/obj/item/device/pda/emp_act(severity)
diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm
index f6bc2f33656..546b70f28e5 100644
--- a/code/game/objects/items/devices/PDA/cart.dm
+++ b/code/game/objects/items/devices/PDA/cart.dm
@@ -9,6 +9,7 @@
var/obj/item/radio/integrated/radio = null
var/access_security = 0
var/access_engine = 0
+ var/access_atmos = 0
var/access_medical = 0
var/access_manifest = 1 // Make all jobs able to access the manifest
var/access_clown = 0
@@ -37,6 +38,11 @@
icon_state = "cart-e"
access_engine = 1
+ atmos
+ name = "BreatheDeep Cartridge"
+ icon_state = "cart-a"
+ access_atmos = 1
+
medical
name = "Med-U Cartridge"
icon_state = "cart-m"
@@ -102,7 +108,8 @@
name = "Signal Ace 2"
desc = "Complete with integrated radio signaler!"
icon_state = "cart-tox"
-// access_reagent_scanner = 1
+ access_reagent_scanner = 1
+ access_atmos = 1
New()
..()
@@ -134,6 +141,8 @@
access_manifest = 1
access_status_display = 1
access_quartermaster = 1
+ access_janitor = 1
+ access_security = 1
New()
..()
@@ -158,6 +167,7 @@
access_manifest = 1
access_status_display = 1
access_engine = 1
+ access_atmos = 1
cmo
name = "Med-U DELUXE"
@@ -172,7 +182,8 @@
icon_state = "cart-rd"
access_manifest = 1
access_status_display = 1
-// access_reagent_scanner = 1
+ access_reagent_scanner = 1
+ access_atmos = 1
New()
..()
@@ -189,6 +200,7 @@
access_medical = 1
access_reagent_scanner = 1
access_status_display = 1
+ access_atmos = 1
syndicate
name = "Detomatix Cartridge"
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index d580480cb9a..c1ccb4aa6ca 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -10,13 +10,12 @@
m_amt = 50
g_amt = 20
icon_action_button = "action_flashlight"
- light_on = 0
- brightness_on = 4 //luminosity when on
- var brightness = 0
+ var/on = 0
+ var/brightness_on = 4 //luminosity when on
/obj/item/device/flashlight/initialize()
..()
- if(light_on)
+ if(on)
icon_state = "[initial(icon_state)]-on"
SetLuminosity(brightness_on)
else
@@ -24,31 +23,31 @@
SetLuminosity(0)
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
- if(light_on)
+ if(on)
icon_state = "[initial(icon_state)]-on"
- if((loc == user) && (user.luminosity < brightness_on))
- user.SetLuminosity(brightness_on)
+ if(loc == user)
+ user.SetLuminosity(user.luminosity + brightness_on)
else if(isturf(loc))
SetLuminosity(brightness_on)
else
icon_state = initial(icon_state)
if(loc == user)
- user.SetLuminosity(search_light(user, src))
+ user.SetLuminosity(user.luminosity - brightness_on)
else if(isturf(loc))
SetLuminosity(0)
/obj/item/device/flashlight/attack_self(mob/user)
if(!isturf(user.loc))
user << "You cannot turn the light on while in this [user.loc]." //To prevent some lighting anomalities.
- return
- light_on = !light_on
+ return 0
+ on = !on
update_brightness(user)
- return
+ return 1
/obj/item/device/flashlight/attack(mob/living/M as mob, mob/living/user as mob)
add_fingerprint(user)
- if(light_on && user.zone_sel.selecting == "eyes")
+ if(on && user.zone_sel.selecting == "eyes")
if(((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly
return ..() //just hit them in the head
@@ -89,24 +88,15 @@
/obj/item/device/flashlight/pickup(mob/user)
- if(light_on)
- if (user.luminosity < brightness_on)
- user.SetLuminosity(brightness_on)
+ if(on)
+ user.SetLuminosity(user.luminosity + brightness_on)
SetLuminosity(0)
/obj/item/device/flashlight/dropped(mob/user)
- if(light_on)
- if ((layer <= 3) || (loc != user.loc))
- user.SetLuminosity(search_light(user, src))
- SetLuminosity(brightness_on)
-
-
-/obj/item/device/flashlight/equipped(mob/user, slot)
- if(light_on)
- if (user.luminosity < brightness_on)
- user.SetLuminosity(brightness_on)
- SetLuminosity(0)
+ if(on)
+ user.SetLuminosity(user.luminosity - brightness_on)
+ SetLuminosity(brightness_on)
/obj/item/device/flashlight/pen
@@ -129,7 +119,7 @@
flags = FPRINT | TABLEPASS | CONDUCT
m_amt = 0
g_amt = 0
- light_on = 1
+ on = 1
// green-shaded desk lamp
@@ -163,21 +153,22 @@
var/produce_heat = 1500
/obj/item/device/flashlight/flare/New()
- fuel = rand(1500, 2000) // Last 10 to 15 minutes.
+ fuel = rand(800, 1000) // Sorry for changing this so much but I keep under-estimating how long X number of ticks last in seconds.
..()
/obj/item/device/flashlight/flare/process()
var/turf/pos = get_turf(src)
- pos.hotspot_expose(produce_heat, 5)
+ if(pos)
+ pos.hotspot_expose(produce_heat, 5)
fuel = max(fuel - 1, 0)
- if(!fuel || !light_on)
+ if(!fuel || !on)
turn_off()
if(!fuel)
src.icon_state = "[initial(icon_state)]-empty"
processing_objects -= src
/obj/item/device/flashlight/flare/proc/turn_off()
- light_on = 0
+ on = 0
src.force = initial(src.force)
src.damtype = initial(src.damtype)
if(ismob(loc))
@@ -187,19 +178,18 @@
update_brightness(null)
/obj/item/device/flashlight/flare/attack_self(mob/user)
+
// Usual checks
- if(loc != usr)
- return
if(!fuel)
user << "It's out of fuel."
return
- if(!light_on)
- user.visible_message("[user] activates the flare.", "You pull the cord on the flare, activating it!")
- else
+ if(on)
return
+
+ . = ..()
// All good, turn it on.
- light_on = 1
- update_brightness(user)
- src.force = on_damage
- src.damtype = "fire"
- processing_objects += src
\ No newline at end of file
+ if(.)
+ user.visible_message("[user] activates the flare.", "You pull the cord on the flare, activating it!")
+ src.force = on_damage
+ src.damtype = "fire"
+ processing_objects += src
\ No newline at end of file
diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index 9685993c70e..d0bc6a45336 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -110,12 +110,12 @@
/obj/item/device/paicard/proc/removePersonality()
src.pai = null
- src.overlays = null
+ src.overlays.Cut()
src.overlays += "pai-off"
/obj/item/device/paicard/proc/setEmotion(var/emotion)
if(pai)
- src.overlays = null
+ src.overlays.Cut()
switch(emotion)
if(1) src.overlays += "pai-happy"
if(2) src.overlays += "pai-cat"
diff --git a/code/game/objects/items/devices/radio/encryptionkey.dm b/code/game/objects/items/devices/radio/encryptionkey.dm
index 3b026d0be74..165f6748ec5 100644
--- a/code/game/objects/items/devices/radio/encryptionkey.dm
+++ b/code/game/objects/items/devices/radio/encryptionkey.dm
@@ -72,7 +72,7 @@
name = "Captain's Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "cap_cypherkey"
- channels = list("Command" = 1, "Science" = 0, "Medical" = 0, "Security" = 1, "Engineering" = 0, "Mining" = 0, "Cargo" = 0)
+ channels = list("Command" = 1, "Security" = 1, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0)
/obj/item/device/encryptionkey/heads/rd
name = "Research Director's Encryption Key"
@@ -102,8 +102,8 @@
name = "Head of Personnel's Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "hop_cypherkey"
- channels = list("Command" = 1, "Security" = 0, "Cargo" = 1, "Mining" = 0)
-
+ channels = list("Supply" = 1, "Command" = 1, "Security" = 0)
+/*
/obj/item/device/encryptionkey/headset_mine
name = "Mining Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
@@ -115,13 +115,12 @@
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "qm_cypherkey"
channels = list("Cargo" = 1, "Mining" = 1)
-
+*/
/obj/item/device/encryptionkey/headset_cargo
- name = "Cargo Radio Encryption Key"
+ name = "Supply Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "cargo_cypherkey"
- channels = list("Cargo" = 1)
-
+ channels = list("Supply" = 1)
/obj/item/device/encryptionkey/ert
name = "NanoTrasen ERT Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index 216120d4db5..05285807d71 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -95,7 +95,7 @@
/obj/item/device/radio/headset/heads/captain
name = "captain's headset"
- desc = "The headset of the boss. Channels are as follows: :c - command, :s - security, :e - engineering, :d - mining, :q - cargo, :m - medical, :n - science."
+ desc = "The headset of the boss. Channels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :m - medical, :n - science."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/captain
@@ -130,11 +130,11 @@
/obj/item/device/radio/headset/heads/hop
name = "head of personnel's headset"
- desc = "The headset of the guy who will one day be captain. Channels are as follows: :c - command, :s - security, :q - cargo, :d - mining."
+ desc = "The headset of the guy who will one day be captain. Channels are as follows: :u - supply, :c - command, :s - security"
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/hop
-
+/*
/obj/item/device/radio/headset/headset_mine
name = "mining radio headset"
desc = "Headset used by miners. How useless. To access the mining channel, use :d."
@@ -148,10 +148,10 @@
icon_state = "cargo_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/qm
-
+*/
/obj/item/device/radio/headset/headset_cargo
- name = "cargo radio headset"
- desc = "Headset used by the QM's slaves. To access the cargo channel, use :q."
+ name = "supply radio headset"
+ desc = "A headset used by the QM and his slaves. To access the supply channel, use :u."
icon_state = "cargo_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_cargo
diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm
index d860492e77e..c230a3f5a9b 100644
--- a/code/game/objects/items/devices/radio/intercom.dm
+++ b/code/game/objects/items/devices/radio/intercom.dm
@@ -4,7 +4,7 @@
icon_state = "intercom"
anchored = 1
w_class = 4.0
- canhear_range = 4
+ canhear_range = 2
var/number = 0
var/anyai = 1
var/mob/living/silicon/ai/ai = list()
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index 74cf0c40894..3b5da8c3a1d 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -497,10 +497,10 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
freq_text = "Engineering"
if(1359)
freq_text = "Security"
- if(1349)
- freq_text = "Mining"
+// if(1349)
+// freq_text = "Mining"
if(1347)
- freq_text = "Cargo"
+ freq_text = "Supply"
//There's probably a way to use the list var of channels in code\game\communications.dm to make the dept channels non-hardcoded, but I wasn't in an experimentive mood. --NEO
if(!freq_text)
@@ -595,7 +595,8 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
/obj/item/device/radio/hear_talk(mob/M as mob, msg)
if (broadcasting)
- talk_into(M, msg)
+ if(get_dist(src, M) <= canhear_range)
+ talk_into(M, msg)
/*
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 55b2be019e9..a0f4f202d90 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -257,6 +257,23 @@ MASS SPECTROMETER
src.add_fingerprint(user)
return
+/obj/item/device/mass_spectrometer
+ desc = "A hand-held mass spectrometer which identifies trace chemicals in a blood sample."
+ name = "mass-spectrometer"
+ icon_state = "spectrometer"
+ item_state = "analyzer"
+ w_class = 2.0
+ flags = FPRINT | TABLEPASS| CONDUCT | OPENCONTAINER
+ slot_flags = SLOT_BELT
+ throwforce = 5
+ throw_speed = 4
+ throw_range = 20
+ m_amt = 30
+ g_amt = 20
+ origin_tech = "magnets=2;biotech=2"
+ var/details = 0
+ var/recent_fail = 0
+
/obj/item/device/mass_spectrometer/New()
..()
var/datum/reagents/R = new/datum/reagents(5)
@@ -307,3 +324,8 @@ MASS SPECTROMETER
reagents.clear_reagents()
return
+/obj/item/device/mass_spectrometer/adv
+ name = "advanced mass-spectrometer"
+ icon_state = "adv_spectrometer"
+ details = 1
+ origin_tech = "magnets=4;biotech=2"
diff --git a/code/game/objects/items/devices/shields.dm b/code/game/objects/items/devices/shields.dm
deleted file mode 100644
index 665c79e0d90..00000000000
--- a/code/game/objects/items/devices/shields.dm
+++ /dev/null
@@ -1,32 +0,0 @@
-/obj/item/weapon/cloaking_device
- name = "cloaking device"
- desc = "Use this to become invisible to the human eyesocket."
- icon = 'icons/obj/device.dmi'
- icon_state = "shield0"
- var/active = 0.0
- flags = FPRINT | TABLEPASS| CONDUCT
- item_state = "electronic"
- throwforce = 10.0
- throw_speed = 2
- throw_range = 10
- w_class = 2.0
- origin_tech = "magnets=3;syndicate=4"
-
-
-/obj/item/weapon/cloaking_device/attack_self(mob/user as mob)
- src.active = !( src.active )
- if (src.active)
- user << "\blue The cloaking device is now active."
- src.icon_state = "shield1"
- else
- user << "\blue The cloaking device is now inactive."
- src.icon_state = "shield0"
- src.add_fingerprint(user)
- return
-
-/obj/item/weapon/cloaking_device/emp_act(severity)
- active = 0
- icon_state = "shield0"
- if(ismob(loc))
- loc:update_icons()
- ..()
diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm
index c77a388d1e6..9a57b4ff579 100644
--- a/code/game/objects/items/devices/transfer_valve.dm
+++ b/code/game/objects/items/devices/transfer_valve.dm
@@ -115,7 +115,7 @@
toggle = 1
/obj/item/device/transfer_valve/update_icon()
- overlays = null
+ overlays.Cut()
underlays = null
if(!tank_one && !tank_two && !attached_device)
@@ -164,16 +164,16 @@
else
attacher_name = "[attacher.name]([attacher.ckey])"
- var/log_str = "Bomb valve opened in [A.name] "
+ var/log_str = "Bomb valve opened in [A.name] "
log_str += "with [attached_device ? attached_device : "no device"] attacher: [attacher_name]"
if(attacher)
- log_str += "(?)"
+ log_str += "(?)"
var/mob/mob = get_mob_by_key(src.fingerprintslast)
var/last_touch_info = ""
if(mob)
- last_touch_info = "(?)"
+ last_touch_info = "(?)"
log_str += " Last touched by: [src.fingerprintslast][last_touch_info]"
bombers += log_str
diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm
index 957da36c89e..ebe7b751de0 100644
--- a/code/game/objects/items/devices/uplinks.dm
+++ b/code/game/objects/items/devices/uplinks.dm
@@ -59,12 +59,18 @@ A list of items and costs is stored under the datum of every game mode, alongsid
continue
path_obj = text2path(path_text)
- item = new path_obj()
- name = O[3]
- del item
- dat += "[name] ([cost]) "
- category_items++
+ // Because we're using strings, this comes up if item paths change.
+ // Failure to handle this error borks uplinks entirely. -Sayu
+ if(!path_obj)
+ error("Syndicate item is not a valid path: [path_text]")
+ else
+ item = new path_obj()
+ name = O[3]
+ del item
+
+ dat += "[name] ([cost]) "
+ category_items++
dat += "Random Item (??) "
dat += ""
@@ -81,7 +87,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
if(uses > 9)
randomItems.Add("/obj/item/toy/syndicateballoon")//Syndicate Balloon
- randomItems.Add("/obj/item/weapon/storage/syndie_kit/imp_uplink") //Uplink Implanter
+ randomItems.Add("/obj/item/weapon/storage/box/syndie_kit/imp_uplink") //Uplink Implanter
randomItems.Add("/obj/item/weapon/storage/box/syndicate") //Syndicate bundle
//if(uses > 8) //Nothing... yet.
@@ -104,15 +110,15 @@ A list of items and costs is stored under the datum of every game mode, alongsid
randomItems.Add("/obj/item/device/chameleon") //Chameleon Projector
if(uses > 2)
- randomItems.Add("/obj/item/weapon/storage/emp_kit") //EMP Grenades
+ randomItems.Add("/obj/item/weapon/storage/box/emps") //EMP Grenades
randomItems.Add("/obj/item/weapon/pen/paralysis") //Paralysis Pen
randomItems.Add("/obj/item/weapon/cartridge/syndicate") //Detomatix Cartridge
randomItems.Add("/obj/item/clothing/under/chameleon") //Chameleon Jumpsuit
randomItems.Add("/obj/item/weapon/card/id/syndicate") //Agent ID Card
randomItems.Add("/obj/item/weapon/card/emag") //Cryptographic Sequencer
- randomItems.Add("/obj/item/weapon/storage/syndie_kit/space") //Syndicate Space Suit
+ randomItems.Add("/obj/item/weapon/storage/box/syndie_kit/space") //Syndicate Space Suit
randomItems.Add("/obj/item/device/encryptionkey/binary") //Binary Translator Key
- randomItems.Add("/obj/item/weapon/storage/syndie_kit/imp_freedom") //Freedom Implant
+ randomItems.Add("/obj/item/weapon/storage/box/syndie_kit/imp_freedom") //Freedom Implant
randomItems.Add("/obj/item/clothing/glasses/thermal/syndi") //Thermal Imaging Goggles
if(uses > 1)
@@ -142,7 +148,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
switch(buyItem) //Ok, this gets a little messy, sorry.
if("/obj/item/weapon/circuitboard/teleporter")
uses -= 20
- if("/obj/item/toy/syndicateballoon" , "/obj/item/weapon/storage/syndie_kit/imp_uplink" , "/obj/item/weapon/storage/box/syndicate")
+ if("/obj/item/toy/syndicateballoon" , "/obj/item/weapon/storage/box/syndie_kit/imp_uplink" , "/obj/item/weapon/storage/box/syndicate")
uses -= 10
if("/obj/item/weapon/aiModule/syndicate" , "/obj/item/device/radio/beacon/syndicate")
uses -= 7
@@ -152,9 +158,9 @@ A list of items and costs is stored under the datum of every game mode, alongsid
uses -= 5
if("/obj/item/weapon/melee/energy/sword" , "/obj/item/clothing/mask/gas/voice" , "/obj/item/device/chameleon")
uses -= 4
- if("/obj/item/weapon/storage/emp_kit" , "/obj/item/weapon/pen/paralysis" , "/obj/item/weapon/cartridge/syndicate" , "/obj/item/clothing/under/chameleon" , \
- "/obj/item/weapon/card/emag" , "/obj/item/weapon/storage/syndie_kit/space" , "/obj/item/device/encryptionkey/binary" , \
- "/obj/item/weapon/storage/syndie_kit/imp_freedom" , "/obj/item/clothing/glasses/thermal/syndi")
+ if("/obj/item/weapon/storage/box/emps" , "/obj/item/weapon/pen/paralysis" , "/obj/item/weapon/cartridge/syndicate" , "/obj/item/clothing/under/chameleon" , \
+ "/obj/item/weapon/card/emag" , "/obj/item/weapon/storage/box/syndie_kit/space" , "/obj/item/device/encryptionkey/binary" , \
+ "/obj/item/weapon/storage/box/syndie_kit/imp_freedom" , "/obj/item/clothing/glasses/thermal/syndi")
uses -= 3
if("/obj/item/ammo_magazine/a357" , "/obj/item/clothing/shoes/syndigaloshes" , "/obj/item/weapon/plastique", "/obj/item/weapon/card/id/syndicate")
uses -= 2
@@ -172,7 +178,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
feedback_add_details("traitor_uplink_items_bought","TP")
if("/obj/item/toy/syndicateballoon")
feedback_add_details("traitor_uplink_items_bought","BS")
- if("/obj/item/weapon/storage/syndie_kit/imp_uplink")
+ if("/obj/item/weapon/storage/box/syndie_kit/imp_uplink")
feedback_add_details("traitor_uplink_items_bought","UI")
if("/obj/item/weapon/storage/box/syndicate")
feedback_add_details("traitor_uplink_items_bought","BU")
@@ -192,7 +198,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
feedback_add_details("traitor_uplink_items_bought","VC")
if("/obj/item/device/chameleon")
feedback_add_details("traitor_uplink_items_bought","CP")
- if("/obj/item/weapon/storage/emp_kit")
+ if("/obj/item/weapon/storage/box/emps")
feedback_add_details("traitor_uplink_items_bought","EM")
if("/obj/item/weapon/pen/paralysis")
feedback_add_details("traitor_uplink_items_bought","PP")
@@ -204,11 +210,11 @@ A list of items and costs is stored under the datum of every game mode, alongsid
feedback_add_details("traitor_uplink_items_bought","AC")
if("/obj/item/weapon/card/emag")
feedback_add_details("traitor_uplink_items_bought","EC")
- if("/obj/item/weapon/storage/syndie_kit/space")
+ if("/obj/item/weapon/storage/box/syndie_kit/space")
feedback_add_details("traitor_uplink_items_bought","SS")
if("/obj/item/device/encryptionkey/binary")
feedback_add_details("traitor_uplink_items_bought","BT")
- if("/obj/item/weapon/storage/syndie_kit/imp_freedom")
+ if("/obj/item/weapon/storage/box/syndie_kit/imp_freedom")
feedback_add_details("traitor_uplink_items_bought","FI")
if("/obj/item/clothing/glasses/thermal/syndi")
feedback_add_details("traitor_uplink_items_bought","TM")
diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm
deleted file mode 100755
index a5a3e15262c..00000000000
--- a/code/game/objects/items/item.dm
+++ /dev/null
@@ -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()]\] Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])"
- M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])"
-
- 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("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])" )
-
- //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 [M] has been [pick(src.attack_verb)] with [src][showname] ", 1)
- else
- O.show_message("\red [M] has been attacked with [src][showname] ", 1)
-
- if(!showname && user)
- if(user.client)
- user << "\red You attack [M] with [src]. "
-
-
-
- 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()]\] Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])"
- M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])"
-
- log_attack(" [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
-
- 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
-
-
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index b9dc3170434..3daa3078395 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -78,7 +78,7 @@
src.updateicon()
/obj/item/robot_parts/robot_suit/proc/updateicon()
- src.overlays = null
+ src.overlays.Cut()
if(src.l_arm)
src.overlays += "l_arm+o"
if(src.r_arm)
diff --git a/code/game/objects/items/shooting_range.dm b/code/game/objects/items/shooting_range.dm
index dce87fda314..6e3a893c9be 100644
--- a/code/game/objects/items/shooting_range.dm
+++ b/code/game/objects/items/shooting_range.dm
@@ -36,7 +36,7 @@
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
- overlays = null
+ overlays.Cut()
usr << "You slice off [src]'s uneven chunks of aluminum and scorch marks."
return
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index 63992bde103..659900aefc9 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -1,5 +1,14 @@
-
-//What is this even used for?
+/obj/item/stack/medical
+ name = "medical pack"
+ singular_name = "medical pack"
+ icon = 'icons/obj/items.dmi'
+ amount = 5
+ max_amount = 5
+ w_class = 1
+ throw_speed = 4
+ throw_range = 20
+ var/heal_brute = 0
+ var/heal_burn = 0
/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob)
if (M.stat == 2)
@@ -53,4 +62,63 @@
)
use(1)
+
M.updatehealth()
+/obj/item/stack/medical/bruise_pack
+ name = "bruise pack"
+ singular_name = "bruise pack"
+ desc = "A pack designed to treat blunt-force trauma."
+ icon_state = "brutepack"
+ heal_brute = 60
+ origin_tech = "biotech=1"
+
+/obj/item/stack/medical/ointment
+ name = "ointment"
+ desc = "Used to treat those nasty burns."
+ gender = PLURAL
+ singular_name = "ointment"
+ icon_state = "ointment"
+ heal_burn = 40
+ origin_tech = "biotech=1"
+
+/obj/item/stack/medical/bruise_pack/tajaran
+ name = "\improper S'rendarr's Hand leaf"
+ singular_name = "S'rendarr's Hand leaf"
+ desc = "A soft leaf that is rubbed on bruises."
+ icon = 'harvest.dmi'
+ icon_state = "cabbage"
+ heal_brute = 7
+
+/obj/item/stack/medical/ointment/tajaran
+ name = "\improper Messa's Tear leaf"
+ singular_name = "Messa's Tear leaf"
+ desc = "A cold leaf that is rubbed on burns."
+ icon = 'harvest.dmi'
+ icon_state = "ambrosiavulgaris"
+ heal_burn = 7
+
+/obj/item/stack/medical/advanced/bruise_pack
+ name = "advanced trauma kit"
+ singular_name = "advanced trauma kit"
+ desc = "An advanced trauma kit for severe injuries."
+ icon_state = "traumakit"
+ heal_brute = 12
+ origin_tech = "biotech=1"
+
+/obj/item/stack/medical/advanced/ointment
+ name = "advanced burn kit"
+ singular_name = "advanced burn kit"
+ desc = "An advanced treatment kit for severe burns."
+ icon_state = "burnkit"
+ heal_burn = 12
+ origin_tech = "biotech=1"
+
+/obj/item/stack/medical/splint
+ name = "medical splint"
+ singular_name = "medical splint"
+ icon_state = "splint"
+ amount = 5
+ max_amount = 5
+
+/obj/item/stack/medical/splint/single
+ amount = 1
diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm
index ed72df614d5..835666b7fe4 100644
--- a/code/game/objects/items/stacks/sheets/glass.dm
+++ b/code/game/objects/items/stacks/sheets/glass.dm
@@ -10,7 +10,7 @@
*/
/obj/item/stack/sheet/glass
name = "glass"
- desc = "HOLY HELL! That is a lot of glass."
+ desc = "HOLY SHEET! That is a lot of glass."
singular_name = "glass sheet"
icon_state = "sheet-glass"
g_amt = 3750
diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm
index 3045159a625..8ba88796363 100644
--- a/code/game/objects/items/stacks/sheets/leather.dm
+++ b/code/game/objects/items/stacks/sheets/leather.dm
@@ -33,6 +33,36 @@
icon_state = "sheet-lizard"
origin_tech = ""
+/obj/item/stack/sheet/animalhide/xeno
+ name = "alien hide"
+ desc = "The skin of a terrible creature."
+ singular_name = "alien hide piece"
+ icon_state = "sheet-xeno"
+ origin_tech = ""
+
+//don't see anywhere else to put these, maybe together they could be used to make the xenos suit?
+/obj/item/stack/sheet/xenochitin
+ name = "alien chitin"
+ desc = "A piece of the hide of a terrible creature."
+ singular_name = "alien hide piece"
+ icon = 'icons/mob/alien.dmi'
+ icon_state = "chitin"
+ origin_tech = ""
+
+/obj/item/xenos_claw
+ name = "alien claw"
+ desc = "The claw of a terrible creature."
+ icon = 'icons/mob/alien.dmi'
+ icon_state = "claw"
+ origin_tech = ""
+
+/obj/item/weed_extract
+ name = "weed extract"
+ desc = "A piece of slimy, purplish weed."
+ icon = 'icons/mob/alien.dmi'
+ icon_state = "weed_extract"
+ origin_tech = ""
+
/obj/item/stack/sheet/hairlesshide
name = "hairless hide"
desc = "This hide was stripped of it's hair, but still needs tanning."
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 111a9dfe73d..6c62365fdb3 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -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
@@ -128,12 +129,13 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
*/
var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \
- new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/lightbox/tubes), \
- new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/lightbox/bulbs), \
- new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/mousetraps), \
+ new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/box/lights/tubes), \
+ new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/box/lights/bulbs), \
+ new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/box/mousetraps), \
new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \
new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \
new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
+ new/datum/stack_recipe("folder", /obj/item/weapon/folder), \
)
/obj/item/stack/sheet/cardboard //BubbleWrap
diff --git a/code/game/objects/items/stacks/sheets/sheets.dm b/code/game/objects/items/stacks/sheets/sheets.dm
index b94acb367e4..fdcc6747b64 100644
--- a/code/game/objects/items/stacks/sheets/sheets.dm
+++ b/code/game/objects/items/stacks/sheets/sheets.dm
@@ -11,12 +11,16 @@
var/perunit = 3750
var/sheettype = null //this is used for girders in the creation of walls/false walls
-/obj/item/stack/sheet/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (istype(W, /obj/item/weapon/sheetsnatcher))
- var/obj/item/weapon/sheetsnatcher/S = W
+
+// Since the sheetsnatcher was consolidated into weapon/storage/bag we now use
+// item/attackby() properly, making this unnecessary
+
+/*/obj/item/stack/sheet/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if (istype(W, /obj/item/weapon/storage/bag/sheetsnatcher))
+ var/obj/item/weapon/storage/bag/sheetsnatcher/S = W
if(!S.mode)
S.add(src,user)
else
for (var/obj/item/stack/sheet/stack in locate(src.x,src.y,src.z))
S.add(stack,user)
- ..()
\ No newline at end of file
+ ..()*/
\ No newline at end of file
diff --git a/code/game/objects/items/stacks/tiles/light.dm b/code/game/objects/items/stacks/tiles/light.dm
index 460db9b7662..8fdcd7a5618 100644
--- a/code/game/objects/items/stacks/tiles/light.dm
+++ b/code/game/objects/items/stacks/tiles/light.dm
@@ -14,7 +14,7 @@
var/on = 1
var/state //0 = fine, 1 = flickering, 2 = breaking, 3 = broken
-/obj/item/stack/tile/light/New()
+/obj/item/stack/tile/light/New(var/loc, var/amount=null)
..()
if(prob(5))
state = 3 //broken
diff --git a/code/game/objects/items/stacks/tiles/plasteel.dm b/code/game/objects/items/stacks/tiles/plasteel.dm
index 212cec051d0..cbbf1811cc5 100644
--- a/code/game/objects/items/stacks/tiles/plasteel.dm
+++ b/code/game/objects/items/stacks/tiles/plasteel.dm
@@ -36,7 +36,10 @@
*/
/obj/item/stack/tile/plasteel/proc/build(turf/S as turf)
- S.ChangeTurf(/turf/simulated/floor/plating)
+ if (istype(S,/turf/space))
+ S.ChangeTurf(/turf/simulated/floor/plating/airless)
+ else
+ S.ChangeTurf(/turf/simulated/floor/plating)
// var/turf/simulated/floor/W = S.ReplaceWithFloor()
// W.make_plating()
return
\ No newline at end of file
diff --git a/code/game/objects/items/tk_grab.dm b/code/game/objects/items/tk_grab.dm
index 654c6e7e06c..11863e9ae2c 100644
--- a/code/game/objects/items/tk_grab.dm
+++ b/code/game/objects/items/tk_grab.dm
@@ -97,7 +97,7 @@
update_icon()
- overlays = null
+ overlays.Cut()
if(focus && focus.icon && focus.icon_state)
overlays += icon(focus.icon,focus.icon_state)
return
diff --git a/code/defines/obj/toy.dm b/code/game/objects/items/toys.dm
similarity index 84%
rename from code/defines/obj/toy.dm
rename to code/game/objects/items/toys.dm
index d9ee6a9d048..6c3814a8010 100644
--- a/code/defines/obj/toy.dm
+++ b/code/game/objects/items/toys.dm
@@ -1,3 +1,17 @@
+/* Toys!
+ * ContainsL
+ * Balloons
+ * Fake telebeacon
+ * Fake singularity
+ * Toy gun
+ * Toy crossbow
+ * Toy swords
+ * Crayons
+ * Snap pops
+ * Water flower
+ */
+
+
/obj/item/toy
throwforce = 0
throw_speed = 4
@@ -5,83 +19,68 @@
force = 0
-/////////Toy Mechs/////////
-
-/obj/item/toy/prize
+/*
+ * Balloons
+ */
+/obj/item/toy/balloon
+ name = "water balloon"
+ desc = "A translucent balloon. There's nothing in it."
icon = 'icons/obj/toy.dmi'
- icon_state = "ripleytoy"
- var/cooldown = 0
+ icon_state = "waterballoon-e"
+ item_state = "balloon-empty"
-//all credit to skasi for toy mech fun ideas
-/obj/item/toy/prize/attack_self(mob/user as mob)
- if(cooldown < world.time - 8)
- user << "You play with [src]."
- playsound(user, 'sound/mecha/mechstep.ogg', 20, 1)
- cooldown = world.time
+/obj/item/toy/balloon/New()
+ var/datum/reagents/R = new/datum/reagents(10)
+ reagents = R
+ R.my_atom = src
-/obj/item/toy/prize/attack_hand(mob/user as mob)
- if(loc == user)
- if(cooldown < world.time - 8)
- user << "You play with [src]."
- playsound(user, 'sound/mecha/mechturn.ogg', 20, 1)
- cooldown = world.time
- return
- ..()
+/obj/item/toy/balloon/attack(mob/living/carbon/human/M as mob, mob/user as mob)
+ return
-/obj/item/toy/prize/ripley
- name = "toy ripley"
- desc = "Mini-Mecha action figure! Collect them all! 1/11. Send the full collection in a closed crate to CentCom at your local quartermaster for a GREAT reward!"
+/obj/item/toy/balloon/afterattack(atom/A as mob|obj, mob/user as mob)
+ if (istype(A, /obj/structure/reagent_dispensers/watertank) && get_dist(src,A) <= 1)
+ A.reagents.trans_to(src, 10)
+ user << "\blue You fill the balloon with the contents of [A]."
+ src.desc = "A translucent balloon with some form of liquid sloshing around in it."
+ src.update_icon()
+ return
-/obj/item/toy/prize/fireripley
- name = "toy firefighting ripley"
- desc = "Mini-Mecha action figure! Collect them all! 2/11. Send the full collection in a closed crate to CentCom at your local quartermaster for a GREAT reward!"
- icon_state = "fireripleytoy"
+/obj/item/toy/balloon/attackby(obj/O as obj, mob/user as mob)
+ if(istype(O, /obj/item/weapon/reagent_containers/glass))
+ if(O.reagents)
+ if(O.reagents.total_volume < 1)
+ user << "The [O] is empty."
+ else if(O.reagents.total_volume >= 1)
+ if(O.reagents.has_reagent("pacid", 1))
+ user << "The acid chews through the balloon!"
+ O.reagents.reaction(user)
+ del(src)
+ else
+ src.desc = "A translucent balloon with some form of liquid sloshing around in it."
+ user << "\blue You fill the balloon with the contents of [O]."
+ O.reagents.trans_to(src, 10)
+ src.update_icon()
+ return
-/obj/item/toy/prize/deathripley
- name = "toy deathsquad ripley"
- desc = "Mini-Mecha action figure! Collect them all! 3/11. Send the full collection in a closed crate to CentCom at your local quartermaster for a GREAT reward!"
- icon_state = "deathripleytoy"
-
-/obj/item/toy/prize/gygax
- name = "toy gygax"
- desc = "Mini-Mecha action figure! Collect them all! 4/11. Send the full collection in a closed crate to CentCom at your local quartermaster for a GREAT reward!"
- icon_state = "gygaxtoy"
-
-/obj/item/toy/prize/durand
- name = "toy durand"
- desc = "Mini-Mecha action figure! Collect them all! 5/11. Send the full collection in a closed crate to CentCom at your local quartermaster for a GREAT reward!"
- icon_state = "durandprize"
-
-/obj/item/toy/prize/honk
- name = "toy H.O.N.K."
- desc = "Mini-Mecha action figure! Collect them all! 6/11. Send the full collection in a closed crate to CentCom at your local quartermaster for a GREAT reward!"
- icon_state = "honkprize"
-
-/obj/item/toy/prize/marauder
- name = "toy marauder"
- desc = "Mini-Mecha action figure! Collect them all! 7/11. Send the full collection in a closed crate to CentCom at your local quartermaster for a GREAT reward!"
- icon_state = "marauderprize"
-
-/obj/item/toy/prize/seraph
- name = "toy seraph"
- desc = "Mini-Mecha action figure! Collect them all! 8/11. Send the full collection in a closed crate to CentCom at your local quartermaster for a GREAT reward!"
- icon_state = "seraphprize"
-
-/obj/item/toy/prize/mauler
- name = "toy mauler"
- desc = "Mini-Mecha action figure! Collect them all! 9/11. Send the full collection in a closed crate to CentCom at your local quartermaster for a GREAT reward!"
- icon_state = "maulerprize"
-
-/obj/item/toy/prize/odysseus
- name = "toy odysseus"
- desc = "Mini-Mecha action figure! Collect them all! 10/11. Send the full collection in a closed crate to CentCom at your local quartermaster for a GREAT reward!"
- icon_state = "odysseusprize"
-
-/obj/item/toy/prize/phazon
- name = "toy phazon"
- desc = "Mini-Mecha action figure! Collect them all! 11/11. Send the full collection in a closed crate to CentCom at your local quartermaster for a GREAT reward!"
- icon_state = "phazonprize"
+/obj/item/toy/balloon/throw_impact(atom/hit_atom)
+ if(src.reagents.total_volume >= 1)
+ src.visible_message("\red The [src] bursts!","You hear a pop and a splash.")
+ src.reagents.reaction(get_turf(hit_atom))
+ for(var/atom/A in get_turf(hit_atom))
+ src.reagents.reaction(A)
+ src.icon_state = "burst"
+ spawn(5)
+ if(src)
+ del(src)
+ return
+/obj/item/toy/balloon/update_icon()
+ if(src.reagents.total_volume >= 1)
+ icon_state = "waterballoon"
+ item_state = "balloon"
+ else
+ icon_state = "waterballoon-e"
+ item_state = "balloon-empty"
/obj/item/toy/syndicateballoon
name = "syndicate balloon"
@@ -95,6 +94,9 @@
item_state = "syndballoon"
w_class = 4.0
+/*
+ * Fake telebeacon
+ */
/obj/item/toy/blink
name = "electronic blink toy game"
desc = "Blink. Blink. Blink. Ages 8 and up."
@@ -102,44 +104,18 @@
icon_state = "beacon"
item_state = "signaler"
+/*
+ * Fake singularity
+ */
/obj/item/toy/spinningtoy
name = "Gravitational Singularity"
desc = "\"Singulo\" brand spinning toy."
icon = 'icons/obj/singularity.dmi'
icon_state = "singularity_s1"
-/obj/item/toy/ammo/gun
- name = "ammo-caps"
- desc = "There are 7 caps left! Make sure to recyle the box in an autolathe when it gets empty."
- icon = 'icons/obj/ammo.dmi'
- icon_state = "357-7"
- flags = FPRINT | TABLEPASS| CONDUCT
- w_class = 1.0
- g_amt = 10
- m_amt = 10
- var/amount_left = 7.0
-
- update_icon()
- src.icon_state = text("357-[]", src.amount_left)
- src.desc = text("There are [] caps\s left! Make sure to recycle the box in an autolathe when it gets empty.", src.amount_left)
- return
-
-/obj/item/toy/ammo/crossbow
- name = "foam dart"
- desc = "Its nerf or nothing! Ages 8 and up."
- icon = 'icons/obj/toy.dmi'
- icon_state = "foamdart"
- flags = FPRINT | TABLEPASS
- w_class = 1.0
-
-/obj/effect/foam_dart_dummy
- name = ""
- desc = ""
- icon = 'icons/obj/toy.dmi'
- icon_state = "null"
- anchored = 1
- density = 0
-
+/*
+ * Toy gun: Why isnt this an /obj/item/weapon/gun?
+ */
/obj/item/toy/gun
name = "cap gun"
desc = "There are 0 caps left. Looks almost like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps!"
@@ -191,40 +167,33 @@
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--
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [] fires a cap gun at []!", user, target), 1, "\red You hear a gunshot", 2)
-/obj/item/toy/sword
- name = "toy sword"
- desc = "A cheap, plastic replica of an energy sword. Realistic sounds! Ages 8 and up."
- icon = 'icons/obj/weapons.dmi'
- icon_state = "sword0"
- item_state = "sword0"
- var/active = 0.0
- w_class = 2.0
- flags = FPRINT | TABLEPASS | NOSHIELD
- attack_verb = list("attacked", "struck", "hit")
+/obj/item/toy/ammo/gun
+ name = "ammo-caps"
+ desc = "There are 7 caps left! Make sure to recyle the box in an autolathe when it gets empty."
+ icon = 'icons/obj/ammo.dmi'
+ icon_state = "357-7"
+ flags = FPRINT | TABLEPASS| CONDUCT
+ w_class = 1.0
+ g_amt = 10
+ m_amt = 10
+ var/amount_left = 7.0
- attack_self(mob/user as mob)
- src.active = !( src.active )
- if (src.active)
- user << "\blue You extend the plastic blade with a quick flick of your wrist."
- playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
- src.icon_state = "swordblue"
- src.item_state = "swordblue"
- src.w_class = 4
- else
- user << "\blue You push the plastic blade back down into the handle."
- playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
- src.icon_state = "sword0"
- src.item_state = "sword0"
- src.w_class = 2
- src.add_fingerprint(user)
+ update_icon()
+ src.icon_state = text("357-[]", src.amount_left)
+ src.desc = text("There are [] caps\s left! Make sure to recycle the box in an autolathe when it gets empty.", src.amount_left)
return
+/*
+ * Toy crossbow
+ */
+
/obj/item/toy/crossbow
name = "foam dart crossbow"
desc = "A weapon favored by many overactive children. Ages 8 and up."
@@ -322,16 +291,70 @@
user.Weaken(5)
return
-/obj/item/weapon/storage/crayonbox
- name = "box of crayons"
- desc = "A box of crayons for all your rune drawing needs."
- icon = 'icons/obj/crayons.dmi'
- icon_state = "crayonbox"
+/obj/item/toy/ammo/crossbow
+ name = "foam dart"
+ desc = "Its nerf or nothing! Ages 8 and up."
+ icon = 'icons/obj/toy.dmi'
+ icon_state = "foamdart"
+ flags = FPRINT | TABLEPASS
+ w_class = 1.0
+
+/obj/effect/foam_dart_dummy
+ name = ""
+ desc = ""
+ icon = 'icons/obj/toy.dmi'
+ icon_state = "null"
+ anchored = 1
+ density = 0
+
+
+/*
+ * Toy swords
+ */
+/obj/item/toy/sword
+ name = "toy sword"
+ desc = "A cheap, plastic replica of an energy sword. Realistic sounds! Ages 8 and up."
+ icon = 'icons/obj/weapons.dmi'
+ icon_state = "sword0"
+ item_state = "sword0"
+ var/active = 0.0
w_class = 2.0
- storage_slots = 6
- can_hold = list(
- "/obj/item/toy/crayon"
- )
+ flags = FPRINT | TABLEPASS | NOSHIELD
+ attack_verb = list("attacked", "struck", "hit")
+
+ attack_self(mob/user as mob)
+ src.active = !( src.active )
+ if (src.active)
+ user << "\blue You extend the plastic blade with a quick flick of your wrist."
+ playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
+ src.icon_state = "swordblue"
+ src.item_state = "swordblue"
+ src.w_class = 4
+ else
+ user << "\blue You push the plastic blade back down into the handle."
+ playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
+ src.icon_state = "sword0"
+ src.item_state = "sword0"
+ src.w_class = 2
+ src.add_fingerprint(user)
+ return
+
+/obj/item/toy/katana
+ name = "replica katana"
+ desc = "Woefully underpowered in D20."
+ icon = 'icons/obj/weapons.dmi'
+ icon_state = "katana"
+ item_state = "katana"
+ flags = FPRINT | TABLEPASS | CONDUCT
+ slot_flags = SLOT_BELT | SLOT_BACK
+ force = 5
+ throwforce = 5
+ w_class = 3
+ attack_verb = list("attacked", "slashed", "stabbed", "sliced")
+
+/*
+ * Crayons
+ */
/obj/item/toy/crayon
name = "crayon"
@@ -346,6 +369,13 @@
var/instant = 0
var/colourName = "red" //for updateIcon purposes
+ suicide_act(mob/user)
+ viewers(user) << "\red [user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide."
+ return (BRUTELOSS|OXYLOSS)
+
+/*
+ * Snap pops
+ */
/obj/item/toy/snappop
name = "snap pop"
desc = "Wow!"
@@ -377,6 +407,9 @@
playsound(src, 'sound/effects/snap.ogg', 50, 1)
del(src)
+/*
+ * Water flower
+ */
/obj/item/toy/waterflower
name = "Water Flower"
desc = "A seemingly innocent sunflower...with a twist."
@@ -444,66 +477,85 @@
..()
return
-/obj/item/toy/balloon
- name = "water balloon"
- desc = "A translucent balloon. There's nothing in it."
+
+/*
+ * Mech prizes
+ */
+/obj/item/toy/prize
icon = 'icons/obj/toy.dmi'
- icon_state = "waterballoon-e"
- item_state = "balloon-empty"
+ icon_state = "ripleytoy"
+ var/cooldown = 0
-/obj/item/toy/balloon/New()
- var/datum/reagents/R = new/datum/reagents(10)
- reagents = R
- R.my_atom = src
+//all credit to skasi for toy mech fun ideas
+/obj/item/toy/prize/attack_self(mob/user as mob)
+ if(cooldown < world.time - 8)
+ user << "You play with [src]."
+ playsound(user, 'sound/mecha/mechstep.ogg', 20, 1)
+ cooldown = world.time
-/obj/item/toy/balloon/attack(mob/living/carbon/human/M as mob, mob/user as mob)
- return
+/obj/item/toy/prize/attack_hand(mob/user as mob)
+ if(loc == user)
+ if(cooldown < world.time - 8)
+ user << "You play with [src]."
+ playsound(user, 'sound/mecha/mechturn.ogg', 20, 1)
+ cooldown = world.time
+ return
+ ..()
-/obj/item/toy/balloon/afterattack(atom/A as mob|obj, mob/user as mob)
- if (istype(A, /obj/structure/reagent_dispensers/watertank) && get_dist(src,A) <= 1)
- A.reagents.trans_to(src, 10)
- user << "\blue You fill the balloon with the contents of [A]."
- src.desc = "A translucent balloon with some form of liquid sloshing around in it."
- src.update_icon()
- return
+/obj/item/toy/prize/ripley
+ name = "toy ripley"
+ desc = "Mini-Mecha action figure! Collect them all! 1/11."
-/obj/item/toy/balloon/attackby(obj/O as obj, mob/user as mob)
- if(istype(O, /obj/item/weapon/reagent_containers/glass))
- if(O.reagents)
- if(O.reagents.total_volume < 1)
- user << "The [O] is empty."
- else if(O.reagents.total_volume >= 1)
- if(O.reagents.has_reagent("pacid", 1))
- user << "The acid chews through the balloon!"
- O.reagents.reaction(user)
- del(src)
- else
- src.desc = "A translucent balloon with some form of liquid sloshing around in it."
- user << "\blue You fill the balloon with the contents of [O]."
- O.reagents.trans_to(src, 10)
- src.update_icon()
- return
+/obj/item/toy/prize/fireripley
+ name = "toy firefighting ripley"
+ desc = "Mini-Mecha action figure! Collect them all! 2/11."
+ icon_state = "fireripleytoy"
-/obj/item/toy/balloon/throw_impact(atom/hit_atom)
- if(src.reagents.total_volume >= 1)
- src.visible_message("\red The [src] bursts!","You hear a pop and a splash.")
- src.reagents.reaction(get_turf(hit_atom))
- for(var/atom/A in get_turf(hit_atom))
- src.reagents.reaction(A)
- src.icon_state = "burst"
- spawn(5)
- if(src)
- del(src)
- return
+/obj/item/toy/prize/deathripley
+ name = "toy deathsquad ripley"
+ desc = "Mini-Mecha action figure! Collect them all! 3/11."
+ icon_state = "deathripleytoy"
-/obj/item/toy/balloon/update_icon()
- if(src.reagents.total_volume >= 1)
- icon_state = "waterballoon"
- item_state = "balloon"
- else
- icon_state = "waterballoon-e"
- item_state = "balloon-empty"
+/obj/item/toy/prize/gygax
+ name = "toy gygax"
+ desc = "Mini-Mecha action figure! Collect them all! 4/11."
+ icon_state = "gygaxtoy"
+
+/obj/item/toy/prize/durand
+ name = "toy durand"
+ desc = "Mini-Mecha action figure! Collect them all! 5/11."
+ icon_state = "durandprize"
+
+/obj/item/toy/prize/honk
+ name = "toy H.O.N.K."
+ desc = "Mini-Mecha action figure! Collect them all! 6/11."
+ icon_state = "honkprize"
+
+/obj/item/toy/prize/marauder
+ name = "toy marauder"
+ desc = "Mini-Mecha action figure! Collect them all! 7/11."
+ icon_state = "marauderprize"
+
+/obj/item/toy/prize/seraph
+ name = "toy seraph"
+ desc = "Mini-Mecha action figure! Collect them all! 8/11."
+ icon_state = "seraphprize"
+
+/obj/item/toy/prize/mauler
+ name = "toy mauler"
+ desc = "Mini-Mecha action figure! Collect them all! 9/11."
+ icon_state = "maulerprize"
+
+/obj/item/toy/prize/odysseus
+ name = "toy odysseus"
+ desc = "Mini-Mecha action figure! Collect them all! 10/11."
+ icon_state = "odysseusprize"
+
+/obj/item/toy/prize/phazon
+ name = "toy phazon"
+ desc = "Mini-Mecha action figure! Collect them all! 11/11."
+ icon_state = "phazonprize"
/obj/item/toy/katana
name = "replica katana"
desc = "Woefully underpowered in D20."
@@ -523,4 +575,4 @@
desc = "This baby looks almost real. Wait, did it just burp?"
force = 5
w_class = 4.0
- slot_flags = SLOT_BACK
+ slot_flags = SLOT_BACK
diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm
index 298cfb1a48c..a80a892af6f 100644
--- a/code/game/objects/items/weapons/RCD.dm
+++ b/code/game/objects/items/weapons/RCD.dm
@@ -184,3 +184,16 @@ RCD
..()
desc = "A device used to rapidly build walls/floor."
canRwall = 1
+
+/obj/item/weapon/rcd_ammo
+ name = "compressed matter cartridge"
+ desc = "Highly compressed matter for the RCD."
+ icon = 'icons/obj/ammo.dmi'
+ icon_state = "rcd"
+ item_state = "rcdammo"
+ opacity = 0
+ density = 0
+ anchored = 0.0
+ origin_tech = "materials=2"
+ m_amt = 30000
+ g_amt = 15000
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm
index b122382e5fe..5ffed7b6d1a 100644
--- a/code/game/objects/items/weapons/RSF.dm
+++ b/code/game/objects/items/weapons/RSF.dm
@@ -3,6 +3,19 @@ CONTAINS:
RSF
*/
+/obj/item/weapon/rsf
+ name = "\improper Rapid-Service-Fabricator"
+ desc = "A device used to rapidly deploy service items."
+ icon = 'icons/obj/items.dmi'
+ icon_state = "rcd"
+ opacity = 0
+ density = 0
+ anchored = 0.0
+ var/matter = 0
+ var/mode = 1
+ flags = TABLEPASS
+ w_class = 3.0
+
/obj/item/weapon/rsf/New()
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
@@ -168,7 +181,7 @@ RSF
if (istype(A, /obj/structure/table) && matter >= 1)
user << "Dispensing Dice Pack..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
- new /obj/item/weapon/storage/dice( A.loc )
+ new /obj/item/weapon/storage/pill_bottle/dice( A.loc )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200
@@ -182,7 +195,7 @@ RSF
if (istype(A, /turf/simulated/floor) && matter >= 1)
user << "Dispensing Dice Pack..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
- new /obj/item/weapon/storage/dice( A )
+ new /obj/item/weapon/storage/pill_bottle/dice( A )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index 65c442aac81..649a4fe713c 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -11,6 +11,24 @@
/*
* DATA CARDS - Used for the teleporter
*/
+/obj/item/weapon/card
+ name = "card"
+ desc = "Does card things."
+ icon = 'icons/obj/card.dmi'
+ w_class = 1.0
+ var/associated_account_number = 0
+
+ var/list/files = list( )
+
+/obj/item/weapon/card/data
+ name = "data disk"
+ desc = "A disk of data."
+ icon_state = "data"
+ var/function = "storage"
+ var/data = "null"
+ var/special = null
+ item_state = "card-id"
+
/obj/item/weapon/card/data/verb/label(t as text)
set name = "Label Disk"
set category = "Object"
@@ -23,21 +41,44 @@
src.add_fingerprint(usr)
return
+/obj/item/weapon/card/data/clown
+ name = "coordinates to clown planet"
+ icon_state = "data"
+ item_state = "card-id"
+ layer = 3
+ level = 2
+ desc = "This card contains coordinates to the fabled Clown Planet. Handle with care."
+ function = "teleporter"
+ data = "Clown Land"
/*
* ID CARDS
*/
-/obj/item/weapon/card/id/examine()
- ..()
- read()
+/obj/item/weapon/card/emag
+ desc = "It's a card with a magnetic strip attached to some circuitry."
+ name = "cryptographic sequencer"
+ icon_state = "emag"
+ item_state = "card-id"
+ origin_tech = "magnets=2;syndicate=2"
+ var/uses = 10
-/obj/item/weapon/card/id/New()
- ..()
- spawn(30)
- if(istype(loc, /mob/living/carbon/human))
- blood_type = loc:dna:b_type
- dna_hash = loc:dna:unique_enzymes
- fingerprint_hash = md5(loc:dna:uni_identity)
+/obj/item/weapon/card/id
+ name = "identification card"
+ desc = "A card used to provide ID and determine access across the station."
+ icon_state = "id"
+ item_state = "card-id"
+ var/access = list()
+ var/registered_name = null // The name registered_name on the card
+ slot_flags = SLOT_ID
+
+ var/blood_type = "\[UNSET\]"
+ var/dna_hash = "\[UNSET\]"
+ var/fingerprint_hash = "\[UNSET\]"
+
+ //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)
for(var/mob/O in viewers(user, null))
@@ -46,13 +87,11 @@
src.add_fingerprint(user)
return
-/obj/item/weapon/card/id/attack_hand(mob/user as mob)
- var/obj/item/weapon/storage/wallet/WL
- if( istype(loc, /obj/item/weapon/storage/wallet) )
- WL = loc
- ..()
- if(WL)
- WL.update_icon()
+/obj/item/weapon/card/id/GetAccess()
+ return access
+
+/obj/item/weapon/card/id/GetID()
+ return src
/obj/item/weapon/card/id/verb/read()
set name = "Read ID Card"
@@ -65,11 +104,38 @@
usr << "The fingerprint hash on the card is [fingerprint_hash]."
return
+
+/obj/item/weapon/card/id/silver
+ name = "identification card"
+ desc = "A silver card which shows honour and dedication."
+ icon_state = "silver"
+ item_state = "silver_id"
+
+/obj/item/weapon/card/id/gold
+ name = "identification card"
+ desc = "A golden card which shows power and might."
+ icon_state = "gold"
+ item_state = "gold_id"
+
+/obj/item/weapon/card/id/syndicate
+ name = "agent card"
+ access = list(access_maint_tunnels, access_syndicate)
+ origin_tech = "syndicate=3"
+
+/obj/item/weapon/card/id/syndicate/afterattack(var/obj/item/weapon/O as obj, mob/user as mob)
+ if(istype(O, /obj/item/weapon/card/id))
+ var/obj/item/weapon/card/id/I = O
+ src.access |= I.access
+ if(istype(user, /mob/living) && user.mind)
+ if(user.mind.special_role)
+ usr << "\blue The card's microscanners activate as you pass it over the ID, copying its access."
+
+
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
if(!src.registered_name)
//Stop giving the players unsanitized unputs! You are giving ways for players to intentionally crash clients! -Nodrak
- var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)),1,26)
- if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall" || t == "") //Same as mob/new_player/prefrences.dm
+ var t = reject_bad_name(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name))
+ if(!t) //Same as mob/new_player/prefrences.dm
alert("Invalid name.")
return
src.registered_name = t
@@ -84,3 +150,32 @@
user << "\blue You successfully forge the ID card."
else
..()
+
+/obj/item/weapon/card/id/syndicate_command
+ name = "syndicate ID card"
+ desc = "An ID straight from the Syndicate."
+ registered_name = "Syndicate"
+ assignment = "Syndicate Overlord"
+ access = list(access_syndicate)
+
+/obj/item/weapon/card/id/captains_spare
+ name = "captain's spare ID"
+ desc = "The spare ID of the High Lord himself."
+ icon_state = "gold"
+ item_state = "gold_id"
+ registered_name = "Captain"
+ assignment = "Captain"
+ New()
+ var/datum/job/captain/J = new/datum/job/captain
+ access = J.get_access()
+ ..()
+
+/obj/item/weapon/card/id/centcom
+ name = "\improper CentCom. ID"
+ desc = "An ID straight from Cent. Com."
+ icon_state = "centcom"
+ registered_name = "Central Command"
+ assignment = "General"
+ New()
+ access = get_all_centcom_access()
+ ..()
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm
index 5d5b6d6ea48..dff332f2a6f 100644
--- a/code/game/objects/items/weapons/cigs_lighters.dm
+++ b/code/game/objects/items/weapons/cigs_lighters.dm
@@ -6,9 +6,10 @@ MATCHES
CIGARETTES
CIGARS
SMOKING PIPES
-CIG PACKET
CHEAP LIGHTERS
ZIPPO
+
+CIGARETTE PACKETS ARE IN FANCY.DM
*/
///////////
@@ -62,7 +63,7 @@ ZIPPO
var/lit = 0
var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
var/icon_off = "cigoff"
- var/butt_icon = "cigbutt"
+ var/type_butt = /obj/item/weapon/cigbutt
var/lastHolder = null
var/smoketime = 300
var/chem_volume = 15
@@ -85,12 +86,12 @@ ZIPPO
else if(istype(W, /obj/item/weapon/lighter/zippo))
var/obj/item/weapon/lighter/zippo/Z = W
- if(Z.light_on)
+ if(Z.lit)
light("With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.")
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
- if(L.light_on)
+ if(L.lit)
light("After some fiddling, [user] manages to light their [name] with [W].")
else if(istype(W, /obj/item/weapon/match))
@@ -115,16 +116,15 @@ ZIPPO
/obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob)
..()
- if(lit == 0)
- if(istype(glass)) //you can dip cigarettes into beakers
- var/transfered = glass.reagents.trans_to(src, chem_volume)
- if(transfered) //if reagents were transfered, show the message
- user << "You dip \the [src] into \the [glass]."
- else //if not, either the beaker was empty, or the cigarette was full
- if(!glass.reagents.total_volume)
- user << "[glass] is empty."
- else
- user << "[src] is full."
+ if(istype(glass)) //you can dip cigarettes into beakers
+ var/transfered = glass.reagents.trans_to(src, chem_volume)
+ if(transfered) //if reagents were transfered, show the message
+ user << "You dip \the [src] into \the [glass]."
+ else //if not, either the beaker was empty, or the cigarette was full
+ if(!glass.reagents.total_volume)
+ user << "[glass] is empty."
+ else
+ user << "[src] is full."
/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].")
@@ -156,50 +156,38 @@ ZIPPO
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
- put_out()
+ new type_butt(location)
+ processing_objects.Remove(src)
if(ismob(loc))
var/mob/living/M = loc
M << "Your [name] goes out."
- //M.u_equip(src) //un-equip it so the overlays can update
- //M.update_inv_wear_mask(0)
+ M.u_equip(src) //un-equip it so the overlays can update
+ M.update_inv_wear_mask(0)
+ del(src)
return
- if(lit == 1)
- if(location)
- location.hotspot_expose(700, 5)
- if(reagents && reagents.total_volume) // check if it has any reagents at all
- if(iscarbon(loc) && (src == loc:wear_mask)) // if it's in the human/monkey mouth, transfer reagents to the mob
- var/mob/living/carbon/C = loc
- if(prob(15)) // so it's not an instarape in case of acid
- reagents.reaction(C, INGEST)
- reagents.trans_to(C, REAGENTS_METABOLISM)
- else // else just remove some of the reagents
- reagents.remove_any(REAGENTS_METABOLISM)
+ if(location)
+ location.hotspot_expose(700, 5)
+ if(reagents && reagents.total_volume) // check if it has any reagents at all
+ if(iscarbon(loc) && (src == loc:wear_mask)) // if it's in the human/monkey mouth, transfer reagents to the mob
+ var/mob/living/carbon/C = loc
+ if(prob(15)) // so it's not an instarape in case of acid
+ reagents.reaction(C, INGEST)
+ reagents.trans_to(C, REAGENTS_METABOLISM)
+ else // else just remove some of the reagents
+ reagents.remove_any(REAGENTS_METABOLISM)
return
/obj/item/clothing/mask/cigarette/attack_self(mob/user as mob)
if(lit == 1)
- var/mob/living/carbon/human/H = user
- if(H.shoes)
- user.visible_message("[user] crushes [src] on the sole of his shoes, putting it out instantly.")
- else
- user.visible_message("[user] spits oh his fingers, then puts down [src].")
- put_out()
+ user.visible_message("[user] calmly drops and treads on the lit [src], putting it out instantly.")
+ var/turf/T = get_turf(src)
+ new type_butt(T)
+ processing_objects.Remove(src)
+ del(src)
return ..()
-/obj/item/clothing/mask/cigarette/proc/put_out()
- if(src.lit == 1)
- src.lit = -1
- icon_state = src.butt_icon
- desc = "Old manky [src] butt."
- name = "[src] butt"
- attack_verb = list("poked")
- processing_objects.Remove(src)
- if (usr)
- usr.update_inv_l_hand()
- usr.update_inv_r_hand()
-
////////////
// CIGARS //
@@ -210,7 +198,7 @@ ZIPPO
icon_state = "cigaroff"
icon_on = "cigaron"
icon_off = "cigaroff"
- butt_icon = "cigarbutt"
+ type_butt = /obj/item/weapon/cigbutt/cigarbutt
throw_speed = 0.5
item_state = "cigaroff"
smoketime = 1500
@@ -246,6 +234,12 @@ ZIPPO
icon_state = "cigarbutt"
+/obj/item/clothing/mask/cigarette/cigar/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if(istype(W, /obj/item/weapon/match))
+ ..()
+ else
+ user << "\The [src] straight out REFUSES to be lit by such uncivilized means."
+
/////////////////
//SMOKING PIPES//
/////////////////
@@ -299,6 +293,12 @@ ZIPPO
smoketime = initial(smoketime)
return
+/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if(istype(W, /obj/item/weapon/match))
+ ..()
+ else
+ user << "\The [src] straight out REFUSES to be lit by such means."
+
/obj/item/clothing/mask/cigarette/pipe/cobpipe
name = "corn cob pipe"
desc = "A nicotine delivery system popularized by folksy backwoodsmen and kept popular in the modern age and beyond by space hipsters."
@@ -308,56 +308,7 @@ ZIPPO
icon_off = "cobpipeoff"
smoketime = 400
-////////////
-//CIG PACK//
-////////////
-/obj/item/weapon/cigpacket
- name = "cigarette packet"
- desc = "The most popular brand of Space Cigarettes, sponsors of the Space Olympics."
- icon = 'icons/obj/cigarettes.dmi'
- icon_state = "cigpacket"
- item_state = "cigpacket"
- w_class = 1
- throwforce = 2
- flags = TABLEPASS
- slot_flags = SLOT_BELT
- var/cigcount = 6
-/obj/item/weapon/cigpacket/New()
- ..()
- flags |= NOREACT
- create_reagents(15*cigcount)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one
-
-/obj/item/weapon/cigpacket/Del()
- ..()
- del(reagents)
-
-/obj/item/weapon/cigpacket/update_icon()
- icon_state = "[initial(icon_state)][cigcount]"
- desc = "There are [cigcount] cig\s left!"
- return
-
-/obj/item/weapon/cigpacket/attack_hand(mob/user as mob)
- if(user.r_hand == src || user.l_hand == src)
- if(cigcount == 0)
- user << "You're out of cigs, shit! How you gonna get through the rest of the day..."
- return
- else
- var/obj/item/clothing/mask/cigarette/W = new /obj/item/clothing/mask/cigarette(user)
- reagents.trans_to(W, (reagents.total_volume/cigcount))
- user.put_in_active_hand(W)
- reagents.maximum_volume = 15*cigcount
- cigcount--
- else
- return ..()
- update_icon()
- return
-
-/obj/item/weapon/cigpacket/dromedaryco
- name = "DromedaryCo packet"
- desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
- icon_state = "Dpacket"
- item_state = "Dpacket"
/////////
//ZIPPO//
@@ -375,8 +326,7 @@ ZIPPO
flags = TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
attack_verb = list("burnt", "singed")
- light_on = 0
- brightness_on = 2 //luminosity when on
+ var/lit = 0
/obj/item/weapon/lighter/zippo
name = "Zippo lighter"
@@ -395,28 +345,24 @@ ZIPPO
/obj/item/weapon/lighter/attack_self(mob/living/user)
if(user.r_hand == src || user.l_hand == src)
- if(!light_on)
- light_on = 1
+ if(!lit)
+ lit = 1
icon_state = icon_on
item_state = icon_on
if(istype(src, /obj/item/weapon/lighter/zippo) )
user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.")
else
- if(prob(90))
+ if(prob(75))
user.visible_message("After a few attempts, [user] manages to light the [src].")
else
user << "You burn yourself while lighting the lighter."
- if (user.l_hand == src)
- user.apply_damage(2,BURN,"l_hand")
- else
- user.apply_damage(2,BURN,"r_hand")
+ user.adjustFireLoss(5)
user.visible_message("After a few attempts, [user] manages to light the [src], they however burn their finger in the process.")
- if (user.luminosity < brightness_on)
- user.SetLuminosity(brightness_on)
+ user.SetLuminosity(user.luminosity + 2)
processing_objects.Add(src)
else
- light_on = 0
+ lit = 0
icon_state = icon_off
item_state = icon_off
if(istype(src, /obj/item/weapon/lighter/zippo) )
@@ -424,7 +370,7 @@ ZIPPO
else
user.visible_message("[user] quietly shuts off the [src].")
- user.SetLuminosity(search_light(user, src))
+ user.SetLuminosity(user.luminosity - 2)
processing_objects.Remove(src)
else
return ..()
@@ -435,7 +381,7 @@ ZIPPO
if(!istype(M, /mob))
return
- if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && light_on)
+ if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && lit)
var/obj/item/clothing/mask/cigarette/cig = M.wear_mask
if(M == user)
cig.attackby(src, user)
@@ -455,24 +401,14 @@ ZIPPO
/obj/item/weapon/lighter/pickup(mob/user)
- if(light_on)
- if (user.luminosity < brightness_on)
- user.SetLuminosity(brightness_on)
+ if(lit)
SetLuminosity(0)
+ user.SetLuminosity(user.luminosity+2)
return
/obj/item/weapon/lighter/dropped(mob/user)
- if(light_on)
- if ((layer <= 3) || (loc != user.loc))
- user.SetLuminosity(search_light(user, src))
- SetLuminosity(brightness_on)
- return
-
-
-/obj/item/weapon/lighter/equipped(mob/user, slot)
- if(light_on)
- if (user.luminosity < brightness_on)
- user.SetLuminosity(brightness_on)
- SetLuminosity(0)
+ if(lit)
+ user.SetLuminosity(user.luminosity-2)
+ SetLuminosity(2)
return
diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm
index 03c962b5af7..a58629cda96 100644
--- a/code/game/objects/items/weapons/dna_injector.dm
+++ b/code/game/objects/items/weapons/dna_injector.dm
@@ -55,7 +55,8 @@
trigger_side_effect(M)
spawn(0)//this prevents the collapse of space-time continuum
- user.drop_from_inventory(src)
+ if (user)
+ user.drop_from_inventory(src)
del(src)
return uses
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index a14373169eb..4f35194f9d2 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -1,6 +1,6 @@
/obj/item/weapon/plastique/attack_self(mob/user as mob)
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
- if(newtime < 1)
+ if(newtime < 10)
newtime = 10
timer = newtime
user << "Timer set for [timer] seconds."
diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm
index ec284b68bab..86fb3a87e24 100644
--- a/code/game/objects/items/weapons/flamethrower.dm
+++ b/code/game/objects/items/weapons/flamethrower.dm
@@ -4,7 +4,7 @@
icon = 'icons/obj/flamethrower.dmi'
icon_state = "flamethrowerbase"
item_state = "flamethrower_0"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = FPRINT | TABLEPASS| CONDUCT | USEDELAY // USEDELAY flag needed in order to use afterattack() for things that are not in reach. I.E: Shooting flames.
force = 3.0
throwforce = 10.0
throw_speed = 1
@@ -48,7 +48,7 @@
/obj/item/weapon/flamethrower/update_icon()
- overlays = null
+ overlays.Cut()
if(igniter)
overlays += "+igniter[status]"
if(ptank)
@@ -60,6 +60,13 @@
item_state = "flamethrower_0"
return
+/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, flag)
+ // Make sure our user is still holding us
+ if(user && user.get_active_hand() == src)
+ var/turf/target_turf = get_turf(target)
+ if(target_turf)
+ var/turflist = getline(user, target_turf)
+ flame_turf(turflist)
/obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob)
if(user.stat || user.restrained() || user.lying) return
diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm
index c5c8fb3c579..e15ce7fc8c8 100644
--- a/code/game/objects/items/weapons/gift_wrappaper.dm
+++ b/code/game/objects/items/weapons/gift_wrappaper.dm
@@ -7,6 +7,23 @@
/*
* Gifts
*/
+/obj/item/weapon/a_gift
+ name = "gift"
+ desc = "PRESENTS!!!! eek!"
+ icon = 'icons/obj/items.dmi'
+ icon_state = "gift1"
+ item_state = "gift1"
+
+/obj/item/weapon/a_gift/New()
+ ..()
+ pixel_x = rand(-10,10)
+ pixel_y = rand(-10,10)
+ if(w_class > 0 && w_class < 4)
+ icon_state = "gift[w_class]"
+ else
+ icon_state = "gift[pick(1, 2, 3)]"
+ return
+
/obj/item/weapon/gift/attack_self(mob/user as mob)
user.drop_item()
if(src.gift)
@@ -21,7 +38,6 @@
del(src)
return
-
/obj/effect/spresent/relaymove(mob/user as mob)
if (user.stat)
return
@@ -44,45 +60,71 @@
del(src)
-
/obj/item/weapon/a_gift/attack_self(mob/M as mob)
- switch(pick("flash", "t_gun", "l_gun", "shield", "sword", "axe"))
- if("flash")
- var/obj/item/device/flash/W = new /obj/item/device/flash( M )
- M.put_in_active_hand(W)
- W.add_fingerprint(M)
- del(src)
- return
- if("l_gun")
- var/obj/item/weapon/gun/energy/laser/W = new /obj/item/weapon/gun/energy/laser( M )
- M.put_in_active_hand(W)
- W.add_fingerprint(M)
- del(src)
- return
- if("t_gun")
- var/obj/item/weapon/gun/energy/taser/W = new /obj/item/weapon/gun/energy/taser( M )
- M.put_in_active_hand(W)
- W.add_fingerprint(M)
- del(src)
- return
- if("sword")
- var/obj/item/weapon/melee/energy/sword/W = new /obj/item/weapon/melee/energy/sword( M )
- M.put_in_active_hand(W)
- W.add_fingerprint(M)
- del(src)
- return
- if("axe")
- var/obj/item/weapon/melee/energy/axe/W = new /obj/item/weapon/melee/energy/axe( M )
- M.put_in_active_hand(W)
- W.add_fingerprint(M)
- del(src)
- return
- else
+ var/gift_type = pick(/obj/item/weapon/sord,
+ /obj/item/weapon/storage/wallet,
+ /obj/item/weapon/storage/photo_album,
+ /obj/item/weapon/storage/box/snappops,
+ /obj/item/weapon/storage/fancy/crayons,
+ /obj/item/weapon/storage/backpack/holding,
+ /obj/item/weapon/storage/belt/champion,
+ /obj/item/weapon/soap/deluxe,
+ /obj/item/weapon/pickaxe/silver,
+ /obj/item/weapon/pen/invisible,
+ /obj/item/weapon/lipstick/random,
+ /obj/item/weapon/grenade/smokebomb,
+ /obj/item/weapon/corncob,
+ /obj/item/weapon/contraband/poster,
+ /obj/item/weapon/book/manual/barman_recipes,
+ /obj/item/weapon/book/manual/chef_recipes,
+ /obj/item/weapon/bikehorn,
+ /obj/item/weapon/beach_ball,
+ /obj/item/weapon/beach_ball/holoball,
+ /obj/item/weapon/banhammer,
+ /obj/item/toy/balloon,
+ /obj/item/toy/blink,
+ /obj/item/toy/crossbow,
+ /obj/item/toy/gun,
+ /obj/item/toy/katana,
+ /obj/item/toy/prize/deathripley,
+ /obj/item/toy/prize/durand,
+ /obj/item/toy/prize/fireripley,
+ /obj/item/toy/prize/gygax,
+ /obj/item/toy/prize/honk,
+ /obj/item/toy/prize/marauder,
+ /obj/item/toy/prize/mauler,
+ /obj/item/toy/prize/odysseus,
+ /obj/item/toy/prize/phazon,
+ /obj/item/toy/prize/ripley,
+ /obj/item/toy/prize/seraph,
+ /obj/item/toy/spinningtoy,
+ /obj/item/toy/sword,
+ /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus,
+ /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris,
+ /obj/item/device/paicard,
+ /obj/item/device/violin,
+ /obj/item/weapon/storage/belt/utility/full,
+ /obj/item/clothing/tie/horrible)
+
+ if(!ispath(gift_type,/obj/item)) return
+
+ var/obj/item/I = new gift_type(M)
+ M.u_equip(src)
+ M.put_in_hands(I)
+ I.add_fingerprint(M)
+ del(src)
return
/*
* Wrapping Paper
*/
+/obj/item/weapon/wrapping_paper
+ name = "wrapping paper"
+ desc = "You can use this to wrap items in."
+ icon = 'icons/obj/items.dmi'
+ icon_state = "wrap_paper"
+ var/amount = 20.0
+
/obj/item/weapon/wrapping_paper/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (!( locate(/obj/structure/table, src.loc) ))
@@ -148,4 +190,4 @@
else
user << "\blue You need more paper."
else
- user << "Theyre moving around too much. a Straitjacket would help."
\ No newline at end of file
+ user << "They are moving around too much. A straightjacket would help."
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm
index ce4e4f2ce63..168ef431ede 100644
--- a/code/game/objects/items/weapons/grenades/chem_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm
@@ -226,6 +226,26 @@
beakers += B2
icon_state = initial(icon_state) +"_locked"
+/obj/item/weapon/grenade/chem_grenade/antiweed
+ name = "weedkiller grenade"
+ desc = "Used for purging large areas of invasive plant species. Contents under pressure. Do not directly inhale contents."
+ path = 1
+ stage = 2
+
+ New()
+ ..()
+ var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
+ var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
+
+ B1.reagents.add_reagent("plantbgone", 25)
+ B1.reagents.add_reagent("potassium", 25)
+ B2.reagents.add_reagent("phosphorus", 25)
+ B2.reagents.add_reagent("sugar", 25)
+
+ beakers += B1
+ beakers += B2
+ icon_state = "grenade"
+
/obj/item/weapon/grenade/chem_grenade/cleaner
name = "Cleaner Grenade"
desc = "BLAM!-brand foaming space cleaner. In a special applicator for rapid cleaning of wide areas."
diff --git a/code/game/objects/items/weapons/grenades/emgrenade.dm b/code/game/objects/items/weapons/grenades/emgrenade.dm
index 95ad0b77b1e..9edf68a60ac 100644
--- a/code/game/objects/items/weapons/grenades/emgrenade.dm
+++ b/code/game/objects/items/weapons/grenades/emgrenade.dm
@@ -6,7 +6,7 @@
prime()
..()
- if(empulse(src, 10, 20))
+ if(empulse(src, 4, 10))
del(src)
return
diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm
index 17b578461a7..e95338168d2 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -1,3 +1,20 @@
+/obj/item/weapon/handcuffs
+ name = "handcuffs"
+ desc = "Use this to keep prisoners in line."
+ gender = PLURAL
+ icon = 'icons/obj/items.dmi'
+ icon_state = "handcuff"
+ flags = FPRINT | TABLEPASS | CONDUCT
+ slot_flags = SLOT_BELT
+ throwforce = 5
+ w_class = 2.0
+ throw_speed = 2
+ throw_range = 5
+ m_amt = 500
+ origin_tech = "materials=1"
+ var/dispenser = 0
+ var/breakouttime = 1200 //Deciseconds = 120s = 2 minutes
+
/obj/item/weapon/handcuffs/attack(mob/living/carbon/C as mob, mob/user as mob)
if(istype(src, /obj/item/weapon/handcuffs/cyborg) && isrobot(user))
if(!C.handcuffed)
@@ -73,4 +90,37 @@
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
O.process()
return
- return
\ No newline at end of file
+ return
+
+/obj/item/weapon/handcuffs/cable
+ name = "cable restraints"
+ desc = "Looks like some cables tied together. Could be used to tie something up."
+ icon_state = "cuff_red"
+ breakouttime = 300 //Deciseconds = 30s
+
+/obj/item/weapon/handcuffs/cable/red
+ icon_state = "cuff_red"
+
+/obj/item/weapon/handcuffs/cable/yellow
+ icon_state = "cuff_yellow"
+
+/obj/item/weapon/handcuffs/cable/blue
+ icon_state = "cuff_blue"
+
+/obj/item/weapon/handcuffs/cable/green
+ icon_state = "cuff_green"
+
+/obj/item/weapon/handcuffs/cable/pink
+ icon_state = "cuff_pink"
+
+/obj/item/weapon/handcuffs/cable/orange
+ icon_state = "cuff_orange"
+
+/obj/item/weapon/handcuffs/cable/cyan
+ icon_state = "cuff_cyan"
+
+/obj/item/weapon/handcuffs/cable/white
+ icon_state = "cuff_white"
+
+/obj/item/weapon/handcuffs/cyborg
+ dispenser = 1
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/hydroponics.dm b/code/game/objects/items/weapons/hydroponics.dm
index 619828f68ce..024dcd60084 100644
--- a/code/game/objects/items/weapons/hydroponics.dm
+++ b/code/game/objects/items/weapons/hydroponics.dm
@@ -1,47 +1,18 @@
/* Hydroponic stuff
* Contains:
- * Plant Bags
* Sunflowers
* Nettle
* Deathnettle
* Corbcob
*/
-/*
- * Plant Bags
- */
-/obj/item/weapon/plantbag
- icon = 'icons/obj/hydroponics.dmi'
- icon_state = "plantbag"
- name = "Plant Bag"
- var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
- var/capacity = 50; //the number of plant pieces it can carry.
- flags = FPRINT | TABLEPASS
- slot_flags = SLOT_BELT
- w_class = 1
-/obj/item/weapon/plantbag/attack_self(mob/user as mob)
- for (var/obj/item/weapon/reagent_containers/food/snacks/grown/O in contents)
- contents -= O
- O.loc = user.loc
- user << "\blue You empty the plant bag."
- return
-
-/obj/item/weapon/plantbag/verb/toggle_mode()
- set name = "Switch Bagging Method"
- set category = "Object"
-
- mode = !mode
- switch (mode)
- if(1)
- usr << "The bag now picks up all plants in a tile at once."
- if(0)
- usr << "The bag now picks up one plant at a time."
/*
* SeedBag
*/
-
+//uncomment when this is updated to match storage update
+/*
/obj/item/weapon/seedbag
icon = 'icons/obj/hydroponics.dmi'
icon_state = "seedbag"
@@ -150,7 +121,7 @@
for(var/mob/M in nearby)
if ((M.client && M.machine == src))
src.attack_self(M)
-
+*/
/*
* Sunflower
*/
diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm
index 1c391fe81de..0edd1a87362 100644
--- a/code/game/objects/items/weapons/implants/implantchair.dm
+++ b/code/game/objects/items/weapons/implants/implantchair.dm
@@ -78,9 +78,9 @@
if(istype(G, /obj/item/weapon/grab))
if(!ismob(G:affecting))
return
- for(var/mob/living/carbon/metroid/M in range(1,G:affecting))
+ for(var/mob/living/carbon/slime/M in range(1,G:affecting))
if(M.Victim == G:affecting)
- usr << "[G:affecting:name] will not fit into the [src.name] because they have a Metroid latched onto their head."
+ usr << "[G:affecting:name] will not fit into the [src.name] because they have a slime latched onto their head."
return
var/mob/M = G:affecting
if(put_mob(M))
diff --git a/code/game/objects/items/weapons/implants/implantnanoaug.dm b/code/game/objects/items/weapons/implants/implantnanoaug.dm
deleted file mode 100644
index 32a23e967b7..00000000000
--- a/code/game/objects/items/weapons/implants/implantnanoaug.dm
+++ /dev/null
@@ -1,186 +0,0 @@
-/obj/item/weapon/implant/nanoaug
- name = "nanoaug"
- desc = "A nano-robotic biological augmentation implant."
- var/augmentation
- var/augment_text = "You feel strange..."
- var/activation_emote = "fart"
-
- get_data()
- var/dat = {"
-Implant Specifications:
-Name: Cybersun Industries Nano-Robotic Biological Augmentation Suite
-Life: Infinite. WARNING: Biological changes are irreversable.
-Important Notes: Illegal. Subjects exposed to nanorobotic agent are considered dangerous.
-
-Implant Details:
-Function: Implant contains colony of pre-programmed nanorobots. Subject will experience radical changes in their body, amplifying and improving certain bodily characteristics.
-Special Features: Will grant subject superhuman powers.
-Integrity: Nanoaugmentation is permanent. Once the process is complete, the nanorobots disassemble and are dissolved by the blood stream."}
- return dat
-
-
- implanted(mob/M)
- if(!istype(M, /mob/living/carbon/human)) return 0
- M.augmentations.Add(augmentation) // give them the mutation
- M << "\blue [augment_text]"
-
- return 1
-
-
-/obj/item/weapon/implant/nanoaug/strength
- name = "Superhuman Strength"
- augmentation = SUPRSTR
- augment_text = "You muscle ache, and you feel a rapid surge of energy pulse through your body. You feel strong."
-
-/obj/item/weapon/implant/nanoaug/radar
- name = "Short-range Psionic Radar"
- augmentation = RADAR
- augment_text = "You begin to sense the presence or lack of presence of others around you."
-
- implanted(mob/M)
- if(..())
- M << "Red blips on the map are Security."
- M << "White blips are civlians."
- M << "Monochrome Green blips are cyborgs and AIs."
- M << "Light blue blips are heads of staff."
- M << "Purple blips are unidentified organisms."
- M << "Dead biologicals will not display on the radar."
- spawn()
- var/mob/living/carbon/human/H = M
- H.start_radar()
- return 1
- return 0
-
-/obj/item/weapon/implant/nanoaug/electrichands
- name = "Electric Hands"
- augmentation = ELECTRICHANDS
- augment_text = "You feel a sudden jolt of electricity pulse through your veins. Arcs of electricity travel through your hands."
-
-/obj/item/weapon/implant/nanoaug/eswordsynth
- name = "Energy Blade Synthesizer"
- augmentation = ESWORDSYNTH
- augment_text = "Your hands throb and pulsate. They feel sharper, and strangely hot."
-
- implanted(mob/M)
- if(..())
- activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
- M.mind.store_memory("Freedom nanoaugmentation can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0)
- M << "The nanoaugmentation implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate."
- return 1
- return 0
-
- trigger(emote, source as mob)
- if(emote == activation_emote)
- src.activate(source)
- return
-
- activate(var/mob/source)
-
- var/obj/item/weapon/melee/energy/blade/swordspawn = new /obj/item/weapon/melee/energy/blade
- if(!source.get_active_hand())
- source.put_in_hands(swordspawn)
-
- var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
- spark_system.set_up(5, 0, source.loc)
- spark_system.start()
- playsound(source.loc, "sparks", 50, 1)
- ..()
-
-/obj/item/weapon/implant/nanoaug/rebreather
- name = "Bioelectric Rebreather"
- augmentation = REBREATHER
- augment_text = "You begin to lose your breath. Just as you are about to pass out, you suddenly lose the urge to breath. Breathing is no longer a necessity for you."
-
-/obj/item/weapon/implant/nanoaug/dermalarmor
- name = "Skin-intergrated Dermal Armor"
- augmentation = DERMALARMOR
- augment_text = "The skin throughout your body grows tense and tight, and you become slightly stiff. Your bones and skin feel a lot stronger."
-
-/obj/item/weapon/implant/nanoaug/reflexes
- name = "Combat Reflexes"
- augmentation = REFLEXES
- augment_text = "Your mind suddenly is able to identify threats before you are aware of them. You become more aware of your surroundings."
-
-/obj/item/weapon/implant/nanoaug/nanoregen
- name = "Regenerative Nanobots"
- augmentation = NANOREGEN
- augment_text = "You feel a very faint vibration in your body. You instantly feel much younger."
-
-
-/obj/item/weapon/implanter/nanoaug
- name = "Nanoaugmentation Implanter (Empty)"
- icon_state = "nanoimplant"
-
-/obj/item/weapon/implanter/nanoaug/update()
- if (src.imp)
- src.icon_state = "nanoimplant"
- else
- src.icon_state = "nanoimplant0"
- return
-
-
-/obj/item/weapon/implanter/nanoaug/strength
- name = "Nanoaugmentation Implaner (Superhuman Strength)"
-
-/obj/item/weapon/implanter/nanoaug/strength/New()
- src.imp = new /obj/item/weapon/implant/nanoaug/strength( src )
- ..()
- update()
-
-/obj/item/weapon/implanter/nanoaug/radar
- name = "Nanoaugmentation Implaner (Short-range Psionic Radar)"
-
-/obj/item/weapon/implanter/nanoaug/radar/New()
- src.imp = new /obj/item/weapon/implant/nanoaug/radar( src )
- ..()
- update()
-
-/obj/item/weapon/implanter/nanoaug/electrichands
- name = "Nanoaugmentation Implaner (Electric Hands)"
-
-/obj/item/weapon/implanter/nanoaug/electrichands/New()
- src.imp = new /obj/item/weapon/implant/nanoaug/electrichands( src )
- ..()
- update()
-
-/obj/item/weapon/implanter/nanoaug/eswordsynth
- name = "Nanoaugmentation Implaner (Energy Blade Synthesizer)"
-
-/obj/item/weapon/implanter/nanoaug/eswordsynth/New()
- src.imp = new /obj/item/weapon/implant/nanoaug/eswordsynth( src )
- ..()
- update()
-
-/obj/item/weapon/implanter/nanoaug/rebreather
- name = "Nanoaugmentation Implaner (Bioelectric Rebreather)"
-
-/obj/item/weapon/implanter/nanoaug/rebreather/New()
- src.imp = new /obj/item/weapon/implant/nanoaug/rebreather( src )
- ..()
- update()
-
-/obj/item/weapon/implanter/nanoaug/dermalarmor
- name = "Nanoaugmentation Implaner (Skin-intergrated Dermal Armor)"
-
-/obj/item/weapon/implanter/nanoaug/dermalarmor/New()
- src.imp = new /obj/item/weapon/implant/nanoaug/dermalarmor( src )
- ..()
- update()
-
-/obj/item/weapon/implanter/nanoaug/reflexes
- name = "Nanoaugmentation Implaner (Combat Reflexes)"
-
-/obj/item/weapon/implanter/nanoaug/reflexes/New()
- src.imp = new /obj/item/weapon/implant/nanoaug/reflexes( src )
- ..()
- update()
-
-/obj/item/weapon/implanter/nanoaug/nanoregen
- name = "Nanoaugmentation Implaner (Regenerative Nanobots)"
-
-/obj/item/weapon/implanter/nanoaug/nanoregen/New()
- src.imp = new /obj/item/weapon/implant/nanoaug/nanoregen( src )
- ..()
- update()
-
-
diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm
index f3f0032cd60..476ed726cd9 100644
--- a/code/game/objects/items/weapons/implants/implantpad.dm
+++ b/code/game/objects/items/weapons/implants/implantpad.dm
@@ -34,12 +34,7 @@
src.add_fingerprint(user)
update()
else
- if (user.contents.Find(src))
- spawn( 0 )
- src.attack_self(user)
- return
- else
- return ..()
+ return ..()
return
diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm
index 9029fdfc5fc..02f270d767d 100644
--- a/code/game/objects/items/weapons/kitchen.dm
+++ b/code/game/objects/items/weapons/kitchen.dm
@@ -1,23 +1,52 @@
/* Kitchen tools
* Contains:
+ * Utensils
+ * Spoons
* Forks
* Knives
+ * Kitchen knives
+ * Butcher's cleaver
* Rolling Pins
* Trays
*/
+/obj/item/weapon/kitchen
+ icon = 'icons/obj/kitchen.dmi'
+
+/*
+ * Utensils
+ */
+/obj/item/weapon/kitchen/utensil
+ force = 5.0
+ w_class = 1.0
+ throwforce = 5.0
+ throw_speed = 3
+ throw_range = 5
+ flags = FPRINT | TABLEPASS | CONDUCT
+ origin_tech = "materials=1"
+ attack_verb = list("attacked", "stabbed", "poked")
/obj/item/weapon/kitchen/utensil/New()
if (prob(60))
src.pixel_y = rand(0, 4)
return
-
-
+/*
+ * Spoons
+ */
+ /obj/item/weapon/kitchen/utensil/spoon
+ name = "spoon"
+ desc = "SPOON!"
+ icon_state = "spoon"
+ attack_verb = list("attacked", "poked")
/*
* Forks
*/
+/obj/item/weapon/kitchen/utensil/fork
+ name = "fork"
+ desc = "Pointy."
+ icon_state = "fork"
/obj/item/weapon/kitchen/utensil/fork/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
@@ -45,6 +74,19 @@
/*
* Knives
*/
+/obj/item/weapon/kitchen/utensil/knife
+ name = "knife"
+ desc = "Can cut through any food."
+ icon_state = "knife"
+ force = 10.0
+ throwforce = 10.0
+
+ suicide_act(mob/user)
+ viewers(user) << pick("\red [user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.", \
+ "\red [user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.", \
+ "\red [user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.")
+ return (BRUTELOSS)
+
/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You accidentally cut yourself with the [src]."
@@ -53,10 +95,73 @@
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
+/*
+ * Kitchen knives
+ */
+/obj/item/weapon/kitchenknife
+ name = "kitchen knife"
+ icon = 'icons/obj/kitchen.dmi'
+ icon_state = "knife"
+ desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
+ flags = FPRINT | TABLEPASS | CONDUCT
+ force = 10.0
+ w_class = 3.0
+ throwforce = 6.0
+ throw_speed = 3
+ throw_range = 6
+ m_amt = 12000
+ origin_tech = "materials=1"
+ attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
+
+ suicide_act(mob/user)
+ viewers(user) << pick("\red [user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.", \
+ "\red [user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.", \
+ "\red [user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.")
+ return (BRUTELOSS)
+
+/obj/item/weapon/kitchenknife/ritual
+ name = "ritual knife"
+ desc = "The unearthly energies that once powered this blade are now dormant."
+ icon = 'icons/obj/wizard.dmi'
+ icon_state = "render"
+
+/*
+ * Bucher's cleaver
+ */
+/obj/item/weapon/butch
+ name = "butcher's Cleaver"
+ icon = 'icons/obj/kitchen.dmi'
+ icon_state = "butch"
+ desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."
+ flags = FPRINT | TABLEPASS | CONDUCT
+ force = 15.0
+ w_class = 2.0
+ throwforce = 8.0
+ throw_speed = 3
+ throw_range = 6
+ m_amt = 12000
+ origin_tech = "materials=1"
+ attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
+
+/obj/item/weapon/butch/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
+ playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
+ return ..()
+
/*
* Rolling Pins
*/
+/obj/item/weapon/kitchen/rollingpin
+ name = "rolling pin"
+ desc = "Used to knock out the Bartender."
+ icon_state = "rolling_pin"
+ force = 8.0
+ throwforce = 10.0
+ throw_speed = 2
+ throw_range = 7
+ w_class = 3.0
+ attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") //I think the rollingpin attackby will end up ignoring this anyway.
+
/obj/item/weapon/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red The [src] slips out of your hand and hits your head."
@@ -93,10 +198,42 @@
/*
* Trays - Agouri
*/
+/obj/item/weapon/tray
+ name = "tray"
+ icon = 'icons/obj/food.dmi'
+ icon_state = "tray"
+ desc = "A metal tray to lay food on."
+ throwforce = 12.0
+ throwforce = 10.0
+ throw_speed = 1
+ throw_range = 5
+ w_class = 3.0
+ flags = FPRINT | TABLEPASS | CONDUCT
+ m_amt = 3000
+ /* // NOPE
+ var/food_total= 0
+ var/burger_amt = 0
+ var/cheese_amt = 0
+ var/fries_amt = 0
+ var/classyalcdrink_amt = 0
+ var/alcdrink_amt = 0
+ var/bottle_amt = 0
+ var/soda_amt = 0
+ var/carton_amt = 0
+ var/pie_amt = 0
+ var/meatbreadslice_amt = 0
+ var/salad_amt = 0
+ var/miscfood_amt = 0
+ */
+ var/list/carrying = list() // List of things on the tray. - Doohl
+ var/max_carry = 10 // w_class = 1 -- takes up 1
+ // w_class = 2 -- takes up 3
+ // w_class = 3 -- takes up 5
+
/obj/item/weapon/tray/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
// Drop all the things. All of them.
- overlays = null
+ overlays.Cut()
for(var/obj/item/I in carrying)
I.loc = M.loc
carrying.Remove(I)
@@ -210,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("[user] bashes [src] with [W]!")
+ playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
+ cooldown = world.time
+ else
+ ..()
/*
===============~~~~~================================~~~~~====================
@@ -264,7 +411,7 @@
foundtable = 1
break
- overlays = null
+ overlays.Cut()
for(var/obj/item/I in carrying)
I.loc = loc
diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm
index 37c53026d8f..f4b2a147620 100644
--- a/code/game/objects/items/weapons/manuals.dm
+++ b/code/game/objects/items/weapons/manuals.dm
@@ -18,7 +18,7 @@
-
+