Merge pull request #1165 from Krausus/Fixes-201505250443

Fixes: Mulebots, Catwalks, Flashbangs, Diona Suicide, Traitor Report, Challenge, Runtimes, etc.
This commit is contained in:
TheDZD
2015-05-25 11:20:29 -04:00
24 changed files with 105 additions and 81 deletions
+1 -1
View File
@@ -426,7 +426,7 @@
universal_underlays(node2)
else
universal_underlays(,dir)
universal_underlays(dir, -180)
universal_underlays(,turn(dir, -180))
/obj/machinery/atmospherics/pipe/simple/visible/universal/update_underlays()
..()
@@ -329,6 +329,10 @@
var/turf/T = get_turf(target)
var/turf/L = get_turf(src)
if((!T) || (!L)) // Someone is no longer in the world...
icon_state = "pinonnull"
return
if(T.z != L.z)
icon_state = "pinonnull"
else
+1 -1
View File
@@ -253,7 +253,7 @@
if(uplink_true) text += " (used [TC_uses] TC) [purchases]"
if(traitor.objectives.len)//If the traitor had no objectives, don't need to process this.
if(traitor.objectives && traitor.objectives.len)//If the traitor had no objectives, don't need to process this.
var/count = 1
for(var/datum/objective/objective in traitor.objectives)
if(objective.check_completion())
+1 -1
View File
@@ -840,7 +840,7 @@ var/global/mulebot_count = 0
recv = signal.data["beacon"]
if(wires.BeaconRX())
if(recv == new_destination) // if the recvd beacon location matches the set destination
if((recv == new_destination) && (destination != new_destination)) // if the recvd beacon location matches the set destination
// the we will navigate there
destination = new_destination
target = signal.source.loc
+5 -3
View File
@@ -117,9 +117,11 @@
data["autoallowed"] = 1
else
data["autoallowed"] = 0
data["occupant"] = src.scanner.occupant
data["locked"] = src.scanner.locked
data["biomass"] = src.pod1.biomass
if(src.scanner)
data["occupant"] = src.scanner.occupant
data["locked"] = src.scanner.locked
if(src.pod1)
data["biomass"] = src.pod1.biomass
data["temp"] = temp
data["scantemp"] = scantemp
data["disk"] = src.diskette
+1
View File
@@ -79,6 +79,7 @@
/obj/machinery/porta_turret/proc/setup()
var/obj/item/weapon/gun/energy/E = installation //All energy-based weapons are applicable
if(istext(installation)) E = text2path(installation)
//var/obj/item/ammo_casing/shottype = E.projectile_type
projectile = initial(E.projectile_type)
+1 -1
View File
@@ -34,7 +34,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
// Double check for client
if(M && M.client)
var/turf/M_turf = get_turf(M)
if(M_turf.z == epicenter.z)
if(M_turf && M_turf.z == epicenter.z)
var/dist = get_dist(M_turf, epicenter)
// If inside the blast radius + world.view - 2
if(dist <= round(max_range + world.view - 2, 1))
@@ -49,7 +49,7 @@
if(expansion)
qdel(expansion)
expansion = null
del(src)
return ..()
/* Easier to just call del() than this nonsense
get_cameras()
for(var/cam_tag in bugged_cameras)
@@ -107,8 +107,8 @@
target.ex_act(1)
if (isobj(target))
if (target)
del(target)
del(src)
qdel(target)
qdel(src)
/obj/item/weapon/c4/attack(mob/M as mob, mob/user as mob, def_zone)
return
@@ -36,7 +36,7 @@
ear_safety++
//Flash
if(!eye_safety)
if(!eye_safety && ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
flick("e_flash", M.flash)
+1 -1
View File
@@ -13,7 +13,7 @@
var/brightness = 2
/obj/item/weapon/shard/supermatter/New()
src.icon_state = pick("supermatter")
src.icon_state = "supermatter" + pick("large", "medium", "small")
switch(src.icon_state)
if("supermattersmall")
src.pixel_x = rand(-12, 12)
+19 -11
View File
@@ -465,7 +465,7 @@ var/list/wood_icons = list("wood","wood-broken")
else
user << "\blue The lightbulb seems fine, no need to replace it."
if(istype(C, /obj/item/weapon/crowbar) && (!(is_plating())))
if(istype(C, /obj/item/weapon/crowbar) && (!(is_plating())) && (!is_catwalk()))
if(broken || burnt)
user << "\red You remove the broken plating."
else
@@ -482,18 +482,26 @@ var/list/wood_icons = list("wood","wood-broken")
return
if(istype(C, /obj/item/weapon/screwdriver) && is_wood_floor())
if(broken || burnt)
return
else
if(is_wood_floor())
user << "\red You unscrew the planks."
new floor_tile.type(src)
make_plating()
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
if(is_catwalk())
if(istype(C, /obj/item/weapon/screwdriver))
if(is_wood_floor())
if(broken || burnt)
return
else
if(is_wood_floor())
user << "\red You unscrew the planks."
new floor_tile.type(src)
make_plating()
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
else if(is_catwalk())
if(broken) return
user << "\red You unscrew the catwalk's rods."
new /obj/item/stack/rods(src, 2)
ReplaceWithLattice()
for(var/direction in cardinal)
var/turf/T = get_step(src,direction)
if(T.is_catwalk())
var/turf/simulated/floor/plating/airless/catwalk/CW=T
CW.update_icon(0)
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
return
+3 -2
View File
@@ -110,7 +110,8 @@
if(hard_to_hear)
message = stars(message)
var/speaker_name = speaker.name
var/speaker_name = "unknown"
if(speaker) speaker_name = speaker.name
if(vname)
speaker_name = vname
@@ -168,7 +169,7 @@
track = "<a href='byond://?src=\ref[src];trackname=[html_encode(speaker_name)];track=\ref[speaker]'>[speaker_name] ([jobname])</a>"
if(istype(src, /mob/dead/observer))
if(speaker_name != speaker.real_name && !isAI(speaker)) //Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs.
if(speaker && (speaker_name != speaker.real_name) && !isAI(speaker)) //Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs.
speaker_name = "[speaker.real_name] ([speaker_name])"
track = "[speaker_name] ([ghost_follow_link(follow_target, ghost=src)])"
+40 -40
View File
@@ -272,9 +272,9 @@
var/obj/item/organ/external/E = organs_by_name[organ_tag]
if(!E)
wound_flavor_text["[organ_descriptor]"] = "<span class='warning'><b>[t_He] is missing [t_his] [organ_descriptor].</b></span>\n"
wound_flavor_text["[organ_tag]"] = "<span class='warning'><b>[t_He] is missing [t_his] [organ_descriptor].</b></span>\n"
else if(E.is_stump())
wound_flavor_text["[organ_descriptor]"] = "<span class='warning'><b>[t_He] has a stump where [t_his] [organ_descriptor] should be.</b></span>\n"
wound_flavor_text["[organ_tag]"] = "<span class='warning'><b>[t_He] has a stump where [t_his] [organ_descriptor] should be.</b></span>\n"
else
continue
@@ -282,25 +282,25 @@
if(temp)
if(temp.status & ORGAN_ROBOT)
if(!(temp.brute_dam + temp.burn_dam))
if(!species.flags & IS_SYNTHETIC)
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]!</span>\n"
if(!(species.flags & IS_SYNTHETIC))
wound_flavor_text["[temp.limb_name]"] = "<span class='warning'>[t_He] has a robotic [temp.name]!</span>\n"
continue
else
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has"
wound_flavor_text["[temp.limb_name]"] = "<span class='warning'>[t_He] has a robotic [temp.name]. It has"
if(temp.brute_dam) switch(temp.brute_dam)
if(0 to 20)
wound_flavor_text["[temp.name]"] += " some dents"
wound_flavor_text["[temp.limb_name]"] += " some dents"
if(21 to INFINITY)
wound_flavor_text["[temp.name]"] += pick(" a lot of dents"," severe denting")
wound_flavor_text["[temp.limb_name]"] += pick(" a lot of dents"," severe denting")
if(temp.brute_dam && temp.burn_dam)
wound_flavor_text["[temp.name]"] += " and"
wound_flavor_text["[temp.limb_name]"] += " and"
if(temp.burn_dam) switch(temp.burn_dam)
if(0 to 20)
wound_flavor_text["[temp.name]"] += " some burns"
wound_flavor_text["[temp.limb_name]"] += " some burns"
if(21 to INFINITY)
wound_flavor_text["[temp.name]"] += pick(" a lot of burns"," severe melting")
if(wound_flavor_text["[temp.name]"])
wound_flavor_text["[temp.name]"] += "!</span>\n"
wound_flavor_text["[temp.limb_name]"] += pick(" a lot of burns"," severe melting")
if(wound_flavor_text["[temp.limb_name]"])
wound_flavor_text["[temp.limb_name]"] += "!</span>\n"
else if(temp.wounds.len > 0)
var/list/wound_descriptors = list()
for(var/datum/wound/W in temp.wounds)
@@ -349,13 +349,13 @@
flavor_text_string += ","
flavor_text_string += flavor_text[text]
flavor_text_string += " on [t_his] [temp.name].</span><br>"
wound_flavor_text["[temp.name]"] = flavor_text_string
wound_flavor_text["[temp.limb_name]"] = flavor_text_string
else
wound_flavor_text["[temp.name]"] = ""
wound_flavor_text["[temp.limb_name]"] = ""
if(temp.status & ORGAN_BLEEDING)
is_bleeding["[temp.name]"] = 1
is_bleeding["[temp.limb_name]"] = 1
else
wound_flavor_text["[temp.name]"] = ""
wound_flavor_text["[temp.limb_name]"] = ""
//Handles the text strings being added to the actual description.
//If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext.
@@ -370,41 +370,41 @@
msg += wound_flavor_text["chest"]
else if(is_bleeding["chest"])
display_chest = 1
if(wound_flavor_text["left arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["left arm"]
else if(is_bleeding["left arm"])
if(wound_flavor_text["l_arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["l_arm"]
else if(is_bleeding["l_arm"])
display_chest = 1
if(wound_flavor_text["left hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves)))
msg += wound_flavor_text["left hand"]
else if(is_bleeding["left hand"])
if(wound_flavor_text["l_hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves)))
msg += wound_flavor_text["l_hand"]
else if(is_bleeding["l_hand"])
display_gloves = 1
if(wound_flavor_text["right arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["right arm"]
else if(is_bleeding["right arm"])
if(wound_flavor_text["r_arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["r_arm"]
else if(is_bleeding["r_arm"])
display_chest = 1
if(wound_flavor_text["right hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves)))
msg += wound_flavor_text["right hand"]
else if(is_bleeding["right hand"])
if(wound_flavor_text["r_hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves)))
msg += wound_flavor_text["r_hand"]
else if(is_bleeding["r_hand"])
display_gloves = 1
if(wound_flavor_text["groin"] && (is_destroyed["groin"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["groin"]
else if(is_bleeding["groin"])
display_chest = 1
if(wound_flavor_text["left leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["left leg"]
else if(is_bleeding["left leg"])
if(wound_flavor_text["l_leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["l_leg"]
else if(is_bleeding["l_leg"])
display_chest = 1
if(wound_flavor_text["left foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes)))
msg += wound_flavor_text["left foot"]
else if(is_bleeding["left foot"])
if(wound_flavor_text["l_foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes)))
msg += wound_flavor_text["l_foot"]
else if(is_bleeding["l_foot"])
display_shoes = 1
if(wound_flavor_text["right leg"] && (is_destroyed["right leg"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["right leg"]
else if(is_bleeding["right leg"])
if(wound_flavor_text["r_leg"] && (is_destroyed["right leg"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["r_leg"]
else if(is_bleeding["r_leg"])
display_chest = 1
if(wound_flavor_text["right foot"]&& (is_destroyed["right foot"] || (!shoes && !skipshoes)))
msg += wound_flavor_text["right foot"]
else if(is_bleeding["right foot"])
if(wound_flavor_text["r_foot"]&& (is_destroyed["right foot"] || (!shoes && !skipshoes)))
msg += wound_flavor_text["r_foot"]
else if(is_bleeding["r_foot"])
display_shoes = 1
if(display_chest)
msg += "<span class='warning'><b>[src] has blood soaking through from under [t_his] clothing!</b></span>\n"
@@ -11,7 +11,7 @@
total_burn += O.burn_dam
health = 100 - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute
//TODO: fix husking
if( (((100 - total_burn) < config.health_threshold_dead) && stat == DEAD) && (!species.flags & IS_SYNTHETIC))//100 only being used as the magic human max health number, feel free to change it if you add a var for it -- Urist
if( (((100 - total_burn) < config.health_threshold_dead) && stat == DEAD) && (!(species.flags & IS_SYNTHETIC)))//100 only being used as the magic human max health number, feel free to change it if you add a var for it -- Urist
ChangeToHusk()
if (species.flags & IS_SYNTHETIC)
var/obj/item/organ/external/head/H = organs_by_name["head"]
@@ -124,8 +124,12 @@
else if(E.is_malfunctioning())
if((E.body_part == HAND_LEFT) || (E.body_part == ARM_LEFT))
if(!l_hand)
continue
unEquip(l_hand)
else
if(!r_hand)
continue
unEquip(r_hand)
emote("me", 1, "drops what they were holding, their [E.name] malfunctioning!")
+1 -1
View File
@@ -764,7 +764,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(species.flags & IS_PLANT)
if(nutrition > 450)
nutrition = 450
if(light_amount >= 5) //if there's enough light, heal
if((light_amount >= 5) && !suiciding) //if there's enough light, heal
adjustBruteLoss(-(light_amount/2))
adjustFireLoss(-(light_amount/4))
//adjustToxLoss(-(light_amount))
+1 -1
View File
@@ -84,7 +84,7 @@ var/const/VOX_PATH = "sound/vox_fem/"
for(var/mob/M in player_list)
if(M.client)
var/turf/T = get_turf(M)
if(T.z == z_level && !isdeaf(M))
if(T && T.z == z_level && !isdeaf(M))
M << voice
else
only_listener << voice
@@ -101,7 +101,7 @@
New()
src.modules += new /obj/item/device/flashlight(src)
src.modules += new /obj/item/device/flash/cyborg(src)
src.modules += new /obj/item/device/healthanalyzer(src)
src.modules += new /obj/item/device/healthanalyzer/advanced(src)
src.modules += new /obj/item/device/reagent_scanner/adv(src)
src.modules += new /obj/item/weapon/borg_defib(src)
src.modules += new /obj/item/roller_holder(src)
+2 -1
View File
@@ -229,7 +229,8 @@ var/list/organ_cache = list()
loc = get_turf(owner)
processing_objects |= src
var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list
var/datum/reagent/blood/organ_blood
if(reagents) organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list
if(!organ_blood || !organ_blood.data["blood_DNA"])
owner.vessel.trans_to(src, 5, 1, 1)
+7 -6
View File
@@ -194,8 +194,8 @@
var/list/obj/item/organ/external/possible_points = list()
if(parent)
possible_points += parent
if(children)
possible_points += children
if(children) for(var/organ in children)
if(organ) possible_points += organ
if(forbidden_limbs.len)
possible_points -= forbidden_limbs
if(possible_points.len)
@@ -644,9 +644,10 @@ Note that amputating the affected organ does in fact remove the infection from t
parent = null
spawn(1)
victim.updatehealth()
victim.UpdateDamageIcon()
victim.regenerate_icons()
if(victim)
victim.updatehealth()
victim.UpdateDamageIcon()
victim.regenerate_icons()
dir = 2
switch(disintegrate)
@@ -769,7 +770,7 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/robotize(var/company)
..()
if(company)
if(company && istext(company))
model = company
var/datum/robolimb/R = all_robolimbs[company]
if(R)
+1 -1
View File
@@ -364,7 +364,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
var/turf/our_turf = get_turf(src)
for(var/mob/M in mob_list)
var/turf/their_turf = get_turf(M)
if(their_turf.z == our_turf.z)
if(their_turf && their_turf.z == our_turf.z)
M.update_gravity(M.mob_has_gravity())
if(M.client)
shake_camera(M, 15, 1)
+4 -3
View File
@@ -212,9 +212,10 @@
/obj/machinery/power/smes/Destroy()
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
var/area/area = get_area(src)
message_admins("SMES deleted at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>[area.name]</a>)")
log_game("SMES deleted at ([area.name])")
investigate_log("<font color='red'>deleted</font> at ([area.name])","singulo")
if(area)
message_admins("SMES deleted at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>[area.name]</a>)")
log_game("SMES deleted at ([area.name])")
investigate_log("<font color='red'>deleted</font> at ([area.name])","singulo")
if(terminal)
disconnect_terminal()
..()
+2 -1
View File
@@ -1297,7 +1297,8 @@
AM.pipe_eject(dir)
if(!istype(AM,/mob/living/silicon/robot/drone)) //Drones keep smashing windows from being fired out of chutes. Bad for the station. ~Z
spawn(5)
AM.throw_at(target, 3, 1)
if(AM)
AM.throw_at(target, 3, 1)
H.vent_gas(src.loc)
del(H)