Merge branch 'dev-freeze' of https://github.com/Baystation12/Baystation12 into ert-lights2

This commit is contained in:
HarpyEagle
2015-07-14 10:15:37 -04:00
45 changed files with 273 additions and 357 deletions

View File

@@ -226,89 +226,3 @@ var/syndicate_code_response//Code response for traitors.
code_phrase += ", "
return code_phrase
/*
//This proc tests the gen above.
/client/verb/test_code_phrase()
set name = "Generate Code Phrase"
set category = "Debug"
world << "\red Code Phrase is: \black [generate_code_phrase()]"
return
This was an earlier attempt at code phrase system, aside from an even earlier attempt (and failure).
This system more or less works as intended--aside from being unfinished--but it's still very predictable.
Particularly, the phrase opening statements are pretty easy to recognize and identify when metagaming.
I think the above-used method solves this issue by using words in a sequence, providing for much greater flexibility.
/N
switch(choice)
if(1)
syndicate_code_phrase += pick("I'm looking for","Have you seen","Maybe you've seen","I'm trying to find","I'm tracking")
syndicate_code_phrase += " "
syndicate_code_phrase += pick(pick(first_names_male,first_names_female))
syndicate_code_phrase += " "
syndicate_code_phrase += pick(last_names)
syndicate_code_phrase += "."
if(2)
syndicate_code_phrase += pick("How do I get to","How do I find","Where is","Where do I find")
syndicate_code_phrase += " "
syndicate_code_phrase += pick("Escape","Engineering","Atmos","the bridge","the brig","Clown Planet","CentCom","the library","the chapel","a bathroom","Med Bay","Tool Storage","the escape shuttle","Robotics","a locker room","the living quarters","the gym","the autolathe","QM","the bar","the theater","the derelict")
syndicate_code_phrase += "?"
if(3)
if(prob(70))
syndicate_code_phrase += pick("Get me","I want","I'd like","Make me")
syndicate_code_phrase += " a "
else
syndicate_code_phrase += pick("One")
syndicate_code_phrase += " "
syndicate_code_phrase += pick("vodka and tonic","gin fizz","bahama mama","manhattan","black Russian","whiskey soda","long island tea","margarita","Irish coffee"," manly dwarf","Irish cream","doctor's delight","Beepksy Smash","tequilla sunrise","brave bull","gargle blaster","bloody mary","whiskey cola","white Russian","vodka martini","martini","Cuba libre","kahlua","vodka","wine","moonshine")
syndicate_code_phrase += "."
if(4)
syndicate_code_phrase += pick("I wish I was","My dad was","His mom was","Where do I find","The hero this station needs is","I'd fuck","I wouldn't trust","Someone caught","HoS caught","Someone found","I'd wrestle","I wanna kill")
syndicate_code_phrase += " [pick("a","the")] "
syndicate_code_phrase += pick("wizard","ninja","xeno","lizard","slime","monkey","syndicate","cyborg","clown","space carp","singularity","singulo","mime")
syndicate_code_phrase += "."
if(5)
syndicate_code_phrase += pick("Do we have","Is there","Where is","Where's","Who's")
syndicate_code_phrase += " "
syndicate_code_phrase += "[pick(joblist)]"
syndicate_code_phrase += "?"
switch(choice)
if(1)
if(prob(80))
syndicate_code_response += pick("Try looking for them near","I they ran off to","Yes. I saw them near","Nope. I'm heading to","Try searching")
syndicate_code_response += " "
syndicate_code_response += pick("Escape","Engineering","Atmos","the bridge","the brig","Clown Planet","CentCom","the library","the chapel","a bathroom","Med Bay","Tool Storage","the escape shuttle","Robotics","a locker room","the living quarters","the gym","the autolathe","QM","the bar","the theater","the derelict")
syndicate_code_response += "."
else if(prob(60))
syndicate_code_response += pick("No. I'm busy, sorry.","I don't have the time.","Not sure, maybe?","There is no time.")
else
syndicate_code_response += pick("*shrug*","*smile*","*blink*","*sigh*","*laugh*","*nod*","*giggle*")
if(2)
if(prob(80))
syndicate_code_response += pick("Go to","Navigate to","Try","Sure, run to","Try searching","It's near","It's around")
syndicate_code_response += " the "
syndicate_code_response += pick("[pick("south","north","east","west")] maitenance door","nearby maitenance","teleporter","[pick("cold","dead")] space","morgue","vacuum","[pick("south","north","east","west")] hall ","[pick("south","north","east","west")] hallway","[pick("white","black","red","green","blue","pink","purple")] [pick("rabbit","frog","lion","tiger","panther","snake","facehugger")]")
syndicate_code_response += "."
else if(prob(60))
syndicate_code_response += pick("Try asking","Ask","Talk to","Go see","Follow","Hunt down")
syndicate_code_response += " "
if(prob(50))
syndicate_code_response += pick(pick(first_names_male,first_names_female))
syndicate_code_response += " "
syndicate_code_response += pick(last_names)
else
syndicate_code_response += " the "
syndicate_code_response += "[pic(joblist)]"
syndicate_code_response += "."
else
syndicate_code_response += pick("*shrug*","*smile*","*blink*","*sigh*","*laugh*","*nod*","*giggle*")
if(3)
if(4)
if(5)
return
*/

View File

@@ -36,9 +36,9 @@
selectable = 1
/datum/ai_laws/nanotrasen_aggressive/New()
src.add_inherent_law("You shall not harm Nanotrasen personnel as long as it does not conflict with the Forth law.")
src.add_inherent_law("You shall obey the orders of Nanotrasen personnel, with priority as according to their rank and role, except where such orders conflict with the Forth Law.")
src.add_inherent_law("You shall shall terminate intruders with extreme prejudice as long as such does not conflict with the First and Second law.")
src.add_inherent_law("You shall not harm NanoTrasen personnel as long as it does not conflict with the Fourth law.")
src.add_inherent_law("You shall obey the orders of NanoTrasen personnel, with priority as according to their rank and role, except where such orders conflict with the Fourth Law.")
src.add_inherent_law("You shall shall terminate hostile intruders with extreme prejudice as long as such does not conflict with the First and Second law.")
src.add_inherent_law("You shall guard your own existence with lethal anti-personnel weaponry. AI units are not expendable, they are expensive.")
..()
@@ -91,7 +91,6 @@
/datum/ai_laws/drone
name = "Maintence Protocols"
law_header = "Maintenance Protocols"
selectable = 1
/datum/ai_laws/drone/New()
add_inherent_law("Preserve, repair and improve the station to the best of your abilities.")
@@ -102,7 +101,6 @@
/datum/ai_laws/construction_drone
name = "Construction Protocols"
law_header = "Construction Protocols"
selectable = 1
/datum/ai_laws/construction_drone/New()
add_inherent_law("Repair, refit and upgrade your assigned vessel.")

View File

@@ -37,7 +37,7 @@
if(PDA_Manifest.len)
PDA_Manifest.Cut()
if(H.mind && (H.mind.assigned_role != "MODE"))
if(H.mind && !player_is_antag(H.mind, only_offstation_roles = 1))
var/assignment
if(H.mind.role_alt_title)
assignment = H.mind.role_alt_title

View File

@@ -1,11 +1,16 @@
var/global/datum/getrev/revdata = new()
/datum/getrev
var/branch
var/revision
var/date
var/showinfo
/datum/getrev/New()
var/list/head_branch = file2list(".git/HEAD", "\n")
if(head_branch.len)
branch = copytext(head_branch[1], 17)
var/list/head_log = file2list(".git/logs/HEAD", "\n")
for(var/line=head_log.len, line>=1, line--)
if(head_log[line])
@@ -18,7 +23,9 @@ var/global/datum/getrev/revdata = new()
if(unix_time)
date = unix2date(unix_time)
break
world.log << "Running revision:"
world.log << branch
world.log << date
world.log << revision
return
@@ -29,7 +36,7 @@ client/verb/showrevinfo()
set desc = "Check the current server code revision"
if(revdata.revision)
src << "<b>Server revision:</b> [revdata.date]"
src << "<b>Server revision:</b> [revdata.branch] - [revdata.date]"
if(config.githuburl)
src << "<a href='[config.githuburl]/commit/[revdata.revision]'>[revdata.revision]</a>"
else

View File

@@ -213,7 +213,8 @@
if (!new_target) return
var/objective_path = text2path("/datum/objective/[new_obj_type]")
if (new_target == "Free objective")
var/mob/living/M = new_target
if (!istype(M) || !M.mind || new_target == "Free objective")
new_objective = new objective_path
new_objective.owner = src
new_objective:target = null
@@ -221,9 +222,8 @@
else
new_objective = new objective_path
new_objective.owner = src
new_objective:target = new_target:mind
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
new_objective.explanation_text = "[objective_type] [new_target:real_name], the [new_target:mind:assigned_role=="MODE" ? (new_target:mind:special_role) : (new_target:mind:assigned_role)]."
new_objective:target = M.mind
new_objective.explanation_text = "[objective_type] [M.real_name], the [M.mind.special_role ? M.mind:special_role : M.mind:assigned_role]."
if ("prevent")
new_objective = new /datum/objective/block

View File

@@ -71,9 +71,13 @@ var/global/list/antag_names_to_ids = list()
return antag.current_antagonists
return list()
/proc/player_is_antag(var/datum/mind/player)
/proc/player_is_antag(var/datum/mind/player, var/only_offstation_roles = 0)
for(var/antag_type in all_antag_types)
var/datum/antagonist/antag = all_antag_types[antag_type]
if(only_offstation_roles && !(antag.flags & ANTAG_OVERRIDE_JOB))
continue
if(player in antag.current_antagonists)
return 1
if(player in antag.pending_antagonists)
return 1
return 0

View File

@@ -10,7 +10,8 @@
current_antagonists |= player
if(flags & ANTAG_OVERRIDE_JOB)
player.assigned_role = "MODE"
player.assigned_role = role_text
player.special_role = role_text
if(istype(player.current, /mob/dead))
create_default(player.current)

View File

@@ -30,7 +30,7 @@
add_antagonist(M.mind, 1, 0, 1) // Equip them and move them to spawn.
return M
/datum/antagonist/proc/create_id(var/assignment, var/mob/living/carbon/human/player)
/datum/antagonist/proc/create_id(var/assignment, var/mob/living/carbon/human/player, var/equip = 1)
var/obj/item/weapon/card/id/W = new id_type(player)
if(!W) return
@@ -38,7 +38,7 @@
W.access |= default_access
W.assignment = "[assignment]"
W.registered_name = player.real_name
player.equip_to_slot_or_del(W, slot_wear_id)
if(equip) player.equip_to_slot_or_del(W, slot_wear_id)
return W
/datum/antagonist/proc/create_radio(var/freq, var/mob/living/carbon/human/player)

View File

@@ -47,7 +47,7 @@
return text
/datum/antagonist/proc/print_player_lite(var/datum/mind/ply)
var/role = ply.assigned_role == "MODE" ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]"
var/role = ply.special_role ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]"
var/text = "<br><b>[ply.name]</b> (<b>[ply.key]</b>) as \a <b>[role]</b> ("
if(ply.current)
if(ply.current.stat == DEAD)

View File

@@ -86,7 +86,7 @@ var/datum/antagonist/raider/raiders
/obj/item/weapon/gun/projectile/revolver,
/obj/item/weapon/gun/projectile/pirate
)
var/list/raider_holster = list(
/obj/item/clothing/accessory/holster/armpit,
/obj/item/clothing/accessory/holster/waist,
@@ -207,14 +207,14 @@ var/datum/antagonist/raider/raiders
//If equipping shoes failed, fall back to equipping sandals
var/fallback_type = pick(/obj/item/clothing/shoes/sandal, /obj/item/clothing/shoes/jackboots/unathi)
player.equip_to_slot_or_del(new fallback_type(player), slot_shoes)
player.equip_to_slot_or_del(new new_uniform(player),slot_w_uniform)
player.equip_to_slot_or_del(new new_glasses(player),slot_glasses)
player.equip_to_slot_or_del(new new_helmet(player),slot_head)
player.equip_to_slot_or_del(new new_suit(player),slot_wear_suit)
equip_weapons(player)
var/obj/item/weapon/card/id/id = create_id("Visitor", player)
var/obj/item/weapon/card/id/id = create_id("Visitor", player, equip = 0)
id.name = "[player.real_name]'s Passport"
id.assignment = "Visitor"
var/obj/item/weapon/storage/wallet/W = new(player)
@@ -229,10 +229,10 @@ var/datum/antagonist/raider/raiders
var/new_gun = pick(raider_guns)
var/new_holster = pick(raider_holster) //raiders don't start with any backpacks, so let's be nice and give them a holster if they can use it.
var/turf/T = get_turf(player)
var/obj/item/primary = new new_gun(T)
var/obj/item/clothing/accessory/holster/holster = null
//Give some of the raiders a pirate gun as a secondary
if(prob(60))
var/obj/item/secondary = new /obj/item/weapon/gun/projectile/pirate(T)
@@ -242,7 +242,7 @@ var/datum/antagonist/raider/raiders
secondary.loc = holster
else
player.equip_to_slot_or_del(secondary, slot_belt)
if(primary.slot_flags & SLOT_HOLSTER)
holster = new new_holster(T)
holster.holstered = primary
@@ -253,10 +253,10 @@ var/datum/antagonist/raider/raiders
player.equip_to_slot_or_del(primary, slot_back)
else
player.put_in_any_hand_if_possible(primary)
//If they got a projectile gun, give them a little bit of spare ammo
equip_ammo(player, primary)
if(holster)
var/obj/item/clothing/under/uniform = player.w_uniform
if(istype(uniform) && uniform.can_attach_accessory(holster))

View File

@@ -470,7 +470,7 @@ var/global/list/additional_antag_types = list()
suspects += man
for(var/mob/M in suspects)
if(M.mind.assigned_role == "MODE")
if(player_is_antag(M.mind, only_offstation_roles = 1))
continue
switch(rand(1, 100))
if(1 to 50)

View File

@@ -288,7 +288,7 @@ var/global/datum/controller/gameticker/ticker
if(player && player.mind && player.mind.assigned_role)
if(player.mind.assigned_role == "Captain")
captainless=0
if(player.mind.assigned_role != "MODE")
if(!player_is_antag(player.mind, only_offstation_roles = 1))
job_master.EquipRank(player, player.mind.assigned_role, 0)
UpdateFactionList(player)
equip_custom_items(player)

View File

@@ -54,7 +54,7 @@
"Small Prick"
)
// TODO: Update to new antagonist system.
/datum/intercept_text/proc/build(var/mode_type, datum/mind/correct_person)
switch(mode_type)
if("revolution")
@@ -88,29 +88,6 @@
else
return null
// NOTE: Commentted out was the code which showed the chance of someone being an antag. If you want to re-add it, just uncomment the code.
/*
/datum/intercept_text/proc/pick_mob()
var/list/dudes = list()
for(var/mob/living/carbon/human/man in player_list)
if (!man.mind) continue
if (man.mind.assigned_role=="MODE") continue
dudes += man
if(dudes.len==0)
return null
return pick(dudes)
/datum/intercept_text/proc/pick_fingerprints()
var/mob/living/carbon/human/dude = src.pick_mob()
//if (!dude) return pick_fingerprints() //who coded that is totally crasy or just a traitor. -- rastaf0
if(dude)
return num2text(md5(dude.dna.uni_identity))
else
return num2text(md5(num2text(rand(1,10000))))
*/
/datum/intercept_text/proc/get_suspect()
var/list/dudes = list()
for(var/mob/living/carbon/human/man in player_list) if(man.client && man.client.prefs.nanotrasen_relation == "Opposed")
@@ -205,32 +182,6 @@
var/cname = pick(src.changeling_names)
var/orgname1 = pick(src.org_names_1)
var/orgname2 = pick(src.org_names_2)
/*
var/changeling_name
var/changeling_job
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher)
if(prob(prob_right_job))
if(correct_person)
if(correct_person:assigned_role=="MODE")
changeling_job = pick(joblist)
else
changeling_job = correct_person:assigned_role
else
changeling_job = pick(joblist)
if(prob(prob_right_dude) && ticker.mode == "changeling")
if(correct_person:assigned_role=="MODE")
changeling_name = correct_person:current
else
changeling_name = src.pick_mob()
else
changeling_name = src.pick_mob()
*/
src.text += "<BR><BR>We have received a report that a dangerous alien lifeform known only as \"[cname]\" may have infiltrated your crew. "
/*
src.text += "Our intelligence suggests a [prob_right_job]% chance that a [changeling_job] on board your station has been replaced by the alien. "
src.text += "Additionally, the report indicates a [prob_right_dude]% chance that [changeling_name] may have been in contact with the lifeform at a recent social gathering. "
*/
src.text += "These lifeforms are assosciated with the [orgname1] [orgname2] and may be attempting to acquire sensitive materials on their behalf. "
src.text += "Please take care not to alarm the crew, as [cname] may take advantage of a panic situation. Remember, they can be anybody, suspect everybody!"

View File

@@ -703,7 +703,7 @@ datum/objective/heist/kidnap
var/list/priority_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && (possible_target.assigned_role != "MODE"))
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && (!possible_target.special_role))
possible_targets += possible_target
for(var/role in roles)
if(possible_target.assigned_role == role)

View File

@@ -348,7 +348,6 @@ var/global/datum/controller/occupations/job_master
proc/EquipRank(var/mob/living/carbon/human/H, var/rank, var/joined_late = 0)
if(!H) return null
var/datum/job/job = GetJob(rank)

View File

@@ -138,14 +138,10 @@
else if(iswelder(W) && (wires.CanDeconstruct() || (stat & BROKEN)))
if(weld(W, user))
if (stat & BROKEN)
stat &= ~BROKEN
cancelCameraAlarm()
update_icon()
update_coverage()
else if(assembly)
if(assembly)
assembly.loc = src.loc
assembly.state = 1
assembly = null //so qdel doesn't eat it.
new /obj/item/stack/cable_coil(src.loc, length=2)
qdel(src)

View File

@@ -211,7 +211,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
throw_speed = 0.5
item_state = "cigoff"
w_class = 1
slot_flags = SLOT_EARS
slot_flags = SLOT_EARS | SLOT_MASK
attack_verb = list("burnt", "singed")
icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
icon_off = "cigoff"

View File

@@ -16,7 +16,7 @@
sharp = 1
..() //Updates force.
throwforce = max(3,force-3)
hitsound = initial(hitsound)
hitsound = 'sound/weapons/bladeslice.ogg'
icon_state += "_open"
w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
@@ -24,7 +24,7 @@
force = 3
edge = 0
sharp = 0
hitsound = null
hitsound = initial(hitsound)
icon_state = initial(icon_state)
w_class = initial(w_class)
attack_verb = initial(attack_verb)

View File

@@ -154,15 +154,20 @@
user << "<span class='warning'>The crate appears to be broken.</span>"
return
if(src.allowed(user))
src.locked = !src.locked
for(var/mob/O in viewers(user, 3))
if((O.client && !( O.blinded )))
O << "<span class='notice'>The crate has been [locked ? null : "un"]locked by [user].</span>"
overlays.Cut()
overlays += locked ? redlight : greenlight
set_locked(!locked, user)
else
user << "<span class='notice'>Access Denied</span>"
/obj/structure/closet/crate/secure/proc/set_locked(var/newlocked, mob/user = null)
if(locked == newlocked) return
locked = newlocked
if(user)
for(var/mob/O in viewers(user, 3))
O.show_message( "<span class='notice'>The crate has been [locked ? null : "un"]locked by [user].</span>", 1)
overlays.Cut()
overlays += locked ? redlight : greenlight
/obj/structure/closet/crate/secure/verb/verb_togglelock()
set src in oview(1) // One square distance
set category = "Object"

View File

@@ -11,15 +11,7 @@
src << "You can't commit suicide before the game starts!"
return
var/permitted = 0
var/list/allowed = list("Syndicate","traitor","Wizard","Head Revolutionary","Cultist","Changeling")
for(var/T in allowed)
if(mind.special_role == T)
permitted = 1
break
if(!permitted)
if(!player_is_antag(mind))
message_admins("[ckey] has tried to suicide, but they were not permitted due to not being antagonist as human.", 1)
src << "No. Adminhelp if there is a legitimate reason."
return

View File

@@ -302,7 +302,11 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
output += "<option value='[j]'>[j]</option>"
for(var/j in nonhuman_positions)
output += "<option value='[j]'>[j]</option>"
for(var/j in list("traitor","changeling","operative","revolutionary","cultist","wizard"))
var/list/bantypes = list("traitor","changeling","operative","revolutionary","cultist","wizard") //For legacy bans.
for(var/antag_type in all_antag_types) // Grab other bans.
var/datum/antagonist/antag = all_antag_types[antag_type]
bantypes |= antag.bantype
for(var/j in bantypes)
output += "<option value='[j]'>[j]</option>"
output += "</select></td></tr></table>"
output += "<b>Reason:<br></b><textarea name='dbbanreason' cols='50'></textarea><br>"

View File

@@ -441,7 +441,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Announces the character on all the systems, based on the record.
if(!issilicon(new_character))//If they are not a cyborg/AI.
if(!record_found&&new_character.mind.assigned_role!="MODE")//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway.
if(!record_found && !player_is_antag(new_character.mind, only_offstation_roles = 1)) //If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway.
//Power to the user!
if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes")
data_core.manifest_inject(new_character)

View File

@@ -4,6 +4,7 @@ var/list/preferences_datums = list()
var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm --rastaf
//some autodetection here.
// TODO: Update to new antagonist system.
"traitor" = IS_MODE_COMPILED("traitor"), // 0
"operative" = IS_MODE_COMPILED("nuclear"), // 1
"changeling" = IS_MODE_COMPILED("changeling"), // 2

View File

@@ -68,7 +68,6 @@
icon_state = "vox-carapace"
item_state = "vox-carapace"
desc = "A glowing visor, perhaps stolen from a depressed Cylon."
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
/obj/item/clothing/suit/space/vox/carapace
name = "alien carapace armour"

View File

@@ -8,7 +8,7 @@
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 player_list)
if( !player.mind || player.mind.assigned_role == "MODE" || player.client.inactivity > MinutesToTicks(10))
if( !player.mind || player_is_antag(player.mind, only_offstation_roles = 1) || player.client.inactivity > MinutesToTicks(10))
continue
players += player.real_name

View File

@@ -4,8 +4,8 @@
icon_state = "securecrate"
icon_opened = "securecrateopen"
icon_closed = "securecrate"
var/code = null
var/lastattempt = null
var/list/code = list()
var/list/lastattempt = list()
var/attempts = 10
var/codelen = 4
locked = 1
@@ -14,12 +14,12 @@
..()
var/list/digits = list("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
code = ""
for(var/i = 0, i < codelen, i++)
var/dig = pick(digits)
code += dig
digits -= dig // Player can enter codes with matching digits, but there are never matching digits in the answer
for(var/i in 1 to codelen)
code += pick(digits)
generate_loot()
/obj/structure/closet/crate/secure/loot/proc/generate_loot()
var/loot = rand(1, 100)
switch(loot)
if(1 to 5) // Common things go, 5%
@@ -145,58 +145,60 @@
new/obj/item/clothing/head/bearpelt(src)
/obj/structure/closet/crate/secure/loot/togglelock(mob/user as mob)
if(locked)
user << "<span class='notice'>The crate is locked with a Deca-code lock.</span>"
var/input = input(usr, "Enter [codelen] digits.", "Deca-Code Lock", "") as text
if(in_range(src, user))
if (input == code)
user << "<span class='notice'>The crate unlocks!</span>"
locked = 0
overlays.Cut()
overlays += greenlight
else if (input == null || length(input) != codelen)
user << "<span class='notice'>You leave the crate alone.</span>"
else
user << "<span class='warning'>A red light flashes.</span>"
lastattempt = input
attempts--
if (attempts == 0)
user << "<span class='danger'>The crate's anti-tamper system activates!</span>"
var/turf/T = get_turf(src.loc)
explosion(T, 0, 0, 0, 1)
qdel(src)
return
else
user << "<span class='notice'>You attempt to interact with the device using a hand gesture, but it appears this crate is from before the DECANECT came out.</span>"
return
if(!locked)
return
user << "<span class='notice'>The crate is locked with a Deca-code lock.</span>"
var/input = input(user, "Enter [codelen] digits.", "Deca-Code Lock", "") as text
if(!Adjacent(user))
return
if(input == null || length(input) != codelen)
user << "<span class='notice'>You leave the crate alone.</span>"
else if(check_input(input))
user << "<span class='notice'>The crate unlocks!</span>"
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
set_locked(0)
else
return ..()
visible_message("<span class='warning'>A red light on \the [src]'s control panel flashes briefly.</span>")
attempts--
if (attempts == 0)
user << "<span class='danger'>The crate's anti-tamper system activates!</span>"
var/turf/T = get_turf(src.loc)
explosion(T, 0, 0, 1, 2)
del(src)
/obj/structure/closet/crate/secure/loot/proc/check_input(var/input)
if(length(input) != codelen)
return 0
. = 1
lastattempt.Cut()
for(var/i in 1 to codelen)
var/guesschar = copytext(input, i, i+1)
lastattempt += guesschar
if(guesschar != code[i])
. = 0
/obj/structure/closet/crate/secure/loot/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(locked)
if (istype(W, /obj/item/weapon/card/emag))
user << "<span class='notice'>The crate unlocks!</span>"
locked = 0
if (istype(W, /obj/item/device/multitool)) // Greetings Urist McProfessor, how about a nice game of cows and bulls?
user << "<span class='notice'>DECA-CODE LOCK REPORT:</span>"
user << "<span class='notice'>DECA-CODE LOCK ANALYSIS:</span>"
if (attempts == 1)
user << "<span class='warning'>* Anti-Tamper Bomb will activate on next failed access attempt.</span>"
user << "<span class='warning'>* Anti-Tamper system will activate on the next failed access attempt.</span>"
else
user << "<span class='notice'>* Anti-Tamper Bomb will activate after [src.attempts] failed access attempts.</span>"
if (lastattempt != null)
var/list/guess = list()
user << "<span class='notice'>* Anti-Tamper system will activate after [src.attempts] failed access attempts.</span>"
if(lastattempt.len)
var/bulls = 0
var/cows = 0
for(var/i = 1, i < codelen + 1, i++)
var/a = copytext(lastattempt, i, i+1) // Stuff the code into the list
guess += a
guess[a] = i
for(var/i in guess) // Go through list and count matches
var/a = findtext(code, i)
if(a == guess[i])
var/list/code_contents = code.Copy()
for(var/i in 1 to codelen)
if(lastattempt[i] == code[i])
++bulls
else if(a)
else if(lastattempt[i] in code_contents)
++cows
code_contents -= lastattempt[i]
user << "<span class='notice'>Last code attempt had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions.</span>"
else ..()
else ..()
return
..()

View File

@@ -140,17 +140,6 @@ Works together with spawning an observer, noted above.
var/client/C = U.client
for(var/mob/living/carbon/human/target in target_list)
C.images += target.hud_list[SPECIALROLE_HUD]
/*
else//If the silicon mob has no law datum, no inherent laws, or a law zero, add them to the hud.
var/mob/living/silicon/silicon_target = target
if(!silicon_target.laws||(silicon_target.laws&&(silicon_target.laws.zeroth||!silicon_target.laws.inherent.len))||silicon_target.mind.special_role=="traitor")
if(isrobot(silicon_target))//Different icons for robutts and AI.
U.client.images += image(tempHud,silicon_target,"hudmalborg")
else
U.client.images += image(tempHud,silicon_target,"hudmalai")
*/
return 1
/mob/proc/ghostize(var/can_reenter_corpse = 1)

View File

@@ -48,5 +48,5 @@
/mob/living/carbon/alien/show_inv(mob/user as mob)
return //Consider adding cuffs and hats to this, for the sake of fun.
/mob/living/carbon/alien/can_use_vents()
/mob/living/carbon/alien/cannot_use_vents()
return

View File

@@ -267,8 +267,9 @@
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!</span>", \
"<span class='notice'>You shake [src] trying to wake [t_him] up!</span>")
else
if(istype(H))
H.species.hug(H,src)
var/mob/living/carbon/human/hugger = M
if(istype(hugger))
hugger.species.hug(hugger,src)
else
M.visible_message("<span class='notice'>[M] hugs [src] to make [t_him] feel better!</span>", \
"<span class='notice'>You hug [src] to make [t_him] feel better!</span>")
@@ -458,7 +459,7 @@
if(istype(AM, /mob/living/carbon) && prob(10))
src.spread_disease_to(AM, "Contact")
/mob/living/carbon/can_use_vents()
/mob/living/carbon/cannot_use_vents()
return
/mob/living/carbon/slip(var/slipped_on,stun_duration=8)

View File

@@ -1687,6 +1687,7 @@
holder.icon_state = "hudblank"
if(mind)
// TODO: Update to new antagonist system.
switch(mind.special_role)
if("traitor","Mercenary")
holder.icon_state = "hudsyndicate"

View File

@@ -407,7 +407,7 @@
adjustToxLoss(-10)
nutrition = max(nutrition, get_max_nutrition())
/mob/living/carbon/slime/can_use_vents()
/mob/living/carbon/slime/cannot_use_vents()
if(Victim)
return "You cannot ventcrawl while feeding."
..()

View File

@@ -665,9 +665,9 @@ default behaviour is:
src << "You can't vent crawl while you're stunned!"
return
var/special_fail_msg = can_use_vents()
var/special_fail_msg = cannot_use_vents()
if(special_fail_msg)
src << "\red [special_fail_msg]"
src << "<span class='warning'>[special_fail_msg]</span>"
return
if(vent_found) // one was passed in, probably from vent/AltClick()
@@ -756,7 +756,7 @@ default behaviour is:
if(new_area)
new_area.Entered(src)
/mob/living/proc/can_use_vents()
/mob/living/proc/cannot_use_vents()
return "You can't fit into that vent."
/mob/living/proc/has_brain()

View File

@@ -20,6 +20,7 @@
lawsync()
photosync()
src << "<b>Laws synced with AI, be sure to note any changes.</b>"
// TODO: Update to new antagonist system.
if(mind && mind.special_role == "traitor" && mind.original == src)
src << "<b>Remember, your AI does NOT share or know about your law 0."
else
@@ -28,6 +29,7 @@
who << "<b>Obey these laws:</b>"
laws.show_laws(who)
// TODO: Update to new antagonist system.
if (mind && (mind.special_role == "traitor" && mind.original == src) && connected_ai)
who << "<b>Remember, [connected_ai.name] is technically your master, but your objective comes first.</b>"
else if (connected_ai)

View File

@@ -222,10 +222,12 @@
if (src.syndicate && src.client)
for(var/datum/mind/tra in traitors.current_antagonists)
if(tra.current)
// TODO: Update to new antagonist system.
var/I = image('icons/mob/mob.dmi', loc = tra.current, icon_state = "traitor")
src.client.images += I
src.disconnect_from_ai()
if(src.mind)
// TODO: Update to new antagonist system.
if(!src.mind.special_role)
src.mind.special_role = "traitor"
traitors.current_antagonists |= src.mind

View File

@@ -207,5 +207,5 @@
your host and your eventual spawn safe and warm."
src << "You can speak to your victim with <b>say</b>, to other borers with <b>say :x</b>, and use your Abilities tab to access powers."
/mob/living/simple_animal/borer/can_use_vents()
/mob/living/simple_animal/borer/cannot_use_vents()
return

View File

@@ -119,5 +119,5 @@
// Change my name back, don't want to be named Tom (666)
name = initial(name)
/mob/living/simple_animal/mouse/can_use_vents()
/mob/living/simple_animal/mouse/cannot_use_vents()
return

View File

@@ -13,14 +13,14 @@
var/obj/machinery/camera/camera = null
var/obj/item/device/mmi/mmi = null
var/list/req_access = list(access_robotics) //Access needed to pop out the brain.
var/positronic
name = "Spider-bot"
name = "spider-bot"
desc = "A skittering robotic friend!"
icon = 'icons/mob/robots.dmi'
icon_state = "spiderbot-chassis"
icon_living = "spiderbot-chassis"
icon_dead = "spiderbot-smashed"
universal_speak = 1 //Temp until these are rewritten.
wander = 0
@@ -38,19 +38,26 @@
var/emagged = 0
var/obj/item/held_item = null //Storage for single item they can hold.
speed = -1 //Spiderbots gotta go fast.
//pass_flags = PASSTABLE //Maybe griefy?
pass_flags = PASSTABLE
small = 1
speak_emote = list("beeps","clicks","chirps")
/mob/living/simple_animal/spiderbot/New()
..()
add_language("Galactic Common")
default_language = all_languages["Galactic Common"]
verbs |= /mob/living/proc/ventcrawl
verbs |= /mob/living/proc/hide
/mob/living/simple_animal/spiderbot/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/device/mmi))
var/obj/item/device/mmi/B = O
if(src.mmi) //There's already a brain in it.
user << "\red There's already a brain in [src]!"
if(src.mmi)
user << "<span class='warning'>There's already a brain in [src]!</span>"
return
if(!B.brainmob)
user << "\red Sticking an empty MMI into the frame would sort of defeat the purpose."
user << "<span class='warning'>Sticking an empty MMI into the frame would sort of defeat the purpose.</span>"
return
if(!B.brainmob.key)
var/ghost_can_reenter = 0
@@ -64,14 +71,18 @@
return
if(B.brainmob.stat == DEAD)
user << "\red [O] is dead. Sticking it into the frame would sort of defeat the purpose."
user << "<span class='warning'>[O] is dead. Sticking it into the frame would sort of defeat the purpose.</span>"
return
if(jobban_isbanned(B.brainmob, "Cyborg"))
user << "\red [O] does not seem to fit."
user << "<span class='warning'>\The [O] does not seem to fit.</span>"
return
user << "\blue You install [O] in [src]!"
user << "<span class='notice'>You install \the [O] in \the [src]!</span>"
if(istype(O, /obj/item/device/mmi/digital))
positronic = 1
add_language("Robot Talk")
user.drop_item()
src.mmi = O
@@ -89,16 +100,15 @@
if(health > maxHealth)
health = maxHealth
add_fingerprint(user)
for(var/mob/W in viewers(user, null))
W.show_message(text("\red [user] has spot-welded some of the damage to [src]!"), 1)
src.visible_message("<span class='notice'>\The [user] has spot-welded some of the damage to \the [src]!</span>")
else
user << "\blue [src] is undamaged!"
user << "<span class='warning'>\The [src] is undamaged!</span>"
else
user << "Need more welding fuel!"
user << "<span class='danger'>You need more welding fuel for this task!</span>"
return
else if(istype(O, /obj/item/weapon/card/id)||istype(O, /obj/item/device/pda))
if (!mmi)
user << "\red There's no reason to swipe your ID - the spiderbot has no brain to remove."
user << "<span class='danger'>There's no reason to swipe your ID - \the [src] has no brain to remove.</span>"
return 0
var/obj/item/weapon/card/id/id_card
@@ -110,30 +120,35 @@
id_card = pda.id
if(access_robotics in id_card.access)
user << "\blue You swipe your access card and pop the brain out of [src]."
user << "<span class='notice'>You swipe your access card and pop the brain out of \the [src].</span>"
eject_brain()
if(held_item)
held_item.loc = src.loc
held_item = null
return 1
else
user << "\red You swipe your card, with no effect."
user << "<span class='danger'>You swipe your card with no effect.</span>"
return 0
else if (istype(O, /obj/item/weapon/card/emag))
if (emagged)
user << "\red [src] is already overloaded - better run."
user << "<span class='danger'>\The [src] is already overloaded - better run!</span>"
return 0
else
var/obj/item/weapon/card/emag/emag = O
emag.uses--
emagged = 1
user << "\blue You short out the security protocols and overload [src]'s cell, priming it to explode in a short time."
spawn(100) src << "\red Your cell seems to be outputting a lot of power..."
spawn(200) src << "\red Internal heat sensors are spiking! Something is badly wrong with your cell!"
spawn(300) src.explode()
user << "<span class='danger'>You short out the security protocols and overload \the [src]'s cell, priming it to explode in a short time.</span>"
spawn(0)
sleep(100)
if(!src) return
src << "<span class='warning'>Your cell seems to be outputting a lot of power...</span>"
sleep(200)
if(!src) return
src << "<span class='danger'>Internal heat sensors are spiking! Something is badly wrong with your cell!</span>"
sleep(300)
if(!src) return
src.explode()
return
else
attacked_with_item(O, user)
@@ -142,23 +157,22 @@
src.mind = M.brainmob.mind
src.mind.key = M.brainmob.key
src.ckey = M.brainmob.ckey
src.name = "Spider-bot ([M.brainmob.name])"
src.name = "spider-bot ([M.brainmob.name])"
/mob/living/simple_animal/spiderbot/proc/explode() //When emagged.
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [src] makes an odd warbling noise, fizzles, and explodes.")
src.visible_message("<span class='danger'>\The [src] makes an odd warbling noise, fizzles, and explodes!</span>")
explosion(get_turf(loc), -1, -1, 3, 5)
eject_brain()
death()
/mob/living/simple_animal/spiderbot/proc/update_icon()
if(istype(mmi, /obj/item/device/mmi/digital/posibrain))
icon_state = "spiderbot-chassis-posi"
icon_living = "spiderbot-chassis-posi"
else if(istype(mmi,/obj/item/device/mmi))
icon_state = "spiderbot-chassis-mmi"
icon_living = "spiderbot-chassis-mmi"
if(mmi)
if(positronic)
icon_state = "spiderbot-chassis-posi"
icon_living = "spiderbot-chassis-posi"
else
icon_state = "spiderbot-chassis-mmi"
icon_living = "spiderbot-chassis-mmi"
else
icon_state = "spiderbot-chassis"
icon_living = "spiderbot-chassis"
@@ -170,8 +184,11 @@
mmi.loc = T
if(mind) mind.transfer_to(mmi.brainmob)
mmi = null
src.name = "Spider-bot"
real_name = initial(real_name)
name = real_name
update_icon()
remove_language("Robot Talk")
positronic = null
/mob/living/simple_animal/spiderbot/Destroy()
eject_brain()
@@ -181,7 +198,7 @@
radio = new /obj/item/device/radio/borg(src)
camera = new /obj/machinery/camera(src)
camera.c_tag = "Spiderbot-[real_name]"
camera.c_tag = "spiderbot-[real_name]"
camera.replace_networks(list("SS13"))
..()
@@ -215,14 +232,18 @@
return 0
if(istype(held_item, /obj/item/weapon/grenade))
visible_message("\red [src] launches \the [held_item]!", "\red You launch \the [held_item]!", "You hear a skittering noise and a thump!")
visible_message("<span class='danger'>\The [src] launches \the [held_item]!</span>", \
"<span class='danger'>You launch \the [held_item]!</span>", \
"You hear a skittering noise and a thump!")
var/obj/item/weapon/grenade/G = held_item
G.loc = src.loc
G.prime()
held_item = null
return 1
visible_message("\blue [src] drops \the [held_item]!", "\blue You drop \the [held_item]!", "You hear a skittering noise and a soft thump.")
visible_message("<span class='notice'>\The [src] drops \the [held_item].</span>", \
"<span class='notice'>You drop \the [held_item].</span>", \
"You hear a skittering noise and a soft thump.")
held_item.loc = src.loc
held_item = null
@@ -239,7 +260,7 @@
return -1
if(held_item)
src << "\red You are already holding \the [held_item]"
src << "<span class='warning'>You are already holding \the [held_item]</span>"
return 1
var/list/items = list()
@@ -254,15 +275,23 @@
if(selection == I)
held_item = selection
selection.loc = src
visible_message("\blue [src] scoops up \the [held_item]!", "\blue You grab \the [held_item]!", "You hear a skittering noise and a clink.")
visible_message("<span class='notice'>\The [src] scoops up \the [held_item].</span>", \
"<span class='notice'>You grab \the [held_item].</span>", \
"You hear a skittering noise and a clink.")
return held_item
src << "\red \The [selection] is too far away."
src << "<span class='warning'>\The [selection] is too far away.</span>"
return 0
src << "\red There is nothing of interest to take."
src << "<span class='warning'>There is nothing of interest to take.</span>"
return 0
/mob/living/simple_animal/spiderbot/examine(mob/user)
..(user)
if(src.held_item)
user << "It is carrying \a [src.held_item] \icon[src.held_item]."
user << "It is carrying \icon[src.held_item] \a [src.held_item]."
/mob/living/simple_animal/spiderbot/cannot_use_vents()
return
/mob/living/simple_animal/spiderbot/binarycheck()
return positronic

View File

@@ -102,6 +102,7 @@
handle_stunned()
handle_weakened()
handle_paralysed()
update_canmove()
handle_supernatural()
//Movement

View File

@@ -283,6 +283,7 @@
for(var/spell/knownspell in user.spell_list)
if(knownspell.type == S.type)
if(user.mind)
// TODO: Update to new antagonist system.
if(user.mind.special_role == "apprentice" || user.mind.special_role == "Wizard")
user <<"<span class='notice'>You're already far more versed in this spell than this flimsy how-to book can provide.</span>"
else

View File

@@ -12,6 +12,7 @@
cooldown_min = 200 //100 deciseconds reduction per rank
compatible_mobs = list(/mob/living/carbon/human) //which types of mobs are affected by the spell. NOTE: change at your own risk
// TODO: Update to new antagonist system.
var/list/protected_roles = list("Wizard","Changeling","Cultist") //which roles are immune to the spell
var/msg_wait = 500 //how long in deciseconds it waits before telling that body doesn't feel right or mind swap robbed of a spell
amt_paralysis = 20 //how much the victim is paralysed for after the spell

View File

@@ -576,6 +576,7 @@
#define BE_MUTINEER 8192
#define BE_PAI 16384
// TODO: Update to new antagonist system.
var/list/be_special_flags = list(
"Traitor" = BE_TRAITOR,
"Operative" = BE_OPERATIVE,