mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
More runtime errors squashed.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@231 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -48,8 +48,10 @@ obj/machinery/atmospherics/valve
|
||||
|
||||
if(open)
|
||||
if(reference == node1)
|
||||
if(node2)
|
||||
return node2.network_expand(new_network, src)
|
||||
else if(reference == node2)
|
||||
if(node1)
|
||||
return node1.network_expand(new_network, src)
|
||||
|
||||
return null
|
||||
|
||||
@@ -120,6 +120,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
|
||||
reaction_turf(var/turf/T, var/volume)
|
||||
if (!istype(T, /turf/space))
|
||||
src = null
|
||||
if(T:wet >= 2) return
|
||||
T:wet = 2
|
||||
|
||||
@@ -830,6 +830,7 @@
|
||||
////////////////////////////////////////////////////////
|
||||
if (href_list["rejuv"])
|
||||
var/mob/living/carbon/human/H = src.connected.occupant
|
||||
if(H)
|
||||
if (H.reagents.get_reagent_amount("inaprovaline") < 60)
|
||||
H.reagents.add_reagent("inaprovaline", 30)
|
||||
usr << text("Occupant now has [] units of rejuvenation in his/her bloodstream.", H.reagents.get_reagent_amount("inaprovaline"))
|
||||
|
||||
@@ -141,6 +141,7 @@
|
||||
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
|
||||
var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher)
|
||||
if(prob(prob_right_job))
|
||||
if(correct_mob)
|
||||
changeling_job = correct_mob:assigned_role
|
||||
else
|
||||
var/list/job_tmp = get_all_jobs()
|
||||
|
||||
@@ -132,6 +132,7 @@ datum
|
||||
|
||||
check_completion()
|
||||
if(steal_target)
|
||||
if(owner.current)
|
||||
if(owner.current.check_contents_for(steal_target))
|
||||
if(target_name == "functional ai")
|
||||
// world << "dude's after an AI, time to check for one."
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
pressure_resistance = 7*ONE_ATMOSPHERE
|
||||
var/temperature_resistance = 1000 + T0C
|
||||
volume = 1000
|
||||
var/throwforce = 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/sleeping_agent
|
||||
name = "Canister: \[N2O\]"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
var/volume = 0
|
||||
var/destroyed = 0
|
||||
var/throwforce = 0
|
||||
|
||||
var/maximum_pressure = 90*ONE_ATMOSPHERE
|
||||
|
||||
@@ -102,7 +103,7 @@
|
||||
else if ((istype(W, /obj/item/device/analyzer) || (istype(W, /obj/item/device/pda))) && get_dist(user, src) <= 1)
|
||||
for (var/mob/O in viewers(user, null))
|
||||
O << "\red [user] has used [W] on \icon[icon]"
|
||||
|
||||
if(air_contents)
|
||||
var/pressure = air_contents.return_pressure()
|
||||
var/total_moles = air_contents.total_moles()
|
||||
|
||||
@@ -125,6 +126,8 @@
|
||||
user << "\blue Temperature: [round(air_contents.temperature-T0C)]°C"
|
||||
else
|
||||
user << "\blue Tank is empty!"
|
||||
else
|
||||
user << "\blue Tank is empty!"
|
||||
return
|
||||
|
||||
return
|
||||
@@ -22,12 +22,12 @@
|
||||
if(src.occupant)
|
||||
user << "\red The gibber is full, empty it first!"
|
||||
return
|
||||
if(G.affecting.abiotic())
|
||||
user << "\red Subject may not have abiotic items on."
|
||||
return
|
||||
if (!( istype(G, /obj/item/weapon/grab)) || !(istype(G.affecting, /mob/living/carbon/human)))
|
||||
user << "\red This item is not suitable for the gibber!"
|
||||
return
|
||||
if(G.affecting.abiotic())
|
||||
user << "\red Subject may not have abiotic items on."
|
||||
return
|
||||
|
||||
user.visible_message("\red [user] starts to put [G.affecting] into the gibber!")
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -4,7 +4,9 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ")
|
||||
|
||||
defer_powernet_rebuild = 1
|
||||
|
||||
if (!istype(epicenter, /turf))
|
||||
epicenter = epicenter.loc
|
||||
return explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range)
|
||||
playsound(epicenter.loc, 'explosionfar.ogg', 100, 1, round(devastation_range*2,1) )
|
||||
playsound(epicenter.loc, "explosion", 100, 1, round(devastation_range,1) )
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
W.loc = src
|
||||
src.brain = W
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(src.loc))
|
||||
if (src.brain.owner)
|
||||
O.gender = src.brain.owner.gender
|
||||
//O.start = 1
|
||||
O.invisibility = 0
|
||||
|
||||
@@ -163,7 +163,7 @@ WELDINGTOOOL
|
||||
/obj/item/weapon/weldingtool/proc/eyecheck(mob/user as mob)
|
||||
//check eye protection
|
||||
var/safety = null
|
||||
|
||||
if (istype(user, /mob/living/carbon/human))
|
||||
if (istype(user:head, /obj/item/clothing/head/helmet/welding) || istype(user:head, /obj/item/clothing/head/helmet/space))
|
||||
safety = 2
|
||||
else if (istype(user:glasses, /obj/item/clothing/glasses/sunglasses))
|
||||
@@ -172,6 +172,8 @@ WELDINGTOOOL
|
||||
safety = -1
|
||||
else
|
||||
safety = 0
|
||||
else if(istype(user, /mob/living/carbon))
|
||||
safety = 0
|
||||
switch(safety)
|
||||
if(1)
|
||||
usr << "\red Your eyes sting a little."
|
||||
|
||||
@@ -214,5 +214,6 @@
|
||||
/obj/crate/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(opened)
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.loc = src.loc
|
||||
else return attack_hand(user)
|
||||
@@ -115,11 +115,13 @@
|
||||
var/turf/T = src.loc
|
||||
if (ismob(T))
|
||||
T = T.loc
|
||||
if (src.part1)
|
||||
src.part1.loc = T
|
||||
src.part2.loc = T
|
||||
src.part1.master = null
|
||||
src.part2.master = null
|
||||
src.part1 = null
|
||||
if (src.part2)
|
||||
src.part2.loc = T
|
||||
src.part2.master = null
|
||||
src.part2 = null
|
||||
|
||||
del(src)
|
||||
|
||||
@@ -62,7 +62,9 @@
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
if (usr.client && usr.client.holder)
|
||||
if(usr)
|
||||
if (usr.client)
|
||||
if(usr.client.holder)
|
||||
M << "\bold You hear a voice in your head... \italic [msg]"
|
||||
|
||||
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
..()
|
||||
statpanel("Status")
|
||||
if (src.client.statpanel == "Status")
|
||||
if(emergency_shuttle)
|
||||
if(emergency_shuttle.online && emergency_shuttle.location < 2)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
if (timeleft)
|
||||
|
||||
@@ -153,6 +153,7 @@
|
||||
// if(ticker.mode.name == "AI malfunction")
|
||||
// if(ticker.mode:malf_mode_declared)
|
||||
// stat(null, "Time left: [ ticker.mode:AI_win_timeleft]")
|
||||
if(emergency_shuttle)
|
||||
if(emergency_shuttle.online && emergency_shuttle.location < 2)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
if (timeleft)
|
||||
|
||||
@@ -250,6 +250,8 @@
|
||||
if(O2_pp < safe_oxygen_min) // Too little oxygen
|
||||
if(prob(20))
|
||||
spawn(0) emote("gasp")
|
||||
if (O2_pp == 0)
|
||||
O2_pp = 0.01
|
||||
var/ratio = safe_oxygen_min/O2_pp
|
||||
oxyloss += min(5*ratio, 7) // Don't fuck them up too fast (space only does 7 after all!)
|
||||
oxygen_used = breath.oxygen*ratio/6
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
/mob/living/carbon/monkey/movement_delay()
|
||||
var/tally = 0
|
||||
|
||||
if(src.reagents)
|
||||
if(src.reagents.has_reagent("hyperzine")) return -1
|
||||
|
||||
var/health_deficiency = (100 - src.health)
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
if (!src.client.changes)
|
||||
src.changes()
|
||||
if(istype (src, /mob/living))
|
||||
if(ticker)
|
||||
if(ticker.mode.name == "revolution")
|
||||
if ((src.mind in ticker.mode:revolutionaries) || (src.mind in ticker.mode:head_revolutionaries))
|
||||
ticker.mode:update_rev_icons_added(src.mind)
|
||||
|
||||
@@ -1438,7 +1438,8 @@
|
||||
|
||||
//we don't use message_admins here because the sender/receiver might get it too
|
||||
for (var/mob/K in world)
|
||||
if(K && K.client && K.client.holder && K.key != usr.key && K.key != M.key)
|
||||
if(K)
|
||||
if(K.client && K.client.holder && K.key != usr.key && K.key != M.key)
|
||||
K << "<b><font color='blue'>PM: [key_name(usr, K)]->[key_name(M, K)]:</b> \blue [t]</font>"
|
||||
..()
|
||||
return
|
||||
@@ -2024,7 +2025,9 @@
|
||||
if(src.mob)
|
||||
var/mob/M = src.mob
|
||||
M.loc = null // HACK, but whatever, this works
|
||||
|
||||
var/obj/screen/boom = M.hud_used.station_explosion
|
||||
if (M.client)
|
||||
M.client.screen += boom
|
||||
if(ticker)
|
||||
switch(ticker.mode.name)
|
||||
|
||||
@@ -222,7 +222,7 @@ mob/new_player
|
||||
proc/AttemptLateSpawn(rank, maxAllowed)
|
||||
if(IsJobAvailable(rank, maxAllowed))
|
||||
var/mob/living/carbon/human/character = create_character()
|
||||
|
||||
if (character)
|
||||
character.Equip_Rank(rank, joined_late=1)
|
||||
|
||||
//add to manifest -- Commented out in favor of ManifestLateSpawn() -- TLE
|
||||
@@ -231,7 +231,7 @@ mob/new_player
|
||||
// t.fields["rank"] = rank
|
||||
|
||||
ManifestLateSpawn(character)
|
||||
|
||||
if(ticker)
|
||||
if (ticker.current_state == GAME_STATE_PLAYING)
|
||||
for (var/mob/living/silicon/ai/A in world)
|
||||
if (!A.stat)
|
||||
@@ -371,7 +371,7 @@ mob/new_player
|
||||
|
||||
preferences.copy_to(new_character)
|
||||
new_character.dna.ready_dna(new_character)
|
||||
|
||||
if(mind)
|
||||
mind.transfer_to(new_character)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user