mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-22 12:46:40 +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:
@@ -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