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

This commit is contained in:
Spamcat
2013-02-28 13:48:44 +04:00
39 changed files with 9773 additions and 9220 deletions

View File

@@ -63,6 +63,7 @@ var/global/obj/machinery/account_database/centcomm_account_db
var/access_level = 0
var/datum/money_account/detailed_account_view
var/creating_new_account = 0
var/activated = 1
/obj/machinery/account_database/New()
..()
@@ -81,6 +82,7 @@ var/global/obj/machinery/account_database/centcomm_account_db
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'>Toggle remote access to this database (warning!)</a>"
dat += "You may not edit accounts at this terminal, only create and view them.<br>"
if(creating_new_account)
dat += "<br>"
@@ -151,6 +153,10 @@ var/global/obj/machinery/account_database/centcomm_account_db
..()
/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("sync_accounts")
@@ -161,7 +167,7 @@ var/global/obj/machinery/account_database/centcomm_account_db
for(var/datum/money_account/M in A.accounts)
if(!src.accounts.Find(M))
src.accounts.Add(M)
usr << "\icon[src] <span class='info'>Accounts synched across all databases in range.</span>"
usr << "\icon[src] <span class='info'>Accounts synched across all NanoTrasen financial databases.</span>"
if("create_account")
creating_new_account = 1
@@ -215,6 +221,15 @@ var/global/obj/machinery/account_database/centcomm_account_db
src.attack_hand(usr)
/obj/machinery/account_database/proc/add_account_across_all(var/new_owner_name = "Default user", var/starting_funds = 0, var/pre_existing = 0)
var/datum/money_account/M = add_account(new_owner_name, starting_funds, pre_existing)
for(var/obj/machinery/account_database/D in world)
if(D == src)
continue
D.accounts.Add(M)
return M
/obj/machinery/account_database/proc/add_account(var/new_owner_name = "Default user", var/starting_funds = 0, var/pre_existing = 0)
//create a new account
@@ -274,6 +289,8 @@ var/global/obj/machinery/account_database/centcomm_account_db
return M
/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 accounts)
if(D.account_number == attempt_account_number)
D.money += amount
@@ -297,6 +314,8 @@ var/global/obj/machinery/account_database/centcomm_account_db
//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 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) )

View File

@@ -14,6 +14,17 @@
#define ANIMAL_RIGHTS_RAID 13
#define FESTIVAL 14
#define RESEARCH_BREAKTHROUGH 15
#define BARGAINS 16
#define SONG_DEBUT 17
#define MOVIE_RELEASE 18
#define BIG_GAME_HUNTERS 19
#define ELECTION 20
#define GOSSIP 21
#define TOURISM 22
#define CELEBRITY_DEATH 23
#define RESIGNATION 24
#define DEFAULT 1
#define ADMINISTRATIVE 2
@@ -54,10 +65,25 @@
var/setup_economy = 0
/proc/setup_economy()
if(setup_economy)
return
var/datum/feed_channel/newChannel = new /datum/feed_channel
newChannel.channel_name = "Tau Ceti Daily"
newChannel.author = "CentComm Minister of Information"
newChannel.locked = 1
newChannel.is_admin_channel = 1
news_network.network_channels += newChannel
setup_economy = 1
newChannel = new /datum/feed_channel
newChannel.channel_name = "The Gibson Gazette"
newChannel.author = "Editor Mike Hammers"
newChannel.locked = 1
newChannel.is_admin_channel = 1
news_network.network_channels += newChannel
for(var/loc_type in typesof(/datum/trade_destination) - /datum/trade_destination)
var/datum/trade_destination/D = new loc_type
weighted_randomevent_locations[D] = D.viable_random_events.len
weighted_mundaneevent_locations[D] = D.viable_mundane_events.len
setup_economy = 1

View File

@@ -11,11 +11,14 @@
if(!setup_economy)
setup_economy()
var/type = pick(tradeable_destinations)
affected_dest = new type()
affected_dest = pickweight(weighted_randomevent_locations)
if(affected_dest.viable_random_events.len)
endWhen = rand(60,300)
event_type = pick(affected_dest.viable_random_events)
if(!event_type)
return
switch(event_type)
if(RIOTS)
dearer_goods = list(SECURITY)
@@ -54,39 +57,42 @@
/datum/event/economic_event/announce()
//copy-pasted from the admin verbs to submit new newscaster messages
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = "NanoTrasen Editor"
newMsg.author = "Tau Ceti Daily"
newMsg.is_admin_message = 1
switch(event_type)
if(RIOTS)
newMsg.body = "[pick("Riots have","Unrest has")] broken out on planet [affected_dest.name]. Authorities call for calm, as [pick("various parties","rebellious elements","peacekeeping forces","\'REDACTED\'")] begin stockpiling weaponry and armour. Meanwhile, food and mineral prices are dropping as local industries attempt empty their stocks in expectation of looting."
if(WILD_ANIMAL_ATTACK)
newMsg.body = "Local [pick("wildlife","animal life","fauna")] on planet [affected_dest.name] has been increasing in agression and raiding outlying settlements for food. Big game hunters have been called in to help alleviate the problem, but numerous injuries have already occurred."
if(INDUSTRIAL_ACCIDENT)
newMsg.body = "[pick("An industrial accident","A smelting accident","A malfunction","A malfunctioning piece of machinery","Negligent maintenance","A cooleant leak","A ruptured conduit")] at a [pick("factory","installation","power plant","dockyards")] on [affected_dest.name] resulted in severe structural damage and numerous injuries. Repairs are ongoing."
if(BIOHAZARD_OUTBREAK)
newMsg.body = "[pick("A \'REDACTED\'","A biohazard","An outbreak","A virus")] on [affected_dest.name] has resulted in quarantine, stopping much shipping in the area. Although the quarantine is now lifted, authorities are calling for deliveries of medical supplies to treat the infected, and gas to replace contaminated stocks."
if(PIRATES)
newMsg.body = "[pick("Pirates","Criminal elements","A [pick("Syndicate","Donk Co.","Waffle Co.","\'REDACTED\'")] strike force")] have [pick("raided","blockaded","attempted to blackmail","attacked")] [affected_dest.name] today. Security has been tightened, but many valuable minerals were taken."
if(CORPORATE_ATTACK)
newMsg.body = "A small [pick("pirate","Cybersun Industries","Gorlex Marauders","Syndicate")] fleet has precise-jumped into proximity with [affected_dest.name], [pick("for a smash-and-grab operation","in a hit and run attack","in an overt display of hostilities")]. Much damage was done, and security has been tightened since the incident."
if(ALIEN_RAIDERS)
if(prob(20))
newMsg.body = "The Tiger Co-operative have raided [affected_dest.name] today, no doubt on orders from their enigmatic masters. Stealing wildlife, farm animals, medical research materials and kidnapping civilians. NanoTrasen authorities are standing by to counter attempts at bio-terrorism."
else
newMsg.body = "[pick("The alien species designated \'United Exolitics\'","The alien species designated \'REDACTED\'","An unknown alien species")] have raided [affected_dest.name] today, stealing wildlife, farm animals, medical research materials and kidnapping civilians. It seems they desire to learn more about us, so the Navy will be standing by to accomodate them next time they try."
if(AI_LIBERATION)
newMsg.body = "A [pick("\'REDACTED\' was detected on","S.E.L.F operative infiltrated","malignant computer virus was detected on","rogue [pick("slicer","hacker")] was apprehended on")] [affected_dest.name] today, and managed to infect [pick("\'REDACTED\'","a sentient sub-system","a class one AI","a sentient defence installation")] before it could be stopped. Many lives were lost as it systematically begin murdering civilians, and considerable work must be done to repair the affected areas."
if(MOURNING)
newMsg.body = "[pick("The popular","The well-liked","The eminent","The well-known")] [pick("professor","entertainer","singer","researcher","public servant","administrator","ship captain","\'REDACTED\'")], [pick( random_name(pick(MALE,FEMALE)), 40; "\'REDACTED\'" )] has [pick("passed away","committed suicide","been murdered","died in a freakish accident")] on [affected_dest.name] today. The entire planet is in mourning, and prices have dropped for industrial goods as worker morale drops."
if(CULT_CELL_REVEALED)
newMsg.body = "A [pick("dastardly","blood-thirsty","villanous","crazed")] cult of [pick("The Elder Gods","Nar'sie","an apocalyptic sect","\'REDACTED\'")] has [pick("been discovered","been revealed","revealed themselves","gone public")] on [affected_dest.name] earlier today. Public morale has been shaken due to [pick("certain","several","one or two")] [pick("high-profile","well known","popular")] individuals [pick("performing \'REDACTED\' acts","claiming allegiance to the cult","swearing loyalty to the cult leader","promising to aid to the cult")] before those involved could be brought to justice. The editor reminds all personnel that supernatural myths will not be tolerated on NanoTrasen facilities."
if(SECURITY_BREACH)
newMsg.body = "There was [pick("a security breach in","an unauthorised access in","an attempted theft in","an anarchist attack in","violent sabotage of")] a [pick("high-security","restricted access","classified","\'REDACTED\'")] [pick("\'REDACTED\'","section","zone","area")] this morning. Security was tightened on [affected_dest.name] after the incident, and the editor reassures all NanoTrasen personnel that such lapses are rare."
if(ANIMAL_RIGHTS_RAID)
newMsg.body = "[pick("Militant animal rights activists","Members of the terrorist group Animal Rights Consortium","Members of the terrorist group \'REDACTED\'")] have [pick("launched a campaign of terror","unleashed a swathe of destruction","raided farms and pastures","forced entry to \'REDACTED\'")] on [affected_dest.name] earlier today, freeing numerous [pick("farm animals","animals","\'REDACTED\'")]. Prices for tame and breeding animals have spiked as a result."
if(FESTIVAL)
newMsg.body = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been declared on [affected_dest.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter")]","coming of age of their [pick("son","daughter")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet."
//see if our location has custom event info for this event
newMsg.body = affected_dest.get_custom_eventstring()
if(!newMsg.body)
switch(event_type)
if(RIOTS)
newMsg.body = "[pick("Riots have","Unrest has")] broken out on planet [affected_dest.name]. Authorities call for calm, as [pick("various parties","rebellious elements","peacekeeping forces","\'REDACTED\'")] begin stockpiling weaponry and armour. Meanwhile, food and mineral prices are dropping as local industries attempt empty their stocks in expectation of looting."
if(WILD_ANIMAL_ATTACK)
newMsg.body = "Local [pick("wildlife","animal life","fauna")] on planet [affected_dest.name] has been increasing in agression and raiding outlying settlements for food. Big game hunters have been called in to help alleviate the problem, but numerous injuries have already occurred."
if(INDUSTRIAL_ACCIDENT)
newMsg.body = "[pick("An industrial accident","A smelting accident","A malfunction","A malfunctioning piece of machinery","Negligent maintenance","A cooleant leak","A ruptured conduit")] at a [pick("factory","installation","power plant","dockyards")] on [affected_dest.name] resulted in severe structural damage and numerous injuries. Repairs are ongoing."
if(BIOHAZARD_OUTBREAK)
newMsg.body = "[pick("A \'REDACTED\'","A biohazard","An outbreak","A virus")] on [affected_dest.name] has resulted in quarantine, stopping much shipping in the area. Although the quarantine is now lifted, authorities are calling for deliveries of medical supplies to treat the infected, and gas to replace contaminated stocks."
if(PIRATES)
newMsg.body = "[pick("Pirates","Criminal elements","A [pick("Syndicate","Donk Co.","Waffle Co.","\'REDACTED\'")] strike force")] have [pick("raided","blockaded","attempted to blackmail","attacked")] [affected_dest.name] today. Security has been tightened, but many valuable minerals were taken."
if(CORPORATE_ATTACK)
newMsg.body = "A small [pick("pirate","Cybersun Industries","Gorlex Marauders","Syndicate")] fleet has precise-jumped into proximity with [affected_dest.name], [pick("for a smash-and-grab operation","in a hit and run attack","in an overt display of hostilities")]. Much damage was done, and security has been tightened since the incident."
if(ALIEN_RAIDERS)
if(prob(20))
newMsg.body = "The Tiger Co-operative have raided [affected_dest.name] today, no doubt on orders from their enigmatic masters. Stealing wildlife, farm animals, medical research materials and kidnapping civilians. NanoTrasen authorities are standing by to counter attempts at bio-terrorism."
else
newMsg.body = "[pick("The alien species designated \'United Exolitics\'","The alien species designated \'REDACTED\'","An unknown alien species")] have raided [affected_dest.name] today, stealing wildlife, farm animals, medical research materials and kidnapping civilians. It seems they desire to learn more about us, so the Navy will be standing by to accomodate them next time they try."
if(AI_LIBERATION)
newMsg.body = "A [pick("\'REDACTED\' was detected on","S.E.L.F operative infiltrated","malignant computer virus was detected on","rogue [pick("slicer","hacker")] was apprehended on")] [affected_dest.name] today, and managed to infect [pick("\'REDACTED\'","a sentient sub-system","a class one AI","a sentient defence installation")] before it could be stopped. Many lives were lost as it systematically begin murdering civilians, and considerable work must be done to repair the affected areas."
if(MOURNING)
newMsg.body = "[pick("The popular","The well-liked","The eminent","The well-known")] [pick("professor","entertainer","singer","researcher","public servant","administrator","ship captain","\'REDACTED\'")], [pick( random_name(pick(MALE,FEMALE)), 40; "\'REDACTED\'" )] has [pick("passed away","committed suicide","been murdered","died in a freakish accident")] on [affected_dest.name] today. The entire planet is in mourning, and prices have dropped for industrial goods as worker morale drops."
if(CULT_CELL_REVEALED)
newMsg.body = "A [pick("dastardly","blood-thirsty","villanous","crazed")] cult of [pick("The Elder Gods","Nar'sie","an apocalyptic sect","\'REDACTED\'")] has [pick("been discovered","been revealed","revealed themselves","gone public")] on [affected_dest.name] earlier today. Public morale has been shaken due to [pick("certain","several","one or two")] [pick("high-profile","well known","popular")] individuals [pick("performing \'REDACTED\' acts","claiming allegiance to the cult","swearing loyalty to the cult leader","promising to aid to the cult")] before those involved could be brought to justice. The editor reminds all personnel that supernatural myths will not be tolerated on NanoTrasen facilities."
if(SECURITY_BREACH)
newMsg.body = "There was [pick("a security breach in","an unauthorised access in","an attempted theft in","an anarchist attack in","violent sabotage of")] a [pick("high-security","restricted access","classified","\'REDACTED\'")] [pick("\'REDACTED\'","section","zone","area")] this morning. Security was tightened on [affected_dest.name] after the incident, and the editor reassures all NanoTrasen personnel that such lapses are rare."
if(ANIMAL_RIGHTS_RAID)
newMsg.body = "[pick("Militant animal rights activists","Members of the terrorist group Animal Rights Consortium","Members of the terrorist group \'REDACTED\'")] have [pick("launched a campaign of terror","unleashed a swathe of destruction","raided farms and pastures","forced entry to \'REDACTED\'")] on [affected_dest.name] earlier today, freeing numerous [pick("farm animals","animals","\'REDACTED\'")]. Prices for tame and breeding animals have spiked as a result."
if(FESTIVAL)
newMsg.body = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been declared on [affected_dest.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter")]","coming of age of their [pick("son","daughter")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet."
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == "Tau Ceti Daily")

View File

@@ -0,0 +1,233 @@
/datum/event/mundane_news
endWhen = 10
/datum/event/mundane_news/announce()
var/datum/trade_destination/affected_dest = pickweight(weighted_mundaneevent_locations)
var/event_type = 0
if(affected_dest.viable_mundane_events.len)
event_type = pick(affected_dest.viable_mundane_events)
if(!event_type)
return
//copy-pasted from the admin verbs to submit new newscaster messages
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = "Tau Ceti Daily"
newMsg.is_admin_message = 1
//see if our location has custom event info for this event
newMsg.body = affected_dest.get_custom_eventstring()
if(!newMsg.body)
newMsg.body = ""
switch(event_type)
if(RESEARCH_BREAKTHROUGH)
newMsg.body = "A major breakthough in the field of [pick("plasma research","super-compressed materials","nano-augmentation","bluespace research","volatile power manipulation")] \
was announced [pick("yesterday","a few days ago","last week","earlier this month")] by a private firm on [affected_dest.name]. \
NanoTrasen declined to comment as to whether this could impinge on profits."
if(ELECTION)
newMsg.body = "The pre-selection of an additional candidates was announced for the upcoming [pick("supervisors council","advisory board","governership","board of inquisitors")] \
election on [affected_dest.name] was announced earlier today, \
[pick("media mogul","web celebrity", "industry titan", "superstar", "famed chef", "popular gardener", "ex-army officer", "multi-billionaire")] \
[random_name(pick(MALE,FEMALE))]. In a statement to the media they said '[pick("My only goal is to help the [pick("sick","poor","children")]",\
"I will maintain NanoTrasen's record profits","I believe in our future","We must return to our moral core","Just like... chill out dudes")]'."
if(RESIGNATION)
newMsg.body = "NanoTrasen regretfully announces the resignation of [pick("Sector Admiral","Division Admiral","Ship Admiral","Vice Admiral")] [random_name(pick(MALE,FEMALE))]."
if(prob(25))
var/locstring = pick("Segunda","Salusa","Cepheus","Andromeda","Gruis","Corona","Aquila","Asellus") + " " + pick("I","II","III","IV","V","VI","VII","VIII")
newMsg.body += " In a ceremony on [affected_dest.name] this afternoon, they will be awarded the \
[pick("Red Star of Sacrifice","Purple Heart of Heroism","Blue Eagle of Loyalty","Green Lion of Ingenuity")] for "
if(prob(33))
newMsg.body += "their actions at the Battle of [pick(locstring,"REDACTED")]."
else if(prob(50))
newMsg.body += "their contribution to the colony of [locstring]."
else
newMsg.body += "their loyal service over the years."
else if(prob(33))
newMsg.body += " They are expected to settle down in [affected_dest.name], where they have been granted a handsome pension."
else if(prob(50))
newMsg.body += " The news was broken on [affected_dest.name] earlier today, where they cited reasons of '[pick("health","family","REDACTED")]'"
else
newMsg.body += " Administration Aerospace wishes them the best of luck in their retirement ceremony on [affected_dest.name]."
if(CELEBRITY_DEATH)
newMsg.body = "It is with regret today that we announce the sudden passing of the "
if(prob(33))
newMsg.body += "[pick("distinguished","decorated","veteran","highly respected")] \
[pick("Ship's Captain","Vice Admiral","Colonel","Lieutenant Colonel")] "
else if(prob(50))
newMsg.body += "[pick("award-winning","popular","highly respected","trend-setting")] \
[pick("comedian","singer/songwright","artist","playwright","TV personality","model")] "
else
newMsg.body += "[pick("successful","highly respected","ingenious","esteemed")] \
[pick("academic","Professor","Doctor","Scientist")] "
newMsg.body += "[random_name(pick(MALE,FEMALE))] on [affected_dest.name] [pick("last week","yesterday","this morning","two days ago","three days ago")]\
[pick(". Assassination is suspected, but the perpetrators have not yet been brought to justice",\
" due to Syndicate infiltrators (since captured)",\
" during an industrial accident",\
" due to [pick("heart failure","kidney failure","liver failure","brain hemorrhage")]")]"
if(BARGAINS)
newMsg.body += "BARGAINS! BARGAINS! BARGAINS! Commerce Control on [affected_dest.name] wants you to know that everything must go! Across all retail centres, \
all goods are being slashed, and all retailors are onboard - so come on over for the \[shopping\] time of your life."
if(SONG_DEBUT)
newMsg.body += "[pick("Singer","Singer/songwriter","Saxophonist","Pianist","Guitarist","TV personality","Star")] [random_name(pick(MALE,FEMALE))] \
announced the debut of their new [pick("single","album","EP","label")] '[pick("Everyone's","Look at the","Baby don't eye those","All of those","Dirty nasty")] \
[pick("roses","three stars","starships","nanobots","cyborgs","Skrell","Sren'darr")] \
[pick("on Venus","on Reade","on Moghes","in my hand","slip through my fingers","die for you","sing your heart out","fly away")]' \
with [pick("pre-puchases available","a release tour","cover signings","a launch concert")] on [affected_dest.name]."
if(MOVIE_RELEASE)
newMsg.body += "From the [pick("desk","home town","homeworld","mind")] of [pick("acclaimed","award-winning","popular","stellar")] \
[pick("playwright","author","director","actor","TV star")] [random_name(pick(MALE,FEMALE))] comes the latest sensation: '\
[pick("Deadly","The last","Lost","Dead")] [pick("Starships","Warriors","outcasts","Tajarans","Unathi","Skrell")] \
[pick("of","from","raid","go hunting on","visit","ravage","pillage","destroy")] \
[pick("Moghes","Earth","Biesel","Ahdomai","S'randarr","the Void","the Edge of Space")]'.\
. Own it on webcast today, or visit the galactic premier on [affected_dest.name]!"
if(BIG_GAME_HUNTERS)
newMsg.body += "Game hunters on [affected_dest.name] "
if(prob(33))
newMsg.body += "were surprised when an unusual species experts have since identified as \
[pick("a subclass of mammal","a divergent abhuman species","an intelligent species of lemur","organic/cyborg hybrids")] turned up. Believed to have been brought in by \
[pick("alien smugglers","early colonists","syndicate raiders","unwitting tourists")], this is the first such specimen discovered in the wild."
else if(prob(50))
newMsg.body += "were attacked by a vicious [pick("nas'r","diyaab","samak","predator which has not yet been identified")]\
. Officials urge caution, and locals are advised to stock up on armaments."
else
newMsg.body += "brought in an unusually [pick("valuable","rare","large","vicious","intelligent")] [pick("mammal","predator","farwa","samak")] for inspection \
[pick("today","yesterday","last week")]. Speculators suggest they may be tipped to break several records."
if(GOSSIP)
newMsg.body += "[pick("TV host","Webcast personality","Superstar","Model","Actor","Singer")] [random_name(pick(MALE,FEMALE))] "
if(prob(33))
newMsg.body += "and their partner announced the birth of their [pick("first","second","third")] child on [affected_dest.name] early this morning. \
Doctors say the child is well, and the parents are considering "
if(prob(50))
newMsg.body += capitalize(pick(first_names_female))
else
newMsg.body += capitalize(pick(first_names_male))
newMsg.body += " for the name."
else if(prob(50))
newMsg.body += "announced their [pick("split","break up","marriage","engagement")] with [pick("TV host","webcast personality","superstar","model","actor","singer")] \
[random_name(pick(MALE,FEMALE))] at [pick("a society ball","a new opening","a launch","a club")] on [affected_dest.name] yesterday, pundits are shocked."
else
newMsg.body += "is recovering from plastic surgery in a clinic on [affected_dest.name] for the [pick("second","third","fourth")] time, reportedly having made the decision in response to "
newMsg.body += "[pick("unkind comments by an ex","rumours started by jealous friends",\
"the decision to be dropped by a major sponsor","a disasterous interview on Tau Ceti Tonight")]."
if(TOURISM)
newMsg.body += "Tourists are flocking to [affected_dest.name] after the surprise announcement of [pick("major shopping bargains by a wily retailer",\
"a huge new ARG by a popular entertainment company","a secret tour by popular artiste [random_name(pick(MALE,FEMALE))]")]. \
Tau Ceti Daily is offering discount tickets for two to see [random_name(pick(MALE,FEMALE))] live in return for eyewitness reports and up to the minute coverage."
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == "Tau Ceti Daily")
FC.messages += newMsg
break
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.newsAlert("Tau Ceti Daily")
/datum/event/trivial_news
endWhen = 10
/datum/event/trivial_news/announce()
//copy-pasted from the admin verbs to submit new newscaster messages
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = "Editor Mike Hammers"
//newMsg.is_admin_message = 1
var/datum/trade_destination/affected_dest = pick(weighted_mundaneevent_locations)
newMsg.body = pick(
"Tree stuck in tajaran; firefighters baffled.",\
"Armadillos want aardvarks removed from dictionary claims 'here first'.",\
"Angel found dancing on pinhead ordered to stop; cited for public nuisance.",\
"Letters claim they are better than number; 'Always have been'.",\
"Pens proclaim pencils obsolete, 'lead is dead'.",\
"Rock and paper sues scissors for discrimination.",\
"Steak tell-all book reveals he never liked sitting by potato.",\
"Woodchuck stops counting how many times he<68>s chucked 'Never again'.",\
"[affected_dest.name] clerk first person able to pronounce '@*$%!'.",\
"[affected_dest.name] delis serving boiled paperback dictionaries, 'Adjectives chewy' customers declare.",\
"[affected_dest.name] weather deemed 'boring'; meteors and rad storms to be imported.",\
"Most [affected_dest.name] security officers prefer cream over sugar.",\
"Palindrome speakers conference in [affected_dest.name]; 'Wow!' says Otto.",\
"Question mark worshipped as deity by ancient [affected_dest.name] dwellers.",\
"Spilled milk causes whole [affected_dest.name] populace to cry.",\
"World largest carp patty at display on [affected_dest.name].",\
"'Here kitty kitty' no longer preferred tajaran retrieval technique.",\
"Man travels 7000 light years to retrieve lost hankie, 'It was my favourite'.",\
"New bowling lane that shoots mini-meteors at bowlers very popular.",\
"[pick("Unathi","Spacer")] gets tattoo of Tau Ceti on chest '[pick("CentComm","star","starship","asteroid")] tickles most'.",\
"Skrell marries computer; wedding attended by 100 modems.",\
"Chef reports successfully using harmonica as cheese grater.",\
"NanoTrasen invents handkerchief that says 'Bless you' after sneeze.",\
"Clone accused of posing for other clones<65>s school photo.",\
"Clone accused of stealing other clones<65>s employee of the month award.",\
"Woman robs station with hair dryer; crewmen love new style.",\
"This space for rent.",\
"[affected_dest.name] Baker Wins Pickled Crumpet Toss Three Years Running",\
"Skrell Scientist Discovers Abacus Can Be Used To Dry Towels",\
"Survey: 'Cheese Louise' Voted Best Pizza Restaurant In Tau Ceti",\
"I Was Framed, jokes [affected_dest.name] artist",\
"Mysterious Loud Rumbling Noises In [affected_dest.name] Found To Be Mysterious Loud Rumblings",\
"Alien ambassador becomes lost on [affected_dest.name], refuses to ask for directions",\
"Swamp Gas Verified To Be Exhalations Of Stars--Movie Stars--Long Passed",\
"Tainted Broccoli Weapon Of Choice For Syndicate Assassins",\
"Chefs Find Broccoli Effective Tool For Cutting Cheese",\
"Broccoli Found To Cause Grumpiness In Monkeys",\
"Survey: 80% Of People on [affected_dest.name] Love Clog-Dancing",\
"Giant Hairball Has Perfect Grammar But Rolls rr's Too Much, Linguists Say",\
"[affected_dest.name] Phonebooks Print All Wrong Numbers; Results In 15 New Marriages",\
"Tajaran Burglar Spotted on [affected_dest.name], Mistaken For Dalmatian",\
"Gibson Gazette Updates Frequently Absurd, Poll Indicates",\
"Esoteric Verbosity Culminates In Communicative Ennui, [affected_dest.name] Academics Note",\
"Taj Demand Longer Breaks, Cleaner Litter, Slower Mice",\
"Survey: 3 Out Of 5 Skrell Loathe Modern Art",\
"Skrell Scientist Discovers Gravity While Falling Down Stairs",\
"Boy Saves Tajaran From Tree on [affected_dest.name], Thousands Cheer",\
"Shipment Of Apples Overturns, [affected_dest.name] Diner Offers Applesauce Special",\
"Spotted Owl Spotted on [affected_dest.name]",\
"Humans Everywhere Agree: Purring Tajarans Are Happy Tajarans",\
"From The Desk Of Wise Guy Sammy: One Word In This Gazette Is Sdrawkcab",\
"From The Desk Of Wise Guy Sammy: It's Hard To Have Too Much Shelf Space",\
"From The Desk Of Wise Guy Sammy: Wine And Friendships Get Better With Age",\
"From The Desk Of Wise Guy Sammy: The Insides Of Golf Balls Are Mostly Rubber Bands",\
"From The Desk Of Wise Guy Sammy: You Don't Have To Fool All The People, Just The Right Ones",\
"From The Desk Of Wise Guy Sammy: If You Made The Mess, You Clean It Up",\
"From The Desk Of Wise Guy Sammy: It Is Easier To Get Forgiveness Than Permission",\
"From The Desk Of Wise Guy Sammy: Check Your Facts Before Making A Fool Of Yourself",\
"From The Desk Of Wise Guy Sammy: You Can't Outwait A Bureaucracy",\
"From The Desk Of Wise Guy Sammy: It's Better To Yield Right Of Way Than To Demand It",\
"From The Desk Of Wise Guy Sammy: A Person Who Likes Cats Can't Be All Bad",\
"From The Desk Of Wise Guy Sammy: Help Is The Sunny Side Of Control",\
"From The Desk Of Wise Guy Sammy: Two Points Determine A Straight Line",\
"From The Desk Of Wise Guy Sammy: Reading Improves The Mind And Lifts The Spirit",\
"From The Desk Of Wise Guy Sammy: Better To Aim High And Miss Then To Aim Low And Hit",\
"From The Desk Of Wise Guy Sammy: Meteors Often Strike The Same Place More Than Once",\
"Tommy B. Saif Sez: Look Both Ways Before Boarding The Shuttle",\
"Tommy B. Saif Sez: Hold On; Sudden Stops Sometimes Necessary",\
"Tommy B. Saif Sez: Keep Fingers Away From Moving Panels",\
"Tommy B. Saif Sez: No Left Turn, Except Shuttles",\
"Tommy B. Saif Sez: Return Seats And Trays To Their Proper Upright Position",\
"Tommy B. Saif Sez: Eating And Drinking In Docking Bays Is Prohibited",\
"Tommy B. Saif Sez: Accept No Substitutes, And Don't Be Fooled By Imitations",\
"Tommy B. Saif Sez: Do Not Remove This Tag Under Penalty Of Law",\
"Tommy B. Saif Sez: Always Mix Thoroughly When So Instructed",\
"Tommy B. Saif Sez: Try To Keep Six Month's Expenses In Reserve",\
"Tommy B. Saif Sez: Change Not Given Without Purchase",\
"Tommy B. Saif Sez: If You Break It, You Buy It",\
"Tommy B. Saif Sez: Reservations Must Be Cancelled 48 Hours Prior To Event To Obtain Refund",\
"Doughnuts: Is There Anything They Can't Do",\
"If Tin Whistles Are Made Of Tin, What Do They Make Foghorns Out Of?",\
"Broccoli discovered to be colonies of tiny aliens with murder on their minds"\
)
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == "The Gibson Gazette")
FC.messages += newMsg
break
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.newsAlert("The Gibson Gazette")

View File

@@ -1,4 +1,7 @@
var/list/weighted_randomevent_locations = list()
var/list/weighted_mundaneevent_locations = list()
/datum/trade_destination
var/name = ""
var/description = ""
@@ -8,6 +11,10 @@
var/can_shuttle_here = 0 //one day crew from the exodus will be able to travel to this destination
var/list/viable_random_events = list()
var/list/temp_price_change[BIOMEDICAL]
var/list/viable_mundane_events = list()
/datum/trade_destination/proc/get_custom_eventstring(var/event_type)
return null
//distance is measured in AU and co-relates to travel time
/datum/trade_destination/centcomm
@@ -17,6 +24,7 @@
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(SECURITY_BREACH, CORPORATE_ATTACK, AI_LIBERATION)
viable_mundane_events = list(ELECTION, RESIGNATION, CELEBRITY_DEATH)
/datum/trade_destination/anansi
name = "NSS Anansi"
@@ -25,6 +33,13 @@
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(SECURITY_BREACH, CULT_CELL_REVEALED, BIOHAZARD_OUTBREAK, PIRATES, ALIEN_RAIDERS)
viable_mundane_events = list(RESEARCH_BREAKTHROUGH, RESEARCH_BREAKTHROUGH, BARGAINS, GOSSIP)
/datum/trade_destination/anansi/get_custom_eventstring(var/event_type)
if(event_type == RESEARCH_BREAKTHROUGH)
return "Thanks to research conducted on the NSS Anansi, Second Red Cross Society wishes to announce a major breakthough in the field of \
[pick("mind-machine interfacing","neuroscience","nano-augmentation","genetics")]. NanoTrasen is expected to announce a co-exploitation deal within the fortnight."
return null
/datum/trade_destination/icarus
name = "NMV Icarus"
@@ -41,6 +56,13 @@
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(INDUSTRIAL_ACCIDENT, PIRATES, CORPORATE_ATTACK)
viable_mundane_events = list(RESEARCH_BREAKTHROUGH, RESEARCH_BREAKTHROUGH)
/datum/trade_destination/redolant/get_custom_eventstring(var/event_type)
if(event_type == RESEARCH_BREAKTHROUGH)
return "Thanks to research conducted on the OAV Redolant, Osiris Atmospherics wishes to announce a major breakthough in the field of \
[pick("plasma research","high energy flux capacitance","super-compressed materials","theoretical particle physics")]. NanoTrasen is expected to announce a co-exploitation deal within the fortnight."
return null
/datum/trade_destination/beltway
name = "Beltway mining chain"
@@ -49,6 +71,7 @@
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(PIRATES, INDUSTRIAL_ACCIDENT)
viable_mundane_events = list(TOURISM)
/datum/trade_destination/biesel
name = "Biesel"
@@ -57,6 +80,7 @@
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(RIOTS, INDUSTRIAL_ACCIDENT, BIOHAZARD_OUTBREAK, CULT_CELL_REVEALED, FESTIVAL, MOURNING)
viable_mundane_events = list(BARGAINS, GOSSIP, SONG_DEBUT, MOVIE_RELEASE, ELECTION, TOURISM, RESIGNATION, CELEBRITY_DEATH)
/datum/trade_destination/new_gibson
name = "New Gibson"
@@ -65,6 +89,7 @@
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(RIOTS, INDUSTRIAL_ACCIDENT, BIOHAZARD_OUTBREAK, CULT_CELL_REVEALED, FESTIVAL, MOURNING)
viable_mundane_events = list(ELECTION, TOURISM, RESIGNATION)
/datum/trade_destination/luthien
name = "Luthien"
@@ -73,6 +98,7 @@
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(WILD_ANIMAL_ATTACK, CULT_CELL_REVEALED, FESTIVAL, MOURNING, ANIMAL_RIGHTS_RAID, ALIEN_RAIDERS)
viable_mundane_events = list(ELECTION, TOURISM, BIG_GAME_HUNTERS, RESIGNATION)
/datum/trade_destination/reade
name = "Reade"
@@ -81,5 +107,4 @@
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(WILD_ANIMAL_ATTACK, CULT_CELL_REVEALED, FESTIVAL, MOURNING, ANIMAL_RIGHTS_RAID, ALIEN_RAIDERS)
var/list/tradeable_destinations = typesof(/datum/trade_destination) - /datum/trade_destination
viable_mundane_events = list(ELECTION, TOURISM, BIG_GAME_HUNTERS, RESIGNATION)

View File

@@ -1,4 +1,30 @@
////////////////////////////////////////
// External Shield Generator
/obj/item/weapon/circuitboard/shield_gen_ex
name = "Circuit board (Experimental hull shield generator)"
board_type = "machine"
build_path = "/obj/machinery/shield_gen/external"
origin_tech = "bluespace=4;plasmatech=3"
frame_desc = "Requires 2 Pico Manipulators, 1 Subspace Transmitter, 5 Pieces of cable, 1 Subspace Crystal, 1 Subspace Amplifier and 1 Console Screen."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
"/obj/item/weapon/stock_parts/subspace/transmitter" = 1,
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
"/obj/item/weapon/stock_parts/subspace/amplifier" = 1,
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/cable_coil" = 5)
datum/design/shield_gen_ex
name = "Circuit Design (Experimental hull shield generator)"
desc = "Allows for the construction of circuit boards used to build an experimental hull shield generator."
id = "shield_gen"
req_tech = list("bluespace" = 4, "plasmatech" = 3)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 10000, "$diamond" = 5000, "$gold" = 10000)
build_path = "/obj/machinery/shield_gen/external"
////////////////////////////////////////
// Shield Generator
@@ -17,8 +43,8 @@
"/obj/item/weapon/cable_coil" = 5)
datum/design/shield_gen
name = "Circuit Design (Experimental hull shield generator)"
desc = "Allows for the construction of circuit boards used to build an experimental hull shield generator."
name = "Circuit Design (Experimental shield generator)"
desc = "Allows for the construction of circuit boards used to build an experimental shield generator."
id = "shield_gen"
req_tech = list("bluespace" = 4, "plasmatech" = 3)
build_type = IMPRINTER

View File

@@ -9,38 +9,41 @@
anchored = 1
layer = 2.1
density = 0
invisibility = 2
invisibility = 101
var/strength = 0
var/obj/machinery/shield_gen/parent
var/stress = 0
/obj/effect/energy_field/ex_act(var/severity)
Stress(0.5 + severity)
/obj/effect/energy_field/bullet_act(var/obj/item/projectile/Proj)
Stress(1 + 1 * (Proj.damage / 100))
Stress(Proj.damage / 10)
/obj/effect/energy_field/meteorhit(obj/effect/meteor/M as obj)
if(M)
walk(M,0)
Stress(2)
/obj/effect/energy_field/proc/Stress(var/severity)
strength -= severity
stress += severity
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
if(strength < 1)
invisibility = 2
invisibility = 101
density = 0
else if(strength >= 1)
invisibility = 0
density = 1
/obj/effect/energy_field/proc/Strengthen(var/severity)
strength += severity
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
if(strength > 1)
if(strength >= 1)
invisibility = 0
density = 1
else if(strength < 1)
invisibility = 101
density = 0
/obj/effect/energy_field/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
//Purpose: Determines if the object (or airflow) can pass this atom.
@@ -49,4 +52,4 @@
//Outputs: Boolean if can pass.
//return (!density || !height || air_group)
return density
return !density

View File

@@ -10,7 +10,6 @@
var/active = 1
density = 1
anchored = 1
var/obj/machinery/shield_gen/target_generator
var/stored_charge = 0
var/time_since_fail = 100
var/max_charge = 1000000
@@ -29,39 +28,84 @@
spawn(10)
for(var/obj/machinery/shield_gen/possible_gen in range(1, src))
if(get_dir(src, possible_gen) == src.dir)
target_generator = possible_gen
possible_gen.owned_capacitor = src
break
..()
/obj/machinery/shield_capacitor/verb/rotate()
set name = "Rotate Clockwise"
set category = "Object"
set src in oview(1)
/obj/machinery/shield_capacitor/attackby(obj/item/W, mob/user)
if (src.anchored || usr:stat)
usr << "It is fastened to the floor!"
return 0
src.dir = turn(src.dir, 270)
target_generator = locate() in get_step(src,dir)
if(target_generator && !target_generator.owned_capacitor)
target_generator.owned_capacitor = src
return 1
/obj/machinery/shield_capacitor/power_change()
if(stat & BROKEN)
icon_state = "broke"
else
if( powered() )
if (src.active)
icon_state = "capacitor"
else
icon_state = "capacitor"
stat &= ~NOPOWER
if(istype(W, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = W
if(access_captain in C.access || access_security in C.access || access_engine in C.access)
src.locked = !src.locked
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
updateDialog()
else
spawn(rand(0, 15))
src.icon_state = "capacitor"
stat |= NOPOWER
user << "\red Access denied."
else if(istype(W, /obj/item/weapon/card/emag))
if(prob(75))
src.locked = !src.locked
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
updateDialog()
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
else if(istype(W, /obj/item/weapon/wrench))
src.anchored = !src.anchored
src.visible_message("\blue \icon[src] [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].")
spawn(0)
for(var/obj/machinery/shield_gen/gen in range(1, src))
if(get_dir(src, gen) == src.dir)
if(!src.anchored && gen.owned_capacitor == src)
gen.owned_capacitor = null
break
else if(src.anchored && !gen.owned_capacitor)
gen.owned_capacitor = src
break
gen.updateDialog()
updateDialog()
else
..()
/obj/machinery/shield_capacitor/attack_paw(user as mob)
return src.attack_hand(user)
/obj/machinery/shield_capacitor/attack_ai(user as mob)
return src.attack_hand(user)
/obj/machinery/shield_capacitor/attack_hand(mob/user)
if(stat & (NOPOWER|BROKEN))
return
interact(user)
/obj/machinery/shield_capacitor/interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.unset_machine()
user << browse(null, "window=shield_capacitor")
return
var/t = "<B>Shield Capacitor Control Console</B><br><br>"
if(locked)
t += "<i>Swipe your ID card to begin.</i>"
else
t += "This capacitor is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
t += "[time_since_fail > 2 ? "<font color=green>Charging stable.</font>" : "<font color=red>Warning, low charge!</font>"]<br>"
t += "Charge: [stored_charge] Watts ([100 * stored_charge/max_charge]%)<br>"
t += "Charge rate: \
<a href='?src=\ref[src];charge_rate=[-max_charge_rate]'>\[min\]</a> \
<a href='?src=\ref[src];charge_rate=-1000'>\[--\]</a> \
<a href='?src=\ref[src];charge_rate=-100'>\[-\]</a>[charge_rate] Watts/sec \
<a href='?src=\ref[src];charge_rate=100'>\[+\]</a> \
<a href='?src=\ref[src];charge_rate=1000'>\[++\]</a> \
<a href='?src=\ref[src];charge_rate=[max_charge_rate]'>\[max\]</a><br>"
t += "<hr>"
t += "<A href='?src=\ref[src]'>Refresh</A> "
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=shield_capacitor;size=500x800")
user.set_machine(src)
/obj/machinery/shield_capacitor/process()
//
@@ -78,52 +122,12 @@
time_since_fail++
if(stored_charge < active_power_usage * 1.5)
time_since_fail = 0
//
updateDialog()
/obj/machinery/shield_capacitor/attackby(obj/item/W, mob/user)
/*if(istype(W, /obj/item/weapon/wrench))
if(active)
user << "Turn off the field generator first."
return
else if(state == 0)
state = 1
playsound(src.loc, 'Ratchet.ogg', 75, 1)
user << "You secure the external reinforcing bolts to the floor."
src.anchored = 1
return
else if(state == 1)
state = 0
playsound(src.loc, 'Ratchet.ogg', 75, 1)
user << "You undo the external reinforcing bolts."
src.anchored = 0
return*/
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (src.allowed(user))
src.locked = !src.locked
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
else
user << "\red Access denied."
else if(istype(W, /obj/item/weapon/wrench))
src.anchored = !src.anchored
src.visible_message("\blue \icon[src] [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].")
else
src.add_fingerprint(user)
user << "\red You hit the [src.name] with your [W.name]!"
for(var/mob/M in viewers(src))
if(M == user) continue
M.show_message("\red The [src.name] has been hit with the [W.name] by [user.name]!")
/obj/machinery/shield_capacitor/Topic(href, href_list[])
..()
if( href_list["close"] )
usr << browse(null, "window=shield_capacitor")
usr.machine = null
usr.unset_machine()
return
if( href_list["toggle"] )
active = !active
@@ -140,20 +144,28 @@
//
updateDialog()
/obj/machinery/shield_capacitor/interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=shield_capacitor")
return
var/t = "<B>Shield Capacitor Control Console</B><BR>"
t += "[target_generator ? "<font color=green>Shield generator connected.</font>" : "<font color=red>Unable to locate shield generator!</font>"]<br>"
t += "This capacitor is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
t += "[time_since_fail > 2 ? "<font color=green>Charging stable.</font>" : "<font color=red>Warning, low charge!</font>"]<br>"
t += "Capacitor charge: [stored_charge] Watts ([100 * stored_charge/max_charge]%)<br>"
t += "Capacitor charge rate (approx): <a href='?src=\ref[src];charge_rate=[-max_charge_rate]'>\[min\]</a> <a href='?src=\ref[src];charge_rate=-1000'>\[--\]</a> <a href='?src=\ref[src];charge_rate=-100'>\[-\]</a>[charge_rate] Watts/sec <a href='?src=\ref[src];charge_rate=100'>\[+\]</a> <a href='?src=\ref[src];charge_rate=1000'>\[++\]</a> <a href='?src=\ref[src];charge_rate=[max_charge_rate]'>\[max\]</a><br>"
t += "<hr>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
/obj/machinery/shield_capacitor/power_change()
if(stat & BROKEN)
icon_state = "broke"
else
if( powered() )
if (src.active)
icon_state = "capacitor"
else
icon_state = "capacitor"
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = "capacitor"
stat |= NOPOWER
user << browse(t, "window=shield_capacitor;size=500x800")
user.machine = src
/obj/machinery/shield_capacitor/verb/rotate()
set name = "Rotate capacitor clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored)
usr << "It is fastened to the floor!"
return
src.dir = turn(src.dir, 270)
return

View File

@@ -25,7 +25,6 @@
var/max_field_strength = 10
var/time_since_fail = 100
var/energy_conversion_rate = 0.01 //how many renwicks per watt?
var/flicker_shield_glitch = 1 //shield is slightly faulty and flickers - don't think this is working as intended
//
use_power = 1 //0 use nothing
//1 use idle power
@@ -38,14 +37,191 @@
for(var/obj/machinery/shield_capacitor/possible_cap in range(1, src))
if(get_dir(possible_cap, src) == possible_cap.dir)
owned_capacitor = possible_cap
possible_cap.target_generator = src
break
field = new/list()
..()
//copied from a copypaste. DRY, right?
/obj/machinery/shield_gen/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = W
if(access_captain in C.access || access_security in C.access || access_engine in C.access)
src.locked = !src.locked
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
updateDialog()
else
user << "\red Access denied."
else if(istype(W, /obj/item/weapon/card/emag))
if(prob(75))
src.locked = !src.locked
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
updateDialog()
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
else if(istype(W, /obj/item/weapon/wrench))
src.anchored = !src.anchored
src.visible_message("\blue \icon[src] [src] has been [anchored?"bolted to the floor":"unbolted from the floor"] by [user].")
spawn(0)
for(var/obj/machinery/shield_gen/gen in range(1, src))
if(get_dir(src, gen) == src.dir)
if(!src.anchored && gen.owned_capacitor == src)
gen.owned_capacitor = null
break
else if(src.anchored && !gen.owned_capacitor)
gen.owned_capacitor = src
break
gen.updateDialog()
updateDialog()
else
..()
/obj/machinery/shield_gen/attack_paw(user as mob)
return src.attack_hand(user)
/obj/machinery/shield_gen/attack_ai(user as mob)
return src.attack_hand(user)
/obj/machinery/shield_gen/attack_hand(mob/user)
if(stat & (NOPOWER|BROKEN))
return
interact(user)
/obj/machinery/shield_gen/interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.unset_machine()
user << browse(null, "window=shield_generator")
return
var/t = "<B>Shield Generator Control Console</B><BR><br>"
if(locked)
t += "<i>Swipe your ID card to begin.</i>"
else
t += "[owned_capacitor ? "<font color=green>Charge capacitor connected.</font>" : "<font color=red>Unable to locate charge capacitor!</font>"]<br>"
t += "This generator is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
t += "[time_since_fail > 2 ? "<font color=green>Field is stable.</font>" : "<font color=red>Warning, field is unstable!</font>"]<br>"
t += "Coverage radius (restart required): \
<a href='?src=\ref[src];change_radius=-5'>--</a> \
<a href='?src=\ref[src];change_radius=-1'>-</a> \
[field_radius * 2]m \
<a href='?src=\ref[src];change_radius=1'>+</a> \
<a href='?src=\ref[src];change_radius=5'>++</a><br>"
t += "Overall field strength: [average_field_strength] Renwicks ([max_field_strength ? 100 * average_field_strength / max_field_strength : "NA"]%)<br>"
t += "Charge rate: <a href='?src=\ref[src];strengthen_rate=-0.1'>--</a> \
<a href='?src=\ref[src];strengthen_rate=-0.01'>-</a> \
[strengthen_rate] Renwicks/sec \
<a href='?src=\ref[src];strengthen_rate=0.01'>+</a> \
<a href='?src=\ref[src];strengthen_rate=0.1'>++</a><br>"
t += "Upkeep energy: [field.len * average_field_strength / energy_conversion_rate] Watts/sec<br>"
t += "Additional energy required to charge: [field.len * strengthen_rate / energy_conversion_rate] Watts/sec<br>"
t += "Maximum field strength: \
<a href='?src=\ref[src];max_field_strength=-100'>\[min\]</a> \
<a href='?src=\ref[src];max_field_strength=-10'>--</a> \
<a href='?src=\ref[src];max_field_strength=-1'>-</a> \
[max_field_strength] Renwicks \
<a href='?src=\ref[src];max_field_strength=1'>+</a> \
<a href='?src=\ref[src];max_field_strength=10'>++</a> \
<a href='?src=\ref[src];max_field_strength=100'>\[max\]</a><br>"
t += "<hr>"
t += "<A href='?src=\ref[src]'>Refresh</A> "
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=shield_generator;size=500x800")
user.set_machine(src)
/obj/machinery/shield_gen/process()
if(active && field.len)
var/stored_renwicks = 0
var/target_field_strength = min(strengthen_rate + max(average_field_strength, 0), max_field_strength)
if(owned_capacitor)
var/required_energy = field.len * target_field_strength / energy_conversion_rate
var/assumed_charge = min(owned_capacitor.stored_charge, required_energy)
stored_renwicks = assumed_charge * energy_conversion_rate
owned_capacitor.stored_charge -= assumed_charge
time_since_fail++
average_field_strength = 0
target_field_strength = stored_renwicks / field.len
for(var/obj/effect/energy_field/E in field)
if(stored_renwicks)
var/strength_change = target_field_strength - E.strength
if(strength_change > stored_renwicks)
strength_change = stored_renwicks
if(E.strength >= 1)
E.Strengthen(strength_change)
else if(E.strength < 0)
E.strength = 0
E.Strengthen(0.1)
stored_renwicks -= strength_change
average_field_strength += E.strength
else
E.Strengthen(-E.strength)
average_field_strength /= field.len
if(average_field_strength < 0)
time_since_fail = 0
else
average_field_strength = 0
/obj/machinery/shield_gen/Topic(href, href_list[])
..()
if( href_list["close"] )
usr << browse(null, "window=shield_generator")
usr.unset_machine()
return
else if( href_list["toggle"] )
toggle()
else if( href_list["change_radius"] )
field_radius += text2num(href_list["change_radius"])
if(field_radius > 200)
field_radius = 200
else if(field_radius < 0)
field_radius = 0
else if( href_list["strengthen_rate"] )
strengthen_rate += text2num(href_list["strengthen_rate"])
if(strengthen_rate > 1)
strengthen_rate = 1
else if(strengthen_rate < 0)
strengthen_rate = 0
else if( href_list["max_field_strength"] )
max_field_strength += text2num(href_list["max_field_strength"])
if(max_field_strength > 1000)
max_field_strength = 1000
else if(max_field_strength < 0)
max_field_strength = 0
//
updateDialog()
/obj/machinery/shield_gen/power_change()
if(stat & BROKEN)
icon_state = "broke"
else
if( powered() )
if (src.active)
icon_state = "generator1"
else
icon_state = "generator0"
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = "generator0"
stat |= NOPOWER
if (src.active)
toggle()
/obj/machinery/shield_gen/ex_act(var/severity)
if(active)
toggle()
return ..()
/*
/obj/machinery/shield_gen/proc/check_powered()
/*
check_powered = 1
if(!anchored)
powered = 0
@@ -76,122 +252,14 @@
PN.newload += shieldload //uses powernet power.
*/
/obj/machinery/shield_gen/process()
if(active && field.len)
var/stored_renwicks = 0
var/target_field_strength = min(average_field_strength + strengthen_rate, max_field_strength)
if(owned_capacitor)
var/assumed_charge = min(owned_capacitor.stored_charge, (target_field_strength / energy_conversion_rate) * field.len)
stored_renwicks = assumed_charge * energy_conversion_rate
owned_capacitor.stored_charge -= assumed_charge
time_since_fail++
average_field_strength = 0
target_field_strength = stored_renwicks / field.len
if(!flicker_shield_glitch)
for(var/obj/effect/energy_field/E in field)
//check to see if the shield is strengthening or failing
if(E.strength > target_field_strength)
E.strength = target_field_strength
else if(E.strength + strengthen_rate > target_field_strength)
E.strength = target_field_strength
else
E.strength += strengthen_rate
if(stored_renwicks - E.strength < 0)
E.strength = stored_renwicks
stored_renwicks -= E.strength
average_field_strength += E.strength
//check if the current shield tile has enough energy to maintain itself
if(E.strength >= 1)
E.density = 1
E.invisibility = 0
else
E.density = 0
E.invisibility = 2
else
//the flicker shield glitch is an intersting quirk in 'older' and/or faulty shielding models
//basically, it strengthens the shields continuously until it can no longer sustain them... then it drops out for a few seconds and starts again
//this makes the shield 'flicker' every now and then until it stabilises
//when this glitch is fixed, shields will only be charged as much as is sustainable
for(var/obj/effect/energy_field/E in field)
//check to see if the shield is strengthening or failing
if(E.strength < target_field_strength)
E.strength += strengthen_rate
if(stored_renwicks - E.strength < 0)
E.strength = stored_renwicks
stored_renwicks -= E.strength
average_field_strength += E.strength
//check if the current shield tile has enough energy to maintain itself
if(E.strength >= 1)
E.density = 1
E.invisibility = 0
else
E.density = 0
E.invisibility = 2
//add any leftover charge back to the capacitor
if(owned_capacitor && stored_renwicks >= 0)
owned_capacitor.stored_charge += stored_renwicks / energy_conversion_rate
average_field_strength /= field.len
if(average_field_strength < 0)
time_since_fail = 0
else
average_field_strength = 0
//
updateDialog()
/obj/machinery/shield_gen/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (src.allowed(user))
src.locked = !src.locked
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
else
user << "\red Access denied."
else if(istype(W, /obj/item/weapon/wrench))
src.anchored = !src.anchored
src.visible_message("\blue \icon[src] [src] has been [anchored?"bolted to the floor":"unbolted from the floor"] by [user].")
else
src.add_fingerprint(user)
user << "\red You hit the [src.name] with your [W.name]!"
for(var/mob/M in viewers(src))
if(M == user) continue
M.show_message("\red The [src.name] has been hit with the [W.name] by [user.name]!")
/obj/machinery/shield_gen/power_change()
if(stat & BROKEN)
icon_state = "broke"
else
if( powered() )
if (src.active)
icon_state = "generator1"
else
icon_state = "generator0"
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = "generator0"
stat |= NOPOWER
if (src.active)
toggle()
/obj/machinery/shield_gen/proc/toggle()
active = !active
power_change()
if(active)
var/list/covered_turfs = get_shielded_turfs()
if(get_turf(src) in covered_turfs)
covered_turfs.Remove(get_turf(src))
var/turf/T = get_turf(src)
if(T in covered_turfs)
covered_turfs.Remove(T)
for(var/turf/O in covered_turfs)
var/obj/effect/energy_field/E = new(O)
field.Add(E)
@@ -207,60 +275,10 @@
for(var/mob/M in view(5,src))
M << "\icon[src] You hear heavy droning fade out."
/obj/machinery/shield_gen/Topic(href, href_list[])
..()
if( href_list["close"] )
usr << browse(null, "window=shield_generator")
usr.machine = null
return
else if( href_list["toggle"] )
toggle()
else if( href_list["change_radius"] )
field_radius += text2num(href_list["change_radius"])
if(field_radius > 200)
field_radius = 200
else if(field_radius < 0)
field_radius = 0
else if( href_list["strengthen_rate"] )
strengthen_rate += text2num(href_list["strengthen_rate"])
if(strengthen_rate > 0.2)
strengthen_rate = 0.2
else if(strengthen_rate < 0)
strengthen_rate = 0
else if( href_list["max_field_strength"] )
max_field_strength += text2num(href_list["max_field_strength"])
if(max_field_strength > 1000)
max_field_strength = 1000
else if(max_field_strength < 0)
max_field_strength = 0
//
updateDialog()
/obj/machinery/shield_gen/interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=shield_generator")
return
var/t = "<B>Shield Generator Control Console</B><BR>"
t += "[owned_capacitor ? "<font color=green>Charge capacitor connected.</font>" : "<font color=red>Unable to locate charge capacitor!</font>"]<br>"
t += "This generator is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
t += "[time_since_fail > 2 ? "<font color=green>Field is stable.</font>" : "<font color=red>Warning, field is unstable!</font>"]<br>"
t += "Coverage radius (generator will need a restart to take effect): <a href='?src=\ref[src];change_radius=-5'>--</a> <a href='?src=\ref[src];change_radius=-1'>-</a> [field_radius * 2]m <a href='?src=\ref[src];change_radius=1'>+</a> <a href='?src=\ref[src];change_radius=5'>++</a><br>"
t += "Overall field strength: [average_field_strength] Renwicks ([100 * average_field_strength / max_field_strength]%)<br>"
t += "Charge consumption: [( (min(average_field_strength + strengthen_rate, max_field_strength)) / energy_conversion_rate) * field.len] Watts/sec<br>"
t += "Field charge rate (approx): <a href='?src=\ref[src];strengthen_rate=-0.1'>--</a> <a href='?src=\ref[src];strengthen_rate=-0.01'>-</a>[strengthen_rate] Renwicks/sec <a href='?src=\ref[src];strengthen_rate=0.01'>+</a> <a href='?src=\ref[src];strengthen_rate=0.1'>++</a><br>"
t += "Maximum field strength (avg across field): <a href='?src=\ref[src];max_field_strength=-100'>\[min\]</a> <a href='?src=\ref[src];max_field_strength=-10'>--</a> <a href='?src=\ref[src];max_field_strength=-1'>-</a>[max_field_strength] Renwicks <a href='?src=\ref[src];max_field_strength=1'>+</a> <a href='?src=\ref[src];max_field_strength=10'>++</a> <a href='?src=\ref[src];max_field_strength=100'>\[max\]</a><br>"
t += "<hr>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=shield_generator;size=500x800")
user.machine = src
//grab the border tiles in a circle around this machine
/obj/machinery/shield_gen/proc/get_shielded_turfs()
return list()
/obj/machinery/shield_gen/ex_act(var/severity)
if(active)
toggle()
return ..()
var/list/out = list()
for(var/turf/T in range(field_radius, src))
if(get_dist(src,T) == field_radius)
out.Add(T)
return out

View File

@@ -21,12 +21,18 @@
for(var/turf/simulated/G in orange(1, O))
add_this_turf = 1
break
for(var/obj/structure/S in orange(1, O))
add_this_turf = 1
break
for(var/obj/structure/S in O)
add_this_turf = 0
break
//uncomment this for structures (but not lattices) to be surrounded by shield as well
/*if(!add_this_turf)
for(var/obj/structure/S in orange(1, O))
if(!istype(S, /obj/structure/lattice))
add_this_turf = 1
break
if(add_this_turf)
for(var/obj/structure/S in O)
if(!istype(S, /obj/structure/lattice))
add_this_turf = 0
break*/
if(add_this_turf && !(O in open) && !(O in closed))
open += O

View File

@@ -40,12 +40,23 @@ log transactions
machine_id = "[station_name()] RT #[num_financial_terminals++]"
/obj/machinery/atm/process()
if(stat & NOPOWER)
return
if(linked_db && linked_db.stat & NOPOWER)
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)
authenticated_account = null
if(ticks_left_locked_down > 0)
ticks_left_locked_down--
if(ticks_left_locked_down <= 0)
number_incorrect_tries = 0
for(var/obj/item/weapon/spacecash/S in src)
S.loc = src.loc
@@ -57,7 +68,7 @@ log transactions
/obj/machinery/atm/proc/reconnect_database()
for(var/obj/machinery/account_database/DB in world)
if(DB.z == src.z)
if(DB.z == src.z && !DB.stat & NOPOWER)
linked_db = DB
break
@@ -68,7 +79,8 @@ log transactions
usr.drop_item()
idcard.loc = src
held_card = idcard
authenticated_account = null
if(authenticated_account && held_card.associated_account_number != authenticated_account.account_number)
authenticated_account = null
else if(authenticated_account)
if(istype(I,/obj/item/weapon/spacecash))
//consume the money
@@ -223,7 +235,7 @@ 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)
if(linked_db && !ticks_left_locked_down)
var/tried_account_num = text2num(href_list["account_num"])
if(!tried_account_num)
tried_account_num = held_card.associated_account_number
@@ -231,11 +243,11 @@ log transactions
authenticated_account = linked_db.attempt_account_access(tried_account_num, tried_pin, held_card && held_card.associated_account_number == tried_account_num ? 2 : 1)
if(!authenticated_account)
number_incorrect_tries++
if(previous_account_number == tried_account_num)
if(++number_incorrect_tries > max_pin_attempts)
if(number_incorrect_tries > max_pin_attempts)
//lock down the atm
number_incorrect_tries = 0
ticks_left_locked_down = 10
ticks_left_locked_down = 30
playsound(src, 'buzz-two.ogg', 50, 1)
//create an entry in the account transaction log
@@ -247,9 +259,12 @@ log transactions
T.time = worldtime2text()
authenticated_account.transaction_log.Add(T)
else
usr << "\red \icon[src] incorrect pin/account combination entered, [max_pin_attempts - number_incorrect_tries] attempts remaining."
previous_account_number = tried_account_num
number_incorrect_tries = 1
playsound(src, 'buzz-sigh.ogg', 50, 1)
else
usr << "\red \icon[src] incorrect pin/account combination entered."
number_incorrect_tries = 0
else
playsound(src, 'twobeep.ogg', 50, 1)
ticks_left_timeout = 120
@@ -263,6 +278,8 @@ log transactions
T.date = current_date_string
T.time = worldtime2text()
authenticated_account.transaction_log.Add(T)
previous_account_number = tried_account_num
if("withdrawal")
var/amount = max(text2num(href_list["funds_amount"]),0)
if(authenticated_account && amount > 0)

View File

@@ -118,6 +118,9 @@ var/global/datum/controller/gameticker/ticker
data_core.manifest()
current_state = GAME_STATE_PLAYING
//here to initialize the random events nicely at round start
setup_economy()
spawn(0)//Forking here so we dont have to wait for this to finish
mode.post_setup()
//Cleanup some stuff

View File

@@ -1012,7 +1012,7 @@ datum
*/
cyborg
steal_target = /obj/item/robot_parts/robot_suit
explanation_text = "Steal a completed cyborg shell (no brain)"
explanation_text = "Steal a completed robot shell (no brain)"
weight = 30
get_points(var/job)

View File

@@ -326,7 +326,7 @@ var/global/datum/controller/occupations/job_master
//give them an account in the station database
if(centcomm_account_db)
var/datum/money_account/M = centcomm_account_db.add_account(H.real_name, starting_funds = rand(50,500)*10, pre_existing = 1)
var/datum/money_account/M = centcomm_account_db.add_account_across_all(H.real_name, starting_funds = rand(50,500)*10, pre_existing = 1)
if(H.mind)
var/remembered_info = ""
remembered_info += "<b>Your account number is:</b> #[M.account_number]<br>"

View File

@@ -37,7 +37,7 @@
var/opened = 0
var/temp
var/list/part_sets = list( //set names must be unique
"Cyborg"=list(
"Robot"=list(
/obj/item/robot_parts/robot_suit,
/obj/item/robot_parts/chest,
/obj/item/robot_parts/head,
@@ -111,7 +111,7 @@
/obj/item/mecha_parts/mecha_equipment/weapon/honker
),
"Cyborg Upgrade Modules" = list(
"Robotic Upgrade Modules" = list(
/obj/item/borg/upgrade/reset,
/obj/item/borg/upgrade/rename,
/obj/item/borg/upgrade/restart,

View File

@@ -10,7 +10,7 @@
var/list/part = null
/obj/item/robot_parts/l_arm
name = "Cyborg Left Arm"
name = "robot left arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_arm"
construction_time = 200
@@ -18,7 +18,7 @@
part = list("l_arm","l_hand")
/obj/item/robot_parts/r_arm
name = "Cyborg Right Arm"
name = "robot right arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_arm"
construction_time = 200
@@ -26,7 +26,7 @@
part = list("r_arm","r_hand")
/obj/item/robot_parts/l_leg
name = "Cyborg Left Leg"
name = "robot left leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_leg"
construction_time = 200
@@ -34,7 +34,7 @@
part = list("l_leg","l_foot")
/obj/item/robot_parts/r_leg
name = "Cyborg Right Leg"
name = "robot right leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_leg"
construction_time = 200
@@ -42,7 +42,7 @@
part = list("r_leg","r_foot")
/obj/item/robot_parts/chest
name = "Cyborg Torso"
name = "robot torso"
desc = "A heavily reinforced case containing cyborg logic boards, with space for a standard power cell."
icon_state = "chest"
construction_time = 350
@@ -51,7 +51,7 @@
var/obj/item/weapon/cell/cell = null
/obj/item/robot_parts/head
name = "Cyborg Head"
name = "robot head"
desc = "A standard reinforced braincase, with spine-plugged neural socket and sensor gimbals."
icon_state = "head"
construction_time = 350
@@ -60,7 +60,7 @@
var/obj/item/device/flash/flash2 = null
/obj/item/robot_parts/robot_suit
name = "Cyborg Endoskeleton"
name = "robot endoskeleton"
desc = "A complex metal backbone with standard limb sockets and pseudomuscle anchors."
icon_state = "robo_suit"
construction_time = 500
@@ -215,6 +215,7 @@
W.loc = O//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
feedback_inc("cyborg_birth",1)
O.Namepick()
del(src)
else

View File

@@ -14,14 +14,14 @@
/obj/item/borg/upgrade/proc/action(var/mob/living/silicon/robot/R)
if(R.stat == DEAD)
usr << "/red The [src] will not function on a deceased cyborg."
usr << "/red The [src] will not function on a deceased robot."
return 1
return 0
/obj/item/borg/upgrade/reset
name = "cyborg module reset board"
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the cyborg."
name = "robotic module reset board"
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the robot."
icon_state = "cyborg_upgrade1"
require_module = 1
@@ -40,14 +40,14 @@
return 1
/obj/item/borg/upgrade/rename
name = "cyborg reclassification board"
name = "robot reclassification board"
desc = "Used to rename a cyborg."
icon_state = "cyborg_upgrade1"
construction_cost = list("metal"=35000)
var/heldname = "default name"
/obj/item/borg/upgrade/rename/attack_self(mob/user as mob)
heldname = stripped_input(user, "Enter new robot name", "Cyborg Reclassification", heldname, MAX_NAME_LEN)
heldname = stripped_input(user, "Enter new robot name", "Robot Reclassification", heldname, MAX_NAME_LEN)
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
if(..()) return 0
@@ -57,15 +57,15 @@
return 1
/obj/item/borg/upgrade/restart
name = "cyborg emergency restart module"
desc = "Used to force a restart of a disabled-but-repaired cyborg, bringing it back online."
name = "robot emergency restart module"
desc = "Used to force a restart of a disabled-but-repaired robot, bringing it back online."
construction_cost = list("metal"=60000 , "glass"=5000)
icon_state = "cyborg_upgrade1"
/obj/item/borg/upgrade/restart/action(var/mob/living/silicon/robot/R)
if(R.health < 0)
usr << "You have to repair the cyborg before using this module!"
usr << "You have to repair the robot before using this module!"
return 0
if(!R.key)
@@ -78,8 +78,8 @@
/obj/item/borg/upgrade/vtec
name = "cyborg VTEC Module"
desc = "Used to kick in a cyborg's VTEC systems, increasing their speed."
name = "robotic VTEC Module"
desc = "Used to kick in a robot's VTEC systems, increasing their speed."
construction_cost = list("metal"=80000 , "glass"=6000 , "gold"= 5000)
icon_state = "cyborg_upgrade2"
require_module = 1
@@ -95,7 +95,7 @@
/obj/item/borg/upgrade/tasercooler
name = "cyborg Rapid Taser Cooling Module"
name = "robotic Rapid Taser Cooling Module"
desc = "Used to cool a mounted taser, increasing the potential current in it and thus its recharge rate."
construction_cost = list("metal"=80000 , "glass"=6000 , "gold"= 2000, "diamond" = 500)
icon_state = "cyborg_upgrade3"
@@ -116,7 +116,7 @@
if(!T)
T = locate() in R.module.modules
if(!T)
usr << "This cyborg has had its taser removed!"
usr << "This robot has had its taser removed!"
return 0
if(T.recharge_time <= 2)
@@ -130,7 +130,7 @@
return 1
/obj/item/borg/upgrade/jetpack
name = "mining cyborg jetpack"
name = "mining robot jetpack"
desc = "A carbon dioxide jetpack suitable for low-gravity mining operations."
construction_cost = list("metal"=10000,"plasma"=15000,"uranium" = 20000)
icon_state = "cyborg_upgrade3"
@@ -153,7 +153,7 @@
/obj/item/borg/upgrade/syndicate/
name = "Illegal Equipment Module"
desc = "Unlocks the hidden, deadlier functions of a cyborg"
desc = "Unlocks the hidden, deadlier functions of a robot"
construction_cost = list("metal"=10000,"glass"=15000,"diamond" = 10000)
icon_state = "cyborg_upgrade3"
require_module = 1

View File

@@ -62,18 +62,18 @@ AI MODULES
usr << "The upload computer is broken!"
return
if (!comp.current)
usr << "You haven't selected a cyborg to transmit laws to!"
usr << "You haven't selected a robot to transmit laws to!"
return
if (comp.current.stat == 2 || comp.current.emagged)
usr << "Upload failed. No signal is being detected from the cyborg."
usr << "Upload failed. No signal is being detected from the robot."
else if (comp.current.connected_ai)
usr << "Upload failed. The cyborg is slaved to an AI."
usr << "Upload failed. The robot is slaved to an AI."
else
src.transmitInstructions(comp.current, usr)
comp.current << "These are your laws now:"
comp.current.show_laws()
usr << "Upload complete. The cyborg's laws have been modified."
usr << "Upload complete. The robot's laws have been modified."
/obj/item/weapon/aiModule/proc/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)

View File

@@ -44,7 +44,7 @@ var/global/normal_ooc_colour = "#002eb8"
var/display_colour = normal_ooc_colour
if(holder && !holder.fakekey)
display_colour = "#0099cc" //light blue
if(holder.rights & R_MOD)
if(holder.rights & R_MOD && !(holder.rights & R_ADMIN))
display_colour = "#184880" //dark blue
else if(holder.rights & R_ADMIN)
if(config.allow_admin_ooccolor)
@@ -55,11 +55,12 @@ var/global/normal_ooc_colour = "#002eb8"
for(var/client/C in clients)
if(C.prefs.toggles & CHAT_OOC)
var/display_name = src.key
if(holder.fakekey)
if(C.holder)
display_name = "[holder.fakekey]/([src.key])"
else
display_name = holder.fakekey
if(holder)
if(holder.fakekey)
if(C.holder)
display_name = "[holder.fakekey]/([src.key])"
else
display_name = holder.fakekey
C << "<font color='[display_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>"
/*

View File

@@ -72,7 +72,7 @@
if(!msg) return
var/recieve_color = "purple"
var/send_pm_type = ""
var/send_pm_type = " "
var/recieve_pm_type = "Player"
@@ -84,7 +84,7 @@
recieve_color = "maroon"
else
recieve_color = "red"
send_pm_type = holder.rank
send_pm_type = holder.rank + " "
recieve_pm_type = holder.rank
else if(!C.holder)
@@ -111,7 +111,7 @@
recieve_message = "<font color='[recieve_color]'>[recieve_pm_type] PM from-<b>[key_name(src, C, C.holder ? 1 : 0)]</b>: [msg]</font>"
C << recieve_message
src << "<font color='blue'>[send_pm_type] PM to-<b>[key_name(C, src, holder ? 1 : 0)]</b>: [msg]</font>"
src << "<font color='blue'>[send_pm_type]PM to-<b>[key_name(C, src, holder ? 1 : 0)]</b>: [msg]</font>"
/*if(holder && !C.holder)
C.last_pm_recieved = world.time

View File

@@ -553,6 +553,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
"blue wizard",
"red wizard",
"marisa wizard",
"emergency rescue team",
)
var/dresscode = input("Select dress for [M]", "Robust quick dress shop") as null|anything in dresspacks
if (isnull(dresscode))

View File

@@ -36,10 +36,21 @@
// Maps event names to event chances
// For each chance, 100 represents "normal likelihood", anything below 100 is "reduced likelihood", anything above 100 is "increased likelihood"
// Events have to be manually added to this proc to happen
var/list/possibleEvents = list()
// Check for additional possible events
possibleEvents[/datum/event/economic_event] = 100 //see Code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events.dm
//see:
// Code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events.dm
// Code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events_Mundane.dm
possibleEvents[/datum/event/economic_event] = 200
possibleEvents[/datum/event/trivial_news] = 300
possibleEvents[/datum/event/mundane_news] = 200
possibleEvents[/datum/event/pda_spam] = max(min(25, player_list.len) * 4, 200)
possibleEvents[/datum/event/money_lotto] = max(min(5, player_list.len), 50)
if(account_hack_attempted)
possibleEvents[/datum/event/money_hacker] = max(min(25, player_list.len) * 4, 200)
possibleEvents[/datum/event/carp_migration] = 50 + 50 * active_with_role["Engineer"]
possibleEvents[/datum/event/brand_intelligence] = 50 + 25 * active_with_role["Janitor"]
@@ -167,7 +178,7 @@
active_with_role["Janitor"] = 0
for(var/mob/M in player_list)
if(!M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
continue
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "engineering robot module")

View File

@@ -2,8 +2,8 @@ var/list/allEvents = typesof(/datum/event) - /datum/event
var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event
//var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event - /datum/event/spider_infestation - /datum/event/alien_infestation
var/eventTimeLower = 15000 //15 minutes
var/eventTimeUpper = 30000 //30 minutes
var/eventTimeLower = 10000 //15 minutes
var/eventTimeUpper = 25000 //30 minutes
var/scheduledEvent = null

View File

@@ -0,0 +1,120 @@
/var/global/account_hack_attempted = 0
/datum/event/money_hacker
endWhen = 10000
var/time_duration = 0
var/time_start = 0
var/datum/money_account/affected_account
var/obj/machinery/account_database/affected_db
/datum/event/money_hacker/setup()
for(var/obj/machinery/account_database/DB in world)
if( DB.z == 1 && !(DB.stat&NOPOWER) && DB.activated && DB.accounts.len)
affected_db = DB
break
if(affected_db)
affected_account = pick(affected_db.accounts)
else
kill()
return
time_start = world.time
time_duration = rand(3000, 18000)
endWhen = time_duration * 10 //a big enough buffer so that we should timeout before we run out of ticks
account_hack_attempted = 1
/datum/event/money_hacker/start()
return
/datum/event/money_hacker/announce()
var/message = "A brute force hack has been detected (in progress since [worldtime2text()]). The target of the attack is: Financial account #[affected_account.account_number], \
without intervention this attack will succeed in [time_duration / 600] minutes. Required intervention: complete shutdown of affected accounts databases until the attack has ceased. \
Notifications will be sent as updates occur.<br>"
var/my_department = "[station_name()] firewall subroutines"
var/sending = message + "<font color='blue'><b>Message dispatched by [my_department].</b></font>"
var/pass = 0
for(var/obj/machinery/message_server/MS in world)
if(!MS.active) continue
// /obj/machinery/message_server/proc/send_rc_message(var/recipient = "",var/sender = "",var/message = "",var/stamp = "", var/id_auth = "", var/priority = 1)
MS.send_rc_message("Engineering/Security/Bridge", my_department, message, "", "", 2)
pass = 1
if(pass)
var/keyed_dpt1 = ckey("Engineering")
var/keyed_dpt2 = ckey("Security")
var/keyed_dpt3 = ckey("Bridge")
for (var/obj/machinery/requests_console/Console in allConsoles)
var/keyed_department = ckey(Console.department)
if(keyed_department == keyed_dpt1 || keyed_department == keyed_dpt2 || keyed_department == keyed_dpt3)
if(Console.newmessagepriority < 2)
Console.newmessagepriority = 2
Console.icon_state = "req_comp2"
if(!Console.silent)
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(5, Console.loc))
O.show_message(text("\icon[Console] *The Requests Console beeps: 'PRIORITY Alert in [my_department]'"))
Console.messages += "<B><FONT color='red'>High Priority message from [my_department]</FONT></B><BR>[sending]"
/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)) )
//hacker wins
message = "The hack attempt has succeeded."
//subtract the money
var/lost = affected_account.money * 0.8 + (rand(2,4) - 2) / 10
affected_account.money -= lost
//create a taunting log entry
var/datum/transaction/T = new()
T.target_name = pick("","yo brotha from anotha motha","el Presidente","chieF smackDowN")
T.purpose = pick("Ne$ ---ount fu%ds init*&lisat@*n","PAY BACK YOUR MUM","Funds withdrawal","pWnAgE","l33t hax","liberationez")
T.amount = pick("","([rand(0,99999)])","alla money","9001$","HOLLA HOLLA GET DOLLA","([lost])")
var/date1 = "31 December, 1999"
var/date2 = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], [rand(1000,3000)]"
T.date = pick("", current_date_string, date1, date2)
var/time1 = rand(0, 99999999)
var/time2 = "[round(time1 / 36000)+12]:[(time1 / 600 % 60) < 10 ? add_zero(time1 / 600 % 60, 1) : time1 / 600 % 60]"
T.time = pick("", worldtime2text(), time2)
T.source_terminal = pick("","[pick("Biesel","New Gibson")] GalaxyNet Terminal #[rand(111,999)]","your mums place","nantrasen high CommanD")
affected_account.transaction_log.Add(T)
else
//crew wins
message = "The attack has ceased, the affected databases can now be brought online."
var/my_department = "[station_name()] firewall subroutines"
var/sending = message + "<font color='blue'><b>Message dispatched by [my_department].</b></font>"
var/pass = 0
for(var/obj/machinery/message_server/MS in world)
if(!MS.active) continue
// /obj/machinery/message_server/proc/send_rc_message(var/recipient = "",var/sender = "",var/message = "",var/stamp = "", var/id_auth = "", var/priority = 1)
MS.send_rc_message("Engineering/Security/Bridge", my_department, message, "", "", 2)
pass = 1
if(pass)
var/keyed_dpt1 = ckey("Engineering")
var/keyed_dpt2 = ckey("Security")
var/keyed_dpt3 = ckey("Bridge")
for (var/obj/machinery/requests_console/Console in allConsoles)
var/keyed_department = ckey(Console.department)
if(keyed_department == keyed_dpt1 || keyed_department == keyed_dpt2 || keyed_department == keyed_dpt3)
if(Console.newmessagepriority < 2)
Console.newmessagepriority = 2
Console.icon_state = "req_comp2"
if(!Console.silent)
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(5, Console.loc))
O.show_message(text("\icon[Console] *The Requests Console beeps: 'PRIORITY Alert in [my_department]'"))
Console.messages += "<B><FONT color='red'>High Priority message from [my_department]</FONT></B><BR>[sending]"
kill()
//shouldn't ever hit this, but this is here just in case
/datum/event/money_hacker/end()
if(affected_account && affected_db)
endWhen += time_duration

View File

@@ -0,0 +1,40 @@
/datum/event/money_lotto
endWhen = 301
announceWhen = 300
var/winner_name = "John Smith"
var/winner_sum = 0
var/deposit_success = 0
/datum/event/money_lotto/start()
winner_sum = pick(5000, 10000, 50000, 100000, 500000, 1000000, 1500000)
if(centcomm_account_db.accounts.len)
var/datum/money_account/D = pick(centcomm_account_db.accounts)
D.money += winner_sum
var/datum/transaction/T = new()
T.target_name = "Tau Ceti Daily Grand Slam -Stellar- Lottery"
T.purpose = "Winner!"
T.amount = winner_sum
T.date = current_date_string
T.time = worldtime2text()
T.source_terminal = "Biesel TCD Terminal #[rand(111,333)]"
D.transaction_log.Add(T)
else
kill()
/datum/event/money_lotto/announce()
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = "NanoTrasen Editor"
newMsg.is_admin_message = 1
newMsg.body = "TC Daily wishes to congratulate <b>[winner_name]</b> for recieving the Tau Ceti Stellar Slam Lottery, and receiving the out of this world sum of [winner_sum] credits!"
if(!deposit_success)
newMsg.body += "<br>Unfortunately, we were unable to verify the account details provided, so we were unable to transfer the money. Send a cheque containing the sum of $500 to TCD 'Stellar Slam' office on Biesel Prime containing updated details, and it'll be resent within the month."
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == "Tau Ceti Daily")
FC.messages += newMsg
break
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.newsAlert("Tau Ceti Daily")

View File

@@ -0,0 +1,102 @@
/datum/event/pda_spam
endWhen = 6000
var/time_failed = 0
var/obj/machinery/message_server/useMS
/datum/event/pda_spam/setup()
time_failed = world.time
for (var/obj/machinery/message_server/MS in message_servers)
if(MS.active)
useMS = MS
break
/datum/event/pda_spam/tick()
if(!useMS.active)
useMS = null
if(!useMS && message_servers)
for (var/obj/machinery/message_server/MS in message_servers)
if(MS.active)
useMS = MS
break
if(useMS)
time_failed = world.time
if(prob(2))
// /obj/machinery/message_server/proc/send_pda_message(var/recipient = "",var/sender = "",var/message = "")
var/obj/item/device/pda/P
var/list/viables = list()
for(var/obj/item/device/pda/check_pda in sortAtom(PDAs))
if (!check_pda.owner||check_pda.toff||check_pda == src||check_pda.hidden)
continue
viables.Add(check_pda)
if(!viables.len)
return
P = pick(viables)
var/sender
var/message
switch(pick(1,2,3,4,5))
if(1)
sender = pick("MaxBet","MaxBet Online Casino","There is no better time to register","I'm excited for you to join us")
message = pick("Triple deposits are waiting for you at MaxBet Online when you register to play with us.",\
"You can qualify for a 200% Welcome Bonus at MaxBet Online when you sign up today.",\
"Once you are a player with MaxBet, you will also receive lucrative weekly and monthly promotions.",\
"You will be able to enjoy over 450 top-flight casino games at MaxBet.")
if(2)
sender = pick(300;"QuickDatingSystem",200;"Find your russian bride",50;"Tajaran beauties are waiting",50;"Find your secret skrell crush",50;"Beautiful unathi brides")
message = pick("Your profile caught my attention and I wanted to write and say hello (QuickDating).",\
"If you will write to me on my email [pick(first_names_female)]@[pick(last_names)].[pick("ru","ck","tj","ur","nt")] I shall necessarily send you a photo (QuickDating).",\
"I want that we write each other and I hope, that you will like my profile and you will answer me (QuickDating).",\
"You have (1) new message!",\
"You have (2) new profile views!")
if(3)
sender = pick("Galactic Payments Association","Better Business Bureau","Tau Ceti E-Payments","NAnoTransen Finance Deparmtent","Luxury Replicas")
message = pick("Luxury watches for Blowout sale prices!",\
"Watches, Jewelry & Accessories, Bags & Wallets !",\
"Deposit 100$ and get 300$ totally free!",\
" 100K NT.|WOWGOLD <20>nly $89 <HOT>",\
"We have been filed with a complaint from one of your customers in respect of their business relations with you.",\
"We kindly ask you to open the COMPLAINT REPORT (attached) to reply on this complaint..")
if(4)
sender = pick("Buy Dr. Maxman","Having dysfuctional troubles?")
message = pick("DR MAXMAN: REAL Doctors, REAL Science, REAL Results!",\
"Dr. Maxman was created by George Acuilar, M.D, a CentComm Certified Urologist who has treated over 70,000 patients sector wide with 'male problems'.",\
"After seven years of research, Dr Acuilar and his team came up with this simple breakthrough male enhancement formula.",\
"Men of all species report AMAZING increases in length, width and stamina.")
if(5)
sender = pick("Dr","Crown prince","King Regent","Professor","Captain")
sender += " " + pick("Robert","Alfred","Josephat","Kingsley","Sehi","Zbahi")
sender += " " + pick("Mugawe","Nkem","Gbatokwia","Nchekwube","Ndim","Ndubisi")
message = pick("YOUR FUND HAS BEEN MOVED TO [pick("Salusa","Segunda","Cepheus","Andromeda","Gruis","Corona","Aquila","Asellus")] DEVELOPMENTARY BANK FOR ONWARD REMITTANCE.",\
"We are happy to inform you that due to the delay, we have been instructed to IMMEDIATELY deposit all funds into your account",\
"Dear fund beneficiary, We have please to inform you that overdue funds payment has finally been approved and released for payment",\
"Due to my lack of agents I require an off-world financial account to immediately deposit the sum of 1 POINT FIVE MILLION credits.",\
"Greetings sir, I regretfully to inform you that as I lay dying here due to my lack ofheirs I have chosen you to recieve the full sum of my lifetime savings of 1.5 billion credits")
useMS.send_pda_message("[P.owner]", sender, message)
if (prob(50)) //Give the AI an increased chance to intercept the message
for(var/mob/living/silicon/ai/ai in mob_list)
// Allows other AIs to intercept the message but the AI won't intercept their own message.
if(ai.aiPDA != P && ai.aiPDA != src)
ai.show_message("<i>Intercepted message from <b>[sender]</b></i> (Unknown / spam?) <i>to <b>[P:owner]</b>: [message]</i>")
P.tnote += "<i><b>&larr; From [sender] (Unknown / spam?):</b></i><br>[message]<br>"
if (!P.silent)
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, P.loc))
if(!P.silent) O.show_message(text("\icon[P] *[P.ttone]*"))
//Search for holder of the PDA.
var/mob/living/L = null
if(P.loc && isliving(P.loc))
L = P.loc
//Maybe they are a pAI!
else
L = get(P, /mob/living/silicon)
if(L)
L << "\icon[P] <b>Message from [sender] (Unknown / spam?), </b>\"[message]\" (Unable to Reply)"
else if(world.time > time_failed + 1200)
//if there's no server active for two minutes, give up
kill()

View File

@@ -596,3 +596,10 @@
set category = "IC"
pose = copytext(sanitize(input(usr, "This is [src]. \He is...", "Pose", null) as text), 1, MAX_MESSAGE_LEN)
/mob/living/carbon/human/verb/set_flavor()
set name = "Set Flavour Text"
set desc = "Sets an extended description of your character's features."
set category = "IC"
flavor_text = copytext(sanitize(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text), 1)

View File

@@ -32,5 +32,12 @@
if(DEAD) msg += "<span class='deadsay'>It looks completely unsalvageable.</span>\n"
msg += "*---------*</span>"
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
if (pose)
if( findtext(pose,".",lentext(pose)) == 0 && findtext(pose,"!",lentext(pose)) == 0 && findtext(pose,"?",lentext(pose)) == 0 )
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\nIt is [pose]"
usr << msg
return

View File

@@ -54,13 +54,13 @@
var/speed = 0 //Cause sec borgs gotta go fast //No they dont!
var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
var/braintype = "Cyborg"
var/pose
/mob/living/silicon/robot/New(loc,var/syndie = 0)
spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
ident = rand(1, 999)
updatename("Default")
updateicon()
@@ -101,7 +101,6 @@
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
//If there's an MMI in the robot, have it ejected when the mob goes away. --NEO
//Improved /N
/mob/living/silicon/robot/Del()
@@ -208,6 +207,18 @@
real_name = changed_name
name = real_name
/mob/living/silicon/robot/verb/Namepick()
if(custom_name)
return 0
var/newname
newname = input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text
if (newname != "")
custom_name = newname
updatename("Default")
updateicon()
/mob/living/silicon/robot/verb/cmd_robot_alerts()
set category = "Robot Commands"
set name = "Show Alerts"
@@ -424,9 +435,23 @@
else if (istype(W, /obj/item/weapon/crowbar)) // crowbar means open or close the cover
if(opened)
user << "You close the cover."
opened = 0
updateicon()
if(cell)
user << "You close the cover."
opened = 0
updateicon()
else if(mmi && wiresexposed && isWireCut(1) && isWireCut(2) && isWireCut(3) && isWireCut(4) && isWireCut(5))
//Cell is out, wires are exposed, remove MMI, produce damaged chassis, baleet original mob.
user << "You jam the crowbar into the robot and begin levering [mmi]."
sleep(30)
user << "You damage some parts of the chassis, but eventually manage to rip out [mmi]!"
var/obj/item/robot_parts/robot_suit/C = new/obj/item/robot_parts/robot_suit(loc)
C.l_leg = new/obj/item/robot_parts/l_leg(C)
C.r_leg = new/obj/item/robot_parts/r_leg(C)
C.l_arm = new/obj/item/robot_parts/l_arm(C)
C.r_arm = new/obj/item/robot_parts/r_arm(C)
C.updateicon()
new/obj/item/robot_parts/chest(loc)
src.Del()
else
if(locked)
user << "The cover is locked and cannot be opened."
@@ -767,24 +792,8 @@
overlays.Cut()
if(stat == 0)
overlays += "eyes"
if(icon_state == "robot")
overlays.Cut()
overlays += "eyes-standard"
if(icon_state == "toiletbot")
overlays.Cut()
overlays += "eyes-toiletbot"
if(icon_state == "bloodhound")
overlays.Cut()
overlays += "eyes-bloodhound"
if(icon_state =="landmate")
overlays.Cut()
overlays += "eyes-landmate"
if(icon_state =="mopgearrex")
overlays.Cut()
overlays += "eyes-mopgearrex"
if(icon_state =="Miner" || icon_state =="Miner+j")
overlays.Cut()
overlays += "eyes-Miner"
overlays.Cut()
overlays += "eyes-[icon_state]"
else
overlays -= "eyes"
@@ -986,4 +995,17 @@
W.attack_self(src)
return
/mob/living/silicon/robot/verb/pose()
set name = "Set Pose"
set desc = "Sets a description which will be shown when someone examines you."
set category = "IC"
pose = copytext(sanitize(input(usr, "This is [src]. It is...", "Pose", null) as text), 1, MAX_MESSAGE_LEN)
/mob/living/silicon/robot/verb/set_flavor()
set name = "Set Flavour Text"
set desc = "Sets an extended description of your character's features."
set category = "IC"
flavor_text = copytext(sanitize(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text), 1)

View File

@@ -34,12 +34,19 @@
for(var/mob/M in view())
M << 'sound/effects/mousesqueek.ogg'
if(prob(0.5) && stat == CONSCIOUS)
if(!ckey && stat == CONSCIOUS && prob(0.5))
stat = UNCONSCIOUS
icon_state = "mouse_[color]_sleep"
if(stat == UNCONSCIOUS && prob(1))
stat = CONSCIOUS
icon_state = "mouse_[color]"
wander = 0
speak_chance = 0
//snuffles
else if(stat == UNCONSCIOUS)
if(ckey || prob(1))
stat = CONSCIOUS
icon_state = "mouse_[color]"
wander = 1
else if(prob(5))
emote("snuffles")
/mob/living/simple_animal/mouse/New()
..()

View File

@@ -196,15 +196,11 @@
new_player_panel()
if(href_list["showpoll"])
usr << "\red DB usage has been disabled and that option should not have been available."
return
handle_player_polling()
return
if(href_list["pollid"])
usr << "\red DB usage has been disabled and that option should not have been available."
return
var/pollid = href_list["pollid"]
if(istext(pollid))

View File

@@ -170,6 +170,7 @@
O.mmi = new /obj/item/device/mmi(O)
O.mmi.transfer_identity(src)//Does not transfer key/client.
O.Namepick()
spawn(0)//To prevent the proc from returning null.
del(src)

View File

@@ -31,8 +31,8 @@ Methylphenidate
result_amount = 3
/datum/reagent/antidepressant/citalopram
name = "citalopram"
id = "Citalopram"
name = "Citalopram"
id = "citalopram"
description = "Stabilizes the mind a little."
reagent_state = LIQUID
color = "#C8A5DC"
@@ -60,8 +60,8 @@ Methylphenidate
/datum/reagent/antidepressant/paroxetine
name = "paroxetine"
id = "Paroxetine"
name = "Paroxetine"
id = "paroxetine"
description = "Stabilizes the mind greatly, but has a chance of adverse effects."
reagent_state = LIQUID
color = "#C8A5DC"

View File

@@ -1979,21 +1979,21 @@ datum
return
else if ( mouth_covered ) // Reduced effects if partially protected
victim << "\red Your [safe_thing] protect you from most of the pepperspray!"
victim.eye_blurry = max(M.eye_blurry, 3)
victim.eye_blind = max(M.eye_blind, 1)
victim.eye_blurry = max(M.eye_blurry, 15)
victim.eye_blind = max(M.eye_blind, 5)
victim.Paralyse(1)
victim.drop_item()
return
else if ( eyes_covered ) // Eye cover is better than mouth cover
victim << "\red Your [safe_thing] protects your eyes from the pepperspray!"
victim.emote("scream")
victim.eye_blurry = max(M.eye_blurry, 1)
victim.eye_blurry = max(M.eye_blurry, 5)
return
else // Oh dear :D
victim.emote("scream")
victim << "\red You're sprayed directly in the eyes with pepperspray!"
victim.eye_blurry = max(M.eye_blurry, 5)
victim.eye_blind = max(M.eye_blind, 2)
victim.eye_blurry = max(M.eye_blurry, 25)
victim.eye_blind = max(M.eye_blind, 10)
victim.Paralyse(1)
victim.drop_item()