Fixed some runtimes.

Job system once again has -1 as unlimited.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2451 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
mport2004@gmail.com
2011-10-30 07:14:17 +00:00
parent 830b28dc7f
commit 9a2ee43b59
11 changed files with 24 additions and 15 deletions

View File

@@ -306,8 +306,10 @@
else
if(sacrificed.Find(sacrifice_target))
explanation = "Sacrifice [sacrifice_target.current.real_name], the [sacrifice_target.assigned_role]. \green <b>Success!</b>"
else
else if(sacrifice_target && sacrifice_target.current)
explanation = "Sacrifice [sacrifice_target.current.real_name], the [sacrifice_target.assigned_role]. \red Failed."
else
explanation = "Sacrifice Unknown, the Unknown whos body was likely gibbed. \red Failed."
if("eldergod")
if(!eldergod)
explanation = "Summon Nar-Sie. \green <b>Success!</b>"

View File

@@ -3,8 +3,8 @@
flag = ASSISTANT
department_flag = CIVILIAN
faction = "Station"
total_positions = 1000
spawn_positions = 1000
total_positions = -1
spawn_positions = -1
equip(var/mob/living/carbon/human/H)

View File

@@ -53,7 +53,7 @@ var/global/datum/controller/occupations/job_master
var/position_limit = job.total_positions
if(!latejoin)
position_limit = job.spawn_positions
if(job.current_positions < position_limit)
if((job.current_positions < position_limit) || position_limit == -1)
Debug("Player: [player] is now Rank: [rank], JCP:[job.current_positions], JPL:[position_limit]")
player.mind.assigned_role = rank
unassigned -= player
@@ -179,9 +179,9 @@ var/global/datum/controller/occupations/job_master
Debug("Checking job: [job]")
if(!job) continue
if(!unassigned.len) break
if(job.current_positions >= job.spawn_positions) continue
if((job.current_positions >= job.spawn_positions) && job.spawn_positions != -1) continue
var/list/candidates = FindOccupationCandidates(job, level)
while(candidates.len && (job.current_positions < job.spawn_positions))
while(candidates.len && ((job.current_positions < job.spawn_positions) || job.spawn_positions == -1))
var/mob/new_player/candidate = pick(candidates)
Debug("Selcted: [candidate], for: [job.title]")
AssignRole(candidate, job.title)
@@ -297,5 +297,7 @@ var/global/datum/controller/occupations/job_master
if(!J) continue
J.total_positions = text2num(value)
J.spawn_positions = text2num(value)
if(name == "AI" || name == "Cyborg")//I dont like this here but it will do for now
J.total_positions = 0
return 1

View File

@@ -269,7 +269,8 @@
return
cooked = recipe.make_food(src)
stop()
cooked.loc = src.loc
if(cooked)
cooked.loc = src.loc
return
/obj/machinery/microwave/proc/wzhzhzh(var/seconds as num)

View File

@@ -654,7 +654,7 @@
if (href_list["revive"])
if ((src.rank in list( "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
var/mob/living/M = locate(href_list["revive"])
if (ismob(M))
if (isliving(M))
if(config.allow_admin_rev)
M.revive()
message_admins("\red Admin [key_name_admin(usr)] healed / revived [key_name_admin(M)]!", 1)

View File

@@ -21,4 +21,6 @@
usr << "Your message has been broadcast to administrators."
log_admin("HELP: [key_name(src)]: [msg]")
tension_master.new_adminhelp()
if(tension_master)
tension_master.new_adminhelp()
return

View File

@@ -182,7 +182,7 @@
result = /obj/item/weapon/reagent_containers/food/snacks/donkpocket //SPECIAL
make_food(var/obj/container as obj)
var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked = locate() in container
if (!being_cooked.warm)
if(being_cooked && !being_cooked.warm)
warm_up(being_cooked)
return being_cooked

View File

@@ -159,7 +159,7 @@ I kind of like the right click only--the window version can get a little confusi
// Hacky way of hopefully preventing a runtime error from happening
if(vents.len < selection_position)
vents.len = selection_position
vents.len = selection_position//What the fuck is this I dont even, Right will likely have to fix this later
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection_position]
if(target_vent)

View File

@@ -151,7 +151,7 @@
return 1
if(href_list["ready"])
if (!src.client.authenticated)
if (!client.authenticated)
src << "You are not authorized to enter the game."
return
@@ -165,7 +165,7 @@
new_player_panel_proc()
if(href_list["observe"])
if (!usr.client.authenticated)
if (!client.authenticated)
src << "You are not authorized to enter the game."
return
@@ -191,7 +191,7 @@
LateChoices()
if(href_list["SelectedJob"])
if(!usr.client.authenticated)
if(!client.authenticated)
src << "You are not authorized to enter the game."
return

View File

@@ -95,7 +95,7 @@
in_chamber.yo = targloc.y - curloc.y
in_chamber.xo = targloc.x - curloc.x
spawn()
in_chamber.process()
if(in_chamber) in_chamber.process()
sleep(1)
in_chamber = null

View File

@@ -202,6 +202,7 @@ datum
materials = list("$glass" = 2000, "acid" = 20)
build_path = "/obj/item/weapon/circuitboard/air_management"
/* Uncomment if someone makes these buildable
general_alert
name = "Circuit Design (General Alert Console)"
desc = "Allows for the construction of circuit boards used to build a General Alert console."
@@ -210,6 +211,7 @@ datum
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
build_path = "/obj/item/weapon/circuitboard/general_alert"
*/
robocontrol
name = "Circuit Design (Robotics Control Console)"