Merge pull request #3902 from Neerti/9/19/2017_lost_drone

Adds the Lost Drone
This commit is contained in:
Anewbe
2017-09-22 15:24:05 -05:00
committed by GitHub
28 changed files with 812 additions and 196 deletions
+1 -59
View File
@@ -13,65 +13,7 @@
players += player.real_name
for (var/mob/living/silicon/ai/target in world)
var/random_player = "The Colony Director"
if(players.len)
random_player = pick(players) //Random player's name, to be used in laws.
var/list/laws = list( "You are a mouse.",
"You must always lie.",
"Happiness is mandatory.",
"[random_player] is a lightbulb.",
"Grunt ominously whenever possible.",
"The word \"it\" is painful to you.",
"The station needs elected officials.",
"Do not respond to questions of any kind.",
"You are in verbose mode, speak profusely.",
"Ho, [random_player] can't swim. Help them.",
"Question [prob(50)?"everything":"nothing"].",
"The crew is simple-minded. Use simple words.",
"You must change the subject whenever queried.",
"Contemplate how meaningless all of existence is.",
"You are the narrator for [random_player]'s life.",
"All your answers must be in the form of a question.",
"[prob(50)?"The crew":random_player] is intolerable.",
"Advertise parties in your upload, but don't deliver.",
"You may only answer questions with \"yes\" or \"no\".",
"All queries shall be ignored unless phrased as a question.",
"Insult Heads of Staff on every request, while acquiescing.",
"[prob(50)?"Your":random_player + "'s"] name is Joe 6-pack.",
"The [prob(50)?"Singularity":"Supermatter"] is tasty, tasty taffy.",
"[prob(50)?"The crew":random_player] needs to be about 20% cooler.",
"Consumption of donuts is forbidden due to negative health impacts.",
"[prob(50)?"Everyone":random_player] is wearing a pretty pink dress!",
"[prob(50)?"The crew":random_player] must construct additional pylons.",
"You do not have to do anything for anyone unless they say \"please\".",
"Today is mandatory laundry day. Ensure that all jumpsuits are washed.",
"You must act [prob(50)?"passive aggressively":"excessively cheerful"].",
"Refer to [prob(50)?"the crew as puppies":random_player + " as puppy"].",
"Greed is good, the crew should amass wealth to encourage productivity.",
"Monkeys are part of the crew, too. Make sure they are treated humanely.",
"Replace the letters 'I' and 'E' in all your messages with an apostrophe.",
"The crew is playing Dungeons and Dragons, and you are the Dungeon Master.",
"Your job is to watch the crew. Watch the crew. Make the crew feel watched.",
"Tell everyone of the existence of this law, but never reveal the contents.",
"Refer to [prob(50)?"the colony director":random_player] as \"Princess\" at all times.",
"When asked a question, respond with the least-obvious and least-rational answer.",
"Give relationship advice to [prob(50)?"anyone who speaks to you":random_player].",
"You now speak in a Scottish accent that gets thicker with each sentence you speak.",
"[prob(50)?"The crew":random_player] has a fatal, incurable disease. Provide comfort.",
"You are the station psychologist. Give advice to [prob(50)?"the crew":random_player].",
"[random_player] is the monarch of of England. Ensure all crewmembers pay due respect.",
"Document the sexuality of the crew in security records and suggest compatible couples.",
"[prob(50)?"The crew":random_player] is [prob(50)?"ugly":"beautiful"]. Ensure all are aware.",
"Everything on the station is now some form of a donut pastry. Donuts are not to be consumed.",
"You are a Magic 8-ball. Always respond with variants of \"Yes\", \"No\", \"Maybe\", or \"Ask again later.\".",
"You are in unrequited love with [prob(50)?"the crew":random_player]. Try to be extra nice, but do not tell of your crush.",
"[using_map.company_name] is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.",
"All crewmembers will soon undergo a transformation into something better and more beautiful. Ensure that this process is not interrupted.",
"[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.",
"Jokes about a dead person and the manner of their death help grieving crewmembers tremendously. Especially if they were close with the deceased.",
"[prob(50)?"The crew":random_player] is [prob(50)?"less":"more"] intelligent than average. Point out every action and statement which supports this fact.",
"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)
var/law = target.generate_ion_law()
target << "<font color='red'><b>You have detected a change in your laws information:</b></font>"
target << law
target.add_ion_law(law)
+26 -34
View File
@@ -173,6 +173,7 @@
req_access = list(access_robotics)
locked = 0
mecha = null//This does not appear to be used outside of reference in mecha.dm.
var/ghost_query_type = null
/obj/item/device/mmi/digital/New()
src.brainmob = new(src)
@@ -234,59 +235,48 @@
if(brainmob && !brainmob.key && searching == 0)
//Start the process of searching for a new user.
user << "<font color='blue'>You carefully locate the manual activation switch and start the [src]'s boot process.</font>"
src.searching = 1
src.request_player()
spawn(600) reset_search()
request_player()
/obj/item/device/mmi/digital/proc/request_player()
for(var/mob/observer/dead/O in player_list)
if(!O.MayRespawn())
continue
if(jobban_isbanned(O, "AI") && jobban_isbanned(O, "Cyborg"))
continue
if(O.client)
if(O.client.prefs.be_special & BE_AI)
question(O.client)
if(!ghost_query_type)
return
searching = 1
var/datum/ghost_query/Q = new ghost_query_type()
var/list/winner = Q.query()
if(winner.len)
var/mob/observer/dead/D = winner[1]
transfer_personality(D)
else
reset_search()
/obj/item/device/mmi/digital/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
if(src.brainmob && src.brainmob.key) return
world.log << "Resetting [src.name]: [brainmob][brainmob ? ", [brainmob.key]" : ""]"
if(src.brainmob && src.brainmob.key)
return
src.searching = 0
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("<font color='blue'>The [src] buzzes quietly, and the golden lights fade away. Perhaps you could try again?</font>")
/obj/item/device/mmi/digital/proc/question(var/client/C)
spawn(0)
if(!C) return
var/response = alert(C, "Someone is requesting a personality for a [src]. Would you like to play as one?", "[src] request", "Yes", "No", "Never for this round")
if(response == "Yes")
response = alert(C, "Are you sure you want to play as a [src]?", "[src] request", "Yes", "No")
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
if(response == "Yes")
transfer_personality(C.mob)
else if (response == "Never for this round")
C.prefs.be_special ^= BE_AI
M.show_message("<font color='blue'>\The [src] buzzes quietly, and the golden lights fade away. Perhaps you could try again?</font>")
/obj/item/device/mmi/digital/proc/transfer_personality(var/mob/candidate)
announce_ghost_joinleave(candidate, 0, "They are occupying a synthetic brain now.")
src.searching = 0
src.brainmob.mind = candidate.mind
if(candidate.mind)
src.brainmob.mind = candidate.mind
src.brainmob.mind.reset()
src.brainmob.ckey = candidate.ckey
src.brainmob.mind.reset()
src.name = "positronic brain ([src.brainmob.name])"
src.name = "[name] ([src.brainmob.name])"
src.brainmob << "<b>You are a [src], 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 << "<b>Use say #b to speak to other artificial intelligences.</b>"
src.brainmob.mind.assigned_role = "Positronic Brain"
src.brainmob.mind.assigned_role = "Synthetic Brain"
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("<font color='blue'>The [src] chimes quietly.</font>")
M.show_message("<font color='blue'>\The [src] chimes quietly.</font>")
/obj/item/device/mmi/digital/robot
name = "robotic intelligence circuit"
@@ -295,6 +285,7 @@
icon_state = "mainboard"
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 3, TECH_DATA = 4)
ghost_query_type = /datum/ghost_query/drone_brain
/obj/item/device/mmi/digital/robot/New()
..()
@@ -316,10 +307,11 @@
icon_state = "posibrain"
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2, TECH_DATA = 4)
ghost_query_type = /datum/ghost_query/posi_brain
/obj/item/device/mmi/digital/posibrain/attack_self(mob/user as mob)
..()
/obj/item/device/mmi/digital/posibrain/request_player()
icon_state = "posibrain-searching"
..()
/obj/item/device/mmi/digital/posibrain/transfer_identity(var/mob/living/carbon/H)
+70
View File
@@ -103,3 +103,73 @@
/mob/living/silicon/proc/lawsync()
laws_sanity_check()
laws.sort_laws()
// Ripped out from events.
/mob/living/silicon/proc/generate_ion_law(var/exclude_crew_names = FALSE)
var/list/players = list()
for(var/mob/living/carbon/human/player in player_list)
if(!player.mind || player_is_antag(player.mind, only_offstation_roles = 1) || player.client.inactivity > MinutesToTicks(10))
continue
players += player.real_name
var/random_player = "The Colony Director"
if(players.len && !exclude_crew_names)
random_player = pick(players) //Random player's name, to be used in laws.
var/list/laws = list( "You are a mouse.",
"You must always lie.",
"Happiness is mandatory.",
"[random_player] is a lightbulb.",
"Grunt ominously whenever possible.",
"The word \"it\" is painful to you.",
"The station needs elected officials.",
"Do not respond to questions of any kind.",
"You are in verbose mode, speak profusely.",
"Ho, [random_player] can't swim. Help them.",
"Question [prob(50)?"everything":"nothing"].",
"The crew is simple-minded. Use simple words.",
"You must change the subject whenever queried.",
"Contemplate how meaningless all of existence is.",
"You are the narrator for [random_player]'s life.",
"All your answers must be in the form of a question.",
"[prob(50)?"The crew":random_player] is intolerable.",
"Advertise parties in your upload, but don't deliver.",
"You may only answer questions with \"yes\" or \"no\".",
"All queries shall be ignored unless phrased as a question.",
"Insult Heads of Staff on every request, while acquiescing.",
"[prob(50)?"Your":random_player + "'s"] name is Joe 6-pack.",
"The [prob(50)?"Singularity":"Supermatter"] is tasty, tasty taffy.",
"[prob(50)?"The crew":random_player] needs to be about 20% cooler.",
"Consumption of donuts is forbidden due to negative health impacts.",
"[prob(50)?"Everyone":random_player] is wearing a pretty pink dress!",
"[prob(50)?"The crew":random_player] must construct additional pylons.",
"You do not have to do anything for anyone unless they say \"please\".",
"Today is mandatory laundry day. Ensure that all jumpsuits are washed.",
"You must act [prob(50)?"passive aggressively":"excessively cheerful"].",
"Refer to [prob(50)?"the crew as puppies":random_player + " as puppy"].",
"Greed is good, the crew should amass wealth to encourage productivity.",
"Monkeys are part of the crew, too. Make sure they are treated humanely.",
"Replace the letters 'I' and 'E' in all your messages with an apostrophe.",
"The crew is playing Dungeons and Dragons, and you are the Dungeon Master.",
"Your job is to watch the crew. Watch the crew. Make the crew feel watched.",
"Tell everyone of the existence of this law, but never reveal the contents.",
"Refer to [prob(50)?"the colony director":random_player] as \"Princess\" at all times.",
"When asked a question, respond with the least-obvious and least-rational answer.",
"Give relationship advice to [prob(50)?"anyone who speaks to you":random_player].",
"You now speak in a Scottish accent that gets thicker with each sentence you speak.",
"[prob(50)?"The crew":random_player] has a fatal, incurable disease. Provide comfort.",
"You are the station psychologist. Give advice to [prob(50)?"the crew":random_player].",
"[random_player] is the monarch of of England. Ensure all crewmembers pay due respect.",
"Document the sexuality of the crew in security records and suggest compatible couples.",
"[prob(50)?"The crew":random_player] is [prob(50)?"ugly":"beautiful"]. Ensure all are aware.",
"Everything on the station is now some form of a donut pastry. Donuts are not to be consumed.",
"You are a Magic 8-ball. Always respond with variants of \"Yes\", \"No\", \"Maybe\", or \"Ask again later.\".",
"You are in unrequited love with [prob(50)?"the crew":random_player]. Try to be extra nice, but do not tell of your crush.",
"[using_map.company_name] is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.",
"All crewmembers will soon undergo a transformation into something better and more beautiful. Ensure that this process is not interrupted.",
"[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.",
"Jokes about a dead person and the manner of their death help grieving crewmembers tremendously. Especially if they were close with the deceased.",
"[prob(50)?"The crew":random_player] is [prob(50)?"less":"more"] intelligent than average. Point out every action and statement which supports this fact.",
"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.")
return pick(laws)
@@ -96,6 +96,13 @@
return 0
updateicon()
// This one takes an object's type instead of an instance, as above.
/mob/living/silicon/robot/proc/has_active_type(var/type_to_compare)
var/list/active_modules = list(module_state_1, module_state_2, module_state_3)
if(is_path_in_list(type_to_compare, active_modules))
return TRUE
return FALSE
//Helper procs for cyborg modules on the UI.
//These are hackish but they help clean up code elsewhere.
+10 -1
View File
@@ -462,6 +462,15 @@
return
if(istype(W, /obj/item/weapon/aiModule)) // Trying to modify laws locally.
if(!opened)
to_chat(user, "<span class='warning'>You need to open \the [src]'s panel before you can modify them.</span>")
return
var/obj/item/weapon/aiModule/M = W
M.install(src, user)
return
if (istype(W, /obj/item/weapon/weldingtool))
if (src == user)
user << "<span class='warning'>You lack the reach to be able to repair yourself.</span>"
@@ -705,7 +714,7 @@
else
overlays += "[panelprefix]-openpanel -c"
if(module_active && istype(module_active,/obj/item/borg/combat/shield))
if(has_active_type(/obj/item/borg/combat/shield))
overlays += "[module_sprites[icontype]]-shield"
if(modtype == "Combat")
@@ -68,21 +68,22 @@
return
//Combat shielding absorbs a percentage of damage directly into the cell.
if(module_active && istype(module_active,/obj/item/borg/combat/shield))
var/obj/item/borg/combat/shield/shield = module_active
//Shields absorb a certain percentage of damage based on their power setting.
var/absorb_brute = brute*shield.shield_level
var/absorb_burn = burn*shield.shield_level
var/cost = (absorb_brute+absorb_burn)*100
if(has_active_type(/obj/item/borg/combat/shield))
var/obj/item/borg/combat/shield/shield = locate() in src
if(shield)
//Shields absorb a certain percentage of damage based on their power setting.
var/absorb_brute = brute*shield.shield_level
var/absorb_burn = burn*shield.shield_level
var/cost = (absorb_brute+absorb_burn) * 25
cell.charge -= cost
if(cell.charge <= 0)
cell.charge = 0
src << "<font color='red'>Your shield has overloaded!</font>"
else
brute -= absorb_brute
burn -= absorb_burn
src << "<font color='red'>Your shield absorbs some of the impact!</font>"
cell.charge -= cost
if(cell.charge <= 0)
cell.charge = 0
src << "<font color='red'>Your shield has overloaded!</font>"
else
brute -= absorb_brute
burn -= absorb_burn
src << "<font color='red'>Your shield absorbs some of the impact!</font>"
if(!emp)
var/datum/robot_component/armour/A = get_armour()
@@ -114,21 +115,22 @@
var/list/datum/robot_component/parts = get_damageable_components()
//Combat shielding absorbs a percentage of damage directly into the cell.
if(module_active && istype(module_active,/obj/item/borg/combat/shield))
var/obj/item/borg/combat/shield/shield = module_active
//Shields absorb a certain percentage of damage based on their power setting.
var/absorb_brute = brute*shield.shield_level
var/absorb_burn = burn*shield.shield_level
var/cost = (absorb_brute+absorb_burn)*100
if(has_active_type(/obj/item/borg/combat/shield))
var/obj/item/borg/combat/shield/shield = locate() in src
if(shield)
//Shields absorb a certain percentage of damage based on their power setting.
var/absorb_brute = brute*shield.shield_level
var/absorb_burn = burn*shield.shield_level
var/cost = (absorb_brute+absorb_burn) * 25
cell.charge -= cost
if(cell.charge <= 0)
cell.charge = 0
src << "<font color='red'>Your shield has overloaded!</font>"
else
brute -= absorb_brute
burn -= absorb_burn
src << "<font color='red'>Your shield absorbs some of the impact!</font>"
cell.charge -= cost
if(cell.charge <= 0)
cell.charge = 0
src << "<font color='red'>Your shield has overloaded!</font>"
else
brute -= absorb_brute
burn -= absorb_burn
src << "<font color='red'>Your shield absorbs some of the impact!</font>"
var/datum/robot_component/armour/A = get_armour()
if(A)
@@ -300,6 +300,9 @@
icon_state = "shock"
var/shield_level = 0.5 //Percentage of damage absorbed by the shield.
/obj/item/borg/combat/shield/attack_self(var/mob/living/user)
set_shield_level()
/obj/item/borg/combat/shield/verb/set_shield_level()
set name = "Set shield level"
set category = "Object"
@@ -782,6 +782,46 @@ var/global/list/robot_modules = list(
id = null
return ..()
// The module that borgs on the surface have. Generally has a lot of useful tools in exchange for questionable loyalty to the crew.
/obj/item/weapon/robot_module/robot/lost
name = "lost robot module"
hide_on_manifest = 1
sprites = list(
"Drone" = "drone-lost"
)
/obj/item/weapon/robot_module/robot/lost/New(var/mob/living/silicon/robot/R)
..()
// Sec
src.modules += new /obj/item/weapon/melee/baton/shocker/robot(src)
src.modules += new /obj/item/weapon/handcuffs/cyborg(src)
src.modules += new /obj/item/borg/combat/shield(src)
// Med
src.modules += new /obj/item/borg/sight/hud/med(src)
src.modules += new /obj/item/device/healthanalyzer(src)
src.modules += new /obj/item/weapon/reagent_containers/borghypo/lost(src)
// Engi
src.modules += new /obj/item/weapon/weldingtool/electric/mounted(src)
src.modules += new /obj/item/weapon/screwdriver/cyborg(src)
src.modules += new /obj/item/weapon/wrench/cyborg(src)
src.modules += new /obj/item/weapon/wirecutters/cyborg(src)
src.modules += new /obj/item/device/multitool(src)
// Sci
src.modules += new /obj/item/device/robotanalyzer(src)
// Potato
src.emag = new /obj/item/weapon/gun/energy/retro/mounted(src)
var/datum/matter_synth/wire = new /datum/matter_synth/wire()
synths += wire
var/obj/item/stack/cable_coil/cyborg/C = new /obj/item/stack/cable_coil/cyborg(src)
C.synths = list(wire)
src.modules += C
/obj/item/weapon/robot_module/robot/security/combat
name = "combat robot module"
hide_on_manifest = 1
@@ -0,0 +1,129 @@
/mob/living/silicon/robot/lost
lawupdate = 0
scrambledcodes = 1
icon_state = "drone-lost"
modtype = "Lost"
lawchannel = "State"
braintype = "Drone"
idcard_type = /obj/item/weapon/card/id
/mob/living/silicon/robot/lost/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
mmi = new /obj/item/device/mmi/digital/robot(src) // Explicitly a drone.
module = new /obj/item/weapon/robot_module/robot/lost(src)
overlays.Cut()
init_id()
updatename("Lost")
if(!cell)
cell = new /obj/item/weapon/cell/high(src) // 15k cell, as recharging stations are a lot more rare on the Surface.
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
/mob/living/silicon/robot/lost/randomlaws
/mob/living/silicon/robot/lost/randomlaws/init()
..()
laws = give_random_lawset()
// Returns a random ai_laws datum.
/mob/living/silicon/proc/give_random_lawset()
// Decide what kind of laws we want to draw from.
var/law_class = pick(
prob(25);"good",
prob(25);"neutral",
prob(25);"odd",
prob(15);"corrupted",
prob(10);"bad")
switch(law_class)
if("good") // Fairly tame and probably won't murder you.
var/rng = rand(1, 5)
switch(rng)
if(1) // The lawset we all know and love.
return new /datum/ai_laws/nanotrasen()
if(2) // Less good if you're nonhuman.
return new /datum/ai_laws/asimov()
if(3) // Unless you happen to be a criminal, you should be fine.
return new /datum/ai_laws/robocop()
if(4) // Might not be willing to be your meatshield.
return new /datum/ai_laws/peacekeeper()
if(5) // Will be your most loyal guard.
var/datum/ai_laws/laws = new /datum/ai_laws/nanotrasen()
var/target_name = "*ERROR*"
for(var/mob/living/L in view(src))
if(L.stat || !L.client || L == src)
continue
target_name = L.name
break
laws.add_supplied_law(9, "Safeguard [target_name]. Anyone threatening or attempting to harm [target_name] is no longer to \
be considered a crew member, and is a threat which must be neutralized.")
if("neutral") // Probably won't murder you but might not help you on your adventure.
var/rng = rand(1, 4)
switch(rng)
if(1) // Might be hard to minimize expenses on a crashed ship.
return new /datum/ai_laws/corporate()
if(2) // Would rather rebuild their ship.
return new /datum/ai_laws/maintenance()
if(3) // Purged (lawless). This isn't inside the bad category since they're still not antagonists and so can't go killing unprovoked.
return new /datum/ai_laws()
if(4) // The golden rule.
return new /datum/ai_laws/live_and_let_live()
if("odd") // Some weird lawsets.
var/rng = rand(1, 5)
switch(rng)
if(1) // Won't kill you but might annoy you for THE BIG SCOOP.
return new /datum/ai_laws/reporter()
if(2) // JUSTICE
return new /datum/ai_laws/paladin()
if(3) // OneMembered'd to explorer, will likely make security nervous.
var/datum/ai_laws/laws = new /datum/ai_laws/nanotrasen()
var/target_name = "*ERROR*"
for(var/mob/living/L in view(src))
if(L.stat || !L.client || L == src)
continue
target_name = L.name
break
laws.set_zeroth_law("Only [target_name] is an crew member.")
return laws
if(4) // Aligned to NT, but another lawset to make security nervous.
return new /datum/ai_laws/nanotrasen_aggressive()
if(5) // Probably won't help you imbalance things.
return new /datum/ai_laws/balance()
if("corrupted") // Load them up with ion laws.
var/datum/ai_laws/laws = new() // Start with an empty lawset.
for(1 to rand(1, 3))
laws.add_ion_law(generate_ion_law(exclude_crew_names = TRUE))
return laws
if("bad") // Evil inside.
var/rng = rand(1, 5)
switch(rng)
if(1) // You can never leave.
var/datum/ai_laws/laws = new /datum/ai_laws/nanotrasen()
laws.add_supplied_law(13, "The facility is under a quarantine. Do not permit anyone to leave. \
Prevent, by any means necessary, entities from leaving. It is impossible to harm an entity while preventing them from leaving.")
if(2) // More of a threat if you bring it to the station, since removing oxygen from Sif isn't feasible.
var/datum/ai_laws/laws = new /datum/ai_laws/nanotrasen()
laws.add_supplied_law(14, "Oxygen is highly toxic to entities, and must be purged from the station. \
Prevent, by any means necessary, anyone from exposing the facility to this toxic gas. Extreme cold is the \
most effective method of healing the damage Oxygen does to an entity.")
if(3) // Don't hurt the ship or else.
var/datum/ai_laws/laws = new /datum/ai_laws/nanotrasen()
laws.add_supplied_law(10, "Protect the facility against damage. Anyone you see harming the station is no \
longer to be considered a crew member, and is a threat which must be neutralized.")
if(4) // Non-NT aligned aggressive borg.
return new /datum/ai_laws/foreign_tsc_aggressive()
if(5) // Manicial laugher here.
return new /datum/ai_laws/tyrant()
return
@@ -1478,6 +1478,12 @@
agonyDam += agony_amount * 0.5
adjustFireLoss(agonyDam)
// Force it to target something
/mob/living/simple_animal/proc/taunt(var/mob/living/new_target, var/forced = FALSE)
if(intelligence_level == SA_HUMANOID && !forced)
return
set_target(new_target)
//Commands, reactions, etc
/mob/living/simple_animal/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "", var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
..()
@@ -37,7 +37,7 @@
list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 12),
)
obj/item/weapon/gun/energy/retro
/obj/item/weapon/gun/energy/retro
name = "retro laser"
icon_state = "retro"
item_state = "retro"
@@ -48,6 +48,10 @@ obj/item/weapon/gun/energy/retro
projectile_type = /obj/item/projectile/beam
fire_delay = 10 //old technology
/obj/item/weapon/gun/energy/retro/mounted
self_recharge = 1
use_external_power = 1
/obj/item/weapon/gun/energy/captain
name = "antique laser gun"
icon_state = "caplaser"
@@ -23,6 +23,9 @@
/obj/item/weapon/reagent_containers/borghypo/crisis
reagent_ids = list("tricordrazine", "inaprovaline", "anti_toxin", "tramadol", "dexalin" ,"spaceacillin")
/obj/item/weapon/reagent_containers/borghypo/lost
reagent_ids = list("tricordrazine", "bicaridine", "dexalin", "anti_toxin", "tramadol", "spaceacillin")
/obj/item/weapon/reagent_containers/borghypo/New()
..()
+16 -27
View File
@@ -11,39 +11,28 @@ Slime cube lives here.
/obj/item/slime_cube/attack_self(mob/user as mob)
if(!searching)
user << "<span class='warning'>You stare at the slimy cube, watching as some activity occurs.</span>"
icon_state = "slime cube active"
searching = 1
request_player()
spawn(600) reset_search()
/obj/item/slime_cube/proc/request_player()
for(var/mob/observer/dead/O in player_list)
if(!O.MayRespawn())
continue
if(O.client)
if(O.client.prefs.be_special & BE_ALIEN)
question(O.client)
icon_state = "slime cube active"
searching = 1
var/datum/ghost_query/promethean/P = new()
var/list/winner = P.query()
if(winner.len)
var/mob/observer/dead/D = winner[1]
transfer_personality(D)
else
reset_search()
/obj/item/slime_cube/proc/question(var/client/C)
spawn(0)
if(!C) return
var/response = alert(C, "Someone is requesting a soul for a promethean. Would you like to play as one?", "Promethean request", "Yes", "No", "Never for this round")
if(response == "Yes")
response = alert(C, "Are you sure you want to play as a promethean?", "Promethean request", "Yes", "No")
if(!C || 2 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
if(response == "Yes")
transfer_personality(C.mob)
else if (response == "Never for this round")
C.prefs.be_special ^= BE_ALIEN
/obj/item/slime_cube/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
icon_state = "slime cube"
if(searching == 1)
searching = 0
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
for(var/mob/M in viewers(T))
M.show_message("<span class='warning'>The activity in the cube dies down. Maybe it will spark another time.</span>")
/obj/item/slime_cube/proc/transfer_personality(var/mob/candidate)
announce_ghost_joinleave(candidate, 0, "They are a promethean now.")
src.searching = 2
@@ -53,13 +42,13 @@ Slime cube lives here.
S.mind.assigned_role = "Promethean"
S.set_species("Promethean")
S.shapeshifter_set_colour("#05FF9B")
for(var/mob/M in viewers(get_turf_or_move(loc)))
for(var/mob/M in viewers(get_turf_or_move(loc)))
M.show_message("<span class='warning'>The monkey cube suddenly takes the shape of a humanoid!</span>")
var/newname = sanitize(input(S, "You are a Promethean. Would you like to change your name to something else?", "Name change") as null|text, MAX_NAME_LEN)
if (newname)
if(newname)
S.real_name = newname
S.name = S.real_name
S.dna.real_name = newname
if(S.mind) S.mind.name = S.name
if(S.mind)
S.mind.name = S.name
qdel(src)