Job system should be working now. I had a '==' where a '&' should have been that would cause it to only work when you had one job of the same level and department selected.

The loyalty implant box now spawn in the HoS' locker and not in nullspace.
Gave the HoS' locker a secbelt.
The revolver now use the proper bullet.
Robotics spawn with their labcoat/toolbox.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2346 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
mport2004@gmail.com
2011-10-12 23:00:48 +00:00
parent fcee5ff1be
commit 67d4ceffb0
20 changed files with 146 additions and 158 deletions

View File

@@ -1443,6 +1443,16 @@
for(var/sig in lawchanges)
dat += "[sig]<BR>"
usr << browse(dat, "window=lawchanges;size=800x500")
if("list_job_debug")
var/dat = "<B>Job Debug info.</B><HR>"
if(job_master)
for(var/line in job_master.job_debug)
dat += "[line]<BR>"
dat+= "*******<BR><BR>"
for(var/datum/job/job in job_master.occupations)
if(!job) continue
dat += "job: [job.title], current_positions: [job.current_positions], total_positions: [job.total_positions] <BR>"
usr << browse(dat, "window=jobdebug;size=600x500")
if("check_antagonist")
if (ticker && ticker.current_state >= GAME_STATE_PLAYING)
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
@@ -1932,6 +1942,7 @@
dat += {"
<B>Coder Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secretsadmin=list_job_debug'>Show Job Debug</A><BR>
<A href='?src=\ref[src];secretscoder=spawn_objects'>Admin Log</A><BR>
"}
usr << browse(dat, "window=secrets")

View File

@@ -386,9 +386,10 @@
verbs -= /client/proc/toggleprayers
verbs -= /client/proc/jump_to_dead_group
verbs -= /client/proc/Blobize
verbs += /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the enw clickproc is being tested)
verbs -= /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the enw clickproc is being tested)
verbs -= /client/proc/toggle_hear_deadcast
verbs -= /client/proc/toggle_hear_radio
verbs -= /client/proc/tension_report
return

View File

@@ -426,7 +426,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_if_possible(new /obj/item/weapon/cloaking_device(M), M.slot_r_store)
M.equip_if_possible(new /obj/item/weapon/gun/projectile(M), M.slot_r_hand)
M.equip_if_possible(new /obj/item/ammo_magazine(M), M.slot_l_store)
M.equip_if_possible(new /obj/item/ammo_magazine/a357(M), M.slot_l_store)
if ("tournament chef") //Steven Seagal FTW
M.equip_if_possible(new /obj/item/clothing/under/rank/chef(M), M.slot_w_uniform)
@@ -545,7 +545,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
sec_briefcase.contents += new /obj/item/weapon/spacecash/c1000
sec_briefcase.contents += new /obj/item/weapon/gun/energy/crossbow
sec_briefcase.contents += new /obj/item/weapon/gun/projectile/mateba
sec_briefcase.contents += new /obj/item/ammo_magazine
sec_briefcase.contents += new /obj/item/ammo_magazine/a357
sec_briefcase.contents += new /obj/item/weapon/plastique
M.equip_if_possible(sec_briefcase, M.slot_l_hand)
@@ -607,7 +607,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_if_possible(new /obj/item/clothing/head/centhat(M), M.slot_head)
M.equip_if_possible(new /obj/item/weapon/gun/projectile/mateba(M), M.slot_belt)
M.equip_if_possible(new /obj/item/weapon/zippo(M), M.slot_r_store)
M.equip_if_possible(new /obj/item/ammo_magazine(M), M.slot_l_store)
M.equip_if_possible(new /obj/item/ammo_magazine/a357(M), M.slot_l_store)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"

View File

@@ -160,7 +160,7 @@ var/global/sent_strike_team = 0
equip_if_possible(new /obj/item/weapon/storage/backpack/security(src), slot_back)
equip_if_possible(new /obj/item/weapon/storage/box(src), slot_in_backpack)
equip_if_possible(new /obj/item/ammo_magazine(src), slot_in_backpack)
equip_if_possible(new /obj/item/ammo_magazine/a357(src), slot_in_backpack)
equip_if_possible(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack)
equip_if_possible(new /obj/item/weapon/storage/flashbang_kit(src), slot_in_backpack)
equip_if_possible(new /obj/item/device/flashlight(src), slot_in_backpack)

View File

@@ -208,34 +208,32 @@
new_player_panel()
/* proc/IsJobAvailable(rank)
if(((occupations[rank] < 0) || (countJob(rank) < occupations[rank])) && !jobban_isbanned(src,rank))
return 1
else
return 0*/
proc/IsJobAvailable(rank)
var/datum/job/job = job_master.GetJob(rank)
if(!job) return 0
if(job.current_positions >= job.total_positions) return 0
if(jobban_isbanned(src,rank)) return 0
return 1
proc/AttemptLateSpawn(rank)
var/datum/job/job = job_master.GetJob(rank)
if(job && (job.current_positions < job.total_positions))
var/mob/living/carbon/human/character = create_character()
var/icon/char_icon = getFlatIcon(character,0)//We're creating out own cache so it's not needed.
if(job_master.AssignRole(character, rank, 1))
job_master.EquipRank(character, rank, 1)
if(character.mind)
if(character.mind.assigned_role != "Cyborg")
ManifestLateSpawn(character,char_icon)
if(ticker)
character.loc = pick(latejoin)
AnnounceArrival(character, rank)
if(character.mind)
if(character.mind.assigned_role == "Cyborg")
character.Robotize()
else//Adds late joiners to minds so they can be linked to objectives.
ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc.
del(src)
else
if(!IsJobAvailable(rank))
src << alert("[rank] is not available. Please try another.")
return 0
var/mob/living/carbon/human/character = create_character()
var/icon/char_icon = getFlatIcon(character,0)//We're creating out own cache so it's not needed.
job_master.AssignRole(character, rank, 1)
job_master.EquipRank(character, rank, 1)
character.loc = pick(latejoin)
AnnounceArrival(character, rank)
if(character.mind.assigned_role != "Cyborg")
ManifestLateSpawn(character,char_icon)
ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc.
else
character.Robotize()
del(src)
proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
@@ -319,7 +317,7 @@
var/dat = "<html><body>"
dat += "Choose from the following open positions:<br>"
for(var/datum/job/job in job_master.occupations)
if(job && ((job.title == "Assistant") || (job.current_positions < job.total_positions)))
if(job && IsJobAvailable(job.title))
dat += "<a href='byond://?src=\ref[src];SelectedJob=[job.title]'>[job.title]</a><br>"
src << browse(dat, "window=latechoices;size=300x640;can_close=0")

View File

@@ -337,7 +337,8 @@ datum/preferences
else if(link_tags["job"])
SetJob(user, link_tags["job"])
else
SetChoices(user)
if(job_master)
SetChoices(user)
return 1

View File

@@ -1,14 +1,14 @@
/obj/item/ammo_casing
name = "bullet casing"
desc = "A .357 bullet casing."
desc = "A bullet casing."
icon = 'ammo.dmi'
icon_state = "s-casing"
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
throwforce = 1
w_class = 1.0
var
caliber = "357" //Which kind of guns it can be loaded into
projectile_type = "/obj/item/projectile"//The bullet type to create when New() is called
caliber = "" //Which kind of guns it can be loaded into
projectile_type = ""//The bullet type to create when New() is called
obj/item/projectile/BB = null //The loaded bullet
@@ -46,7 +46,7 @@
//Boxes of ammo
/obj/item/ammo_magazine
name = "ammo box (.357)"
desc = "A box of .357 ammo"
desc = "A box of ammo"
icon_state = "357"
icon = 'ammo.dmi'
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT

View File

@@ -1,3 +1,12 @@
/obj/item/ammo_magazine/a357
name = "ammo box (.357)"
desc = "A box of .357 ammo"
icon_state = "357"
ammo_type = "/obj/item/ammo_casing/a357"
max_ammo = 8
/obj/item/ammo_magazine/a75
name = "ammo magazine (.75)"
icon_state = "gyro"

View File

@@ -1,3 +1,9 @@
/obj/item/ammo_casing/a357
desc = "A .357 bullet casing."
caliber = "357"
projectile_type = "/obj/item/projectile/bullet"
/obj/item/ammo_casing/a418
desc = "A .418 bullet casing."
caliber = "357"

View File

@@ -8,7 +8,7 @@
m_amt = 1000
var
ammo_type = "/obj/item/ammo_casing"
ammo_type = "/obj/item/ammo_casing/a357"
list/loaded = list()
max_shells = 7
load_method = 0 //0 = Single shells or quick loader, 1 = magazine