mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
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:
@@ -84,5 +84,7 @@
|
|||||||
H.equip_if_possible(new /obj/item/clothing/under/rank/roboticist(H), H.slot_w_uniform)
|
H.equip_if_possible(new /obj/item/clothing/under/rank/roboticist(H), H.slot_w_uniform)
|
||||||
H.equip_if_possible(new /obj/item/clothing/shoes/black(H), H.slot_shoes)
|
H.equip_if_possible(new /obj/item/clothing/shoes/black(H), H.slot_shoes)
|
||||||
H.equip_if_possible(new /obj/item/device/pda/engineering(H), H.slot_belt)
|
H.equip_if_possible(new /obj/item/device/pda/engineering(H), H.slot_belt)
|
||||||
|
H.equip_if_possible(new /obj/item/clothing/suit/labcoat(H), H.slot_wear_suit)
|
||||||
H.equip_if_possible(new /obj/item/clothing/gloves/black(H), H.slot_gloves)
|
H.equip_if_possible(new /obj/item/clothing/gloves/black(H), H.slot_gloves)
|
||||||
|
H.equip_if_possible(new /obj/item/weapon/storage/toolbox/mechanical(H), H.slot_l_hand)
|
||||||
return 1
|
return 1
|
||||||
@@ -17,78 +17,3 @@
|
|||||||
|
|
||||||
proc/equip(var/mob/living/carbon/human/H)
|
proc/equip(var/mob/living/carbon/human/H)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
var/datum/jobs/jobs = new/datum/jobs()
|
|
||||||
|
|
||||||
/datum/jobs
|
|
||||||
var/list/datum/job/all_jobs = list()
|
|
||||||
|
|
||||||
proc/get_all_jobs()
|
|
||||||
return all_jobs
|
|
||||||
|
|
||||||
//This proc returns all the jobs which are NOT admin only
|
|
||||||
proc/get_normal_jobs()
|
|
||||||
// var/list/datum/job/normal_jobs = list()
|
|
||||||
// for(var/datum/job/J in all_jobs)
|
|
||||||
// if(!J.admin_only)
|
|
||||||
// normal_jobs += J
|
|
||||||
// return normal_jobs
|
|
||||||
|
|
||||||
//This proc returns all the jobs which are admin only
|
|
||||||
proc/get_admin_jobs()
|
|
||||||
// var/list/datum/job/admin_jobs = list()
|
|
||||||
// for(var/datum/job/J in all_jobs)
|
|
||||||
// if(J.admin_only)
|
|
||||||
// admin_jobs += J
|
|
||||||
// return admin_jobs
|
|
||||||
|
|
||||||
//This proc returns the job datum of the job with the alias or job title given as the argument. Returns an empty string otherwise.
|
|
||||||
proc/get_job(var/alias)
|
|
||||||
// for(var/datum/job/J in all_jobs)
|
|
||||||
// if(J.is_job_alias(alias))
|
|
||||||
// return J
|
|
||||||
return ""
|
|
||||||
|
|
||||||
//This proc returns a string with the default job title for the job with the given alias. Returns an empty string otherwise.
|
|
||||||
proc/get_job_title(var/alias)
|
|
||||||
// for(var/datum/job/J in all_jobs)
|
|
||||||
// if(J.is_job_alias(alias))
|
|
||||||
// return J.title
|
|
||||||
return ""
|
|
||||||
/*
|
|
||||||
//This proc returns all the job datums of the workers whose boss has the alias provided. (IE Engineer under Chief Engineer, etc.)
|
|
||||||
proc/get_jobs_under(var/boss_alias)
|
|
||||||
var/boss_title = get_job_title(boss_alias)
|
|
||||||
var/list/datum/job/employees = list()
|
|
||||||
for(var/datum/job/J in all_jobs)
|
|
||||||
if(boss_title in J.bosses)
|
|
||||||
employees += J
|
|
||||||
return employees*/
|
|
||||||
|
|
||||||
//This proc returns the chosen vital and high priority jobs that the person selected. It goes from top to bottom of the list, until it finds a job which does not have such priority.
|
|
||||||
//Example: Choosing (in this order): CE, Captain, Engineer, RD will only return CE and Captain, as RD is assumed as being an unwanted choice.
|
|
||||||
//This proc is used in the allocation algorithm when deciding vital and high priority jobs.
|
|
||||||
/* proc/get_prefered_high_priority_jobs()
|
|
||||||
var/list/datum/job/hp_jobs = list()
|
|
||||||
for(var/datum/job/J in all_jobs)
|
|
||||||
if(J.assignment_priority == HIGH_PRIORITY_JOB || J.assignment_priority == VITAL_PRIORITY_JOB)
|
|
||||||
hp_jobs += J
|
|
||||||
else
|
|
||||||
break
|
|
||||||
return hp_jobs
|
|
||||||
|
|
||||||
//If only priority is given, it will return the jobs of only that priority, if end_priority is set it will return the jobs with their priority higher or equal to var/priority and lower or equal to end_priority. end_priority must be higher than 0.
|
|
||||||
proc/get_jobs_by_priority(var/priority, var/end_priority = 0)
|
|
||||||
var/list/datum/job/priority_jobs = list()
|
|
||||||
if(end_priority)
|
|
||||||
if(end_priority < priority)
|
|
||||||
return
|
|
||||||
for(var/datum/job/J in all_jobs)
|
|
||||||
if(J.assignment_priority >= priority && J.assignment_priority <= end_priority)
|
|
||||||
priority_jobs += J
|
|
||||||
else
|
|
||||||
for(var/datum/job/J in all_jobs)
|
|
||||||
if(J.assignment_priority == priority)
|
|
||||||
priority_jobs += J
|
|
||||||
return priority_jobs*/
|
|
||||||
@@ -6,6 +6,8 @@ var/global/datum/controller/occupations/job_master
|
|||||||
list/occupations = list()
|
list/occupations = list()
|
||||||
//Players who need jobs
|
//Players who need jobs
|
||||||
list/unassigned = list()
|
list/unassigned = list()
|
||||||
|
//Debug info
|
||||||
|
list/job_debug = list()
|
||||||
|
|
||||||
|
|
||||||
proc/SetupOccupations(var/faction = "Station")
|
proc/SetupOccupations(var/faction = "Station")
|
||||||
@@ -22,38 +24,53 @@ var/global/datum/controller/occupations/job_master
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
proc/GetJob(var/name)
|
proc/Debug(var/text)
|
||||||
if(!name) return null
|
if(!Debug2) return 0
|
||||||
|
job_debug.Add(text)
|
||||||
|
// world << text
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
proc/GetJob(var/rank)
|
||||||
|
if(!rank) return null
|
||||||
for(var/datum/job/J in occupations)
|
for(var/datum/job/J in occupations)
|
||||||
if(!J) continue
|
if(!J) continue
|
||||||
if(J.title == name) return J
|
if(J.title == rank) return J
|
||||||
return null
|
return null
|
||||||
|
|
||||||
|
|
||||||
proc/AssignRole(var/mob/new_player/player, var/job, var/latejoin = 0)
|
proc/AssignRole(var/mob/new_player/player, var/rank, var/latejoin = 0)
|
||||||
if((player) && (player.mind) && (job))
|
Debug("Running AR, Player: [player], Rank: [rank], LJ: [latejoin]")
|
||||||
var/datum/job/J = GetJob(job)
|
if((player) && (player.mind) && (rank))
|
||||||
if(jobban_isbanned(player, job)) return 0
|
var/datum/job/job = GetJob(rank)
|
||||||
if( J && ( (J.current_positions < J.total_positions) || ((J.current_positions < J.spawn_positions) && !latejoin)) )
|
if(!job) return 0
|
||||||
player.mind.assigned_role = J.title
|
if(jobban_isbanned(player, rank)) return 0
|
||||||
|
var/position_limit = job.total_positions
|
||||||
|
if(!latejoin)
|
||||||
|
position_limit = job.spawn_positions
|
||||||
|
if(job.current_positions < position_limit)
|
||||||
|
Debug("Player: [player] is now Rank: [rank], JCP:[job.current_positions], JPL:[position_limit]")
|
||||||
|
player.mind.assigned_role = rank
|
||||||
unassigned -= player
|
unassigned -= player
|
||||||
J.current_positions++
|
job.current_positions++
|
||||||
return 1
|
return 1
|
||||||
|
Debug("AR has failed, Player: [player], Rank: [rank]")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
proc/FindOccupationCandidates(datum/job/job, level, flag)
|
proc/FindOccupationCandidates(datum/job/job, level, flag)
|
||||||
|
Debug("Running FOC, Job: [job], Level: [level], Flag: [flag]")
|
||||||
var/list/candidates = list()
|
var/list/candidates = list()
|
||||||
for(var/mob/new_player/player in unassigned)
|
for(var/mob/new_player/player in unassigned)
|
||||||
if(jobban_isbanned(player, job.title)) continue
|
if(jobban_isbanned(player, job.title))
|
||||||
if(flag && (!player.preferences.be_special & flag)) continue
|
Debug("FOC isbanned failed, Player: [player]")
|
||||||
switch(level)
|
continue
|
||||||
if(1)
|
if(flag && (!player.preferences.be_special & flag))
|
||||||
if(job.flag == player.preferences.GetJobDepartment(job, level)) candidates += player
|
Debug("FOC flag failed, Player: [player], Flag: [flag], ")
|
||||||
if(2)
|
continue
|
||||||
if(job.flag == player.preferences.GetJobDepartment(job, level)) candidates += player
|
if(player.preferences.GetJobDepartment(job, level) & job.flag)
|
||||||
if(3)
|
Debug("FOC pass, Player: [player], Level:[level]")
|
||||||
if(job.flag == player.preferences.GetJobDepartment(job, level)) candidates += player
|
candidates += player
|
||||||
return candidates
|
return candidates
|
||||||
|
|
||||||
|
|
||||||
@@ -115,6 +132,7 @@ var/global/datum/controller/occupations/job_master
|
|||||||
**/
|
**/
|
||||||
proc/DivideOccupations()
|
proc/DivideOccupations()
|
||||||
//Setup new player list and get the jobs list
|
//Setup new player list and get the jobs list
|
||||||
|
Debug("Running DO")
|
||||||
SetupOccupations()
|
SetupOccupations()
|
||||||
|
|
||||||
//Get the players who are ready
|
//Get the players who are ready
|
||||||
@@ -122,41 +140,57 @@ var/global/datum/controller/occupations/job_master
|
|||||||
if((player) && (player.client) && (player.ready) && (player.mind) && (!player.mind.assigned_role))
|
if((player) && (player.client) && (player.ready) && (player.mind) && (!player.mind.assigned_role))
|
||||||
unassigned += player
|
unassigned += player
|
||||||
|
|
||||||
|
Debug("DO, Len: [unassigned.len]")
|
||||||
if(unassigned.len == 0) return 0
|
if(unassigned.len == 0) return 0
|
||||||
//Shuffle players and jobs
|
//Shuffle players and jobs
|
||||||
unassigned = shuffle(unassigned)
|
unassigned = shuffle(unassigned)
|
||||||
// occupations = shuffle(occupations) check and see if we can do this one
|
// occupations = shuffle(occupations) check and see if we can do this one
|
||||||
|
|
||||||
//Select one head
|
|
||||||
FillHeadPosition()
|
|
||||||
|
|
||||||
//Check for an AI
|
|
||||||
FillAIPosition()
|
|
||||||
|
|
||||||
//Assistants are checked first
|
//Assistants are checked first
|
||||||
|
Debug("DO, Running Assistant Check 1")
|
||||||
var/datum/job/assist = new /datum/job/assistant()
|
var/datum/job/assist = new /datum/job/assistant()
|
||||||
var/list/assistant_candidates = FindOccupationCandidates(assist, 3)
|
var/list/assistant_candidates = FindOccupationCandidates(assist, 3)
|
||||||
|
Debug("AC1, Candidates: [assistant_candidates.len]")
|
||||||
for(var/mob/new_player/player in assistant_candidates)
|
for(var/mob/new_player/player in assistant_candidates)
|
||||||
|
Debug("AC1 pass, Player: [player]")
|
||||||
AssignRole(player, "Assistant")
|
AssignRole(player, "Assistant")
|
||||||
|
assistant_candidates -= player
|
||||||
|
Debug("DO, AC1 end")
|
||||||
|
|
||||||
|
//Select one head
|
||||||
|
Debug("DO, Running Head Check")
|
||||||
|
FillHeadPosition()
|
||||||
|
Debug("DO, Head Check end")
|
||||||
|
|
||||||
|
//Check for an AI
|
||||||
|
Debug("DO, Running AI Check")
|
||||||
|
FillAIPosition()
|
||||||
|
Debug("DO, AI Check end")
|
||||||
|
|
||||||
//Other jobs are now checked
|
//Other jobs are now checked
|
||||||
|
Debug("DO, Running Standard Check")
|
||||||
for(var/level = 1 to 3)
|
for(var/level = 1 to 3)
|
||||||
for(var/datum/job/job in occupations)
|
for(var/datum/job/job in occupations)
|
||||||
|
Debug("Checking job: [job]")
|
||||||
if(!job) continue
|
if(!job) continue
|
||||||
if(!unassigned.len) break
|
if(!unassigned.len) break
|
||||||
if(job.current_positions >= job.spawn_positions) continue
|
if(job.current_positions >= job.spawn_positions) continue
|
||||||
var/list/candidates = FindOccupationCandidates(job, level)
|
var/list/candidates = FindOccupationCandidates(job, level)
|
||||||
while(candidates.len && (job.current_positions < job.spawn_positions))
|
while(candidates.len && (job.current_positions < job.spawn_positions))
|
||||||
var/mob/new_player/candidate = pick(candidates)
|
var/mob/new_player/candidate = pick(candidates)
|
||||||
if(!AssignRole(candidate, job.title))
|
Debug("Selcted: [candidate], for: [job.title]")
|
||||||
candidates -= candidate
|
AssignRole(candidate, job.title)
|
||||||
|
candidates -= candidate
|
||||||
|
Debug("DO, Standard Check end")
|
||||||
|
|
||||||
|
Debug("DO, Running AC2")
|
||||||
for(var/mob/new_player/player in unassigned)
|
for(var/mob/new_player/player in unassigned)
|
||||||
|
Debug("AC2 Assistant located, Player: [player]")
|
||||||
AssignRole(player, "Assistant")
|
AssignRole(player, "Assistant")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
proc/EquipRank(var/mob/living/carbon/human/H, var/rank, var/joined_late)
|
proc/EquipRank(var/mob/living/carbon/human/H, var/rank, var/joined_late = 0)
|
||||||
if(!H) return 0
|
if(!H) return 0
|
||||||
var/datum/job/job = GetJob(rank)
|
var/datum/job/job = GetJob(rank)
|
||||||
if(job)
|
if(job)
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ var/global/list/autolathe_recipes_hidden = list( \
|
|||||||
new /obj/item/device/radio/electropack(), \
|
new /obj/item/device/radio/electropack(), \
|
||||||
new /obj/item/weapon/weldingtool/largetank(), \
|
new /obj/item/weapon/weldingtool/largetank(), \
|
||||||
new /obj/item/weapon/handcuffs(), \
|
new /obj/item/weapon/handcuffs(), \
|
||||||
new /obj/item/ammo_magazine(), \
|
new /obj/item/ammo_magazine/a357(), \
|
||||||
new /obj/item/ammo_casing/shotgun(), \
|
new /obj/item/ammo_casing/shotgun(), \
|
||||||
new /obj/item/ammo_casing/shotgun/dart(), \
|
new /obj/item/ammo_casing/shotgun/dart(), \
|
||||||
/* new /obj/item/weapon/shield/riot(), */ \
|
/* new /obj/item/weapon/shield/riot(), */ \
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ Pod/Blast Doors computer
|
|||||||
carddesc += "</form>"
|
carddesc += "</form>"
|
||||||
carddesc += "<b>Assignment:</b> "
|
carddesc += "<b>Assignment:</b> "
|
||||||
|
|
||||||
jobs = "<span id='alljobsslot'><a href='#' onclick='showAll()'>[target_rank]</a></span>" //CHECK THIS
|
var/jobs = "<span id='alljobsslot'><a href='#' onclick='showAll()'>[target_rank]</a></span>" //CHECK THIS
|
||||||
|
|
||||||
var/accesses = ""
|
var/accesses = ""
|
||||||
if(istype(src,/obj/machinery/computer/card/centcom))
|
if(istype(src,/obj/machinery/computer/card/centcom))
|
||||||
|
|||||||
@@ -6,16 +6,16 @@
|
|||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
sleep(2)
|
sleep(2)
|
||||||
new /obj/item/clothing/suit/captunic( src )
|
new /obj/item/clothing/suit/captunic(src)
|
||||||
new /obj/item/clothing/head/helmet/cap( src )
|
new /obj/item/clothing/head/helmet/cap(src)
|
||||||
new /obj/item/clothing/under/rank/captain( src )
|
new /obj/item/clothing/under/rank/captain(src)
|
||||||
new /obj/item/clothing/suit/armor/vest( src )
|
new /obj/item/clothing/suit/armor/vest(src)
|
||||||
new /obj/item/clothing/gloves/captain( src )
|
new /obj/item/clothing/gloves/captain(src)
|
||||||
new /obj/item/clothing/head/helmet/swat( src )
|
new /obj/item/clothing/head/helmet/swat(src)
|
||||||
new /obj/item/clothing/shoes/brown( src )
|
new /obj/item/clothing/shoes/brown(src)
|
||||||
new /obj/item/device/radio/headset/heads/captain( src )
|
new /obj/item/device/radio/headset/heads/captain(src)
|
||||||
new /obj/item/weapon/reagent_containers/food/drinks/flask(src)
|
new /obj/item/weapon/reagent_containers/food/drinks/flask(src)
|
||||||
new /obj/item/weapon/gun/energy/gun( src )
|
new /obj/item/weapon/gun/energy/gun(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -55,12 +55,13 @@
|
|||||||
new /obj/item/clothing/head/helmet(src)
|
new /obj/item/clothing/head/helmet(src)
|
||||||
new /obj/item/device/radio/headset/heads/hos(src)
|
new /obj/item/device/radio/headset/heads/hos(src)
|
||||||
new /obj/item/weapon/shield/riot(src)
|
new /obj/item/weapon/shield/riot(src)
|
||||||
|
new /obj/item/weapon/storage/lockbox/loyalty(src)
|
||||||
|
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||||
|
new /obj/item/weapon/storage/belt/security(src)
|
||||||
|
new /obj/item/weapon/melee/baton(src)
|
||||||
new /obj/item/weapon/gun/energy/gun(src)
|
new /obj/item/weapon/gun/energy/gun(src)
|
||||||
new /obj/item/device/flash(src)
|
new /obj/item/device/flash(src)
|
||||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
|
||||||
new /obj/item/weapon/storage/lockbox/loyalty()
|
|
||||||
new /obj/item/weapon/melee/baton(src)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -77,8 +78,8 @@
|
|||||||
new /obj/item/clothing/suit/armor/vest(src)
|
new /obj/item/clothing/suit/armor/vest(src)
|
||||||
new /obj/item/clothing/head/helmet/warden(src)
|
new /obj/item/clothing/head/helmet/warden(src)
|
||||||
new /obj/item/device/radio/headset/headset_sec(src)
|
new /obj/item/device/radio/headset/headset_sec(src)
|
||||||
new /obj/item/weapon/storage/belt/security(src)
|
|
||||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||||
|
new /obj/item/weapon/storage/belt/security(src)
|
||||||
new /obj/item/weapon/melee/baton(src)
|
new /obj/item/weapon/melee/baton(src)
|
||||||
new /obj/item/weapon/gun/energy/taser(src)
|
new /obj/item/weapon/gun/energy/taser(src)
|
||||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
if("revolver_ammo")
|
if("revolver_ammo")
|
||||||
if (uses >= 2)
|
if (uses >= 2)
|
||||||
uses -= 2
|
uses -= 2
|
||||||
new /obj/item/ammo_magazine(get_turf(hostpda))
|
new /obj/item/ammo_magazine/a357(get_turf(hostpda))
|
||||||
if("suffocation_revolver_ammo")
|
if("suffocation_revolver_ammo")
|
||||||
if (uses >= 3)
|
if (uses >= 3)
|
||||||
uses -= 3
|
uses -= 3
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ Deathnettle
|
|||||||
user.take_organ_damage(0,force)
|
user.take_organ_damage(0,force)
|
||||||
|
|
||||||
/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user as mob)
|
/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user as mob)
|
||||||
if (force > 0)
|
if(force > 0)
|
||||||
force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off
|
force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off
|
||||||
else
|
else
|
||||||
usr << "All the leaves have fallen off the nettle from violent whacking."
|
usr << "All the leaves have fallen off the nettle from violent whacking."
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ SYNDICATE UPLINK
|
|||||||
if("revolver_ammo")
|
if("revolver_ammo")
|
||||||
if (src.uses >= 2)
|
if (src.uses >= 2)
|
||||||
src.uses -= 2
|
src.uses -= 2
|
||||||
new /obj/item/ammo_magazine(get_turf(src))
|
new /obj/item/ammo_magazine/a357(get_turf(src))
|
||||||
if("suffocation_revolver_ammo")
|
if("suffocation_revolver_ammo")
|
||||||
if (uses >= 3)
|
if (uses >= 3)
|
||||||
uses -= 3
|
uses -= 3
|
||||||
|
|||||||
@@ -280,7 +280,7 @@
|
|||||||
|
|
||||||
if ("guns")
|
if ("guns")
|
||||||
new /obj/item/weapon/gun/projectile(src)
|
new /obj/item/weapon/gun/projectile(src)
|
||||||
new /obj/item/ammo_magazine(src)
|
new /obj/item/ammo_magazine/a357(src)
|
||||||
new /obj/item/weapon/card/emag(src)
|
new /obj/item/weapon/card/emag(src)
|
||||||
new /obj/item/weapon/plastique(src)
|
new /obj/item/weapon/plastique(src)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -1443,6 +1443,16 @@
|
|||||||
for(var/sig in lawchanges)
|
for(var/sig in lawchanges)
|
||||||
dat += "[sig]<BR>"
|
dat += "[sig]<BR>"
|
||||||
usr << browse(dat, "window=lawchanges;size=800x500")
|
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("check_antagonist")
|
||||||
if (ticker && ticker.current_state >= GAME_STATE_PLAYING)
|
if (ticker && ticker.current_state >= GAME_STATE_PLAYING)
|
||||||
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
|
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
|
||||||
@@ -1932,6 +1942,7 @@
|
|||||||
dat += {"
|
dat += {"
|
||||||
<B>Coder Secrets</B><BR>
|
<B>Coder Secrets</B><BR>
|
||||||
<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>
|
<A href='?src=\ref[src];secretscoder=spawn_objects'>Admin Log</A><BR>
|
||||||
"}
|
"}
|
||||||
usr << browse(dat, "window=secrets")
|
usr << browse(dat, "window=secrets")
|
||||||
|
|||||||
@@ -386,9 +386,10 @@
|
|||||||
verbs -= /client/proc/toggleprayers
|
verbs -= /client/proc/toggleprayers
|
||||||
verbs -= /client/proc/jump_to_dead_group
|
verbs -= /client/proc/jump_to_dead_group
|
||||||
verbs -= /client/proc/Blobize
|
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_deadcast
|
||||||
verbs -= /client/proc/toggle_hear_radio
|
verbs -= /client/proc/toggle_hear_radio
|
||||||
|
verbs -= /client/proc/tension_report
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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/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/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
|
if ("tournament chef") //Steven Seagal FTW
|
||||||
M.equip_if_possible(new /obj/item/clothing/under/rank/chef(M), M.slot_w_uniform)
|
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/spacecash/c1000
|
||||||
sec_briefcase.contents += new /obj/item/weapon/gun/energy/crossbow
|
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/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
|
sec_briefcase.contents += new /obj/item/weapon/plastique
|
||||||
M.equip_if_possible(sec_briefcase, M.slot_l_hand)
|
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/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/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/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)
|
var/obj/item/weapon/card/id/W = new(M)
|
||||||
W.name = "[M.real_name]'s ID Card"
|
W.name = "[M.real_name]'s ID Card"
|
||||||
|
|||||||
@@ -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/backpack/security(src), slot_back)
|
||||||
equip_if_possible(new /obj/item/weapon/storage/box(src), slot_in_backpack)
|
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/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/weapon/storage/flashbang_kit(src), slot_in_backpack)
|
||||||
equip_if_possible(new /obj/item/device/flashlight(src), slot_in_backpack)
|
equip_if_possible(new /obj/item/device/flashlight(src), slot_in_backpack)
|
||||||
|
|||||||
@@ -208,34 +208,32 @@
|
|||||||
new_player_panel()
|
new_player_panel()
|
||||||
|
|
||||||
|
|
||||||
/* proc/IsJobAvailable(rank)
|
proc/IsJobAvailable(rank)
|
||||||
if(((occupations[rank] < 0) || (countJob(rank) < occupations[rank])) && !jobban_isbanned(src,rank))
|
var/datum/job/job = job_master.GetJob(rank)
|
||||||
return 1
|
if(!job) return 0
|
||||||
else
|
if(job.current_positions >= job.total_positions) return 0
|
||||||
return 0*/
|
if(jobban_isbanned(src,rank)) return 0
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
proc/AttemptLateSpawn(rank)
|
proc/AttemptLateSpawn(rank)
|
||||||
var/datum/job/job = job_master.GetJob(rank)
|
if(!IsJobAvailable(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
|
|
||||||
src << alert("[rank] is not available. Please try another.")
|
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)
|
proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
|
||||||
@@ -319,7 +317,7 @@
|
|||||||
var/dat = "<html><body>"
|
var/dat = "<html><body>"
|
||||||
dat += "Choose from the following open positions:<br>"
|
dat += "Choose from the following open positions:<br>"
|
||||||
for(var/datum/job/job in job_master.occupations)
|
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>"
|
dat += "<a href='byond://?src=\ref[src];SelectedJob=[job.title]'>[job.title]</a><br>"
|
||||||
|
|
||||||
src << browse(dat, "window=latechoices;size=300x640;can_close=0")
|
src << browse(dat, "window=latechoices;size=300x640;can_close=0")
|
||||||
|
|||||||
@@ -337,7 +337,8 @@ datum/preferences
|
|||||||
else if(link_tags["job"])
|
else if(link_tags["job"])
|
||||||
SetJob(user, link_tags["job"])
|
SetJob(user, link_tags["job"])
|
||||||
else
|
else
|
||||||
SetChoices(user)
|
if(job_master)
|
||||||
|
SetChoices(user)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
/obj/item/ammo_casing
|
/obj/item/ammo_casing
|
||||||
name = "bullet casing"
|
name = "bullet casing"
|
||||||
desc = "A .357 bullet casing."
|
desc = "A bullet casing."
|
||||||
icon = 'ammo.dmi'
|
icon = 'ammo.dmi'
|
||||||
icon_state = "s-casing"
|
icon_state = "s-casing"
|
||||||
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
|
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
|
||||||
throwforce = 1
|
throwforce = 1
|
||||||
w_class = 1.0
|
w_class = 1.0
|
||||||
var
|
var
|
||||||
caliber = "357" //Which kind of guns it can be loaded into
|
caliber = "" //Which kind of guns it can be loaded into
|
||||||
projectile_type = "/obj/item/projectile"//The bullet type to create when New() is called
|
projectile_type = ""//The bullet type to create when New() is called
|
||||||
obj/item/projectile/BB = null //The loaded bullet
|
obj/item/projectile/BB = null //The loaded bullet
|
||||||
|
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
//Boxes of ammo
|
//Boxes of ammo
|
||||||
/obj/item/ammo_magazine
|
/obj/item/ammo_magazine
|
||||||
name = "ammo box (.357)"
|
name = "ammo box (.357)"
|
||||||
desc = "A box of .357 ammo"
|
desc = "A box of ammo"
|
||||||
icon_state = "357"
|
icon_state = "357"
|
||||||
icon = 'ammo.dmi'
|
icon = 'ammo.dmi'
|
||||||
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
|
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
|
||||||
|
|||||||
@@ -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
|
/obj/item/ammo_magazine/a75
|
||||||
name = "ammo magazine (.75)"
|
name = "ammo magazine (.75)"
|
||||||
icon_state = "gyro"
|
icon_state = "gyro"
|
||||||
|
|||||||
@@ -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
|
/obj/item/ammo_casing/a418
|
||||||
desc = "A .418 bullet casing."
|
desc = "A .418 bullet casing."
|
||||||
caliber = "357"
|
caliber = "357"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
m_amt = 1000
|
m_amt = 1000
|
||||||
|
|
||||||
var
|
var
|
||||||
ammo_type = "/obj/item/ammo_casing"
|
ammo_type = "/obj/item/ammo_casing/a357"
|
||||||
list/loaded = list()
|
list/loaded = list()
|
||||||
max_shells = 7
|
max_shells = 7
|
||||||
load_method = 0 //0 = Single shells or quick loader, 1 = magazine
|
load_method = 0 //0 = Single shells or quick loader, 1 = magazine
|
||||||
|
|||||||
Reference in New Issue
Block a user