experimental filter

This commit is contained in:
kevinz000
2019-12-15 00:34:12 -07:00
parent 297c909b76
commit 600017f4e1
2 changed files with 10 additions and 31 deletions
+3 -30
View File
@@ -10,12 +10,10 @@
highest.equip(mannequin, TRUE, preference_source = prefs)
if(length(equipment_by_slot))
LAZYINITLIST(spawned)
for(var/slot in equipment_by_slot)
var/obj/item/I = new equipment_by_slot[slot]
mannequin.equip_to_slot_if_possible(I, slot, TRUE, TRUE, TRUE, TRUE)
if(length(inhand_equipment))
LAZYINITLIST(spawned)
for(var/path in inhand_equipment)
var/obj/item/I = new path
mannequin.equip_to_slot_if_possible(I, SLOT_IN_HANDS, TRUE, TRUE, TRUE, TRUE)
@@ -34,40 +32,15 @@
return I
//Errors go to user.
/proc/generate_custom_holoform_from_prefs_safe(datum/preferences/prefs, list/equipment_by_slot, list/inhand_equipment, mob/user, copy_job_first = FALSE)
/proc/generate_custom_holoform_from_prefs_safe(datum/preferences/prefs, mob/user)
if(user)
if(user.prefs.last_custom_holoform < world.time + CUSTOM_HOLOFORM_DELAY)
return
if(length(equipment_by_slot))
for(var/slot in equipment_by_slot)
var/path = equipment_by_slot[slot]
if(!ispath(path, /obj/item))
equipment_by_slot -= slot
to_chat(user, "<span class='boldwarning'>[path] is not a valid path and has been removed.</span>")
continue
else
var/obj/item/I = path
if(!initial(I.allow_virtual_spawn))
equipment_by_slot -= slot
to_chat(user, "<span class='boldwarning'>[path] is not an allowed path and has been removed.</span>")
continue
if(length(inhand_equipment))
for(var/path in inhand_equipment)
if(!ispath(path, /obj/item))
inhand_equipment -= path
to_chat(user, "<span class='boldwarning'>[path] is not a valid path and has been removed.</span>")
continue
else
var/obj/item/I = path
if(!initial(I.allow_virtual_spawn))
inhand_equipment -= slot
to_chat(user, "<span class='boldwarning'>[path] is not an allowed path and has been removed.</span>")
continue
return generate_custom_holoform_from_prefs(prefs, equipment_by_slot, inhand_equipment, copy_job_first)
return generate_custom_holoform_from_prefs(prefs, null, null, TRUE)
//Prompts this client for custom holoform parameters.
/proc/user_interface_custom_holoform(client/C)
var/datum/preferences/target_prefs = C.prefs
ASSERT(target_prefs)
//In the future, maybe add custom path allowances a la admin create outfit but for now..
return generate_custom_holoform_from_prefs_safe(target_prefs, null, null, C.mob, TRUE)
return generate_custom_holoform_from_prefs_safe(target_prefs, C.mob)
+7 -1
View File
@@ -939,7 +939,7 @@ world
I.pixel_y++
add_overlay(I)//And finally add the overlay.
/proc/getHologramIcon(icon/A, safety=1)//If safety is on, a new icon is not created.
/proc/getHologramIcon(icon/A, safety = TRUE)//If safety is on, a new icon is not created.
var/icon/flat_icon = safety ? A : new(A)//Has to be a new icon to not constantly change the same icon.
flat_icon.ColorTone(rgb(125,180,225))//Let's make it bluish.
flat_icon.ChangeOpacity(0.5)//Make it half transparent.
@@ -947,6 +947,12 @@ world
flat_icon.AddAlphaMask(alpha_mask)//Finally, let's mix in a distortion effect.
return flat_icon
/proc/getPAIHologramIcon(icon/A, safety = TRUE)
var/icon/flat_icon = safety? A : new(A)
flat_icon.ColorTone(rgb(0, 102, 0))
flat_icon.ChangeOpacity(0.8)
return flat_icon
//What the mob looks like as animated static
//By vg's ComicIronic
/proc/getStaticIcon(icon/A, safety = TRUE)