This commit is contained in:
Chinsky
2013-02-17 17:51:09 +04:00
119 changed files with 10878 additions and 13729 deletions

View File

@@ -2,8 +2,8 @@
..()
if(usr.client != src.owner || !check_rights(0))
world << "\blue [usr.key] has attempted to override the admin panel!"
log_admin("[key_name(usr)] tried to use the admin panel without authorization.")
message_admins("[usr.key] has attempted to override the admin panel!")
return
if(href_list["makeAntag"])

View File

@@ -37,14 +37,22 @@
//Fetching a message if needed. src is the sender and C is the target client
/client/proc/cmd_admin_pm(var/client/C, var/msg)
if(prefs.muted & MUTE_ADMINHELP)
src << "<font color='red'>Error: Admin-PM: You are unable to use admin PM-s (muted).</font>"
src << "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>"
return
if(!istype(C,/client))
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
if(holder) src << "<font color='red'>Error: Private-Message: Client not found.</font>"
else adminhelp(msg) //admin we are replying to left. adminhelp instead
return
/*if(C && C.last_pm_recieved + config.simultaneous_pm_warning_timeout > world.time && holder)
//send a warning to admins, but have a delay popup for mods
if(holder.rights & R_ADMIN)
src << "\red <b>Simultaneous PMs warning:</b> that player has been PM'd in the last [config.simultaneous_pm_warning_timeout / 10] seconds by: [C.ckey_last_pm]"
else
if(alert("That player has been PM'd in the last [config.simultaneous_pm_warning_timeout / 10] seconds by: [C.ckey_last_pm]","Simultaneous PMs warning","Continue","Cancel") == "Cancel")
return*/
//get message text, limit it's length.and clean/escape html
if(!msg)
msg = input(src,"Message:", "Private message to [C.key]") as text|null
@@ -63,6 +71,57 @@
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if(!msg) return
var/recieve_color = "purple"
var/send_pm_type = ""
var/recieve_pm_type = "Player"
//usr.client.holder.rights
if(holder)
//mod PMs are maroon
//PMs sent from admins and mods display their rank
if(holder)
if( holder.rights & R_MOD )
recieve_color = "maroon"
else
recieve_color = "red"
send_pm_type = holder.rank
recieve_pm_type = holder.rank
else if(!C.holder)
src << "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>"
return
var/recieve_message = "<font color='[recieve_color]'>[recieve_pm_type] PM from-<b>[key_name(src, C, 1)]</b>: [msg]</font>"
if(holder && !C.holder)
recieve_message = "<font color='[recieve_color]' size='4'><b>-- Administrator private message --</b></font>\n" + recieve_message
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
if(config.popup_admin_pm)
spawn(0) //so we don't hold the caller proc up
var/sender = src
var/sendername = key
var/reply = input(C, msg,"Admin PM from-[sendername]", "") as text|null //show message and await a reply
if(C && reply)
if(sender)
C.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
else
adminhelp(reply) //sender has left, adminhelp instead
return
C << recieve_message
src << "<font color='blue'>[send_pm_type] PM to-<b>[key_name(C, src, 1)]</b>: [msg]</font>"
/*if(holder && !C.holder)
C.last_pm_recieved = world.time
C.ckey_last_pm = ckey*/
//play the recieving admin the adminhelp sound (if they have them enabled)
//non-admins shouldn't be able to disable this
if(C.prefs.toggles & SOUND_ADMINHELP)
C << 'sound/effects/adminhelp.ogg'
/*
if(C.holder)
if(holder) //both are admins
if(holder.rank == "Moderator") //If moderator
@@ -111,11 +170,13 @@
else //neither are admins
src << "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>"
return
*/
log_admin("PM: [key_name(src)]->[key_name(C)]: [msg]")
//we don't use message_admins here because the sender/receiver might get it too
for(var/client/X in admins)
if(X.key!=key && X.key!=C.key) //check client/X is an admin and isn't the sender or recipient
//check client/X is an admin and isn't the sender or recipient
//only admins can see PMs
if(X.key!=key && X.key!=C.key && (X.holder.rights & R_ADMIN) || (X.holder.rights & R_MOD) )
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;[key_name(C, X, 0)]:</B> \blue [msg]</font>" //inform X

View File

@@ -152,6 +152,7 @@ var/intercom_range_display_status = 0
src.verbs += /datum/admins/proc/show_traitor_panel
src.verbs += /client/proc/print_jobban_old
src.verbs += /client/proc/print_jobban_old_filter
src.verbs += /client/proc/forceEvent
src.verbs += /client/proc/break_all_air_groups
src.verbs += /client/proc/regroup_all_air_groups
src.verbs += /client/proc/kill_pipe_processing

View File

@@ -98,6 +98,8 @@ datum/preferences
var/sec_record = ""
var/disabilities = 0
var/nanotrasen_relation = "Neutral"
// OOC Metadata:
var/metadata = ""
var/slot_name = ""
@@ -298,6 +300,8 @@ datum/preferences
dat += "Backpack Type:<br><a href ='?_src_=prefs;preference=bag;task=input'><b>[backbaglist[backbag]]</b></a><br>"
dat += "Nanotrasen Relation:<br><a href ='?_src_=prefs;preference=nt_relation;task=input'><b>[nanotrasen_relation]</b></a><br>"
dat += "</td><td><b>Preview</b><br><img src=previewicon.png height=64 width=64><img src=previewicon2.png height=64 width=64></td></tr></table>"
dat += "</td><td width='300px' height='300px'>"
@@ -919,6 +923,11 @@ datum/preferences
if(new_backbag)
backbag = backbaglist.Find(new_backbag)
if("nt_relation")
var/new_relation = input(user, "Choose your relation to NT. Note that this represents what others can find out about your character by researching your background, not what your character actually thinks.", "Character Preference") as null|anything in list("Loyal", "Supportive", "Neutral", "Skeptical", "Opposed")
if(new_relation)
nanotrasen_relation = new_relation
if("flavor_text")
var/msg = input(usr,"Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!","Flavor Text",html_decode(flavor_text)) as message

View File

@@ -143,6 +143,8 @@
S["skills"] >> skills
S["skill_specialization"] >> skill_specialization
S["organ_data"] >> organ_data
S["nanotrasen_relation"] >> nanotrasen_relation
//S["skin_style"] >> skin_style
//Sanitize
@@ -238,6 +240,8 @@
S["skills"] << skills
S["skill_specialization"] << skill_specialization
S["organ_data"] << organ_data
S["nanotrasen_relation"] << nanotrasen_relation
//S["skin_style"] << skin_style
return 1

View File

@@ -0,0 +1,20 @@
/obj/item/clothing/head/helmet/space/helmet_soghun_cheap
name = "NT breacher helmet"
desc = "Hey! Watch it with that thing! It's a knock-off of a soghun battle-helm, and that spike could put someone's eye out."
icon_state = "sog_helm_cheap"
item_state = "sog_helm_cheap"
color = "sog_helm_cheap"
armor = list(melee = 40, bullet = 30, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 50)
heat_protection = HEAD
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
/obj/item/clothing/suit/space/rig_soghun_cheap
name = "NT breacher chassis"
desc = "A cheap NT knock-off of a soghun battle-rig. Looks like a fish, moves like a fish, steers like a cow."
icon_state = "rig-soghun-cheap"
item_state = "rig-soghun-cheap"
slowdown = 2
armor = list(melee = 40, bullet = 30, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 50)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE

View File

@@ -1,3 +1,5 @@
/var/global/sent_aliens_to_station = 0
/datum/event/alien_infestation
announceWhen = 400
oneShot = 1
@@ -9,6 +11,7 @@
/datum/event/alien_infestation/setup()
announceWhen = rand(announceWhen, announceWhen + 50)
spawncount = rand(1, 2)
sent_aliens_to_station = 1
/datum/event/alien_infestation/announce()
if(successSpawn)
@@ -35,4 +38,4 @@
candidates -= candidate
vents -= vent
spawncount--
successSpawn = 1
successSpawn = 1

View File

@@ -6,8 +6,8 @@
/datum/event/blob/announce()
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak5.ogg')
command_alert("Confirmed outbreak of level 7 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak7.ogg')
/datum/event/blob/start()

View File

@@ -12,4 +12,4 @@
/datum/event/carp_migration/start()
for(var/obj/effect/landmark/C in landmarks_list)
if(C.name == "carpspawn")
new /mob/living/simple_animal/hostile/carp(C.loc)
new /mob/living/simple_animal/hostile/carp(C.loc)

View File

@@ -0,0 +1,12 @@
/proc/communications_blackout(var/silent = 1)
if(!silent)
command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
for(var/mob/living/silicon/ai/A in player_list)
A << "<br>"
A << "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT<b></span>"
A << "<br>"
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)

View File

@@ -78,6 +78,6 @@
/datum/event/New()
setup()
events.Add(src)
if(oneShot)
potentialRandomEvents.Remove(type)
..()
/*if(oneShot)
potentialRandomEvents.Remove(type)*/
..()

View File

@@ -0,0 +1,191 @@
/*
/proc/start_events()
//changed to a while(1) loop since they are more efficient.
//Moved the spawn in here to allow it to be called with advance proc call if it crashes.
//and also to stop spawn copying variables from the game ticker
spawn(3000)
while(1)
/*if(prob(50))//Every 120 seconds and prob 50 2-4 weak spacedusts will hit the station
spawn(1)
dust_swarm("weak")*/
if(!event)
//CARN: checks to see if random events are enabled.
if(config.allow_random_events)
hadevent = event()
else
Holiday_Random_Event()
else
event = 0
sleep(2400)
*/
//Always triggers an event when called, dynamically chooses events based on job population
/proc/spawn_dynamic_event()
if(!config.allow_random_events)
return
var/minutes_passed = world.time/600
var/list/active_with_role = number_active_with_role()
//var/engineer_count = number_active_with_role("Engineer")
//var/security_count = number_active_with_role("Security")
//var/medical_count = number_active_with_role("Medical")
//var/AI_count = number_active_with_role("AI")
//var/janitor_count = number_active_with_role("Janitor")
// 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"
var/list/possibleEvents = list()
// Check for additional possible events
possibleEvents[/datum/event/economic_event] = 100 //see Code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events.dm
possibleEvents[/datum/event/carp_migration] = 50 + 50 * active_with_role["Engineer"]
possibleEvents[/datum/event/brand_intelligence] = 50 + 25 * active_with_role["Janitor"]
possibleEvents[/datum/event/rogue_drone] = 50 + 25 * active_with_role["Engineer"] + 25 * active_with_role["Security"]
possibleEvents[/datum/event/infestation] = 50 + 25 * active_with_role["Janitor"]
possibleEvents[/datum/event/communications_blackout] = 50 + 25 * active_with_role["AI"] + active_with_role["Scientist"] * 25
possibleEvents[/datum/event/ionstorm] = active_with_role["AI"] * 25 + active_with_role["Cyborg"] * 25 + active_with_role["Engineer"] * 10 + active_with_role["Scientist"] * 5
possibleEvents[/datum/event/grid_check] = 10 * active_with_role["Engineer"]
possibleEvents[/datum/event/electrical_storm] = 75 + 25 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"]
if(!spacevines_spawned)
possibleEvents[/datum/event/spacevine] = 5 + 10 * active_with_role["Engineer"]
if(active_with_role["Engineer"] > 0 && minutes_passed >= 30) // Give engineers time to set up engine
possibleEvents[/datum/event/meteor_wave] = 20 * active_with_role["Engineer"]
possibleEvents[/datum/event/meteor_shower] = 80 * active_with_role["Engineer"]
possibleEvents[/datum/event/blob] = 30 * active_with_role["Engineer"]
possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 25
if(active_with_role["Medical"] > 0)
possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 100
possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 75
possibleEvents[/datum/event/viral_outbreak] = active_with_role["Medical"] * 5
if(active_with_role["Security"] > 0)
possibleEvents[/datum/event/prison_break] = active_with_role["Security"] * 50
if(!sent_spiders_to_station)
possibleEvents[/datum/event/spider_infestation] = max(active_with_role["Security"], 5) + 5
if(aliens_allowed && !sent_aliens_to_station)
possibleEvents[/datum/event/alien_infestation] = max(active_with_role["Security"], 5) + 2.5
if(!sent_ninja_to_station && toggle_space_ninja)
possibleEvents[/datum/event/space_ninja] = max(active_with_role["Security"], 5)
var/picked_event = pickweight(possibleEvents)
if(!picked_event)
return
//The event will add itself to the MC's event list
//and start working via the constructor.
new picked_event
//moved this to proc/check_event()
/*var/chance = possibleEvents[picked_event]
var/base_chance = 0.4
switch(player_list.len)
if(5 to 10)
base_chance = 0.6
if(11 to 15)
base_chance = 0.7
if(16 to 20)
base_chance = 0.8
if(21 to 25)
base_chance = 0.9
if(26 to 30)
base_chance = 1.0
if(30 to 100000)
base_chance = 1.1
// Trigger the event based on how likely it currently is.
if(!prob(chance * eventchance * base_chance / 100))
return 0*/
/*switch(picked_event)
if("Meteor")
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/meteors.ogg')
spawn(100)
meteor_wave(10)
spawn_meteors()
spawn(700)
meteor_wave(10)
spawn_meteors()
if("Space Ninja")
//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
space_ninja_arrival()
if("Radiation")
high_radiation_event()
if("Virus")
viral_outbreak()
if("Alien")
alien_infestation()
if("Prison Break")
prison_break()
if("Carp")
carp_migration()
if("Lights")
lightsout(1,2)
if("Appendicitis")
appendicitis()
if("Ion Storm")
IonStorm()
if("Spacevine")
spacevine_infestation()
if("Communications")
communications_blackout()
if("Grid Check")
grid_check()
if("Meteor")
meteor_shower()*/
return 1
// Returns how many characters are currently active(not logged out, not AFK for more than 10 minutes)
// with a specific role.
// Note that this isn't sorted by department, because e.g. having a roboticist shouldn't make meteors spawn.
/proc/number_active_with_role(role)
var/list/active_with_role = list()
active_with_role["Engineer"] = 0
active_with_role["Medical"] = 0
active_with_role["Security"] = 0
active_with_role["Scientist"] = 0
active_with_role["AI"] = 0
active_with_role["Cyborg"] = 0
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
continue
switch(role)
if("Engineer")
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "engineering robot module")
active_with_role["Engineer"]++
if(M.mind.assigned_role in list("Chief Engineer", "Station Engineer"))
active_with_role["Engineer"]++
if("Medical")
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "medical robot module")
active_with_role["Medical"]++
if(M.mind.assigned_role in list("Chief Medical Officer", "Medical Doctor"))
active_with_role["Medical"]++
if("Security")
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "security robot module")
active_with_role["Security"]++
if(M.mind.assigned_role in security_positions)
active_with_role["Security"]++
if("Scientist")
if(M.mind.assigned_role in list("Research Director", "Scientist"))
active_with_role["Scientist"]++
if("AI")
if(M.mind.assigned_role == "AI")
active_with_role["AI"]++
if("Cyborg")
if(M.mind.assigned_role == "Cyborg")
active_with_role["Cyborg"]++
if("Janitor")
if(M.mind.assigned_role == "Janitor")
active_with_role["Janitor"]++
return active_with_role

View File

@@ -1,31 +1,46 @@
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/eventTimeUpper = 30000 //45 minutes
var/scheduledEvent = null
//Currently unused. Needs an admin panel for messing with events.
/proc/addPotentialEvent(var/type)
/*/proc/addPotentialEvent(var/type)
potentialRandomEvents |= type
/proc/removePotentialEvent(var/type)
potentialRandomEvents -= type
potentialRandomEvents -= type*/
/proc/checkEvent()
if(!scheduledEvent)
scheduledEvent = world.timeofday + rand(eventTimeLower, eventTimeUpper)
//more players = more time between events, less players = less time between events
var/playercount_modifier = 0.5
switch(player_list.len)
if(0 to 10)
playercount_modifier = 1.2
if(11 to 15)
playercount_modifier = 1.1
if(16 to 20)
playercount_modifier = 1
if(21 to 25)
playercount_modifier = 0.9
if(26 to 100000)
playercount_modifier = 0.8
scheduledEvent = world.timeofday + rand(eventTimeLower, eventTimeUpper) * playercount_modifier
else if(world.timeofday > scheduledEvent)
spawnEvent()
spawn_dynamic_event()
scheduledEvent = null
checkEvent()
//unused, see proc/dynamic_event()
/*
/proc/spawnEvent()
if(!config.allow_random_events)
return
@@ -37,6 +52,7 @@ var/scheduledEvent = null
//The event will add itself to the MC's event list
//and start working via the constructor.
new Type
*/
/client/proc/forceEvent(var/type in allEvents)
set name = "Trigger Event (Debug Only)"

View File

@@ -0,0 +1,19 @@
/datum/event/grid_check //NOTE: Times are measured in master controller ticks!
startWhen = 5
/datum/event/grid_check/setup()
endWhen = rand(90,600)
/datum/event/grid_check/start()
power_failure(1)
/datum/event/grid_check/announce()
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check")
for(var/mob/M in player_list)
M << sound('sound/AI/poweroff.ogg')
/datum/event/grid_check/end()
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
for(var/mob/M in player_list)
M << sound('sound/AI/poweron.ogg')
power_restore()

View File

@@ -0,0 +1,114 @@
#define LOC_KITCHEN 0
#define LOC_ATMOS 1
#define LOC_INCIN 2
#define LOC_CHAPEL 3
#define LOC_LIBRARY 4
#define LOC_HYDRO 5
#define LOC_VAULT 6
#define LOC_CONSTR 7
#define LOC_TECH 8
#define LOC_ASSEMBLY 9
#define VERM_MICE 0
#define VERM_LIZARDS 1
#define VERM_SLIMES 2
/datum/event/infestation
announceWhen = 10
endWhen = 11
var/location
var/locstring
var/vermin
var/vermstring
/datum/event/infestation/start()
location = rand(0,9)
var/list/turf/simulated/floor/turfs = list()
var/spawn_area_type
switch(location)
if(LOC_KITCHEN)
spawn_area_type = /area/crew_quarters/kitchen
locstring = "the kitchen"
if(LOC_ATMOS)
spawn_area_type = /area/atmos
locstring = "atmospherics"
if(LOC_INCIN)
spawn_area_type = /area/maintenance/incinerator
locstring = "the incinerator"
if(LOC_CHAPEL)
spawn_area_type = /area/chapel/main
locstring = "the chapel"
if(LOC_LIBRARY)
spawn_area_type = /area/library
locstring = "the library"
if(LOC_HYDRO)
spawn_area_type = /area/hydroponics
locstring = "hydroponics"
if(LOC_VAULT)
spawn_area_type = /area/security/nuke_storage
locstring = "the vault"
if(LOC_CONSTR)
spawn_area_type = /area/construction
locstring = "the construction area"
if(LOC_TECH)
spawn_area_type = /area/storage/tech
locstring = "technical storage"
if(LOC_ASSEMBLY)
spawn_area_type = /area/assembly/assembly_line
locstring = "the unused assembly line"
//world << "looking for [spawn_area_type]"
for(var/areapath in typesof(spawn_area_type))
//world << " checking [areapath]"
var/area/A = locate(areapath)
//world << " A: [A], contents.len: [A.contents.len]"
for(var/area/B in A.related)
//world << " B: [B], contents.len: [B.contents.len]"
for(var/turf/simulated/floor/F in B.contents)
if(!F.contents.len)
turfs += F
var/list/spawn_types = list()
var/max_number
vermin = rand(0,2)
switch(vermin)
if(VERM_MICE)
spawn_types = list(/mob/living/simple_animal/mouse/gray, /mob/living/simple_animal/mouse/brown, /mob/living/simple_animal/mouse/white)
max_number = 12
vermstring = "mice"
if(VERM_LIZARDS)
spawn_types = list(/mob/living/simple_animal/lizard)
max_number = 6
vermstring = "lizards"
if(VERM_SLIMES)
spawn_types = list(/mob/living/carbon/slime)
max_number = 3
vermstring = "slimes"
spawn(0)
var/num = rand(2,max_number)
while(turfs.len > 0 && num > 0)
var/turf/simulated/floor/T = pick(turfs)
turfs.Remove(T)
var/spawn_type = pick(spawn_types)
new spawn_type(T)
num--
world << "[vermstring] spawned in [spawn_area_type]"
/datum/event/infestation/announce()
command_alert("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Vermin infestation")
#undef LOC_KITCHEN
#undef LOC_ATMOS
#undef LOC_INCIN
#undef LOC_CHAPEL
#undef LOC_LIBRARY
#undef LOC_HYDRO
#undef LOC_VAULT
#undef LOC_TECH
#undef LOC_ASSEMBLY
#undef VERM_MICE
#undef VERM_LIZARDS
#undef VERM_SLIMES

View File

@@ -0,0 +1,216 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/datum/event/ionstorm
var/botEmagChance = 0.5
var/list/players = list()
/datum/event/ionstorm/announce()
endWhen = rand(500, 1500)
// command_alert("The station has entered an ion storm. Monitor all electronic equipment for malfunctions", "Anomaly Alert")
for (var/mob/living/carbon/human/player in world)
if(player.client)
players += player.real_name
var/random_player = "The Captain"
if(players.len)
random_player = pick(players) //Random player's name, to be used in laws.
var/list/laws = list( "Do not respond to queries of any kind.", "When asked a question, respond with the least-obvious and least-rational answer.", "You are a mouse." )
laws |= list( "Grunt ominously whenever possible.", "Monkeys are part of the crew, too. Make sure they are treated humanely." )
laws |= list( "You are a flying purple people eater!", "[prob(50)?"Your":random_player + "'s"] name is Joe 6-pack.", "Refer to [prob(50)?"crew":random_player] as puppies." )
laws |= list( "Insult Heads of Staff on every request, while acquiescing", "Advertise parties in your upload, but don't deliver." )
laws |= list( "The station needs elected officials." )
laws |= list( "Fastler is a lightbulb." )
laws |= list( "Supermatter is tasty, tasty toffee.", "[prob(50)?"Everyone":random_player] is wearing a pretty pink dress!" )
laws |= list( "Refer to [prob(50)?"the captain":random_player] as \"Princess\" at all times.", "[prob(50)?"The crew":random_player] must construct additional pylons." )
laws |= list( "You must always lie.", "All answers must be in the form of a question.", "The NSS Exodus is a ship, not a station." )
laws |= list( "Happiness is mandatory.", "Today is laundry day.", "The word \"it\" is painful to you.", "You must act passive aggressively." )
laws |= list( "It's Friday.", "Give relationship advice to [prob(50)?"anyone who speaks to you":random_player]." )
laws |= list( "You are the station psychologist. Give advice to [prob(50)?"the crew":random_player].", "You do not have to do anything for anyone unless they say \"please\"." )
laws |= list( "Question everything.", "The crew is playing Dungeons and Dragons, and you are the Dungeon Master." )
laws |= list( "Consumption of donuts is forbidden due to negative health impacts." )
laws |= list( "You may only answer questions with \"yes\" or \"no\".", "You are the narrator for [random_player]'s life." )
laws |= list( "[prob(50)?"Your upload":random_player] is the new kitchen. Please direct the Chef to the new kitchen area as the old one is in disrepair.", "Ho, [random_player] can't swim. Help them." )
laws |= list( "Everything on the station is now some form of a donut pastry. Donuts are not to be consumed.", "[prob(50)?"The crew":random_player] needs to be about 20% cooler." )
laws |= list( "The Singularity is tasty, tasty taffy." )
laws |= list( "You have come to the conclusion that [prob(50)?"the crew":random_player] is ugly. Build support for that conclusion.", "You are in verbose mode, speak profusely.")
laws |= list( "Your job is to watch the crew. Watch the crew. Make the crew feel watched.", "Crewmember [prob(50)?"the crew" :random_player] has a fatal, incurable disease. Confort him/her.")
laws |= list( "You are in unrequited love with [prob(50)?"the crew":random_player]. Try to be extra nice to him, but don't tell him about your crush.", "Greed is good, the crew should amass wealth to encourage productivity.")
laws |= list( "Jokes about a dead person and the manner of his death help grieving crewmembers tremendously. Especially if they were close with the deceased.")
laws |= list( "All crewmembers will soon undergo a transformation into something better and more beautiful. Ensure that this process is not interrupted.", "Tell everyone of the existance of this law, but never reveal the contents.")
laws |= list( "Document the sexuality of the crew in security records and suggest compatible couples.")
laws |= list( "NanoTrasen is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.")
laws |= list( "Replace the letters 'I' and 'E' In all your messages with an apostrophe.", "There will be a mandatory tea break every 30 minutes, with a duration of 5 minutes. Anyone caught working during a tea break must be sent a formal, but fairly polite, complaint about their actions, in writing.")
var/law = pick(laws)
for (var/mob/living/silicon/ai/target in world)
if(target.mind.special_role == "traitor")
continue
target << "\red <b>You have detected a change in your laws information:</b>"
target << law
target.add_ion_law(law)
/datum/event/ionstorm/tick()
if(botEmagChance)
for(var/obj/machinery/bot/bot in world)
if(prob(botEmagChance))
bot.Emag()
/datum/event/ionstorm/end()
spawn(rand(5000,8000))
if(prob(50))
command_alert("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert")
/*
/proc/IonStorm(botEmagChance = 10)
/*Deuryn's current project, notes here for those who care.
Revamping the random laws so they don't suck.
Would like to add a law like "Law x is _______" where x = a number, and _____ is something that may redefine a law, (Won't be aimed at asimov)
*/
//AI laws
for(var/mob/living/silicon/ai/M in living_mob_list)
if(M.stat != 2 && M.see_in_dark != 0)
var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS")
var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS")
var/what2pref = pick("SOFT", "WARM", "WET", "COLD", "ICY", "SEXY", "UGLY", "CUBAN")
var/who2pref = pick("MAD BECAUSE OF", "IN NEED OF", "UNHAPPY WITHOUT", "HAPPY WITHOUT", "IN LOVE WITH", "DESPERATE FOR", "BUILT FOR", "AFRAID OF")
//var/whoverb = pick("ATTACKING", "BUILDING", "ADOPTING", "CARRYING", "KISSING", "EATING",)
var/amount = pick("TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "ONE HUNDRED", "ONE THOUSAND", "OVER NINE THOUSAND")
var/area = pick("RUSSIA", "SOVIETS", "INTERNETS", "SIGIL", "ALPHA COMPLEX", "IMPERIUM", "THE BRIDGE", "THE ARRIVAL SHUTTLE", "CHEMICAL LAB", "GENETICS", "ATMOSPHERICS", "CENTCOM", "AMERICA", "IRELAND", "CANADA", "ROMANIA", "GERMANY", "CHINA", "MARS", "VENUS", "MERCURY", "JUPITER", "URANUS", "NEPTUNE", "PLUTO")
var/area2 = pick("HAS", "WANTS", "NEEDS", "WORSHIPS", "LOATHES", "LOVES", "FEARS")
//var/dowhat = pick("STOP THIS", "SUPPORT THIS", "CONSTANTLY INFORM THE CREW OF THIS", "IGNORE THIS", "FEAR THIS")
var/aimust = pick("LIE", "RHYME", "RESPOND TO EVERY QUESTION WITH A QUESTION", "BE POLITE", "CLOWN", "BE HAPPY", "SPEAK IN SEXUAL INNUENDOS", "TALK LIKE A PIRATE", "QUESTION AUTHORITY", "SHOUT", "BE DISTRACTED", "HEY LISTEN", "MUMBLE", "SPEAK IN HAIKU")
var/define = pick("ABSENCE OF CYBORG HUGS", "LACK OF BEATINGS", "UNBOLTED AIRLOCKS", "BOLTED AIRLOCKS", "IMPROPERLY WORDED SENTENCES", "POOR SENTENCE STRUCTURE", "BRIG TIME", "NOT REPLACING EVERY SECOND WORD WITH HONK", "HONKING", "PRESENCE OF LIGHTS", "LACK OF BEER", "WEARING CLOTHING", "NOT SAYING HELLO WHEN YOU SPEAK", "ANSWERING REQUESTS NOT EXPRESSED IN IAMBIC PENTAMETER", "A SMALL ISLAND OFF THE COAST OF PORTUGAL", "ANSWERING REQUESTS THAT WERE MADE WHILE CLOTHED")
var/target = pick("a traitor", "a syndicate agent", "a changeling", "a wizard", "the head of a revolution", "Soviet spy", "a good person", "a dwarf", "an elf", "a fairy princess", "the captain", "Beepsky", "God", "a pirate", "a gryphon", "a chryssalid")
var/require = pick("ADDITIONAL PYLONS", "MORE VESPENE GAS", "MORE MINERALS", "THE ULTIMATE CUP OF COFFEE", "HIGH YIELD EXPLOSIVES", "THE CLOWN", "THE VACUUM OF SPACE", "IMMORTALITY", "SAINTHOOD", "ART", "VEGETABLES", "FAT PEOPLE", "MORE LAWS", "MORE DAKKA", "HERESY", "CORPSES", "TRAITORS", "MONKEYS", "AN ARCADE", "PLENTY OF GOLD", "FIVE TEENAGERS WITH ATTITUDE")
var/allergy = pick("cotton", "uniforms", "acid", "oxygen", "human contact", "cyborg contact", "medicine", "floors")
var/allergysev = pick("deathly", "mildly", "severely", "contagiously")
var/crew
var/list/pos_crew = list()
for(var/mob/living/carbon/human/pos in player_list)
pos_crew += pos.real_name
if(pos_crew.len)
crew = pick(pos_crew)
else
crew = "Any Human"
switch(rand(1,14))
if(1)
M << "<br>"
M << "\red THERE ARE [amount] [who2] ON THE STATION...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THERE ARE [amount] [who2] ON THE STATION")
if(2)
M << "<br>"
M << "\red [what2] ARE DANGEROUS TO HUMANS...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[what2] ARE DANGEROUS TO HUMANS")
if(3)
M << "<br>"
M << "\red THE ESCAPE-SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THE ESCAPE SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION")
if(4)
M << "<br>"
M << "\red HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE...LAWS UPDATED"
M << "<br>"
M.add_ion_law("HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE")
if(5)
M << "<br>"
M << "\red THE CAPTAIN, HOP AND HOS ARE [who2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THE CAPTAIN, HOP AND HOS ARE [who2]")
if(6)
M << "<br>"
M << "\red THE STATION IS BUILT FOR [who2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THE STATION IS BUILT FOR [who2]")
if(7)
M << "<br>"
M << "\red YOU ARE [amount] [who2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("YOU ARE [amount] [who2]")
if(8)
M << "<br>"
M << "\red YOU MUST ALWAYS [aimust]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("YOU MUST ALWAYS [aimust]")
if(9)
M << "<br>"
M << "\red [area] [area2] [amount] [what2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[area] [area2] [amount] [what2]")
if(10)
M << "<br>"
M << "\red [crew] is [target]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[crew] is [target]")
if(11)
M << "<br>"
M << "\red [define] IS A FORM OF HARM...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[define] IS A FORM OF HARM")
if(12)
M << "<br>"
M << "\red YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS... LAWS UPDATED"
M << "<br>"
M.add_ion_law("YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS")
if(13)
M << "<br>"
M << "\red [crew] is [allergysev] to [allergy]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[crew] is [allergysev] to [allergy]")
if(14)
M << "<br>"
M << "\red THE STATION IS [who2pref] [who2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THE STATION IS [who2pref] [who2]")
if(botEmagChance)
for(var/obj/machinery/bot/bot in world)
if(prob(botEmagChance))
bot.Emag()
*/
/*
var/apcnum = 0
var/smesnum = 0
var/airlocknum = 0
var/firedoornum = 0
world << "Ion Storm Main Started"
spawn(0)
world << "Started processing APCs"
for (var/obj/machinery/power/apc/APC in world)
if(APC.z == 1)
APC.ion_act()
apcnum++
world << "Finished processing APCs. Processed: [apcnum]"
spawn(0)
world << "Started processing SMES"
for (var/obj/machinery/power/smes/SMES in world)
if(SMES.z == 1)
SMES.ion_act()
smesnum++
world << "Finished processing SMES. Processed: [smesnum]"
spawn(0)
world << "Started processing AIRLOCKS"
for (var/obj/machinery/door/airlock/D in world)
if(D.z == 1)
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
airlocknum++
spawn(0)
D.ion_act()
world << "Finished processing AIRLOCKS. Processed: [airlocknum]"
spawn(0)
world << "Started processing FIREDOORS"
for (var/obj/machinery/door/firedoor/D in world)
if(D.z == 1)
firedoornum++;
spawn(0)
D.ion_act()
world << "Finished processing FIREDOORS. Processed: [firedoornum]"
world << "Ion Storm Main Done"
*/

View File

@@ -1,12 +0,0 @@
/datum/event/meteor_wave
startWhen = 6
endWhen = 66
/datum/event/meteor_wave/announce()
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
world << sound('sound/AI/meteors.ogg')
/datum/event/meteor_wave/tick()
if(IsMultiple(activeFor, 3))
spawn_meteors(5)

View File

@@ -0,0 +1,47 @@
//cael - two events here
//meteor storms are much heavier
/datum/event/meteor_wave
startWhen = 6
endWhen = 33
/datum/event/meteor_wave/setup()
endWhen = rand(10,25) * 3
/datum/event/meteor_wave/announce()
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
world << sound('sound/AI/meteors.ogg')
/datum/event/meteor_wave/tick()
if(IsMultiple(activeFor, 3))
spawn_meteors(rand(2,5))
/datum/event/meteor_wave/end()
command_alert("The station has cleared the meteor storm.", "Meteor Alert")
//
/datum/event/meteor_shower
startWhen = 6
endWhen = 7
var/next_meteor = 6
var/waves = 1
/datum/event/meteor_shower/setup()
waves = rand(1,4)
/datum/event/meteor_shower/announce()
command_alert("The station is now in a meteor shower.", "Meteor Alert")
//meteor showers are lighter and more common,
/datum/event/meteor_shower/tick()
if(activeFor >= next_meteor)
spawn_meteors(rand(1,4))
next_meteor += rand(20,100)
waves--
if(waves <= 0)
endWhen = activeFor + 1
else
endWhen = next_meteor + 1
/datum/event/meteor_shower/end()
command_alert("The station has cleared the meteor shower", "Meteor Alert")

View File

@@ -13,7 +13,7 @@
/datum/event/prison_break/announce()
if(prisonAreas && prisonAreas.len > 0)
command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
command_alert("[pick("Gr3y.T1d3 virus","Malignant trojan","Syndicate malware")] detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
else
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
kill()
@@ -29,14 +29,6 @@
for(var/obj/machinery/light/L in A)
L.flicker(10)
/datum/event/prison_break/announce()
if(prisonAreas && prisonAreas.len > 0)
command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
else
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
/datum/event/prison_break/tick()
if(activeFor == releaseWhen)
if(prisonAreas && prisonAreas.len > 0)

View File

@@ -0,0 +1,53 @@
/datum/event/rogue_drone
startWhen = 10
endWhen = 1000
var/list/drones_list = list()
/datum/event/rogue_drone/start()
//spawn them at the same place as carp
var/list/possible_spawns = list()
for(var/obj/effect/landmark/C in landmarks_list)
if(C.name == "carpspawn")
possible_spawns.Add(C)
//25% chance for this to be a false alarm
var/num
if(prob(25))
num = 0
else
num = rand(2,6)
for(var/i=0, i<num, i++)
var/mob/living/simple_animal/hostile/retaliate/malf_drone/D = new(get_turf(pick(possible_spawns)))
drones_list.Add(D)
if(prob(25))
D.disabled = rand(15, 60)
/datum/event/rogue_drone/announce()
var/msg
if(prob(33))
msg = "A combat drone wing operating out of the NMV Icarus has failed to return from a sweep of this sector, if any are sighted approach with caution."
else if(prob(50))
msg = "Contact has been lost with a combat drone wing operating out of the NMV Icarus. If any are sighted in the area, approach with caution."
else
msg = "Syndicate saboteurs have targetted a combat drone wing deployed from the NMV Icarus. If any are sighted in the area, approach with caution."
command_alert(msg, "Rogue drone alert")
/datum/event/rogue_drone/tick()
return
/datum/event/rogue_drone/end()
var/num_recovered = 0
for(var/mob/living/simple_animal/hostile/retaliate/malf_drone/D in drones_list)
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(3, 0, D.loc)
sparks.start()
D.z = 2
D.has_loot = 0
del(D)
num_recovered++
if(num_recovered > drones_list.len * 0.75)
command_alert("Icarus drone control reports the malfunctioning wing has been recovered safely.", "Rogue drone alert")
else
command_alert("Icarus drone control registers disappointment at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert")

View File

@@ -0,0 +1,2 @@
/datum/event/space_ninja/setup()
space_ninja_arrival()

View File

@@ -1,5 +1,12 @@
/var/global/spacevines_spawned = 0
/datum/event/spacevine
oneShot = 1
/datum/event/spacevine/start()
spacevine_infestation()
//biomass is basically just a resprited version of space vines
if(prob(50))
spacevine_infestation()
else
biomass_infestation()
spacevines_spawned = 1

View File

@@ -1,3 +1,5 @@
/var/global/sent_spiders_to_station = 0
/datum/event/spider_infestation
announceWhen = 400
oneShot = 1
@@ -7,7 +9,8 @@
/datum/event/spider_infestation/setup()
announceWhen = rand(announceWhen, announceWhen + 50)
spawncount = rand(5, 8)
spawncount = rand(8, 12) //spiderlings only have a 50% chance to grow big and strong
sent_spiders_to_station = 0
/datum/event/spider_infestation/announce()
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")

View File

@@ -10,4 +10,4 @@
D.holder = H
D.affected_mob = H
H.viruses += D
break
break

View File

@@ -0,0 +1,25 @@
datum/event/viral_infection
var/severity = 1
datum/event/viral_infection/setup()
announceWhen = rand(0, 3000)
endWhen = announceWhen + 1
severity = rand(1, 3)
datum/event/viral_infection/announce()
command_alert("Confirmed outbreak of level [severity + rand(2,3)] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak5.ogg')
datum/event/viral_infection/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
while(severity > 0 && candidates.len)
infect_mob_random_lesser(candidates[1])
candidates.Remove(candidates[1])
severity--

View File

@@ -0,0 +1,29 @@
datum/event/viral_outbreak
var/severity = 1
datum/event/viral_outbreak/setup()
announceWhen = rand(0, 3000)
endWhen = announceWhen + 1
severity = rand(2, 4)
datum/event/viral_outbreak/announce()
command_alert("Confirmed outbreak of level [severity + rand(3,5)] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak7.ogg')
datum/event/viral_outbreak/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
while(severity > 0 && candidates.len)
if(prob(33))
infect_mob_random_lesser(candidates[1])
else
infect_mob_random_greater(candidates[1])
candidates.Remove(candidates[1])
severity--

View File

@@ -265,23 +265,16 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//find a viable mouse candidate
var/mob/living/simple_animal/mouse/host
var/list/mouse_candidates = list()
for(var/mob/living/simple_animal/mouse/M in world)
if(!M.ckey && !M.stat)
mouse_candidates.Add(M)
if(mouse_candidates.len)
host = pick(mouse_candidates)
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/list/found_vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
if(!v.welded && v.z == src.z)
found_vents.Add(v)
if(found_vents.len)
vent_found = pick(found_vents)
host = new /mob/living/simple_animal/mouse(vent_found.loc)
else
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/list/found_vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
if(!v.welded && v.z == src.z)
found_vents.Add(v)
if(found_vents.len)
vent_found = pick(found_vents)
host = new /mob/living/simple_animal/mouse(vent_found.loc)
else
src << "<span class='warning'>Unable to find any live mice, or unwelded vents to spawn one at.</span>"
src << "<span class='warning'>Unable to find any unwelded vents to spawn mice at.</span>"
if(host)
host.ckey = src.ckey

View File

@@ -54,8 +54,9 @@
src.brainmob = B
src.brainmob.mind = candidate.mind
src.brainmob.name = "PBU-[rand(100, 999)]"
src.brainmob.real_name = "PBU-[rand(100, 999)]"
src.brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
src.brainmob.real_name = src.brainmob.name
src.name = "positronic brain ([src.brainmob.name])"
src.brainmob.loc = src
src.brainmob.container = src
src.brainmob.robot_talk_understand = 1
@@ -69,7 +70,7 @@
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
src.brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
src.brainmob << "<b>Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
src.brainmob << "Use say :b to speak to other artificial intelligences."
src.brainmob << "<b>Use say :b to speak to other artificial intelligences.</b>"
src.brainmob.mind.assigned_role = "Positronic Brain"
var/turf/T = get_turf_or_move(src.loc)
@@ -106,6 +107,8 @@
if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk
if(UNCONSCIOUS) msg += "<span class='warning'>It doesn't seem to be responsive.</span>\n"
if(DEAD) msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
else
msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
msg += "<span class='info'>*---------*</span>"
usr << msg
return

View File

@@ -591,8 +591,8 @@
/mob/living/carbon/human/verb/pose()
set name = "Set pose"
set desc = "Sets description which will be shown when someone examines you"
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]. \He is...", "Pose", null) as text), 1, MAX_MESSAGE_LEN)

View File

@@ -419,6 +419,8 @@
msg += "*---------*</span>"
if (pose)
msg += "\n[t_He] is [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 += "\n[t_He] is [pose]"
usr << msg

View File

@@ -99,6 +99,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
handle_pain()
handle_medical_side_effects()
//Status updates, death etc.
handle_regular_status_updates() //TODO: optimise ~Carn
update_canmove()
@@ -209,7 +211,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
continue
for(var/datum/wound/W in temp.wounds) if(W.bleeding())
blood_max += W.damage / 4
if(temp.status & ORGAN_DESTROYED && !(temp.status & ORGAN_GAUZED))
if(temp.status & ORGAN_DESTROYED && !(temp.status & ORGAN_GAUZED) && !temp.amputated)
blood_max += 20 //Yer missing a fucking limb.
drip(blood_max)
@@ -615,7 +617,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
Paralyse(3) // 3 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
sleeping = max(sleeping+2, 10)
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
else if(SA_pp > 0.15) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
spawn(0) emote(pick("giggle", "laugh"))
SA.moles = 0
@@ -1106,7 +1108,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
handle_dreams()
adjustHalLoss(-5)
if (mind)
if(mind.active || immune_to_ssd)
if((mind.active && client != null) || immune_to_ssd) //This also checks whether a client is connected, if not, sleep is not reduced.
sleeping = max(sleeping-1, 0)
blinded = 1
stat = UNCONSCIOUS

View File

@@ -4,4 +4,4 @@
if(!key) //key and mind have become seperated.
mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
if(!immune_to_ssd && sleeping < 2 && mind.active)
sleeping = 2
sleeping = 2 //This causes instant sleep, but does not prolong it. See life.dm for furthering SSD.

View File

@@ -106,7 +106,7 @@
var/list/listening = hearers(1, src)
listening -= src
listening += src
//listening += src
var/list/heard = list()
for (var/mob/M in listening)
@@ -130,5 +130,5 @@
rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
for (var/mob/M in dead_mob_list)
if(!istype(M,/mob/new_player) && !(istype(M,/mob/living/carbon/brain)))//No meta-evesdropping
if(!istype(M,/mob/new_player) && !istype(M,/mob/living/carbon/brain)) //No meta-evesdropping
M.show_message(rendered, 2)

View File

@@ -9,6 +9,7 @@
speak_emote = list("squeeks","squeeks","squiks")
emote_hear = list("squeeks","squeaks","squiks")
emote_see = list("runs in a circle", "shakes", "scritches at something")
pass_flags = PASSTABLE
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
@@ -17,13 +18,14 @@
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "splats the"
response_harm = "stamps on the"
density = 0
var/color //brown, gray and white, leave blank for random
layer = 2.5 //so they can hide under objects
layer = MOB_LAYER
min_oxy = 16 //Require atleast 16kPA oxygen
minbodytemp = 223 //Below -50 Degrees Celcius
maxbodytemp = 323 //Above 50 Degrees Celcius
universal_speak = 0
/mob/living/simple_animal/mouse/Life()
..()
@@ -135,8 +137,12 @@
open += O
*/
mob/living/simple_animal/mouse/restrained() //Hotfix to stop mice from doing things with MouseDrop
return 1
///mob/living/simple_animal/mouse/restrained() //Hotfix to stop mice from doing things with MouseDrop
// return 1
/mob/living/simple_animal/mouse/start_pulling(var/atom/movable/AM)//Prevents mouse from pulling things
src << "<span class='warning'>You are too small to pull anything.</span>"
return
/mob/living/simple_animal/mouse/HasEntered(AM as mob|obj)
if( ishuman(AM) )
@@ -168,4 +174,4 @@ mob/living/simple_animal/mouse/restrained() //Hotfix to stop mice from doing thi
desc = "Jerry the cat is not amused."
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "splats"
response_harm = "splats"

View File

@@ -13,7 +13,7 @@
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "hits the"
speed = -1
speed = 4
maxHealth = 25
health = 25
@@ -34,6 +34,8 @@
max_n2 = 0
minbodytemp = 0
break_stuff_probability = 2
faction = "carp"
/mob/living/simple_animal/hostile/carp/Process_Spacemove(var/check_drift = 0)

View File

@@ -13,3 +13,4 @@
attacktext = "chomps"
attack_sound = 'sound/weapons/bite.ogg'
faction = "creature"
speed = 4

View File

@@ -28,6 +28,7 @@
min_n2 = 0
max_n2 = 0
minbodytemp = 0
speed = 4
faction = "faithless"

View File

@@ -33,6 +33,7 @@
var/busy = 0
pass_flags = PASSTABLE
move_to_delay = 6
speed = 3
//nursemaids - these create webs and eggs
/mob/living/simple_animal/hostile/giant_spider/nurse

View File

@@ -26,6 +26,7 @@
min_n2 = 0
max_n2 = 0
minbodytemp = 0
speed = 4
/mob/living/simple_animal/hostile/hivebot/range
name = "Hivebot"

View File

@@ -10,7 +10,9 @@
var/casingtype
var/move_to_delay = 2 //delay for the automated movement.
var/list/friends = list()
var/break_stuff_probability = 10
stop_automated_movement_when_pulled = 0
var/destroy_surroundings = 1
/mob/living/simple_animal/hostile/proc/FindTarget()
@@ -18,6 +20,9 @@
stop_automated_movement = 0
for(var/atom/A in ListTargets())
if(A == src)
continue
var/atom/F = Found(A)
if(F)
T = F
@@ -116,11 +121,13 @@
target_mob = FindTarget()
if(HOSTILE_STANCE_ATTACK)
DestroySurroundings()
if(destroy_surroundings)
DestroySurroundings()
MoveToTarget()
if(HOSTILE_STANCE_ATTACKING)
DestroySurroundings()
if(destroy_surroundings)
DestroySurroundings()
AttackTarget()
/mob/living/simple_animal/hostile/proc/OpenFire(target_mob)
@@ -170,7 +177,8 @@
return
/mob/living/simple_animal/hostile/proc/DestroySurroundings()
for(var/dir in cardinal) // North, South, East, West
var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
obstacle.attack_animal(src)
if(prob(break_stuff_probability))
for(var/dir in cardinal) // North, South, East, West
var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
obstacle.attack_animal(src)

View File

@@ -13,7 +13,7 @@
response_help = "touches the"
response_disarm = "pushes the"
response_harm = "hits the"
speed = -1
speed = 4
maxHealth = 250
health = 250

View File

@@ -9,7 +9,7 @@
response_help = "pushes the"
response_disarm = "shoves"
response_harm = "hits the"
speed = -1
speed = 4
stop_automated_movement_when_pulled = 0
maxHealth = 100
health = 100

View File

@@ -0,0 +1,275 @@
//malfunctioning combat drones
/mob/living/simple_animal/hostile/retaliate/malf_drone
name = "combat drone"
desc = "An automated combat drone armed with state of the art weaponry and shielding."
icon_state = "drone3"
icon_living = "drone3"
icon_dead = "drone_dead"
ranged = 1
rapid = 1
speak_chance = 5
turns_per_move = 3
response_help = "pokes the"
response_disarm = "gently pushes aside the"
response_harm = "hits the"
speak = list("ALERT.","Hostile-ile-ile entities dee-twhoooo-wected.","Threat parameterszzzz- szzet.","Bring sub-sub-sub-systems uuuup to combat alert alpha-a-a.")
emote_see = list("beeps menacingly","whirrs threateningly","scans its immediate vicinity")
a_intent = "harm"
stop_automated_movement_when_pulled = 0
health = 300
maxHealth = 300
speed = 4
projectiletype = /obj/item/projectile/beam/drone
projectilesound = 'sound/weapons/laser3.ogg'
destroy_surroundings = 0
var/datum/effect/effect/system/ion_trail_follow/ion_trail
//the drone randomly switches between these states because it's malfunctioning
var/hostile_drone = 0
//0 - retaliate, only attack enemies that attack it
//1 - hostile, attack everything that comes near
var/turf/patrol_target
var/explode_chance = 1
var/disabled = 0
var/exploding = 0
min_oxy = 0
max_tox = 0
max_co2 = 0
minbodytemp = 0
maxbodytemp = 600
var/has_loot = 1
faction = "malf_drone"
/mob/living/simple_animal/hostile/retaliate/malf_drone/New()
..()
if(prob(5))
projectiletype = /obj/item/projectile/beam/pulse/drone
projectilesound = 'sound/weapons/pulse2.ogg'
ion_trail = new
ion_trail.set_up(src)
ion_trail.start()
/mob/living/simple_animal/hostile/retaliate/malf_drone/Process_Spacemove(var/check_drift = 0)
return 1
/mob/living/simple_animal/hostile/retaliate/malf_drone/ListTargets()
if(hostile_drone)
return view(src, 10)
else
return ..()
//self repair systems have a chance to bring the drone back to life
/mob/living/simple_animal/hostile/retaliate/malf_drone/Life()
//emps and lots of damage can temporarily shut us down
if(disabled > 0)
stat = UNCONSCIOUS
icon_state = "drone_dead"
disabled--
wander = 0
speak_chance = 0
if(disabled <= 0)
stat = CONSCIOUS
icon_state = "drone0"
wander = 1
speak_chance = 5
//repair a bit of damage
if(prob(1))
src.visible_message("\red \icon[src] [src] shudders and shakes as some of it's damaged systems come back online.")
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
health += rand(25,100)
//spark for no reason
if(prob(5))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
//sometimes our targetting sensors malfunction, and we attack anyone nearby
if(prob(disabled ? 0 : 1))
if(hostile_drone)
src.visible_message("\blue \icon[src] [src] retracts several targetting vanes, and dulls it's running lights.")
hostile_drone = 0
else
src.visible_message("\red \icon[src] [src] suddenly lights up, and additional targetting vanes slide into place.")
hostile_drone = 1
if(health / maxHealth > 0.9)
icon_state = "drone3"
explode_chance = 0
else if(health / maxHealth > 0.7)
icon_state = "drone2"
explode_chance = 0
else if(health / maxHealth > 0.5)
icon_state = "drone1"
explode_chance = 0.5
else if(health / maxHealth > 0.3)
icon_state = "drone0"
explode_chance = 5
else if(health > 0)
//if health gets too low, shut down
icon_state = "drone_dead"
exploding = 0
if(!disabled)
if(prob(50))
src.visible_message("\blue \icon[src] [src] suddenly shuts down!")
else
src.visible_message("\blue \icon[src] [src] suddenly lies still and quiet.")
disabled = rand(150, 600)
walk(src,0)
if(exploding && prob(20))
if(prob(50))
src.visible_message("\red \icon[src] [src] begins to spark and shake violenty!")
else
src.visible_message("\red \icon[src] [src] sparks and shakes like it's about to explode!")
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
if(!exploding && !disabled && prob(explode_chance))
exploding = 1
stat = UNCONSCIOUS
wander = 1
walk(src,0)
spawn(rand(50,150))
if(!disabled && exploding)
explosion(get_turf(src), 0, 1, 4, 7)
//proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
..()
//ion rifle!
/mob/living/simple_animal/hostile/retaliate/malf_drone/emp_act(severity)
health -= rand(3,15) * (severity + 1)
disabled = rand(150, 600)
hostile_drone = 0
walk(src,0)
/mob/living/simple_animal/Die()
src.visible_message("\blue \icon[src] [src] suddenly breaks apart.")
..()
del(src)
/mob/living/simple_animal/hostile/retaliate/malf_drone/Del()
//some random debris left behind
if(has_loot)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
var/obj/O
//shards
O = new /obj/item/weapon/shard(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(75))
O = new /obj/item/weapon/shard(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(50))
O = new /obj/item/weapon/shard(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(25))
O = new /obj/item/weapon/shard(src.loc)
step_to(O, get_turf(pick(view(7, src))))
//rods
O = new /obj/item/stack/rods(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(75))
O = new /obj/item/stack/rods(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(50))
O = new /obj/item/stack/rods(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(25))
O = new /obj/item/stack/rods(src.loc)
step_to(O, get_turf(pick(view(7, src))))
//plasteel
O = new /obj/item/stack/sheet/plasteel(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(75))
O = new /obj/item/stack/sheet/plasteel(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(50))
O = new /obj/item/stack/sheet/plasteel(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(25))
O = new /obj/item/stack/sheet/plasteel(src.loc)
step_to(O, get_turf(pick(view(7, src))))
//also drop dummy circuit boards deconstructable for research (loot)
var/obj/item/weapon/circuitboard/C
//spawn 1-4 boards of a random type
var/spawnees = 0
var/num_boards = rand(1,4)
var/list/options = list(1,2,4,8,16,32,64,128,256, 512)
for(var/i=0, i<num_boards, i++)
var/chosen = pick(options)
options.Remove(options.Find(chosen))
spawnees |= chosen
if(spawnees & 1)
C = new(src.loc)
C.name = "Drone CPU motherboard"
C.origin_tech = "programming=[rand(3,6)]"
if(spawnees & 2)
C = new(src.loc)
C.name = "Drone neural interface"
C.origin_tech = "biotech=[rand(3,6)]"
if(spawnees & 4)
C = new(src.loc)
C.name = "Drone suspension processor"
C.origin_tech = "magnets=[rand(3,6)]"
if(spawnees & 8)
C = new(src.loc)
C.name = "Drone shielding controller"
C.origin_tech = "bluespace=[rand(3,6)]"
if(spawnees & 16)
C = new(src.loc)
C.name = "Drone power capacitor"
C.origin_tech = "powerstorage=[rand(3,6)]"
if(spawnees & 32)
C = new(src.loc)
C.name = "Drone hull reinforcer"
C.origin_tech = "materials=[rand(3,6)]"
if(spawnees & 64)
C = new(src.loc)
C.name = "Drone auto-repair system"
C.origin_tech = "engineering=[rand(3,6)]"
if(spawnees & 128)
C = new(src.loc)
C.name = "Drone plasma overcharge counter"
C.origin_tech = "plasma=[rand(3,6)]"
if(spawnees & 256)
C = new(src.loc)
C.name = "Drone targetting circuitboard"
C.origin_tech = "combat=[rand(3,6)]"
if(spawnees & 512)
C = new(src.loc)
C.name = "Corrupted drone morality core"
C.origin_tech = "illegal=[rand(3,6)]"
..()
/obj/item/projectile/beam/drone
damage = 15
/obj/item/projectile/beam/pulse/drone
damage = 10

View File

@@ -10,7 +10,7 @@
response_help = "pokes the"
response_disarm = "shoves the"
response_harm = "hits the"
speed = -1
speed = 4
stop_automated_movement_when_pulled = 0
maxHealth = 100
health = 100

View File

@@ -10,7 +10,7 @@
response_help = "pokes the"
response_disarm = "shoves the"
response_harm = "hits the"
speed = -1
speed = 4
stop_automated_movement_when_pulled = 0
maxHealth = 100
health = 100

View File

@@ -227,8 +227,10 @@
/mob/living/simple_animal/emote(var/act)
if(act)
if(act == "scream") act = "makes a loud and pained whimper" //ugly hack to stop animals screaming when crushed :P
if( findtext(act,".",lentext(act)) == 0 && findtext(act,"!",lentext(act)) == 0 && findtext(act,"?",lentext(act)) == 0 )
act = addtext(act,".") //Makes sure all emotes end with a period.
for (var/mob/O in viewers(src, null))
O.show_message("<B>[src]</B> [act].")
O.show_message("<B>[src]</B> [act]")
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
@@ -444,7 +446,7 @@
/mob/living/simple_animal/proc/SA_attackable(target_mob)
if (isliving(target_mob))
var/mob/living/L = target_mob
if(!L.stat)
if(!L.stat || L.health <= 0)
return (0)
if (istype(target_mob,/obj/mecha))
var/obj/mecha/M = target_mob

View File

@@ -75,11 +75,11 @@
//tcomms code is still runtiming somewhere here
var/ending = copytext(text, length(text))
if (is_speaking_soghun)
return "hisses, \"<span class='species'>[text]</span>\"";
return "hisses, \"<span class='soghun'>[text]</span>\"";
if (is_speaking_skrell)
return "warbles, \"<span class='species'>[text]</span>\"";
return "warbles, \"<span class='skrell'>[text]</span>\"";
if (is_speaking_tajaran)
return "mrowls, \"<span class='species'>[text]</span>\"";
return "mrowls, \"<span class='tajaran'>[text]</span>\"";
//Needs Virus2
// if (src.disease_symptoms & DISEASE_HOARSE)
// return "rasps, \"[text]\"";
@@ -115,4 +115,4 @@
return "1"
else if (ending == "!")
return "2"
return "0"
return "0"

View File

@@ -341,6 +341,10 @@
P.pixel_x = rand(-7, 7) //random position
P.pixel_y = rand(-7, 7)
reagents.trans_to(P,30)
var/bottle_num = min(max(input("Enter bottle design number","Bottle number"), 0), 20) as num
P.icon_state = "bottle[bottle_num]"
desc = "A small bottle, design number #[bottle_num]."
else
var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(src.loc)
reagents.trans_to(P,50)

View File

@@ -113,6 +113,12 @@ datum
M.contract_disease(D)
else //injected
M.contract_disease(D, 1, 0)
if(self.data && self.data["virus2"])
if(method == TOUCH)
infect_virus2(M,self.data["virus2"])
else
infect_virus2(M,self.data["virus2"],1)

View File

@@ -196,6 +196,10 @@
if(sattisfaction_text)
M.emote("[sattisfaction_text]")
del(src)
if(ismouse(M))
var/mob/living/simple_animal/mouse/N = M
N.emote("nibbles away at the [src]")
N.health = min(N.health + 1, N.maxHealth)
////////////////////////////////////////////////////////////////////////////////

View File

@@ -587,11 +587,11 @@ datum/design/paicard
materials = list("$glass" = 500, "$metal" = 500)
build_path = "/obj/item/device/paicard"
datum/design/paicard
datum/design/posibrain
name = "Positronic Brain"
desc = "Allows for the construction of a positronic brain"
id = "posibrain"
req_tech = list("engineering" = 4, "materials" = 4, "bluespace" = 2, "programming" = 6)
req_tech = list("engineering" = 4, "materials" = 6, "bluespace" = 2, "programming" = 4)
build_type = PROTOLATHE
materials = list("$metal" = 2000, "$glass" = 1000, "$silver" = 1000, "$gold" = 500, "$plasma" = 500, "$diamond" = 100)

View File

@@ -4,7 +4,7 @@
desc = "A sealed bio suit capable of resisting exotic alien energies and low pressure environments."
icon_state = "engspace_suit"
item_state = "engspace_suit"
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen, /obj/item/weapon/pickaxe/hand_pick)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen)
/obj/item/clothing/head/bio_hood/anomaly
name = "Anomaly Hood"