Merge branch 'master' of https://github.com/PolarisSS13/Polaris into NanoGrade

Conflicts:
	code/_helpers/time.dm
	code/modules/economy/ATM.dm
This commit is contained in:
SinTwo
2016-08-09 15:46:24 -04:00
209 changed files with 4110 additions and 3899 deletions
+1 -1
View File
@@ -392,7 +392,7 @@
if (ticker && ticker.current_state >= GAME_STATE_PLAYING)
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
dat += "Current Game Mode: <B>[ticker.mode.name]</B><BR>"
dat += "Round Duration: <B>[round_duration_as_text()]</B><BR>"
dat += "Round Duration: <B>[roundduration2text()]</B><BR>"
dat += "<B>Emergency shuttle</B><BR>"
if (!emergency_shuttle.online())
dat += "<a href='?src=\ref[src];call_shuttle=1'>Call Shuttle</a><br>"
+3 -3
View File
@@ -892,9 +892,9 @@
if (ticker && ticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
master_mode = href_list["c_mode2"]
log_admin("[key_name(usr)] set the mode as [master_mode].")
message_admins("\blue [key_name_admin(usr)] set the mode as [master_mode].", 1)
world << "\blue <b>The mode is now: [master_mode]</b>"
log_admin("[key_name(usr)] set the mode as [config.mode_names[master_mode]].")
message_admins("\blue [key_name_admin(usr)] set the mode as [config.mode_names[master_mode]].", 1)
world << "\blue <b>The mode is now: [config.mode_names[master_mode]]</b>"
Game() // updates the main game menu
world.save_mode(master_mode)
.(href, list("c_mode"=1))
+1
View File
@@ -137,6 +137,7 @@
prefs.last_id = computer_id //these are gonna be used for banning
. = ..() //calls mob.Login()
prefs.sanitize_preferences()
if(custom_event_msg && custom_event_msg != "")
src << "<h1 class='alert'>Custom Event</h1>"
@@ -52,34 +52,38 @@ var/list/gear_datums = list()
S["gear"] << pref.gear
/datum/category_item/player_setup_item/loadout/proc/valid_gear_choices(var/max_cost)
var/list/valid_gear_choices = list()
. = list()
var/mob/preference_mob = preference_mob()
for(var/gear_name in gear_datums)
var/datum/gear/G = gear_datums[gear_name]
if(G.whitelisted && !is_alien_whitelisted(preference_mob(), all_species[G.whitelisted]))
if(G.whitelisted && !is_alien_whitelisted(preference_mob, all_species[G.whitelisted]))
continue
if(max_cost && G.cost > max_cost)
continue
valid_gear_choices += gear_name
return valid_gear_choices
. += gear_name
/datum/category_item/player_setup_item/loadout/sanitize_character()
var/mob/preference_mob = preference_mob()
if(!islist(pref.gear))
pref.gear = list()
for(var/gear_name in pref.gear)
if(!(gear_name in gear_datums))
pref.gear -= gear_name
var/total_cost = 0
for(var/gear_name in pref.gear)
if(!gear_datums[gear_name])
preference_mob << "<span class='warning'>You cannot have more than one of the \the [gear_name]</span>"
pref.gear -= gear_name
else if(!(gear_name in valid_gear_choices()))
preference_mob << "<span class='warning'>You cannot take \the [gear_name] as you are not whitelisted for the species.</span>"
pref.gear -= gear_name
else
var/datum/gear/G = gear_datums[gear_name]
if(total_cost + G.cost > MAX_GEAR_COST)
pref.gear -= gear_name
preference_mob << "<span class='warning'>You cannot afford to take \the [gear_name]</span>"
else
total_cost += G.cost
@@ -180,6 +180,31 @@
path = /obj/item/clothing/suit/wcoat
cost = 1
/datum/gear/suit/wcoat/red
display_name = "red waistcoat"
path = /obj/item/clothing/suit/wcoat/red
/datum/gear/suit/wcoat/grey
display_name = "grey waistcoat"
path = /obj/item/clothing/suit/wcoat/grey
/datum/gear/suit/wcoat/brown
display_name = "brown waistcoat"
path = /obj/item/clothing/suit/wcoat/brown
/datum/gear/suit/swvest
display_name = "black sweatervest"
path = /obj/item/clothing/suit/wcoat/swvest
cost = 1
/datum/gear/suit/swvest/blue
display_name = "blue sweatervest"
path = /obj/item/clothing/suit/wcoat/swvest/blue
/datum/gear/suit/swvest/red
display_name = "red sweatervest"
path = /obj/item/clothing/suit/wcoat/swvest/red
/datum/gear/suit/forensics
display_name = "forensics long, red"
path = /obj/item/clothing/suit/storage/forensics/red/long
@@ -2,14 +2,12 @@
/datum/gear/suit/zhan_furs
display_name = "Zhan-Khazan furs (Tajara)"
path = /obj/item/clothing/suit/tajaran/furs
whitelisted = "Tajara"
sort_category = "Xenowear"
/datum/gear/suit/unathi_mantle
display_name = "hide mantle (Unathi)"
path = /obj/item/clothing/suit/unathi/mantle
cost = 1
whitelisted = "Unathi"
sort_category = "Xenowear"
/datum/gear/ears/skrell/chains //Chains
@@ -25,7 +23,7 @@
var/obj/item/clothing/ears/skrell/chain/chain = chain_style
chaintypes[initial(chain.name)] = chain
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(chaintypes))
/datum/gear/ears/skrell/bands
display_name = "headtail band selection (Skrell)"
path = /obj/item/clothing/ears/skrell/band
@@ -39,7 +37,7 @@
var/obj/item/clothing/ears/skrell/band/band = band_style
bandtypes[initial(band.name)] = band
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(bandtypes))
/datum/gear/ears/skrell/cloth/male
display_name = "male headtail cloth selection (Skrell)"
path = /obj/item/clothing/ears/skrell/cloth_male
@@ -73,17 +71,17 @@
path = /obj/item/clothing/ears/skrell/colored/band
sort_category = "Xenowear"
whitelisted = "Skrell"
/datum/gear/ears/skrell/colored/band/New()
..()
gear_tweaks = list(gear_tweak_free_color_choice)
/datum/gear/ears/skrell/colored/chain
display_name = "Colored chain (Skrell)"
path = /obj/item/clothing/ears/skrell/colored/chain
sort_category = "Xenowear"
whitelisted = "Skrell"
/datum/gear/ears/skrell/colored/chain/New()
..()
gear_tweaks = list(gear_tweak_free_color_choice)
@@ -129,8 +129,6 @@
// Need due to, for example, the 01_basic module relying on species having been loaded to sanitize correctly but that isn't loaded until module 03_body.
for(var/datum/category_item/player_setup_item/PI in items)
PI.load_character(S)
for(var/datum/category_item/player_setup_item/PI in items)
PI.sanitize_character()
/datum/category_group/player_setup_category/proc/save_character(var/savefile/S)
// Sanitize all data, then save it
@@ -142,8 +140,6 @@
/datum/category_group/player_setup_category/proc/load_preferences(var/savefile/S)
for(var/datum/category_item/player_setup_item/PI in items)
PI.load_preferences(S)
for(var/datum/category_item/player_setup_item/PI in items)
PI.sanitize_preferences()
/datum/category_group/player_setup_category/proc/save_preferences(var/savefile/S)
for(var/datum/category_item/player_setup_item/PI in items)
+2
View File
@@ -237,12 +237,14 @@ datum/preferences
else if(href_list["reload"])
load_preferences()
load_character()
sanitize_preferences()
else if(href_list["load"])
if(!IsGuestKey(usr.key))
open_load_dialog(usr)
return 1
else if(href_list["changeslot"])
load_character(text2num(href_list["changeslot"]))
sanitize_preferences()
close_load_dialog(usr)
else
return 0
+2 -1
View File
@@ -32,7 +32,8 @@
/obj/item/clothing/head/chaplain_hood
name = "chaplain's hood"
desc = "It's hood that covers the head. It keeps you warm during the space winters."
icon_state = "beret_black"
icon_state = "chaplain_hood"
item_state_slots = list(slot_r_hand_str = "beret_black", slot_l_hand_str = "beret_black")
flags_inv = BLOCKHAIR
body_parts_covered = HEAD
+9 -4
View File
@@ -5,6 +5,11 @@
siemens_coefficient = 0.9
body_parts_covered = 0
/obj/item/clothing/head/centhat/customs
name = "Customs Hat"
desc = "A formal hat for SolGov Customs Officers."
icon_state = "customshat"
/obj/item/clothing/head/hairflower
name = "hair flower pin"
icon_state = "hairflower"
@@ -73,13 +78,13 @@
/obj/item/clothing/head/nursehat
name = "nurse's hat"
desc = "It allows quick identification of trained medical personnel."
item_state_slots = list(slot_r_hand_str = "nursehat", slot_l_hand_str = "nursehat")
icon_state = "nursehat"
siemens_coefficient = 0.9
body_parts_covered = 0
/obj/item/clothing/head/syndicatefake
name = "red space-helmet replica"
item_state_slots = list(slot_r_hand_str = "syndicate-helm-black-red", slot_l_hand_str = "syndicate-helm-black-red")
item_state_slots = list(slot_r_hand_str = "syndicate-helm-black-red", slot_l_hand_str = "syndicate-helm-black-red")
icon_state = "syndicate"
desc = "A plastic replica of a bloodthirsty mercenary's space helmet, you'll look just like a real murderous criminal operative in this! This is a toy, it is not made for use in space!"
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|BLOCKHAIR
@@ -125,7 +130,7 @@
/obj/item/clothing/head/justice/pink
icon_state = "justicepink"
/obj/item/clothing/head/rabbitears
name = "rabbit ears"
desc = "Wearing these makes you looks useless, and only good for your sex appeal."
@@ -202,7 +207,7 @@
name = "fez"
icon_state = "fez"
desc = "You should wear a fez. Fezzes are cool."
/obj/item/clothing/head/cowboy_hat
name = "cowboy hat"
desc = "For those that have spurs that go jingle jangle jingle."
@@ -168,7 +168,7 @@
helm_type = /obj/item/clothing/head/helmet/space/rig/ert
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/stack/flag,/obj/item/weapon/storage/box/excavation,/obj/item/weapon/pickaxe,/obj/item/device/healthanalyzer,/obj/item/device/measuring_tape,/obj/item/device/ano_scanner,/obj/item/device/depth_scanner,/obj/item/device/core_sampler,/obj/item/device/gps,/obj/item/device/beacon_locator,/obj/item/device/radio/beacon,/obj/item/weapon/pickaxe/hand,/obj/item/weapon/storage/bag/fossils)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/stack/flag,/obj/item/weapon/storage/excavation,/obj/item/weapon/pickaxe,/obj/item/device/healthanalyzer,/obj/item/device/measuring_tape,/obj/item/device/ano_scanner,/obj/item/device/depth_scanner,/obj/item/device/core_sampler,/obj/item/device/gps,/obj/item/device/beacon_locator,/obj/item/device/radio/beacon,/obj/item/weapon/pickaxe/hand,/obj/item/weapon/storage/bag/fossils)
req_access = list()
req_one_access = list()
+34 -3
View File
@@ -55,7 +55,7 @@
flags = CONDUCT
fire_resist = T0C+5200
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/greatcoat
name = "great coat"
desc = "A heavy great coat"
@@ -92,6 +92,31 @@
blood_overlay_type = "armor"
body_parts_covered = UPPER_TORSO|LOWER_TORSO
/obj/item/clothing/suit/wcoat/red
name = "red waistcoat"
icon_state = "red_waistcoat"
/obj/item/clothing/suit/wcoat/grey
name = "grey waistcoat"
icon_state = "grey_waistcoat"
/obj/item/clothing/suit/wcoat/brown
name = "brown waistcoat"
icon_state = "brown_waistcoat"
/obj/item/clothing/suit/wcoat/swvest
name = "black sweatervest"
desc = "A sleeveless sweater. Wear this if you don't want your arms to be warm, or if you're a nerd."
icon_state = "sweatervest"
/obj/item/clothing/suit/wcoat/swvest/blue
name = "blue sweatervest"
icon_state = "sweatervest_blue"
/obj/item/clothing/suit/wcoat/swvest/red
name = "red sweatervest"
icon_state = "sweatervest_red"
/obj/item/clothing/suit/apron/overalls
name = "coveralls"
desc = "A set of denim overalls."
@@ -197,7 +222,13 @@
desc = "A flowing, black coat."
icon_state = "neocoat"
item_state_slots = list(slot_r_hand_str = "leather_jacket", slot_l_hand_str = "leather_jacket")
/obj/item/clothing/suit/customs
name = "customs jacket"
desc = "A standard SolGov Customs formal jacket."
icon_state = "customs_jacket"
item_state_slots = list(slot_r_hand_str = "suit_blue", slot_l_hand_str = "suit_blue")
/*
* stripper
*/
@@ -732,4 +763,4 @@
icon_open = "suitjacket_green_open"
icon_closed = "suitjacket_green"
blood_overlay_type = "coat"
body_parts_covered = UPPER_TORSO|ARMS
body_parts_covered = UPPER_TORSO|ARMS
+13 -5
View File
@@ -33,6 +33,14 @@
icon_state = "waiter"
rolled_sleeves = 0
/obj/item/clothing/under/customs
name = "customs uniform"
desc = "A standard SolGov customs uniform. Complete with epaulettes."
icon_state = "cu_suit"
/obj/item/clothing/under/customs/khaki
icon_state = "cu_suit_kh"
/obj/item/clothing/under/rank/mailman
name = "mailman's jumpsuit"
desc = "<i>'Special delivery!'</i>"
@@ -253,7 +261,7 @@
/obj/item/clothing/under/dress/stripeddress
name = "striped dress"
desc = "Fashion in space."
icon_state = "striped_dress"
icon_state = "striped_dress"
/obj/item/clothing/under/dress/sailordress
name = "sailor dress"
@@ -529,7 +537,7 @@
name = "fancy dark red dress"
desc = "A short, red dress with a black belt. Fancy."
icon_state = "darkreddress"
/*
* swimsuit
*/
@@ -566,7 +574,7 @@
desc = "An oldfashioned red swimsuit."
icon_state = "swim_red"
siemens_coefficient = 1
/*
* pyjamas
*/
@@ -583,7 +591,7 @@
icon_state = "red_pyjamas"
item_state_slots = list(slot_r_hand_str = "red", slot_l_hand_str = "red")
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS
/obj/item/clothing/under/stripper
body_parts_covered = 0
@@ -598,7 +606,7 @@
desc = "A rather skimpy green swimsuit."
icon_state = "stripper_g_under"
siemens_coefficient = 1
/obj/item/clothing/under/stripper/mankini
name = "mankini"
desc = "No honest man would wear this abomination"
+7 -7
View File
@@ -132,7 +132,7 @@ log transactions
T.amount = I:worth
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
authenticated_account.transaction_log.Add(T)
user << "<span class='info'>You insert [I] into [src].</span>"
@@ -307,7 +307,7 @@ log transactions
T.purpose = transfer_purpose
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
T.amount = "([transfer_amount])"
authenticated_account.transaction_log.Add(T)
else
@@ -343,7 +343,7 @@ log transactions
T.purpose = "Unauthorised login attempt"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
failed_account.transaction_log.Add(T)
else
usr << "\icon[src]<span class='warning'>Incorrect pin/account combination entered, [max_pin_attempts - number_incorrect_tries] attempts remaining.</span>"
@@ -363,7 +363,7 @@ log transactions
T.purpose = "Remote terminal access"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
authenticated_account.transaction_log.Add(T)
usr << "\icon[src]<span class='info'>Access granted. Welcome user '[authenticated_account.owner_name].'</span>"
@@ -395,7 +395,7 @@ log transactions
T.amount = "([amount])"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
authenticated_account.transaction_log.Add(T)
else
usr << "\icon[src]<span class='warning'>You don't have enough funds to do that!</span>"
@@ -422,7 +422,7 @@ log transactions
T.amount = "([amount])"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
authenticated_account.transaction_log.Add(T)
else
usr << "\icon[src]<span class='warning'>You don't have enough funds to do that!</span>"
@@ -478,7 +478,7 @@ log transactions
T.purpose = "Remote terminal access"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
authenticated_account.transaction_log.Add(T)
view_screen = 0
+6 -6
View File
@@ -40,7 +40,7 @@
M.account_number = rand(111111, 999999)
else
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
T.source_terminal = source_db.machine_id
M.account_number = next_account_number
@@ -57,7 +57,7 @@
R.info += "<i>Account number:</i> [M.account_number]<br>"
R.info += "<i>Account pin:</i> [M.remote_access_pin]<br>"
R.info += "<i>Starting balance:</i> $[M.money]<br>"
R.info += "<i>Date and time:</i> [worldtime2text()], [current_date_string]<br><br>"
R.info += "<i>Date and time:</i> [stationtime2text()], [current_date_string]<br><br>"
R.info += "<i>Creation terminal ID:</i> [source_db.machine_id]<br>"
R.info += "<i>Authorised NT officer overseeing creation:</i> [source_db.held_card.registered_name]<br>"
@@ -80,7 +80,7 @@
for(var/datum/money_account/D in all_money_accounts)
if(D.account_number == attempt_account_number && !D.suspended)
D.money += amount
//create a transaction log entry
var/datum/transaction/T = new()
T.target_name = source_name
@@ -90,12 +90,12 @@
else
T.amount = "[amount]"
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
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
+1 -1
View File
@@ -28,7 +28,7 @@
T.purpose = reason
T.amount = amount
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
T.source_terminal = machine_id
return T
+3 -3
View File
@@ -140,7 +140,7 @@
T.amount = transaction_amount
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
linked_account.transaction_log.Add(T)
else
usr << "\icon[src]<span class='warning'>\The [O] doesn't have that much money!</span>"
@@ -264,7 +264,7 @@
T.amount = "[transaction_amount]"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
D.transaction_log.Add(T)
//
T = new()
@@ -273,7 +273,7 @@
T.amount = "[transaction_amount]"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
linked_account.transaction_log.Add(T)
else
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
+4 -4
View File
@@ -256,7 +256,7 @@
T.amount = "([transaction_amount])"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
D.transaction_log.Add(T)
// Create log entry in owner's account
@@ -266,7 +266,7 @@
T.amount = "[transaction_amount]"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
linked_account.transaction_log.Add(T)
// Save log
@@ -304,7 +304,7 @@
T.amount = "[transaction_amount]"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
linked_account.transaction_log.Add(T)
// Save log
@@ -414,7 +414,7 @@
<tr></tr>
<tr><td class="tx-name">Customer</td><td class="tx-data">[c_name]</td></tr>
<tr><td class="tx-name">Pay Method</td><td class="tx-data">[p_method]</td></tr>
<tr><td class="tx-name">Station Time</td><td class="tx-data">[worldtime2text()]</td></tr>
<tr><td class="tx-name">Station Time</td><td class="tx-data">[stationtime2text()]</td></tr>
</table>
<table width=300>
"}
+4 -4
View File
@@ -231,7 +231,7 @@
T.amount = "([transaction_amount])"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
D.transaction_log.Add(T)
// Create log entry in owner's account
@@ -241,7 +241,7 @@
T.amount = "[transaction_amount]"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
linked_account.transaction_log.Add(T)
// Save log
@@ -274,7 +274,7 @@
T.amount = "[transaction_amount]"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
linked_account.transaction_log.Add(T)
// Save log
@@ -348,7 +348,7 @@
<tr></tr>
<tr><td class="tx-name">Customer</td><td class="tx-data">[c_name]</td></tr>
<tr><td class="tx-name">Pay Method</td><td class="tx-data">[p_method]</td></tr>
<tr><td class="tx-name">Station Time</td><td class="tx-data">[worldtime2text()]</td></tr>
<tr><td class="tx-name">Station Time</td><td class="tx-data">[stationtime2text()]</td></tr>
</table>
<table width=300>
"}
+5 -5
View File
@@ -44,7 +44,7 @@
if(EM.add_to_queue)
EC.available_events += EM
log_debug("Event '[EM.name]' has completed at [worldtime2text()].")
log_debug("Event '[EM.name]' has completed at [worldtime2stationtime(world.time)].")
/datum/event_manager/proc/delay_events(var/severity, var/delay)
var/list/datum/event_container/EC = event_containers[severity]
@@ -67,12 +67,12 @@
var/datum/event_meta/EM = E.event_meta
if(EM.name == "Nothing")
continue
var/message = "'[EM.name]' began at [worldtime2text(E.startedAt)] "
var/message = "'[EM.name]' began at [worldtime2stationtime(E.startedAt)] "
if(E.isRunning)
message += "and is still running."
else
if(E.endedAt - E.startedAt > MinutesToTicks(5)) // Only mention end time if the entire duration was more than 5 minutes
message += "and ended at [worldtime2text(E.endedAt)]."
message += "and ended at [worldtime2stationtime(E.endedAt)]."
else
message += "and ran to completion."
@@ -130,7 +130,7 @@
var/next_event_at = max(0, EC.next_event_time - world.time)
html += "<tr>"
html += "<td>[severity_to_string[severity]]</td>"
html += "<td>[worldtime2text(max(EC.next_event_time, world.time))]</td>"
html += "<td>[worldtime2stationtime(max(EC.next_event_time, world.time))]</td>"
html += "<td>[round(next_event_at / 600, 0.1)]</td>"
html += "<td>"
html += "<A align='right' href='?src=\ref[src];dec_timer=2;event=\ref[EC]'>--</A>"
@@ -178,7 +178,7 @@
html += "<tr>"
html += "<td>[severity_to_string[EM.severity]]</td>"
html += "<td>[EM.name]</td>"
html += "<td>[worldtime2text(ends_at)]</td>"
html += "<td>[worldtime2stationtime(ends_at)]</td>"
html += "<td>[ends_in]</td>"
html += "<td><A align='right' href='?src=\ref[src];stop=\ref[E]'>Stop</A></td>"
html += "</tr>"
+4 -4
View File
@@ -15,15 +15,15 @@
kill()
/datum/event/money_hacker/announce()
var/message = "A brute force hack has been detected (in progress since [worldtime2text()]). The target of the attack is: Financial account #[affected_account.account_number], \
var/message = "A brute force hack has been detected (in progress since [stationtime2text()]). The target of the attack is: Financial account #[affected_account.account_number], \
without intervention this attack will succeed in approximately 10 minutes. Required intervention: temporary suspension of affected accounts until the attack has ceased. \
Notifications will be sent as updates occur.<br>"
var/my_department = "[station_name()] firewall subroutines"
for(var/obj/machinery/message_server/MS in world)
if(!MS.active) continue
MS.send_rc_message("Head of Personnel's Desk", my_department, message, "", "", 2)
/datum/event/money_hacker/tick()
if(world.time >= end_time)
@@ -51,7 +51,7 @@
T.date = pick("", current_date_string, date1, date2)
var/time1 = rand(0, 99999999)
var/time2 = "[round(time1 / 36000)+12]:[(time1 / 600 % 60) < 10 ? add_zero(time1 / 600 % 60, 1) : time1 / 600 % 60]"
T.time = pick("", worldtime2text(), time2)
T.time = pick("", stationtime2text(), time2)
T.source_terminal = pick("","[pick("Biesel","New Gibson")] GalaxyNet Terminal #[rand(111,999)]","your mums place","nantrasen high CommanD")
affected_account.transaction_log.Add(T)
+1 -1
View File
@@ -16,7 +16,7 @@
T.purpose = "Winner!"
T.amount = winner_sum
T.date = current_date_string
T.time = worldtime2text()
T.time = stationtime2text()
T.source_terminal = "Sif TCD Terminal #[rand(111,333)]"
D.transaction_log.Add(T)
+2 -2
View File
@@ -4,7 +4,7 @@
var/releaseWhen = 60
var/list/area/areas = list() //List of areas to affect. Filled by start()
var/eventDept = "Security" //Department name in announcement
var/list/areaName = list("Brig") //Names of areas mentioned in AI and Engineering announcements
var/list/areaType = list(/area/security/prison, /area/security/brig) //Area types to include.
@@ -47,7 +47,7 @@
if(areas && areas.len > 0)
var/my_department = "[station_name()] firewall subroutines"
var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [worldtime2text()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.<br>"
var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [stationtime2text()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.<br>"
for(var/obj/machinery/message_server/MS in world)
MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2)
for(var/mob/living/silicon/ai/A in player_list)
+13 -10
View File
@@ -395,7 +395,7 @@ var/list/name_to_material
weight = 15
door_icon_base = "stone"
destruction_desc = "shatters"
window_options = list("One Direction" = 1, "Full Window" = 4)
window_options = list("One Direction" = 1, "Full Window" = 4, "Windoor" = 2)
created_window = /obj/structure/window/basic
rod_product = /obj/item/stack/material/glass/reinforced
@@ -425,6 +425,12 @@ var/list/name_to_material
for (var/obj/structure/window/check_window in user.loc)
window_count++
possible_directions -= check_window.dir
for (var/obj/structure/windoor_assembly/check_assembly in user.loc)
window_count++
possible_directions -= check_assembly.dir
for (var/obj/machinery/door/window/check_windoor in user.loc)
window_count++
possible_directions -= check_windoor.dir
// Get the closest available dir to the user's current facing.
var/build_dir = SOUTHWEST //Default to southwest for fulltile windows.
@@ -435,18 +441,12 @@ var/list/name_to_material
else
if(choice in list("One Direction","Windoor"))
if(possible_directions.len)
for(var/direction in list(user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
for(var/direction in list(user.dir, turn(user.dir,90), turn(user.dir,270), turn(user.dir,180)))
if(direction in possible_directions)
build_dir = direction
break
else
failed_to_build = 1
if(!failed_to_build && choice == "Windoor")
if(!is_reinforced())
user << "<span class='warning'>This material is not reinforced enough to use for a door.</span>"
return
if((locate(/obj/structure/windoor_assembly) in T.contents) || (locate(/obj/machinery/door/window) in T.contents))
failed_to_build = 1
if(failed_to_build)
user << "<span class='warning'>There is no room in this location.</span>"
return 1
@@ -454,7 +454,8 @@ var/list/name_to_material
var/build_path = /obj/structure/windoor_assembly
var/sheets_needed = window_options[choice]
if(choice == "Windoor")
build_dir = user.dir
if(is_reinforced())
build_path = /obj/structure/windoor_assembly/secure
else
build_path = created_window
@@ -484,7 +485,7 @@ var/list/name_to_material
weight = 30
stack_origin_tech = "materials=2"
composite_material = list(DEFAULT_WALL_MATERIAL = SHEET_MATERIAL_AMOUNT / 2, "glass" = SHEET_MATERIAL_AMOUNT)
window_options = list("One Direction" = 1, "Full Window" = 4, "Windoor" = 5)
window_options = list("One Direction" = 1, "Full Window" = 4, "Windoor" = 2)
created_window = /obj/structure/window/reinforced
wire_product = null
rod_product = null
@@ -497,6 +498,7 @@ var/list/name_to_material
integrity = 100
icon_colour = "#FC2BC5"
stack_origin_tech = list(TECH_MATERIAL = 4)
window_options = list("One Direction" = 1, "Full Window" = 4)
created_window = /obj/structure/window/phoronbasic
wire_product = null
rod_product = /obj/item/stack/material/glass/phoronrglass
@@ -507,6 +509,7 @@ var/list/name_to_material
stack_type = /obj/item/stack/material/glass/phoronrglass
stack_origin_tech = list(TECH_MATERIAL = 5)
composite_material = list() //todo
window_options = list("One Direction" = 1, "Full Window" = 4)
created_window = /obj/structure/window/phoronreinforced
hardness = 40
weight = 30
+1 -1
View File
@@ -57,7 +57,7 @@
var/drill_verb = "drilling"
sharp = 1
var/excavation_amount = 100
var/excavation_amount = 200
/obj/item/weapon/pickaxe/hammer
name = "sledgehammer"
+42 -36
View File
@@ -121,6 +121,12 @@ var/list/mining_overlay_cache = list()
if(!mining_overlay_cache["rock_side_[place_dir]"])
mining_overlay_cache["rock_side_[place_dir]"] = image('icons/turf/walls.dmi', "rock_side", dir = place_dir)
T.overlays += mining_overlay_cache["rock_side_[place_dir]"]
if(archaeo_overlay)
overlays += archaeo_overlay
if(excav_overlay)
overlays += excav_overlay
else
name = "sand"
@@ -320,13 +326,12 @@ var/list/mining_overlay_cache = list()
if (istype(W, /obj/item/device/measuring_tape))
var/obj/item/device/measuring_tape/P = W
user.visible_message("<span class='notice'>\The [user] extends \a [P] towards \the [src].</span>","<span class='notice'>You extend \the [P] towards \the [src].</span>")
if(do_after(user,25))
user << "<span class='notice'>\icon[P] [src] has been excavated to a depth of [2*excavation_level]cm.</span>"
if(do_after(user, 15))
user << "<span class='notice'>\The [src] has been excavated to a depth of [excavation_level]cm.</span>"
return
if (istype(W, /obj/item/weapon/pickaxe))
var/turf/T = user.loc
if (!( istype(T, /turf) ))
if(!istype(user.loc, /turf))
return
var/obj/item/weapon/pickaxe/P = W
@@ -335,44 +340,37 @@ var/list/mining_overlay_cache = list()
last_act = world.time
playsound(user, P.drill_sound, 20, 1)
var/newDepth = excavation_level + P.excavation_amount // Used commonly below
//handle any archaeological finds we might uncover
var/fail_message
var/fail_message = ""
if(finds && finds.len)
var/datum/find/F = finds[1]
if(excavation_level + P.excavation_amount > F.excavation_required)
//Chance to destroy / extract any finds here
if(newDepth > F.excavation_required) // Digging too deep can break the item. At least you won't summon a Balrog (probably)
fail_message = ". <b>[pick("There is a crunching noise","[W] collides with some different rock","Part of the rock face crumbles away","Something breaks under [W]")]</b>"
user << "<span class='notice'>You start [P.drill_verb][fail_message ? fail_message : ""].</span>"
user << "<span class='notice'>You start [P.drill_verb][fail_message].</span>"
if(fail_message && prob(90))
if(prob(25))
excavate_find(5, finds[1])
excavate_find(prob(5), finds[1])
else if(prob(50))
finds.Remove(finds[1])
if(prob(50))
artifact_debris()
if(do_after(user,P.digspeed))
user << "<span class='notice'>You finish [P.drill_verb] \the [src].</span>"
if(finds && finds.len)
var/datum/find/F = finds[1]
if(round(excavation_level + P.excavation_amount) == F.excavation_required)
//Chance to extract any items here perfectly, otherwise just pull them out along with the rock surrounding them
if(excavation_level + P.excavation_amount > F.excavation_required)
//if you can get slightly over, perfect extraction
excavate_find(100, F)
else
excavate_find(80, F)
if(newDepth == F.excavation_required) // When the pick hits that edge just right, you extract your find perfectly, it's never confined in a rock
excavate_find(1, F)
else if(newDepth > F.excavation_required - F.clearance_range) // Not quite right but you still extract your find, the closer to the bottom the better, but not above 80%
excavate_find(prob(80 * (F.excavation_required - newDepth) / F.clearance_range), F)
else if(excavation_level + P.excavation_amount > F.excavation_required - F.clearance_range)
//just pull the surrounding rock out
excavate_find(0, F)
user << "<span class='notice'>You finish [P.drill_verb] \the [src].</span>"
if( excavation_level + P.excavation_amount >= 100 )
//if players have been excavating this turf, leave some rocky debris behind
if(newDepth >= 200) // This means the rock is mined out fully
var/obj/structure/boulder/B
if(artifact_find)
if( excavation_level > 0 || prob(15) )
@@ -382,7 +380,7 @@ var/list/mining_overlay_cache = list()
B.artifact_find = artifact_find
else
artifact_debris(1)
else if(prob(15))
else if(prob(5))
//empty boulder
B = new(src)
@@ -393,36 +391,44 @@ var/list/mining_overlay_cache = list()
return
excavation_level += P.excavation_amount
var/updateIcon = 0
//archaeo overlays
if(!archaeo_overlay && finds && finds.len)
var/datum/find/F = finds[1]
if(F.excavation_required <= excavation_level + F.view_range)
archaeo_overlay = "overlay_archaeo[rand(1,3)]"
overlays += archaeo_overlay
updateIcon = 1
else if(archaeo_overlay && (!finds || !finds.len))
archaeo_overlay = null
updateIcon = 1
//there's got to be a better way to do this
var/update_excav_overlay = 0
if(excavation_level >= 75)
if(excavation_level - P.excavation_amount < 75)
if(excavation_level >= 150)
if(excavation_level - P.excavation_amount < 150)
update_excav_overlay = 1
else if(excavation_level >= 100)
if(excavation_level - P.excavation_amount < 100)
update_excav_overlay = 1
else if(excavation_level >= 50)
if(excavation_level - P.excavation_amount < 50)
update_excav_overlay = 1
else if(excavation_level >= 25)
if(excavation_level - P.excavation_amount < 25)
update_excav_overlay = 1
//update overlays displaying excavation level
if( !(excav_overlay && excavation_level > 0) || update_excav_overlay )
var/excav_quadrant = round(excavation_level / 25) + 1
excav_overlay = "overlay_excv[excav_quadrant]_[rand(1,3)]"
overlays += excav_overlay
updateIcon = 1
if(updateIcon)
update_icon()
//drop some rocks
next_rock += P.excavation_amount * 10
while(next_rock > 100)
next_rock -= 100
next_rock += P.excavation_amount
while(next_rock > 50)
next_rock -= 50
var/obj/item/weapon/ore/O = new(src)
geologic_data.UpdateNearbyArtifactInfo(src)
O.geologic_data = geologic_data
@@ -481,11 +487,11 @@ var/list/mining_overlay_cache = list()
make_floor()
update_icon(1)
/turf/simulated/mineral/proc/excavate_find(var/prob_clean = 0, var/datum/find/F)
/turf/simulated/mineral/proc/excavate_find(var/is_clean = 0, var/datum/find/F)
//with skill and luck, players can cleanly extract finds
//otherwise, they come out inside a chunk of rock
var/obj/item/weapon/X
if(prob_clean)
if(is_clean)
X = new /obj/item/weapon/archaeological_find(src, new_item_type = F.find_type)
else
X = new /obj/item/weapon/ore/strangerock(src, inside_item_type = F.find_type)
@@ -503,7 +509,7 @@ var/list/mining_overlay_cache = list()
//many finds are ancient and thus very delicate - luckily there is a specialised energy suspension field which protects them when they're being extracted
if(prob(F.prob_delicate))
var/obj/effect/suspension_field/S = locate() in src
if(!S || S.field_type != get_responsive_reagent(F.find_type))
if(!S)
if(X)
visible_message("<span class='danger'>\The [pick("[display_name] crumbles away into dust","[display_name] breaks apart")].</span>")
qdel(X)
+1 -1
View File
@@ -1,5 +1,5 @@
/obj/item/weapon/ore
name = "rock"
name = "small rock"
icon = 'icons/obj/mining.dmi'
icon_state = "ore2"
w_class = 2
+1 -1
View File
@@ -78,7 +78,7 @@
healths.icon_state = "health6"
timeofdeath = world.time
if(mind) mind.store_memory("Time of death: [worldtime2text()]", 0)
if(mind) mind.store_memory("Time of death: [stationtime2text()]", 0)
living_mob_list -= src
dead_mob_list |= src
+1 -1
View File
@@ -194,7 +194,7 @@
on_hear_radio(part_a, speaker_name, track, part_b, formatted)
/proc/say_timestamp()
return "<span class='say_quote'>\[[worldtime2text()]\]</span>"
return "<span class='say_quote'>\[[stationtime2text()]\]</span>"
/mob/proc/on_hear_radio(part_a, speaker_name, track, part_b, formatted)
src << "[part_a][speaker_name][part_b][formatted]"
+1 -1
View File
@@ -7,7 +7,7 @@
/mob/living/carbon/proc/breathe()
//if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
if(!should_have_organ(O_LUNGS) || does_not_breathe) return
if(!should_have_organ(O_LUNGS)) return
var/datum/gas_mixture/breath = null
@@ -1025,9 +1025,8 @@
src << msg
organ.take_damage(rand(1,3), 0, 0)
if(!(organ.robotic >= ORGAN_ROBOT) && !(should_have_organ(O_HEART))) //There is no blood in protheses.
if(!(organ.robotic >= ORGAN_ROBOT) && (should_have_organ(O_HEART))) //There is no blood in protheses.
organ.status |= ORGAN_BLEEDING
src.adjustToxLoss(rand(1,3))
/mob/living/carbon/human/verb/check_pulse()
set category = "Object"
@@ -18,12 +18,11 @@ emp_act
//Shields
var/shield_check = check_shields(P.damage, P, null, def_zone, "the [P.name]")
if(shield_check)
if(shield_check < 0)
return shield_check
else
P.on_hit(src, 2, def_zone)
return 2
if(shield_check) // If the block roll succeeded, this is true.
if(shield_check < 0) // The shield did something weird and the bullet needs to keep doing things (e.g. it was reflected).
return shield_check // Likely equal to PROJECTILE_FORCE_MISS or PROJECTILE_CONTINUE.
else // Otherwise we blocked normally and stopped all the damage.
return 0
//Shrapnel
if(P.can_embed())
+10 -5
View File
@@ -4,9 +4,9 @@
#define HUMAN_MAX_OXYLOSS 1 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it.
#define HUMAN_CRIT_MAX_OXYLOSS ( 2.0 / 6) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 50HP to get through, so (1/6)*last_tick_duration per second. Breaths however only happen every 4 ticks. last_tick_duration = ~2.0 on average
#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point
#define HEAT_DAMAGE_LEVEL_2 4 //Amount of damage applied when your body temperature passes the 400K point
#define HEAT_DAMAGE_LEVEL_3 8 //Amount of damage applied when your body temperature passes the 1000K point
#define HEAT_DAMAGE_LEVEL_1 5 //Amount of damage applied when your body temperature just passes the 360.15k safety point
#define HEAT_DAMAGE_LEVEL_2 10 //Amount of damage applied when your body temperature passes the 400K point
#define HEAT_DAMAGE_LEVEL_3 20 //Amount of damage applied when your body temperature passes the 1000K point
#define COLD_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when your body temperature just passes the 260.15k safety point
#define COLD_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when your body temperature passes the 200K point
@@ -327,6 +327,11 @@
if(status_flags & GODMODE)
return
if(does_not_breathe)
failed_last_breath = 0
adjustOxyLoss(-5)
return
if(!breath || (breath.total_moles == 0) || suiciding)
failed_last_breath = 1
if(suiciding)
@@ -1184,10 +1189,10 @@
// if(resting || lying || sleeping) rest.icon_state = "rest1"
// else rest.icon_state = "rest0"
if(toxin)
if(hal_screwyhud == 4 || phoron_alert) toxin.icon_state = "tox1"
if(hal_screwyhud == 4 || (phoron_alert && !does_not_breathe)) toxin.icon_state = "tox1"
else toxin.icon_state = "tox0"
if(oxygen)
if(hal_screwyhud == 3 || oxygen_alert) oxygen.icon_state = "oxy1"
if(hal_screwyhud == 3 || (oxygen_alert && !does_not_breathe)) oxygen.icon_state = "oxy1"
else oxygen.icon_state = "oxy0"
if(fire)
if(fire_alert) fire.icon_state = "fire[fire_alert]" //fire_alert is either 0 if no alert, 1 for cold and 2 for heat.
@@ -103,11 +103,11 @@
min_age = 17
max_age = 80
blurb = "The Tajaran race is a species of feline-like bipeds hailing from the planet of Ahdomai in the \
S'randarr system. They have been brought up into the space age by the Humans and Skrell, and have been \
influenced heavily by their long history of Slavemaster rule. They have a structured, clan-influenced way \
of family and politics. They prefer colder environments, and speak a variety of languages, mostly Siik'Maas, \
using unique inflections their mouths form."
blurb = "The Tajaran are a mammalian species resembling roughly felines, hailing from Meralar in the Rarkajar system. \
While reaching to the stars independently from outside influences, the humans engaged them in peaceful trade contact \
and have accelerated the fledgling culture into the interstellar age. Their history is full of war and highly fractious \
governments, something that permeates even to today's times. They prefer colder, tundra-like climates, much like their \
home worlds and speak a variety of languages, especially Siik and Akhani."
cold_level_1 = 200 //Default 260
cold_level_2 = 140 //Default 200
+44 -1
View File
@@ -565,7 +565,21 @@ var/list/ai_verbs_hidden = list( // For why this exists, refer to https://xkcd.c
var/icon_list[] = list(
"default",
"floating face",
"carp"
"carp",
"ian",
"runtime",
"poly",
"pun pun",
"male human",
"female human",
"male unathi",
"female unathi",
"male tajara",
"female tajara",
"male tesharii",
"female tesharii",
"male skrell",
"female skrell"
)
input = input("Please select a hologram:") as null|anything in icon_list
if(input)
@@ -577,6 +591,35 @@ var/list/ai_verbs_hidden = list( // For why this exists, refer to https://xkcd.c
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo2"))
if("carp")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo4"))
if("ian")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"corgi"))
if("runtime")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"cat"))
if("poly")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"parrot_fly"))
if("pun pun")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"punpun"))
if("male human")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holohumm"))
if("female human")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holohumf"))
if("male unathi")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holounam"))
if("female unathi")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holounaf"))
if("male tajara")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotajm"))
if("female tajara")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotajf"))
if("male tesharii")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotesm"))
if("female tesharii")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotesf"))
if("male skrell")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holoskrm"))
if("female skrell")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holoskrf"))
return
//Toggles the luminosity and applies it by re-entereing the camera.
+2 -2
View File
@@ -654,8 +654,8 @@
if(.)
if(statpanel("Status") && ticker && ticker.current_state != GAME_STATE_PREGAME)
stat("Station Time", worldtime2text())
stat("Round Duration", round_duration_as_text())
stat("Station Time", stationtime2text())
stat("Round Duration", roundduration2text())
if(client.holder)
if(statpanel("Status"))
+2 -2
View File
@@ -76,7 +76,7 @@
stat("Game Mode:", "Secret")
else
if(ticker.hide_mode == 0)
stat("Game Mode:", "[master_mode]") // Old setting for showing the game mode
stat("Game Mode:", "[config.mode_names[master_mode]]") // Old setting for showing the game mode
if(ticker.current_state == GAME_STATE_PREGAME)
stat("Time To Start:", "[ticker.pregame_timeleft][round_progressing ? "" : " (DELAYED)"]")
@@ -362,7 +362,7 @@
var/dat = "<html><body><center>"
dat += "<b>Welcome, [name].<br></b>"
dat += "Round Duration: [round_duration_as_text()]<br>"
dat += "Round Duration: [roundduration2text()]<br>"
if(emergency_shuttle) //In case Nanotrasen decides reposess CentComm's shuttles.
if(emergency_shuttle.going_to_centcom()) //Shuttle is going to centcomm, not recalled
+7 -5
View File
@@ -135,16 +135,18 @@ var/const/BLOOD_VOLUME_SURVIVE = 40
drip(blood_max)
//Makes a blood drop, leaking amt units of blood from the mob
/mob/living/carbon/human/proc/drip(var/amt as num)
/mob/living/carbon/human/proc/drip(var/amt)
if(remove_blood(amt))
blood_splatter(src,src)
/mob/living/carbon/human/proc/remove_blood(var/amt)
if(!should_have_organ(O_HEART)) //TODO: Make drips come from the reagents instead.
return
return 0
if(!amt)
return
return 0
vessel.remove_reagent("blood",amt)
blood_splatter(src,src)
return vessel.remove_reagent("blood",amt * (src.mob_size/MOB_MEDIUM))
/****************************************************
BLOOD TRANSFERS
+6 -1
View File
@@ -474,6 +474,11 @@ This function completely restores a damaged organ to perfect condition.
wounds += I
owner.custom_pain("You feel something rip in your [name]!", 1)
//Burn damage can cause fluid loss due to blistering and cook-off
if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT))
var/fluid_loss = (damage/(owner.maxHealth - config.health_threshold_dead)) * owner.species.blood_volume*(1 - BLOOD_VOLUME_SURVIVE/100)
owner.remove_blood(fluid_loss)
// first check whether we can widen an existing wound
if(wounds.len > 0 && prob(max(50+(number_wounds-1)*10,90)))
if((type == CUT || type == BRUISE) && damage >= 5)
@@ -733,7 +738,7 @@ Note that amputating the affected organ does in fact remove the infection from t
else
brute_dam += W.damage
if(!(robotic >= ORGAN_ROBOT) && W.bleeding() && (H && !H.should_have_organ(O_HEART)))
if(!(robotic >= ORGAN_ROBOT) && W.bleeding() && (H && H.should_have_organ(O_HEART)))
W.bleed_timer--
status |= ORGAN_BLEEDING
+2 -2
View File
@@ -239,8 +239,8 @@
t = replacetext(t, "\[/i\]", "</I>")
t = replacetext(t, "\[u\]", "<U>")
t = replacetext(t, "\[/u\]", "</U>")
t = replacetext(t, "\[time\]", "[worldtime2text()]")
t = replacetext(t, "\[date\]", "[worlddate2text()]")
t = replacetext(t, "\[time\]", "[stationtime2text()]")
t = replacetext(t, "\[date\]", "[stationtime2text()]")
t = replacetext(t, "\[large\]", "<font size=\"4\">")
t = replacetext(t, "\[/large\]", "</font>")
t = replacetext(t, "\[sign\]", "<font face=\"[signfont]\"><i>[get_signature(P, user)]</i></font>")
+2
View File
@@ -91,6 +91,8 @@
/obj/item/ammo_magazine/New()
..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
if(multiple_sprites)
initialize_magazine_icondata(src)
+13 -9
View File
@@ -97,30 +97,30 @@
return 0
if(my_atom.flags & NOREACT) // No reactions here
return 0
var/reaction_occured
var/list/effect_reactions = list()
var/list/eligible_reactions = list()
for(var/i in 1 to PROCESS_REACTION_ITER)
reaction_occured = 0
//need to rebuild this to account for chain reactions
for(var/datum/reagent/R in reagent_list)
eligible_reactions |= chemical_reactions_list[R.id]
for(var/datum/chemical_reaction/C in eligible_reactions)
if(C.can_happen(src) && C.process(src))
effect_reactions |= C
reaction_occured = 1
eligible_reactions.Cut()
if(!reaction_occured)
break
for(var/datum/chemical_reaction/C in effect_reactions)
C.post_reaction(src)
update_total()
return reaction_occured
@@ -300,7 +300,7 @@
amount -= spill
if(spill)
splash(target.loc, spill, multiplier, copy, min_spill, max_spill)
trans_to(target, amount, multiplier, copy)
/datum/reagents/proc/trans_id_to(var/atom/target, var/id, var/amount = 1)
@@ -366,6 +366,10 @@
var/perm = 1
if(isliving(target)) //will we ever even need to tranfer reagents to non-living mobs?
var/mob/living/L = target
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.check_shields(0, null, null, null, "the spray") == 1) //If they block the spray, it does nothing.
amount = 0
perm = L.reagent_permeability()
return trans_to_mob(target, amount, CHEM_TOUCH, perm, copy)
@@ -416,4 +420,4 @@
/* Atom reagent creation - use it all the time */
/atom/proc/create_reagents(var/max_vol)
reagents = new/datum/reagents(max_vol, src)
reagents = new/datum/reagents(max_vol, src)
@@ -133,7 +133,7 @@
M.adjustOxyLoss(3 * removed)
M.Weaken(10)
M.silent = max(M.silent, 10)
M.tod = worldtime2text()
M.tod = stationtime2text()
/datum/reagent/toxin/zombiepowder/Destroy()
if(holder && holder.my_atom && ismob(holder.my_atom))
@@ -6,7 +6,7 @@
amount_per_transfer_from_this = 10
volume = 100
item_state = "broken_beer" //Generic held-item sprite until unique ones are made.
force = 5
force = 6
var/smash_duration = 5 //Directly relates to the 'weaken' duration. Lowered by armor (i.e. helmets)
var/isGlass = 1 //Whether the 'bottle' is made of glass or not so that milk cartons dont shatter when someone gets hit by it
@@ -172,7 +172,7 @@
desc = "A bottle with a sharp broken bottom."
icon = 'icons/obj/drinks.dmi'
icon_state = "broken_bottle"
force = 9
force = 10
throwforce = 5
throw_speed = 3
throw_range = 5
+1 -1
View File
@@ -389,7 +389,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
PR.name = "list of researched technologies"
PR.info = "<center><b>[station_name()] Science Laboratories</b>"
PR.info += "<h2>[ (text2num(href_list["print"]) == 2) ? "Detailed" : ] Research Progress Report</h2>"
PR.info += "<i>report prepared at [worldtime2text()] station time</i></center><br>"
PR.info += "<i>report prepared at [stationtime2text()] station time</i></center><br>"
if(text2num(href_list["print"]) == 2)
PR.info += GetResearchListInfo()
else
@@ -1,123 +0,0 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Large finds - (Potentially) active alien machinery from the dawn of time
/datum/artifact_find
var/artifact_id
var/artifact_find_type
var/artifact_detect_range
/datum/artifact_find/New()
artifact_detect_range = rand(5,300)
artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]"
artifact_find_type = pick(\
5;/obj/machinery/power/supermatter,\
5;/obj/structure/constructshell,\
5;/obj/machinery/syndicate_beacon,\
25;/obj/machinery/power/supermatter/shard,\
50;/obj/structure/cult/pylon,\
100;/obj/machinery/auto_cloner,\
100;/obj/machinery/giga_drill,\
100;/obj/machinery/replicator,\
150;/obj/structure/crystal,\
1000;/obj/machinery/artifact)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Boulders - sometimes turn up after excavating turf - excavate further to try and find large xenoarch finds
/obj/structure/boulder
name = "rocky debris"
desc = "Leftover rock from an excavation, it's been partially dug out already but there's still a lot to go."
icon = 'icons/obj/mining.dmi'
icon_state = "boulder1"
density = 1
opacity = 1
anchored = 1
var/excavation_level = 0
var/datum/geosample/geological_data
var/datum/artifact_find/artifact_find
var/last_act = 0
/obj/structure/boulder/New()
icon_state = "boulder[rand(1,4)]"
excavation_level = rand(5,50)
/obj/structure/boulder/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/device/core_sampler))
src.geological_data.artifact_distance = rand(-100,100) / 100
src.geological_data.artifact_id = artifact_find.artifact_id
var/obj/item/device/core_sampler/C = W
C.sample_item(src, user)
return
if (istype(W, /obj/item/device/depth_scanner))
var/obj/item/device/depth_scanner/C = W
C.scan_atom(user, src)
return
if (istype(W, /obj/item/device/measuring_tape))
var/obj/item/device/measuring_tape/P = W
user.visible_message("\blue[user] extends [P] towards [src].","\blue You extend [P] towards [src].")
if(do_after(user,40))
user << "\blue \icon[P] [src] has been excavated to a depth of [2*src.excavation_level]cm."
return
if (istype(W, /obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/P = W
if(last_act + P.digspeed > world.time)//prevents message spam
return
last_act = world.time
user << "\red You start [P.drill_verb] [src]."
if(!do_after(user,P.digspeed))
return
user << "\blue You finish [P.drill_verb] [src]."
excavation_level += P.excavation_amount
if(excavation_level > 100)
//failure
user.visible_message("<font color='red'><b>[src] suddenly crumbles away.</b></font>",\
"\red [src] has disintegrated under your onslaught, any secrets it was holding are long gone.")
qdel(src)
return
if(prob(excavation_level))
//success
if(artifact_find)
var/spawn_type = artifact_find.artifact_find_type
var/obj/O = new spawn_type(get_turf(src))
if(istype(O,/obj/machinery/artifact))
var/obj/machinery/artifact/X = O
if(X.my_effect)
X.my_effect.artifact_id = artifact_find.artifact_id
src.visible_message("<font color='red'><b>[src] suddenly crumbles away.</b></font>")
else
user.visible_message("<font color='red'><b>[src] suddenly crumbles away.</b></font>",\
"\blue [src] has been whittled away under your careful excavation, but there was nothing of interest inside.")
qdel(src)
/obj/structure/boulder/Bumped(AM)
. = ..()
if(istype(AM,/mob/living/carbon/human))
var/mob/living/carbon/human/H = AM
var/obj/item/weapon/pickaxe/P = H.get_inactive_hand()
if(istype(P))
src.attackby(P, H)
else if(istype(AM,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = AM
if(istype(R.module_active,/obj/item/weapon/pickaxe))
attackby(R.module_active,R)
else if(istype(AM,/obj/mecha))
var/obj/mecha/M = AM
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill))
M.selected.action(src)
@@ -1,90 +0,0 @@
//chemistry stuff here so that it can be easily viewed/modified
/obj/item/weapon/reagent_containers/glass/solution_tray
name = "solution tray"
desc = "A small, open-topped glass container for delicate research samples. It sports a re-useable strip for labelling with a pen."
icon = 'icons/obj/device.dmi'
icon_state = "solution_tray"
matter = list("glass" = 5)
w_class = 2.0
amount_per_transfer_from_this = 1
possible_transfer_amounts = list(1, 2)
volume = 2
flags = OPENCONTAINER
obj/item/weapon/reagent_containers/glass/solution_tray/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
if(istype(W, /obj/item/weapon/pen))
var/new_label = sanitizeSafe(input("What should the new label be?","Label solution tray"), MAX_NAME_LEN)
if(new_label)
name = "solution tray ([new_label])"
user << "\blue You write on the label of the solution tray."
else
..(W, user)
/obj/item/weapon/storage/box/solution_trays
name = "solution tray box"
icon_state = "solution_trays"
New()
..()
new /obj/item/weapon/reagent_containers/glass/solution_tray( src )
new /obj/item/weapon/reagent_containers/glass/solution_tray( src )
new /obj/item/weapon/reagent_containers/glass/solution_tray( src )
new /obj/item/weapon/reagent_containers/glass/solution_tray( src )
new /obj/item/weapon/reagent_containers/glass/solution_tray( src )
new /obj/item/weapon/reagent_containers/glass/solution_tray( src )
new /obj/item/weapon/reagent_containers/glass/solution_tray( src )
/obj/item/weapon/reagent_containers/glass/beaker/tungsten
name = "beaker 'tungsten'"
New()
..()
reagents.add_reagent("tungsten",50)
update_icon()
/obj/item/weapon/reagent_containers/glass/beaker/oxygen
name = "beaker 'oxygen'"
New()
..()
reagents.add_reagent("oxygen",50)
update_icon()
/obj/item/weapon/reagent_containers/glass/beaker/sodium
name = "beaker 'sodium'"
New()
..()
reagents.add_reagent("sodium",50)
update_icon()
/obj/item/weapon/reagent_containers/glass/beaker/lithium
name = "beaker 'lithium'"
New()
..()
reagents.add_reagent("lithium",50)
update_icon()
/obj/item/weapon/reagent_containers/glass/beaker/water
name = "beaker 'water'"
New()
..()
reagents.add_reagent("water",50)
update_icon()
/obj/item/weapon/reagent_containers/glass/beaker/water
name = "beaker 'water'"
New()
..()
reagents.add_reagent("water",50)
update_icon()
/obj/item/weapon/reagent_containers/glass/beaker/fuel
name = "beaker 'fuel'"
New()
..()
reagents.add_reagent("fuel",50)
update_icon()
@@ -1,281 +0,0 @@
#define ARCHAEO_BOWL 1
#define ARCHAEO_URN 2
#define ARCHAEO_CUTLERY 3
#define ARCHAEO_STATUETTE 4
#define ARCHAEO_INSTRUMENT 5
#define ARCHAEO_KNIFE 6
#define ARCHAEO_COIN 7
#define ARCHAEO_HANDCUFFS 8
#define ARCHAEO_BEARTRAP 9
#define ARCHAEO_LIGHTER 10
#define ARCHAEO_BOX 11
#define ARCHAEO_GASTANK 12
#define ARCHAEO_TOOL 13
#define ARCHAEO_METAL 14
#define ARCHAEO_PEN 15
#define ARCHAEO_CRYSTAL 16
#define ARCHAEO_CULTBLADE 17
#define ARCHAEO_TELEBEACON 18
#define ARCHAEO_CLAYMORE 19
#define ARCHAEO_CULTROBES 20
#define ARCHAEO_SOULSTONE 21
#define ARCHAEO_SHARD 22
#define ARCHAEO_RODS 23
#define ARCHAEO_STOCKPARTS 24
#define ARCHAEO_KATANA 25
#define ARCHAEO_LASER 26
#define ARCHAEO_GUN 27
#define ARCHAEO_UNKNOWN 28
#define ARCHAEO_FOSSIL 29
#define ARCHAEO_SHELL 30
#define ARCHAEO_PLANT 31
#define ARCHAEO_REMAINS_HUMANOID 32
#define ARCHAEO_REMAINS_ROBOT 33
#define ARCHAEO_REMAINS_XENO 34
#define ARCHAEO_GASMASK 35
#define MAX_ARCHAEO 35
//eggs
//droppings
//footprints
//alien clothing
//DNA sampling from fossils, or a new archaeo type specifically for it?
//descending order of likeliness to spawn
#define DIGSITE_GARDEN 1
#define DIGSITE_ANIMAL 2
#define DIGSITE_HOUSE 3
#define DIGSITE_TECHNICAL 4
#define DIGSITE_TEMPLE 5
#define DIGSITE_WAR 6
/proc/get_responsive_reagent(var/find_type)
switch(find_type)
if(ARCHAEO_BOWL)
return "mercury"
if(ARCHAEO_URN)
return "mercury"
if(ARCHAEO_CUTLERY)
return "mercury"
if(ARCHAEO_STATUETTE)
return "mercury"
if(ARCHAEO_INSTRUMENT)
return "mercury"
if(ARCHAEO_COIN)
return "iron"
if(ARCHAEO_KNIFE)
return "iron"
if(ARCHAEO_HANDCUFFS)
return "mercury"
if(ARCHAEO_BEARTRAP)
return "mercury"
if(ARCHAEO_LIGHTER)
return "mercury"
if(ARCHAEO_BOX)
return "mercury"
if(ARCHAEO_GASTANK)
return "mercury"
if(ARCHAEO_TOOL)
return "iron"
if(ARCHAEO_METAL)
return "iron"
if(ARCHAEO_PEN)
return "mercury"
if(ARCHAEO_CRYSTAL)
return "nitrogen"
if(ARCHAEO_CULTBLADE)
return "potassium"
if(ARCHAEO_TELEBEACON)
return "potassium"
if(ARCHAEO_CLAYMORE)
return "iron"
if(ARCHAEO_CULTROBES)
return "potassium"
if(ARCHAEO_SOULSTONE)
return "nitrogen"
if(ARCHAEO_SHARD)
return "nitrogen"
if(ARCHAEO_RODS)
return "iron"
if(ARCHAEO_STOCKPARTS)
return "potassium"
if(ARCHAEO_KATANA)
return "iron"
if(ARCHAEO_LASER)
return "iron"
if(ARCHAEO_GUN)
return "iron"
if(ARCHAEO_UNKNOWN)
return "mercury"
if(ARCHAEO_FOSSIL)
return "carbon"
if(ARCHAEO_SHELL)
return "carbon"
if(ARCHAEO_PLANT)
return "carbon"
if(ARCHAEO_REMAINS_HUMANOID)
return "carbon"
if(ARCHAEO_REMAINS_ROBOT)
return "carbon"
if(ARCHAEO_REMAINS_XENO)
return "carbon"
if(ARCHAEO_GASMASK)
return "carbon"
return "phoron"
//see /turf/simulated/mineral/New() in code/modules/mining/mine_turfs.dm
/proc/get_random_digsite_type()
return pick(100;DIGSITE_GARDEN,95;DIGSITE_ANIMAL,90;DIGSITE_HOUSE,85;DIGSITE_TECHNICAL,80;DIGSITE_TEMPLE,75;DIGSITE_WAR)
/proc/get_random_find_type(var/digsite)
var/find_type = 0
switch(digsite)
if(DIGSITE_GARDEN)
find_type = pick(\
100;ARCHAEO_PLANT,\
25;ARCHAEO_SHELL,\
25;ARCHAEO_FOSSIL,\
5;ARCHAEO_BEARTRAP\
)
if(DIGSITE_ANIMAL)
find_type = pick(\
100;ARCHAEO_FOSSIL,\
50;ARCHAEO_SHELL,\
50;ARCHAEO_PLANT,\
25;ARCHAEO_BEARTRAP\
)
if(DIGSITE_HOUSE)
find_type = pick(\
100;ARCHAEO_BOWL,\
100;ARCHAEO_URN,\
100;ARCHAEO_CUTLERY,\
100;ARCHAEO_STATUETTE,\
100;ARCHAEO_INSTRUMENT,\
100;ARCHAEO_PEN,\
100;ARCHAEO_LIGHTER,\
100;ARCHAEO_BOX,\
75;ARCHAEO_GASMASK,\
75;ARCHAEO_COIN,\
75;ARCHAEO_UNKNOWN,\
50;ARCHAEO_SHARD,\
50;ARCHAEO_RODS,\
25;ARCHAEO_METAL\
)
if(DIGSITE_TECHNICAL)
find_type = pick(\
125;ARCHAEO_GASMASK,\
100;ARCHAEO_METAL,\
100;ARCHAEO_GASTANK,\
100;ARCHAEO_TELEBEACON,\
100;ARCHAEO_TOOL,\
100;ARCHAEO_STOCKPARTS,\
75;ARCHAEO_SHARD,\
75;ARCHAEO_RODS,\
75;ARCHAEO_UNKNOWN,\
50;ARCHAEO_HANDCUFFS,\
50;ARCHAEO_BEARTRAP,\
)
if(DIGSITE_TEMPLE)
find_type = pick(\
200;ARCHAEO_CULTROBES,\
200;ARCHAEO_STATUETTE,\
100;ARCHAEO_URN,\
100;ARCHAEO_BOWL,\
100;ARCHAEO_KNIFE,\
100;ARCHAEO_CRYSTAL,\
75;ARCHAEO_CULTBLADE,\
50;ARCHAEO_SOULSTONE,\
50;ARCHAEO_UNKNOWN,\
25;ARCHAEO_HANDCUFFS,\
25;ARCHAEO_BEARTRAP,\
10;ARCHAEO_KATANA,\
10;ARCHAEO_CLAYMORE,\
10;ARCHAEO_SHARD,\
10;ARCHAEO_RODS,\
10;ARCHAEO_METAL,\
10;ARCHAEO_GASMASK,\
)
if(DIGSITE_WAR)
find_type = pick(\
100;ARCHAEO_GUN,\
100;ARCHAEO_KNIFE,\
75;ARCHAEO_LASER,\
75;ARCHAEO_KATANA,\
75;ARCHAEO_CLAYMORE,\
50;ARCHAEO_UNKNOWN,\
50;ARCHAEO_CULTROBES,\
50;ARCHAEO_CULTBLADE,\
50;ARCHAEO_GASMASK,\
25;ARCHAEO_HANDCUFFS,\
25;ARCHAEO_BEARTRAP,\
25;ARCHAEO_TOOL\
)
return find_type
var/list/responsive_carriers = list( \
"carbon", \
"potassium", \
"hydrogen", \
"nitrogen", \
"mercury", \
"iron", \
"chlorine", \
"phosphorus", \
"phoron")
var/list/finds_as_strings = list( \
"Trace organic cells", \
"Long exposure particles", \
"Trace water particles", \
"Crystalline structures", \
"Metallic derivative", \
"Metallic composite", \
"Metamorphic/igneous rock composite", \
"Metamorphic/sedimentary rock composite", \
"Anomalous material" )
#undef ARCHAEO_BOWL
#undef ARCHAEO_URN
#undef ARCHAEO_CUTLERY
#undef ARCHAEO_STATUETTE
#undef ARCHAEO_INSTRUMENT
#undef ARCHAEO_KNIFE
#undef ARCHAEO_COIN
#undef ARCHAEO_HANDCUFFS
#undef ARCHAEO_BEARTRAP
#undef ARCHAEO_LIGHTER
#undef ARCHAEO_BOX
#undef ARCHAEO_GASTANK
#undef ARCHAEO_TOOL
#undef ARCHAEO_METAL
#undef ARCHAEO_PEN
#undef ARCHAEO_CRYSTAL
#undef ARCHAEO_CULTBLADE
#undef ARCHAEO_TELEBEACON
#undef ARCHAEO_CLAYMORE
#undef ARCHAEO_CULTROBES
#undef ARCHAEO_SOULSTONE
#undef ARCHAEO_SHARD
#undef ARCHAEO_RODS
#undef ARCHAEO_STOCKPARTS
#undef ARCHAEO_KATANA
#undef ARCHAEO_LASER
#undef ARCHAEO_GUN
#undef ARCHAEO_UNKNOWN
#undef ARCHAEO_FOSSIL
#undef ARCHAEO_SHELL
#undef ARCHAEO_PLANT
#undef ARCHAEO_REMAINS_HUMANOID
#undef ARCHAEO_REMAINS_ROBOT
#undef ARCHAEO_REMAINS_XENO
#undef ARCHAEO_GASMASK
#undef MAX_ARCHAEO
#undef DIGSITE_GARDEN
#undef DIGSITE_ANIMAL
#undef DIGSITE_HOUSE
#undef DIGSITE_TECHNICAL
#undef DIGSITE_TEMPLE
#undef DIGSITE_WAR
@@ -1,129 +0,0 @@
/*
#define FIND_PLANT 1
#define FIND_BIO 2
#define FIND_METEORIC 3
#define FIND_ICE 4
#define FIND_CRYSTALLINE 5
#define FIND_METALLIC 6
#define FIND_IGNEOUS 7
#define FIND_METAMORPHIC 8
#define FIND_SEDIMENTARY 9
#define FIND_NOTHING 10
*/
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Rock sliver
/obj/item/weapon/rocksliver
name = "rock sliver"
desc = "It looks extremely delicate."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "sliver1" //0-4
w_class = 1
sharp = 1
//item_state = "electronic"
var/source_rock = "/turf/simulated/mineral/"
var/datum/geosample/geological_data
/obj/item/weapon/rocksliver/New()
icon_state = "sliver[rand(1,3)]"
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
create_reagents(50)
reagents.add_reagent("ground_rock",50)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Geosample datum
/datum/geosample
var/age = 0 //age can correspond to different archaeological finds
var/age_thousand = 0
var/age_million = 0
var/age_billion = 0
var/artifact_id = "" //id of a nearby artifact, if there is one
var/artifact_distance = -1 //proportional to distance
var/source_mineral = "chlorine" //machines will pop up a warning telling players that the sample may be confused
//
//var/source_mineral
//all potential finds are initialised to null, so nullcheck before you access them
var/list/find_presence = list()
/datum/geosample/New(var/turf/simulated/mineral/container)
UpdateTurf(container)
//this should only need to be called once
/datum/geosample/proc/UpdateTurf(var/turf/simulated/mineral/container)
set background = 1
if(!container || !istype(container))
return
age = rand(1,999)
if(container.mineral)
if(islist(container.mineral.xarch_ages))
var/list/ages = container.mineral.xarch_ages
if(ages["thousand"])
age_thousand = rand(1,ages["thousand"])
if(ages["million"])
age_million = rand(1,ages["million"])
if(ages["billion"])
if(ages["billion_lower"])
age_billion = rand(ages["billion_lower"],ages["billion"])
else
age_billion = rand(1,ages["billion"])
if(container.mineral.xarch_source_mineral)
source_mineral = container.mineral.xarch_source_mineral
if(prob(75))
find_presence["phosphorus"] = rand(1,500) / 100
if(prob(25))
find_presence["mercury"] = rand(1,500) / 100
find_presence["chlorine"] = rand(500,2500) / 100
//loop over finds, grab any relevant stuff
for(var/datum/find/F in container.finds)
var/responsive_reagent = get_responsive_reagent(F.find_type)
find_presence[responsive_reagent] = F.dissonance_spread
//loop over again to reset values to percentages
var/total_presence = 0
for(var/carrier in find_presence)
total_presence += find_presence[carrier]
for(var/carrier in find_presence)
find_presence[carrier] = find_presence[carrier] / total_presence
/*for(var/entry in find_presence)
total_spread += find_presence[entry]*/
//have this separate from UpdateTurf() so that we dont have a billion turfs being updated (redundantly) every time an artifact spawns
/datum/geosample/proc/UpdateNearbyArtifactInfo(var/turf/simulated/mineral/container)
if(!container || !istype(container))
return
if(container.artifact_find)
artifact_distance = rand()
artifact_id = container.artifact_find.artifact_id
else
if(master_controller) //Sanity check due to runtimes ~Z
for(var/turf/simulated/mineral/T in master_controller.artifact_spawning_turfs)
if(T.artifact_find)
var/cur_dist = get_dist(container, T) * 2
if( (artifact_distance < 0 || cur_dist < artifact_distance) && cur_dist <= T.artifact_find.artifact_detect_range )
artifact_distance = cur_dist + rand() * 2 - 1
artifact_id = T.artifact_find.artifact_id
else
master_controller.artifact_spawning_turfs.Remove(T)
/*
#undef FIND_PLANT
#undef FIND_BIO
#undef FIND_METEORIC
#undef FIND_ICE
#undef FIND_CRYSTALLINE
#undef FIND_METALLIC
#undef FIND_IGNEOUS
#undef FIND_METAMORPHIC
#undef FIND_SEDIMENTARY
#undef FIND_NOTHING
*/
@@ -1,249 +0,0 @@
/obj/machinery/artifact_analyser
name = "Anomaly Analyser"
desc = "Studies the emissions of anomalous materials to discover their uses."
icon = 'icons/obj/virology.dmi'
icon_state = "isolator"
anchored = 1
density = 1
var/scan_in_progress = 0
var/scan_num = 0
var/obj/scanned_obj
var/obj/machinery/artifact_scanpad/owned_scanner = null
var/scan_completion_time = 0
var/scan_duration = 120
var/obj/scanned_object
var/report_num = 0
/obj/machinery/artifact_analyser/New()
..()
reconnect_scanner()
/obj/machinery/artifact_analyser/proc/reconnect_scanner()
//connect to a nearby scanner pad
owned_scanner = locate(/obj/machinery/artifact_scanpad) in get_step(src, dir)
if(!owned_scanner)
owned_scanner = locate(/obj/machinery/artifact_scanpad) in orange(1, src)
/obj/machinery/artifact_analyser/attack_hand(var/mob/user as mob)
src.add_fingerprint(user)
interact(user)
/obj/machinery/artifact_analyser/interact(mob/user)
if(stat & (NOPOWER|BROKEN) || get_dist(src, user) > 1)
user.unset_machine(src)
return
var/dat = "<B>Anomalous material analyser</B><BR>"
dat += "<HR>"
if(!owned_scanner)
owned_scanner = locate() in orange(1, src)
if(!owned_scanner)
dat += "<b><font color=red>Unable to locate analysis pad.</font></b><br>"
else if(scan_in_progress)
dat += "Please wait. Analysis in progress.<br>"
dat += "<a href='?src=\ref[src];halt_scan=1'>Halt scanning.</a><br>"
else
dat += "Scanner is ready.<br>"
dat += "<a href='?src=\ref[src];begin_scan=1'>Begin scanning.</a><br>"
dat += "<br>"
dat += "<hr>"
dat += "<a href='?src=\ref[src]'>Refresh</a> <a href='?src=\ref[src];close=1'>Close</a>"
user << browse(dat, "window=artanalyser;size=450x500")
user.set_machine(src)
onclose(user, "artanalyser")
/obj/machinery/artifact_analyser/process()
if(scan_in_progress && world.time > scan_completion_time)
//finish scanning
scan_in_progress = 0
updateDialog()
//print results
var/results = ""
if(!owned_scanner)
reconnect_scanner()
if(!owned_scanner)
results = "Error communicating with scanner."
else if(!scanned_object || scanned_object.loc != owned_scanner.loc)
results = "Unable to locate scanned object. Ensure it was not moved in the process."
else
results = get_scan_info(scanned_object)
src.visible_message("<b>[name]</b> states, \"Scanning complete.\"")
var/obj/item/weapon/paper/P = new(src.loc)
P.name = "[src] report #[++report_num]"
P.info = "<b>[src] analysis report #[report_num]</b><br>"
P.info += "<br>"
P.info += "\icon[scanned_object] [results]"
P.stamped = list(/obj/item/weapon/stamp)
P.overlays = list("paper_stamped")
if(scanned_object && istype(scanned_object, /obj/machinery/artifact))
var/obj/machinery/artifact/A = scanned_object
A.anchored = 0
A.being_used = 0
scanned_object = null
/obj/machinery/artifact_analyser/Topic(href, href_list)
if(href_list["begin_scan"])
if(!owned_scanner)
reconnect_scanner()
if(owned_scanner)
var/artifact_in_use = 0
for(var/obj/O in owned_scanner.loc)
if(O == owned_scanner)
continue
if(O.invisibility)
continue
if(istype(O, /obj/machinery/artifact))
var/obj/machinery/artifact/A = O
if(A.being_used)
artifact_in_use = 1
else
A.anchored = 1
A.being_used = 1
if(artifact_in_use)
src.visible_message("<b>[name]</b> states, \"Cannot harvest. Too much interference.\"")
else
scanned_object = O
scan_in_progress = 1
scan_completion_time = world.time + scan_duration
src.visible_message("<b>[name]</b> states, \"Scanning begun.\"")
break
if(!scanned_object)
src.visible_message("<b>[name]</b> states, \"Unable to isolate scan target.\"")
if(href_list["halt_scan"])
scan_in_progress = 0
src.visible_message("<b>[name]</b> states, \"Scanning halted.\"")
if(href_list["close"])
usr.unset_machine(src)
usr << browse(null, "window=artanalyser")
..()
updateDialog()
//hardcoded responses, oh well
/obj/machinery/artifact_analyser/proc/get_scan_info(var/obj/scanned_obj)
switch(scanned_obj.type)
if(/obj/machinery/auto_cloner)
return "Automated cloning pod - appears to rely on organic nanomachines with a self perpetuating \
ecosystem involving self cannibalism and a symbiotic relationship with the contained liquid.<br><br>\
Structure is composed of a carbo-titanium alloy with interlaced reinforcing energy fields, and the contained liquid \
resembles proto-plasmic residue supportive of single cellular developmental conditions."
if(/obj/machinery/power/supermatter)
return "Super dense phoron clump - Appears to have been shaped or hewn, structure is composed of matter 2000% denser than ordinary carbon matter residue.\
Potential application as unrefined phoron source."
if(/obj/machinery/power/supermatter)
return "Super dense phoron clump - Appears to have been shaped or hewn, structure is composed of matter 2000% denser than ordinary carbon matter residue.\
Potential application as unrefined phoron source."
if(/obj/structure/constructshell)
return "Tribal idol - Item resembles statues/emblems built by superstitious pre-warp civilisations to honour their gods. Material appears to be a \
rock/plastcrete composite."
if(/obj/machinery/giga_drill)
return "Automated mining drill - structure composed of titanium-carbide alloy, with tip and drill lines edged in an alloy of diamond and phoron."
if(/obj/structure/cult/pylon)
return "Tribal pylon - Item resembles statues/emblems built by cargo cult civilisations to honour energy systems from post-warp civilisations."
if(/obj/machinery/replicator)
return "Automated construction unit - Item appears to be able to synthesize synthetic items, some with simple internal circuitry. Method unknown, \
phasing suggested?"
if(/obj/structure/crystal)
return "Crystal formation - Pseudo organic crystalline matrix, unlikely to have formed naturally. No known technology exists to synthesize this exact composition."
if(/obj/machinery/artifact)
//the fun one
var/obj/machinery/artifact/A = scanned_obj
var/out = "Anomalous alien device - Composed of an unknown alloy, "
//primary effect
if(A.my_effect)
//what kind of effect the artifact has
switch(A.my_effect.effect_type)
if(1)
out += "concentrated energy emissions"
if(2)
out += "intermittent psionic wavefront"
if(3)
out += "electromagnetic energy"
if(4)
out += "high frequency particles"
if(5)
out += "organically reactive exotic particles"
if(6)
out += "interdimensional/bluespace? phasing"
if(7)
out += "atomic synthesis"
else
out += "low level energy emissions"
out += " have been detected "
//how the artifact does it's effect
switch(A.my_effect.effect)
if(1)
out += " emitting in an ambient energy field."
if(2)
out += " emitting in periodic bursts."
else
out += " interspersed throughout substructure and shell."
if(A.my_effect.trigger >= 0 && A.my_effect.trigger <= 4)
out += " Activation index involves physical interaction with artifact surface."
else if(A.my_effect.trigger >= 5 && A.my_effect.trigger <= 8)
out += " Activation index involves energetic interaction with artifact surface."
else if(A.my_effect.trigger >= 9 && A.my_effect.trigger <= 12)
out += " Activation index involves precise local atmospheric conditions."
else
out += " Unable to determine any data about activation trigger."
//secondary:
if(A.secondary_effect && A.secondary_effect.activated)
//sciencey words go!
out += "<br><br>Warning, internal scans indicate ongoing [pick("subluminous","subcutaneous","superstructural")] activity operating \
independantly from primary systems. Auxiliary activity involves "
//what kind of effect the artifact has
switch(A.secondary_effect.effect_type)
if(1)
out += "concentrated energy emissions"
if(2)
out += "intermittent psionic wavefront"
if(3)
out += "electromagnetic energy"
if(4)
out += "high frequency particles"
if(5)
out += "organically reactive exotic particles"
if(6)
out += "interdimensional/bluespace? phasing"
if(7)
out += "atomic synthesis"
else
out += "low level radiation"
//how the artifact does it's effect
switch(A.secondary_effect.effect)
if(1)
out += " emitting in an ambient energy field."
if(2)
out += " emitting in periodic bursts."
else
out += " interspersed throughout substructure and shell."
if(A.secondary_effect.trigger >= 0 && A.secondary_effect.trigger <= 4)
out += " Activation index involves physical interaction with artifact surface, but subsystems indicate \
anomalous interference with standard attempts at triggering."
else if(A.secondary_effect.trigger >= 5 && A.secondary_effect.trigger <= 8)
out += " Activation index involves energetic interaction with artifact surface, but subsystems indicate \
anomalous interference with standard attempts at triggering."
else if(A.secondary_effect.trigger >= 9 && A.secondary_effect.trigger <= 12)
out += " Activation index involves precise local atmospheric conditions, but subsystems indicate \
anomalous interference with standard attempts at triggering."
else
out += " Unable to determine any data about activation trigger."
return out
else
//it was an ordinary item
return "[scanned_obj.name] - Mundane application, composed of carbo-ferritic alloy composite."
@@ -1,5 +0,0 @@
//coming soon
//there'll probably be some stuff on the wiki at some point
//original code from alfie275 / lunacode, artifacts are from isaidno
@@ -1,29 +0,0 @@
/obj/item/weapon/storage/belt/archaeology
name = "excavation gear-belt"
desc = "Can hold various excavation gear."
icon_state = "gearbelt"
can_hold = list(
/obj/item/weapon/storage/box/samplebags,
/obj/item/device/core_sampler,
/obj/item/device/beacon_locator,
/obj/item/device/radio/beacon,
/obj/item/device/gps,
/obj/item/device/measuring_tape,
/obj/item/device/flashlight,
/obj/item/weapon/pickaxe,
/obj/item/device/depth_scanner,
/obj/item/device/camera,
/obj/item/weapon/paper,
/obj/item/weapon/photo,
/obj/item/weapon/folder,
/obj/item/weapon/pen,
/obj/item/weapon/folder,
/obj/item/weapon/clipboard,
/obj/item/weapon/anodevice,
/obj/item/clothing/glasses,
/obj/item/weapon/wrench,
/obj/item/weapon/storage/box/excavation,
/obj/item/weapon/anobattery,
/obj/item/device/ano_scanner
)
@@ -1,35 +0,0 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Miscellaneous xenoarchaeology tools
/obj/item/device/gps
name = "relay positioning device"
desc = "Triangulates the approximate co-ordinates using a nearby satellite network."
icon = 'icons/obj/device.dmi'
icon_state = "locator"
item_state = "analyzer"
w_class = 2
/obj/item/device/gps/attack_self(var/mob/user as mob)
var/turf/T = get_turf(src)
user << "\blue \icon[src] [src] flashes <i>[T.x].[rand(0,9)]:[T.y].[rand(0,9)]:[T.z].[rand(0,9)]</i>."
/obj/item/device/measuring_tape
name = "measuring tape"
desc = "A coiled metallic tape used to check dimensions and lengths."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "measuring"
w_class = 2
//todo: dig site tape
/obj/item/weapon/storage/bag/fossils
name = "Fossil Satchel"
desc = "Transports delicate fossils in suspension so they don't break during transit."
icon = 'icons/obj/mining.dmi'
icon_state = "satchel"
slot_flags = SLOT_BELT | SLOT_POCKET
w_class = 3
max_storage_space = 100
max_w_class = 3
can_hold = list(/obj/item/weapon/fossil)
@@ -1,51 +0,0 @@
/obj/item/device/ano_scanner
name = "Alden-Saraspova counter"
desc = "Aids in triangulation of exotic particles."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "flashgun"
item_state = "lampgreen"
w_class = 2.0
slot_flags = SLOT_BELT
var/nearest_artifact_id = "unknown"
var/nearest_artifact_distance = -1
var/last_scan_time = 0
var/scan_delay = 25
/obj/item/device/ano_scanner/initialize()
scan()
/obj/item/device/ano_scanner/attack_self(var/mob/user as mob)
return src.interact(user)
/obj/item/device/ano_scanner/interact(var/mob/user as mob)
if(world.time - last_scan_time >= scan_delay)
spawn(0)
scan()
if(!user) return
if(nearest_artifact_distance >= 0)
user << "Exotic energy detected on wavelength '[nearest_artifact_id]' in a radius of [nearest_artifact_distance]m"
else
user << "Background radiation levels detected."
else
user << "Scanning array is recharging."
/obj/item/device/ano_scanner/proc/scan()
set background = 1
last_scan_time = world.time
nearest_artifact_distance = -1
var/turf/cur_turf = get_turf(src)
if(master_controller) //Sanity check due to runtimes ~Z
for(var/turf/simulated/mineral/T in master_controller.artifact_spawning_turfs)
if(T.artifact_find)
if(T.z == cur_turf.z)
var/cur_dist = get_dist(cur_turf, T) * 2
if( (nearest_artifact_distance < 0 || cur_dist < nearest_artifact_distance) && cur_dist <= T.artifact_find.artifact_detect_range )
nearest_artifact_distance = cur_dist + rand() * 2 - 1
nearest_artifact_id = T.artifact_find.artifact_id
else
master_controller.artifact_spawning_turfs.Remove(T)
cur_turf.visible_message("<span class='info'>[src] clicks.</span>")
@@ -1,95 +0,0 @@
//device to take core samples from mineral turfs - used for various types of analysis
/obj/item/weapon/storage/box/samplebags
name = "sample bag box"
desc = "A box claiming to contain sample bags."
New()
for(var/i=0, i<7, i++)
var/obj/item/weapon/evidencebag/S = new(src)
S.name = "sample bag"
S.desc = "a bag for holding research samples."
..()
return
//////////////////////////////////////////////////////////////////
/obj/item/device/core_sampler
name = "core sampler"
desc = "Used to extract geological core samples."
icon = 'icons/obj/device.dmi'
icon_state = "sampler0"
item_state = "screwdriver_brown"
w_class = 1.0
//slot_flags = SLOT_BELT
var/sampled_turf = ""
var/num_stored_bags = 10
var/obj/item/weapon/evidencebag/filled_bag
/obj/item/device/core_sampler/examine(mob/user)
if(..(user, 2))
user << "\blue Used to extract geological core samples - this one is [sampled_turf ? "full" : "empty"], and has [num_stored_bags] bag[num_stored_bags != 1 ? "s" : ""] remaining."
/obj/item/device/core_sampler/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/evidencebag))
if(num_stored_bags < 10)
qdel(W)
num_stored_bags += 1
user << "\blue You insert the [W] into the core sampler."
else
user << "\red The core sampler can not fit any more bags!"
else
return ..()
/obj/item/device/core_sampler/proc/sample_item(var/item_to_sample, var/mob/user as mob)
var/datum/geosample/geo_data
if(istype(item_to_sample, /turf/simulated/mineral))
var/turf/simulated/mineral/T = item_to_sample
T.geologic_data.UpdateNearbyArtifactInfo(T)
geo_data = T.geologic_data
else if(istype(item_to_sample, /obj/item/weapon/ore))
var/obj/item/weapon/ore/O = item_to_sample
geo_data = O.geologic_data
if(geo_data)
if(filled_bag)
user << "\red The core sampler is full!"
else if(num_stored_bags < 1)
user << "\red The core sampler is out of sample bags!"
else
//create a new sample bag which we'll fill with rock samples
filled_bag = new /obj/item/weapon/evidencebag(src)
filled_bag.name = "sample bag"
filled_bag.desc = "a bag for holding research samples."
icon_state = "sampler1"
num_stored_bags--
//put in a rock sliver
var/obj/item/weapon/rocksliver/R = new()
R.geological_data = geo_data
R.loc = filled_bag
//update the sample bag
filled_bag.icon_state = "evidence"
var/image/I = image("icon"=R, "layer"=FLOAT_LAYER)
filled_bag.overlays += I
filled_bag.overlays += "evidence"
filled_bag.w_class = 1
user << "\blue You take a core sample of the [item_to_sample]."
else
user << "\red You are unable to take a sample of [item_to_sample]."
/obj/item/device/core_sampler/attack_self()
if(filled_bag)
usr << "\blue You eject the full sample bag."
var/success = 0
if(istype(src.loc, /mob))
var/mob/M = src.loc
success = M.put_in_inactive_hand(filled_bag)
if(!success)
filled_bag.loc = get_turf(src)
filled_bag = null
icon_state = "sampler0"
else
usr << "\red The core sampler is empty."
@@ -1,130 +0,0 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Depth scanner - scans rock turfs / boulders and tells players if there is anything interesting inside, logs all finds + coordinates + times
//also known as the x-ray diffractor
/obj/item/device/depth_scanner
name = "depth analysis scanner"
desc = "Used to check spatial depth and density of rock outcroppings."
icon = 'icons/obj/pda.dmi'
icon_state = "crap"
item_state = "analyzer"
w_class = 2.0
slot_flags = SLOT_BELT
var/list/positive_locations = list()
var/datum/depth_scan/current
/datum/depth_scan
var/time = ""
var/coords = ""
var/depth = 0
var/clearance = 0
var/record_index = 1
var/dissonance_spread = 1
var/material = "unknown"
/obj/item/device/depth_scanner/proc/scan_atom(var/mob/user, var/atom/A)
user.visible_message("\blue [user] scans [A], the air around them humming gently.")
if(istype(A,/turf/simulated/mineral))
var/turf/simulated/mineral/M = A
if((M.finds && M.finds.len) || M.artifact_find)
//create a new scanlog entry
var/datum/depth_scan/D = new()
D.coords = "[M.x].[rand(0,9)]:[M.y].[rand(0,9)]:[10 * M.z].[rand(0,9)]"
D.time = worldtime2text()
D.record_index = positive_locations.len + 1
D.material = M.mineral ? M.mineral.display_name : "Rock"
//find the first artifact and store it
if(M.finds.len)
var/datum/find/F = M.finds[1]
D.depth = F.excavation_required * 2 //0-100% and 0-200cm
D.clearance = F.clearance_range * 2
D.material = get_responsive_reagent(F.find_type)
positive_locations.Add(D)
for(var/mob/L in range(src, 1))
L << "\blue \icon[src] [src] pings."
else if(istype(A,/obj/structure/boulder))
var/obj/structure/boulder/B = A
if(B.artifact_find)
//create a new scanlog entry
var/datum/depth_scan/D = new()
D.coords = "[10 * B.x].[rand(0,9)]:[10 * B.y].[rand(0,9)]:[10 * B.z].[rand(0,9)]"
D.time = worldtime2text()
D.record_index = positive_locations.len + 1
//these values are arbitrary
D.depth = rand(75,100)
D.clearance = rand(5,25)
D.dissonance_spread = rand(750,2500) / 100
positive_locations.Add(D)
for(var/mob/L in range(src, 1))
L << "\blue \icon[src] [src] pings [pick("madly","wildly","excitedly","crazily")]!"
/obj/item/device/depth_scanner/attack_self(var/mob/user as mob)
return src.interact(user)
/obj/item/device/depth_scanner/interact(var/mob/user as mob)
var/dat = "<b>Co-ordinates with positive matches</b><br>"
dat += "<A href='?src=\ref[src];clear=0'>== Clear all ==</a><br>"
if(current)
dat += "Time: [current.time]<br>"
dat += "Coords: [current.coords]<br>"
dat += "Anomaly depth: [current.depth] cm<br>"
dat += "Clearance above anomaly depth: [current.clearance] cm<br>"
dat += "Dissonance spread: [current.dissonance_spread]<br>"
var/index = responsive_carriers.Find(current.material)
if(index > 0 && index <= finds_as_strings.len)
dat += "Anomaly material: [finds_as_strings[index]]<br>"
else
dat += "Anomaly material: Unknown<br>"
dat += "<A href='?src=\ref[src];clear=[current.record_index]'>clear entry</a><br>"
else
dat += "Select an entry from the list<br>"
dat += "<br>"
dat += "<br>"
dat += "<br>"
dat += "<br>"
dat += "<hr>"
if(positive_locations.len)
for(var/index=1, index<=positive_locations.len, index++)
var/datum/depth_scan/D = positive_locations[index]
dat += "<A href='?src=\ref[src];select=[index]'>[D.time], coords: [D.coords]</a><br>"
else
dat += "No entries recorded."
dat += "<hr>"
dat += "<A href='?src=\ref[src];refresh=1'>Refresh</a><br>"
dat += "<A href='?src=\ref[src];close=1'>Close</a><br>"
user << browse(dat,"window=depth_scanner;size=300x500")
onclose(user, "depth_scanner")
/obj/item/device/depth_scanner/Topic(href, href_list)
..()
usr.set_machine(src)
if(href_list["select"])
var/index = text2num(href_list["select"])
if(index && index <= positive_locations.len)
current = positive_locations[index]
else if(href_list["clear"])
var/index = text2num(href_list["clear"])
if(index)
if(index <= positive_locations.len)
var/datum/depth_scan/D = positive_locations[index]
positive_locations.Remove(D)
qdel(D)
else
//GC will hopefully pick them up before too long
positive_locations = list()
qdel(current)
else if(href_list["close"])
usr.unset_machine()
usr << browse(null, "window=depth_scanner")
updateSelfDialog()
@@ -1,97 +0,0 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// GPS Locater - locks into a radio frequency and tracks it
/obj/item/device/beacon_locator
name = "locater device"
desc = "Used to scan and locate signals on a particular frequency according ."
icon = 'icons/obj/device.dmi'
icon_state = "pinoff" //pinonfar, pinonmedium, pinonclose, pinondirect, pinonnull
item_state = "electronic"
var/frequency = PUB_FREQ
var/scan_ticks = 0
var/obj/item/device/radio/target_radio
/obj/item/device/beacon_locator/New()
..()
processing_objects.Add(src)
/obj/item/device/beacon_locator/Destroy()
processing_objects.Remove(src)
..()
/obj/item/device/beacon_locator/process()
if(target_radio)
set_dir(get_dir(src,target_radio))
switch(get_dist(src,target_radio))
if(0 to 3)
icon_state = "pinondirect"
if(4 to 10)
icon_state = "pinonclose"
if(11 to 30)
icon_state = "pinonmedium"
if(31 to INFINITY)
icon_state = "pinonfar"
else
if(scan_ticks)
icon_state = "pinonnull"
scan_ticks++
if(prob(scan_ticks * 10))
spawn(0)
set background = 1
if(processing_objects.Find(src))
//scan radios in the world to try and find one
var/cur_dist = 999
for(var/obj/item/device/radio/beacon/R in world)
if(R.z == src.z && R.frequency == src.frequency)
var/check_dist = get_dist(src,R)
if(check_dist < cur_dist)
cur_dist = check_dist
target_radio = R
scan_ticks = 0
var/turf/T = get_turf(src)
if(target_radio)
T.visible_message("\icon[src] [src] [pick("chirps","chirrups","cheeps")] happily.")
else
T.visible_message("\icon[src] [src] [pick("chirps","chirrups","cheeps")] sadly.")
else
icon_state = "pinoff"
/obj/item/device/beacon_locator/attack_self(var/mob/user as mob)
return src.interact(user)
/obj/item/device/beacon_locator/interact(var/mob/user as mob)
var/dat = "<b>Radio frequency tracker</b><br>"
dat += {"
<A href='byond://?src=\ref[src];reset_tracking=1'>Reset tracker</A><BR>
Frequency:
<A href='byond://?src=\ref[src];freq=-10'>-</A>
<A href='byond://?src=\ref[src];freq=-2'>-</A>
[format_frequency(frequency)]
<A href='byond://?src=\ref[src];freq=2'>+</A>
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
"}
dat += "<A href='?src=\ref[src];close=1'>Close</a><br>"
user << browse(dat,"window=locater;size=300x150")
onclose(user, "locater")
/obj/item/device/beacon_locator/Topic(href, href_list)
..()
usr.set_machine(src)
if(href_list["reset_tracking"])
scan_ticks = 1
target_radio = null
else if(href_list["freq"])
var/new_frequency = (frequency + text2num(href_list["freq"]))
if (frequency < 1200 || frequency > 1600)
new_frequency = sanitize_frequency(new_frequency, 1499)
frequency = new_frequency
else if(href_list["close"])
usr.unset_machine()
usr << browse(null, "window=locater")
updateSelfDialog()
+2 -2
View File
@@ -167,10 +167,10 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(istype(tool,/obj/item/stack/cable_coil/))
var/obj/item/stack/cable_coil/C = tool
if(!C.can_use(10))
if(!C.can_use(5))
user << "<span class='danger'>You need ten or more cable pieces to repair this damage.</span>" //usage amount made more consistent with regular cable repair
return SURGERY_FAILURE
C.use(10)
C.use(5)
return affected && affected.open == 3 && (affected.disfigured || affected.burn_dam > 0) && target_zone != O_MOUTH
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -1,366 +1,300 @@
#define EFFECT_TOUCH 0
#define EFFECT_AURA 1
#define EFFECT_PULSE 2
#define MAX_EFFECT 2
#define TRIGGER_TOUCH 0
#define TRIGGER_WATER 1
#define TRIGGER_ACID 2
#define TRIGGER_VOLATILE 3
#define TRIGGER_TOXIN 4
#define TRIGGER_FORCE 5
#define TRIGGER_ENERGY 6
#define TRIGGER_HEAT 7
#define TRIGGER_COLD 8
#define TRIGGER_PHORON 9
#define TRIGGER_OXY 10
#define TRIGGER_CO2 11
#define TRIGGER_NITRO 12
#define MAX_TRIGGER 12
/*
//sleeping gas appears to be bugged, currently
var/list/valid_primary_effect_types = list(\
/datum/artifact_effect/cellcharge,\
/datum/artifact_effect/celldrain,\
/datum/artifact_effect/forcefield,\
/datum/artifact_effect/gasoxy,\
/datum/artifact_effect/gasplasma,\
// /datum/artifact_effect/gassleeping,\
/datum/artifact_effect/heal,\
/datum/artifact_effect/hurt,\
/datum/artifact_effect/emp,\
/datum/artifact_effect/teleport,\
/datum/artifact_effect/robohurt,\
/datum/artifact_effect/roboheal)
var/list/valid_secondary_effect_types = list(\
/datum/artifact_effect/cold,\
/datum/artifact_effect/badfeeling,\
/datum/artifact_effect/cellcharge,\
/datum/artifact_effect/celldrain,\
/datum/artifact_effect/dnaswitch,\
/datum/artifact_effect/emp,\
/datum/artifact_effect/gasco2,\
/datum/artifact_effect/gasnitro,\
/datum/artifact_effect/gasoxy,\
/datum/artifact_effect/gasphoron,\
// /datum/artifact_effect/gassleeping,\
/datum/artifact_effect/goodfeeling,\
/datum/artifact_effect/heal,\
/datum/artifact_effect/hurt,\
/datum/artifact_effect/radiate,\
/datum/artifact_effect/roboheal,\
/datum/artifact_effect/robohurt,\
/datum/artifact_effect/sleepy,\
/datum/artifact_effect/stun,\
/datum/artifact_effect/teleport)
*/
/obj/machinery/artifact
name = "alien artifact"
desc = "A large alien device."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "ano00"
var/icon_num = 0
density = 1
var/datum/artifact_effect/my_effect
var/datum/artifact_effect/secondary_effect
var/being_used = 0
/obj/machinery/artifact/New()
..()
//setup primary effect - these are the main ones (mixed)
var/effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect)
my_effect = new effecttype(src)
//75% chance to have a secondary stealthy (and mostly bad) effect
if(prob(75))
effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect)
secondary_effect = new effecttype(src)
if(prob(75))
secondary_effect.ToggleActivate(0)
icon_num = rand(0,11)
icon_state = "ano[icon_num]0"
if(icon_num == 7 || icon_num == 8)
name = "large crystal"
desc = pick("It shines faintly as it catches the light.",\
"It appears to have a faint inner glow.",\
"It seems to draw you inward as you look it at.",\
"Something twinkles faintly as you look at it.",\
"It's mesmerizing to behold.")
if(prob(50))
my_effect.trigger = TRIGGER_ENERGY
else if(icon_num == 9)
name = "alien computer"
desc = "It is covered in strange markings."
if(prob(75))
my_effect.trigger = TRIGGER_TOUCH
else if(icon_num == 10)
desc = "A large alien device, there appear to be some kind of vents in the side."
if(prob(50))
my_effect.trigger = rand(6,12)
else if(icon_num == 11)
name = "sealed alien pod"
desc = "A strange alien device."
if(prob(25))
my_effect.trigger = rand(1,4)
#define TRIGGER_PHORON 9
#define TRIGGER_OXY 10
#define TRIGGER_CO2 11
#define TRIGGER_NITRO 12
/obj/machinery/artifact/process()
var/turf/L = loc
if(isnull(L) || !istype(L)) // We're inside a container or on null turf, either way stop processing effects
return
if(my_effect)
my_effect.process()
if(secondary_effect)
secondary_effect.process()
if(pulledby)
Bumped(pulledby)
//if either of our effects rely on environmental factors, work that out
var/trigger_cold = 0
var/trigger_hot = 0
var/trigger_phoron = 0
var/trigger_oxy = 0
var/trigger_co2 = 0
var/trigger_nitro = 0
if( (my_effect.trigger >= TRIGGER_HEAT && my_effect.trigger <= TRIGGER_NITRO) || (my_effect.trigger >= TRIGGER_HEAT && my_effect.trigger <= TRIGGER_NITRO) )
var/turf/T = get_turf(src)
var/datum/gas_mixture/env = T.return_air()
if(env)
if(env.temperature < 225)
trigger_cold = 1
else if(env.temperature > 375)
trigger_hot = 1
if(env.gas["phoron"] >= 10)
trigger_phoron = 1
if(env.gas["oxygen"] >= 10)
trigger_oxy = 1
if(env.gas["carbon_dioxide"] >= 10)
trigger_co2 = 1
if(env.gas["nitrogen"] >= 10)
trigger_nitro = 1
//COLD ACTIVATION
if(trigger_cold)
if(my_effect.trigger == TRIGGER_COLD && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_COLD && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_COLD && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_COLD && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//HEAT ACTIVATION
if(trigger_hot)
if(my_effect.trigger == TRIGGER_HEAT && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_HEAT && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//PHORON GAS ACTIVATION
if(trigger_phoron)
if(my_effect.trigger == TRIGGER_PHORON && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_PHORON && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_PHORON && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_PHORON && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//OXYGEN GAS ACTIVATION
if(trigger_oxy)
if(my_effect.trigger == TRIGGER_OXY && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_OXY && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_OXY && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_OXY && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//CO2 GAS ACTIVATION
if(trigger_co2)
if(my_effect.trigger == TRIGGER_CO2 && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_CO2 && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_CO2 && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_CO2 && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//NITROGEN GAS ACTIVATION
if(trigger_nitro)
if(my_effect.trigger == TRIGGER_NITRO && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_NITRO && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
/obj/machinery/artifact/attack_hand(var/mob/user as mob)
if (get_dist(user, src) > 1)
user << "\red You can't reach [src] from here."
return
if(ishuman(user) && user:gloves)
user << "<b>You touch [src]</b> with your gloved hands, [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]."
return
src.add_fingerprint(user)
if(my_effect.trigger == TRIGGER_TOUCH)
user << "<b>You touch [src].</b>"
my_effect.ToggleActivate()
else
user << "<b>You touch [src],</b> [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]."
if(prob(25) && secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH)
secondary_effect.ToggleActivate(0)
if (my_effect.effect == EFFECT_TOUCH)
my_effect.DoEffectTouch(user)
if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated)
secondary_effect.DoEffectTouch(user)
/obj/machinery/artifact/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
if (istype(W, /obj/item/weapon/reagent_containers/))
if(W.reagents.has_reagent("hydrogen", 1) || W.reagents.has_reagent("water", 1))
if(my_effect.trigger == TRIGGER_WATER)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_WATER && prob(25))
secondary_effect.ToggleActivate(0)
else if(W.reagents.has_reagent("sacid", 1) || W.reagents.has_reagent("pacid", 1) || W.reagents.has_reagent("diethylamine", 1))
if(my_effect.trigger == TRIGGER_ACID)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_ACID && prob(25))
secondary_effect.ToggleActivate(0)
else if(W.reagents.has_reagent("phoron", 1) || W.reagents.has_reagent("thermite", 1))
if(my_effect.trigger == TRIGGER_VOLATILE)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_VOLATILE && prob(25))
secondary_effect.ToggleActivate(0)
else if(W.reagents.has_reagent("toxin", 1) || W.reagents.has_reagent("cyanide", 1) || W.reagents.has_reagent("amanitin", 1) || W.reagents.has_reagent("neurotoxin", 1))
if(my_effect.trigger == TRIGGER_TOXIN)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_TOXIN && prob(25))
secondary_effect.ToggleActivate(0)
else if(istype(W,/obj/item/weapon/melee/baton) && W:status ||\
istype(W,/obj/item/weapon/melee/energy) ||\
istype(W,/obj/item/weapon/melee/cultblade) ||\
istype(W,/obj/item/weapon/card/emag) ||\
istype(W,/obj/item/device/multitool))
if (my_effect.trigger == TRIGGER_ENERGY)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25))
secondary_effect.ToggleActivate(0)
else if (istype(W,/obj/item/weapon/flame) && W:lit ||\
istype(W,/obj/item/weapon/weldingtool) && W:welding)
if(my_effect.trigger == TRIGGER_HEAT)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && prob(25))
secondary_effect.ToggleActivate(0)
else
..()
if (my_effect.trigger == TRIGGER_FORCE && W.force >= 10)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
secondary_effect.ToggleActivate(0)
/obj/machinery/artifact/Bumped(M as mob|obj)
..()
if(istype(M,/obj))
if(M:throwforce >= 10)
if(my_effect.trigger == TRIGGER_FORCE)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
secondary_effect.ToggleActivate(0)
else if(ishuman(M) && !istype(M:gloves,/obj/item/clothing/gloves))
var/warn = 0
if (my_effect.trigger == TRIGGER_TOUCH && prob(50))
my_effect.ToggleActivate()
warn = 1
if(secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH && prob(25))
secondary_effect.ToggleActivate(0)
warn = 1
if (my_effect.effect == EFFECT_TOUCH && prob(50))
my_effect.DoEffectTouch(M)
warn = 1
if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated && prob(50))
secondary_effect.DoEffectTouch(M)
warn = 1
if(warn)
M << "<b>You accidentally touch [src].</b>"
..()
/obj/machinery/artifact/bullet_act(var/obj/item/projectile/P)
if(istype(P,/obj/item/projectile/bullet) ||\
istype(P,/obj/item/projectile/hivebotbullet))
if(my_effect.trigger == TRIGGER_FORCE)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
secondary_effect.ToggleActivate(0)
else if(istype(P,/obj/item/projectile/beam) ||\
istype(P,/obj/item/projectile/ion) ||\
istype(P,/obj/item/projectile/energy))
if(my_effect.trigger == TRIGGER_ENERGY)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25))
secondary_effect.ToggleActivate(0)
/obj/machinery/artifact/ex_act(severity)
switch(severity)
if(1.0) qdel(src)
if(2.0)
if (prob(50))
qdel(src)
else
if(my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT)
my_effect.ToggleActivate()
if(secondary_effect && (secondary_effect.trigger == TRIGGER_FORCE || secondary_effect.trigger == TRIGGER_HEAT) && prob(25))
secondary_effect.ToggleActivate(0)
if(3.0)
if (my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT)
my_effect.ToggleActivate()
if(secondary_effect && (secondary_effect.trigger == TRIGGER_FORCE || secondary_effect.trigger == TRIGGER_HEAT) && prob(25))
secondary_effect.ToggleActivate(0)
return
/obj/machinery/artifact/Move()
..()
if(my_effect)
my_effect.UpdateMove()
if(secondary_effect)
secondary_effect.UpdateMove()
/obj/machinery/artifact
name = "alien artifact"
desc = "A large alien device."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "ano00"
var/icon_num = 0
density = 1
var/datum/artifact_effect/my_effect
var/datum/artifact_effect/secondary_effect
var/being_used = 0
/obj/machinery/artifact/New()
..()
var/effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect)
my_effect = new effecttype(src)
if(prob(75))
effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect)
secondary_effect = new effecttype(src)
if(prob(75))
secondary_effect.ToggleActivate(0)
icon_num = rand(0, 11)
icon_state = "ano[icon_num]0"
if(icon_num == 7 || icon_num == 8)
name = "large crystal"
desc = pick("It shines faintly as it catches the light.",
"It appears to have a faint inner glow.",
"It seems to draw you inward as you look it at.",
"Something twinkles faintly as you look at it.",
"It's mesmerizing to behold.")
if(prob(50))
my_effect.trigger = TRIGGER_ENERGY
else if(icon_num == 9)
name = "alien computer"
desc = "It is covered in strange markings."
if(prob(75))
my_effect.trigger = TRIGGER_TOUCH
else if(icon_num == 10)
desc = "A large alien device, there appear to be some kind of vents in the side."
if(prob(50))
my_effect.trigger = pick(TRIGGER_ENERGY, TRIGGER_HEAT, TRIGGER_COLD, TRIGGER_PHORON, TRIGGER_OXY, TRIGGER_CO2, TRIGGER_NITRO)
else if(icon_num == 11)
name = "sealed alien pod"
desc = "A strange alien device."
if(prob(25))
my_effect.trigger = pick(TRIGGER_WATER, TRIGGER_ACID, TRIGGER_VOLATILE, TRIGGER_TOXIN)
/obj/machinery/artifact/process()
var/turf/L = loc
if(!istype(L)) // We're inside a container or on null turf, either way stop processing effects
return
if(my_effect)
my_effect.process()
if(secondary_effect)
secondary_effect.process()
if(pulledby)
Bumped(pulledby)
//if either of our effects rely on environmental factors, work that out
var/trigger_cold = 0
var/trigger_hot = 0
var/trigger_phoron = 0
var/trigger_oxy = 0
var/trigger_co2 = 0
var/trigger_nitro = 0
if( (my_effect.trigger >= TRIGGER_HEAT && my_effect.trigger <= TRIGGER_NITRO) || (my_effect.trigger >= TRIGGER_HEAT && my_effect.trigger <= TRIGGER_NITRO) )
var/turf/T = get_turf(src)
var/datum/gas_mixture/env = T.return_air()
if(env)
if(env.temperature < 225)
trigger_cold = 1
else if(env.temperature > 375)
trigger_hot = 1
if(env.gas["phoron"] >= 10)
trigger_phoron = 1
if(env.gas["oxygen"] >= 10)
trigger_oxy = 1
if(env.gas["carbon_dioxide"] >= 10)
trigger_co2 = 1
if(env.gas["nitrogen"] >= 10)
trigger_nitro = 1
//COLD ACTIVATION
if(trigger_cold)
if(my_effect.trigger == TRIGGER_COLD && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_COLD && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_COLD && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_COLD && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//HEAT ACTIVATION
if(trigger_hot)
if(my_effect.trigger == TRIGGER_HEAT && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_HEAT && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//PHORON GAS ACTIVATION
if(trigger_phoron)
if(my_effect.trigger == TRIGGER_PHORON && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_PHORON && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_PHORON && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_PHORON && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//OXYGEN GAS ACTIVATION
if(trigger_oxy)
if(my_effect.trigger == TRIGGER_OXY && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_OXY && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_OXY && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_OXY && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//CO2 GAS ACTIVATION
if(trigger_co2)
if(my_effect.trigger == TRIGGER_CO2 && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_CO2 && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_CO2 && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_CO2 && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
//NITROGEN GAS ACTIVATION
if(trigger_nitro)
if(my_effect.trigger == TRIGGER_NITRO && !my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
else
if(my_effect.trigger == TRIGGER_NITRO && my_effect.activated)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated)
secondary_effect.ToggleActivate(0)
/obj/machinery/artifact/attack_hand(var/mob/user as mob)
if (get_dist(user, src) > 1)
user << "\red You can't reach [src] from here."
return
if(ishuman(user) && user:gloves)
user << "<b>You touch [src]</b> with your gloved hands, [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]."
return
src.add_fingerprint(user)
if(my_effect.trigger == TRIGGER_TOUCH)
user << "<b>You touch [src].</b>"
my_effect.ToggleActivate()
else
user << "<b>You touch [src],</b> [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]."
if(prob(25) && secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH)
secondary_effect.ToggleActivate(0)
if (my_effect.effect == EFFECT_TOUCH)
my_effect.DoEffectTouch(user)
if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated)
secondary_effect.DoEffectTouch(user)
/obj/machinery/artifact/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
if (istype(W, /obj/item/weapon/reagent_containers/))
if(W.reagents.has_reagent("hydrogen", 1) || W.reagents.has_reagent("water", 1))
if(my_effect.trigger == TRIGGER_WATER)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_WATER && prob(25))
secondary_effect.ToggleActivate(0)
else if(W.reagents.has_reagent("sacid", 1) || W.reagents.has_reagent("pacid", 1) || W.reagents.has_reagent("diethylamine", 1))
if(my_effect.trigger == TRIGGER_ACID)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_ACID && prob(25))
secondary_effect.ToggleActivate(0)
else if(W.reagents.has_reagent("phoron", 1) || W.reagents.has_reagent("thermite", 1))
if(my_effect.trigger == TRIGGER_VOLATILE)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_VOLATILE && prob(25))
secondary_effect.ToggleActivate(0)
else if(W.reagents.has_reagent("toxin", 1) || W.reagents.has_reagent("cyanide", 1) || W.reagents.has_reagent("amatoxin", 1) || W.reagents.has_reagent("neurotoxin", 1))
if(my_effect.trigger == TRIGGER_TOXIN)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_TOXIN && prob(25))
secondary_effect.ToggleActivate(0)
else if(istype(W,/obj/item/weapon/melee/baton) && W:status ||\
istype(W,/obj/item/weapon/melee/energy) ||\
istype(W,/obj/item/weapon/melee/cultblade) ||\
istype(W,/obj/item/weapon/card/emag) ||\
istype(W,/obj/item/device/multitool))
if (my_effect.trigger == TRIGGER_ENERGY)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25))
secondary_effect.ToggleActivate(0)
else if (istype(W,/obj/item/weapon/flame) && W:lit ||\
istype(W,/obj/item/weapon/weldingtool) && W:welding)
if(my_effect.trigger == TRIGGER_HEAT)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && prob(25))
secondary_effect.ToggleActivate(0)
else
..()
if (my_effect.trigger == TRIGGER_FORCE && W.force >= 10)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
secondary_effect.ToggleActivate(0)
/obj/machinery/artifact/Bumped(M as mob|obj)
..()
if(istype(M,/obj))
if(M:throwforce >= 10)
if(my_effect.trigger == TRIGGER_FORCE)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
secondary_effect.ToggleActivate(0)
else if(ishuman(M) && !istype(M:gloves,/obj/item/clothing/gloves))
var/warn = 0
if (my_effect.trigger == TRIGGER_TOUCH && prob(50))
my_effect.ToggleActivate()
warn = 1
if(secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH && prob(25))
secondary_effect.ToggleActivate(0)
warn = 1
if (my_effect.effect == EFFECT_TOUCH && prob(50))
my_effect.DoEffectTouch(M)
warn = 1
if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated && prob(50))
secondary_effect.DoEffectTouch(M)
warn = 1
if(warn)
M << "<b>You accidentally touch [src].</b>"
..()
/obj/machinery/artifact/bullet_act(var/obj/item/projectile/P)
if(istype(P,/obj/item/projectile/bullet) ||\
istype(P,/obj/item/projectile/hivebotbullet))
if(my_effect.trigger == TRIGGER_FORCE)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
secondary_effect.ToggleActivate(0)
else if(istype(P,/obj/item/projectile/beam) ||\
istype(P,/obj/item/projectile/ion) ||\
istype(P,/obj/item/projectile/energy))
if(my_effect.trigger == TRIGGER_ENERGY)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25))
secondary_effect.ToggleActivate(0)
/obj/machinery/artifact/ex_act(severity)
switch(severity)
if(1.0) qdel(src)
if(2.0)
if (prob(50))
qdel(src)
else
if(my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT)
my_effect.ToggleActivate()
if(secondary_effect && (secondary_effect.trigger == TRIGGER_FORCE || secondary_effect.trigger == TRIGGER_HEAT) && prob(25))
secondary_effect.ToggleActivate(0)
if(3.0)
if (my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT)
my_effect.ToggleActivate()
if(secondary_effect && (secondary_effect.trigger == TRIGGER_FORCE || secondary_effect.trigger == TRIGGER_HEAT) && prob(25))
secondary_effect.ToggleActivate(0)
return
/obj/machinery/artifact/Move()
..()
if(my_effect)
my_effect.UpdateMove()
if(secondary_effect)
secondary_effect.UpdateMove()
@@ -0,0 +1,19 @@
/datum/artifact_find
var/artifact_id
var/artifact_find_type
/datum/artifact_find/New()
artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]"
artifact_find_type = pick(
5;/obj/machinery/power/supermatter,
5;/obj/structure/constructshell,
5;/obj/machinery/syndicate_beacon,
25;/obj/machinery/power/supermatter/shard,
50;/obj/structure/cult/pylon,
100;/obj/machinery/auto_cloner,
100;/obj/machinery/giga_drill,
100;/obj/machinery/replicator,
150;/obj/structure/crystal,
1000;/obj/machinery/artifact)
@@ -1,4 +1,3 @@
/obj/machinery/auto_cloner
name = "mysterious pod"
desc = "It's full of a viscous liquid, but appears dark and silent."
@@ -22,25 +21,23 @@
//33% chance to spawn nasties
if(prob(33))
spawn_type = pick(\
/mob/living/simple_animal/hostile/giant_spider/nurse,\
/mob/living/simple_animal/hostile/alien,\
/mob/living/simple_animal/hostile/bear,\
/mob/living/simple_animal/hostile/creature\
)
spawn_type = pick(
/mob/living/simple_animal/hostile/giant_spider/nurse,
/mob/living/simple_animal/hostile/alien,
/mob/living/simple_animal/hostile/bear,
/mob/living/simple_animal/hostile/creature)
else
spawn_type = pick(\
/mob/living/simple_animal/cat,\
/mob/living/simple_animal/corgi,\
/mob/living/simple_animal/corgi/puppy,\
/mob/living/simple_animal/chicken,\
/mob/living/simple_animal/cow,\
/mob/living/simple_animal/parrot,\
/mob/living/simple_animal/slime,\
/mob/living/simple_animal/crab,\
/mob/living/simple_animal/mouse,\
/mob/living/simple_animal/hostile/retaliate/goat\
)
/mob/living/simple_animal/cat,
/mob/living/simple_animal/corgi,
/mob/living/simple_animal/corgi/puppy,
/mob/living/simple_animal/chicken,
/mob/living/simple_animal/cow,
/mob/living/simple_animal/parrot,
/mob/living/simple_animal/slime,
/mob/living/simple_animal/crab,
/mob/living/simple_animal/mouse,
/mob/living/simple_animal/hostile/retaliate/goat)
//todo: how the hell is the asteroid permanently powered?
/obj/machinery/auto_cloner/process()
@@ -48,17 +45,17 @@
if(!previous_power_state)
previous_power_state = 1
icon_state = "cellold1"
src.visible_message("\blue \icon[src] [src] suddenly comes to life!")
src.visible_message("<span class='notice'>\icon[src] [src] suddenly comes to life!</span>")
//slowly grow a mob
if(prob(5))
src.visible_message("\blue \icon[src] [src] [pick("gloops","glugs","whirrs","whooshes","hisses","purrs","hums","gushes")].")
src.visible_message("<span class='notice'>\icon[src] [src] [pick("gloops","glugs","whirrs","whooshes","hisses","purrs","hums","gushes")].</span>")
//if we've finished growing...
if(time_spent_spawning >= time_per_spawn)
time_spent_spawning = 0
use_power = 1
src.visible_message("\blue \icon[src] [src] pings!")
src.visible_message("<span class='notice'>\icon[src] [src] pings!</span>")
icon_state = "cellold1"
desc = "It's full of a bubbling viscous liquid, and is lit by a mysterious glow."
if(spawn_type)
@@ -79,7 +76,7 @@
if(previous_power_state)
previous_power_state = 0
icon_state = "cellold0"
src.visible_message("\blue \icon[src] [src] suddenly shuts down.")
src.visible_message("<span class='notice'>\icon[src] [src] suddenly shuts down.</span>")
//cloned mob slowly breaks down
time_spent_spawning = max(time_spent_spawning + last_process - world.time, 0)
@@ -1,36 +1,35 @@
/obj/structure/crystal
name = "large crystal"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "crystal"
density = 1
/obj/structure/crystal/New()
..()
icon_state = pick("ano70","ano80")
desc = pick(\
"It shines faintly as it catches the light.",\
"It appears to have a faint inner glow.",\
"It seems to draw you inward as you look it at.",\
"Something twinkles faintly as you look at it.",\
"It's mesmerizing to behold.")
/obj/structure/crystal/Destroy()
src.visible_message("\red<b>[src] shatters!</b>")
if(prob(75))
new /obj/item/weapon/material/shard/phoron(src.loc)
if(prob(50))
new /obj/item/weapon/material/shard/phoron(src.loc)
if(prob(25))
new /obj/item/weapon/material/shard/phoron(src.loc)
if(prob(75))
new /obj/item/weapon/material/shard(src.loc)
if(prob(50))
new /obj/item/weapon/material/shard(src.loc)
if(prob(25))
new /obj/item/weapon/material/shard(src.loc)
..()
//todo: laser_act
/obj/structure/crystal
name = "large crystal"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "crystal"
density = 1
/obj/structure/crystal/New()
..()
icon_state = pick("ano70","ano80")
desc = pick(
"It shines faintly as it catches the light.",
"It appears to have a faint inner glow.",
"It seems to draw you inward as you look it at.",
"Something twinkles faintly as you look at it.",
"It's mesmerizing to behold.")
/obj/structure/crystal/Destroy()
src.visible_message("\red<b>[src] shatters!</b>")
if(prob(75))
new /obj/item/weapon/material/shard/phoron(src.loc)
if(prob(50))
new /obj/item/weapon/material/shard/phoron(src.loc)
if(prob(25))
new /obj/item/weapon/material/shard/phoron(src.loc)
if(prob(75))
new /obj/item/weapon/material/shard(src.loc)
if(prob(50))
new /obj/item/weapon/material/shard(src.loc)
if(prob(25))
new /obj/item/weapon/material/shard(src.loc)
..()
//todo: laser_act
@@ -1,4 +1,3 @@
/obj/machinery/giga_drill
name = "alien drill"
desc = "A giant, alien drill mounted on long treads."
@@ -14,18 +13,18 @@
if(active)
active = 0
icon_state = "gigadrill"
user << "\blue You press a button and [src] slowly spins down."
user << "<span class='notice'>You press a button and \the [src] slowly spins down.</span>"
else
active = 1
icon_state = "gigadrill_mov"
user << "\blue You press a button and [src] shudders to life."
user << "<span class='notice'>You press a button and \the [src] shudders to life.</span>"
/obj/machinery/giga_drill/Bump(atom/A)
if(active && !drilling_turf)
if(istype(A,/turf/simulated/mineral))
var/turf/simulated/mineral/M = A
drilling_turf = get_turf(src)
src.visible_message("\red <b>[src] begins to drill into [M]!</b>")
src.visible_message("<span class='notice'>\The [src] begins to drill into \the [M].</span>")
anchored = 1
spawn(drill_time)
if(get_turf(src) == drilling_turf && active)
@@ -1,4 +1,3 @@
/obj/machinery/replicator
name = "alien machine"
desc = "It's some kind of pod with strange wires and gadgets all over it."
@@ -23,51 +22,50 @@
/obj/machinery/replicator/New()
..()
var/list/viables = list(\
/obj/item/roller,\
/obj/structure/closet/crate,\
/obj/structure/closet/acloset,\
/mob/living/simple_animal/hostile/mimic,\
/mob/living/simple_animal/hostile/viscerator,\
/mob/living/simple_animal/hostile/hivebot,\
/obj/item/device/analyzer,\
/obj/item/device/camera,\
/obj/item/device/flash,\
/obj/item/device/flashlight,\
/obj/item/device/healthanalyzer,\
/obj/item/device/multitool,\
/obj/item/device/paicard,\
/obj/item/device/radio,\
/obj/item/device/radio/headset,\
/obj/item/device/radio/beacon,\
/obj/item/weapon/autopsy_scanner,\
/obj/item/weapon/bikehorn,\
/obj/item/weapon/bonesetter,\
/obj/item/weapon/material/knife/butch,\
/obj/item/weapon/caution,\
/obj/item/weapon/caution/cone,\
/obj/item/weapon/crowbar,\
/obj/item/weapon/clipboard,\
/obj/item/weapon/cell,\
/obj/item/weapon/circular_saw,\
/obj/item/weapon/material/hatchet,\
/obj/item/weapon/handcuffs,\
/obj/item/weapon/hemostat,\
/obj/item/weapon/material/knife,\
/obj/item/weapon/flame/lighter,\
/obj/item/weapon/light/bulb,\
/obj/item/weapon/light/tube,\
/obj/item/weapon/pickaxe,\
/obj/item/weapon/shovel,\
/obj/item/weapon/weldingtool,\
/obj/item/weapon/wirecutters,\
/obj/item/weapon/wrench,\
/obj/item/weapon/screwdriver,\
/obj/item/weapon/grenade/chem_grenade/cleaner,\
/obj/item/weapon/grenade/chem_grenade/metalfoam\
)
var/list/viables = list(
/obj/item/roller,
/obj/structure/closet/crate,
/obj/structure/closet/acloset,
/mob/living/simple_animal/hostile/mimic,
/mob/living/simple_animal/hostile/viscerator,
/mob/living/simple_animal/hostile/hivebot,
/obj/item/device/analyzer,
/obj/item/device/camera,
/obj/item/device/flash,
/obj/item/device/flashlight,
/obj/item/device/healthanalyzer,
/obj/item/device/multitool,
/obj/item/device/paicard,
/obj/item/device/radio,
/obj/item/device/radio/headset,
/obj/item/device/radio/beacon,
/obj/item/weapon/autopsy_scanner,
/obj/item/weapon/bikehorn,
/obj/item/weapon/bonesetter,
/obj/item/weapon/material/knife/butch,
/obj/item/weapon/caution,
/obj/item/weapon/caution/cone,
/obj/item/weapon/crowbar,
/obj/item/weapon/clipboard,
/obj/item/weapon/cell,
/obj/item/weapon/circular_saw,
/obj/item/weapon/material/hatchet,
/obj/item/weapon/handcuffs,
/obj/item/weapon/hemostat,
/obj/item/weapon/material/knife,
/obj/item/weapon/flame/lighter,
/obj/item/weapon/light/bulb,
/obj/item/weapon/light/tube,
/obj/item/weapon/pickaxe,
/obj/item/weapon/shovel,
/obj/item/weapon/weldingtool,
/obj/item/weapon/wirecutters,
/obj/item/weapon/wrench,
/obj/item/weapon/screwdriver,
/obj/item/weapon/grenade/chem_grenade/cleaner,
/obj/item/weapon/grenade/chem_grenade/metalfoam)
var/quantity = rand(5,15)
var/quantity = rand(5, 15)
for(var/i=0, i<quantity, i++)
var/button_desc = "a [pick("yellow","purple","green","blue","red","orange","white")], "
button_desc += "[pick("round","square","diamond","heart","dog","human")] shaped "
@@ -88,7 +86,7 @@
if(spawning_types.len && powered())
spawn_progress_time += world.time - last_process_time
if(spawn_progress_time > max_spawn_time)
src.visible_message("\blue \icon[src] [src] pings!")
src.visible_message("<span class='notice'>\icon[src] [src] pings!</span>")
var/obj/source_material = pop(stored_materials)
var/spawn_type = pop(spawning_types)
@@ -111,7 +109,7 @@
icon_state = "borgcharger0(old)"
else if(prob(5))
src.visible_message("\blue \icon[src] [src] [pick("clicks","whizzes","whirrs","whooshes","clanks","clongs","clonks","bangs")].")
src.visible_message("<span class='notice'>\icon[src] [src] [pick("clicks","whizzes","whirrs","whooshes","clanks","clongs","clonks","bangs")].</span>")
last_process_time = world.time
@@ -130,7 +128,7 @@
user.drop_item()
W.loc = src
stored_materials.Add(W)
src.visible_message("\blue [user] inserts [W] into [src].")
src.visible_message("<span class='notice'>\The [user] inserts \the [W] into \the [src].</span>")
/obj/machinery/replicator/Topic(href, href_list)
@@ -139,9 +137,9 @@
if(index > 0 && index <= construction.len)
if(stored_materials.len > spawning_types.len)
if(spawning_types.len)
src.visible_message("\blue \icon[src] a [pick("light","dial","display","meter","pad")] on [src]'s front [pick("blinks","flashes")] [pick("red","yellow","blue","orange","purple","green","white")].")
src.visible_message("<span class='notice'>\icon[src] a [pick("light","dial","display","meter","pad")] on [src]'s front [pick("blinks","flashes")] [pick("red","yellow","blue","orange","purple","green","white")].</span>")
else
src.visible_message("\blue \icon[src] [src]'s front compartment slides shut.")
src.visible_message("<span class='notice'>\icon[src] [src]'s front compartment slides shut.</span>")
spawning_types.Add(construction[construction[index]])
spawn_progress_time = 0
+90
View File
@@ -0,0 +1,90 @@
/obj/structure/boulder
name = "rocky debris"
desc = "Leftover rock from an excavation, it's been partially dug out already but there's still a lot to go."
icon = 'icons/obj/mining.dmi'
icon_state = "boulder1"
density = 1
opacity = 1
anchored = 1
var/excavation_level = 0
var/datum/geosample/geological_data
var/datum/artifact_find/artifact_find
var/last_act = 0
/obj/structure/boulder/New()
icon_state = "boulder[rand(1,4)]"
excavation_level = rand(5, 50)
/obj/structure/boulder/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/device/core_sampler))
src.geological_data.artifact_distance = rand(-100,100) / 100
src.geological_data.artifact_id = artifact_find.artifact_id
var/obj/item/device/core_sampler/C = I
C.sample_item(src, user)
return
if(istype(I, /obj/item/device/depth_scanner))
var/obj/item/device/depth_scanner/C = I
C.scan_atom(user, src)
return
if(istype(I, /obj/item/device/measuring_tape))
var/obj/item/device/measuring_tape/P = I
user.visible_message("<span class='notice'>\The [user] extends \the [P] towards \the [src].</span>", "<span class='notice'>You extend \the [P] towards \the [src].</span>")
if(do_after(user, 15))
user << "<span class='notice'>\The [src] has been excavated to a depth of [2 * src.excavation_level]cm.</span>"
return
if(istype(I, /obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/P = I
if(last_act + P.digspeed > world.time)//prevents message spam
return
last_act = world.time
user << "<span class='warning'>You start [P.drill_verb] [src].</span>"
if(!do_after(user, P.digspeed))
return
user << "<span class='notice'>You finish [P.drill_verb] [src].</span>"
excavation_level += P.excavation_amount
if(excavation_level > 100)
//failure
user.visible_message("<span class='warning'>\The [src] suddenly crumbles away.</span>", "<span class='warning'>\The [src] has disintegrated under your onslaught, any secrets it was holding are long gone.</span>")
qdel(src)
return
if(prob(excavation_level))
//success
if(artifact_find)
var/spawn_type = artifact_find.artifact_find_type
var/obj/O = new spawn_type(get_turf(src))
if(istype(O, /obj/machinery/artifact))
var/obj/machinery/artifact/X = O
if(X.my_effect)
X.my_effect.artifact_id = artifact_find.artifact_id
src.visible_message("<span class='warning'>\The [src] suddenly crumbles away.</span>")
else
user.visible_message("<span class='warning'>\The [src] suddenly crumbles away.</span>", "<span class='notice'>\The [src] has been whittled away under your careful excavation, but there was nothing of interest inside.</span>")
qdel(src)
/obj/structure/boulder/Bumped(AM)
. = ..()
if(istype(AM,/mob/living/carbon/human))
var/mob/living/carbon/human/H = AM
var/obj/item/weapon/pickaxe/P = H.get_inactive_hand()
if(istype(P))
src.attackby(P, H)
else if(istype(AM,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = AM
if(istype(R.module_active,/obj/item/weapon/pickaxe))
attackby(R.module_active,R)
else if(istype(AM,/obj/mecha))
var/obj/mecha/M = AM
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill))
M.selected.action(src)
@@ -1,7 +1,5 @@
//override procs in children as necessary
/datum/artifact_effect
var/effecttype = "unknown" //purely used for admin checks ingame, not needed any more
var/name = "unknown"
var/effect = EFFECT_TOUCH
var/effectrange = 4
var/trigger = TRIGGER_TOUCH
@@ -12,20 +10,11 @@
var/artifact_id = ""
var/effect_type = 0
//0 = Unknown / none detectable
//1 = Concentrated energy
//2 = Intermittent psionic wavefront
//3 = Electromagnetic energy
//4 = Particle field
//5 = Organically reactive exotic particles
//6 = Interdimensional/bluespace? phasing
//7 = Atomic synthesis
/datum/artifact_effect/New(var/atom/location)
..()
holder = location
effect = rand(0,MAX_EFFECT)
trigger = rand(0,MAX_TRIGGER)
effect = rand(0, MAX_EFFECT)
trigger = rand(0, MAX_TRIGGER)
//this will be replaced by the excavation code later, but it's here just in case
artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]"
@@ -82,9 +71,53 @@
chargelevel = 0
DoEffectPulse()
/datum/artifact_effect/proc/getDescription()
. = "<b>"
switch(effect_type)
if(EFFECT_ENERGY)
. += "Concentrated energy emissions"
if(EFFECT_PSIONIC)
. += "Intermittent psionic wavefront"
if(EFFECT_ELECTRO)
. += "Electromagnetic energy"
if(EFFECT_PARTICLE)
. += "High frequency particles"
if(EFFECT_ORGANIC)
. += "Organically reactive exotic particles"
if(EFFECT_BLUESPACE)
. += "Interdimensional/bluespace? phasing"
if(EFFECT_SYNTH)
. += "Atomic synthesis"
else
. += "Low level energy emissions"
. += "</b> have been detected <b>"
switch(effect)
if(EFFECT_TOUCH)
. += "interspersed throughout substructure and shell."
if(EFFECT_AURA)
. += "emitting in an ambient energy field."
if(EFFECT_PULSE)
. += "emitting in periodic bursts."
else
. += "emitting in an unknown way."
. += "</b>"
switch(trigger)
if(TRIGGER_TOUCH, TRIGGER_WATER, TRIGGER_ACID, TRIGGER_VOLATILE, TRIGGER_TOXIN)
. += " Activation index involves <b>physical interaction</b> with artifact surface."
if(TRIGGER_FORCE, TRIGGER_ENERGY, TRIGGER_HEAT, TRIGGER_COLD)
. += " Activation index involves <b>energetic interaction</b> with artifact surface."
if(TRIGGER_PHORON, TRIGGER_OXY, TRIGGER_CO2, TRIGGER_NITRO)
. += " Activation index involves <b>precise local atmospheric conditions</b>."
else
. += " Unable to determine any data about activation trigger."
//returns 0..1, with 1 being no protection and 0 being fully protected
proc/GetAnomalySusceptibility(var/mob/living/carbon/human/H)
if(!H || !istype(H))
/proc/GetAnomalySusceptibility(var/mob/living/carbon/human/H)
if(!istype(H))
return 1
var/protected = 0
@@ -1,70 +1,69 @@
/datum/artifact_effect/badfeeling
effecttype = "badfeeling"
effect_type = 2
var/list/messages = list("You feel worried.",\
"Something doesn't feel right.",\
"You get a strange feeling in your gut.",\
"Your instincts are trying to warn you about something.",\
"Someone just walked over your grave.",\
"There's a strange feeling in the air.",\
"There's a strange smell in the air.",\
"The tips of your fingers feel tingly.",\
"You feel witchy.",\
"You have a terrible sense of foreboding.",\
"You've got a bad feeling about this.",\
"Your scalp prickles.",\
"The light seems to flicker.",\
"The shadows seem to lengthen.",\
"The walls are getting closer.",\
"Something is wrong")
var/list/drastic_messages = list("You've got to get out of here!",\
"Someone's trying to kill you!",\
"There's something out there!",\
"What's happening to you?",\
"OH GOD!",\
"HELP ME!")
/datum/artifact_effect/badfeeling/DoEffectTouch(var/mob/user)
if(user)
if (istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(prob(50))
if(prob(75))
H << "<b><font color='red' size='[num2text(rand(1,5))]'>[pick(drastic_messages)]</b></font>"
else
H << "<font color='red'>[pick(messages)]</font>"
if(prob(50))
H.dizziness += rand(3,5)
/datum/artifact_effect/badfeeling/DoEffectAura()
if(holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
if(prob(5))
if(prob(75))
H << "<font color='red'>[pick(messages)]</font>"
else
H << "<font color='red' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
if(prob(10))
H.dizziness += rand(3,5)
return 1
/datum/artifact_effect/badfeeling/DoEffectPulse()
if(holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
if(prob(50))
if(prob(95))
H << "<font color='red' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
else
H << "<font color='red'>[pick(messages)]</font>"
if(prob(50))
H.dizziness += rand(3,5)
else if(prob(25))
H.dizziness += rand(5,15)
return 1
/datum/artifact_effect/badfeeling
name = "badfeeling"
effect_type = EFFECT_PSIONIC
var/list/messages = list("You feel worried.",
"Something doesn't feel right.",
"You get a strange feeling in your gut.",
"Your instincts are trying to warn you about something.",
"Someone just walked over your grave.",
"There's a strange feeling in the air.",
"There's a strange smell in the air.",
"The tips of your fingers feel tingly.",
"You feel witchy.",
"You have a terrible sense of foreboding.",
"You've got a bad feeling about this.",
"Your scalp prickles.",
"The light seems to flicker.",
"The shadows seem to lengthen.",
"The walls are getting closer.",
"Something is wrong")
var/list/drastic_messages = list("You've got to get out of here!",
"Someone's trying to kill you!",
"There's something out there!",
"What's happening to you?",
"OH GOD!",
"HELP ME!")
/datum/artifact_effect/badfeeling/DoEffectTouch(var/mob/user)
if(user)
if (istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(prob(50))
if(prob(75))
H << "<b><font color='red' size='[num2text(rand(1,5))]'>[pick(drastic_messages)]</b></font>"
else
H << "<font color='red'>[pick(messages)]</font>"
if(prob(50))
H.dizziness += rand(3,5)
/datum/artifact_effect/badfeeling/DoEffectAura()
if(holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
if(prob(5))
if(prob(75))
H << "<font color='red'>[pick(messages)]</font>"
else
H << "<font color='red' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
if(prob(10))
H.dizziness += rand(3,5)
return 1
/datum/artifact_effect/badfeeling/DoEffectPulse()
if(holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
if(prob(50))
if(prob(95))
H << "<font color='red' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
else
H << "<font color='red'>[pick(messages)]</font>"
if(prob(50))
H.dizziness += rand(3,5)
else if(prob(25))
H.dizziness += rand(5,15)
return 1
@@ -1,8 +1,7 @@
//todo
/datum/artifact_effect/cellcharge
effecttype = "cellcharge"
effect_type = 3
name = "cell charge"
effect_type = EFFECT_ELECTRO
var/last_message
/datum/artifact_effect/cellcharge/DoEffectTouch(var/mob/user)
@@ -1,8 +1,7 @@
//todo
/datum/artifact_effect/celldrain
effecttype = "celldrain"
effect_type = 3
name = "cell drain"
effect_type = EFFECT_ELECTRO
var/last_message
/datum/artifact_effect/celldrain/DoEffectTouch(var/mob/user)
@@ -1,14 +1,13 @@
//inverse of /datum/artifact_effect/heat, the two effects split up for neatness' sake
/datum/artifact_effect/cold
effecttype = "cold"
name = "cold"
var/target_temp
/datum/artifact_effect/cold/New()
..()
target_temp = rand(0, 250)
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(5,6,7)
effect_type = pick(EFFECT_ORGANIC, EFFECT_BLUESPACE, EFFECT_SYNTH)
/datum/artifact_effect/cold/DoEffectTouch(var/mob/user)
if(holder)
@@ -1,8 +1,7 @@
//todo
/datum/artifact_effect/dnaswitch
effecttype = "dnaswitch"
effect_type = 5
name = "dnaswitch"
effect_type = EFFECT_ORGANIC
var/severity
/datum/artifact_effect/dnaswitch/New()
@@ -15,12 +14,12 @@
/datum/artifact_effect/dnaswitch/DoEffectTouch(var/mob/toucher)
var/weakness = GetAnomalySusceptibility(toucher)
if(ishuman(toucher) && prob(weakness * 100))
toucher << pick("\green You feel a little different.",\
"\green You feel very strange.",\
"\green Your stomach churns.",\
"\green Your skin feels loose.",\
"\green You feel a stabbing pain in your head.",\
"\green You feel a tingling sensation in your chest.",\
toucher << pick("\green You feel a little different.",
"\green You feel very strange.",
"\green Your stomach churns.",
"\green Your skin feels loose.",
"\green You feel a stabbing pain in your head.",
"\green You feel a tingling sensation in your chest.",
"\green Your entire body vibrates.")
if(prob(75))
scramble(1, toucher, weakness * severity)
@@ -35,12 +34,12 @@
var/weakness = GetAnomalySusceptibility(H)
if(prob(weakness * 100))
if(prob(30))
H << pick("\green You feel a little different.",\
"\green You feel very strange.",\
"\green Your stomach churns.",\
"\green Your skin feels loose.",\
"\green You feel a stabbing pain in your head.",\
"\green You feel a tingling sensation in your chest.",\
H << pick("\green You feel a little different.",
"\green You feel very strange.",
"\green Your stomach churns.",
"\green Your skin feels loose.",
"\green You feel a stabbing pain in your head.",
"\green You feel a tingling sensation in your chest.",
"\green Your entire body vibrates.")
if(prob(50))
scramble(1, H, weakness * severity)
@@ -54,12 +53,12 @@
var/weakness = GetAnomalySusceptibility(H)
if(prob(weakness * 100))
if(prob(75))
H << pick("\green You feel a little different.",\
"\green You feel very strange.",\
"\green Your stomach churns.",\
"\green Your skin feels loose.",\
"\green You feel a stabbing pain in your head.",\
"\green You feel a tingling sensation in your chest.",\
H << pick("\green You feel a little different.",
"\green You feel very strange.",
"\green Your stomach churns.",
"\green Your skin feels loose.",
"\green You feel a stabbing pain in your head.",
"\green You feel a tingling sensation in your chest.",
"\green Your entire body vibrates.")
if(prob(25))
if(prob(75))
@@ -1,7 +1,6 @@
/datum/artifact_effect/emp
effecttype = "emp"
effect_type = 3
name = "emp"
effect_type = EFFECT_ELECTRO
/datum/artifact_effect/emp/New()
..()
@@ -1,80 +1,79 @@
/datum/artifact_effect/forcefield
effecttype = "forcefield"
var/list/created_field = list()
effect_type = 4
/datum/artifact_effect/forcefield/New()
..()
trigger = TRIGGER_TOUCH
/datum/artifact_effect/forcefield/ToggleActivate()
..()
if(created_field.len)
for(var/obj/effect/energy_field/F in created_field)
created_field.Remove(F)
qdel(F)
else if(holder)
var/turf/T = get_turf(holder)
while(created_field.len < 16)
var/obj/effect/energy_field/E = new (locate(T.x,T.y,T.z))
created_field.Add(E)
E.strength = 1
E.density = 1
E.anchored = 1
E.invisibility = 0
spawn(10)
UpdateMove()
return 1
/datum/artifact_effect/forcefield/process()
..()
for(var/obj/effect/energy_field/E in created_field)
if(E.strength < 1)
E.Strengthen(0.15)
else if(E.strength < 5)
E.Strengthen(0.25)
/datum/artifact_effect/forcefield/UpdateMove()
if(created_field.len && holder)
var/turf/T = get_turf(holder)
while(created_field.len < 16)
//for now, just instantly respawn the fields when they get destroyed
var/obj/effect/energy_field/E = new (locate(T.x,T.y,T))
created_field.Add(E)
E.anchored = 1
E.density = 1
E.invisibility = 0
var/obj/effect/energy_field/E = created_field[1]
E.loc = locate(T.x + 2,T.y + 2,T.z)
E = created_field[2]
E.loc = locate(T.x + 2,T.y + 1,T.z)
E = created_field[3]
E.loc = locate(T.x + 2,T.y,T.z)
E = created_field[4]
E.loc = locate(T.x + 2,T.y - 1,T.z)
E = created_field[5]
E.loc = locate(T.x + 2,T.y - 2,T.z)
E = created_field[6]
E.loc = locate(T.x + 1,T.y + 2,T.z)
E = created_field[7]
E.loc = locate(T.x + 1,T.y - 2,T.z)
E = created_field[8]
E.loc = locate(T.x,T.y + 2,T.z)
E = created_field[9]
E.loc = locate(T.x,T.y - 2,T.z)
E = created_field[10]
E.loc = locate(T.x - 1,T.y + 2,T.z)
E = created_field[11]
E.loc = locate(T.x - 1,T.y - 2,T.z)
E = created_field[12]
E.loc = locate(T.x - 2,T.y + 2,T.z)
E = created_field[13]
E.loc = locate(T.x - 2,T.y + 1,T.z)
E = created_field[14]
E.loc = locate(T.x - 2,T.y,T.z)
E = created_field[15]
E.loc = locate(T.x - 2,T.y - 1,T.z)
E = created_field[16]
E.loc = locate(T.x - 2,T.y - 2,T.z)
/datum/artifact_effect/forcefield
name = "force field"
var/list/created_field = list()
effect_type = EFFECT_PARTICLE
/datum/artifact_effect/forcefield/New()
..()
trigger = TRIGGER_TOUCH
/datum/artifact_effect/forcefield/ToggleActivate()
..()
if(created_field.len)
for(var/obj/effect/energy_field/F in created_field)
created_field.Remove(F)
qdel(F)
else if(holder)
var/turf/T = get_turf(holder)
while(created_field.len < 16)
var/obj/effect/energy_field/E = new (locate(T.x,T.y,T.z))
created_field.Add(E)
E.strength = 1
E.density = 1
E.anchored = 1
E.invisibility = 0
spawn(10)
UpdateMove()
return 1
/datum/artifact_effect/forcefield/process()
..()
for(var/obj/effect/energy_field/E in created_field)
if(E.strength < 1)
E.Strengthen(0.15)
else if(E.strength < 5)
E.Strengthen(0.25)
/datum/artifact_effect/forcefield/UpdateMove()
if(created_field.len && holder)
var/turf/T = get_turf(holder)
while(created_field.len < 16)
//for now, just instantly respawn the fields when they get destroyed
var/obj/effect/energy_field/E = new (locate(T.x,T.y,T))
created_field.Add(E)
E.anchored = 1
E.density = 1
E.invisibility = 0
var/obj/effect/energy_field/E = created_field[1]
E.loc = locate(T.x + 2,T.y + 2,T.z)
E = created_field[2]
E.loc = locate(T.x + 2,T.y + 1,T.z)
E = created_field[3]
E.loc = locate(T.x + 2,T.y,T.z)
E = created_field[4]
E.loc = locate(T.x + 2,T.y - 1,T.z)
E = created_field[5]
E.loc = locate(T.x + 2,T.y - 2,T.z)
E = created_field[6]
E.loc = locate(T.x + 1,T.y + 2,T.z)
E = created_field[7]
E.loc = locate(T.x + 1,T.y - 2,T.z)
E = created_field[8]
E.loc = locate(T.x,T.y + 2,T.z)
E = created_field[9]
E.loc = locate(T.x,T.y - 2,T.z)
E = created_field[10]
E.loc = locate(T.x - 1,T.y + 2,T.z)
E = created_field[11]
E.loc = locate(T.x - 1,T.y - 2,T.z)
E = created_field[12]
E.loc = locate(T.x - 2,T.y + 2,T.z)
E = created_field[13]
E.loc = locate(T.x - 2,T.y + 1,T.z)
E = created_field[14]
E.loc = locate(T.x - 2,T.y,T.z)
E = created_field[15]
E.loc = locate(T.x - 2,T.y - 1,T.z)
E = created_field[16]
E.loc = locate(T.x - 2,T.y - 2,T.z)
@@ -1,26 +1,19 @@
/datum/artifact_effect/gasco2
effecttype = "gasco2"
var/max_pressure
var/target_percentage
/datum/artifact_effect/heat/New()
..()
effect_type = pick(6,7)
/datum/artifact_effect/gasco2/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
max_pressure = rand(115,1000)
/datum/artifact_effect/gasco2/DoEffectTouch(var/mob/user)
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("carbon_dioxide", rand(2, 15))
/datum/artifact_effect/gasco2/DoEffectAura()
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("carbon_dioxide", pick(0, 0, 0.1, rand()))
/datum/artifact_effect/gasco2
name = "CO2 creation"
/datum/artifact_effect/gasco2/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
/datum/artifact_effect/gasco2/DoEffectTouch(var/mob/user)
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("carbon_dioxide", rand(2, 15))
/datum/artifact_effect/gasco2/DoEffectAura()
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("carbon_dioxide", pick(0, 0, 0.1, rand()))
@@ -1,23 +1,19 @@
/datum/artifact_effect/gasnitro
effecttype = "gasnitro"
var/max_pressure
var/target_percentage
/datum/artifact_effect/gasnitro/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(6,7)
max_pressure = rand(115,1000)
/datum/artifact_effect/gasnitro/DoEffectTouch(var/mob/user)
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("nitrogen", rand(2, 15))
/datum/artifact_effect/gasnitro/DoEffectAura()
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("nitrogen", pick(0, 0, 0.1, rand()))
/datum/artifact_effect/gasnitro
name = "N2 creation"
/datum/artifact_effect/gasnitro/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
/datum/artifact_effect/gasnitro/DoEffectTouch(var/mob/user)
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("nitrogen", rand(2, 15))
/datum/artifact_effect/gasnitro/DoEffectAura()
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("nitrogen", pick(0, 0, 0.1, rand()))
@@ -1,23 +1,19 @@
/datum/artifact_effect/gasoxy
effecttype = "gasoxy"
var/max_pressure
/datum/artifact_effect/gasoxy/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
max_pressure = rand(115,1000)
effect_type = pick(6,7)
/datum/artifact_effect/gasoxy/DoEffectTouch(var/mob/user)
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("oxygen", rand(2, 15))
/datum/artifact_effect/gasoxy/DoEffectAura()
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("oxygen", pick(0, 0, 0.1, rand()))
/datum/artifact_effect/gasoxy
name = "O2 creation"
/datum/artifact_effect/gasoxy/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
/datum/artifact_effect/gasoxy/DoEffectTouch(var/mob/user)
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("oxygen", rand(2, 15))
/datum/artifact_effect/gasoxy/DoEffectAura()
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("oxygen", pick(0, 0, 0.1, rand()))
@@ -1,20 +1,16 @@
/datum/artifact_effect/gasphoron
effecttype = "gasphoron"
var/max_pressure
var/target_percentage
name = "phoron creation"
/datum/artifact_effect/gasphoron/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
max_pressure = rand(115,1000)
effect_type = pick(6,7)
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
/datum/artifact_effect/gasphoron/DoEffectTouch(var/mob/user)
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("oxygen", rand(2, 15))
holder_loc.assume_gas("phoron", rand(2, 15))
/datum/artifact_effect/gasphoron/DoEffectAura()
if(holder)
@@ -1,23 +1,19 @@
/datum/artifact_effect/gassleeping
effecttype = "gassleeping"
var/max_pressure
var/target_percentage
/datum/artifact_effect/gassleeping/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
max_pressure = rand(115,1000)
effect_type = pick(6,7)
/datum/artifact_effect/gassleeping/DoEffectTouch(var/mob/user)
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("sleeping_agent", rand(2, 15))
/datum/artifact_effect/gassleeping/DoEffectAura()
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("sleeping_agent", pick(0, 0, 0.1, rand()))
/datum/artifact_effect/gassleeping
name = "N2O creation"
/datum/artifact_effect/gassleeping/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
/datum/artifact_effect/gassleeping/DoEffectTouch(var/mob/user)
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("sleeping_agent", rand(2, 15))
/datum/artifact_effect/gassleeping/DoEffectAura()
if(holder)
var/turf/holder_loc = holder.loc
if(istype(holder_loc))
holder_loc.assume_gas("sleeping_agent", pick(0, 0, 0.1, rand()))
@@ -1,68 +1,67 @@
/datum/artifact_effect/goodfeeling
effecttype = "goodfeeling"
effect_type = 2
var/list/messages = list("You feel good.",\
"Everything seems to be going alright",\
"You've got a good feeling about this",\
"Your instincts tell you everything is going to be getting better.",\
"There's a good feeling in the air.",\
"Something smells... good.",\
"The tips of your fingers feel tingly.",\
"You've got a good feeling about this.",\
"You feel happy.",\
"You fight the urge to smile.",\
"Your scalp prickles.",\
"All the colours seem a bit more vibrant.",\
"Everything seems a little lighter.",\
"The troubles of the world seem to fade away.")
var/list/drastic_messages = list("You want to hug everyone you meet!",\
"Everything is going so well!",\
"You feel euphoric.",\
"You feel giddy.",\
"You're so happy suddenly, you almost want to dance and sing.",\
"You feel like the world is out to help you.")
/datum/artifact_effect/goodfeeling/DoEffectTouch(var/mob/user)
if(user)
if (istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(prob(50))
if(prob(75))
H << "<b><font color='blue' size='[num2text(rand(1,5))]'>[pick(drastic_messages)]</b></font>"
else
H << "<font color='blue'>[pick(messages)]</font>"
if(prob(50))
H.dizziness += rand(3,5)
/datum/artifact_effect/goodfeeling/DoEffectAura()
if(holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
if(prob(5))
if(prob(75))
H << "<font color='blue'>[pick(messages)]</font>"
else
H << "<font color='blue' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
if(prob(5))
H.dizziness += rand(3,5)
return 1
/datum/artifact_effect/goodfeeling/DoEffectPulse()
if(holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
if(prob(50))
if(prob(95))
H << "<font color='blue' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
else
H << "<font color='blue'>[pick(messages)]</font>"
if(prob(50))
H.dizziness += rand(3,5)
else if(prob(25))
H.dizziness += rand(5,15)
return 1
/datum/artifact_effect/goodfeeling
name = "good feeling"
effect_type = EFFECT_PSIONIC
var/list/messages = list("You feel good.",
"Everything seems to be going alright",
"You've got a good feeling about this",
"Your instincts tell you everything is going to be getting better.",
"There's a good feeling in the air.",
"Something smells... good.",
"The tips of your fingers feel tingly.",
"You've got a good feeling about this.",
"You feel happy.",
"You fight the urge to smile.",
"Your scalp prickles.",
"All the colours seem a bit more vibrant.",
"Everything seems a little lighter.",
"The troubles of the world seem to fade away.")
var/list/drastic_messages = list("You want to hug everyone you meet!",
"Everything is going so well!",
"You feel euphoric.",
"You feel giddy.",
"You're so happy suddenly, you almost want to dance and sing.",
"You feel like the world is out to help you.")
/datum/artifact_effect/goodfeeling/DoEffectTouch(var/mob/user)
if(user)
if (istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(prob(50))
if(prob(75))
H << "<b><font color='blue' size='[num2text(rand(1,5))]'>[pick(drastic_messages)]</b></font>"
else
H << "<font color='blue'>[pick(messages)]</font>"
if(prob(50))
H.dizziness += rand(3,5)
/datum/artifact_effect/goodfeeling/DoEffectAura()
if(holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
if(prob(5))
if(prob(75))
H << "<font color='blue'>[pick(messages)]</font>"
else
H << "<font color='blue' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
if(prob(5))
H.dizziness += rand(3,5)
return 1
/datum/artifact_effect/goodfeeling/DoEffectPulse()
if(holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
if(prob(50))
if(prob(95))
H << "<font color='blue' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
else
H << "<font color='blue'>[pick(messages)]</font>"
if(prob(50))
H.dizziness += rand(3,5)
else if(prob(25))
H.dizziness += rand(5,15)
return 1
@@ -1,7 +1,6 @@
/datum/artifact_effect/heal
effecttype = "heal"
effect_type = 5
name = "heal"
effect_type = EFFECT_ORGANIC
/datum/artifact_effect/heal/DoEffectTouch(var/mob/toucher)
//todo: check over this properly
@@ -1,17 +1,13 @@
//inverse of /datum/artifact_effect/cold, the two effects split up for neatness' sake
/datum/artifact_effect/heat
effecttype = "heat"
name = "heat"
var/target_temp
/datum/artifact_effect/heat/New()
..()
effect_type = pick(5,6,7)
/datum/artifact_effect/heat/New()
..()
target_temp = rand(300,600)
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(EFFECT_ORGANIC, EFFECT_BLUESPACE, EFFECT_SYNTH)
target_temp = rand(300, 600)
/datum/artifact_effect/heat/DoEffectTouch(var/mob/user)
if(holder)
@@ -1,49 +1,48 @@
/datum/artifact_effect/hurt
effecttype = I_HURT
effect_type = 5
/datum/artifact_effect/hurt/DoEffectTouch(var/mob/toucher)
if(toucher)
var/weakness = GetAnomalySusceptibility(toucher)
if(iscarbon(toucher) && prob(weakness * 100))
var/mob/living/carbon/C = toucher
C << "<span class='danger'>A painful discharge of energy strikes you!</span>"
C.adjustOxyLoss(rand(5,25) * weakness)
C.adjustToxLoss(rand(5,25) * weakness)
C.adjustBruteLoss(rand(5,25) * weakness)
C.adjustFireLoss(rand(5,25) * weakness)
C.adjustBrainLoss(rand(1,5) * weakness)
C.apply_effect(25 * weakness, IRRADIATE)
C.nutrition -= min(50 * weakness, C.nutrition)
C.make_dizzy(6 * weakness)
C.weakened += 6 * weakness
/datum/artifact_effect/hurt/DoEffectAura()
if(holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/C in range(src.effectrange,T))
var/weakness = GetAnomalySusceptibility(C)
if(prob(weakness * 100))
if(prob(10))
C << "<span class='danger'>You feel a painful force radiating from something nearby.</span>"
C.adjustBruteLoss(1 * weakness)
C.adjustFireLoss(1 * weakness)
C.adjustToxLoss(1 * weakness)
C.adjustOxyLoss(1 * weakness)
C.adjustBrainLoss(0.1 * weakness)
C.updatehealth()
/datum/artifact_effect/hurt/DoEffectPulse()
if(holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/C in range(effectrange, T))
var/weakness = GetAnomalySusceptibility(C)
if(prob(weakness * 100))
C << "<span class='danger'>A wave of painful energy strikes you!</span>"
C.adjustBruteLoss(3 * weakness)
C.adjustFireLoss(3 * weakness)
C.adjustToxLoss(3 * weakness)
C.adjustOxyLoss(3 * weakness)
C.adjustBrainLoss(0.1 * weakness)
C.updatehealth()
/datum/artifact_effect/hurt
name = "hurt"
effect_type = EFFECT_ORGANIC
/datum/artifact_effect/hurt/DoEffectTouch(var/mob/toucher)
if(toucher)
var/weakness = GetAnomalySusceptibility(toucher)
if(iscarbon(toucher) && prob(weakness * 100))
var/mob/living/carbon/C = toucher
C << "<span class='danger'>A painful discharge of energy strikes you!</span>"
C.adjustOxyLoss(rand(5,25) * weakness)
C.adjustToxLoss(rand(5,25) * weakness)
C.adjustBruteLoss(rand(5,25) * weakness)
C.adjustFireLoss(rand(5,25) * weakness)
C.adjustBrainLoss(rand(1,5) * weakness)
C.apply_effect(25 * weakness, IRRADIATE)
C.nutrition -= min(50 * weakness, C.nutrition)
C.make_dizzy(6 * weakness)
C.weakened += 6 * weakness
/datum/artifact_effect/hurt/DoEffectAura()
if(holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/C in range(src.effectrange,T))
var/weakness = GetAnomalySusceptibility(C)
if(prob(weakness * 100))
if(prob(10))
C << "<span class='danger'>You feel a painful force radiating from something nearby.</span>"
C.adjustBruteLoss(1 * weakness)
C.adjustFireLoss(1 * weakness)
C.adjustToxLoss(1 * weakness)
C.adjustOxyLoss(1 * weakness)
C.adjustBrainLoss(0.1 * weakness)
C.updatehealth()
/datum/artifact_effect/hurt/DoEffectPulse()
if(holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/C in range(effectrange, T))
var/weakness = GetAnomalySusceptibility(C)
if(prob(weakness * 100))
C << "<span class='danger'>A wave of painful energy strikes you!</span>"
C.adjustBruteLoss(3 * weakness)
C.adjustFireLoss(3 * weakness)
C.adjustToxLoss(3 * weakness)
C.adjustOxyLoss(3 * weakness)
C.adjustBrainLoss(0.1 * weakness)
C.updatehealth()
@@ -1,12 +1,11 @@
/datum/artifact_effect/radiate
effecttype = "radiate"
name = "radiation"
var/radiation_amount
/datum/artifact_effect/radiate/New()
..()
radiation_amount = rand(1, 10)
effect_type = pick(4,5)
effect_type = pick(EFFECT_PARTICLE, EFFECT_ORGANIC)
/datum/artifact_effect/radiate/DoEffectTouch(var/mob/living/user)
if(user)
@@ -1,11 +1,10 @@
/datum/artifact_effect/roboheal
effecttype = "roboheal"
name = "robotic healing"
var/last_message
/datum/artifact_effect/roboheal/New()
..()
effect_type = pick(3,4)
effect_type = pick(EFFECT_ELECTRO, EFFECT_PARTICLE)
/datum/artifact_effect/roboheal/DoEffectTouch(var/mob/user)
if(user)
@@ -1,11 +1,10 @@
/datum/artifact_effect/robohurt
effecttype = "robohurt"
name = "robotic harm"
var/last_message
/datum/artifact_effect/robohurt/New()
..()
effect_type = pick(3,4)
effect_type = pick(EFFECT_ELECTRO, EFFECT_PARTICLE)
/datum/artifact_effect/robohurt/DoEffectTouch(var/mob/user)
if(user)
@@ -1,11 +1,10 @@
//todo
/datum/artifact_effect/sleepy
effecttype = "sleepy"
name = "sleepy"
/datum/artifact_effect/sleepy/New()
..()
effect_type = pick(5,2)
effect_type = pick(EFFECT_PSIONIC, EFFECT_ORGANIC)
/datum/artifact_effect/sleepy/DoEffectTouch(var/mob/toucher)
if(toucher)
@@ -1,10 +1,9 @@
/datum/artifact_effect/stun
effecttype = "stun"
name = "stun"
/datum/artifact_effect/stun/New()
..()
effect_type = pick(2,5)
effect_type = pick(EFFECT_PSIONIC, EFFECT_ORGANIC)
/datum/artifact_effect/stun/DoEffectTouch(var/mob/toucher)
if(toucher && iscarbon(toucher))
@@ -1,7 +1,6 @@
/datum/artifact_effect/teleport
effecttype = "teleport"
effect_type = 6
name = "teleport"
effect_type = EFFECT_BLUESPACE
/datum/artifact_effect/teleport/DoEffectTouch(var/mob/user)
var/weakness = GetAnomalySusceptibility(user)
@@ -1,83 +1,3 @@
//original code and idea from Alfie275 (luna era) and ISaidNo (goonservers) - with thanks
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Xenoarchaeological finds
/datum/find
var/find_type = 0 //random according to the digsite type
var/excavation_required = 0 //random 5-95%
var/view_range = 20 //how close excavation has to come to show an overlay on the turf
var/clearance_range = 3 //how close excavation has to come to extract the item
//if excavation hits var/excavation_required exactly, it's contained find is extracted cleanly without the ore
var/prob_delicate = 90 //probability it requires an active suspension field to not insta-crumble
var/dissonance_spread = 1 //proportion of the tile that is affected by this find
//used in conjunction with analysis machines to determine correct suspension field type
/datum/find/New(var/digsite, var/exc_req)
excavation_required = exc_req
find_type = get_random_find_type(digsite)
clearance_range = rand(2,6)
dissonance_spread = rand(1500,2500) / 100
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Strange rocks
//have all strange rocks be cleared away using welders for now
/obj/item/weapon/ore/strangerock
name = "Strange rock"
desc = "Seems to have some unusal strata evident throughout it."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "strange"
var/obj/item/weapon/inside
var/method = 0// 0 = fire, 1 = brush, 2 = pick
origin_tech = list(TECH_MATERIAL = 5)
/obj/item/weapon/ore/strangerock/New(loc, var/inside_item_type = 0)
..(loc)
//method = rand(0,2)
if(inside_item_type)
inside = new/obj/item/weapon/archaeological_find(src, new_item_type = inside_item_type)
if(!inside)
inside = locate() in contents
/*/obj/item/weapon/ore/strangerock/ex_act(var/severity)
if(severity && prob(30))
src.visible_message("The [src] crumbles away, leaving some dust and gravel behind.")*/
/obj/item/weapon/ore/strangerock/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/weldingtool/))
var/obj/item/weapon/weldingtool/w = W
if(w.isOn())
if(w.get_fuel() >= 4 && !src.method)
if(inside)
inside.loc = get_turf(src)
for(var/mob/M in viewers(world.view, user))
M.show_message("<span class='info'>[src] burns away revealing [inside].</span>",1)
else
for(var/mob/M in viewers(world.view, user))
M.show_message("<span class='info'>[src] burns away into nothing.</span>",1)
qdel(src)
w.remove_fuel(4)
else
for(var/mob/M in viewers(world.view, user))
M.show_message("<span class='info'>A few sparks fly off [src], but nothing else happens.</span>",1)
w.remove_fuel(1)
return
else if(istype(W,/obj/item/device/core_sampler/))
var/obj/item/device/core_sampler/S = W
S.sample_item(src, user)
return
..()
if(prob(33))
src.visible_message("<span class='warning'>[src] crumbles away, leaving some dust and gravel behind.</span>")
qdel(src)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Archaeological finds
/obj/item/weapon/archaeological_find
name = "object"
icon = 'icons/obj/xenoarchaeology.dmi'
@@ -88,7 +8,7 @@
if(new_item_type)
find_type = new_item_type
else
find_type = rand(1,34) //update this when you add new find types
find_type = rand(1, MAX_ARCHAEO)
var/item_type = "object"
icon_state = "unknown[rand(1,4)]"
@@ -99,6 +19,7 @@
var/apply_image_decorations = 0
var/material_descriptor = ""
var/apply_prefix = 1
if(prob(40))
material_descriptor = pick("rusted ","dusty ","archaic ","fragile ")
source_material = pick("cordite","quadrinium",DEFAULT_WALL_MATERIAL,"titanium","aluminium","ferritic-alloy","plasteel","duranium")
@@ -0,0 +1,67 @@
/datum/find
var/find_type = 0 //random according to the digsite type
var/excavation_required = 0 //random 10 - 190
var/view_range = 40 //how close excavation has to come to show an overlay on the turf
var/clearance_range = 3 //how close excavation has to come to extract the item
//if excavation hits var/excavation_required exactly, it's contained find is extracted cleanly without the ore
var/prob_delicate = 90 //probability it requires an active suspension field to not insta-crumble
var/dissonance_spread = 1 //proportion of the tile that is affected by this find
//used in conjunction with analysis machines to determine correct suspension field type
/datum/find/New(var/digsite, var/exc_req)
excavation_required = exc_req
find_type = get_random_find_type(digsite)
clearance_range = rand(4, 12)
dissonance_spread = rand(1500, 2500) / 100
/obj/item/weapon/ore/strangerock
name = "Strange rock"
desc = "Seems to have some unusal strata evident throughout it."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "strange"
origin_tech = list(TECH_MATERIAL = 5)
/obj/item/weapon/ore/strangerock/New(loc, var/inside_item_type = 0)
..(loc)
if(inside_item_type)
new /obj/item/weapon/archaeological_find(src, new_item_type = inside_item_type)
/obj/item/weapon/ore/strangerock/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/weapon/pickaxe/brush))
var/obj/item/inside = locate() in src
if(inside)
inside.loc = get_turf(src)
visible_message("<span class='info'>\The [src] is brushed away, revealing \the [inside].</span>")
else
visible_message("<span class='info'>\The [src] is brushed away into nothing.</span>")
qdel(src)
return
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = I
if(W.isOn())
if(W.get_fuel() >= 2)
var/obj/item/inside = locate() in src
if(inside)
inside.loc = get_turf(src)
visible_message("<span class='info'>\The [src] burns away revealing \the [inside].</span>")
else
visible_message("<span class='info'>\The [src] burns away into nothing.</span>")
qdel(src)
W.remove_fuel(2)
else
visible_message("<span class='info'>A few sparks fly off \the [src], but nothing else happens.</span>")
W.remove_fuel(1)
return
else if(istype(I, /obj/item/device/core_sampler))
var/obj/item/device/core_sampler/S = I
S.sample_item(src, user)
return
..()
if(prob(33))
src.visible_message("<span class='warning'>[src] crumbles away, leaving some dust and gravel behind.</span>")
qdel(src)
@@ -0,0 +1,116 @@
var/global/list/responsive_carriers = list(
"carbon",
"potassium",
"hydrogen",
"nitrogen",
"mercury",
"iron",
"chlorine",
"phosphorus",
"phoron")
var/global/list/finds_as_strings = list(
"Trace organic cells",
"Long exposure particles",
"Trace water particles",
"Crystalline structures",
"Metallic derivative",
"Metallic composite",
"Metamorphic/igneous rock composite",
"Metamorphic/sedimentary rock composite",
"Anomalous material")
/proc/get_responsive_reagent(var/find_type)
switch(find_type)
if(ARCHAEO_BOWL, ARCHAEO_URN, ARCHAEO_CUTLERY, ARCHAEO_STATUETTE, ARCHAEO_INSTRUMENT, ARCHAEO_HANDCUFFS, ARCHAEO_BEARTRAP, ARCHAEO_LIGHTER, ARCHAEO_BOX, ARCHAEO_GASTANK, ARCHAEO_PEN, ARCHAEO_UNKNOWN)
return "mercury"
if(ARCHAEO_COIN, ARCHAEO_KNIFE, ARCHAEO_TOOL, ARCHAEO_METAL, ARCHAEO_CLAYMORE, ARCHAEO_RODS, ARCHAEO_KATANA, ARCHAEO_LASER, ARCHAEO_GUN)
return "iron"
if(ARCHAEO_CRYSTAL, ARCHAEO_SHARD, ARCHAEO_SOULSTONE)
return "nitrogen"
if(ARCHAEO_CULTBLADE, ARCHAEO_TELEBEACON, ARCHAEO_CULTROBES, ARCHAEO_STOCKPARTS)
return "potassium"
if(ARCHAEO_FOSSIL, ARCHAEO_SHELL, ARCHAEO_PLANT, ARCHAEO_REMAINS_HUMANOID, ARCHAEO_REMAINS_ROBOT, ARCHAEO_REMAINS_XENO, ARCHAEO_GASMASK)
return "carbon"
return "phoron"
/proc/get_random_digsite_type()
return pick(100;DIGSITE_GARDEN, 95;DIGSITE_ANIMAL, 90;DIGSITE_HOUSE, 85;DIGSITE_TECHNICAL, 80;DIGSITE_TEMPLE, 75;DIGSITE_WAR)
/proc/get_random_find_type(var/digsite)
. = 0
switch(digsite)
if(DIGSITE_GARDEN)
. = pick(
100;ARCHAEO_PLANT,
25;ARCHAEO_SHELL,
25;ARCHAEO_FOSSIL,
5;ARCHAEO_BEARTRAP)
if(DIGSITE_ANIMAL)
. = pick(
100;ARCHAEO_FOSSIL,
50;ARCHAEO_SHELL,
50;ARCHAEO_PLANT,
25;ARCHAEO_BEARTRAP)
if(DIGSITE_HOUSE)
. = pick(
100;ARCHAEO_BOWL,
100;ARCHAEO_URN,
100;ARCHAEO_CUTLERY,
100;ARCHAEO_STATUETTE,
100;ARCHAEO_INSTRUMENT,
100;ARCHAEO_PEN,
100;ARCHAEO_LIGHTER,
100;ARCHAEO_BOX,
75;ARCHAEO_GASMASK,
75;ARCHAEO_COIN,
75;ARCHAEO_UNKNOWN,
50;ARCHAEO_SHARD,
50;ARCHAEO_RODS,
25;ARCHAEO_METAL)
if(DIGSITE_TECHNICAL)
. = pick(
125;ARCHAEO_GASMASK,
100;ARCHAEO_METAL,
100;ARCHAEO_GASTANK,
100;ARCHAEO_TELEBEACON,
100;ARCHAEO_TOOL,
100;ARCHAEO_STOCKPARTS,
75;ARCHAEO_SHARD,
75;ARCHAEO_RODS,
75;ARCHAEO_UNKNOWN,
50;ARCHAEO_HANDCUFFS,
50;ARCHAEO_BEARTRAP)
if(DIGSITE_TEMPLE)
. = pick(
200;ARCHAEO_CULTROBES,
200;ARCHAEO_STATUETTE,
100;ARCHAEO_URN,
100;ARCHAEO_BOWL,
100;ARCHAEO_KNIFE,
100;ARCHAEO_CRYSTAL,
75;ARCHAEO_CULTBLADE,
50;ARCHAEO_SOULSTONE,
50;ARCHAEO_UNKNOWN,
25;ARCHAEO_HANDCUFFS,
25;ARCHAEO_BEARTRAP,
10;ARCHAEO_KATANA,
10;ARCHAEO_CLAYMORE,
10;ARCHAEO_SHARD,
10;ARCHAEO_RODS,
10;ARCHAEO_METAL,
10;ARCHAEO_GASMASK)
if(DIGSITE_WAR)
. = pick(
100;ARCHAEO_GUN,
100;ARCHAEO_KNIFE,
75;ARCHAEO_LASER,
75;ARCHAEO_KATANA,
75;ARCHAEO_CLAYMORE,
50;ARCHAEO_UNKNOWN,
50;ARCHAEO_CULTROBES,
50;ARCHAEO_CULTBLADE,
50;ARCHAEO_GASMASK,
25;ARCHAEO_HANDCUFFS,
25;ARCHAEO_BEARTRAP,
25;ARCHAEO_TOOL)
@@ -1,33 +1,33 @@
// Phoron shards have been moved to code/game/objects/items/weapons/shards.dm
//legacy crystal
/obj/machinery/crystal
name = "Crystal"
icon = 'icons/obj/mining.dmi'
icon_state = "crystal"
/obj/machinery/crystal/New()
if(prob(50))
icon_state = "crystal2"
//large finds
/*
obj/machinery/syndicate_beacon
obj/machinery/wish_granter
if(18)
item_type = "jagged green crystal"
additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.")
icon_state = "crystal"
apply_material_decorations = 0
if(prob(10))
apply_image_decorations = 1
if(19)
item_type = "jagged pink crystal"
additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.")
icon_state = "crystal2"
apply_material_decorations = 0
if(prob(10))
apply_image_decorations = 1
*/
//machinery type artifacts?
// Phoron shards have been moved to code/game/objects/items/weapons/shards.dm
//legacy crystal
/obj/machinery/crystal
name = "Crystal"
icon = 'icons/obj/mining.dmi'
icon_state = "crystal"
/obj/machinery/crystal/New()
if(prob(50))
icon_state = "crystal2"
//large finds
/*
obj/machinery/syndicate_beacon
obj/machinery/wish_granter
if(18)
item_type = "jagged green crystal"
additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.")
icon_state = "crystal"
apply_material_decorations = 0
if(prob(10))
apply_image_decorations = 1
if(19)
item_type = "jagged pink crystal"
additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.")
icon_state = "crystal2"
apply_material_decorations = 0
if(prob(10))
apply_image_decorations = 1
*/
//machinery type artifacts?
@@ -1,10 +1,3 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Formerly talking crystals - these procs are now modular so that you can make any /obj/item/weapon 'parrot' player speech back to them
// This could be extended to atoms, but it's bad enough as is
// I genuinely tried to Add and Remove them from var and proc lists, but just couldn't get it working
//for easy reference
/obj/var/datum/talking_atom/talking_atom
/datum/talking_atom
@@ -1,85 +1,95 @@
/datum/controller/game_controller
var/list/artifact_spawning_turfs = list()
var/list/digsite_spawning_turfs = list()
#define XENOARCH_SPAWN_CHANCE 0.5
#define DIGSITESIZE_LOWER 4
#define DIGSITESIZE_UPPER 12
#define ARTIFACTSPAWNNUM_LOWER 6
#define ARTIFACTSPAWNNUM_UPPER 12
/datum/controller/game_controller/proc/SetupXenoarch()
//create digsites
for(var/turf/simulated/mineral/M in block(locate(1,1,1), locate(world.maxx, world.maxy, world.maxz)))
if(!(M.density))
continue
if(isnull(M.geologic_data))
M.geologic_data = new/datum/geosample(M)
if(!prob(XENOARCH_SPAWN_CHANCE))
continue
digsite_spawning_turfs.Add(M)
var/digsite = get_random_digsite_type()
var/target_digsite_size = rand(DIGSITESIZE_LOWER, DIGSITESIZE_UPPER)
var/list/processed_turfs = list()
var/list/turfs_to_process = list(M)
while(turfs_to_process.len)
var/turf/simulated/mineral/archeo_turf = pop(turfs_to_process)
if(target_digsite_size > 1)
var/list/viable_adjacent_turfs = orange(1, archeo_turf)
for(var/turf/simulated/mineral/T in orange(1, archeo_turf))
if(T.finds)
continue
if(T in processed_turfs)
continue
viable_adjacent_turfs.Add(T)
for(var/turf/simulated/mineral/T in viable_adjacent_turfs)
if(prob(target_digsite_size/viable_adjacent_turfs.len))
turfs_to_process.Add(T)
target_digsite_size -= 1
if(target_digsite_size <= 0)
break
processed_turfs.Add(archeo_turf)
if(isnull(archeo_turf.finds))
archeo_turf.finds = list()
if(prob(50))
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,95)))
else if(prob(75))
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,45)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(55,95)))
else
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,30)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(35,75)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(75,95)))
//sometimes a find will be close enough to the surface to show
var/datum/find/F = archeo_turf.finds[1]
if(F.excavation_required <= F.view_range)
archeo_turf.archaeo_overlay = "overlay_archaeo[rand(1,3)]"
archeo_turf.overlays += archeo_turf.archaeo_overlay
//have a chance for an artifact to spawn here, but not in animal or plant digsites
if(isnull(M.artifact_find) && digsite != 1 && digsite != 2)
artifact_spawning_turfs.Add(archeo_turf)
//create artifact machinery
var/num_artifacts_spawn = rand(ARTIFACTSPAWNNUM_LOWER, ARTIFACTSPAWNNUM_UPPER)
while(artifact_spawning_turfs.len > num_artifacts_spawn)
pick_n_take(artifact_spawning_turfs)
var/list/artifacts_spawnturf_temp = artifact_spawning_turfs.Copy()
while(artifacts_spawnturf_temp.len > 0)
var/turf/simulated/mineral/artifact_turf = pop(artifacts_spawnturf_temp)
artifact_turf.artifact_find = new()
#undef XENOARCH_SPAWN_CHANCE
#undef DIGSITESIZE_LOWER
#undef DIGSITESIZE_UPPER
#undef ARTIFACTSPAWNNUM_LOWER
#undef ARTIFACTSPAWNNUM_UPPER
/datum/controller/game_controller
var/list/artifact_spawning_turfs = list()
var/list/digsite_spawning_turfs = list()
#define XENOARCH_SPAWN_CHANCE 0.5
#define DIGSITESIZE_LOWER 4
#define DIGSITESIZE_UPPER 12
#define ARTIFACTSPAWNNUM_LOWER 6
#define ARTIFACTSPAWNNUM_UPPER 12
/datum/controller/game_controller/proc/SetupXenoarch()
for(var/turf/simulated/mineral/M in world)
if(!M.density)
continue
if(isnull(M.geologic_data))
M.geologic_data = new /datum/geosample(M)
if(!prob(XENOARCH_SPAWN_CHANCE))
continue
var/farEnough = 1
for(var/A in digsite_spawning_turfs)
var/turf/T = A
if(T in range(5, M))
farEnough = 0
break
if(!farEnough)
continue
digsite_spawning_turfs.Add(M)
var/digsite = get_random_digsite_type()
var/target_digsite_size = rand(DIGSITESIZE_LOWER, DIGSITESIZE_UPPER)
var/list/processed_turfs = list()
var/list/turfs_to_process = list(M)
var/list/viable_adjacent_turfs = list()
if(target_digsite_size > 1)
for(var/turf/simulated/mineral/T in orange(2, M))
if(!T.density)
continue
if(T.finds)
continue
if(T in processed_turfs)
continue
viable_adjacent_turfs.Add(T)
target_digsite_size = min(target_digsite_size, viable_adjacent_turfs.len)
for(var/i = 1 to target_digsite_size)
turfs_to_process += pick_n_take(viable_adjacent_turfs)
while(turfs_to_process.len)
var/turf/simulated/mineral/archeo_turf = pop(turfs_to_process)
processed_turfs.Add(archeo_turf)
if(isnull(archeo_turf.finds))
archeo_turf.finds = list()
if(prob(50))
archeo_turf.finds.Add(new /datum/find(digsite, rand(10, 190)))
else if(prob(75))
archeo_turf.finds.Add(new /datum/find(digsite, rand(10, 90)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(110, 190)))
else
archeo_turf.finds.Add(new /datum/find(digsite, rand(10, 50)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(60, 140)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(150, 190)))
//sometimes a find will be close enough to the surface to show
var/datum/find/F = archeo_turf.finds[1]
if(F.excavation_required <= F.view_range)
archeo_turf.archaeo_overlay = "overlay_archaeo[rand(1,3)]"
archeo_turf.update_icon()
//have a chance for an artifact to spawn here, but not in animal or plant digsites
if(isnull(M.artifact_find) && digsite != DIGSITE_GARDEN && digsite != DIGSITE_ANIMAL)
artifact_spawning_turfs.Add(archeo_turf)
//create artifact machinery
var/num_artifacts_spawn = rand(ARTIFACTSPAWNNUM_LOWER, ARTIFACTSPAWNNUM_UPPER)
while(artifact_spawning_turfs.len > num_artifacts_spawn)
pick_n_take(artifact_spawning_turfs)
var/list/artifacts_spawnturf_temp = artifact_spawning_turfs.Copy()
while(artifacts_spawnturf_temp.len > 0)
var/turf/simulated/mineral/artifact_turf = pop(artifacts_spawnturf_temp)
artifact_turf.artifact_find = new()
#undef XENOARCH_SPAWN_CHANCE
#undef DIGSITESIZE_LOWER
#undef DIGSITESIZE_UPPER
#undef ARTIFACTSPAWNNUM_LOWER
#undef ARTIFACTSPAWNNUM_UPPER
@@ -1,12 +1,8 @@
//---- Noticeboard
/obj/structure/noticeboard/anomaly
notices = 5
icon_state = "nboard05"
/obj/structure/noticeboard/anomaly/New()
//add some memos
var/obj/item/weapon/paper/P = new()
P.name = "Memo RE: proper analysis procedure"
P.info = "<br>We keep test dummies in pens here for a reason, so standard procedure should be to activate newfound alien artifacts and place the two in close proximity. Promising items I might even approve monkey testing on."
@@ -42,22 +38,18 @@
P.overlays = list("paper_stamped_rd")
src.contents += P
//---- Bookcase
/obj/structure/bookcase/manuals/xenoarchaeology
name = "Xenoarchaeology Manuals bookcase"
New()
..()
new /obj/item/weapon/book/manual/excavation(src)
new /obj/item/weapon/book/manual/mass_spectrometry(src)
new /obj/item/weapon/book/manual/materials_chemistry_analysis(src)
new /obj/item/weapon/book/manual/anomaly_testing(src)
new /obj/item/weapon/book/manual/anomaly_spectroscopy(src)
new /obj/item/weapon/book/manual/stasis(src)
update_icon()
//---- Lockers and closets
/obj/structure/bookcase/manuals/xenoarchaeology/New()
..()
new /obj/item/weapon/book/manual/excavation(src)
new /obj/item/weapon/book/manual/mass_spectrometry(src)
new /obj/item/weapon/book/manual/materials_chemistry_analysis(src)
new /obj/item/weapon/book/manual/anomaly_testing(src)
new /obj/item/weapon/book/manual/anomaly_spectroscopy(src)
new /obj/item/weapon/book/manual/stasis(src)
update_icon()
/obj/structure/closet/secure_closet/xenoarchaeologist
name = "Xenoarchaeologist Locker"
@@ -69,17 +61,15 @@
icon_broken = "secureresbroken"
icon_off = "secureresoff"
New()
..()
sleep(2)
new /obj/item/clothing/under/rank/scientist(src)
new /obj/item/clothing/suit/storage/toggle/labcoat(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/glasses/science(src)
new /obj/item/device/radio/headset/headset_sci(src)
new /obj/item/weapon/storage/belt/archaeology(src)
new /obj/item/weapon/storage/box/excavation(src)
return
/obj/structure/closet/secure_closet/xenoarchaeologist/New()
..()
new /obj/item/clothing/under/rank/scientist(src)
new /obj/item/clothing/suit/storage/toggle/labcoat(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/glasses/science(src)
new /obj/item/device/radio/headset/headset_sci(src)
new /obj/item/weapon/storage/belt/archaeology(src)
new /obj/item/weapon/storage/excavation(src)
/obj/structure/closet/excavation
name = "Excavation tools"
@@ -87,27 +77,23 @@
icon_closed = "toolcloset"
icon_opened = "toolclosetopen"
New()
..()
sleep(2)
new /obj/item/weapon/storage/belt/archaeology(src)
new /obj/item/weapon/storage/box/excavation(src)
new /obj/item/device/flashlight/lantern(src)
new /obj/item/device/ano_scanner(src)
new /obj/item/device/depth_scanner(src)
new /obj/item/device/core_sampler(src)
new /obj/item/device/gps(src)
new /obj/item/device/beacon_locator(src)
new /obj/item/device/radio/beacon(src)
new /obj/item/clothing/glasses/meson(src)
new /obj/item/weapon/pickaxe(src)
new /obj/item/device/measuring_tape(src)
new /obj/item/weapon/pickaxe/hand(src)
new /obj/item/weapon/storage/bag/fossils(src)
new /obj/item/weapon/hand_labeler(src)
return
//---- Isolation room air alarms
/obj/structure/closet/excavation/New()
..()
new /obj/item/weapon/storage/belt/archaeology(src)
new /obj/item/weapon/storage/excavation(src)
new /obj/item/device/flashlight/lantern(src)
new /obj/item/device/ano_scanner(src)
new /obj/item/device/depth_scanner(src)
new /obj/item/device/core_sampler(src)
new /obj/item/device/gps(src)
new /obj/item/device/beacon_locator(src)
new /obj/item/device/radio/beacon(src)
new /obj/item/clothing/glasses/meson(src)
new /obj/item/weapon/pickaxe(src)
new /obj/item/device/measuring_tape(src)
new /obj/item/weapon/pickaxe/hand(src)
new /obj/item/weapon/storage/bag/fossils(src)
new /obj/item/weapon/hand_labeler(src)
/obj/machinery/alarm/isolation
req_one_access = list(access_research, access_atmospherics, access_engine_equip)
+165
View File
@@ -0,0 +1,165 @@
/obj/item/weapon/rocksliver
name = "rock sliver"
desc = "It looks extremely delicate."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "sliver1"
w_class = 1
sharp = 1
var/datum/geosample/geological_data
/obj/item/weapon/rocksliver/New()
icon_state = "sliver[rand(1, 3)]"
pixel_x = rand(-8, 8)
pixel_y = rand(-8 ,0)
/datum/geosample
var/age = 0
var/age_thousand = 0
var/age_million = 0
var/age_billion = 0
var/artifact_id = ""
var/artifact_distance = -1
var/source_mineral = "chlorine"
var/list/find_presence = list()
/datum/geosample/New(var/turf/simulated/mineral/container)
UpdateTurf(container)
/datum/geosample/proc/UpdateTurf(var/turf/simulated/mineral/container)
if(!istype(container))
return
age = rand(1, 999)
if(container.mineral)
if(islist(container.mineral.xarch_ages))
var/list/ages = container.mineral.xarch_ages
if(ages["thousand"])
age_thousand = rand(1, ages["thousand"])
if(ages["million"])
age_million = rand(1, ages["million"])
if(ages["billion"])
if(ages["billion_lower"])
age_billion = rand(ages["billion_lower"], ages["billion"])
else
age_billion = rand(1, ages["billion"])
if(container.mineral.xarch_source_mineral)
source_mineral = container.mineral.xarch_source_mineral
if(prob(75))
find_presence["phosphorus"] = rand(1, 500) / 100
if(prob(25))
find_presence["mercury"] = rand(1, 500) / 100
find_presence["chlorine"] = rand(500, 2500) / 100
for(var/datum/find/F in container.finds)
var/responsive_reagent = get_responsive_reagent(F.find_type)
find_presence[responsive_reagent] = F.dissonance_spread
var/total_presence = 0
for(var/carrier in find_presence)
total_presence += find_presence[carrier]
for(var/carrier in find_presence)
find_presence[carrier] = find_presence[carrier] / total_presence
/datum/geosample/proc/UpdateNearbyArtifactInfo(var/turf/simulated/mineral/container)
if(!container || !istype(container))
return
if(container.artifact_find)
artifact_distance = rand()
artifact_id = container.artifact_find.artifact_id
else
if(master_controller) //Sanity check due to runtimes ~Z
for(var/turf/simulated/mineral/T in master_controller.artifact_spawning_turfs)
if(T.artifact_find)
var/cur_dist = get_dist(container, T) * 2
if( (artifact_distance < 0 || cur_dist < artifact_distance))
artifact_distance = cur_dist + rand() * 2 - 1
artifact_id = T.artifact_find.artifact_id
else
master_controller.artifact_spawning_turfs.Remove(T)
/obj/item/device/core_sampler
name = "core sampler"
desc = "Used to extract geological core samples."
icon = 'icons/obj/device.dmi'
icon_state = "sampler0"
item_state = "screwdriver_brown"
w_class = 1
var/sampled_turf = ""
var/num_stored_bags = 10
var/obj/item/weapon/evidencebag/filled_bag
/obj/item/device/core_sampler/examine(var/mob/user)
if(..(user, 2))
user << "<span class='notice'>Used to extract geological core samples - this one is [sampled_turf ? "full" : "empty"], and has [num_stored_bags] bag[num_stored_bags != 1 ? "s" : ""] remaining.</span>"
/obj/item/device/core_sampler/attackby(var/obj/item/I, var/mob/living/user)
if(istype(I, /obj/item/weapon/evidencebag))
if(I.contents.len)
user << "<span class='warning'>\The [I] is full.</span>"
return
if(num_stored_bags < 10)
qdel(I)
num_stored_bags += 1
user << "<span class='notice'>You insert \the [I] into \the [src].</span>"
else
user << "<span class='warning'>\The [src] can not fit any more bags.</span>"
else
return ..()
/obj/item/device/core_sampler/proc/sample_item(var/item_to_sample, var/mob/user)
var/datum/geosample/geo_data
if(istype(item_to_sample, /turf/simulated/mineral))
var/turf/simulated/mineral/T = item_to_sample
T.geologic_data.UpdateNearbyArtifactInfo(T)
geo_data = T.geologic_data
else if(istype(item_to_sample, /obj/item/weapon/ore))
var/obj/item/weapon/ore/O = item_to_sample
geo_data = O.geologic_data
if(geo_data)
if(filled_bag)
user << "<span class='warning'>The core sampler is full.</span>"
else if(num_stored_bags < 1)
user << "<span class='warning'>The core sampler is out of sample bags.</span>"
else
//create a new sample bag which we'll fill with rock samples
filled_bag = new /obj/item/weapon/evidencebag(src)
filled_bag.name = "sample bag"
filled_bag.desc = "a bag for holding research samples."
icon_state = "sampler1"
--num_stored_bags
//put in a rock sliver
var/obj/item/weapon/rocksliver/R = new(filled_bag)
R.geological_data = geo_data
//update the sample bag
filled_bag.icon_state = "evidence"
var/image/I = image("icon"=R, "layer"=FLOAT_LAYER)
filled_bag.overlays += I
filled_bag.overlays += "evidence"
filled_bag.w_class = 1
user << "<span class='notice'>You take a core sample of the [item_to_sample].</span>"
else
user << "<span class='warning'>You are unable to take a sample of [item_to_sample].</span>"
/obj/item/device/core_sampler/attack_self(var/mob/living/user)
if(filled_bag)
user << "<span class='notice'>You eject the full sample bag.</span>"
var/success = 0
if(istype(src.loc, /mob))
var/mob/M = src.loc
success = M.put_in_inactive_hand(filled_bag)
if(!success)
filled_bag.loc = get_turf(src)
filled_bag = null
icon_state = "sampler0"
else
user << "<span class='warning'>The core sampler is empty.</span>"

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