Merge branch 'master' into bleeding-edge-freeze

Conflicts:
	code/modules/mob/living/silicon/robot/robot.dm
This commit is contained in:
comma
2013-07-09 12:48:34 +04:00
46 changed files with 1338 additions and 1536 deletions
@@ -869,25 +869,27 @@ ________________________________________________________________________________
if(s_active)
cancel_stealth()
else
spawn(0)
anim(U.loc,U,'icons/mob/mob.dmi',,"cloak",,U.dir)
anim(U.loc,U,'icons/mob/mob.dmi',,"cloak",,U.dir)
s_active=!s_active
U.update_icons() //update their icons
icon_state = U.gender==FEMALE ? "s-ninjasf" : "s-ninjas"
U.regenerate_icons() //update their icons
U << "\blue You are now invisible to normal detection."
for(var/mob/O in oviewers(U))
O.show_message("[U.name] vanishes into thin air!",1)
U.invisibility = INVISIBILITY_OBSERVER
return
/obj/item/clothing/suit/space/space_ninja/proc/cancel_stealth()
var/mob/living/carbon/human/U = affecting
if(s_active)
spawn(0)
anim(U.loc,U,'icons/mob/mob.dmi',,"uncloak",,U.dir)
anim(U.loc,U,'icons/mob/mob.dmi',,"uncloak",,U.dir)
s_active=!s_active
U.update_icons() //update their icons
U << "\blue You are now visible."
U.invisibility = 0
for(var/mob/O in oviewers(U))
O.show_message("[U.name] appears from thin air!",1)
icon_state = U.gender==FEMALE ? "s-ninjanf" : "s-ninjan"
U.regenerate_icons() //update their icons
return 1
return 0
+1 -1
View File
@@ -521,7 +521,7 @@ As such, it's hard-coded for now. No reason for it not to be, really.
mind.assigned_role = "MODE"
mind.special_role = "Ninja"
ticker.mode.ninjas |= mind
//ticker.mode.ninjas |= mind
return 1
/mob/living/carbon/human/proc/equip_space_ninja(safety=0)//Safety in case you need to unequip stuff for existing characters.
+27 -15
View File
@@ -195,7 +195,7 @@ Implants;
if(escaped_on_pod_5 > 0)
feedback_set("escaped_on_pod_5",escaped_on_pod_5)
send2irc("Server", "Round just ended.")
send2mainirc("A round of [src.name] has ended - [surviving_total] survivors, [ghosts] ghosts.")
return 0
@@ -264,8 +264,8 @@ Implants;
/datum/game_mode/proc/get_players_for_role(var/role, override_jobbans=0)
var/list/players = list()
var/list/candidates = list()
var/list/drafted = list()
var/datum/mind/applicant = null
//var/list/drafted = list()
//var/datum/mind/applicant = null
var/roletext
switch(role)
@@ -277,29 +277,40 @@ Implants;
if(BE_CULTIST) roletext="cultist"
if(BE_NINJA) roletext="ninja"
// Ultimate randomizing code right here
// Assemble a list of active players without jobbans.
for(var/mob/new_player/player in player_list)
if(player.client && player.ready)
players += player
if( player.client && player.ready )
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext))
players += player
// Shuffling, the players list is now ping-independent!!!
// Goodbye antag dante
// Shuffle the players list so that it becomes ping-independent.
players = shuffle(players)
// Get a list of all the people who want to be the antagonist for this round
for(var/mob/new_player/player in players)
if(player.client && player.ready)
if(player.client.prefs.be_special & role)
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
candidates += player.mind // Get a list of all the people who want to be the antagonist for this round
log_debug("[player.key] had [roletext] enabled, so drafting them.")
if(player.client.prefs.be_special & role)
log_debug("[player.key] had [roletext] enabled, so we are drafting them.")
candidates += player.mind
players -= player
// If we don't have enough antags, draft people who voted for the round.
if(candidates.len < recommended_enemies)
for(var/key in round_voters)
for(var/mob/new_player/player in players)
if(player.ckey == key)
log_debug("[player.key] voted for this round, so we are drafting them.")
candidates += player.mind
players -= player
break
// Remove candidates who want to be antagonist but have a job that precludes it
if(restricted_jobs)
for(var/datum/mind/player in candidates)
for(var/job in restricted_jobs) // Remove people who want to be antagonist but have a job already that precludes it
for(var/job in restricted_jobs)
if(player.assigned_role == job)
candidates -= player
if(candidates.len < recommended_enemies)
/*if(candidates.len < recommended_enemies)
for(var/mob/new_player/player in players)
if(player.client && player.ready)
if(!(player.client.prefs.be_special & role)) // We don't have enough people who want to be antagonist, make a seperate list of people who don't want to be one
@@ -349,6 +360,7 @@ Implants;
else // Not enough scrubs, ABORT ABORT ABORT
break
*/
return candidates // Returns: The number of people who had the antagonist role set to yes, regardless of recomended_enemies, if that number is greater than recommended_enemies
// recommended_enemies if the number of people with that role set to yes is less than recomended_enemies,
+1 -1
View File
@@ -142,7 +142,7 @@ var/global/datum/controller/gameticker/ticker
if(C.holder)
admins_number++
if(admins_number == 0)
send2irc("Server", "Round just started with no admins online!")
send2adminirc("Round has started with no admins online.")
supply_shuttle.process() //Start the supply shuttle regenerating points -- TLE
master_controller.process() //Start master_controller.process()
+97 -30
View File
@@ -88,6 +88,7 @@
var/area_uid
var/area/alarm_area
var/danger_level = 0
var/buildstage = 2 //2 is built, 1 is building, 0 is frame.
var/target_temperature = T0C+20
var/regulating_temperature = 0
@@ -107,8 +108,26 @@
TLV["temperature"] = list(20, 40, 140, 160) // K
target_temperature = 90
New()
New(var/loc, var/dir, var/building = 0)
..()
if(building)
if(loc)
src.loc = loc
if(dir)
src.dir = dir
buildstage = 0
wiresexposed = 1
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
update_icon()
return
first_run()
proc/first_run()
alarm_area = get_area(src)
if (alarm_area.master)
alarm_area = alarm_area.master
@@ -131,7 +150,7 @@
process()
if((stat & (NOPOWER|BROKEN)) || shorted)
if((stat & (NOPOWER|BROKEN)) || shorted || buildstage != 2)
return
var/turf/simulated/location = loc
@@ -486,6 +505,14 @@
var/wireFlag = AAlarmIndexToFlag[wireIndex]
return ((AAlarmwires & wireFlag) == 0)
proc/allWiresCut()
var/i = 1
while(i<=5)
if(AAlarmwires & AAlarmIndexToFlag[i])
return 0
i++
return 1
proc/cut(var/wireColor)
var/wireFlag = AAlarmWireColorToFlag[wireColor]
var/wireIndex = AAlarmWireColorToIndex[wireColor]
@@ -609,6 +636,9 @@
interact(mob/user)
user.set_machine(src)
if(buildstage!=2)
return
if ( (get_dist(src, user) > 1 ))
if (!istype(user, /mob/living/silicon))
user.machine = null
@@ -1064,28 +1094,74 @@ table tr:first-child th:first-child { border: none;}
update_icon()
return
*/
if(istype(W, /obj/item/weapon/screwdriver)) // Opening that Air Alarm up.
//user << "You pop the Air Alarm's maintence panel open."
wiresexposed = !wiresexposed
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
update_icon()
return
src.add_fingerprint(user)
if (wiresexposed && ((istype(W, /obj/item/device/multitool) || istype(W, /obj/item/weapon/wirecutters))))
return attack_hand(user)
switch(buildstage)
if(2)
if(istype(W, /obj/item/weapon/screwdriver)) // Opening that Air Alarm up.
//user << "You pop the Air Alarm's maintence panel open."
wiresexposed = !wiresexposed
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
update_icon()
return
if (wiresexposed && ((istype(W, /obj/item/device/multitool) || istype(W, /obj/item/weapon/wirecutters))))
return attack_hand(user)
if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
if(stat & (NOPOWER|BROKEN))
user << "It does nothing"
return
else
if(allowed(usr) && !isWireCut(AALARM_WIRE_IDSCAN))
locked = !locked
user << "\blue You [ locked ? "lock" : "unlock"] the Air Alarm interface."
updateUsrDialog()
else
user << "\red Access denied."
return
if(1)
if(istype(W, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/coil = W
if(coil.amount < 5)
user << "You need more cable for this!"
return
user << "You wire \the [src]!"
coil.amount -= 5
if(!coil.amount)
del(coil)
buildstage = 2
update_icon()
first_run()
else if(istype(W, /obj/item/weapon/crowbar))
user << "You pry out the circuit!"
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
spawn(20)
var/obj/item/weapon/airalarm_electronics/circuit = new /obj/item/weapon/airalarm_electronics()
circuit.loc = user.loc
buildstage = 0
update_icon()
return
if(0)
if(istype(W, /obj/item/weapon/airalarm_electronics))
user << "You insert the circuit!"
del(W)
buildstage = 1
update_icon()
/* Commented out due to RUNTIMES, RUNTIMES EVERYWHERE.
else if(istype(W, /obj/item/weapon/wrench))
user << "You remove the fire alarm assembly from the wall!"
var/obj/item/firealarm_frame/frame = new /obj/item/firealarm_frame()
frame.loc = user.loc
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
del(src) */
return
else if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
if(stat & (NOPOWER|BROKEN))
user << "It does nothing"
else
if(allowed(usr) && !isWireCut(AALARM_WIRE_IDSCAN))
locked = !locked
user << "\blue You [ locked ? "lock" : "unlock"] the Air Alarm interface."
updateUsrDialog()
else
user << "\red Access denied."
return
return ..()
/obj/machinery/alarm/power_change()
@@ -1234,15 +1310,6 @@ FIRE ALARM
user.visible_message("\red [user] has reconnected [src]'s detecting unit!", "You have reconnected [src]'s detecting unit.")
else
user.visible_message("\red [user] has disconnected [src]'s detecting unit!", "You have disconnected [src]'s detecting unit.")
else if (istype(W, /obj/item/weapon/wirecutters))
buildstage = 1
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
var/obj/item/weapon/cable_coil/coil = new /obj/item/weapon/cable_coil()
coil.amount = 5
coil.loc = user.loc
user << "You cut the wires from \the [src]"
update_icon()
if(1)
if(istype(W, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/coil = W
@@ -235,5 +235,12 @@ var/prison_shuttle_timeleft = 0
AM.Move(D)
if(istype(T, /turf/simulated))
del(T)
for(var/mob/living/carbon/bug in end_location) // If someone somehow is still in the shuttle's docking area...
bug.gib()
for(var/mob/living/simple_animal/pest in end_location) // And for the other kind of bug...
pest.gib()
start_location.move_contents_to(end_location)
return
@@ -77,6 +77,12 @@ var/specops_shuttle_timeleft = 0
if(istype(T, /turf/simulated))
del(T)
for(var/mob/living/carbon/bug in end_location) // If someone somehow is still in the shuttle's docking area...
bug.gib()
for(var/mob/living/simple_animal/pest in end_location) // And for the other kind of bug...
pest.gib()
start_location.move_contents_to(end_location)
for(var/turf/T in get_area_turfs(end_location) )
@@ -162,6 +162,12 @@ var/syndicate_elite_shuttle_timeleft = 0
if(istype(T, /turf/simulated))
del(T)
for(var/mob/living/carbon/bug in end_location) // If someone somehow is still in the shuttle's docking area...
bug.gib()
for(var/mob/living/simple_animal/pest in end_location) // And for the other kind of bug...
pest.gib()
start_location.move_contents_to(end_location)
for(var/turf/T in get_area_turfs(end_location) )
+2 -2
View File
@@ -87,8 +87,8 @@
for(var/datum/disease/D in patient.viruses)
if(!D.hidden[SCANNER])
foundVirus++
//if(patient.virus2)
// foundVirus++
if(patient.virus2)
foundVirus++
holder = patient.hud_list[HEALTH_HUD]
if(patient.stat == 2)
+4 -4
View File
@@ -449,12 +449,12 @@
if(S.brute_dam)
S.heal_damage(15,0,0,1)
if(user != M)
user.visible_message("\red You patch some dents on \the [M]'s [S.display_name]",\
"\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src]",\
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src]",\
"\red You patch some dents on \the [M]'s [S.display_name]",\
"You hear a welder.")
else
user.visible_message("\red You patch some dents on your [S.display_name]",\
"\red \The [user] patches some dents on their [S.display_name] with \the [src]",\
user.visible_message("\red \The [user] patches some dents on their [S.display_name] with \the [src]",\
"\red You patch some dents on your [S.display_name]",\
"You hear a welder.")
else
user << "Nothing to fix!"