mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-30 16:47:34 +01:00
Fix Sundry Runtime Errors XII (#7007)
* Fix Runtime in atoms_movable.dm,597: list index out of bounds * Fix Runtime in floor_attackby.dm,118: Cannot execute 0.is crowbar(). * Fix null values being present in mob_list. * Another fix for Runtime in update_icons.dm,254: Cannot execute null.GetUIState(). - This time lets just ensure dna is instantiated no matter who is calling dress_preview_mob(). * Fix Runtime in suit_storage_unit.dm,792: Cannot execute null.set machine(). - Also fixed other mixups of usr vs. user that I found in the same file. * Fixes Runtime in find_spawning.dm,688: Cannot read null.origin_tech - if this else if block is reached, new_item must not exist, so we obviously can't set origin_tech on it. Examination of the code seems to suggest the original author intended that for any "talking" items to have arcane and precursor tech; since src is now being made talking, src should get the tech. * Fix talking artifacts downgrading arcane/precursor tech - Bump up the values by one for talking artifact items instead of overwriting whatever the value was.
This commit is contained in:
@@ -531,7 +531,8 @@
|
||||
cloak_animation(animation_time)
|
||||
|
||||
//Needs to be last so people can actually see the effect before we become invisible
|
||||
plane = CLOAKED_PLANE
|
||||
if(cloaked) // Ensure we are still cloaked after the animation delay
|
||||
plane = CLOAKED_PLANE
|
||||
|
||||
/atom/movable/proc/uncloak()
|
||||
if(!cloaked)
|
||||
@@ -566,7 +567,7 @@
|
||||
sleep(length+5)
|
||||
|
||||
//Remove those
|
||||
filters -= filters[our_filter]
|
||||
filters -= filter(type="wave", x = 0, y = 16, size = 8, offset = 1, flags = WAVE_SIDEWAYS)
|
||||
|
||||
//Back to original alpha
|
||||
alpha = initial_alpha
|
||||
@@ -590,7 +591,7 @@
|
||||
sleep(length+5)
|
||||
|
||||
//Remove those
|
||||
filters -= filters[our_filter]
|
||||
filters -= filter(type="wave", x=0, y = 16, size = 0, offset = 0, flags = WAVE_SIDEWAYS)
|
||||
|
||||
|
||||
// So cloaked things can see themselves, if necessary
|
||||
|
||||
@@ -789,7 +789,7 @@
|
||||
if(shock(user, 100))
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = "<HEAD><TITLE>Suit Cycler Interface</TITLE></HEAD>"
|
||||
|
||||
@@ -798,7 +798,7 @@
|
||||
|
||||
else if(locked)
|
||||
dat += "<br><font color='red'><B>The [model_text ? "[model_text] " : ""]suit cycler is currently locked. Please contact your system administrator.</b></font>"
|
||||
if(allowed(usr))
|
||||
if(allowed(user))
|
||||
dat += "<br><a href='?src=\ref[src];toggle_lock=1'>\[unlock unit\]</a>"
|
||||
else
|
||||
dat += "<h1>Suit cycler</h1>"
|
||||
@@ -972,7 +972,7 @@
|
||||
occupant.loc = get_turf(occupant)
|
||||
occupant = null
|
||||
|
||||
add_fingerprint(usr)
|
||||
add_fingerprint(user)
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -152,10 +152,10 @@
|
||||
if(T.type == flooring.build_type)
|
||||
return
|
||||
var/obj/item/weapon/W = user.is_holding_item_of_type(/obj/item/weapon)
|
||||
if(!istype(W))
|
||||
return
|
||||
if(!try_deconstruct_tile(W, user))
|
||||
return
|
||||
if(flooring)
|
||||
return
|
||||
if(!istype(W))
|
||||
return
|
||||
attackby(T, user)
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
/mob/new_player/New()
|
||||
mob_list += src
|
||||
initialized = TRUE // Explicitly don't use Initialize(). New players join super early and use New()
|
||||
|
||||
/mob/new_player/verb/new_player_panel()
|
||||
set src = usr
|
||||
|
||||
@@ -194,6 +194,8 @@
|
||||
b_skin = blue
|
||||
|
||||
/datum/preferences/proc/dress_preview_mob(var/mob/living/carbon/human/mannequin)
|
||||
if(!mannequin.dna) // Special handling for preview icons before SSAtoms has initailized.
|
||||
mannequin.dna = new /datum/dna(null)
|
||||
copy_to(mannequin, TRUE)
|
||||
|
||||
if(!equip_preview_mob)
|
||||
|
||||
@@ -674,8 +674,9 @@
|
||||
|
||||
if(talkative)
|
||||
new_item.talking_atom = new(new_item)
|
||||
LAZYSET(new_item.origin_tech, TECH_ARCANE, 1)
|
||||
LAZYSET(new_item.origin_tech, TECH_PRECURSOR, 1)
|
||||
LAZYINITLIST(new_item.origin_tech)
|
||||
new_item.origin_tech[TECH_ARCANE] += 1
|
||||
new_item.origin_tech[TECH_PRECURSOR] += 1
|
||||
|
||||
var/turf/simulated/mineral/T = get_turf(new_item)
|
||||
if(istype(T))
|
||||
@@ -685,5 +686,6 @@
|
||||
|
||||
else if(talkative)
|
||||
src.talking_atom = new(src)
|
||||
LAZYSET(new_item.origin_tech, TECH_ARCANE, 1)
|
||||
LAZYSET(new_item.origin_tech, TECH_PRECURSOR, 1)
|
||||
LAZYINITLIST(origin_tech)
|
||||
origin_tech[TECH_ARCANE] += 1
|
||||
origin_tech[TECH_PRECURSOR] += 1
|
||||
|
||||
Reference in New Issue
Block a user