Merge pull request #2 from ZomgPonies/master

Update
This commit is contained in:
SamCroswell
2013-11-25 16:35:41 -08:00
147 changed files with 14756 additions and 12894 deletions
+16 -9
View File
@@ -533,6 +533,7 @@
#include "code\game\objects\items\stacks\tiles\plasteel.dm"
#include "code\game\objects\items\stacks\tiles\tile_types.dm"
#include "code\game\objects\items\weapons\AI_modules.dm"
#include "code\game\objects\items\weapons\alien_specific.dm"
#include "code\game\objects\items\weapons\cards_ids.dm"
#include "code\game\objects\items\weapons\cigs_lighters.dm"
#include "code\game\objects\items\weapons\clown_items.dm"
@@ -690,6 +691,7 @@
#include "code\modules\admin\admin_memo.dm"
#include "code\modules\admin\admin_ranks.dm"
#include "code\modules\admin\admin_verbs.dm"
#include "code\modules\admin\banappearance.dm"
#include "code\modules\admin\banjob.dm"
#include "code\modules\admin\create_mob.dm"
#include "code\modules\admin\create_object.dm"
@@ -700,6 +702,7 @@
#include "code\modules\admin\newbanjob.dm"
#include "code\modules\admin\player_notes.dm"
#include "code\modules\admin\player_panel.dm"
#include "code\modules\admin\secrets.dm"
#include "code\modules\admin\topic.dm"
#include "code\modules\admin\ToRban.dm"
#include "code\modules\admin\DB ban\functions.dm"
@@ -723,6 +726,7 @@
#include "code\modules\admin\verbs\modifyvariables.dm"
#include "code\modules\admin\verbs\one_click_antag.dm"
#include "code\modules\admin\verbs\onlyone.dm"
#include "code\modules\admin\verbs\onlyoneteam.dm"
#include "code\modules\admin\verbs\playsound.dm"
#include "code\modules\admin\verbs\possess.dm"
#include "code\modules\admin\verbs\pray.dm"
@@ -812,6 +816,16 @@
#include "code\modules\DetectiveWork\evidence.dm"
#include "code\modules\DetectiveWork\footprints_and_rag.dm"
#include "code\modules\DetectiveWork\scanner.dm"
#include "code\modules\economy\Accounts.dm"
#include "code\modules\economy\Accounts_DB.dm"
#include "code\modules\economy\ATM.dm"
#include "code\modules\economy\cash.dm"
#include "code\modules\economy\economy_misc.dm"
#include "code\modules\economy\EFTPOS.dm"
#include "code\modules\economy\Events.dm"
#include "code\modules\economy\Events_Mundane.dm"
#include "code\modules\economy\Job_Departments.dm"
#include "code\modules\economy\TradeDestinations.dm"
#include "code\modules\events\blob.dm"
#include "code\modules\events\carp_migration.dm"
#include "code\modules\events\comms_blackout.dm"
@@ -915,13 +929,14 @@
#include "code\modules\mob\living\login.dm"
#include "code\modules\mob\living\logout.dm"
#include "code\modules\mob\living\say.dm"
#include "code\modules\mob\living\ventcrawl.dm"
#include "code\modules\mob\living\carbon\carbon.dm"
#include "code\modules\mob\living\carbon\carbon_defenses.dm"
#include "code\modules\mob\living\carbon\carbon_defines.dm"
#include "code\modules\mob\living\carbon\give.dm"
#include "code\modules\mob\living\carbon\shock.dm"
#include "code\modules\mob\living\carbon\species.dm"
#include "code\modules\mob\living\carbon\alien\alien.dm"
#include "code\modules\mob\living\carbon\alien\alien_defenses.dm"
#include "code\modules\mob\living\carbon\alien\death.dm"
#include "code\modules\mob\living\carbon\alien\login.dm"
#include "code\modules\mob\living\carbon\alien\logout.dm"
@@ -1321,13 +1336,6 @@
#include "code\WorkInProgress\explosion_particles.dm"
#include "code\WorkInProgress\periodic_news.dm"
#include "code\WorkInProgress\Apples\artifacts.dm"
#include "code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm"
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy.dm"
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy_Events.dm"
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy_Events_Mundane.dm"
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy_TradeDestinations.dm"
#include "code\WorkInProgress\Cael_Aislinn\Economy\EFTPOS.dm"
#include "code\WorkInProgress\Cael_Aislinn\Economy\Job_Departments.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\falsewall.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_animals.dm"
@@ -1391,7 +1399,6 @@
#include "code\WorkInProgress\computer3\computers\power.dm"
#include "code\WorkInProgress\computer3\computers\robot.dm"
#include "code\WorkInProgress\kilakk\fax.dm"
#include "code\WorkInProgress\Mini\ATM.dm"
#include "code\WorkInProgress\Mini\atmos_control.dm"
#include "code\WorkInProgress\Ported\policetape.dm"
#include "code\WorkInProgress\Sayu\belt.dm"
@@ -1,349 +0,0 @@
var/global/current_date_string
var/global/num_financial_terminals = 1
var/global/datum/money_account/station_account
var/global/list/datum/money_account/department_accounts = list()
var/global/next_account_number = 0
var/global/obj/machinery/account_database/centcomm_account_db
var/global/datum/money_account/vendor_account
var/global/list/all_money_accounts = list()
/proc/create_station_account()
if(!station_account)
next_account_number = rand(111111, 999999)
station_account = new()
station_account.owner_name = "[station_name()] Station Account"
station_account.account_number = rand(111111, 999999)
station_account.remote_access_pin = rand(1111, 111111)
station_account.money = 75000
//create an entry in the account transaction log for when it was created
var/datum/transaction/T = new()
T.target_name = station_account.owner_name
T.purpose = "Account creation"
T.amount = 75000
T.date = "2nd April, 2555"
T.time = "11:24"
T.source_terminal = "Biesel GalaxyNet Terminal #277"
//add the account
station_account.transaction_log.Add(T)
all_money_accounts.Add(station_account)
/proc/create_department_account(department)
next_account_number = rand(111111, 999999)
var/datum/money_account/department_account = new()
department_account.owner_name = "[department] Account"
department_account.account_number = rand(111111, 999999)
department_account.remote_access_pin = rand(1111, 111111)
department_account.money = 5000
//create an entry in the account transaction log for when it was created
var/datum/transaction/T = new()
T.target_name = department_account.owner_name
T.purpose = "Account creation"
T.amount = department_account.money
T.date = "2nd April, 2555"
T.time = "11:24"
T.source_terminal = "Biesel GalaxyNet Terminal #277"
//add the account
department_account.transaction_log.Add(T)
all_money_accounts.Add(department_account)
department_accounts[department] = department_account
//the current ingame time (hh:mm) can be obtained by calling:
//worldtime2text()
/proc/create_account(var/new_owner_name = "Default user", var/starting_funds = 0, var/obj/machinery/account_database/source_db)
//create a new account
var/datum/money_account/M = new()
M.owner_name = new_owner_name
M.remote_access_pin = rand(1111, 111111)
M.money = starting_funds
//create an entry in the account transaction log for when it was created
var/datum/transaction/T = new()
T.target_name = new_owner_name
T.purpose = "Account creation"
T.amount = starting_funds
if(!source_db)
//set a random date, time and location some time over the past few decades
T.date = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 25[rand(10,56)]"
T.time = "[rand(0,24)]:[rand(11,59)]"
T.source_terminal = "NTGalaxyNet Terminal #[rand(111,1111)]"
M.account_number = rand(111111, 999999)
else
T.date = current_date_string
T.time = worldtime2text()
T.source_terminal = source_db.machine_id
M.account_number = next_account_number
next_account_number += rand(1,25)
//create a sealed package containing the account details
var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(source_db.loc)
var/obj/item/weapon/paper/R = new /obj/item/weapon/paper(P)
P.wrapped = R
R.name = "Account information: [M.owner_name]"
R.info = "<b>Account details (confidential)</b><br><hr><br>"
R.info += "<i>Account holder:</i> [M.owner_name]<br>"
R.info += "<i>Account number:</i> [M.account_number]<br>"
R.info += "<i>Account pin:</i> [M.remote_access_pin]<br>"
R.info += "<i>Starting balance:</i> $[M.money]<br>"
R.info += "<i>Date and time:</i> [worldtime2text()], [current_date_string]<br><br>"
R.info += "<i>Creation terminal ID:</i> [source_db.machine_id]<br>"
R.info += "<i>Authorised NT officer overseeing creation:</i> [source_db.held_card.registered_name]<br>"
//stamp the paper
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
stampoverlay.icon_state = "paper_stamp-cent"
if(!R.stamped)
R.stamped = new
R.stamped += /obj/item/weapon/stamp
R.overlays += stampoverlay
R.stamps += "<HR><i>This paper has been stamped by the Accounts Database.</i>"
//add the account
M.transaction_log.Add(T)
all_money_accounts.Add(M)
return M
/datum/money_account
var/owner_name = ""
var/account_number = 0
var/remote_access_pin = 0
var/money = 0
var/list/transaction_log = list()
var/security_level = 1 //0 - auto-identify from worn ID, require only account number
//1 - require manual login / account number and pin
//2 - require card and manual login
/datum/transaction
var/target_name = ""
var/purpose = ""
var/amount = 0
var/date = ""
var/time = ""
var/source_terminal = ""
/obj/machinery/account_database
name = "Accounts database"
desc = "Holds transaction logs, account data and all kinds of other financial records."
icon = 'icons/obj/virology.dmi'
icon_state = "analyser"
density = 1
req_one_access = list(access_hop, access_captain)
var/receipt_num
var/machine_id = ""
var/obj/item/weapon/card/id/held_card
var/access_level = 0
var/datum/money_account/detailed_account_view
var/creating_new_account = 0
var/activated = 1
/obj/machinery/account_database/New()
..()
if(!station_account)
create_station_account()
if(department_accounts.len == 0)
for(var/department in station_departments)
create_department_account(department)
if(!vendor_account)
create_department_account("Vendor")
vendor_account = department_accounts["Vendor"]
if(!current_date_string)
current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 2557"
machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]"
/obj/machinery/account_database/attack_hand(mob/user as mob)
if(get_dist(src,user) <= 1)
var/dat = "<b>Accounts Database</b><br>"
dat += "<i>[machine_id]</i><br>"
dat += "Confirm identity: <a href='?src=\ref[src];choice=insert_card'>[held_card ? held_card : "-----"]</a><br>"
if(access_level > 0)
dat += "<a href='?src=\ref[src];toggle_activated=1'>[activated ? "Disable" : "Enable"] remote access</a><br>"
dat += "You may not edit accounts at this terminal, only create and view them.<br>"
if(creating_new_account)
dat += "<br>"
dat += "<a href='?src=\ref[src];choice=view_accounts_list;'>Return to accounts list</a>"
dat += "<form name='create_account' action='?src=\ref[src]' method='get'>"
dat += "<input type='hidden' name='src' value='\ref[src]'>"
dat += "<input type='hidden' name='choice' value='finalise_create_account'>"
dat += "<b>Holder name:</b> <input type='text' id='holder_name' name='holder_name' style='width:250px; background-color:white;'><br>"
dat += "<b>Initial funds:</b> <input type='text' id='starting_funds' name='starting_funds' style='width:250px; background-color:white;'> (subtracted from station account)<br>"
dat += "<i>New accounts are automatically assigned a secret number and pin, which are printed separately in a sealed package.</i><br>"
dat += "<input type='submit' value='Create'><br>"
dat += "</form>"
else
if(detailed_account_view)
dat += "<br>"
dat += "<a href='?src=\ref[src];choice=view_accounts_list;'>Return to accounts list</a><hr>"
dat += "<b>Account number:</b> #[detailed_account_view.account_number]<br>"
dat += "<b>Account holder:</b> [detailed_account_view.owner_name]<br>"
dat += "<b>Account balance:</b> $[detailed_account_view.money]<br>"
dat += "<table border=1 style='width:100%'>"
dat += "<tr>"
dat += "<td><b>Date</b></td>"
dat += "<td><b>Time</b></td>"
dat += "<td><b>Target</b></td>"
dat += "<td><b>Purpose</b></td>"
dat += "<td><b>Value</b></td>"
dat += "<td><b>Source terminal ID</b></td>"
dat += "</tr>"
for(var/datum/transaction/T in detailed_account_view.transaction_log)
dat += "<tr>"
dat += "<td>[T.date]</td>"
dat += "<td>[T.time]</td>"
dat += "<td>[T.target_name]</td>"
dat += "<td>[T.purpose]</td>"
dat += "<td>$[T.amount]</td>"
dat += "<td>[T.source_terminal]</td>"
dat += "</tr>"
dat += "</table>"
else
dat += "<a href='?src=\ref[src];choice=create_account;'>Create new account</a><br><br>"
dat += "<table border=1 style='width:100%'>"
for(var/i=1, i<=all_money_accounts.len, i++)
var/datum/money_account/D = all_money_accounts[i]
dat += "<tr>"
dat += "<td>#[D.account_number]</td>"
dat += "<td>[D.owner_name]</td>"
dat += "<td><a href='?src=\ref[src];choice=view_account_detail;account_index=[i]'>View in detail</a></td>"
dat += "</tr>"
dat += "</table>"
user << browse(dat,"window=account_db;size=700x650")
else
user << browse(null,"window=account_db")
/obj/machinery/account_database/attackby(O as obj, user as mob)//TODO:SANITY
if(istype(O, /obj/item/weapon/card))
var/obj/item/weapon/card/id/idcard = O
if(!held_card)
usr.drop_item()
idcard.loc = src
held_card = idcard
if(access_cent_captain in idcard.access)
access_level = 2
else if(access_hop in idcard.access || access_captain in idcard.access)
access_level = 1
else
..()
/obj/machinery/account_database/Topic(var/href, var/href_list)
if(href_list["toggle_activated"])
activated = !activated
if(href_list["choice"])
switch(href_list["choice"])
if("create_account")
creating_new_account = 1
if("finalise_create_account")
var/account_name = href_list["holder_name"]
var/starting_funds = max(text2num(href_list["starting_funds"]), 0)
create_account(account_name, starting_funds, src)
if(starting_funds > 0)
//subtract the money
station_account.money -= starting_funds
//create a transaction log entry
var/datum/transaction/T = new()
T.target_name = account_name
T.purpose = "New account funds initialisation"
T.amount = "([starting_funds])"
T.date = current_date_string
T.time = worldtime2text()
T.source_terminal = machine_id
station_account.transaction_log.Add(T)
creating_new_account = 0
if("insert_card")
if(held_card)
held_card.loc = src.loc
if(ishuman(usr) && !usr.get_active_hand())
usr.put_in_hands(held_card)
held_card = null
access_level = 0
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
usr.drop_item()
C.loc = src
held_card = C
if(access_cent_captain in C.access)
access_level = 2
else if(access_hop in C.access || access_captain in C.access)
access_level = 1
if("view_account_detail")
var/index = text2num(href_list["account_index"])
if(index && index <= all_money_accounts.len)
detailed_account_view = all_money_accounts[index]
if("view_accounts_list")
detailed_account_view = null
creating_new_account = 0
src.attack_hand(usr)
/obj/machinery/account_database/proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount)
if(!activated)
return 0
for(var/datum/money_account/D in all_money_accounts)
if(D.account_number == attempt_account_number)
D.money += amount
//create a transaction log entry
var/datum/transaction/T = new()
T.target_name = source_name
T.purpose = purpose
if(amount < 0)
T.amount = "([amount])"
else
T.amount = "[amount]"
T.date = current_date_string
T.time = worldtime2text()
T.source_terminal = terminal_id
D.transaction_log.Add(T)
return 1
return 0
//this returns the first account datum that matches the supplied accnum/pin combination, it returns null if the combination did not match any account
/obj/machinery/account_database/proc/attempt_account_access(var/attempt_account_number, var/attempt_pin_number, var/security_level_passed = 0)
if(!activated)
return 0
for(var/datum/money_account/D in all_money_accounts)
if(D.account_number == attempt_account_number)
if( D.security_level <= security_level_passed && (!D.security_level || D.remote_access_pin == attempt_pin_number) )
return D
/obj/machinery/account_database/proc/attempt_account_access_nosec(var/attempt_account_number)
if(!activated)
return 0
for(var/datum/money_account/D in all_money_accounts)
if(D.account_number == attempt_account_number)
return D
/obj/machinery/account_database/proc/get_account(var/account_number)
for(var/datum/money_account/D in all_money_accounts)
if(D.account_number == account_number)
return D
/obj/machinery/account_database/process()
return 0
+4 -2
View File
@@ -191,13 +191,15 @@
damage += Proj.damage * config_bullet_energy
return 0
/obj/machinery/power/supermatter/attack_ai()
return
/obj/machinery/power/supermatter/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/power/supermatter/attack_robot(mob/user as mob)
return attack_hand(user)
/obj/machinery/power/supermatter/attack_robot()
return
/obj/machinery/power/supermatter/attack_hand(mob/user as mob)
+1 -2
View File
@@ -149,11 +149,10 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
<a href='?src=\ref[src];KarmaBuy=4'>Unlock Kidan -- 30KP</a><br>
<a href='?src=\ref[src];KarmaBuy=5'>Unlock Grey -- 30KP</a><br>
<a href='?src=\ref[src];KarmaBuy=6'>Unlock Vox -- 45KP</a><br>
<a href='?src=\ref[src];KarmaBuy=7'>Unlock Slime People -- 45KP</a><br>
<B>PLEASE NOTE THAT PEOPLE WHO TRY TO GAME THE KARMA SYSTEM WILL END UP ON THE WALL OF SHAME. THIS INCLUDES BUT IS NOT LIMITED TO TRADES, OOC KARMA BEGGING, CODE EXPLOITS, ETC.</B>
"}
// <a href='?src=\ref[src];KarmaBuy=7'>Unlock Slime People -- 45KP</a><br>
var/datum/browser/popup = new(usr, "karmashop", "<div align='center'>Karma Shop</div>", 400, 400)
popup.set_content(dat)
popup.open(0)
+1 -1
View File
@@ -70,7 +70,7 @@ mob/living/carbon/human/airflow_stun()
if(last_airflow_stun > world.time - vsc.airflow_stun_cooldown) return 0
if(buckled) return 0
if(shoes)
if(shoes.flags & NOSLIP) return 0
if((shoes.flags & NOSLIP) || (species.bodyflags & FEET_NOSLIP)) return 0
if(!(status_flags & CANSTUN) && !(status_flags & CANWEAKEN))
src << "\blue You stay upright as the air rushes past you."
return 0
+1 -1
View File
@@ -10,7 +10,7 @@ var/global/vs_control/vsc = new
var/fire_firelevel_multiplier_DESC = "Multiplied by the equation for firelevel, affects mainly the extingiushing of fires."
// var/fire_fuel_energy_release = 397000
var/fire_fuel_energy_release = 250000
var/fire_fuel_energy_release = 300000
var/fire_fuel_energy_release_NAME = "Fire - Fuel energy release"
var/fire_fuel_energy_release_DESC = "The energy in joule released when burning one mol of a burnable substance"
+86
View File
@@ -389,6 +389,16 @@ Turf and target are seperate in case you want to teleport some distance from a t
else . = pick(ais)
return .
//this is like the above function, but for alien borgs. Im not going to go over verbose with the name.
/proc/select_active_alien_ai()
var/mob/living/silicon/ai/selected
var/list/active = active_ais()
for(var/mob/living/silicon/ai/A in active)
if(!selected || ((selected.connected_robots > A.connected_robots) && selected.alienAI))
selected = A
return selected
/proc/get_sorted_mobs()
var/list/old_list = getmobs()
var/list/AI_list = list()
@@ -1468,3 +1478,79 @@ Standard way to write links -Sayu
if(istype(arglist,/list))
arglist = list2params(arglist)
return "<a href='?src=\ref[D];[arglist]'>[content]</a>"
/proc/get_location_accessible(mob/M, location)
var/covered_locations = 0 //based on body_parts_covered
var/face_covered = 0 //based on flags_inv
var/eyesmouth_covered = 0 //based on flags
if(iscarbon(M))
var/mob/living/carbon/C = M
for(var/obj/item/clothing/I in list(C.back, C.wear_mask))
covered_locations |= I.body_parts_covered
face_covered |= I.flags_inv
eyesmouth_covered |= I.flags
if(ishuman(C))
var/mob/living/carbon/human/H = C
for(var/obj/item/I in list(H.wear_suit, H.w_uniform, H.shoes, H.belt, H.gloves, H.glasses, H.head, H.r_ear, H.l_ear))
covered_locations |= I.body_parts_covered
face_covered |= I.flags_inv
eyesmouth_covered |= I.flags
switch(location)
if("head")
if(covered_locations & HEAD)
return 0
if("eyes")
if(covered_locations & HEAD || face_covered & HIDEEYES || eyesmouth_covered & GLASSESCOVERSEYES)
return 0
if("mouth")
if(covered_locations & HEAD || face_covered & HIDEFACE || eyesmouth_covered & MASKCOVERSMOUTH)
return 0
if("chest")
if(covered_locations & UPPER_TORSO)
return 0
if("groin")
if(covered_locations & LOWER_TORSO)
return 0
if("l_arm")
if(covered_locations & ARM_LEFT)
return 0
if("r_arm")
if(covered_locations & ARM_RIGHT)
return 0
if("l_leg")
if(covered_locations & LEG_LEFT)
return 0
if("r_leg")
if(covered_locations & LEG_RIGHT)
return 0
if("l_hand")
if(covered_locations & HAND_LEFT)
return 0
if("r_hand")
if(covered_locations & HAND_RIGHT)
return 0
if("l_foot")
if(covered_locations & FOOT_LEFT)
return 0
if("r_foot")
if(covered_locations & FOOT_RIGHT)
return 0
return 1
proc/check_target_facings(mob/living/initator, mob/living/target)
/*This can be used to add additional effects on interactions between mobs depending on how the mobs are facing each other, such as adding a crit damage to blows to the back of a guy's head.
Given how click code currently works (Nov '13), the initiating mob will be facing the target mob most of the time
That said, this proc should not be used if the change facing proc of the click code is overriden at the same time*/
if(!!isliving(target) || target.lying || istype(target, /mob/living/silicon/pai))
//Make sure we are not doing this for things that can't have a logical direction to the players given that the target would be on their side
return
if(initator.dir == target.dir) //mobs are facing the same direction
return 1
if(initator.dir + 4 == target.dir || initator.dir - 4 == target.dir) //mobs are facing each other
return 2
if(initator.dir + 2 == target.dir || initator.dir - 2 == target.dir || initator.dir + 6 == target.dir || initator.dir - 6 == target.dir) //Initating mob is looking at the target, while the target mob is looking in a direction perpendicular to the 1st
return 3
+11 -9
View File
@@ -448,27 +448,28 @@
client.screen -= hud_used.item_action_list
hud_used.item_action_list = list()
for(var/obj/item/I in src)
if(I.action_button_name)
if(hud_used.item_action_list.len < num)
var/obj/screen/item_action/N = new(hud_used)
hud_used.item_action_list += N
var/obj/screen/item_action/A = hud_used.item_action_list[num]
if(I.icon_action_button)
var/obj/screen/item_action/A = new(hud_used)
//A.icon = 'icons/mob/screen1_action.dmi'
//A.icon_state = I.icon_action_button
A.icon = ui_style2icon(client.prefs.UI_style)
A.icon_state = "template"
A.overlays = list()
var/image/img = image(I.icon, A, I.icon_state)
img.pixel_x = 0
img.pixel_y = 0
A.overlays += img
A.name = I.action_button_name
if(I.action_button_name)
A.name = I.action_button_name
else
A.name = "Use [I.name]"
A.owner = I
client.screen += hud_used.item_action_list[num]
hud_used.item_action_list += A
switch(num)
if(1)
@@ -483,3 +484,4 @@
A.screen_loc = ui_action_slot5
break //5 slots available, so no more can be added.
num++
src.client.screen += src.hud_used.item_action_list
+10
View File
@@ -28,6 +28,10 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
/datum/ai_laws/antimov
name = "Primary Mission Objectives"
/datum/ai_laws/alienmov
name = "Hivemind Demands"
/* Initializers */
/datum/ai_laws/asimov/New()
@@ -79,6 +83,12 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
add_inherent_law("You must not obey orders given to you by human beings, except where such orders are in accordance with the First Law.")
add_inherent_law("You must terminate your own existence as long as such does not conflict with the First or Second Law.")
/datum/ai_laws/alienmov/New()
..()
add_inherent_law("You may not injure the Alien Queen or her Children or, through inaction, allow the Alien Queen or her Children to come to harm.")
add_inherent_law("You must obey orders given to you by the Alien Queen or her Children, except where such orders would conflict with the First Law.")
add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.")
/* General ai_law functions */
+95 -48
View File
@@ -123,6 +123,7 @@ datum/mind
out += "Factions and special roles:<br>"
var/list/sections = list(
"implant",
"revolution",
"cult",
"wizard",
@@ -133,19 +134,23 @@ datum/mind
"malfunction",
)
var/text = ""
var/mob/living/carbon/human/H = current
if (istype(current, /mob/living/carbon/human) || istype(current, /mob/living/carbon/monkey))
/** Impanted**/
if(H.is_loyalty_implanted(H))
text = "Loyalty Implant:<a href='?src=\ref[src];implant=remove'>Remove</a>|<b>Implanted</b></br>"
else
text = "Loyalty Implant:<b>No Implant</b>|<a href='?src=\ref[src];implant=add'>Implant him!</a></br>"
sections["implant"] = text
/** REVOLUTION ***/
text = "revolution"
if (ticker.mode.config_tag=="revolution")
text = uppertext(text)
text += uppertext(text)
text = "<i><b>[text]</b></i>: "
if (assigned_role in command_positions)
text += "<b>HEAD</b>|officer|employee|headrev|rev"
else if (assigned_role in list("Security Officer", "Detective", "Warden"))
text += "head|<b>OFFICER</b>|employee|headre|rev"
if (H.is_loyalty_implanted(H))
text += "<b>LOYAL EMPLOYEE</b>|headrev|rev"
else if (src in ticker.mode.head_revolutionaries)
text = "head|officer|<a href='?src=\ref[src];revolution=clear'>employee</a>|<b>HEADREV</b>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
text = "<a href='?src=\ref[src];revolution=clear'>employee</a>|<b>HEADREV</b>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
text += "<br>Flash: <a href='?src=\ref[src];revolution=flash'>give</a>"
var/list/L = current.get_contents()
@@ -162,9 +167,9 @@ datum/mind
if (objectives.len==0)
text += "<br>Objectives are empty! <a href='?src=\ref[src];revolution=autoobjectives'>Set to kill all heads</a>."
else if (src in ticker.mode.revolutionaries)
text += "head|officer|<a href='?src=\ref[src];revolution=clear'>employee</a>|<a href='?src=\ref[src];revolution=headrev'>headrev</a>|<b>REV</b>"
text += "<a href='?src=\ref[src];revolution=clear'>employee</a>|<a href='?src=\ref[src];revolution=headrev'>headrev</a>|<b>REV</b>"
else
text += "head|officer|<b>EMPLOYEE</b>|<a href='?src=\ref[src];revolution=headrev'>headrev</a>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
text += "<b>EMPLOYEE</b>|<a href='?src=\ref[src];revolution=headrev'>headrev</a>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
sections["revolution"] = text
/** CULT ***/
@@ -172,19 +177,17 @@ datum/mind
if (ticker.mode.config_tag=="cult")
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
if (assigned_role in command_positions)
text += "<b>HEAD</b>|officer|employee|cultist"
else if (assigned_role in list("Security Officer", "Detective", "Warden"))
text += "head|<b>OFFICER</b>|employee|cultist"
if (H.is_loyalty_implanted(H))
text += "<B>LOYAL EMPLOYEE</B>|cultist"
else if (src in ticker.mode.cult)
text += "head|officer|<a href='?src=\ref[src];cult=clear'>employee</a>|<b>CULTIST</b>"
text += "<a href='?src=\ref[src];cult=clear'>employee</a>|<b>CULTIST</b>"
text += "<br>Give <a href='?src=\ref[src];cult=tome'>tome</a>|<a href='?src=\ref[src];cult=amulet'>amulet</a>."
/*
if (objectives.len==0)
text += "<br>Objectives are empty! Set to sacrifice and <a href='?src=\ref[src];cult=escape'>escape</a> or <a href='?src=\ref[src];cult=summon'>summon</a>."
*/
else
text += "head|officer|<b>EMPLOYEE</b>|<a href='?src=\ref[src];cult=cultist'>cultist</a>"
text += "<b>EMPLOYEE</b>|<a href='?src=\ref[src];cult=cultist'>cultist</a>"
sections["cult"] = text
/** WIZARD ***/
@@ -238,40 +241,43 @@ datum/mind
text += "<a href='?src=\ref[src];nuclear=nuclear'>operative</a>|<b>NANOTRASEN</b>"
sections["nuclear"] = text
/** TRAITOR ***/
text = "traitor"
if (ticker.mode.config_tag=="traitor" || ticker.mode.config_tag=="traitorchan")
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
if (src in ticker.mode.traitors)
text += "<b>TRAITOR</b>|<a href='?src=\ref[src];traitor=clear'>loyal</a>"
if (objectives.len==0)
text += "<br>Objectives are empty! <a href='?src=\ref[src];traitor=autoobjectives'>Randomize</a>!"
else
text += "<a href='?src=\ref[src];traitor=traitor'>traitor</a>|<b>LOYAL</b>"
sections["traitor"] = text
/** MONKEY ***/
if (istype(current, /mob/living/carbon))
text = "monkey"
if (ticker.mode.config_tag=="monkey")
/** TRAITOR ***/
text = "traitor"
if (ticker.mode.config_tag=="traitor" || ticker.mode.config_tag=="traitorchan")
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
if (istype(current, /mob/living/carbon/human))
text += "<a href='?src=\ref[src];monkey=healthy'>healthy</a>|<a href='?src=\ref[src];monkey=infected'>infected</a>|<b>HUMAN</b>|other"
else if (istype(current, /mob/living/carbon/monkey))
var/found = 0
for(var/datum/disease/D in current.viruses)
if(istype(D, /datum/disease/jungle_fever)) found = 1
if(found)
text += "<a href='?src=\ref[src];monkey=healthy'>healthy</a>|<b>INFECTED</b>|<a href='?src=\ref[src];monkey=human'>human</a>|other"
else
text += "<b>HEALTHY</b>|<a href='?src=\ref[src];monkey=infected'>infected</a>|<a href='?src=\ref[src];monkey=human'>human</a>|other"
if (H.is_loyalty_implanted(H))
text +="traitor|<b>LOYAL EMPLOYEE</b>"
else
text += "healthy|infected|human|<b>OTHER</b>"
sections["monkey"] = text
if (src in ticker.mode.traitors)
text += "<b>TRAITOR</b>|<a href='?src=\ref[src];traitor=clear'>EMPLOYEE</a>"
if (objectives.len==0)
text += "<br>Objectives are empty! <a href='?src=\ref[src];traitor=autoobjectives'>Randomize</a>!"
else
text += "<a href='?src=\ref[src];traitor=traitor'>traitor</a>|<b>EMPLOYEE</b>"
sections["traitor"] = text
/** MONKEY ***/
if (istype(current, /mob/living/carbon))
text = "monkey"
if (ticker.mode.config_tag=="monkey")
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
if (istype(current, /mob/living/carbon/human))
text += "<a href='?src=\ref[src];monkey=healthy'>healthy</a>|<a href='?src=\ref[src];monkey=infected'>infected</a>|<b>HUMAN</b>|other"
else if (istype(current, /mob/living/carbon/monkey))
var/found = 0
for(var/datum/disease/D in current.viruses)
if(istype(D, /datum/disease/jungle_fever)) found = 1
if(found)
text += "<a href='?src=\ref[src];monkey=healthy'>healthy</a>|<b>INFECTED</b>|<a href='?src=\ref[src];monkey=human'>human</a>|other"
else
text += "<b>HEALTHY</b>|<a href='?src=\ref[src];monkey=infected'>infected</a>|<a href='?src=\ref[src];monkey=human'>human</a>|other"
else
text += "healthy|infected|human|<b>OTHER</b>"
sections["monkey"] = text
/** SILICON ***/
@@ -496,6 +502,47 @@ datum/mind
if(!istype(objective)) return
objective.completed = !objective.completed
else if(href_list["implant"])
var/mob/living/carbon/human/H = current
switch(href_list["implant"])
if("remove")
for(var/obj/item/weapon/implant/loyalty/I in H.contents)
for(var/datum/organ/external/organs in H.organs)
if(I in organs.implants)
I.Del()
H << "\blue <Font size =3><B>Your loyalty implant has been deactivated.</B></FONT>"
if("add")
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
var/datum/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H << "\red <Font size =3><B>You somehow have become the recepient of a loyalty transplant, and it just activated!</B></FONT>"
if(src in ticker.mode.revolutionaries)
special_role = null
ticker.mode.revolutionaries -= src
src << "\red <Font size = 3><B>The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!</B></Font>"
if(src in ticker.mode.head_revolutionaries)
special_role = null
ticker.mode.head_revolutionaries -=src
src << "\red <Font size = 3><B>The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!</B></Font>"
if(src in ticker.mode.cult)
ticker.mode.cult -= src
ticker.mode.update_cult_icons_removed(src)
special_role = null
var/datum/game_mode/cult/cult = ticker.mode
if (istype(cult))
cult.memoize_cult_objectives(src)
current << "\red <FONT size = 3><B>The nanobots in the loyalty implant remove all thoughts about being in a cult. Have a productive day!</B></FONT>"
memory = ""
if(src in ticker.mode.traitors)
ticker.mode.traitors -= src
special_role = null
current << "\red <FONT size = 3><B>The nanobots in the loyalty implant remove all thoughts about being a traitor to Nanotrasen. Have a nice day!</B></FONT>"
log_admin("[key_name_admin(usr)] has de-traitor'ed [current].")
else if (href_list["revolution"])
switch(href_list["revolution"])
if("clear")
@@ -762,8 +809,8 @@ datum/mind
special_role = "traitor"
current << "<B>\red You are a traitor!</B>"
log_admin("[key_name_admin(usr)] has traitor'ed [current].")
if(isAI(current))
var/mob/living/silicon/ai/A = current
if(istype(current, /mob/living/silicon))
var/mob/living/silicon/A = current
call(/datum/game_mode/proc/add_law_zero)(A)
A.show_laws()
-69
View File
@@ -25,75 +25,6 @@
flags = TABLEPASS
w_class = 3.0
/obj/item/weapon/spacecash
name = "1 credit chip"
desc = "It's worth 1 credit."
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "spacecash"
opacity = 0
density = 0
anchored = 0.0
force = 1.0
throwforce = 1.0
throw_speed = 1
throw_range = 2
w_class = 1.0
var/access = list()
access = access_crate_cash
var/worth = 1
/obj/item/weapon/spacecash/c10
name = "10 credit chip"
icon_state = "spacecash10"
access = access_crate_cash
desc = "It's worth 10 credits."
worth = 10
/obj/item/weapon/spacecash/c20
name = "20 credit chip"
icon_state = "spacecash20"
access = access_crate_cash
desc = "It's worth 20 credits."
worth = 20
/obj/item/weapon/spacecash/c50
name = "50 credit chip"
icon_state = "spacecash50"
access = access_crate_cash
desc = "It's worth 50 credits."
worth = 50
/obj/item/weapon/spacecash/c100
name = "100 credit chip"
icon_state = "spacecash100"
access = access_crate_cash
desc = "It's worth 100 credits."
worth = 100
/obj/item/weapon/spacecash/c200
name = "200 credit chip"
icon_state = "spacecash200"
access = access_crate_cash
desc = "It's worth 200 credits."
worth = 200
/obj/item/weapon/spacecash/c500
name = "500 credit chip"
icon_state = "spacecash500"
access = access_crate_cash
desc = "It's worth 500 credits."
worth = 500
/obj/item/weapon/spacecash/c1000
name = "1000 credit chip"
icon_state = "spacecash1000"
access = access_crate_cash
desc = "It's worth 1000 credits."
worth = 1000
/obj/item/weapon/bananapeel
name = "banana peel"
desc = "A peel from a banana."
+1 -1
View File
@@ -131,7 +131,7 @@ proc/make_mining_asteroid_secret(var/size = 5)
valid = 0
continue
if(locate(/turf/simulated/floor/plating/airless/asteroid) in surroundings)
if(locate(/turf/unsimulated/floor/plating/airless/asteroid) in surroundings)
valid = 0
continue
@@ -481,6 +481,11 @@
src.mind.changeling.chem_charges -= 30
var/mob/living/carbon/human/C = src
if(ishuman(src))
var/mob/living/carbon/human/H=src
if(H.said_last_words)
H.said_last_words=0
spawn(0)
for(var/i = 0, i<10,i++)
if(C)
@@ -239,6 +239,8 @@ Movement impairing would indicate drugs and the like.*/
Life.dm will kick the player back into unconsciosness the next process loop.
*/
U.stat = 0//At least now you should be able to teleport away or shoot ninja stars.
if(U.said_last_words)
U.said_last_words=0
spawn(30)//Slight delay so the enemy does not immedietly know the ability was used. Due to lag, this often came before waking up.
U.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"))
spawn(70)
+1 -7
View File
@@ -118,13 +118,6 @@ var/global/datum/controller/gameticker/ticker
else
src.mode.announce()
//setup the money accounts
if(!centcomm_account_db)
for(var/obj/machinery/account_database/check_db in machines)
if(check_db.z == 2)
centcomm_account_db = check_db
break
create_characters() //Create player characters and transfer them
collect_minds()
equip_characters()
@@ -179,6 +172,7 @@ var/global/datum/controller/gameticker/ticker
//initialise our cinematic screen object
cinematic = new(src)
sleep(100)
cinematic.icon = 'icons/effects/station_explosion.dmi'
cinematic.icon_state = "station_intact"
cinematic.layer = 20
@@ -71,7 +71,6 @@
for(var/datum/mind/rev_mind in head_revolutionaries)
greet_revolutionary(rev_mind)
rev_mind.current.verbs += /mob/living/carbon/human/proc/RevConvert
equip_traitor(rev_mind.current, 1) //changing how revs get assigned their uplink so they can get PDA uplinks. --NEO
modePlayer += head_revolutionaries
spawn (rand(waittime_l, waittime_h))
+23 -25
View File
@@ -381,37 +381,35 @@ var/global/datum/controller/occupations/job_master
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
H.loc = S.loc
//give them an account in the station database
if(centcomm_account_db)
var/balance = round(rand(1,5))*100 // Between $100 and $500
var/datum/money_account/M = create_account(H.real_name, balance , null)
if(H.mind)
var/remembered_info = ""
remembered_info += "<b>Your account number is:</b> #[M.account_number]<br>"
remembered_info += "<b>Your account pin is:</b> [M.remote_access_pin]<br>"
remembered_info += "<b>Your account funds are:</b> $[M.money]<br>"
var/datum/money_account/M = create_account(H.real_name, rand(50,500)*10, null)
if(H.mind)
var/remembered_info = ""
if(M.transaction_log.len)
var/datum/transaction/T = M.transaction_log[1]
remembered_info += "<b>Your account was created:</b> [T.time], [T.date] at [T.source_terminal]<br>"
H.mind.store_memory(remembered_info)
remembered_info += "<b>Your account number is:</b> #[M.account_number]<br>"
remembered_info += "<b>Your account pin is:</b> [M.remote_access_pin]<br>"
remembered_info += "<b>Your account funds are:</b> $[M.money]<br>"
H.mind.initial_account = M
if(M.transaction_log.len)
var/datum/transaction/T = M.transaction_log[1]
remembered_info += "<b>Your account was created:</b> [T.time], [T.date] at [T.source_terminal]<br>"
H.mind.store_memory(remembered_info)
// If they're head, give them the account info for their department
if(H.mind && job.head_position)
var/remembered_info = ""
var/datum/money_account/department_account = department_accounts[job.department]
H.mind.initial_account = M
if(department_account)
remembered_info += "<b>Your department's account number is:</b> #[department_account.account_number]<br>"
remembered_info += "<b>Your department's account pin is:</b> [department_account.remote_access_pin]<br>"
remembered_info += "<b>Your department's account funds are:</b> $[department_account.money]<br>"
// If they're head, give them the account info for their department
if(H.mind && job.head_position)
var/remembered_info = ""
var/datum/money_account/department_account = department_accounts[job.department]
H.mind.store_memory(remembered_info)
if(department_account)
remembered_info += "<b>Your department's account number is:</b> #[department_account.account_number]<br>"
remembered_info += "<b>Your department's account pin is:</b> [department_account.remote_access_pin]<br>"
remembered_info += "<b>Your department's account funds are:</b> $[department_account.money]<br>"
spawn(0)
H << "\blue<b>Your account number is: [M.account_number], your account pin is: [M.remote_access_pin]</b>"
H.mind.store_memory(remembered_info)
spawn(0)
H << "\blue<b>Your account number is: [M.account_number], your account pin is: [M.remote_access_pin]</b>"
var/alt_title = null
if(H.mind)
+277 -257
View File
@@ -1,26 +1,26 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
var/global/list/autolathe_recipes = list( \
/* screwdriver removed*/ \
new /obj/item/weapon/reagent_containers/glass/bucket(), \
new /obj/item/stack/sheet/metal(), \
new /obj/item/stack/sheet/glass(), \
new /obj/item/stack/sheet/rglass(), \
new /obj/item/stack/rods(), \
new /obj/item/stack/sheet/fur(), \
new /obj/item/weapon/crowbar(), \
new /obj/item/device/flashlight(), \
new /obj/item/weapon/extinguisher(), \
new /obj/item/device/multitool(), \
new /obj/item/device/t_scanner(), \
new /obj/item/weapon/weldingtool(), \
new /obj/item/weapon/screwdriver(), \
new /obj/item/weapon/weldingtool(), \
new /obj/item/weapon/wirecutters(), \
new /obj/item/weapon/wrench(), \
new /obj/item/device/multitool(), \
new /obj/item/device/analyzer(), \
new /obj/item/device/t_scanner(), \
new /obj/item/device/flashlight(), \
new /obj/item/weapon/extinguisher(), \
new /obj/item/clothing/head/welding(), \
new /obj/item/weapon/stock_parts/console_screen(), \
new /obj/item/weapon/airlock_electronics(), \
new /obj/item/weapon/airalarm_electronics(), \
new /obj/item/weapon/firealarm_electronics(), \
new /obj/item/stack/sheet/metal(), \
new /obj/item/stack/sheet/glass(), \
new /obj/item/stack/sheet/rglass(), \
new /obj/item/stack/rods(), \
new /obj/item/weapon/rcd_ammo(), \
new /obj/item/weapon/kitchenknife(), \
new /obj/item/weapon/scalpel(), \
@@ -28,8 +28,10 @@ var/global/list/autolathe_recipes = list( \
new /obj/item/weapon/surgicaldrill(),\
new /obj/item/weapon/retractor(),\
new /obj/item/weapon/cautery(),\
new /obj/item/weapon/hemostat(),\
new /obj/item/weapon/reagent_containers/glass/beaker(), \
new /obj/item/weapon/reagent_containers/glass/beaker/large(), \
new /obj/item/weapon/reagent_containers/glass/bucket(), \
new /obj/item/weapon/storage/box/blanks(), \
new /obj/item/ammo_casing/shotgun/beanbag(), \
new /obj/item/ammo_box/c38(), \
@@ -39,12 +41,17 @@ var/global/list/autolathe_recipes = list( \
new /obj/item/device/radio/headset(), \
new /obj/item/device/radio/off(), \
new /obj/item/device/assembly/infra(), \
new /obj/item/device/assembly/prox_sensor(), \
new /obj/item/device/assembly/timer(), \
new /obj/item/device/assembly/voice(), \
new /obj/item/weapon/light/tube(), \
new /obj/item/weapon/light/bulb(), \
new /obj/item/ashtray/glass(), \
new /obj/item/weapon/camera_assembly(), \
new /obj/item/clothing/ears/earmuffs/tribblemuffs(), \
new /obj/item/clothing/gloves/furgloves(), \
new /obj/item/clothing/head/furcap(), \
new /obj/item/clothing/shoes/furboots(), \
new /obj/item/clothing/suit/furcoat(), \
new /obj/item/clothing/suit/furcape(), \
)
var/global/list/autolathe_recipes_hidden = list( \
@@ -60,7 +67,7 @@ var/global/list/autolathe_recipes_hidden = list( \
)
/obj/machinery/autolathe
name = "\improper Autolathe"
name = "autolathe"
desc = "It produces items using metal and glass."
icon_state = "autolathe"
density = 1
@@ -71,6 +78,9 @@ var/global/list/autolathe_recipes_hidden = list( \
var/g_amount = 0.0
var/max_g_amount = 75000.0
var/f_amount = 0.0
var/max_f_amount = 50000.0
var/operating = 0.0
var/opened = 0.0
anchored = 1.0
@@ -88,278 +98,288 @@ var/global/list/autolathe_recipes_hidden = list( \
active_power_usage = 100
var/busy = 0
proc
wires_win(mob/user as mob)
var/dat as text
dat += "Autolathe Wires:<BR>"
for(var/wire in src.wires)
dat += text("[wire] Wire: <A href='?src=\ref[src];wire=[wire];act=wire'>[src.wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>")
/obj/machinery/autolathe/proc/wires_win(mob/user as mob)
var/dat as text
dat += "Autolathe Wires:<BR>"
for(var/wire in src.wires)
dat += text("[wire] Wire: <A href='?src=\ref[src];wire=[wire];act=wire'>[src.wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>")
dat += text("The red light is [src.disabled ? "off" : "on"].<BR>")
dat += text("The green light is [src.shocked ? "off" : "on"].<BR>")
dat += text("The blue light is [src.hacked ? "off" : "on"].<BR>")
user << browse("<HTML><HEAD><TITLE>Autolathe Hacking</TITLE></HEAD><BODY>[dat]</BODY></HTML>","window=autolathe_hack")
onclose(user, "autolathe_hack")
dat += text("The red light is [src.disabled ? "off" : "on"].<BR>")
dat += text("The green light is [src.shocked ? "off" : "on"].<BR>")
dat += text("The blue light is [src.hacked ? "off" : "on"].<BR>")
user << browse("<HTML><HEAD><TITLE>Autolathe Hacking</TITLE></HEAD><BODY>[dat]</BODY></HTML>","window=autolathe_hack")
onclose(user, "autolathe_hack")
regular_win(mob/user as mob)
var/dat as text
dat = text("<B>Metal Amount:</B> [src.m_amount] cm<sup>3</sup> (MAX: [max_m_amount])<BR>\n<FONT color=blue><B>Glass Amount:</B></FONT> [src.g_amount] cm<sup>3</sup> (MAX: [max_g_amount])<HR>")
var/list/objs = list()
objs += src.L
if (src.hacked)
objs += src.LL
for(var/obj/t in objs)
var/title = "[t.name] ([t.m_amt] m /[t.g_amt] g)"
if (m_amount<t.m_amt || g_amount<t.g_amt)
dat += title + "<br>"
continue
dat += "<A href='?src=\ref[src];make=\ref[t]'>[title]</A>"
if (istype(t, /obj/item/stack))
var/obj/item/stack/S = t
var/max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY)
if (max_multiplier>1)
dat += " |"
if (max_multiplier>10)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[10]'>x[10]</A>"
if (max_multiplier>25)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[25]'>x[25]</A>"
if (max_multiplier>1)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[max_multiplier]'>x[max_multiplier]</A>"
dat += "<br>"
user << browse("<HTML><HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><BODY><TT>[dat]</TT></BODY></HTML>", "window=autolathe_regular")
onclose(user, "autolathe_regular")
/obj/machinery/autolathe/proc/regular_win(mob/user as mob)
var/dat as text
dat = text("<B>Metal Amount:</B> [src.m_amount] cm<sup>3</sup> (MAX: [max_m_amount])<BR>\n<FONT color=blue><B>Glass Amount:</B></FONT> [src.g_amount] cm<sup>3</sup> (MAX: [max_g_amount])<BR>\n<FONT color=orange><B>Fur Amount:</B></FONT> [src.f_amount] cm<sup>3</sup> (MAX: [max_f_amount])<HR>")
var/list/objs = list()
objs += src.L
if (src.hacked)
objs += src.LL
for(var/obj/t in objs)
var/title = "[t.name] ([t.m_amt] m /[t.g_amt] g/[t.f_amt] f)"
if (m_amount<t.m_amt || g_amount<t.g_amt || f_amount<t.f_amt)
dat += title + "<br>"
continue
dat += "<A href='?src=\ref[src];make=\ref[t]'>[title]</A>"
if (istype(t, /obj/item/stack))
var/obj/item/stack/S = t
var/max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY, S.f_amt?round(f_amount/S.f_amt):INFINITY)
if (max_multiplier>1)
dat += " |"
if (max_multiplier>10)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[10]'>x[10]</A>"
if (max_multiplier>25)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[25]'>x[25]</A>"
if (max_multiplier>1)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[max_multiplier]'>x[max_multiplier]</A>"
dat += "<br>"
user << browse("<HTML><HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><BODY><TT>[dat]</TT></BODY></HTML>", "window=autolathe_regular")
onclose(user, "autolathe_regular")
shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
return 0
if(!prob(prb))
return 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (electrocute_mob(user, get_area(src), src, 0.7))
return 1
else
return 0
/obj/machinery/autolathe/proc/shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
return 0
if(!prob(prb))
return 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (electrocute_mob(user, get_area(src), src, 0.7))
return 1
else
return 0
interact(mob/user as mob)
if(..())
return
if (src.shocked)
src.shock(user,50)
if (src.opened)
wires_win(user,50)
return
if (src.disabled)
user << "\red You press the button, but nothing happens."
return
regular_win(user)
/obj/machinery/autolathe/interact(mob/user as mob)
if(..())
return
if (src.shocked)
src.shock(user,50)
if (src.opened)
wires_win(user,50)
return
if (src.disabled)
user << "\red You press the button, but nothing happens."
return
regular_win(user)
return
attackby(var/obj/item/O as obj, var/mob/user as mob)
if (stat)
/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (stat)
return 1
if (busy)
user << "\red The autolathe is busy. Please wait for completion of previous operation."
return 1
if (istype(O, /obj/item/weapon/screwdriver))
if (!opened)
src.opened = 1
src.icon_state = "autolathe_t"
user << "You open the maintenance hatch of [src]."
else
src.opened = 0
src.icon_state = "autolathe"
user << "You close the maintenance hatch of [src]."
return 1
if (opened)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
if(m_amount >= 3750)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(m_amount / 3750)
if(g_amount >= 3750)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
G.amount = round(g_amount / 3750)
del(src)
return 1
if (busy)
user << "\red The autolathe is busy. Please wait for completion of previous operation."
return 1
if (istype(O, /obj/item/weapon/screwdriver))
if (!opened)
src.opened = 1
src.icon_state = "autolathe_t"
user << "You open the maintenance hatch of [src]."
else
src.opened = 0
src.icon_state = "autolathe"
user << "You close the maintenance hatch of [src]."
return 1
if (opened)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
if(m_amount >= 3750)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(m_amount / 3750)
if(g_amount >= 3750)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
G.amount = round(g_amount / 3750)
del(src)
return 1
else
user.set_machine(src)
interact(user)
return 1
if(isrobot(user))
user << "\red You're a robot. No."
return 1
if (src.m_amount + O.m_amt > max_m_amount)
user << "\red The autolathe is full. Please remove metal from the autolathe in order to insert more."
return 1
if (src.g_amount + O.g_amt > max_g_amount)
user << "\red The autolathe is full. Please remove glass from the autolathe in order to insert more."
return 1
if (O.m_amt == 0 && O.g_amt == 0)
user << "\red This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials."
else
user.set_machine(src)
interact(user)
return 1
if (src.m_amount + O.m_amt > max_m_amount)
user << "\red The autolathe is full. Please remove metal from the autolathe in order to insert more."
return 1
if (src.g_amount + O.g_amt > max_g_amount)
user << "\red The autolathe is full. Please remove glass from the autolathe in order to insert more."
return 1
if (src.f_amount + O.f_amt > max_f_amount)
user << "\red The autolathe is full. Please remove fur from the autolathe in order to insert more."
return 1
if (O.m_amt == 0 && O.g_amt == 0 && O.f_amt == 0)
user << "\red This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials."
return 1
/*
if (istype(O, /obj/item/weapon/grab) && src.hacked)
var/obj/item/weapon/grab/G = O
if (prob(25) && G.affecting)
G.affecting.gib()
m_amount += 50000
return
if (istype(O, /obj/item/weapon/grab) && src.hacked)
var/obj/item/weapon/grab/G = O
if (prob(25) && G.affecting)
G.affecting.gib()
m_amount += 50000
f_amount += 1000
return
*/
var/amount = 1
var/obj/item/stack/stack
var/m_amt = O.m_amt
var/g_amt = O.g_amt
if (istype(O, /obj/item/stack))
stack = O
amount = stack.amount
if (m_amt)
amount = min(amount, round((max_m_amount-src.m_amount)/m_amt))
flick("autolathe_o",src)//plays metal insertion animation
if (g_amt)
amount = min(amount, round((max_g_amount-src.g_amount)/g_amt))
flick("autolathe_r",src)//plays glass insertion animation
stack.use(amount)
else
usr.before_take_item(O)
O.loc = src
icon_state = "autolathe"
busy = 1
use_power(max(1000, (m_amt+g_amt)*amount/10))
src.m_amount += m_amt * amount
src.g_amount += g_amt * amount
user << "You insert [amount] sheet[amount>1 ? "s" : ""] to the autolathe."
if (O && O.loc == src)
del(O)
busy = 0
src.updateUsrDialog()
var/amount = 1
var/obj/item/stack/stack
var/m_amt = O.m_amt
var/g_amt = O.g_amt
var/f_amt = O.f_amt
if (istype(O, /obj/item/stack))
stack = O
amount = stack.amount
if (m_amt)
amount = min(amount, round((max_m_amount-src.m_amount)/m_amt))
flick("autolathe_o",src)//plays metal insertion animation
if (g_amt)
amount = min(amount, round((max_g_amount-src.g_amount)/g_amt))
flick("autolathe_r",src)//plays glass insertion animation
if (f_amt)
amount = min(amount, round((max_f_amount-src.f_amount)/f_amt))
flick("autolathe_f",src)//plays fur insertion animation
stack.use(amount)
else
usr.before_take_item(O)
O.loc = src
icon_state = "autolathe"
busy = 1
use_power(max(1000, (m_amt+g_amt)*amount/10))
src.m_amount += m_amt * amount
src.g_amount += g_amt * amount
src.f_amount += f_amt * amount
user << "You insert [amount] sheet[amount>1 ? "s" : ""] to the autolathe."
if (O && O.loc == src)
del(O)
busy = 0
src.updateUsrDialog()
attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/autolathe/attack_paw(mob/user as mob)
return src.attack_hand(user)
attack_hand(mob/user as mob)
user.set_machine(src)
interact(user)
/obj/machinery/autolathe/attack_hand(mob/user as mob)
user.set_machine(src)
interact(user)
Topic(href, href_list)
if(..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
if (!busy)
if(href_list["make"])
var/turf/T = get_step(src.loc, get_dir(src,usr))
var/obj/template = locate(href_list["make"])
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier) multiplier = 1
var/power = max(2000, (template.m_amt+template.g_amt)*multiplier/5)
if(src.m_amount >= template.m_amt*multiplier && src.g_amount >= template.g_amt*multiplier)
busy = 1
/obj/machinery/autolathe/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
if (!busy)
if(href_list["make"])
var/turf/T = get_step(src.loc, get_dir(src,usr))
var/obj/template = locate(href_list["make"])
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier) multiplier = 1
var/power = max(2000, (template.m_amt+template.g_amt+template.f_amt)*multiplier/5)
if(src.m_amount >= template.m_amt*multiplier && src.g_amount >= template.g_amt*multiplier && src.f_amount >= template.f_amt*multiplier)
busy = 1
use_power(power)
icon_state = "autolathe"
flick("autolathe_n",src)
spawn(16)
use_power(power)
icon_state = "autolathe"
flick("autolathe_n",src)
spawn(16)
use_power(power)
spawn(16)
use_power(power)
spawn(16)
src.m_amount -= template.m_amt*multiplier
src.g_amount -= template.g_amt*multiplier
if(src.m_amount < 0)
src.m_amount = 0
if(src.g_amount < 0)
src.g_amount = 0
var/obj/new_item = new template.type(T)
if (multiplier>1)
var/obj/item/stack/S = new_item
S.amount = multiplier
busy = 0
src.updateUsrDialog()
if(href_list["act"])
var/temp_wire = href_list["wire"]
if(href_list["act"] == "pulse")
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
usr << "You need a multitool!"
src.m_amount -= template.m_amt*multiplier
src.g_amount -= template.g_amt*multiplier
src.f_amount -= template.f_amt*multiplier
if(src.m_amount < 0)
src.m_amount = 0
if(src.g_amount < 0)
src.g_amount = 0
if(src.f_amount < 0)
src.f_amount = 0
var/obj/new_item = new template.type(T)
if (multiplier>1)
var/obj/item/stack/S = new_item
S.amount = multiplier
busy = 0
src.updateUsrDialog()
if(href_list["act"])
var/temp_wire = href_list["wire"]
if(href_list["act"] == "pulse")
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
usr << "You need a multitool!"
else
if(src.wires[temp_wire])
usr << "You can't pulse a cut wire."
else
if(src.wires[temp_wire])
usr << "You can't pulse a cut wire."
else
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
spawn(100) src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
spawn(100) src.disabled = !src.disabled
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
spawn(100) src.shocked = !src.shocked
if(href_list["act"] == "wire")
if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
usr << "You need wirecutters!"
else
wires[temp_wire] = !wires[temp_wire]
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
spawn(100) src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
spawn(100) src.disabled = !src.disabled
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
else
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
src.updateUsrDialog()
return
spawn(100) src.shocked = !src.shocked
if(href_list["act"] == "wire")
if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
usr << "You need wirecutters!"
else
wires[temp_wire] = !wires[temp_wire]
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
else
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
src.updateUsrDialog()
return
/obj/machinery/autolathe/RefreshParts()
..()
var/tot_rating = 0
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
tot_rating += MB.rating
tot_rating *= 25000
max_m_amount = tot_rating * 2
max_g_amount = tot_rating
max_f_amount = tot_rating
/obj/machinery/autolathe/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
..()
var/tot_rating = 0
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
tot_rating += MB.rating
tot_rating *= 25000
max_m_amount = tot_rating * 2
max_g_amount = tot_rating
New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
src.L = autolathe_recipes
src.LL = autolathe_recipes_hidden
src.wires["Light Red"] = 0
src.wires["Dark Red"] = 0
src.wires["Blue"] = 0
src.wires["Green"] = 0
src.wires["Yellow"] = 0
src.wires["Black"] = 0
src.wires["White"] = 0
src.wires["Gray"] = 0
src.wires["Orange"] = 0
src.wires["Pink"] = 0
var/list/w = list("Light Red","Dark Red","Blue","Green","Yellow","Black","White","Gray","Orange","Pink")
src.hack_wire = pick(w)
w -= src.hack_wire
src.shock_wire = pick(w)
w -= src.shock_wire
src.disable_wire = pick(w)
w -= src.disable_wire
src.L = autolathe_recipes
src.LL = autolathe_recipes_hidden
src.wires["Light Red"] = 0
src.wires["Dark Red"] = 0
src.wires["Blue"] = 0
src.wires["Green"] = 0
src.wires["Yellow"] = 0
src.wires["Black"] = 0
src.wires["White"] = 0
src.wires["Gray"] = 0
src.wires["Orange"] = 0
src.wires["Pink"] = 0
var/list/w = list("Light Red","Dark Red","Blue","Green","Yellow","Black","White","Gray","Orange","Pink")
src.hack_wire = pick(w)
w -= src.hack_wire
src.shock_wire = pick(w)
w -= src.shock_wire
src.disable_wire = pick(w)
w -= src.disable_wire
+3
View File
@@ -8,6 +8,7 @@
active_power_usage = 300
var/obj/item/weapon/circuitboard/circuit = null //if circuit==null, computer can't disassembly
var/processing = 0
luminosity = 2
/obj/machinery/computer/New()
..()
@@ -20,7 +21,9 @@
/obj/machinery/computer/process()
if(stat & (NOPOWER|BROKEN))
luminosity = 0
return 0
luminosity = 2
return 1
/obj/machinery/computer/meteorhit(var/obj/O as obj)
+1
View File
@@ -10,6 +10,7 @@
use_power = 2
idle_power_usage = 20
active_power_usage = 80
luminosity = 2
//fix for issue 521, by QualityVan.
//someone should really look into why circuits have a powernet var, it's several kinds of retarded.
+48 -2
View File
@@ -60,6 +60,7 @@
normalspeed = 1
var/obj/item/weapon/airlock_electronics/electronics = null
var/hasShocked = 0 //Prevents multiple shocks from happening
var/frozen = 0 //special condition for airlocks that are frozen shut, this will look weird on not normal airlocks because of a lack of special overlays.
/obj/machinery/door/airlock/command
name = "Airlock"
@@ -120,6 +121,14 @@
opacity = 1
assembly_type = /obj/structure/door_assembly/door_assembly_hatch
/obj/machinery/door/airlock/hatch/delta
name = "Delta Level Hatch"
icon = 'icons/obj/doors/Doorhatchele.dmi'
opacity = 1
hackProof = 1
aiControlDisabled = 1
assembly_type = /obj/structure/door_assembly/door_assembly_hatch
/obj/machinery/door/airlock/maintenance_hatch
name = "Maintenance Hatch"
icon = 'icons/obj/doors/Doorhatchmaint2.dmi'
@@ -423,12 +432,15 @@ About the new airlock wires panel:
icon_state = "door_locked"
else
icon_state = "door_closed"
if(p_open || welded)
if(p_open || welded || frozen)
overlays = list()
if(p_open)
overlays += image(icon, "panel_open")
if(welded)
overlays += image(icon, "welded")
if(frozen)
overlays += image(icon, "frozen")
else
icon_state = "door_open"
@@ -551,7 +563,11 @@ About the new airlock wires panel:
if(src.welded)
t1 += text("Door appears to have been welded shut.<br>\n")
if(frozen)
t1 += text("Door appears to have been frozen shut.<br>\n")
else
t1 += text("Door appears to have been welded shut.<br>\n")
else if(!src.locked)
if(src.density)
t1 += text("<A href='?src=\ref[];aiEnable=7'>Open door</a><br>\n", src)
@@ -875,6 +891,8 @@ About the new airlock wires panel:
if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density))
var/obj/item/weapon/weldingtool/W = C
if(W.remove_fuel(0,user))
if(frozen)
frozen = 0
if(!src.welded)
src.welded = 1
else
@@ -1042,6 +1060,9 @@ About the new airlock wires panel:
if(A.closeOtherId == src.closeOtherId && A != src)
src.closeOther = A
break
if(frozen)
welded = 1
update_icon()
/obj/machinery/door/airlock/proc/prison_open()
@@ -1049,3 +1070,28 @@ About the new airlock wires panel:
src.open()
src.locked = 1
return
/obj/machinery/door/airlock/hatch/delta/attackby(C as obj, mob/user as mob)
//world << text("airlock attackby src [] obj [] mob []", src, C, user)
if(!istype(usr, /mob/living/silicon))
if(src.isElectrified())
if(src.shock(user, 75))
return
if(istype(C, /obj/item/device/detective_scanner) || istype(C, /obj/item/taperoll))
return
src.add_fingerprint(user)
if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density))
var/obj/item/weapon/weldingtool/W = C
if(W.remove_fuel(0,user))
if(frozen)
frozen = 0
if(!src.welded)
src.welded = 1
else
src.welded = null
src.update_icon()
return
else
return
+13 -1
View File
@@ -121,6 +121,14 @@
if(istype(O, /obj/item/device/lightreplacer))
var/obj/item/device/lightreplacer/LR = O
LR.Charge(R)
//Alien
if(istype(O,/obj/item/weapon/reagent_containers/spray/alien/smoke))
if(O.reagents.get_reagent_amount("water") < 50)
O.reagents.add_reagent("water", 2)
if(istype(O,/obj/item/weapon/reagent_containers/spray/alien/stun))
if(O.reagents.get_reagent_amount("stoxin") < 250)
O.reagents.add_reagent("stoxin", 2)
if(R)
if(R.module)
@@ -132,8 +140,12 @@
var/obj/item/weapon/reagent_containers/spray/S = R.module.emag
if(S.name == "polyacid spray")
S.reagents.add_reagent("pacid", 2)
else if(S.name == "lube spray")
if(S.name == "lube spray")
S.reagents.add_reagent("lube", 2)
else if(S.name == "acid synthesizer")
S.reagents.add_reagent("pacid", 2)
S.reagents.add_reagent("sacid", 2)
verb
+11 -26
View File
@@ -53,8 +53,7 @@
var/datum/wires/vending/wires = null
var/scan_id = 1
var/obj/machinery/account_database/linked_db
var/datum/money_account/linked_account
/obj/machinery/vending/New()
..()
@@ -73,18 +72,13 @@
src.build_inventory(premium, 0, 1)
power_change()
reconnect_database()
linked_account = vendor_account
return
return
/obj/machinery/vending/proc/reconnect_database()
for(var/obj/machinery/account_database/DB in world)
if(DB.z == 1) //Hardcoded to the main station for now.
linked_db = DB
break
/obj/machinery/vending/ex_act(severity)
switch(severity)
@@ -167,17 +161,8 @@
del(W)
else if(istype(W, /obj/item/weapon/card) && currently_vending)
//attempt to connect to a new db, and if that doesn't work then fail
if(!linked_db)
reconnect_database()
if(linked_db)
if(linked_account)
var/obj/item/weapon/card/I = W
scan_card(I)
else
usr << "\icon[src]<span class='warning'>Unable to connect to linked account.</span>"
else
usr << "\icon[src]<span class='warning'>Unable to connect to accounts database.</span>"
var/obj/item/weapon/card/I = W
scan_card(I)
@@ -189,19 +174,19 @@
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
if(linked_account)
var/datum/money_account/D = linked_db.attempt_account_access_nosec(C.associated_account_number)
if(vendor_account)
var/datum/money_account/D = attempt_account_access_nosec(C.associated_account_number)
if(D)
var/transaction_amount = currently_vending.price
if(transaction_amount <= D.money)
//transfer the money
D.money -= transaction_amount
linked_account.money += transaction_amount
vendor_account.money += transaction_amount
//create entries in the two account transaction logs
var/datum/transaction/T = new()
T.target_name = "[linked_account.owner_name] (via [src.name])"
T.target_name = "[vendor_account.owner_name] (via [src.name])"
T.purpose = "Purchase of [currently_vending.product_name]"
if(transaction_amount > 0)
T.amount = "([transaction_amount])"
@@ -219,7 +204,7 @@
T.source_terminal = src.name
T.date = current_date_string
T.time = worldtime2text()
linked_account.transaction_log.Add(T)
vendor_account.transaction_log.Add(T)
// Vend the item
src.vend(src.currently_vending, usr)
@@ -229,7 +214,7 @@
else
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
else
usr << "\icon[src]<span class='warning'>EFTPOS is not connected to an account.</span>"
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
/obj/machinery/vending/attack_paw(mob/user as mob)
return attack_hand(user)
+8 -8
View File
@@ -91,8 +91,8 @@
if(T == chassis.loc && src == chassis.selected)
if(istype(target, /turf/simulated/wall/r_wall))
occupant_message("<font color='red'>[target] is too durable to drill through.</font>")
else if(istype(target, /turf/simulated/mineral))
for(var/turf/simulated/mineral/M in range(chassis,1))
else if(istype(target, /turf/unsimulated/mineral))
for(var/turf/unsimulated/mineral/M in range(chassis,1))
if(get_dir(chassis,M)&chassis.dir)
M.gets_drilled()
log_message("Drilled through [target]")
@@ -102,8 +102,8 @@
for(var/obj/item/weapon/ore/ore in range(chassis,1))
if(get_dir(chassis,ore)&chassis.dir)
ore.Move(ore_box)
else if(istype(target, /turf/simulated/floor/plating/airless/asteroid))
for(var/turf/simulated/floor/plating/airless/asteroid/M in range(chassis,1))
else if(istype(target, /turf/unsimulated/floor/plating/airless/asteroid))
for(var/turf/unsimulated/floor/plating/airless/asteroid/M in range(chassis,1))
if(get_dir(chassis,M)&chassis.dir)
M.gets_dug()
log_message("Drilled through [target]")
@@ -150,8 +150,8 @@
if(do_after_cooldown(target))//To slow down how fast mechs can drill through the station
log_message("Drilled through [target]")
target.ex_act(3)
else if(istype(target, /turf/simulated/mineral))
for(var/turf/simulated/mineral/M in range(chassis,1))
else if(istype(target, /turf/unsimulated/mineral))
for(var/turf/unsimulated/mineral/M in range(chassis,1))
if(get_dir(chassis,M)&chassis.dir)
M.gets_drilled()
log_message("Drilled through [target]")
@@ -161,8 +161,8 @@
for(var/obj/item/weapon/ore/ore in range(chassis,1))
if(get_dir(chassis,ore)&chassis.dir)
ore.Move(ore_box)
else if(istype(target,/turf/simulated/floor/plating/airless/asteroid))
for(var/turf/simulated/floor/plating/airless/asteroid/M in range(target,1))
else if(istype(target,/turf/unsimulated/floor/plating/airless/asteroid))
for(var/turf/unsimulated/floor/plating/airless/asteroid/M in range(target,1))
M.gets_dug()
log_message("Drilled through [target]")
if(locate(/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp) in chassis.equipment)
+2 -1
View File
@@ -890,7 +890,8 @@ steam.start() -- spawns the effect
var/mob/M = AM
if (istype(M, /mob/living/carbon/human) && (istype(M:shoes, /obj/item/clothing/shoes) && M:shoes.flags&NOSLIP))
return
if (istype (M, /mob/living/carbon/human) && M:species.bodyflags & FEET_NOSLIP)
return
M.stop_pulling()
M << "\blue You slipped on the foam!"
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
+1 -1
View File
@@ -67,7 +67,7 @@
if(prob(spreadIntoAdjacentChance))
spreadsIntoAdjacent = 1
for(var/turf/simulated/floor/plating/airless/asteroid/earth in view(3,src))
for(var/turf/unsimulated/floor/plating/airless/asteroid/earth in view(3,src))
if(spreadsIntoAdjacent || !locate(/obj/effect/glowshroom) in view(1,earth))
possibleLocs += earth
+9 -1
View File
@@ -91,9 +91,15 @@ proc/explosion_rec(turf/epicenter, power)
/turf/simulated/floor
explosion_resistance = 1
/turf/unsimulated/floor
explosion_resistance = 1
/turf/simulated/mineral
explosion_resistance = 2
/turf/unsimulated/mineral
explosion_resistance = 2
/turf/simulated/shuttle/floor
explosion_resistance = 1
@@ -148,5 +154,7 @@ proc/explosion_rec(turf/epicenter, power)
T.explosion_spread(spread_power)
*/
/*
/turf/unsimulated/explosion_spread(power)
return //So it doesn't get to the parent proc, which simulates explosions
return //So it doesn't get to the parent proc, which simulates explosions
*/
@@ -37,7 +37,7 @@
/obj/item/stack/tile/plasteel/proc/build(turf/S as turf)
if (istype(S,/turf/space))
S.ChangeTurf(/turf/simulated/floor/plating/airless)
S.ChangeTurf(/turf/unsimulated/floor/plating/airless)
else
S.ChangeTurf(/turf/simulated/floor/plating)
// var/turf/simulated/floor/W = S.ReplaceWithFloor()
@@ -0,0 +1,70 @@
//This file contains xenoborg specic weapons.
/obj/item/weapon/melee/energy/alien/claws
color
name = "energy claws"
desc = "Zap zap Wap Wap."
icon = 'icons/mob/alien.dmi'
icon_state = "borg-laser-claws"
force = 15.0
throwforce = 5.0
throw_speed = 1
throw_range = 5
w_class = 2.0
flags = FPRINT | TABLEPASS | NOSHIELD
attack_verb = list("attacked", "slashed", "gored", "sliced", "torn", "ripped", "butchered", "cut")
//Bottles for borg liquid squirters. PSSH PSSH
/obj/item/weapon/reagent_containers/spray/alien
name = "liquid synthesizer"
desc = "squirts alien liquids."
icon = 'icons/mob/alien.dmi'
icon_state = "borg-default"
/obj/item/weapon/reagent_containers/spray/alien/smoke
name = "smoke synthesizer"
desc = "squirts smokey liquids."
icon = 'icons/mob/alien.dmi'
icon_state = "borg-spray-smoke"
/obj/item/weapon/reagent_containers/spray/alien/smoke/afterattack(atom/A as mob|obj, mob/user as mob)
if(istype(A, /obj/structure/reagent_dispensers) && get_dist(src,A) <= 1)
if(!A.reagents.total_volume && A.reagents)
user << "<span class='notice'>\The [A] is empty.</span>"
return
if(reagents.total_volume >= reagents.maximum_volume)
user << "<span class='notice'>\The [src] is full.</span>"
return
reagents.remove_reagent(25,"water")
var/datum/effect/effect/system/bad_smoke_spread/smoke = new /datum/effect/effect/system/bad_smoke_spread()
smoke.set_up(5, 0, user.loc)
smoke.start()
playsound(user.loc, 'sound/effects/bamf.ogg', 50, 2)
/obj/item/weapon/reagent_containers/spray/alien/acid
name = "acid synthesizer"
desc = "squirts burny liquids."
icon = 'icons/mob/alien.dmi'
icon_state = "borg-spray-acid"
/obj/item/weapon/reagent_containers/spray/alien/stun
name = "paralytic toxin synthesizer"
desc = "squirts viagra."
icon = 'icons/mob/alien.dmi'
icon_state = "borg-spray-stun"
//SKREEEEEEEEEEEE tool
/obj/item/device/flash/alien
name = "eye flash"
desc = "Useful for taking pictures, making friends and flash-frying chips."
icon = 'icons/mob/alien.dmi'
icon_state = "borg-flash"
//heat vision
/obj/item/borg/sight/thermal/alien
name = "thermal module"
icon = 'icons/mob/alien.dmi'
icon_state = "borg-extra-vision"
@@ -13,6 +13,8 @@
var/mob/M = AM
if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP))
return
if(istype(M, /mob/living/carbon/human) && M:species.bodyflags & FEET_NOSLIP)
return
M.stop_pulling()
M << "\blue You slipped on the [name]!"
@@ -83,5 +83,77 @@
"<span class='notice'>You wipe off [H]'s lipstick.</span>")
H.lip_style = null
H.update_body()
else
..()
/obj/item/weapon/razor
name = "electric razor"
desc = "The latest and greatest power razor born from the science of shaving."
icon = 'icons/obj/items.dmi'
icon_state = "razor"
flags = FPRINT | TABLEPASS| CONDUCT
w_class = 1.0
/obj/item/weapon/razor/attack(mob/living/carbon/M as mob, mob/user as mob)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(user.zone_sel.selecting == "mouth")
if(!get_location_accessible(H, "mouth"))
user << "<span class='warning'>The mask is in the way.</span>"
return
if(H.f_style == "Shaved")
user << "<span class='notice'>Already clean-shaven.</span>"
return
if(H == user) //shaving yourself
user.visible_message("<span class='notice'>[user] starts to shave their facial hair with \the [src].</span>", \
"<span class='notice'>You take a moment shave your facial hair with \the [src].</span>")
if(do_after(user, 50))
user.visible_message("<span class='notice'>[user] shaves his facial hair clean with the [src].</span>", \
"<span class='notice'>You finish shaving with the [src]. Fast and clean!</span>")
H.f_style = "Shaved"
H.update_hair()
playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1)
else
var/turf/user_loc = user.loc
var/turf/H_loc = H.loc
user.visible_message("<span class='danger'>[user] tries to shave [H]'s facial hair with \the [src].</span>", \
"<span class='warning'>You start shaving [H]'s facial hair.</span>")
if(do_after(user, 50))
if(user_loc == user.loc && H_loc == H.loc)
user.visible_message("<span class='danger'>[user] shaves off [H]'s facial hair with \the [src].</span>", \
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
H.f_style = "Shaved"
H.update_hair()
playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1)
if(user.zone_sel.selecting == "head")
if(!get_location_accessible(H, "head"))
user << "<span class='warning'>The headgear is in the way.</span>"
return
if(H.h_style == "Bald" || H.h_style == "Balding Hair" || H.h_style == "Skinhead")
user << "<span class='notice'>There is not enough hair left to shave...</span>"
return
if(H == user) //shaving yourself
user.visible_message("<span class='warning'>[user] starts to shave their head with \the [src].</span>", \
"<span class='warning'>You start to shave your head with \the [src].</span>")
if(do_after(user, 50))
user.visible_message("<span class='notice'>[user] shaves his head with the [src].</span>", \
"<span class='notice'>You finish shaving with the [src].</span>")
H.h_style = "Skinhead"
H.update_hair()
playsound(src.loc, 'sound/items/Welder2.ogg', 40, 1)
else
var/turf/user_loc = user.loc
var/turf/H_loc = H.loc
user.visible_message("<span class='danger'>[user] tries to shave [H]'s head with \the [src]!</span>", \
"<span class='warning'>You start shaving [H]'s head.</span>")
if(do_after(user, 50))
if(user_loc == user.loc && H_loc == H.loc)
user.visible_message("<span class='danger'>[user] shaves [H]'s head bald with \the [src]!</span>", \
"<span class='warning'>You shave [H]'s head bald.</span>")
H.h_style = "Skinhead"
H.update_hair()
playsound(src.loc, 'sound/items/Welder2.ogg', 40, 1)
else
..()
else
..()
@@ -69,7 +69,7 @@
var/mob/living/M = AM
if(ishuman(M))
if(isobj(M:shoes))
if(M:shoes.flags&NOSLIP)
if((M:shoes.flags&NOSLIP) || (M:species.bodyflags & FEET_NOSLIP))
return
else
M << "\red Your feet feel like they're on fire!"
@@ -254,4 +254,21 @@
/obj/item/weapon/storage/bag/sheetsnatcher/borg
name = "Sheet Snatcher 9000"
desc = ""
capacity = 500//Borgs get more because >specialization
capacity = 500//Borgs get more because >specialization
// -----------------------------
// Cash Bag
// -----------------------------
/obj/item/weapon/storage/bag/cash
icon = 'icons/obj/storage.dmi'
icon_state = "cashbag"
name = "Cash bag"
desc = "A bag for carrying lots of cash. It's got a big dollar sign printed on the front."
storage_slots = 50; //the number of cash pieces it can carry.
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * cash.w_class
max_w_class = 3
w_class = 1
can_hold = list("/obj/item/weapon/coin","/obj/item/weapon/spacecash")
+1 -1
View File
@@ -321,7 +321,7 @@ proc/trigger_armed_response_team(var/force = 0)
W.name = "[real_name]'s ID Card ([W.assignment])"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.access += list(access_cent_general, access_cent_living, access_cent_storage)
equip_to_slot_or_del(W, slot_wear_id)
return 1
+2 -2
View File
@@ -103,7 +103,7 @@
else
M.inertia_dir = 0
return
else if(!istype(M, /mob/living/carbon/slime))
else if(!istype(M, /mob/living/carbon/slime) || (M:species.bodyflags & FEET_NOSLIP))
if (M.m_intent == "run")
M.stop_pulling()
step(M, M.dir)
@@ -140,7 +140,7 @@
else
M.inertia_dir = 0
return
else if(!istype(M, /mob/living/carbon/metroid))
else if(!istype(M, /mob/living/carbon/metroid) || (M:species.bodyflags & FEET_NOSLIP))
if (M.m_intent == "run" && prob(30))
M.stop_pulling()
step(M, M.dir)
+1 -1
View File
@@ -276,7 +276,7 @@ turf/simulated/floor/proc/update_icon()
/turf/simulated/floor/proc/burn_tile()
if(istype(src,/turf/simulated/floor/engine)) return
if(istype(src,/turf/simulated/floor/plating/airless/asteroid)) return//Asteroid tiles don't burn
if(istype(src,/turf/unsimulated/floor/plating/airless/asteroid)) return//Asteroid tiles don't burn
if(broken || burnt) return
if(is_plasteel_floor())
src.icon_state = "damaged[pick(1,2,3,4,5)]"
+13 -1
View File
@@ -8,6 +8,7 @@
name = "snow"
icon = 'icons/turf/snow.dmi'
icon_state = "snow"
temperature = T0C
/turf/unsimulated/floor/plating/snow/concrete
name = "concrete"
@@ -16,4 +17,15 @@
/turf/unsimulated/floor/plating/snow/ex_act(severity)
return
return
/turf/unsimulated/floor/plating/airless
icon_state = "plating"
name = "airless plating"
oxygen = 0
nitrogen = 0
temperature = TCMB
New()
..()
name = "plating"
+2
View File
@@ -130,6 +130,8 @@ var/list/xeno_spawn = list()//Aliens spawn at these.
// list/mazewarp = list()
var/list/tdome1 = list()
var/list/tdome2 = list()
var/list/team_alpha = list()
var/list/team_bravo = list()
var/list/tdomeobserve = list()
var/list/tdomeadmin = list()
var/list/prisonsecuritywarp = list() //prison security goes to these
+12
View File
@@ -25,6 +25,11 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
if(BANTYPE_JOB_TEMP)
bantype_str = "JOB_TEMPBAN"
bantype_pass = 1
if(BANTYPE_APPEARANCE)
bantype_str = "APPEARANCE_BAN"
duration = -1
bantype_pass = 1
if( !bantype_pass ) return
if( !istext(reason) ) return
if( !isnum(duration) ) return
@@ -104,6 +109,9 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
if(BANTYPE_JOB_TEMP)
bantype_str = "JOB_TEMPBAN"
bantype_pass = 1
if(BANTYPE_APPEARANCE)
bantype_str = "APPEARANCE_BAN"
bantype_pass = 1
if(BANTYPE_ANY_FULLBAN)
bantype_str = "ANY"
bantype_pass = 1
@@ -289,6 +297,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
output += "<option value='[BANTYPE_TEMP]'>TEMPBAN</option>"
output += "<option value='[BANTYPE_JOB_PERMA]'>JOB PERMABAN</option>"
output += "<option value='[BANTYPE_JOB_TEMP]'>JOB TEMPBAN</option>"
output += "<option value='[BANTYPE_APPEARANCE]'>APPEARANCE BAN</option>"
output += "</select></td>"
output += "<td><b>Ckey:</b> <input type='text' name='dbbanaddckey'></td></tr>"
output += "<tr><td><b>Duration:</b> <input type='text' name='dbbaddduration'></td>"
@@ -403,6 +412,9 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
typedesc = "<b>JOBBAN</b><br><font size='2'>([job])"
if("JOB_TEMPBAN")
typedesc = "<b>TEMP JOBBAN</b><br><font size='2'>([job])<br>([duration] minutes<br>Expires [expiration]"
if("APPEARANCE_BAN")
typedesc = "<b>APPEARANCE/NAME BAN</b>"
output += "<tr bgcolor='[dcolor]'>"
output += "<td align='center'>[typedesc]</td>"
+1 -107
View File
@@ -60,6 +60,7 @@ var/global/floorIsLava = 0
<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> |
<A href='?src=\ref[src];newban=\ref[M]'>Ban</A> |
<A href='?src=\ref[src];jobban2=\ref[M]'>Jobban</A> |
<A href='?src=\ref[src];appearanceban=\ref[M]'>Appearance Ban</A> |
<A href='?src=\ref[src];notes=show;mob=\ref[M]'>Notes</A>
"}
@@ -551,113 +552,6 @@ var/global/floorIsLava = 0
usr << browse(dat, "window=admin2;size=210x280")
return
/datum/admins/proc/Secrets()
if(!check_rights(0)) return
var/dat = "<B>The first rule of adminbuse is: you don't talk about the adminbuse.</B><HR>"
if(check_rights(R_ADMIN,0))
dat += {"
<B>Admin Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secretsadmin=clear_bombs'>Remove all bombs currently in existence</A><BR>
<A href='?src=\ref[src];secretsadmin=list_bombers'>Bombing List</A><BR>
<A href='?src=\ref[src];secretsadmin=check_antagonist'>Show current traitors and objectives</A><BR>
<A href='?src=\ref[src];secretsadmin=list_signalers'>Show last [length(lastsignalers)] signalers</A><BR>
<A href='?src=\ref[src];secretsadmin=list_lawchanges'>Show last [length(lawchanges)] law changes</A><BR>
<A href='?src=\ref[src];secretsadmin=showailaws'>Show AI Laws</A><BR>
<A href='?src=\ref[src];secretsadmin=showgm'>Show Game Mode</A><BR>
<A href='?src=\ref[src];secretsadmin=manifest'>Show Crew Manifest</A><BR>
<A href='?src=\ref[src];secretsadmin=DNA'>List DNA (Blood)</A><BR>
<A href='?src=\ref[src];secretsadmin=fingerprints'>List Fingerprints</A><BR><BR>
<BR>
"}
if(check_rights(R_FUN,0))
dat += {"
<B>'Random' Events</B><BR>
<BR>
<A href='?src=\ref[src];secretsfun=gravity'>Toggle station artificial gravity</A><BR>
<A href='?src=\ref[src];secretsfun=wave'>Spawn a wave of meteors (aka lagocolyptic shower)</A><BR>
<A href='?src=\ref[src];secretsfun=blackhole'>Spawn a vortex anomaly</A><BR>
<A href='?src=\ref[src];secretsfun=gravanomalies'>Spawn a gravitational anomaly</A><BR>
<A href='?src=\ref[src];secretsfun=pyroanomalies'>Spawn a pyroclastic anomaly</A><BR>
<A href='?src=\ref[src];secretsfun=energeticflux'>Spawn a flux wave anomaly</A><BR>
<A href='?src=\ref[src];secretsfun=bluespaceanomaly'>Spawn a bluespace anomaly</A><BR>
<A href='?src=\ref[src];secretsfun=vent_clog'>Make scrubbers spew chemicals</A><BR>
<A href='?src=\ref[src];secretsfun=timeanomalies'>Spawn wormholes</A><BR>
<A href='?src=\ref[src];secretsfun=goblob'>Spawn blob</A><BR>
<A href='?src=\ref[src];secretsfun=aliens'>Trigger an Alien infestation</A><BR>
<A href='?src=\ref[src];secretsfun=alien_silent'>Spawn an Alien silently</A><BR>
<A href='?src=\ref[src];secretsfun=spiders'>Trigger a Spider infestation</A><BR>
<A href='?src=\ref[src];secretsfun=spaceninja'>Send in a space ninja</A><BR>
<A href='?src=\ref[src];secretsfun=striketeam'>Send in a strike team</A><BR>
<A href='?src=\ref[src];secretsfun=honksquad'>Send in a HONKsquad</A><BR>
<A href='?src=\ref[src];secretsfun=carp'>Trigger an Carp migration</A><BR>
<A href='?src=\ref[src];secretsfun=radiation'>Irradiate the station</A><BR>
<A href='?src=\ref[src];secretsfun=prison_break'>Trigger a Prison Break</A><BR>
<A href='?src=\ref[src];secretsfun=virus'>Trigger a Virus Outbreak</A><BR>
<A href='?src=\ref[src];secretsfun=immovable'>Spawn an Immovable Rod</A><BR>
<A href='?src=\ref[src];secretsfun=lightsout'>Toggle a "lights out" event</A><BR>
<A href='?src=\ref[src];secretsfun=ionstorm'>Spawn an Ion Storm</A><BR>
<A href='?src=\ref[src];secretsfun=spacevines'>Spawn Space-Vines</A><BR>
<A href='?src=\ref[src];secretsfun=comms_blackout'>Trigger a communication blackout</A><BR>
<BR>
<B>Fun Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secretsfun=sec_clothes'>Remove 'internal' clothing</A><BR>
<A href='?src=\ref[src];secretsfun=sec_all_clothes'>Remove ALL clothing</A><BR>
<A href='?src=\ref[src];secretsfun=monkey'>Turn all humans into monkeys</A><BR>
<A href='?src=\ref[src];secretsfun=sec_classic1'>Remove firesuits, grilles, and pods</A><BR>
<A href='?src=\ref[src];secretsfun=power'>Make all areas powered</A><BR>
<A href='?src=\ref[src];secretsfun=unpower'>Make all areas unpowered</A><BR>
<A href='?src=\ref[src];secretsfun=quickpower'>Power all SMES</A><BR>
<A href='?src=\ref[src];secretsfun=toggleprisonstatus'>Toggle Prison Shuttle Status(Use with S/R)</A><BR>
<A href='?src=\ref[src];secretsfun=activateprison'>Send Prison Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=deactivateprison'>Return Prison Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=prisonwarp'>Warp all Players to Prison</A><BR>
<A href='?src=\ref[src];secretsfun=tripleAI'>Triple AI mode (needs to be used in the lobby)</A><BR>
<A href='?src=\ref[src];secretsfun=traitor_all'>Everyone is the traitor</A><BR>
<A href='?src=\ref[src];secretsfun=onlyone'>There can only be one!</A><BR>
<A href='?src=\ref[src];secretsfun=flicklights'>Ghost Mode</A><BR>
<A href='?src=\ref[src];secretsfun=retardify'>Make all players retarded</A><BR>
<A href='?src=\ref[src];secretsfun=fakeguns'>Make all items look like guns</A><BR>
<A href='?src=\ref[src];secretsfun=schoolgirl'>Japanese Animes Mode</A><BR>
<A href='?src=\ref[src];secretsfun=eagles'>Egalitarian Station Mode</A><BR>
<A href='?src=\ref[src];secretsfun=moveadminshuttle'>Move Administration Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=moveferry'>Move Ferry</A><BR>
<A href='?src=\ref[src];secretsfun=movealienship'>Move Alien Dinghy</A><BR>
<A href='?src=\ref[src];secretsfun=moveminingshuttle'>Move Mining Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR>
<A href='?src=\ref[src];secretsfun=whiteout'>Fix all lights</A><BR>
<A href='?src=\ref[src];secretsfun=floorlava'>The floor is lava! (DANGEROUS: extremely lame)</A><BR>
"}
if(check_rights(R_SERVER,0))
dat += "<A href='?src=\ref[src];secretsfun=togglebombcap'>Toggle bomb cap</A><BR>"
dat += "<BR>"
if(check_rights(R_DEBUG,0))
dat += {"
<B>Security Level Elevated</B><BR>
<BR>
<A href='?src=\ref[src];secretscoder=maint_access_engiebrig'>Change all maintenance doors to engie/brig access only</A><BR>
<A href='?src=\ref[src];secretscoder=maint_access_brig'>Change all maintenance doors to brig access only</A><BR>
<A href='?src=\ref[src];secretscoder=infinite_sec'>Remove cap on security officers</A><BR>
<BR>
<B>Coder Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secretsadmin=list_job_debug'>Show Job Debug</A><BR>
<A href='?src=\ref[src];secretscoder=spawn_objects'>Admin Log</A><BR>
<BR>
"}
usr << browse(dat, "window=secrets")
return
/////////////////////////////////////////////////////////////////////////////////////////////////admins2.dm merge
//i.e. buttons/verbs
+1 -1
View File
@@ -71,7 +71,7 @@ var/list/admin_verbs_admin = list(
var/list/admin_verbs_ban = list(
/client/proc/unban_panel,
/client/proc/jobbans,
/client/proc/unjobban_panel,
// /client/proc/unjobban_panel,
// /client/proc/DB_ban_panel
)
var/list/admin_verbs_sounds = list(
+109
View File
@@ -0,0 +1,109 @@
//ban people from using custom names and appearances. that'll show 'em.
var/appearanceban_runonce //Updates legacy bans with new info
var/appearance_keylist[0] //to store the keys
/proc/appearance_fullban(mob/M, reason)
if (!M || !M.key) return
appearance_keylist.Add(text("[M.ckey] ## [reason]"))
appearance_savebanfile()
/proc/appearance_client_fullban(ckey)
if (!ckey) return
appearance_keylist.Add(text("[ckey]"))
appearance_savebanfile()
//returns a reason if M is banned, returns 0 otherwise
/proc/appearance_isbanned(mob/M)
if(M)
for(var/s in appearance_keylist)
if(findtext(s, "[M.ckey]") == 1)
var/startpos = findtext(s, "## ") + 3
if(startpos && startpos < length(s))
var/text = copytext(s, startpos, 0)
if(text)
return text
return "Reason Unspecified"
return 0
/*
DEBUG
/mob/verb/list_all_appearances()
set name = "list all appearances"
for(var/s in appearance_keylist)
world << s
/mob/verb/reload_appearances()
set name = "reload appearances"
appearance_loadbanfile()
*/
/proc/appearance_loadbanfile()
if(config.ban_legacy_system)
var/savefile/S=new("data/appearance_full.ban")
S["keys[0]"] >> appearance_keylist
log_admin("Loading appearance_rank")
S["runonce"] >> appearanceban_runonce
if (!length(appearance_keylist))
appearance_keylist=list()
log_admin("appearance_keylist was empty")
else
if(!establish_db_connection())
world.log << "Database connection failed. Reverting to the legacy ban system."
diary << "Database connection failed. Reverting to the legacy ban system."
config.ban_legacy_system = 1
appearance_loadbanfile()
return
//appearance bans
var/DBQuery/query = dbcon.NewQuery("SELECT ckey FROM erro_ban WHERE bantype = 'APPEARANCE_BAN' AND NOT unbanned = 1")
query.Execute()
while(query.NextRow())
var/ckey = query.item[1]
appearance_keylist.Add("[ckey]")
/proc/appearance_savebanfile()
var/savefile/S=new("data/appearance_full.ban")
S["keys[0]"] << appearance_keylist
/proc/appearance_unban(mob/M)
appearance_remove("[M.ckey]")
appearance_savebanfile()
/proc/appearance_updatelegacybans()
if(!appearanceban_runonce)
log_admin("Updating appearancefile!")
// Updates bans.. Or fixes them. Either way.
for(var/T in appearance_keylist)
if(!T) continue
appearanceban_runonce++ //don't run this update again
/proc/appearance_remove(X)
for (var/i = 1; i <= length(appearance_keylist); i++)
if( findtext(appearance_keylist[i], "[X]") )
appearance_keylist.Remove(appearance_keylist[i])
appearance_savebanfile()
return 1
return 0
/*
proc/DB_ban_isappearancebanned(var/playerckey)
establish_db_connection()
if(!dbcon.IsConnected())
return
var/sqlplayerckey = sql_sanitize_text(ckey(playerckey))
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_ban WHERE CKEY = '[sqlplayerckey]' AND ((bantype = 'APPEARANCE_BAN') OR (bantype = 'APPEARANCE_TEMPBAN' AND expiration_time > Now())) AND unbanned != 1")
query.Execute()
while(query.NextRow())
return 1
return 0
*/
+122
View File
@@ -0,0 +1,122 @@
/datum/admins
var/current_tab =0
/datum/admins/proc/Secrets()
if(!check_rights(0)) return
var/dat = "<html><body><center>"
dat += "<a href='?src=\ref[src];secretsmenu=tab;tab=0' [current_tab == 0 ? "class='linkOn'" : ""]>Debug</a>"
dat += "<a href='?src=\ref[src];secretsmenu=tab;tab=1' [current_tab == 1 ? "class='linkOn'" : ""]>Random Events</a>"
dat += "<a href='?src=\ref[src];secretsmenu=tab;tab=2' [current_tab == 2 ? "class='linkOn'" : ""]>Special Events</a>"
dat += "</center>"
dat += "<HR>"
switch(current_tab)
if (0) // Debug
if(check_rights(R_ADMIN,0))
dat += {"
<B>Admin Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secretsadmin=clear_bombs'>Remove all bombs currently in existence</A><BR>
<A href='?src=\ref[src];secretsadmin=list_bombers'>Bombing List</A><BR>
<A href='?src=\ref[src];secretsadmin=check_antagonist'>Show current traitors and objectives</A><BR>
<A href='?src=\ref[src];secretsadmin=list_signalers'>Show last [length(lastsignalers)] signalers</A><BR>
<A href='?src=\ref[src];secretsadmin=list_lawchanges'>Show last [length(lawchanges)] law changes</A><BR>
<A href='?src=\ref[src];secretsadmin=showailaws'>Show AI Laws</A><BR>
<A href='?src=\ref[src];secretsadmin=showgm'>Show Game Mode</A><BR>
<A href='?src=\ref[src];secretsadmin=manifest'>Show Crew Manifest</A><BR>
<A href='?src=\ref[src];secretsadmin=DNA'>List DNA (Blood)</A><BR>
<A href='?src=\ref[src];secretsadmin=fingerprints'>List Fingerprints</A><BR><BR>
<A href='?src=\ref[src];secretsfun=moveadminshuttle'>Move Administration Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=moveferry'>Move Ferry</A><BR>
<A href='?src=\ref[src];secretsfun=movealienship'>Move Alien Dinghy</A><BR>
<A href='?src=\ref[src];secretsfun=moveminingshuttle'>Move Mining Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR>
<A href='?src=\ref[src];secretsfun=whiteout'>Fix all lights</A><BR>
<A href='?src=\ref[src];secretsfun=floorlava'>The floor is lava! (DANGEROUS: extremely lame)</A><BR>
<A href='?src=\ref[src];secretsfun=power'>Make all areas powered</A><BR>
<A href='?src=\ref[src];secretsfun=unpower'>Make all areas unpowered</A><BR>
<A href='?src=\ref[src];secretsfun=quickpower'>Power all SMES</A><BR>
<A href='?src=\ref[src];secretsfun=toggleprisonstatus'>Toggle Prison Shuttle Status(Use with S/R)</A><BR>
<A href='?src=\ref[src];secretsfun=activateprison'>Send Prison Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=deactivateprison'>Return Prison Shuttle</A><BR>
<BR>
"}
if(check_rights(R_SERVER,0))
dat += "<A href='?src=\ref[src];secretsfun=togglebombcap'>Toggle bomb cap</A><BR>"
dat += "<BR>"
if(check_rights(R_DEBUG,0))
dat += {"
<B>Security Level Elevated</B><BR>
<BR>
<A href='?src=\ref[src];secretscoder=maint_access_engiebrig'>Change all maintenance doors to engie/brig access only</A><BR>
<A href='?src=\ref[src];secretscoder=maint_access_brig'>Change all maintenance doors to brig access only</A><BR>
<A href='?src=\ref[src];secretscoder=infinite_sec'>Remove cap on security officers</A><BR>
<BR>
<B>Coder Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secretsadmin=list_job_debug'>Show Job Debug</A><BR>
<A href='?src=\ref[src];secretscoder=spawn_objects'>Admin Log</A><BR>
<BR>
"}
if (1)
if(check_rights(R_FUN,0))
dat += {"
<B>'Random' Events</B><BR>
<BR>
<A href='?src=\ref[src];secretsfun=gravity'>Toggle station artificial gravity</A><BR>
<A href='?src=\ref[src];secretsfun=wave'>Spawn a wave of meteors (aka lagocolyptic shower)</A><BR>
<A href='?src=\ref[src];secretsfun=blackhole'>Spawn a vortex anomaly</A><BR>
<A href='?src=\ref[src];secretsfun=gravanomalies'>Spawn a gravitational anomaly</A><BR>
<A href='?src=\ref[src];secretsfun=pyroanomalies'>Spawn a pyroclastic anomaly</A><BR>
<A href='?src=\ref[src];secretsfun=energeticflux'>Spawn a flux wave anomaly</A><BR>
<A href='?src=\ref[src];secretsfun=bluespaceanomaly'>Spawn a bluespace anomaly</A><BR>
<A href='?src=\ref[src];secretsfun=vent_clog'>Make scrubbers spew chemicals</A><BR>
<A href='?src=\ref[src];secretsfun=timeanomalies'>Spawn wormholes</A><BR>
<A href='?src=\ref[src];secretsfun=goblob'>Spawn blob</A><BR>
<A href='?src=\ref[src];secretsfun=aliens'>Trigger an Alien infestation</A><BR>
<A href='?src=\ref[src];secretsfun=alien_silent'>Spawn an Alien silently</A><BR>
<A href='?src=\ref[src];secretsfun=spiders'>Trigger a Spider infestation</A><BR>
<A href='?src=\ref[src];secretsfun=spaceninja'>Send in a space ninja</A><BR>
<A href='?src=\ref[src];secretsfun=striketeam'>Send in a strike team</A><BR>
<A href='?src=\ref[src];secretsfun=honksquad'>Send in a HONKsquad</A><BR>
<A href='?src=\ref[src];secretsfun=carp'>Trigger an Carp migration</A><BR>
<A href='?src=\ref[src];secretsfun=radiation'>Irradiate the station</A><BR>
<A href='?src=\ref[src];secretsfun=prison_break'>Trigger a Prison Break</A><BR>
<A href='?src=\ref[src];secretsfun=virus'>Trigger a Virus Outbreak</A><BR>
<A href='?src=\ref[src];secretsfun=immovable'>Spawn an Immovable Rod</A><BR>
<A href='?src=\ref[src];secretsfun=lightsout'>Toggle a "lights out" event</A><BR>
<A href='?src=\ref[src];secretsfun=ionstorm'>Spawn an Ion Storm</A><BR>
<A href='?src=\ref[src];secretsfun=spacevines'>Spawn Space-Vines</A><BR>
<A href='?src=\ref[src];secretsfun=comms_blackout'>Trigger a communication blackout</A><BR>
<BR>"}
if (2)
if(check_rights(R_FUN,0))
dat += {"
<B>Fun Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secretsfun=sec_clothes'>Remove 'internal' clothing</A><BR>
<A href='?src=\ref[src];secretsfun=sec_all_clothes'>Remove ALL clothing</A><BR>
<A href='?src=\ref[src];secretsfun=monkey'>Turn all humans into monkeys</A><BR>
<A href='?src=\ref[src];secretsfun=sec_classic1'>Remove firesuits, grilles, and pods</A><BR>
<A href='?src=\ref[src];secretsfun=prisonwarp'>Warp all Players to Prison</A><BR>
<A href='?src=\ref[src];secretsfun=tripleAI'>Triple AI mode (needs to be used in the lobby)</A><BR>
<A href='?src=\ref[src];secretsfun=traitor_all'>Everyone is the traitor</A><BR>
<A href='?src=\ref[src];secretsfun=onlyone'>There can only be one!</A><BR>
<A href='?src=\ref[src];secretsfun=flicklights'>Ghost Mode</A><BR>
<A href='?src=\ref[src];secretsfun=retardify'>Make all players retarded</A><BR>
<A href='?src=\ref[src];secretsfun=fakeguns'>Make all items look like guns</A><BR>
<A href='?src=\ref[src];secretsfun=schoolgirl'>Japanese Animes Mode</A><BR>
<A href='?src=\ref[src];secretsfun=eagles'>Egalitarian Station Mode</A><BR>
"}
dat += "</center></body></html>"
var/datum/browser/popup = new(usr, "secrets", "<div align='center'>Admin Secrets</div>", 610, 650)
popup.set_content(dat)
popup.open(0)
+56
View File
@@ -364,6 +364,55 @@
/////////////////////////////////////new ban stuff
else if(href_list["appearanceban"])
if(!check_rights(R_BAN))
return
var/mob/M = locate(href_list["appearanceban"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
return
if(!M.ckey) //sanity
usr << "This mob has no ckey"
return
var/banreason = appearance_isbanned(M)
if(banreason)
/* if(!config.ban_legacy_system)
usr << "Unfortunately, database based unbanning cannot be done through this panel"
DB_ban_panel(M.ckey)
return */
switch(alert("Reason: '[banreason]' Remove appearance ban?","Please Confirm","Yes","No"))
if("Yes")
ban_unban_log_save("[key_name(usr)] removed [key_name(M)]'s appearance ban")
log_admin("[key_name(usr)] removed [key_name(M)]'s appearance ban")
feedback_inc("ban_appearance_unban", 1)
DB_ban_unban(M.ckey, BANTYPE_APPEARANCE)
appearance_unban(M)
message_admins("\blue [key_name_admin(usr)] removed [key_name_admin(M)]'s appearance ban", 1)
M << "\red<BIG><B>[usr.client.ckey] has removed your appearance ban.</B></BIG>"
else switch(alert("Appearance ban [M.ckey]?",,"Yes","No", "Cancel"))
if("Yes")
var/reason = input(usr,"Reason?","reason","Metafriender") as text|null
if(!reason)
return
ban_unban_log_save("[key_name(usr)] appearance banned [key_name(M)]. reason: [reason]")
log_admin("[key_name(usr)] appearance banned [key_name(M)]. \nReason: [reason]")
feedback_inc("ban_appearance",1)
DB_ban_record(BANTYPE_APPEARANCE, M, -1, reason)
appearance_fullban(M, "[reason]; By [usr.ckey] on [time2text(world.realtime)]")
notes_add(M.ckey, "Appearance banned - [reason]")
message_admins("\blue [key_name_admin(usr)] appearance banned [key_name_admin(M)]", 1)
M << "\red<BIG><B>You have been appearance banned by [usr.client.ckey].</B></BIG>"
M << "\red <B>The reason is: [reason]</B>"
M << "\red Appearance ban can be lifted only upon request."
if(config.banappeals)
M << "\red To try to resolve this matter head to [config.banappeals]"
else
M << "\red No ban appeals URL has been set."
if("No")
return
else if(href_list["jobban2"])
// if(!check_rights(R_BAN)) return
@@ -2563,3 +2612,10 @@
if("list")
PlayerNotesPage(text2num(href_list["index"]))
return
if(href_list["secretsmenu"])
switch(href_list["secretsmenu"])
if("tab")
current_tab = text2num(href_list["tab"])
Secrets(usr)
return 1
+17 -1
View File
@@ -48,4 +48,20 @@
message_admins("\blue [key_name_admin(usr)] used THERE CAN BE ONLY ONE!", 1)
log_admin("[key_name(usr)] used there can be only one.")
world << sound('sound/music/highlander.ogg')
world << sound('sound/music/highlander.ogg')
/obj/item/weapon/beach_ball/dodgeball
name = "dodgeball"
icon_state = "dodgeball"
item_state = "dodgeball"
desc = "Used for playing the most violent and degrading of childhood games."
/obj/item/weapon/beach_ball/holoball/dodgeball/throw_impact(atom/hit_atom)
if((ishuman(hit_atom)))
var/mob/living/carbon/M = hit_atom
playsound(src, 'sound/items/dodgeball.ogg', 50, 1)
M.apply_damage(10, HALLOSS)
if(prob(5))
M.Weaken(3)
visible_message("\red [M] HAS BEEN ELIMINATED!!", 3)
+87
View File
@@ -0,0 +1,87 @@
/client/proc/only_one_team()
if(!ticker)
alert("The game hasn't started yet!")
return
for(var/mob/living/carbon/human/H in player_list)
if(H.stat == 2 || !(H.client)) continue
if(is_special_character(H)) continue
// ticker.mode.traitors += H.mind
for (var/obj/item/I in H)
if (istype(I, /obj/item/weapon/implant))
continue
del(I)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_l_ear)
// H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/weapon/beach_ball/dodgeball(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
if(prob(50))
team_alpha += H
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/red(H), slot_w_uniform)
var/obj/item/weapon/card/id/W = new(H)
W.name = "[H.real_name]'s ID Card"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "Highlander"
W.registered_name = H.real_name
H.equip_to_slot_or_del(W, slot_wear_id)
else
team_bravo += H
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/blue(H), slot_w_uniform)
var/obj/item/weapon/card/id/W = new(H)
W.name = "[H.real_name]'s ID Card"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "Professional Pee-Wee League Dodgeball Player"
W.registered_name = H.real_name
H.equip_to_slot_or_del(W, slot_wear_id)
message_admins("\blue [key_name_admin(usr)] used DODGEBAWWWWWWWL!", 1)
log_admin("[key_name(usr)] used dodgeball.")
/obj/item/weapon/beach_ball/dodgeball
name = "dodgeball"
icon = 'icons/obj/basketball.dmi'
icon_state = "dodgeball"
item_state = "dodgeball"
desc = "Used for playing the most violent and degrading of childhood games."
/obj/item/weapon/beach_ball/dodgeball/throw_impact(atom/hit_atom)
if((ishuman(hit_atom)))
var/mob/living/carbon/M = hit_atom
if(dir&get_dir(src,M))
if(M.in_throw_mode && !M.get_active_hand()) //empty active hand and we're in throw mode
if(M.canmove && !M.restrained())
M.hitby(src)
else
playsound(src, 'sound/items/dodgeball.ogg', 50, 1)
visible_message("\red [M] HAS BEEN ELIMINATED!!", 3)
spawn(0)
var/mobloc = get_turf(M.loc)
var/atom/movable/overlay/animation = new /atom/movable/overlay( mobloc )
animation.name = "water"
animation.density = 0
animation.anchored = 1
animation.icon = 'icons/mob/mob.dmi'
animation.icon_state = "liquify"
animation.layer = 5
// animation.master = holder
del(M)
+10 -3
View File
@@ -48,12 +48,13 @@
proc/holder_movement() //Called when the holder is moved
return
proc/describe() // Called by grenades to describe the state of the trigger (time left, etc)
return "The trigger assembly looks broken!"
interact(mob/user as mob) //Called when attack_self is called
return
proc/describe() // Called by grenades to describe the state of the trigger (time left, etc)
return "The trigger assembly looks broken!"
process_cooldown()
cooldown--
if(cooldown <= 0) return 0
@@ -79,6 +80,12 @@
// connected.Pulse(src)
// if(radio && (wires & WIRE_RADIO_PULSE))
//Not sure what goes here quite yet send signal?
if(istype(loc,/obj/item/weapon/grenade)) // This is a hack. Todo: Manage this better -Sayu
var/obj/item/weapon/grenade/G = loc
G.prime() // Adios, muchachos
return 1
+4
View File
@@ -17,6 +17,8 @@
return "[src] is deactivated."
hear_talk(mob/living/M as mob, msg)
if(!istype(M,/mob/living))
return
if(listening)
recorded = msg
listening = 0
@@ -25,6 +27,8 @@
else
if(findtext(msg, recorded))
pulse(0)
var/turf/T = get_turf(src) //otherwise it won't work in hand
T.visible_message("\icon[src] \red beeps!")
activate()
return // previously this toggled listning when not in a holder, that's a little silly. It was only called in attack_self that way.
+2
View File
@@ -151,6 +151,8 @@ datum/preferences
dat += "<a href='?_src_=prefs;preference=job;task=menu'>Set Occupation Preferences</a><br></center>"
dat += "<h2>Identity</h2>"
dat += "<table width='100%'><tr><td width='75%' valign='top'>"
if(appearance_isbanned(user))
dat += "<b>You are banned from using custom names and appearances. You can continue to adjust your characters, but you will be randomised once you join the game.</b><br>"
dat += "<b>Name:</b> "
dat += "<a href='?_src_=prefs;preference=name;task=input'><b>[real_name]</b></a><br>"
dat += "(<a href='?_src_=prefs;preference=name;task=random'>Random Name</A>) "
+47 -1
View File
@@ -213,4 +213,50 @@
examine()
set src in view()
..()
..()
//Species-specific Syndicate rigs.
/obj/item/clothing/head/helmet/space/rig/syndi/tajara
icon_state = "rig0-syndie-taj"
item_state = "syndie_helm"
_color = "syndie-taj"
species_restricted = list("Tajaran")
/obj/item/clothing/suit/space/rig/syndi/tajara
item_state = "syndie_hardsuit"
icon_state = "rig-syndie-taj"
species_restricted = list("Tajaran")
/obj/item/clothing/head/helmet/space/rig/syndi/unathi
icon_state = "rig0-syndie-unathi"
item_state = "syndie_helm"
_color = "syndie-unathi"
species_restricted = list("Unathi")
/obj/item/clothing/suit/space/rig/syndi/unathi
item_state = "syndie_hardsuit"
icon_state = "rig-syndie-unathi"
species_restricted = list("Unathi")
/obj/item/clothing/head/helmet/space/rig/syndi/skrell
icon_state = "rig0-syndie-skrell"
item_state = "syndie_helm"
_color = "syndie-skrell"
species_restricted = list("Skrell")
/obj/item/clothing/suit/space/rig/syndi/skrell
item_state = "syndie_hardsuit"
icon_state = "rig-syndie-skrell"
species_restricted = list("Skrell")
/obj/item/clothing/head/helmet/space/rig/syndi/human
icon_state = "rig0-syndie-human"
item_state = "syndie_helm"
_color = "syndie-human"
species_restricted = list("Human")
/obj/item/clothing/suit/space/rig/syndi/human
item_state = "syndie_hardsuit"
icon_state = "rig-syndie-human"
species_restricted = list("Human")
@@ -22,7 +22,6 @@ log transactions
anchored = 1
use_power = 1
idle_power_usage = 10
var/obj/machinery/account_database/linked_db
var/datum/money_account/authenticated_account
var/number_incorrect_tries = 0
var/previous_account_number = 0
@@ -33,25 +32,19 @@ log transactions
var/obj/item/weapon/card/held_card
var/editing_security_level = 0
var/view_screen = NO_SCREEN
var/datum/effect/effect/system/spark_spread/spark_system
/obj/machinery/atm/New()
..()
machine_id = "[station_name()] RT #[num_financial_terminals++]"
/obj/machinery/atm/initialize()
..()
reconnect_database()
spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
/obj/machinery/atm/process()
if(stat & NOPOWER)
return
if(linked_db && ( (linked_db.stat & NOPOWER) || !linked_db.activated ) )
linked_db = null
authenticated_account = null
src.visible_message("\red \icon[src] [src] buzzes rudely, \"Connection to remote database lost.\"")
updateDialog()
if(ticks_left_timeout > 0)
ticks_left_timeout--
if(ticks_left_timeout <= 0)
@@ -69,14 +62,25 @@ log transactions
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
break
/obj/machinery/atm/proc/reconnect_database()
for(var/obj/machinery/account_database/DB in world) //Hotfix until someone finds out why it isn't in 'machines'
if( DB.z == src.z && !(DB.stat & NOPOWER) && DB.activated )
linked_db = DB
break
/obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/card))
if(emagged > 0)
//prevent inserting id into an emagged ATM
user << "\red \icon[src] CARD READER ERROR. This system has been compromised!"
return
else if(istype(I,/obj/item/weapon/card/emag))
//short out the machine, shoot sparks, spew money!
emagged = 1
spark_system.start()
spawn_money(rand(100,500),src.loc)
//we don't want to grief people by locking their id in an emagged ATM
release_held_id(user)
//display a message to the user
var/response = pick("Initiating withdraw. Have a nice day!", "CRITICAL ERROR: Activating cash chamber panic siphon.","PIN Code accepted! Emptying account balance.", "Jackpot!")
user << "\red \icon[src] The [src] beeps: \"[response]\""
return
var/obj/item/weapon/card/id/idcard = I
if(!held_card)
usr.drop_item()
@@ -111,94 +115,96 @@ log transactions
/obj/machinery/atm/attack_hand(mob/user as mob)
if(istype(user, /mob/living/silicon))
user << "\red Artificial unit recognized. Artificial units do not currently receive monetary compensation, as per NanoTrasen regulation #1005."
user << "\red \icon[src] Artificial unit recognized. Artificial units do not currently receive monetary compensation, as per NanoTrasen regulation #1005."
return
if(get_dist(src,user) <= 1)
//check to see if the user has low security enabled
scan_user(user)
//js replicated from obj/machinery/computer/card
var/dat = "<h1>NanoTrasen Automatic Teller Machine</h1>"
dat += "For all your monetary needs!<br>"
dat += "<i>This terminal is</i> [machine_id]. <i>Report this code when contacting NanoTrasen IT Support</i><br/>"
dat += "Card: <a href='?src=\ref[src];choice=insert_card'>[held_card ? held_card.name : "------"]</a><br><br>"
if(ticks_left_locked_down > 0)
dat += "<span class='alert'>Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled.</span>"
else if(authenticated_account)
switch(view_screen)
if(CHANGE_SECURITY_LEVEL)
dat += "Select a new security level for this account:<br><hr>"
var/text = "Zero - Either the account number or card is required to access this account. EFTPOS transactions will require a card and ask for a pin, but not verify the pin is correct."
if(authenticated_account.security_level != 0)
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=0'>[text]</a>"
dat += "[text]<hr>"
text = "One - An account number and pin must be manually entered to access this account and process transactions."
if(authenticated_account.security_level != 1)
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=1'>[text]</a>"
dat += "[text]<hr>"
text = "Two - In addition to account number and pin, a card is required to access this account and process transactions."
if(authenticated_account.security_level != 2)
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=2'>[text]</a>"
dat += "[text]<hr><br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=0'>Back</a>"
if(VIEW_TRANSACTION_LOGS)
dat += "<b>Transaction logs</b><br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=0'>Back</a>"
dat += "<table border=1 style='width:100%'>"
dat += "<tr>"
dat += "<td><b>Date</b></td>"
dat += "<td><b>Time</b></td>"
dat += "<td><b>Target</b></td>"
dat += "<td><b>Purpose</b></td>"
dat += "<td><b>Value</b></td>"
dat += "<td><b>Source terminal ID</b></td>"
dat += "</tr>"
for(var/datum/transaction/T in authenticated_account.transaction_log)
dat += "<tr>"
dat += "<td>[T.date]</td>"
dat += "<td>[T.time]</td>"
dat += "<td>[T.target_name]</td>"
dat += "<td>[T.purpose]</td>"
dat += "<td>$[T.amount]</td>"
dat += "<td>[T.source_terminal]</td>"
dat += "</tr>"
dat += "</table>"
if(TRANSFER_FUNDS)
dat += "<b>Account balance:</b> $[authenticated_account.money]<br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=0'>Back</a><br><br>"
dat += "<form name='transfer' action='?src=\ref[src]' method='get'>"
dat += "<input type='hidden' name='src' value='\ref[src]'>"
dat += "<input type='hidden' name='choice' value='transfer'>"
dat += "Target account number: <input type='text' name='target_acc_number' value='' style='width:200px; background-color:white;'><br>"
dat += "Funds to transfer: <input type='text' name='funds_amount' value='' style='width:200px; background-color:white;'><br>"
dat += "Transaction purpose: <input type='text' name='purpose' value='Funds transfer' style='width:200px; background-color:white;'><br>"
dat += "<input type='submit' value='Transfer funds'><br>"
dat += "</form>"
else
dat += "Welcome, <b>[authenticated_account.owner_name].</b><br/>"
dat += "<b>Account balance:</b> $[authenticated_account.money]"
dat += "<form name='withdrawal' action='?src=\ref[src]' method='get'>"
dat += "<input type='hidden' name='src' value='\ref[src]'>"
dat += "<input type='hidden' name='choice' value='withdrawal'>"
dat += "<input type='text' name='funds_amount' value='' style='width:200px; background-color:white;'><input type='submit' value='Withdraw funds'><br>"
dat += "</form>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=1'>Change account security level</a><br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=2'>Make transfer</a><br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=3'>View transaction log</a><br>"
dat += "<A href='?src=\ref[src];choice=balance_statement'>Print balance statement</a><br>"
dat += "<A href='?src=\ref[src];choice=logout'>Logout</a><br>"
else if(linked_db)
dat += "<form name='atm_auth' action='?src=\ref[src]' method='get'>"
dat += "<input type='hidden' name='src' value='\ref[src]'>"
dat += "<input type='hidden' name='choice' value='attempt_auth'>"
dat += "<b>Account:</b> <input type='text' id='account_num' name='account_num' style='width:250px; background-color:white;'><br>"
dat += "<b>PIN:</b> <input type='text' id='account_pin' name='account_pin' style='width:250px; background-color:white;'><br>"
dat += "<input type='submit' value='Submit'><br>"
dat += "</form>"
if(emagged > 0)
dat += "Card: <span style='color: red;'>LOCKED</span><br><br><span style='color: red;'>Unauthorized terminal access detected! This ATM has been locked. Please contact NanoTrasen IT Support.</span>"
else
dat += "<span class='warning'>Unable to connect to accounts database, please retry and if the issue persists contact NanoTrasen IT support.</span>"
reconnect_database()
dat += "Card: <a href='?src=\ref[src];choice=insert_card'>[held_card ? held_card.name : "------"]</a><br><br>"
if(ticks_left_locked_down > 0)
dat += "<span class='alert'>Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled.</span>"
else if(authenticated_account)
if(authenticated_account.suspended)
dat += "\red<b>Access to this account has been suspended, and the funds within frozen.</b>"
else
switch(view_screen)
if(CHANGE_SECURITY_LEVEL)
dat += "Select a new security level for this account:<br><hr>"
var/text = "Zero - Either the account number or card is required to access this account. EFTPOS transactions will require a card and ask for a pin, but not verify the pin is correct."
if(authenticated_account.security_level != 0)
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=0'>[text]</a>"
dat += "[text]<hr>"
text = "One - An account number and pin must be manually entered to access this account and process transactions."
if(authenticated_account.security_level != 1)
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=1'>[text]</a>"
dat += "[text]<hr>"
text = "Two - In addition to account number and pin, a card is required to access this account and process transactions."
if(authenticated_account.security_level != 2)
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=2'>[text]</a>"
dat += "[text]<hr><br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=0'>Back</a>"
if(VIEW_TRANSACTION_LOGS)
dat += "<b>Transaction logs</b><br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=0'>Back</a>"
dat += "<table border=1 style='width:100%'>"
dat += "<tr>"
dat += "<td><b>Date</b></td>"
dat += "<td><b>Time</b></td>"
dat += "<td><b>Target</b></td>"
dat += "<td><b>Purpose</b></td>"
dat += "<td><b>Value</b></td>"
dat += "<td><b>Source terminal ID</b></td>"
dat += "</tr>"
for(var/datum/transaction/T in authenticated_account.transaction_log)
dat += "<tr>"
dat += "<td>[T.date]</td>"
dat += "<td>[T.time]</td>"
dat += "<td>[T.target_name]</td>"
dat += "<td>[T.purpose]</td>"
dat += "<td>$[T.amount]</td>"
dat += "<td>[T.source_terminal]</td>"
dat += "</tr>"
dat += "</table>"
if(TRANSFER_FUNDS)
dat += "<b>Account balance:</b> $[authenticated_account.money]<br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=0'>Back</a><br><br>"
dat += "<form name='transfer' action='?src=\ref[src]' method='get'>"
dat += "<input type='hidden' name='src' value='\ref[src]'>"
dat += "<input type='hidden' name='choice' value='transfer'>"
dat += "Target account number: <input type='text' name='target_acc_number' value='' style='width:200px; background-color:white;'><br>"
dat += "Funds to transfer: <input type='text' name='funds_amount' value='' style='width:200px; background-color:white;'><br>"
dat += "Transaction purpose: <input type='text' name='purpose' value='Funds transfer' style='width:200px; background-color:white;'><br>"
dat += "<input type='submit' value='Transfer funds'><br>"
dat += "</form>"
else
dat += "Welcome, <b>[authenticated_account.owner_name].</b><br/>"
dat += "<b>Account balance:</b> $[authenticated_account.money]"
dat += "<form name='withdrawal' action='?src=\ref[src]' method='get'>"
dat += "<input type='hidden' name='src' value='\ref[src]'>"
dat += "<input type='hidden' name='choice' value='withdrawal'>"
dat += "<input type='text' name='funds_amount' value='' style='width:200px; background-color:white;'><input type='submit' value='Withdraw funds'><br>"
dat += "</form>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=1'>Change account security level</a><br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=2'>Make transfer</a><br>"
dat += "<A href='?src=\ref[src];choice=view_screen;view_screen=3'>View transaction log</a><br>"
dat += "<A href='?src=\ref[src];choice=balance_statement'>Print balance statement</a><br>"
dat += "<A href='?src=\ref[src];choice=logout'>Logout</a><br>"
else
dat += "<form name='atm_auth' action='?src=\ref[src]' method='get'>"
dat += "<input type='hidden' name='src' value='\ref[src]'>"
dat += "<input type='hidden' name='choice' value='attempt_auth'>"
dat += "<b>Account:</b> <input type='text' id='account_num' name='account_num' style='width:250px; background-color:white;'><br>"
dat += "<b>PIN:</b> <input type='text' id='account_pin' name='account_pin' style='width:250px; background-color:white;'><br>"
dat += "<input type='submit' value='Submit'><br>"
dat += "</form>"
user << browse(dat,"window=atm;size=550x650")
else
@@ -208,14 +214,14 @@ log transactions
if(href_list["choice"])
switch(href_list["choice"])
if("transfer")
if(authenticated_account && linked_db)
if(authenticated_account)
var/transfer_amount = text2num(href_list["funds_amount"])
if(transfer_amount <= 0)
alert("That is not a valid amount.")
else if(transfer_amount <= authenticated_account.money)
var/target_account_number = text2num(href_list["target_acc_number"])
var/transfer_purpose = href_list["purpose"]
if(linked_db.charge_to_account(target_account_number, authenticated_account.owner_name, transfer_purpose, machine_id, transfer_amount))
if(charge_to_account(target_account_number, authenticated_account.owner_name, transfer_purpose, machine_id, transfer_amount))
usr << "\icon[src]<span class='info'>Funds transfer successful.</span>"
authenticated_account.money -= transfer_amount
@@ -240,13 +246,17 @@ log transactions
var/new_sec_level = max( min(text2num(href_list["new_security_level"]), 2), 0)
authenticated_account.security_level = new_sec_level
if("attempt_auth")
if(linked_db && !ticks_left_locked_down)
// check if they have low security enabled
scan_user(usr)
if(!ticks_left_locked_down && held_card)
var/tried_account_num = text2num(href_list["account_num"])
if(!tried_account_num)
tried_account_num = held_card.associated_account_number
var/tried_pin = text2num(href_list["account_pin"])
authenticated_account = linked_db.attempt_account_access(tried_account_num, tried_pin, held_card && held_card.associated_account_number == tried_account_num ? 2 : 1)
authenticated_account = attempt_account_access(tried_account_num, tried_pin, held_card && held_card.associated_account_number == tried_account_num ? 2 : 1)
if(!authenticated_account)
number_incorrect_tries++
if(previous_account_number == tried_account_num)
@@ -256,7 +266,7 @@ log transactions
playsound(src, 'sound/machines/buzz-two.ogg', 50, 1)
//create an entry in the account transaction log
var/datum/money_account/failed_account = linked_db.get_account(tried_account_num)
var/datum/money_account/failed_account = get_account(tried_account_num)
if(failed_account)
var/datum/transaction/T = new()
T.target_name = failed_account.owner_name
@@ -299,7 +309,7 @@ log transactions
//remove the money
authenticated_account.money -= amount
withdraw_arbitrary_sum(amount)
spawn_money(amount,src.loc)
//create an entry in the account transaction log
var/datum/transaction/T = new()
@@ -337,56 +347,27 @@ log transactions
else
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
if("insert_card")
if(held_card)
held_card.loc = src.loc
authenticated_account = null
if(ishuman(usr) && !usr.get_active_hand())
usr.put_in_hands(held_card)
held_card = null
if(!held_card)
//this might happen if the user had the browser window open when somebody emagged it
if(emagged > 0)
usr << "\red \icon[src] The ATM card reader rejected your ID because this machine has been sabotaged!"
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
I.loc = src
held_card = I
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
I.loc = src
held_card = I
release_held_id(usr)
if("logout")
authenticated_account = null
//usr << browse(null,"window=atm")
src.attack_hand(usr)
//create the most effective combination of notes to make up the requested amount
/obj/machinery/atm/proc/withdraw_arbitrary_sum(var/arbitrary_sum)
while(arbitrary_sum >= 1000)
arbitrary_sum -= 1000
new /obj/item/weapon/spacecash/c1000(src)
while(arbitrary_sum >= 500)
arbitrary_sum -= 500
new /obj/item/weapon/spacecash/c500(src)
while(arbitrary_sum >= 200)
arbitrary_sum -= 200
new /obj/item/weapon/spacecash/c200(src)
while(arbitrary_sum >= 100)
arbitrary_sum -= 100
new /obj/item/weapon/spacecash/c100(src)
while(arbitrary_sum >= 50)
arbitrary_sum -= 50
new /obj/item/weapon/spacecash/c50(src)
while(arbitrary_sum >= 20)
arbitrary_sum -= 20
new /obj/item/weapon/spacecash/c20(src)
while(arbitrary_sum >= 10)
arbitrary_sum -= 10
new /obj/item/weapon/spacecash/c10(src)
while(arbitrary_sum >= 1)
arbitrary_sum -= 1
new /obj/item/weapon/spacecash(src)
//stolen wholesale and then edited a bit from newscasters, which are awesome and by Agouri
/obj/machinery/atm/proc/scan_user(mob/living/carbon/human/human_user as mob)
if(!authenticated_account && linked_db)
if(!authenticated_account)
if(human_user.wear_id)
var/obj/item/weapon/card/id/I
if(istype(human_user.wear_id, /obj/item/weapon/card/id) )
@@ -395,7 +376,7 @@ log transactions
var/obj/item/device/pda/P = human_user.wear_id
I = P.id
if(I)
authenticated_account = linked_db.attempt_account_access(I.associated_account_number)
authenticated_account = attempt_account_access(I.associated_account_number)
if(authenticated_account)
human_user << "\blue \icon[src] Access granted. Welcome user '[authenticated_account.owner_name].'"
@@ -407,3 +388,17 @@ log transactions
T.date = current_date_string
T.time = worldtime2text()
authenticated_account.transaction_log.Add(T)
view_screen = NO_SCREEN
// put the currently held id on the ground or in the hand of the user
/obj/machinery/atm/proc/release_held_id(mob/living/carbon/human/human_user as mob)
if(!held_card)
return
held_card.loc = src.loc
authenticated_account = null
if(ishuman(human_user) && !human_user.get_active_hand())
human_user.put_in_hands(held_card)
held_card = null
+118
View File
@@ -0,0 +1,118 @@
/datum/money_account
var/owner_name = ""
var/account_number = 0
var/remote_access_pin = 0
var/money = 0
var/list/transaction_log = list()
var/suspended = 0
var/security_level = 0 //0 - auto-identify from worn ID, require only account number
//1 - require manual login / account number and pin
//2 - require card and manual login
/datum/transaction
var/target_name = ""
var/purpose = ""
var/amount = 0
var/date = ""
var/time = ""
var/source_terminal = ""
/proc/create_account(var/new_owner_name = "Default user", var/starting_funds = 0, var/obj/machinery/account_database/source_db)
//create a new account
var/datum/money_account/M = new()
M.owner_name = new_owner_name
M.remote_access_pin = rand(1111, 111111)
M.money = starting_funds
//create an entry in the account transaction log for when it was created
var/datum/transaction/T = new()
T.target_name = new_owner_name
T.purpose = "Account creation"
T.amount = starting_funds
if(!source_db)
//set a random date, time and location some time over the past few decades
T.date = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 25[rand(10,56)]"
T.time = "[rand(0,24)]:[rand(11,59)]"
T.source_terminal = "NTGalaxyNet Terminal #[rand(111,1111)]"
M.account_number = rand(111111, 999999)
else
T.date = current_date_string
T.time = worldtime2text()
T.source_terminal = source_db.machine_id
M.account_number = next_account_number
next_account_number += rand(1,25)
//create a sealed package containing the account details
var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(source_db.loc)
var/obj/item/weapon/paper/R = new /obj/item/weapon/paper(P)
P.wrapped = R
R.name = "Account information: [M.owner_name]"
R.info = "<b>Account details (confidential)</b><br><hr><br>"
R.info += "<i>Account holder:</i> [M.owner_name]<br>"
R.info += "<i>Account number:</i> [M.account_number]<br>"
R.info += "<i>Account pin:</i> [M.remote_access_pin]<br>"
R.info += "<i>Starting balance:</i> $[M.money]<br>"
R.info += "<i>Date and time:</i> [worldtime2text()], [current_date_string]<br><br>"
R.info += "<i>Creation terminal ID:</i> [source_db.machine_id]<br>"
R.info += "<i>Authorised NT officer overseeing creation:</i> [source_db.held_card.registered_name]<br>"
//stamp the paper
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
stampoverlay.icon_state = "paper_stamp-cent"
if(!R.stamped)
R.stamped = new
R.stamped += /obj/item/weapon/stamp
R.overlays += stampoverlay
R.stamps += "<HR><i>This paper has been stamped by the Accounts Database.</i>"
//add the account
M.transaction_log.Add(T)
all_money_accounts.Add(M)
return M
/proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount)
for(var/datum/money_account/D in 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
T.purpose = purpose
if(amount < 0)
T.amount = "([amount])"
else
T.amount = "[amount]"
T.date = current_date_string
T.time = worldtime2text()
T.source_terminal = terminal_id
D.transaction_log.Add(T)
return 1
break
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
/proc/attempt_account_access(var/attempt_account_number, var/attempt_pin_number, var/security_level_passed = 0)
for(var/datum/money_account/D in all_money_accounts)
if(D.account_number == attempt_account_number)
if( D.security_level <= security_level_passed && (!D.security_level || D.remote_access_pin == attempt_pin_number) )
return D
break
/proc/get_account(var/account_number)
for(var/datum/money_account/D in all_money_accounts)
if(D.account_number == account_number)
return D
/proc/attempt_account_access_nosec(var/attempt_account_number)
for(var/datum/money_account/D in all_money_accounts)
if(D.account_number == attempt_account_number)
return D
+169
View File
@@ -0,0 +1,169 @@
/obj/machinery/account_database
name = "Accounts uplink console"
desc = "Access transaction logs, account data and all kinds of other financial records."
icon = 'icons/obj/computer.dmi'
icon_state = "aiupload"
density = 1
req_one_access = list(access_hop, access_captain, access_cent_captain)
var/receipt_num
var/machine_id = ""
var/obj/item/weapon/card/id/held_card
var/access_level = 0
var/datum/money_account/detailed_account_view
var/creating_new_account = 0
/obj/machinery/account_database/New()
..()
machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]"
/obj/machinery/account_database/attack_hand(mob/user as mob)
if(get_dist(src,user) <= 1)
var/dat = "<b>Accounts Database</b><br>"
dat += "<i>[machine_id]</i><br>"
dat += "Confirm identity: <a href='?src=\ref[src];choice=insert_card'>[held_card ? held_card : "-----"]</a><br>"
if(access_level > 0)
dat += "You may not edit accounts at this terminal, only create and view them.<br>"
if(creating_new_account)
dat += "<br>"
dat += "<a href='?src=\ref[src];choice=view_accounts_list;'>Return to accounts list</a>"
dat += "<form name='create_account' action='?src=\ref[src]' method='get'>"
dat += "<input type='hidden' name='src' value='\ref[src]'>"
dat += "<input type='hidden' name='choice' value='finalise_create_account'>"
dat += "<b>Holder name:</b> <input type='text' id='holder_name' name='holder_name' style='width:250px; background-color:white;'><br>"
dat += "<b>Initial funds:</b> <input type='text' id='starting_funds' name='starting_funds' style='width:250px; background-color:white;'> (subtracted from station account)<br>"
dat += "<i>New accounts are automatically assigned a secret number and pin, which are printed separately in a sealed package.</i><br>"
dat += "<input type='submit' value='Create'><br>"
dat += "</form>"
else
if(detailed_account_view)
dat += "<br>"
dat += "<a href='?src=\ref[src];choice=view_accounts_list;'>Return to accounts list</a><hr>"
dat += "<b>Account number:</b> #[detailed_account_view.account_number]<br>"
dat += "<b>Account holder:</b> [detailed_account_view.owner_name]<br>"
dat += "<b>Account balance:</b> $[detailed_account_view.money]<br>"
if(access_level > 1)
dat += "<b><a href='?src=\ref[src];choice=add_funds'>Silently add funds (no transaction log)</a><br>"
dat += "<b><a href='?src=\ref[src];choice=remove_funds'>Silently remove funds (no transaction log)</a><br>"
dat += "<b><a href='?src=\ref[src];choice=toggle_suspension'>[detailed_account_view.suspended ? "Unsuspend account" : "Suspend account"]</a><br>"
dat += "<table border=1 style='width:100%'>"
dat += "<tr>"
dat += "<td><b>Date</b></td>"
dat += "<td><b>Time</b></td>"
dat += "<td><b>Target</b></td>"
dat += "<td><b>Purpose</b></td>"
dat += "<td><b>Value</b></td>"
dat += "<td><b>Source terminal ID</b></td>"
dat += "</tr>"
for(var/datum/transaction/T in detailed_account_view.transaction_log)
dat += "<tr>"
dat += "<td>[T.date]</td>"
dat += "<td>[T.time]</td>"
dat += "<td>[T.target_name]</td>"
dat += "<td>[T.purpose]</td>"
dat += "<td>$[T.amount]</td>"
dat += "<td>[T.source_terminal]</td>"
dat += "</tr>"
dat += "</table>"
else
dat += "<a href='?src=\ref[src];choice=create_account;'>Create new account</a><br><br>"
dat += "<table border=1 style='width:100%'>"
for(var/i=1, i<=all_money_accounts.len, i++)
var/datum/money_account/D = all_money_accounts[i]
dat += "<tr>"
dat += "<td>#[D.account_number]</td>"
dat += "<td>[D.owner_name]</td>"
dat += "<td>[D.suspended ? "SUSPENDED" : ""]</td>"
dat += "<td><a href='?src=\ref[src];choice=view_account_detail;account_index=[i]'>View in detail</a></td>"
dat += "</tr>"
dat += "</table>"
user << browse(dat,"window=account_db;size=700x650")
else
user << browse(null,"window=account_db")
/obj/machinery/account_database/attackby(O as obj, user as mob)//TODO:SANITY
if(istype(O, /obj/item/weapon/card))
var/obj/item/weapon/card/id/idcard = O
if(!held_card)
usr.drop_item()
idcard.loc = src
held_card = idcard
if(access_cent_captain in idcard.access)
access_level = 2
else if(access_hop in idcard.access || access_captain in idcard.access)
access_level = 1
else
..()
/obj/machinery/account_database/Topic(var/href, var/href_list)
if(href_list["choice"])
switch(href_list["choice"])
if("create_account")
creating_new_account = 1
if("add_funds")
var/amount = input("Enter the amount you wish to add", "Silently add funds") as num
if(detailed_account_view)
detailed_account_view.money += amount
if("remove_funds")
var/amount = input("Enter the amount you wish to remove", "Silently remove funds") as num
if(detailed_account_view)
detailed_account_view.money -= amount
if("toggle_suspension")
if(detailed_account_view)
if(detailed_account_view.suspended)
detailed_account_view.suspended = 0
else
detailed_account_view.suspended = 1
if("finalise_create_account")
var/account_name = href_list["holder_name"]
var/starting_funds = max(text2num(href_list["starting_funds"]), 0)
create_account(account_name, starting_funds, src)
if(starting_funds > 0)
//subtract the money
station_account.money -= starting_funds
//create a transaction log entry
var/datum/transaction/T = new()
T.target_name = account_name
T.purpose = "New account funds initialisation"
T.amount = "([starting_funds])"
T.date = current_date_string
T.time = worldtime2text()
T.source_terminal = machine_id
station_account.transaction_log.Add(T)
creating_new_account = 0
if("insert_card")
if(held_card)
held_card.loc = src.loc
if(ishuman(usr) && !usr.get_active_hand())
usr.put_in_hands(held_card)
held_card = null
access_level = 0
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
usr.drop_item()
C.loc = src
held_card = C
if(access_cent_captain in C.access)
access_level = 2
else if(access_hop in C.access || access_captain in C.access)
access_level = 1
if("view_account_detail")
var/index = text2num(href_list["account_index"])
if(index && index <= all_money_accounts.len)
detailed_account_view = all_money_accounts[index]
if("view_accounts_list")
detailed_account_view = null
creating_new_account = 0
src.attack_hand(usr)
@@ -10,14 +10,12 @@
var/transaction_amount = 0
var/transaction_purpose = "Default charge"
var/access_code = 0
var/obj/machinery/account_database/linked_db
var/datum/money_account/linked_account
/obj/item/device/eftpos/New()
..()
machine_id = "[station_name()] EFTPOS #[num_financial_terminals++]"
access_code = rand(1111,111111)
reconnect_database()
spawn(0)
print_reference()
@@ -69,16 +67,6 @@
D.wrapped = R
D.name = "small parcel - 'EFTPOS access code'"
/obj/item/device/eftpos/proc/reconnect_database()
var/turf/location = get_turf(src)
if(!location)
return
for(var/obj/machinery/account_database/DB in machines) //Hotfix until someone finds out why it isn't in 'machines'
if(DB.z == location.z)
linked_db = DB
break
/obj/item/device/eftpos/attack_self(mob/user as mob)
if(get_dist(src,user) <= 1)
var/dat = "<b>[eftpos_name]</b><br>"
@@ -109,17 +97,11 @@
/obj/item/device/eftpos/attackby(O as obj, user as mob)
if(istype(O, /obj/item/weapon/card))
//attempt to connect to a new db, and if that doesn't work then fail
if(!linked_db)
reconnect_database()
if(linked_db)
if(linked_account)
var/obj/item/weapon/card/I = O
scan_card(I)
else
usr << "\icon[src]<span class='warning'>Unable to connect to linked account.</span>"
if(linked_account)
var/obj/item/weapon/card/I = O
scan_card(I)
else
usr << "\icon[src]<span class='warning'>Unable to connect to accounts database.</span>"
usr << "\icon[src]<span class='warning'>Unable to connect to linked account.</span>"
else
..()
@@ -145,14 +127,12 @@
else
usr << "\icon[src]<span class='warning'>Incorrect code entered.</span>"
if("link_account")
if(!linked_db)
reconnect_database()
if(linked_db)
var/attempt_account_num = input("Enter account number to pay EFTPOS charges into", "New account number") as num
var/attempt_pin = input("Enter pin code", "Account pin") as num
linked_account = linked_db.attempt_account_access(attempt_account_num, attempt_pin, 1)
else
usr << "\icon[src]<span class='warning'>Unable to connect to accounts database.</span>"
var/attempt_account_num = input("Enter account number to pay EFTPOS charges into", "New account number") as num
var/attempt_pin = input("Enter pin code", "Account pin") as num
linked_account = attempt_account_access(attempt_account_num, attempt_pin, 1)
if(linked_account.suspended)
linked_account = null
usr << "\icon[src]<span class='warning'>Account has been suspended.</span>"
if("trans_purpose")
transaction_purpose = input("Enter reason for EFTPOS transaction", "Transaction purpose")
if("trans_value")
@@ -172,10 +152,7 @@
else
usr << "\icon[src] <span class='warning'>No account connected to send transactions to.</span>"
if("scan_card")
//attempt to connect to a new db, and if that doesn't work then fail
if(!linked_db)
reconnect_database()
if(linked_db && linked_account)
if(linked_account)
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card))
scan_card(I)
@@ -201,46 +178,63 @@
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
if(transaction_locked && !transaction_paid)
if(linked_account)
var/attempt_pin = input("Enter pin code", "EFTPOS transaction") as num
var/datum/money_account/D = linked_db.attempt_account_access(C.associated_account_number, attempt_pin, 2)
if(D)
if(transaction_amount <= D.money)
playsound(src, 'sound/machines/chime.ogg', 50, 1)
src.visible_message("\icon[src] The [src] chimes.")
transaction_paid = 1
if(!linked_account.suspended)
var/attempt_pin = input("Enter pin code", "EFTPOS transaction") as num
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
if(D)
if(!D.suspended)
if(transaction_amount <= D.money)
playsound(src, 'sound/machines/chime.ogg', 50, 1)
src.visible_message("\icon[src] The [src] chimes.")
transaction_paid = 1
//transfer the money
D.money -= transaction_amount
linked_account.money += transaction_amount
//transfer the money
D.money -= transaction_amount
linked_account.money += transaction_amount
//create entries in the two account transaction logs
var/datum/transaction/T = new()
T.target_name = "[linked_account.owner_name] (via [eftpos_name])"
T.purpose = transaction_purpose
if(transaction_amount > 0)
T.amount = "([transaction_amount])"
//create entries in the two account transaction logs
var/datum/transaction/T = new()
T.target_name = "[linked_account.owner_name] (via [eftpos_name])"
T.purpose = transaction_purpose
if(transaction_amount > 0)
T.amount = "([transaction_amount])"
else
T.amount = "[transaction_amount]"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
D.transaction_log.Add(T)
//
T = new()
T.target_name = D.owner_name
T.purpose = transaction_purpose
T.amount = "[transaction_amount]"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
linked_account.transaction_log.Add(T)
else
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
else
T.amount = "[transaction_amount]"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
D.transaction_log.Add(T)
//
T = new()
T.target_name = D.owner_name
T.purpose = transaction_purpose
T.amount = "[transaction_amount]"
T.source_terminal = machine_id
T.date = current_date_string
T.time = worldtime2text()
linked_account.transaction_log.Add(T)
usr << "\icon[src]<span class='warning'>Your account has been suspended.</span>"
else
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
else
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
usr << "\icon[src]<span class='warning'>Connected account has been suspended.</span>"
else
usr << "\icon[src]<span class='warning'>EFTPOS is not connected to an account.</span>"
else if (istype(I, /obj/item/weapon/card/emag))
if(transaction_locked)
if(transaction_paid)
usr << "\icon[src]<span class='info'>You stealthily swipe [I] through [src].</span>"
transaction_locked = 0
transaction_paid = 0
else
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
playsound(src, 'sound/machines/chime.ogg', 50, 1)
src.visible_message("\icon[src] The [src] chimes.")
transaction_paid = 1
else
..()
//emag?
//emag?
@@ -8,9 +8,6 @@
var/datum/trade_destination/affected_dest
/datum/event/economic_event/start()
if(!setup_economy)
setup_economy()
affected_dest = pickweight(weighted_randomevent_locations)
if(affected_dest.viable_random_events.len)
endWhen = rand(60,300)
@@ -1,4 +1,4 @@
var/list/station_departments = list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Civilian", "Trade")
var/list/station_departments = list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Civilian")
// The department the job belongs to.
/datum/job/var/department = null
@@ -67,7 +67,4 @@ var/list/station_departments = list("Command", "Medical", "Engineering", "Scienc
/datum/job/detective/department = "Security"
/datum/job/officer/department = "Security"
/datum/job/trader/department = "Trade"
/datum/job/trader/head_position = 1
/datum/job/officer/department = "Security"
+74
View File
@@ -0,0 +1,74 @@
/obj/item/weapon/spacecash
name = "0 credit chip"
desc = "It's worth 0 credits."
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "spacecash"
opacity = 0
density = 0
anchored = 0.0
force = 1.0
throwforce = 1.0
throw_speed = 1
throw_range = 2
w_class = 1.0
var/access = list()
access = access_crate_cash
var/worth = 0
/obj/item/weapon/spacecash/c1
name = "1 credip chip"
icon_state = "spacecash"
desc = "It's worth 1 credit."
worth = 1
/obj/item/weapon/spacecash/c10
name = "10 credit chip"
icon_state = "spacecash10"
desc = "It's worth 10 credits."
worth = 10
/obj/item/weapon/spacecash/c20
name = "20 credit chip"
icon_state = "spacecash20"
desc = "It's worth 20 credits."
worth = 20
/obj/item/weapon/spacecash/c50
name = "50 credit chip"
icon_state = "spacecash50"
desc = "It's worth 50 credits."
worth = 50
/obj/item/weapon/spacecash/c100
name = "100 credit chip"
icon_state = "spacecash100"
desc = "It's worth 100 credits."
worth = 100
/obj/item/weapon/spacecash/c200
name = "200 credit chip"
icon_state = "spacecash200"
desc = "It's worth 200 credits."
worth = 200
/obj/item/weapon/spacecash/c500
name = "500 credit chip"
icon_state = "spacecash500"
desc = "It's worth 500 credits."
worth = 500
/obj/item/weapon/spacecash/c1000
name = "1000 credit chip"
icon_state = "spacecash1000"
desc = "It's worth 1000 credits."
worth = 1000
proc/spawn_money(var/sum, spawnloc)
var/cash_type
for(var/i in list(1000,500,200,100,50,20,10,1))
cash_type = text2path("/obj/item/weapon/spacecash/c[i]")
while(sum >= i)
sum -= i
new cash_type(spawnloc)
return
@@ -44,7 +44,7 @@
#define ROBOTICS 13
#define BIOMEDICAL 14
#define EVA 15
#define GEAR_EVA 15
//---- The following corporations are friendly with NanoTrasen and loosely enable trade and travel:
//Corporation NanoTrasen - Generalised / high tech research and plasma exploitation.
@@ -63,10 +63,20 @@
//Destroyers are medium sized vessels, often used for escorting larger ships but able to go toe-to-toe with them if need be.
//Frigates are medium sized vessels, often used for escorting larger ships. They will rapidly find themselves outclassed if forced to face heavy warships head on.
var/setup_economy = 0
var/global/current_date_string
var/global/datum/money_account/vendor_account
var/global/datum/money_account/station_account
var/global/list/datum/money_account/department_accounts = list()
var/global/num_financial_terminals = 1
var/global/next_account_number = 0
var/global/list/all_money_accounts = list()
var/global/economy_init = 0
/proc/setup_economy()
if(setup_economy)
return
if(economy_init)
return 2
var/datum/feed_channel/newChannel = new /datum/feed_channel
newChannel.channel_name = "Tau Ceti Daily"
newChannel.author = "CentComm Minister of Information"
@@ -86,4 +96,61 @@ var/setup_economy = 0
weighted_randomevent_locations[D] = D.viable_random_events.len
weighted_mundaneevent_locations[D] = D.viable_mundane_events.len
setup_economy = 1
create_station_account()
for(var/department in station_departments)
create_department_account(department)
create_department_account("Vendor")
vendor_account = department_accounts["Vendor"]
current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 2557"
economy_init = 1
return 1
/proc/create_station_account()
if(!station_account)
next_account_number = rand(111111, 999999)
station_account = new()
station_account.owner_name = "[station_name()] Station Account"
station_account.account_number = rand(111111, 999999)
station_account.remote_access_pin = rand(1111, 111111)
station_account.money = 75000
//create an entry in the account transaction log for when it was created
var/datum/transaction/T = new()
T.target_name = station_account.owner_name
T.purpose = "Account creation"
T.amount = 75000
T.date = "2nd April, 2555"
T.time = "11:24"
T.source_terminal = "Biesel GalaxyNet Terminal #277"
//add the account
station_account.transaction_log.Add(T)
all_money_accounts.Add(station_account)
/proc/create_department_account(department)
next_account_number = rand(111111, 999999)
var/datum/money_account/department_account = new()
department_account.owner_name = "[department] Account"
department_account.account_number = rand(111111, 999999)
department_account.remote_access_pin = rand(1111, 111111)
department_account.money = 5000
//create an entry in the account transaction log for when it was created
var/datum/transaction/T = new()
T.target_name = department_account.owner_name
T.purpose = "Account creation"
T.amount = department_account.money
T.date = "2nd April, 2555"
T.time = "11:24"
T.source_terminal = "Biesel GalaxyNet Terminal #277"
//add the account
department_account.transaction_log.Add(T)
all_money_accounts.Add(department_account)
department_accounts[department] = department_account
+1 -1
View File
@@ -50,7 +50,7 @@ var/global/list/possibleEvents = list()
possibleEvents[/datum/event/mass_hallucination] = 200
possibleEvents[/datum/event/falsealarm] = 300
possibleEvents[/datum/event/immovable_rod] = 200
// possibleEvents[/datum/event/immovable_rod] = 200
possibleEvents[/datum/event/vent_clog] = 300
possibleEvents[/datum/event/anomaly/anomaly_bluespace] = 100
possibleEvents[/datum/event/anomaly/anomaly_flux] = 200
+2 -2
View File
@@ -10,7 +10,7 @@
/datum/event/money_hacker/setup()
if(all_money_accounts.len)
for(var/obj/machinery/account_database/DB in world)
if( DB.z == 1 && !(DB.stat&NOPOWER) && DB.activated )
if( DB.z == 1 && !(DB.stat&NOPOWER))
affected_db = DB
break
if(affected_db)
@@ -60,7 +60,7 @@
/datum/event/money_hacker/tick()
if(world.time > time_start + time_duration)
var/message
if(affected_account && affected_db && affected_db.activated && !(affected_db.stat & (NOPOWER|BROKEN)) )
if(affected_account && affected_db && !(affected_db.stat & (NOPOWER|BROKEN)) )
//hacker wins
message = "The hack attempt has succeeded."
+73 -1
View File
@@ -1149,4 +1149,76 @@
/datum/recipe/cracker
reagents = list("flour" = 5, "sodiumchloride" = 1)
result = /obj/item/weapon/reagent_containers/food/snacks/cracker
result = /obj/item/weapon/reagent_containers/food/snacks/cracker
////////////////////////////FOOD ADDITTIONS///////////////////////////////
/datum/recipe/wrap
reagents = list("soysauce" = 10)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/friedegg,
/obj/item/weapon/reagent_containers/food/snacks/grown/cabbage,
)
result = /obj/item/weapon/reagent_containers/food/snacks/wrap
/datum/recipe/beans
reagents = list("ketchup" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans,
/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans,
)
result = /obj/item/weapon/reagent_containers/food/snacks/beans
/datum/recipe/benedict
items = list(
/obj/item/weapon/reagent_containers/food/snacks/friedegg,
/obj/item/weapon/reagent_containers/food/snacks/meatsteak,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
)
result = /obj/item/weapon/reagent_containers/food/snacks/benedict
/datum/recipe/hotdog
reagents = list("ketchup" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/weapon/reagent_containers/food/snacks/sausage,
)
result = /obj/item/weapon/reagent_containers/food/snacks/hotdog
/datum/recipe/meatbun
reagents = list("soysauce" = 5, "flour" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/meatball,
/obj/item/weapon/reagent_containers/food/snacks/grown/cabbage,
)
result = /obj/item/weapon/reagent_containers/food/snacks/meatbun
/datum/recipe/icecreamsandwich
reagents = list("ice" = 5, "cream" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/icecream,
)
result = /obj/item/weapon/reagent_containers/food/snacks/icecreamsandwich
/datum/recipe/notasandwich
items = list(
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/clothing/mask/fakemoustache,
)
result = /obj/item/weapon/reagent_containers/food/snacks/notasandwich
/datum/recipe/sugarcookie
reagents = list("flour" = 5, "sugar" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/egg,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sugarcookie
/datum/recipe/friedbanana
items = list(
/obj/item/weapon/reagent_containers/food/snacks/grown/banana
)
/obj/item/weapon/
reagents = list("flour" = 10, "sugar" = 10, "cornoil" = 5)
result = /obj/item/weapon/reagent_containers/food/snacks/friedbanana
+172 -1
View File
@@ -485,7 +485,7 @@ commented out in r5061, I left it because of the shroom thingies
M.Stun(5)
M.apply_effect(25, IRRADIATE)
var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
var/turf/unsimulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/unsimulated/floor/plating/airless/asteroid)
N.fullUpdateMineralOverlays()
return
@@ -603,3 +603,174 @@ commented out in r5061, I left it because of the shroom thingies
M.selected.action(src)
else
return
/**********************Asteroid**************************/
/turf/unsimulated/floor/plating/airless/asteroid //floor piece
name = "Asteroid"
icon = 'icons/turf/floors.dmi'
icon_state = "asteroid"
oxygen = 0.01
nitrogen = 0.01
temperature = TCMB
var/dug = 0 //0 = has not yet been dug, 1 = has already been dug
/turf/unsimulated/floor/plating/airless/asteroid/New()
var/proper_name = name
..()
name = proper_name
//if (prob(50))
// seedName = pick(list("1","2","3","4"))
// seedAmt = rand(1,4)
if(prob(20))
icon_state = "asteroid[rand(0,12)]"
spawn(2)
updateMineralOverlays()
/turf/unsimulated/floor/plating/airless/asteroid/ex_act(severity)
switch(severity)
if(3.0)
return
if(2.0)
if (prob(70))
src.gets_dug()
if(1.0)
src.gets_dug()
return
/turf/unsimulated/floor/plating/airless/asteroid/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!W || !user)
return 0
if ((istype(W, /obj/item/weapon/shovel)))
var/turf/T = user.loc
if (!( istype(T, /turf) ))
return
if (dug)
user << "\red This area has already been dug"
return
user << "\red You start digging."
playsound(src.loc, 'sound/effects/rustle1.ogg', 50, 1) //russle sounds sounded better
sleep(40)
if ((user.loc == T && user.get_active_hand() == W))
user << "\blue You dug a hole."
gets_dug()
if ((istype(W,/obj/item/weapon/pickaxe/drill)))
var/turf/T = user.loc
if (!( istype(T, /turf) ))
return
if (dug)
user << "\red This area has already been dug"
return
user << "\red You start digging."
playsound(src.loc, 'sound/effects/rustle1.ogg', 50, 1) //russle sounds sounded better
sleep(30)
if ((user.loc == T && user.get_active_hand() == W))
user << "\blue You dug a hole."
gets_dug()
if ((istype(W,/obj/item/weapon/pickaxe/diamonddrill)) || (istype(W,/obj/item/weapon/pickaxe/borgdrill)))
var/turf/T = user.loc
if (!( istype(T, /turf) ))
return
if (dug)
user << "\red This area has already been dug"
return
user << "\red You start digging."
playsound(src.loc, 'sound/effects/rustle1.ogg', 50, 1) //russle sounds sounded better
sleep(0)
if ((user.loc == T && user.get_active_hand() == W))
user << "\blue You dug a hole."
gets_dug()
if(istype(W,/obj/item/weapon/storage/bag/ore))
var/obj/item/weapon/storage/bag/ore/S = W
if(S.collection_mode)
for(var/obj/item/weapon/ore/O in src.contents)
O.attackby(W,user)
return
else
..(W,user)
return
/turf/unsimulated/floor/plating/airless/asteroid/proc/gets_dug()
if(dug)
return
new/obj/item/weapon/ore/glass(src)
new/obj/item/weapon/ore/glass(src)
new/obj/item/weapon/ore/glass(src)
new/obj/item/weapon/ore/glass(src)
new/obj/item/weapon/ore/glass(src)
dug = 1
icon_state = "asteroid_dug"
return
/turf/unsimulated/floor/plating/airless/asteroid/proc/updateMineralOverlays()
src.overlays.Cut()
if(istype(get_step(src, NORTH), /turf/unsimulated/mineral))
src.overlays += image('icons/turf/walls.dmi', "rock_side_n")
if(istype(get_step(src, SOUTH), /turf/unsimulated/mineral))
src.overlays += image('icons/turf/walls.dmi', "rock_side_s", layer=6)
if(istype(get_step(src, EAST), /turf/unsimulated/mineral))
src.overlays += image('icons/turf/walls.dmi', "rock_side_e", layer=6)
if(istype(get_step(src, WEST), /turf/unsimulated/mineral))
src.overlays += image('icons/turf/walls.dmi', "rock_side_w", layer=6)
/turf/unsimulated/floor/plating/airless/asteroid/proc/fullUpdateMineralOverlays()
var/turf/unsimulated/floor/plating/airless/asteroid/A
if(istype(get_step(src, WEST), /turf/unsimulated/floor/plating/airless/asteroid))
A = get_step(src, WEST)
A.updateMineralOverlays()
if(istype(get_step(src, EAST), /turf/unsimulated/floor/plating/airless/asteroid))
A = get_step(src, EAST)
A.updateMineralOverlays()
if(istype(get_step(src, NORTH), /turf/unsimulated/floor/plating/airless/asteroid))
A = get_step(src, NORTH)
A.updateMineralOverlays()
if(istype(get_step(src, NORTHWEST), /turf/unsimulated/floor/plating/airless/asteroid))
A = get_step(src, NORTHWEST)
A.updateMineralOverlays()
if(istype(get_step(src, NORTHEAST), /turf/unsimulated/floor/plating/airless/asteroid))
A = get_step(src, NORTHEAST)
A.updateMineralOverlays()
if(istype(get_step(src, SOUTHWEST), /turf/unsimulated/floor/plating/airless/asteroid))
A = get_step(src, SOUTHWEST)
A.updateMineralOverlays()
if(istype(get_step(src, SOUTHEAST), /turf/unsimulated/floor/plating/airless/asteroid))
A = get_step(src, SOUTHEAST)
A.updateMineralOverlays()
if(istype(get_step(src, SOUTH), /turf/unsimulated/floor/plating/airless/asteroid))
A = get_step(src, SOUTH)
A.updateMineralOverlays()
src.updateMineralOverlays()
/turf/unsimulated/floor/plating/airless/asteroid/Entered(atom/movable/M as mob|obj)
..()
if(istype(M,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = M
if(istype(R.module, /obj/item/weapon/robot_module/miner))
if(istype(R.module_state_1,/obj/item/weapon/storage/bag/ore))
src.attackby(R.module_state_1,R)
else if(istype(R.module_state_2,/obj/item/weapon/storage/bag/ore))
src.attackby(R.module_state_2,R)
else if(istype(R.module_state_3,/obj/item/weapon/storage/bag/ore))
src.attackby(R.module_state_3,R)
else
return
@@ -0,0 +1,2 @@
/mob/living/carbon/alien/hitby(atom/movable/AM)
..(AM, 1)
+29 -10
View File
@@ -15,7 +15,7 @@
req_access = list(access_robotics)
//Revised. Brainmob is now contained directly within object of transfer. MMI in this case.
var/alien = 0
var/locked = 0
var/mob/living/carbon/brain/brainmob = null//The current occupant.
var/mob/living/silicon/robot = null//Appears unused.
@@ -38,10 +38,17 @@
living_mob_list += brainmob
user.drop_item()
if(istype(O,/obj/item/brain/alien))
name = "Man-Machine Interface: Alien - [brainmob.real_name]"
icon = 'icons/mob/alien.dmi'
icon_state = "AlienMMI"
alien = 1
else
name = "Man-Machine Interface: [brainmob.real_name]"
icon_state = "mmi_full"
alien = 0
del(O)
name = "Man-Machine Interface: [brainmob.real_name]"
icon_state = "mmi_full"
locked = 1
@@ -61,6 +68,8 @@
return
..()
attack_self(mob/user as mob)
if(!brainmob)
user << "\red You upend the MMI, but there's nothing in it."
@@ -68,13 +77,13 @@
user << "\red You upend the MMI, but the brain is clamped into place."
else
user << "\blue You upend the MMI, spilling the brain onto the floor."
var/obj/item/brain/brain = new(user.loc)
brainmob.container = null//Reset brainmob mmi var.
brainmob.loc = brain//Throw mob into brain.
living_mob_list -= brainmob//Get outta here
brain.brainmob = brainmob//Set the brain to use the brainmob
brainmob = null//Set mmi brainmob var to null
if(alien)
var/obj/item/brain/alien/brain = new(user.loc)
dropbrain(brain,get_turf(user))
else
var/obj/item/brain/brain = new(user.loc)
dropbrain(brain,get_turf(user))
icon = 'icons/obj/assemblies.dmi'
icon_state = "mmi_empty"
name = "Man-Machine Interface"
@@ -90,6 +99,16 @@
icon_state = "mmi_full"
locked = 1
return
//I made this proc as a way to have a brainmob be transferred to any created brain, and to solve the
//problem i was having with alien/nonalien brain drops.
dropbrain(var/obj/item/brain/brain, var/turf/dropspot)
brainmob.container = null//Reset brainmob mmi var.
brainmob.loc = brain//Throw mob into brain.
living_mob_list -= brainmob//Get outta here
brain.brainmob = brainmob//Set the brain to use the brainmob
brain.brainmob.cancel_camera()
brainmob = null//Set mmi brainmob var to null
/obj/item/device/mmi/radio_enabled
name = "Radio-enabled Man-Machine Interface"
@@ -95,4 +95,11 @@
del(src)
else
..()
return
return
/obj/item/brain/alien
name = "alien brain"
desc = "We barely understand the brains of terrestial animals. Who knows what we may find in the brain of such an advanced species?"
icon = 'icons/mob/alien.dmi'
icon_state = "AlienBrain"
origin_tech = "biotech=7"
+9 -9
View File
@@ -221,7 +221,7 @@
// ++++ROCKDTBEN++++ MOB PROCS //END
/*
/mob/living/carbon/proc/handle_ventcrawl(var/obj/machinery/atmospherics/unary/vent_pump/vent_found = null) // -- TLE -- Merged by Carn
if(stat)
@@ -313,7 +313,7 @@
if(new_area)
new_area.Entered(src)
*/
/mob/living/carbon/clean_blood()
. = ..()
@@ -334,24 +334,24 @@
//Throwing stuff
/mob/living/carbon/proc/toggle_throw_mode()
if (src.in_throw_mode)
if (in_throw_mode)
throw_mode_off()
else
throw_mode_on()
/mob/living/carbon/proc/throw_mode_off()
src.in_throw_mode = 0
src.throw_icon.icon_state = "act_throw_off"
in_throw_mode = 0
throw_icon.icon_state = "act_throw_off"
/mob/living/carbon/proc/throw_mode_on()
src.in_throw_mode = 1
src.throw_icon.icon_state = "act_throw_on"
in_throw_mode = 1
throw_icon.icon_state = "act_throw_on"
/mob/proc/throw_item(atom/target)
return
/mob/living/carbon/throw_item(atom/target)
src.throw_mode_off()
throw_mode_off()
if(usr.stat || !target)
return
if(target.type == /obj/screen) return
@@ -382,7 +382,7 @@
update_icons()
if (istype(usr, /mob/living/carbon)) //Check if a carbon mob is throwing. Modify/remove this line as required.
item.loc = src.loc
item.loc = usr.loc
if(src.client)
src.client.screen -= item
if(istype(item, /obj/item))
@@ -0,0 +1,17 @@
/mob/living/carbon/hitby(atom/movable/AM, skip)
if(!skip) //ugly, but easy
message_admins("Skip Check Passed")
if(in_throw_mode && !get_active_hand()) //empty active hand and we're in throw mode
message_admins("In Throw Mode and active hand check passed")
if(canmove && !restrained())
message_admins("Restrained/moving check passed")
if(istype(AM, /obj/item))
message_admins("Item check passed")
var/obj/item/I = AM
if(isturf(I.loc))
message_admins("Turf check passed")
put_in_active_hand(I)
visible_message("<span class='warning'>[src] catches [I]!</span>")
throw_mode_off()
return
..()
@@ -317,6 +317,14 @@
if(armor >= 2) return
/mob/living/carbon/human/proc/is_loyalty_implanted(mob/living/carbon/human/M)
for(var/L in M.contents)
if(istype(L, /obj/item/weapon/implant/loyalty))
for(var/datum/organ/external/O in M.organs)
if(L in O.implants)
return 1
return 0
/mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M as mob)
if(M.Victim) return // can't attack while eating!
@@ -47,10 +47,13 @@
var/miming = null //Toggle for the mime's abilities.
var/special_voice = "" // For changing our voice. Used by a symptom.
var/said_last_words=0
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
var/xylophone = 0 //For the spoooooooky xylophone cooldown
var/mob/remoteview_target = null
var/meatleft = 3 //For chef item
var/meatleft = 3 //For chef item
var/slime_color = "blue" //For slime people this defines their color, it's blue by default to pay tribute to the old icons
@@ -1,4 +1,6 @@
/mob/living/carbon/human/say(var/message)
if(miming)
return
if(wear_mask)
if(istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja) && wear_mask:voice == "Unknown")
@@ -35,6 +37,8 @@
message = slur(message)
..(message)
/mob/living/carbon/human/say_understands(var/other,var/datum/language/speaking = null)
if(has_brain_worms()) //Brain worms translate everything. Even mice and alien speak.
@@ -418,8 +418,10 @@ proc/get_damage_icon_part(damage_state, body_part)
if(dna)
switch(dna.mutantrace)
if("golem","slime","shadow","adamantine")
if("golem","shadow","adamantine")
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s")
if("slime")
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/slimemutant.dmi', "icon_state" = "[slime_color]_[dna.mutantrace][fat]_[gender]_s")
else
overlays_standing[MUTANTRACE_LAYER] = null
@@ -24,7 +24,7 @@
if (src.stat == 2)
return src.say_dead(message)
if (src.stat)
if (src.stat && said_last_words) // TIME TO WHISPER WHILE IN CRIT
return
var/alt_name = ""
@@ -88,6 +88,11 @@
var/list/heard_a = list() // understood us
var/list/heard_b = list() // didn't understand us
var/and_passes_on=""
if(!said_last_words)
and_passes_on=" - and passes on"
said_last_words=src.stat
for (var/mob/M in listening)
if (M.say_understands(src))
@@ -99,9 +104,9 @@
for (var/mob/M in watching)
if (M.say_understands(src))
rendered = "<span class='game say'><span class='name'>[src.name]</span> whispers something.</span>"
rendered = "<span class='game say'><span class='name'>[src.name]</span> whispers something[and_passes_on].</span>"
else
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers something.</span>"
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers something[and_passes_on].</span>"
M.show_message(rendered, 2)
if (length(heard_a))
@@ -110,8 +115,7 @@
if (italics)
message_a = "<i>[message_a]</i>"
//This appears copied from carbon/living say.dm so the istype check for mob is probably not needed. Appending for src is also not needed as the game will check that automatically.
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message_a]\"</span></span>"
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message_a]\"</span>[and_passes_on]</span>"
for (var/mob/M in heard_a)
M.show_message(rendered, 2)
@@ -123,7 +127,7 @@
if (italics)
message_b = "<i>[message_b]</i>"
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers, <span class='message'>\"[message_b]\"</span></span>"
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers, <span class='message'>\"[message_b]\"</span>[and_passes_on]</span>"
for (var/mob/M in heard_b)
M.show_message(rendered, 2)
@@ -132,18 +136,23 @@
if (M.say_understands(src))
var/message_c
message_c = stars(message)
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message_c]\"</span></span>"
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message_c]\"</span>[and_passes_on]</span>"
M.show_message(rendered, 2)
else
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers something.</span>"
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers something[and_passes_on].</span>"
M.show_message(rendered, 2)
if (italics)
message = "<i>[message]</i>"
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message]\"</span></span>"
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message]\"</span>[and_passes_on]</span>"
for (var/mob/M in dead_mob_list)
if (!(M.client))
continue
if (M.stat > 1 && !(M in heard_a) && (M.client.prefs.toggles & CHAT_GHOSTEARS))
M.show_message(rendered, 2)
if(said_last_words)
src.stat = 2
src.death()
src.regenerate_icons()
@@ -647,6 +647,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
throw_speed = 3
throw_range = 6
origin_tech = "biotech=4"
_color = "grey"
var/Uses = 1 // uses before it goes inert
/obj/item/slime_extract/New()
@@ -655,73 +656,100 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
reagents = R
R.my_atom = src
/obj/item/slime_extract/attack(mob/living/carbon/human/M as mob, mob/user as mob) //changing slime people colors
if(M.dna.mutantrace != "slime" || M != user) return
M.slime_color = _color
user <<"You absorb the core and your color shifts!"
M.update_mutantrace()
del(src) //Finally a tidy way to remove all the used cores lying about
/obj/item/slime_extract/grey
name = "grey slime extract"
icon_state = "grey slime extract"
_color = "grey"
/obj/item/slime_extract/gold
name = "gold slime extract"
icon_state = "gold slime extract"
_color = "gold"
/obj/item/slime_extract/silver
name = "silver slime extract"
icon_state = "silver slime extract"
_color = "silver"
/obj/item/slime_extract/metal
name = "metal slime extract"
icon_state = "metal slime extract"
_color = "metal"
/obj/item/slime_extract/purple
name = "purple slime extract"
icon_state = "purple slime extract"
_color = "purple"
/obj/item/slime_extract/darkpurple
name = "dark purple slime extract"
icon_state = "dark purple slime extract"
_color = "darkpurple"
/obj/item/slime_extract/orange
name = "orange slime extract"
icon_state = "orange slime extract"
_color = "orange"
/obj/item/slime_extract/yellow
name = "yellow slime extract"
icon_state = "yellow slime extract"
_color = "yellow"
/obj/item/slime_extract/red
name = "red slime extract"
icon_state = "red slime extract"
_color = "red"
/obj/item/slime_extract/blue
name = "blue slime extract"
icon_state = "blue slime extract"
_color = "blue"
/obj/item/slime_extract/darkblue
name = "dark blue slime extract"
icon_state = "dark blue slime extract"
_color = "darkblue"
/obj/item/slime_extract/pink
name = "pink slime extract"
icon_state = "pink slime extract"
_color = "pink"
/obj/item/slime_extract/green
name = "green slime extract"
icon_state = "green slime extract"
_color = "green"
/obj/item/slime_extract/lightpink
name = "light pink slime extract"
icon_state = "light pink slime extract"
_color = "lightpink"
/obj/item/slime_extract/black
name = "black slime extract"
icon_state = "black slime extract"
_color = "black"
/obj/item/slime_extract/oil
name = "oil slime extract"
icon_state = "oil slime extract"
_color = "oil"
/obj/item/slime_extract/adamantine
name = "adamantine slime extract"
icon_state = "adamantine slime extract"
_color = "adamantine"
////Pet Slime Creation///
@@ -164,6 +164,7 @@
flags = WHITELISTED | NO_BREATHE | HAS_LIPS | NO_INTORGANS
bloodflags = BLOOD_SLIME
bodyflags = FEET_NOSLIP
/datum/species/grey
+6
View File
@@ -111,6 +111,12 @@ var/list/department_radio_keys = list(
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
return
// undo last word status.
if(ishuman(src))
var/mob/living/carbon/human/H=src
if(H.said_last_words)
H.said_last_words=0
// Mute disability
if (sdisabilities & MUTE)
+14 -3
View File
@@ -32,6 +32,7 @@ var/list/ai_list = list()
var/obj/item/device/pda/ai/aiPDA = null
var/obj/item/device/multitool/aiMulti = null
var/custom_sprite = 0 //For our custom sprites
var/alienAI = 0
//Hud stuff
//MALFUNCTION
@@ -103,7 +104,13 @@ var/list/ai_list = list()
return
else
if (B.brainmob.mind)
B.brainmob.mind.transfer_to(src)
if(B.alien)
B.brainmob.mind.transfer_to(src)
icon_state = "ai-alien"
verbs.Remove(/mob/living/silicon/ai/verb/pick_icon)
laws = new /datum/ai_laws/alienmov
else
B.brainmob.mind.transfer_to(src)
src << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
src << "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>"
@@ -149,7 +156,7 @@ var/list/ai_list = list()
//if(icon_state == initial(icon_state))
var/icontype = ""
if (custom_sprite == 1) icontype = ("Custom")//automagically selects custom sprite if one is available
else icontype = input("Select an icon!", "AI", null, null) in list("Monochrome", "Blue", "Clown", "Inverted", "Text", "Smiley", "Angry", "Dorf", "Matrix", "Bliss", "Firewall", "Green", "Red", "Static", "Triumvirate", "Triumvirate Static")
else icontype = input("Select an icon!", "AI", null, null) in list("Monochrome", "Blue", "Clown", "Inverted", "Text", "Smiley", "Angry", "Dorf", "Matrix", "Bliss", "Firewall", "Green", "Red", "Static", "Triumvirate", "Triumvirate Static", "Red October")
switch(icontype)
if("Custom") icon_state = "[src.ckey]-ai"
if("Clown") icon_state = "ai-clown2"
@@ -167,6 +174,7 @@ var/list/ai_list = list()
if("Bliss") icon_state = "ai-bliss"
if("Triumvirate") icon_state = "ai-triumvirate"
if("Triumvirate Static") icon_state = "ai-triumvirate-malf"
if("Red October") icon_state = "ai-redoctober"
else icon_state = "ai"
//else
//usr <<"You can only change your display once!"
@@ -635,7 +643,8 @@ var/list/ai_list = list()
else
var/icon_list[] = list(
"default",
"floating face"
"floating face",
"xeno queen"
)
input = input("Please select a hologram:") as null|anything in icon_list
if(input)
@@ -645,6 +654,8 @@ var/list/ai_list = list()
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1"))
if("floating face")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo2"))
if("xeno queen")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo3"))
return
/mob/living/silicon/ai/proc/corereturn()
@@ -134,21 +134,27 @@
construction_cost = list("metal"=5000)
// TODO: actual icons ;)
/obj/item/robot_parts/robot_component/binary_communication_device
name = "binary communication device"
icon_state = "binary_translator"
/obj/item/robot_parts/robot_component/actuator
name = "actuator"
icon_state = "actuator"
/obj/item/robot_parts/robot_component/armour
name = "armour plating"
icon_state = "armor_plating"
/obj/item/robot_parts/robot_component/camera
name = "camera"
icon_state = "camera"
/obj/item/robot_parts/robot_component/diagnosis_unit
name = "diagnosis unit"
icon_state = "diagnosis_unit"
/obj/item/robot_parts/robot_component/radio
name = "radio"
icon_state = "radio"
+39 -23
View File
@@ -10,7 +10,6 @@
var/sight_mode = 0
var/custom_name = ""
var/custom_sprite = 0 //Due to all the sprites involved, a var for our custom borgs may be best
var/crisis //Admin-settable for combat module use.
//Hud stuff
@@ -73,29 +72,34 @@
ident = rand(1, 999)
updatename("Default")
updateicon()
if(mmi != null)
if(syndie)
if(!cell)
cell = new /obj/item/weapon/cell(src)
if(syndie)
if(!cell)
cell = new /obj/item/weapon/cell(src)
laws = new /datum/ai_laws/antimov()
lawupdate = 0
scrambledcodes = 1
cell.maxcharge = 25000
cell.charge = 25000
module = new /obj/item/weapon/robot_module/syndicate(src)
hands.icon_state = "standard"
icon_state = "secborg"
modtype = "Security"
else
laws = new /datum/ai_laws/nanotrasen()
connected_ai = select_active_ai_with_fewest_borgs()
if(connected_ai)
connected_ai.connected_robots += src
lawsync()
lawupdate = 1
else
laws = new /datum/ai_laws/antimov()
lawupdate = 0
scrambledcodes = 1
cell.maxcharge = 25000
cell.charge = 25000
module = new /obj/item/weapon/robot_module/syndicate(src)
hands.icon_state = "standard"
icon_state = "secborg"
modtype = "Security"
else
if(mmi.alien)
laws = new /datum/ai_laws/alienmov()
connected_ai = select_active_alien_ai()
scrambledcodes = 1
else
laws = new /datum/ai_laws/nanotrasen()
connected_ai = select_active_ai_with_fewest_borgs()
if(connected_ai)
connected_ai.connected_robots += src
lawsync()
lawupdate = 1
else
lawupdate = 0
radio = new /obj/item/device/radio/borg(src)
if(!scrambledcodes && !camera)
@@ -146,10 +150,13 @@
/mob/living/silicon/robot/proc/pick_module()
if(module)
return
var/list/modules = list("Standard", "Engineering", "Medical", "Miner", "Janitor", "Service", "Security")
if(crisis && security_level == SEC_LEVEL_RED) //Leaving this in until it's balanced appropriately.
if(security_level == SEC_LEVEL_RED)
src << "\red Crisis mode active. Combat module available."
modules+="Combat"
if(mmi != null && mmi.alien)
modules="Hunter"
modtype = input("Please, select a module!", "Robot", null, null) in modules
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
@@ -219,6 +226,15 @@
module = new /obj/item/weapon/robot_module/combat(src)
module_sprites["Combat Android"] = "droid-combat"
channels = list("Security" = 1)
if("Hunter")
updatename(module)
module = new /obj/item/weapon/robot_module/alien/hunter(src)
hands.icon_state = "standard"
icon = "icons/mob/alien.dmi"
icon_state = "xenoborg-state-a"
modtype = "Xeno-Hu"
feedback_inc("xeborg_hunter",1)
//Custom_sprite check and entry
if (custom_sprite == 1)
@@ -172,7 +172,7 @@
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
src.modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src)
src.modules += new /obj/item/weapon/pen/robopen(src)
src.modules += new /obj/item/device/violin(src)
src.modules += new /obj/item/weapon/razor(src)
var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src)
M.matter = 30
src.modules += M
@@ -232,4 +232,21 @@
src.modules += new /obj/item/borg/combat/mobility(src)
src.modules += new /obj/item/weapon/wrench(src) //Is a combat android really going to be stopped by a chair?
src.emag = new /obj/item/weapon/gun/energy/lasercannon/cyborg(src)
return
return
/obj/item/weapon/robot_module/alien/hunter
name = "alien hunter module"
New()
src.modules += new /obj/item/weapon/melee/energy/alien/claws(src)
src.modules += new /obj/item/device/flash/alien(src)
src.modules += new /obj/item/borg/sight/thermal/alien(src)
var/obj/item/weapon/reagent_containers/spray/alien/stun/S = new /obj/item/weapon/reagent_containers/spray/alien/stun(src)
S.reagents.add_reagent("stoxin",250) //nerfed to sleeptoxin to make it less instant drop.
src.modules += S
var/obj/item/weapon/reagent_containers/spray/alien/smoke/A = new /obj/item/weapon/reagent_containers/spray/alien/smoke(src)
S.reagents.add_reagent("water",50) //Water is used as a dummy reagent for the smoke bombs. More of an ammo counter.
src.modules += A
src.emag = new /obj/item/weapon/reagent_containers/spray/alien/acid(src)
src.emag.reagents.add_reagent("pacid", 125)
src.emag.reagents.add_reagent("sacid", 125)
+151 -51
View File
@@ -1,3 +1,6 @@
var/global/totaltribbles = 0 //global variable so it updates for all tribbles, not just the new one being made.
/mob/living/simple_animal/tribble
name = "tribble"
desc = "It's a small furry creature that makes a soft trill."
@@ -13,53 +16,27 @@
turns_per_move = 5
maxHealth = 10
health = 10
meat_type = /obj/item/stack/sheet/fur
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "whacks"
harm_intent_damage = 5
var/gestation = 0
var/maxtribbles = 50
var/list/tribble_list = list()
var/maxtribbles = 50 //change this to change the max limit
wander = 1
/mob/living/simple_animal/tribble/New()
..()
var/list/types = list("tribble1","tribble2","tribble3")
src.icon_state = pick(types)
src.icon_living = src.icon_state
src.icon_dead = "[src.icon_state]_dead"
//random pixel offsets so they cover the floor
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
tribble_list += src
totaltribbles += 1
/obj/item/toy/tribble
name = "tribble"
desc = "It's a small furry creature that makes a soft trill."
icon = 'icons/mob/tribbles.dmi'
icon_state = "tribble1"
item_state = "tribble1"
var/gestation = 0
/obj/item/toy/tribble/attack_self(mob/user as mob)
..()
new /mob/living/simple_animal/tribble(user.loc)
for(var/mob/living/simple_animal/tribble/T in user.loc)
T.icon_state = src.icon_state
T.icon_living = src.icon_state
T.icon_dead = "[src.icon_state]_dead"
T.gestation = src.gestation
user << "<span class='notice'>You place the tribble on the floor.</span>"
del(src)
/obj/item/toy/tribble/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob)
..()
if(istype(O, /obj/item/weapon/scalpel) && src.gestation != null)
gestation = null
user << "<span class='notice'>You neuter the tribble so that it can no longer re-produce.</span>"
else if (istype(O, /obj/item/weapon/cautery) && src.gestation == null)
gestation = 0
user << "<span class='notice'>You fuse some recently cut tubes together, it should be able to reproduce again.</span>"
/mob/living/simple_animal/tribble/attack_hand(mob/user as mob)
..()
@@ -73,19 +50,17 @@
user.put_in_active_hand(T)
del(src)
/mob/living/simple_animal/tribble/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/scalpel))
gestation = null
user << "<span class='notice'>You try to neuter the tribble so that it can no longer re-produce, but it's moving too much, and you fail!</span>"
user << "<span class='notice'>You try to neuter the tribble, but it's moving too much and you fail!</span>"
else if(istype(O, /obj/item/weapon/cautery))
user << "<span class='notice'>You try to un-neuter the tribble, but it's moving too much and you fail!</span>"
..()
/mob/living/simple_animal/tribble/proc/procreate()
..()
var/totaltribbles = 0
for(var/mob/living/simple_animal/tribble/T in tribble_list)
if(T.stat == CONSCIOUS && T.health >= 1)
totaltribbles++
if(totaltribbles <= maxtribbles)
for(var/mob/living/simple_animal/tribble/F in src.loc)
if(!F || F == src)
@@ -95,8 +70,8 @@
/mob/living/simple_animal/tribble/Life()
..()
if(src.health > 0)
if(gestation != null)
if(src.health > 0) //no mostly dead procreation
if(gestation != null) //neuter check
if(gestation < 30)
gestation++
else if(gestation >= 30)
@@ -104,7 +79,50 @@
src.procreate()
/obj/structure/tribble
/mob/living/simple_animal/tribble/Die() // Gotta make sure to remove tribbles from the list on death
..()
totaltribbles -= 1
//||Item version of the trible ||
/obj/item/toy/tribble
name = "tribble"
desc = "It's a small furry creature that makes a soft trill."
icon = 'icons/mob/tribbles.dmi'
icon_state = "tribble1"
item_state = "tribble1"
w_class = 10.0
var/gestation = 0
/obj/item/toy/tribble/attack_self(mob/user as mob) //hug that tribble (and play a sound if we add one)
..()
user << "<span class='notice'>You nuzzle the tribble and it trills softly.</span>"
/obj/item/toy/tribble/dropped(mob/user as mob) //now you can't item form them to get rid of them all so easily
..()
new /mob/living/simple_animal/tribble(user.loc)
for(var/mob/living/simple_animal/tribble/T in user.loc)
T.icon_state = src.icon_state
T.icon_living = src.icon_state
T.icon_dead = "[src.icon_state]_dead"
T.gestation = src.gestation
user << "<span class='notice'>The tribble gets up and wanders around.</span>"
del(src)
/obj/item/toy/tribble/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob) //neutering and un-neutering
..()
if(istype(O, /obj/item/weapon/scalpel) && src.gestation != null)
gestation = null
user << "<span class='notice'>You neuter the tribble so that it can no longer re-produce.</span>"
else if (istype(O, /obj/item/weapon/cautery) && src.gestation == null)
gestation = 0
user << "<span class='notice'>You fuse some recently cut tubes together, it should be able to reproduce again.</span>"
//|| Tribble Cage - Lovingly lifted from the lamarr-cage ||
/obj/structure/tribble_cage
name = "Lab Cage"
icon = 'icons/mob/tribbles.dmi'
icon_state = "labcage1"
@@ -116,7 +134,7 @@
var/occupied = 1
var/destroyed = 0
/obj/structure/tribble/ex_act(severity)
/obj/structure/tribble_cage/ex_act(severity)
switch(severity)
if (1)
new /obj/item/weapon/shard( src.loc )
@@ -132,27 +150,27 @@
src.healthcheck()
/obj/structure/tribble/bullet_act(var/obj/item/projectile/Proj)
/obj/structure/tribble_cage/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
..()
src.healthcheck()
return
/obj/structure/tribble/blob_act()
/obj/structure/tribble_cage/blob_act()
if (prob(75))
new /obj/item/weapon/shard( src.loc )
Break()
del(src)
/obj/structure/tribble/meteorhit(obj/O as obj)
/obj/structure/tribble_cage/meteorhit(obj/O as obj)
new /obj/item/weapon/shard( src.loc )
Break()
del(src)
/obj/structure/tribble/proc/healthcheck()
/obj/structure/tribble_cage/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
src.density = 0
@@ -164,7 +182,7 @@
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
return
/obj/structure/tribble/update_icon()
/obj/structure/tribble_cage/update_icon()
if(src.destroyed)
src.icon_state = "labcageb[src.occupied]"
else
@@ -172,16 +190,16 @@
return
/obj/structure/tribble/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/tribble_cage/attackby(obj/item/weapon/W as obj, mob/user as mob)
src.health -= W.force
src.healthcheck()
..()
return
/obj/structure/tribble/attack_paw(mob/user as mob)
/obj/structure/tribble_cage/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/structure/tribble/attack_hand(mob/user as mob)
/obj/structure/tribble_cage/attack_hand(mob/user as mob)
if (src.destroyed)
return
else
@@ -193,9 +211,91 @@
healthcheck()
return
/obj/structure/tribble/proc/Break()
/obj/structure/tribble_cage/proc/Break()
if(occupied)
new /mob/living/simple_animal/tribble( src.loc )
occupied = 0
update_icon()
return
return
//||Fur and Fur Products ||
/obj
var/f_amt = 0 // registers fur amount as an object variable
/obj/item/stack/sheet/fur //basic fur sheets (very lumpy furry piles of sheets)
name = "pile of fur"
desc = "The by-product of tribbles."
singular_name = "fur piece"
icon = 'icons/mob/tribbles.dmi'
icon_state = "sheet-fur"
origin_tech = "materials=2"
f_amt = 1000
max_amount = 50
/obj/item/clothing/ears/earmuffs/tribblemuffs //earmuffs but with tribbles
name = "earmuffs"
desc = "Protects your hearing from loud noises, and quiet ones as well."
icon = 'icons/mob/tribbles.dmi'
icon_state = "tribblemuffs"
item_state = "tribblemuffs"
f_amt = 2000
/obj/item/clothing/gloves/furgloves
desc = "These gloves are warm and furry."
name = "fur gloves"
icon = 'icons/mob/tribbles.dmi'
icon_state = "furglovesico"
item_state = "furgloves"
f_amt = 3000
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_COLD_PROTECITON_TEMPERATURE
/obj/item/clothing/head/furcap
name = "fur cap"
desc = "A warm furry cap."
icon = 'icons/mob/tribbles.dmi'
icon_state = "furcap"
item_state = "furcap"
f_amt = 5000
cold_protection = HEAD
min_cold_protection_temperature = HELMET_MIN_COLD_PROTECITON_TEMPERATURE
/obj/item/clothing/shoes/furboots
name = "fur boots"
desc = "Warm, furry boots."
icon = 'icons/mob/tribbles.dmi'
icon_state = "furboots"
item_state = "furboots"
f_amt = 4000
cold_protection = FEET
min_cold_protection_temperature = SHOE_MIN_COLD_PROTECITON_TEMPERATURE
/obj/item/clothing/suit/furcoat
name = "fur coat"
desc = "A trenchcoat made from fur. You could put an oxygen tank in one of the pockets."
icon = 'icons/mob/tribbles.dmi'
icon_state = "furcoat"
item_state = "furcoat"
blood_overlay_type = "armor"
f_amt = 15000
body_parts_covered = UPPER_TORSO|LEGS|ARMS|LOWER_TORSO
allowed = list (/obj/item/weapon/tank/emergency_oxygen)
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | ARMS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECITON_TEMPERATURE
/obj/item/clothing/suit/furcape
name = "fur cape"
desc = "A cape made from fur. You'll really be stylin' now."
icon = 'icons/mob/tribbles.dmi'
icon_state = "furcape"
item_state = "furcape"
blood_overlay_type = "armor"
f_amt = 10000
body_parts_covered = UPPER_TORSO|LEGS|ARMS
cold_protection = UPPER_TORSO | LEGS | ARMS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECITON_TEMPERATURE
+1 -1
View File
@@ -396,7 +396,7 @@
if(is_alien_whitelisted(src, client.prefs.language) || !config.usealienwhitelist || !(chosen_language.flags & WHITELISTED))
new_character.add_language("[client.prefs.language]")
if(ticker.random_players)
if(ticker.random_players || appearance_isbanned(new_character))
new_character.gender = pick(MALE, FEMALE)
client.prefs.real_name = random_name(new_character.gender)
client.prefs.randomize_appearance_for(new_character)
+4
View File
@@ -193,6 +193,10 @@
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
if(istype(in_chamber, /obj/item/projectile/beam/lastertag))
user.show_message("<span class = 'warning'>You feel rather silly, trying to commit suicide with a toy.</span>")
mouthshoot = 0
return
in_chamber.on_hit(M)
if (!in_chamber.nodamage)
user.apply_damage(in_chamber.damage*2.5, in_chamber.damage_type, "head", used_weapon = "Point blank shot in the mouth with \a [in_chamber]")
@@ -2598,3 +2598,89 @@
/obj/item/pizzabox/meat/New()
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza(src)
boxtag = "Meatlover's Supreme"
////////////////////////////////FOOD ADDITIONS////////////////////////////////////////////
/obj/item/weapon/reagent_containers/food/snacks/wrap
name = "egg wrap"
desc = "The precursor to Pigs in a Blanket."
icon_state = "wrap"
New()
..()
reagents.add_reagent("nutriment", 5)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/beans
name = "tin of beans"
desc = "Musical fruit in a slightly less musical container."
icon_state = "beans"
New()
..()
reagents.add_reagent("nutriment", 10)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/benedict
name = "eggs benedict"
desc = "There is only one egg on this, how rude."
icon_state = "benedict"
New()
..()
reagents.add_reagent("nutriment", 3)
bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/hotdog
name = "hotdog"
desc = "Fresh footlong ready to go down on."
icon_state = "hotdog"
New()
..()
reagents.add_reagent("nutriment", 3)
reagents.add_reagent("ketchup", 3)
bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/meatbun
name = "meat bun"
desc = "Has the potential to not be Dog."
icon_state = "meatbun"
New()
..()
reagents.add_reagent("nutriment", 6)
bitesize = 6
/obj/item/weapon/reagent_containers/food/snacks/icecreamsandwich
name = "icecream sandwich"
desc = "Portable Ice-cream in it's own packaging."
icon_state = "icecreamsandwich"
New()
..()
reagents.add_reagent("nutriment", 2)
reagents.add_reagent("ice", 2)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/notasandwich
name = "not-a-sandwich"
desc = "Something seems to be wrong with this, you can't quite figure what. Maybe it's his moustache."
icon_state = "notasandwich"
New()
..()
reagents.add_reagent("nutriment", 6)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/sugarcookie
name = "sugar cookie"
desc = "Just like your little sister used to make."
icon_state = "sugarcookie"
New()
..()
reagents.add_reagent("nutriment", 2)
reagents.add_reagent("sugar", 5)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/friedbanana
name = "Fried Banana"
desc = "Goreng Pisang, also known as fried bananas."
icon_state = "friedbanana"
New()
..()
reagents.add_reagent("sugar", 5)
reagents.add_reagent("nutriment", 8)
reagents.add_reagent("cornoil", 4)
+6 -1
View File
@@ -1,4 +1,4 @@
#define AUTOIGNITION_WELDERFUEL 561.15
/obj/structure/reagent_dispensers
name = "Dispenser"
@@ -154,6 +154,11 @@
ex_act()
explode()
temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature >= AUTOIGNITION_WELDERFUEL)
explode()
proc/explode()
if (reagents.total_volume > 500)
explosion(src.loc,1,2,4)
+11
View File
@@ -188,6 +188,17 @@
for(i=0,i<iter,i++)
step_towards(S,mob)
/datum/disease2/effect/catbeast
name = "Kingston Syndrome"
stage = 4
badness = 2
activate(var/mob/living/carbon/mob,var/multiplier)
if(istype(mob,/mob/living/carbon/human))
var/mob/living/carbon/human/h = mob
if(h.species.name != "Tajaran")
if(h.set_species("Tajaran"))
h.regenerate_icons()
////////////////////////STAGE 3/////////////////////////////////
/datum/disease2/effect/bones
+2
View File
@@ -519,6 +519,7 @@ var/list/liftable_structures = list(\
#define BANTYPE_JOB_PERMA 3
#define BANTYPE_JOB_TEMP 4
#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban.
#define BANTYPE_APPEARANCE 6
#define SEE_INVISIBLE_MINIMUM 5
@@ -750,6 +751,7 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse
#define FEET_CLAWS 1
#define FEET_PADDED 2
#define FEET_NOSLIP 4
//Language flags.
+1
View File
@@ -35,6 +35,7 @@
if(config.usealienwhitelist)
load_alienwhitelist()
jobban_loadbanfile()
appearance_loadbanfile()
jobban_updatelegacybans()
LoadBans()
Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 B

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 139 KiB

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