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
+5 -1
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>"
+1 -1
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)
+1
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
@@ -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"
+1 -1
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
+52 -50
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
..()
@@ -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)
@@ -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
+4 -3
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)
@@ -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"
@@ -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."
..()
+3 -3
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()
@@ -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)
@@ -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
@@ -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
@@ -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
@@ -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
@@ -102,6 +102,7 @@
handle_stunned()
handle_weakened()
handle_paralysed()
update_canmove()
handle_supernatural()
//Movement
+1
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
@@ -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