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

View File

@@ -77,7 +77,6 @@
var/alert_desc_delta = "The station's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill."
var/forbid_singulo_possession = 0
var/useircbot = 0
//game_options.txt configs
@@ -119,6 +118,11 @@
var/gateway_delay = 18000 //How long the gateway takes before it activates. Default is half an hour.
var/ghost_interaction = 0
var/use_irc_bot = 0
var/main_irc = ""
var/admin_irc = ""
var/python_path = "" //Path to the python executable. Defaults to "python" on windows and "/usr/bin/env python2" on unix
/datum/configuration/New()
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
@@ -363,8 +367,8 @@
if("allow_holidays")
Holiday = 1
if("useircbot")
useircbot = 1
if("use_irc_bot")
use_irc_bot = 1
if("ticklag")
Ticklag = text2num(value)
@@ -403,6 +407,21 @@
if("ghost_interaction")
config.ghost_interaction = 1
if("main_irc")
config.main_irc = value
if("admin_irc")
config.admin_irc = value
if("python_path")
if(value)
config.python_path = value
else
if(world.system_type == UNIX)
config.python_path = "/usr/bin/env python2"
else //probably windows, if not this should work anyway
config.python_path = "python"
else
diary << "Unknown setting in configuration: '[name]'"

View File

@@ -280,9 +280,12 @@ datum/shuttle_controller
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)
settimeleft(SHUTTLELEAVETIME)
send2irc("Server", "The Emergency Shuttle has docked with the station.")
//send2irc("Server", "The Emergency Shuttle has docked with the station.")
captain_announce("The Emergency Shuttle has docked with the station. You have [round(timeleft()/60,1)] minutes to board the Emergency Shuttle.")
world << sound('sound/AI/shuttledock.ogg')

View File

@@ -1,5 +1,7 @@
var/datum/controller/vote/vote = new()
var/global/list/round_voters = list() //Keeps track of the individuals voting for a given round, for use in forcedrafting.
datum/controller/vote
var/initiator = null
var/started_time = null
@@ -119,6 +121,11 @@ datum/controller/vote
for(var/option in winners)
text += "\t[option]\n"
. = pick(winners)
for(var/key in current_votes)
if(choices[current_votes[key]] == .)
round_voters += key // Keep track of who voted for the winning round.
text += "<b>Vote Result: [.]</b>"
else
text += "<b>Vote Result: Inconclusive - No Votes!</b>"
@@ -270,9 +277,9 @@ datum/controller/vote
var/votes = choices[choices[i]]
if(!votes) votes = 0
if(current_votes[C.ckey] == i)
. += "<li><b><a href='?src=\ref[src];vote=[i]'>[choices[i]]</a> ([votes] votes)</b></li>"
. += "<li><b><a href='?src=\ref[src];vote=[i]'>[choices[i]]</a></b></li>"
else
. += "<li><a href='?src=\ref[src];vote=[i]'>[choices[i]]</a> ([votes] votes)</li>"
. += "<li><a href='?src=\ref[src];vote=[i]'>[choices[i]]</a></li>"
. += "</ul><hr>"
if(admin)

View File

@@ -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

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.

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,

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()

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

View File

@@ -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

View File

@@ -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) )

View File

@@ -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) )

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)

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!"

View File

@@ -186,7 +186,7 @@ var/global/floorIsLava = 0
dat += "No notes found."
else
dat += "<table>"
sortList(note_keys)
note_keys = sortList(note_keys)
// Display the notes on the current page
var/number_pages = note_keys.len / PLAYER_NOTES_ENTRIES_PER_PAGE
@@ -210,7 +210,7 @@ var/global/floorIsLava = 0
for(var/index = 1, index <= number_pages, index++)
if(index == page)
dat += "<b>"
dat += "<a href='?src=\ref[src];notes=list;index='[index]'>[index]</a> "
dat += "<a href='?src=\ref[src];notes=list;index=[index]'>[index]</a> "
if(index == page)
dat += "</b>"

View File

@@ -469,6 +469,7 @@
dat += "<tr><td><i>Wizard not found!</i></td></tr>"
dat += "</table>"
/*
if(ticker.mode.ninjas.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Ninjas</B></td><td></td><td></td></tr>"
for(var/datum/mind/ninja in ticker.mode.ninjas)
@@ -480,6 +481,7 @@
else
dat += "<tr><td><i>Ninja not found!</i></td></tr>"
dat += "</table>"
*/
if(ticker.mode.cult.len)
dat += "<br><table cellspacing=5><tr><td><B>Cultists</B></td><td></td></tr>"

View File

@@ -2466,4 +2466,6 @@
switch(href_list["notes"])
if("show")
show_player_info(ckey)
if("list")
PlayerNotesPage(text2num(href_list["index"]))
return

View File

@@ -106,15 +106,10 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins.")
if(admin_number_present <= 0)
if(!admin_number_afk)
send2irc(ckey, "[original_msg] - No admins online")
send2adminirc("ADMINHELP from [key_name(src)]: [original_msg] - !!No admins online!!")
else
send2irc(ckey, "[original_msg] - All admins AFK ([admin_number_afk])")
send2adminirc("ADMINHELP from [key_name(src)]: [original_msg] - !!All admins AFK ([admin_number_afk])!!")
else
send2irc(ckey, original_msg)
send2adminirc("ADMINHELP from [key_name(src)]: [original_msg]")
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
proc/send2irc(msg,msg2)
if(config.useircbot)
shell("python [config.nudge_script_path] [msg] [msg2]")
return

View File

@@ -462,7 +462,8 @@ client/proc/one_click_antag()
candidates.Remove(G)
if(candidates.len)
var/raiders = 4
var/max_raiders = 6
var/raiders = max_raiders
//Spawns vox raiders and equips them.
for (var/obj/effect/landmark/L in world)
if(L.name == "Response Team")
@@ -484,18 +485,17 @@ client/proc/one_click_antag()
new_vox << "\red Don't forget to turn on your nitrogen internals!"
raiders--
if(raiders > 4)
if(raiders > max_raiders)
return 0
else
return 0
return 1
/datum/admins/proc/create_vox_raider(obj/spawn_location, leader_chosen = 0)
var/mob/living/carbon/human/new_vox = new(spawn_location.loc)
new_vox.gender = pick(MALE, FEMALE)
var/datum/preferences/A = new() //Randomize appearance for the raider.
A.randomize_appearance_for(new_vox)
new_vox.h_style = "Short Vox Quills"
new_vox.regenerate_icons()

View File

@@ -1,3 +1,5 @@
var/global/vox_tick = 1
/mob/living/carbon/human/proc/equip_vox_raider()
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(src)
@@ -8,7 +10,7 @@
equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/vox(src), slot_shoes) // REPLACE THESE WITH CODED VOX ALTERNATIVES.
equip_to_slot_or_del(new /obj/item/clothing/gloves/yellow/vox(src), slot_gloves) // AS ABOVE.
switch(rand(1,4)) // Come up with a better way of doing this - ticker of some sort maybe.
switch(vox_tick)
if(1) // Vox raider!
equip_to_slot_or_del(new /obj/item/clothing/suit/space/vox/carapace(src), slot_wear_suit)
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/vox/carapace(src), slot_head)
@@ -41,14 +43,16 @@
W.cell.charge = 500
equip_to_slot_or_del(W, slot_r_hand)
var/obj/item/stack/rods/A = new(src)
A.amount = 20
equip_to_slot_or_del(A, slot_l_hand)
if(4) // Vox medic!
equip_to_slot_or_del(new /obj/item/clothing/suit/space/vox/pressure(src), slot_wear_suit)
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/vox/pressure(src), slot_head)
equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(src), slot_belt) // Who needs actual surgical tools?
equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health(src), slot_glasses) // REPLACE WITH CODED VOX ALTERNATIVE.
equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray(src), slot_l_store)
equip_to_slot_or_del(new /obj/item/weapon/circular_saw(src), slot_l_hand)
equip_to_slot_or_del(new /obj/item/weapon/circular_saw(src), slot_l_store)
equip_to_slot_or_del(new /obj/item/weapon/gun/dartgun/vox/medical, slot_r_hand)
equip_to_slot_or_del(new /obj/item/clothing/mask/breath/vox(src), slot_wear_mask)
@@ -63,4 +67,7 @@
W.registered_name = real_name
equip_to_slot_or_del(W, slot_wear_id)
vox_tick++
if (vox_tick > 4) vox_tick = 1
return 1

View File

@@ -46,11 +46,15 @@
if(!M.client) return
var/client/C = M.client
var/image/holder
for(var/mob/living/carbon/human/patient in view(M))
for(var/mob/living/carbon/human/patient in view(get_turf(M)))
if(M.see_invisible < patient.invisibility)
continue
var/foundVirus = 0
for(var/datum/disease/D in patient.viruses)
if(!D.hidden[SCANNER])
foundVirus++
if(patient.virus2)
foundVirus++
if(!C) continue
holder = patient.hud_list[HEALTH_HUD]
@@ -90,7 +94,9 @@
if(!M.client) return
var/client/C = M.client
var/image/holder
for(var/mob/living/carbon/human/perp in view(M))
for(var/mob/living/carbon/human/perp in view(get_turf(M)))
if(M.see_invisible < perp.invisibility)
continue
if(!C) continue
var/perpname = perp.name
holder = perp.hud_list[ID_HUD]

View File

@@ -791,6 +791,25 @@
flags = FPRINT|TABLEPASS
w_class = 1
slot_flags = SLOT_MASK
var/obj/item/held //Item inside locket.
/obj/item/clothing/tie/fluff/konaa_hirano/attack_self(mob/user as mob)
if(held)
user << "You open [src] and [held] falls out."
held.loc = get_turf(user)
src.held = null
/obj/item/clothing/tie/fluff/konaa_hirano/attackby(var/obj/item/O as obj, mob/user as mob)
if(istype(O,/obj/item/weapon/paper))
if(held)
usr << "[src] already has something inside it."
else
usr << "You slip [O] into [src]."
user.drop_item()
O.loc = src
src.held = O
return
..()
////// Medallion - Nasir Khayyam - Jamini

View File

@@ -0,0 +1,14 @@
/proc/send2irc(var/channel, var/msg)
if(config.use_irc_bot)
ext_python("ircbot_message.py", "[channel] [msg]")
return
/proc/send2mainirc(var/msg)
if(config.use_irc_bot && config.main_irc)
ext_python("ircbot_message.py", "[config.main_irc] [msg]")
return
/proc/send2adminirc(var/msg)
if(config.use_irc_bot && config.admin_irc)
ext_python("ircbot_message.py", "[config.admin_irc] [msg]")
return

View File

@@ -0,0 +1,9 @@
/proc/ext_python(var/script, var/args, var/scriptsprefix = 1)
if(scriptsprefix) script = "scripts/" + script
if(world.system_type == MS_WINDOWS)
script = replacetext(script, "/", "\\")
var/command = config.python_path + " " + script + " " + args
return shell(command)

View File

@@ -86,6 +86,9 @@ proc/move_mining_shuttle()
for(var/mob/living/carbon/bug in toArea) // If someone somehow is still in the shuttle's docking area...
bug.gib()
for(var/mob/living/simple_animal/pest in toArea) // And for the other kind of bug...
pest.gib()
fromArea.move_contents_to(toArea)
if (mining_shuttle_location)
mining_shuttle_location = 0

View File

@@ -1157,21 +1157,22 @@ mob/living/carbon/human/yank_out_object()
if(O == selection)
affected = organ
if(self)
src << "<span class='warning'>You attempt to get a good grip on the [selection] in your [affected] with bloody fingers.</span>"
src << "<span class='warning'>You attempt to get a good grip on the [selection] in your [affected.display_name] with bloody fingers.</span>"
else
U << "<span class='warning'>You attempt to get a good grip on the [selection] in [S]'s [affected] with bloody fingers.</span>"
U << "<span class='warning'>You attempt to get a good grip on the [selection] in [S]'s [affected.display_name] with bloody fingers.</span>"
if(istype(U,/mob/living/carbon/human/)) U.bloody_hands(S)
if(!do_after(U, 80))
return
if(!selection || !affected || !S || !U)
return
if(!selection || !affected || !S || !U)
return
if(self)
visible_message("<span class='warning'><b>[src] rips [selection] out of their [affected] in a welter of blood.</b></span>","<span class='warning'><b>You rip [selection] out of your [affected] in a welter of blood.</b></span>")
visible_message("<span class='warning'><b>[src] rips [selection] out of their [affected.display_name] in a welter of blood.</b></span>","<span class='warning'><b>You rip [selection] out of your [affected] in a welter of blood.</b></span>")
else
visible_message("<span class='warning'><b>[usr] rips [selection] out of [src]'s [affected] in a welter of blood.</b></span>","<span class='warning'><b>[src] rips [selection] out of your [affected] in a welter of blood.</b></span>")
visible_message("<span class='warning'><b>[usr] rips [selection] out of [src]'s [affected.display_name] in a welter of blood.</b></span>","<span class='warning'><b>[usr] rips [selection] out of your [affected] in a welter of blood.</b></span>")
selection.loc = get_turf(src)
affected.implants -= selection
@@ -1208,11 +1209,11 @@ mob/living/carbon/human/yank_out_object()
var/msg = null
switch(rand(1,3))
if(1)
msg ="<span class='warning'>A spike of pain jolts your [organ] as you bump [O] inside.</span>"
msg ="<span class='warning'>A spike of pain jolts your [organ.display_name] as you bump [O] inside.</span>"
if(2)
msg ="<span class='warning'>Your movement jostles [O] in your [organ] painfully.</span>"
msg ="<span class='warning'>Your movement jostles [O] in your [organ.display_name] painfully.</span>"
if(3)
msg ="<span class='warning'>[O] in your [organ] twists painfully as you move.</span>"
msg ="<span class='warning'>[O] in your [organ.display_name] twists painfully as you move.</span>"
src << msg
organ.status |= ORGAN_BLEEDING

View File

@@ -143,14 +143,11 @@ Please contact me on #coderbus IRC. ~Carn x
overlays += I
else
var/stealth = 0
if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja) && wear_suit:s_active)
stealth = 1
else
//cloaking devices. //TODO: get rid of this :<
for(var/obj/item/weapon/cloaking_device/S in list(l_hand,r_hand,belt,l_store,r_store))
if(S.active)
stealth = 1
break
//cloaking devices. //TODO: get rid of this :<
for(var/obj/item/weapon/cloaking_device/S in list(l_hand,r_hand,belt,l_store,r_store))
if(S.active)
stealth = 1
break
if(stealth)
icon = 'icons/mob/human.dmi'
icon_state = "body_cloaked"
@@ -725,7 +722,7 @@ proc/get_damage_icon_part(damage_state, body_part)
/mob/living/carbon/human/update_inv_wear_mask(var/update_icons=1)
if( wear_mask && istype(wear_mask, /obj/item/clothing/mask) )
if( wear_mask && ( istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/tie) ) )
wear_mask.screen_loc = ui_mask //TODO
var/image/lying = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]2")
var/image/standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]")

View File

@@ -9,6 +9,8 @@
var/image/holder
var/turf/T = get_turf_or_move(src.loc)
for(var/mob/living/carbon/human/perp in view(T))
if(src.see_invisible < perp.invisibility)
continue
var/perpname = "wot"
holder = perp.hud_list[ID_HUD]
if(perp.wear_id)
@@ -51,11 +53,14 @@
var/image/holder
var/turf/T = get_turf_or_move(src.loc)
for(var/mob/living/carbon/human/patient in view(T))
if(src.see_invisible < patient.invisibility)
continue
var/foundVirus = 0
for(var/datum/disease/D in patient.viruses)
if(!D.hidden[SCANNER])
foundVirus = 1
foundVirus++
if(patient.virus2)
foundVirus++
holder = patient.hud_list[HEALTH_HUD]
if(patient.stat == 2)

View File

@@ -39,7 +39,7 @@
brute_damage += brute
electronics_damage += electronics
if(brute_damage + electronics_damage > max_damage) destroy()
if(brute_damage + electronics_damage >= max_damage) destroy()
/datum/robot_component/proc/heal_damage(brute, electronics)
if(installed != 1)
@@ -50,7 +50,7 @@
electronics_damage = max(0, electronics_damage - electronics)
/datum/robot_component/proc/is_powered()
return installed == 1 && (!energy_consumption || powered)
return (installed == 1) && (brute_damage + electronics_damage < max_damage) && (!energy_consumption || powered)
/datum/robot_component/proc/consume_power()

View File

@@ -66,9 +66,7 @@
else
src.camera.status = 1
health = 200 - (getOxyLoss() + getFireLoss() + getBruteLoss())
if(getOxyLoss() > 50) Paralyse(3)
updatehealth()
if(src.sleeping)
Paralyse(3)

View File

@@ -1244,9 +1244,12 @@
overlays -= "eyes"
updateicon()
var/choice = input("Look at your icon - is this what you want?") in list("Yes","No")
if(choice=="No")
choose_icon(triesleft, module_sprites)
if (triesleft >= 1)
var/choice = input("Look at your icon - is this what you want?") in list("Yes","No")
if(choice=="No")
choose_icon(triesleft, module_sprites)
else
triesleft = 0
return
else
triesleft = 0
return
src << "Your icon has been set. You now require a module reset to change it."

View File

@@ -1,15 +1,23 @@
/mob/living/silicon/robot/updatehealth()
if(status_flags & GODMODE)
health = 100
stat = CONSCIOUS
return
health = 100 - (getBruteLoss() + getFireLoss())
return
/mob/living/silicon/robot/getBruteLoss()
var/amount = 0
for(var/V in components)
var/datum/robot_component/C = components[V]
if(C.installed == 1) amount += C.brute_damage
if(C.installed != 0) amount += C.brute_damage
return amount
/mob/living/silicon/robot/getFireLoss()
var/amount = 0
for(var/V in components)
var/datum/robot_component/C = components[V]
if(C.installed == 1) amount += C.electronics_damage
if(C.installed != 0) amount += C.electronics_damage
return amount
/mob/living/silicon/robot/adjustBruteLoss(var/amount)
@@ -45,11 +53,28 @@
var/datum/robot_component/picked = pick(parts)
picked.heal_damage(brute,burn)
/mob/living/silicon/robot/take_organ_damage(var/brute, var/burn, var/sharp = 0)
/mob/living/silicon/robot/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0)
var/list/components = get_damageable_components()
if(components.len)
if(!components.len)
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
cell.charge -= cost
if(cell.charge <= 0)
cell.charge = 0
src << "\red Your shield has overloaded!"
else
brute -= absorb_brute
burn -= absorb_burn
src << "\red Your shield absorbs some of the impact!"
var/datum/robot_component/C = pick(components)
C.take_damage(brute,burn,sharp)
@@ -101,4 +126,4 @@
brute -= (picked.brute_damage - brute_was)
burn -= (picked.electronics_damage - burn_was)
parts -= picked
parts -= picked

View File

@@ -7,26 +7,7 @@
message_admins("Admin logout: [key_name(src)]")
if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
var/cheesy_message = pick( list( \
"I have no admins online!",\
"I'm all alone :(",\
"I'm feeling lonely :(",\
"I'm so lonely :(",\
"Why does nobody love me? :(",\
"I want a man :(",\
"Where has everyone gone?",\
"I need a hug :(",\
"Someone come hold me :(",\
"I need someone on me :(",\
"What happened? Where has everyone gone?",\
"Forever alone :("\
) )
if(cheesy_message)
cheesy_message += " (No admins online)"
send2irc("Server", "[cheesy_message]")
send2adminirc("[key_name(src)] logged out - no more admins online.")
..()
return 1

View File

@@ -298,7 +298,7 @@ var/list/slot_equipment_priority = list( \
/mob/verb/memory()
set name = "Notes"
set category = "OOC"
set category = "IC"
if(mind)
mind.show_memory(src)
else
@@ -306,7 +306,7 @@ var/list/slot_equipment_priority = list( \
/mob/verb/add_memory(msg as message)
set name = "Add Note"
set category = "OOC"
set category = "IC"
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
msg = sanitize(msg)
@@ -946,7 +946,7 @@ mob/verb/yank_out_object()
if(self)
visible_message("<span class='warning'><b>[src] rips [selection] out of their body.</b></span>","<span class='warning'><b>You rip [selection] out of your body.</b></span>")
else
visible_message("<span class='warning'><b>[usr] rips [selection] out of [src]'s body.</b></span>","<span class='warning'><b>[src] rips [selection] out of your body.</b></span>")
visible_message("<span class='warning'><b>[usr] rips [selection] out of [src]'s body.</b></span>","<span class='warning'><b>[usr] rips [selection] out of your body.</b></span>")
selection.loc = get_turf(src)

View File

@@ -269,6 +269,14 @@
proc/AttemptLateSpawn(rank)
if (src != usr)
return 0
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
usr << "\red The round is either not ready, or has already finished..."
return 0
if(!enter_allowed)
usr << "\blue There is an administrative lock on entering the game!"
return 0
if(!IsJobAvailable(rank))
src << alert("[rank] is not available. Please try another.")
return 0

View File

@@ -125,16 +125,20 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
busy = 1
use_power(max(1000, (3750*amount/10)))
spawn(16)
var/stacktype = stack.type
stack.use(amount)
if(do_after(usr,16))
user << "\blue You add [amount] sheets to the [src.name]."
if(istype(stack, /obj/item/stack/sheet/glass))
g_amount += amount * 3750
else if(istype(stack, /obj/item/stack/sheet/mineral/gold))
gold_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/diamond))
diamond_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/uranium))
uranium_amount += amount * 2000
stack.use(amount)
busy = 0
src.updateUsrDialog()
switch(stacktype)
if(/obj/item/stack/sheet/glass)
g_amount += amount * 3750
if(/obj/item/stack/sheet/mineral/gold)
gold_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/diamond)
diamond_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/uranium)
uranium_amount += amount * 2000
else
new stacktype(src.loc, amount)
busy = 0
src.updateUsrDialog()

View File

@@ -152,28 +152,32 @@ Note: Must be placed west/left of and R&D console to function.
icon_state = "protolathe"
busy = 1
use_power(max(1000, (3750*amount/10)))
spawn(16)
var/stacktype = stack.type
stack.use(amount)
if (do_after(user, 16))
user << "\blue You add [amount] sheets to the [src.name]."
icon_state = "protolathe"
if(istype(stack, /obj/item/stack/sheet/metal))
m_amount += amount * 3750
else if(istype(stack, /obj/item/stack/sheet/glass))
g_amount += amount * 3750
else if(istype(stack, /obj/item/stack/sheet/mineral/gold))
gold_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/silver))
silver_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/plasma))
plasma_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/uranium))
uranium_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/diamond))
diamond_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/clown))
clown_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/adamantine))
adamantine_amount += amount * 2000
stack.use(amount)
busy = 0
src.updateUsrDialog()
switch(stacktype)
if(/obj/item/stack/sheet/metal)
m_amount += amount * 3750
if(/obj/item/stack/sheet/glass)
g_amount += amount * 3750
if(/obj/item/stack/sheet/mineral/gold)
gold_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/silver)
silver_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/plasma)
plasma_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/uranium)
uranium_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/diamond)
diamond_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/clown)
clown_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/adamantine)
adamantine_amount += amount * 2000
else
new stacktype(src.loc, amount)
busy = 0
src.updateUsrDialog()
return

View File

@@ -49,6 +49,9 @@ proc/move_research_shuttle()
for(var/mob/living/carbon/bug in toArea) // If someone somehow is still in the shuttle's docking area...
bug.gib()
for(var/mob/living/simple_animal/pest in toArea) // And for the other kind of bug...
pest.gib()
fromArea.move_contents_to(toArea)
if (research_shuttle_location)
research_shuttle_location = 0

View File

@@ -51,7 +51,7 @@
if(w.isOn())
if(w.get_fuel() >= 4 && !src.method)
if(inside)
inside.loc = src.loc
inside.loc = get_turf(src)
for(var/mob/M in viewers(world.view, user))
M.show_message("<span class='info'>[src] burns away revealing [inside].</span>",1)
else