Merge pull request #1786 from Krausus/Fixes-20150817

Fixes - Quiet Constructs, Shuttle-Heads, Slow Timers, Sleepy Nukes, Runtimes, etc.
This commit is contained in:
Mark van Alphen
2015-08-18 17:30:38 +02:00
14 changed files with 38 additions and 27 deletions
+2
View File
@@ -191,6 +191,8 @@
var/mob/living/silicon/robot/r = mymob
if(!r.client) return
if(r.shown_robot_modules)
//Modules display is shown
r.client.screen += r.throw_icon //"store" icon
+1 -1
View File
@@ -129,7 +129,7 @@
msg += "You have been sent the $[pay], as agreed."
else
msg += "However, we were unable to send you the $[pay] you're entitled."
if(useMS)
if(useMS && P)
// THIS SHOULD HAVE DONE EVERYTHING FOR ME
useMS.send_pda_message("[P.owner]", "[command_name()] Payroll", msg)
+11 -10
View File
@@ -10,7 +10,7 @@ var/bomb_set
var/extended = 0.0
var/lighthack = 0
var/opened = 0.0
var/timeleft = 60.0
var/timeleft = 120.0
var/timing = 0.0
var/r_code = "ADMIN"
var/code = ""
@@ -51,12 +51,11 @@ var/bomb_set
/obj/machinery/nuclearbomb/process()
if (src.timing)
bomb_set = 1 //So long as there is one nuke timing, it means one nuke is armed.
src.timeleft--
if (src.timeleft <= 0)
explode()
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
nanomanager.update_uis(src)
timeleft = max(timeleft - 2, 0) // 2 seconds per process()
if (timeleft <= 0)
spawn
explode()
nanomanager.update_uis(src)
return
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob, params)
@@ -277,7 +276,8 @@ var/bomb_set
spawn(100) src.lighthack = !src.lighthack
if(src.timing_wire == temp_wire)
if(src.timing)
explode()
spawn
explode()
if(src.safety_wire == temp_wire)
src.safety = !src.safety
spawn(100) src.safety = !src.safety
@@ -295,7 +295,8 @@ var/bomb_set
wires[temp_wire] = !wires[temp_wire]
if(src.safety_wire == temp_wire)
if(src.timing)
explode()
spawn
explode()
if(src.timing_wire == temp_wire)
if(!src.lighthack)
if (src.icon_state == "nuclearbomb2")
@@ -342,7 +343,7 @@ var/bomb_set
if (href_list["time"])
var/time = text2num(href_list["time"])
src.timeleft += time
src.timeleft = min(max(round(src.timeleft), 60), 600)
src.timeleft = min(max(round(src.timeleft), 120), 600)
if (href_list["timer"])
if (src.timing == -1.0)
nanomanager.update_uis(src)
@@ -171,7 +171,7 @@ var/shuttle_call/shuttle_calls[0]
if("callshuttle")
var/input = input(usr, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
if(!input || ..() || !(is_authenticated(usr) == 2))
if(!input || ..() || !is_authenticated(usr))
nanomanager.update_uis(src)
return
@@ -426,7 +426,7 @@ var/shuttle_call/shuttle_calls[0]
return
if(world.time < 6000) // Ten minute grace period to let the game get going without lolmetagaming. -- TLE
user << "<span class='warning'>The emergency shuttle is refueling. Please wait another [round((6000-world.time)/60)] minutes before trying again.</span>"
user << "<span class='warning'>The emergency shuttle is refueling. Please wait another [round((6000-world.time)/600)] minutes before trying again.</span>"
return
if(emergency_shuttle.going_to_centcom())
@@ -470,7 +470,7 @@ var/shuttle_call/shuttle_calls[0]
return
if(world.time < 54000) // 30 minute grace period to let the game get going
user << "The shuttle is refueling. Please wait another [round((54000-world.time)/60)] minutes before trying again."
user << "The shuttle is refueling. Please wait another [round((54000-world.time)/600)] minutes before trying again."
return
if(ticker.mode.name == "epidemic")
+1 -1
View File
@@ -82,7 +82,7 @@
if (istype(O, /mob/living/carbon/human))
var/mob/living/carbon/human/H = O
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
if ((E.damage > E.min_bruised_damage && prob(E.damage + 50)))
if (E && (E.damage > E.min_bruised_damage && prob(E.damage + 50)))
flick("e_flash", O:flash)
E.damage += rand(1, 2)
else
+8 -3
View File
@@ -13,8 +13,13 @@
temperature = TCMB
/turf/simulated/floor/mech_bay_recharge_floor/Destroy()
recharge_console.recharge_floor = null
recharge_port.recharge_floor = null
if(recharge_console && recharge_console.recharge_floor == src)
recharge_console.recharge_floor = null
recharge_console = null
if(recharge_port && recharge_port.recharge_floor == src)
recharge_port.recharge_floor = null
recharge_port = null
recharging_mecha = null
..()
/turf/simulated/floor/mech_bay_recharge_floor/Entered(var/obj/mecha/mecha)
@@ -285,4 +290,4 @@
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
ui.set_auto_update(1)
+1 -1
View File
@@ -72,7 +72,7 @@ REAGENT SCANNER
spawn(pulse_duration)
if(O)
var/turf/U = O.loc
if(U.intact)
if(U && U.intact)
O.invisibility = 101
O.alpha = 255
for(var/mob/living/M in T.contents)
+1 -1
View File
@@ -6,7 +6,7 @@ world/IsBanned(key,address,computer_id)
//Guest Checking
if(!guests_allowed && IsGuestKey(key))
log_access("Failed Login: [key] - Guests not allowed")
message_admins("\blue Failed Login: [key] - Guests not allowed")
// message_admins("\blue Failed Login: [key] - Guests not allowed")
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
//check if the IP address is a known TOR node
+2 -2
View File
@@ -53,7 +53,7 @@
process()
if(timing && (time > 0))
time--
time -= 2 // 2 seconds per process()
if(timing && time <= 0)
timing = repeat
timer_end()
@@ -124,7 +124,7 @@
if(href_list["tp"])
var/tp = text2num(href_list["tp"])
set_time += tp
set_time = min(max(round(set_time), 5), 600)
set_time = min(max(round(set_time), 6), 600)
if(!timing)
time = set_time
+2
View File
@@ -242,6 +242,7 @@ var/list/ai_verbs_default = list(
powered_ai = ai
if(isnull(powered_ai))
qdel(src)
return
loc = powered_ai.loc
use_power(1) // Just incase we need to wake up the power system.
@@ -251,6 +252,7 @@ var/list/ai_verbs_default = list(
/obj/machinery/ai_powersupply/process()
if(!powered_ai || powered_ai.stat & DEAD)
qdel(src)
return
if(!powered_ai.anchored)
loc = powered_ai.loc
use_power = 0
@@ -25,6 +25,7 @@
minbodytemp = 0
faction = list("cult")
flying = 1
universal_speak = 1
var/list/construct_spells = list()
/mob/living/simple_animal/construct/New()
+3 -2
View File
@@ -121,8 +121,9 @@
O.add_ai_verbs()
O.rename_self("ai",1)
. = O
qdel(src)
spawn
qdel(src)
return O
/mob/living/carbon/human/make_into_mask(var/should_gib = 0)
for(var/t in organs)
@@ -562,6 +562,7 @@
var/count = 1
if (href_list["createpill_multiple"]) count = isgoodnumber(input("Select the number of pills to make.", 10, pillamount) as num)
if (count > 20) count = 20 //Pevent people from creating huge stacks of pills easily. Maybe move the number to defines?
if (count <= 0) return
var/amount_per_pill = reagents.total_volume/count
if (amount_per_pill > 50) amount_per_pill = 50
var/name = reject_bad_text(input(usr,"Name:","Name your pill!","[reagents.get_master_reagent_name()] ([amount_per_pill] units)"))
+1 -3
View File
@@ -284,14 +284,12 @@
if(deliveryCheck == 0)
H.destinationTag = 1
air_contents = new() // new empty gas resv.
sleep(10)
playsound(src, 'sound/machines/disposalflush.ogg', 50, 0, 0)
sleep(5) // wait for animation to finish
H.init(src) // copy the contents of disposer to holder
air_contents = new() // The holder just took our gas; replace it
H.start(src) // start the holder processing movement
flushing = 0
// now reset disposal state