Merge branch 'master' into fuckCael

This commit is contained in:
Kelenius
2016-08-08 18:41:18 +03:00
63 changed files with 307 additions and 293 deletions

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>"

View File

@@ -56,32 +56,34 @@ var/list/gear_datums = 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, G.whitelisted))
if(G.whitelisted && !is_alien_whitelisted(preference_mob, all_species[G.whitelisted]))
continue
if(max_cost && G.cost > max_cost)
continue
. += 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

View File

@@ -131,7 +131,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>"
@@ -260,7 +260,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
@@ -302,7 +302,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 << "\red \icon[src] Incorrect pin/account combination entered, [max_pin_attempts - number_incorrect_tries] attempts remaining."
@@ -322,7 +322,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 << "\blue \icon[src] Access granted. Welcome user '[authenticated_account.owner_name].'"
@@ -350,7 +350,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>"
@@ -375,7 +375,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>"
@@ -387,7 +387,7 @@ log transactions
R.info += "<i>Account holder:</i> [authenticated_account.owner_name]<br>"
R.info += "<i>Account number:</i> [authenticated_account.account_number]<br>"
R.info += "<i>Balance:</i> $[authenticated_account.money]<br>"
R.info += "<i>Date and time:</i> [worldtime2text()], [current_date_string]<br><br>"
R.info += "<i>Date and time:</i> [stationtime2text()], [current_date_string]<br><br>"
R.info += "<i>Service terminal ID:</i> [machine_id]<br>"
//stamp the paper
@@ -410,7 +410,7 @@ log transactions
R.info = "<b>Transaction logs</b><br>"
R.info += "<i>Account holder:</i> [authenticated_account.owner_name]<br>"
R.info += "<i>Account number:</i> [authenticated_account.account_number]<br>"
R.info += "<i>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>Service terminal ID:</i> [machine_id]<br>"
R.info += "<table border=1 style='width:100%'>"
R.info += "<tr>"
@@ -486,7 +486,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 = NO_SCREEN

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

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

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>"

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>
"}

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>
"}

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>"

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)

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)

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)

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

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]"

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"))

View File

@@ -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

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

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)

View File

@@ -232,8 +232,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>")

View File

@@ -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))

View File

@@ -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

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

View File

@@ -126,7 +126,7 @@
//create a new scanlog entry
var/datum/depth_scan/D = new()
D.coords = "[M.x]:[M.y]:[M.z]"
D.time = worldtime2text()
D.time = stationtime2text()
D.record_index = positive_locations.len + 1
D.material = M.mineral ? M.mineral.display_name : "Rock"
@@ -147,7 +147,7 @@
//create a new scanlog entry
var/datum/depth_scan/D = new()
D.coords = "[B.x]:[B.y]:[B.z]"
D.time = worldtime2text()
D.time = stationtime2text()
D.record_index = positive_locations.len + 1
//these values are arbitrary