diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 670efa929e..83b0c0ee2d 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -18,7 +18,7 @@ if(!charging) return - . += image(charging.icon, charging.icon_state) + . += mutable_appearance(charging.icon, charging.icon_state) . += "ccharger-on" if(!(stat & (BROKEN|NOPOWER))) var/newlevel = round(charging.percent() * 4 / 100) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index b42b5cf41f..426e68c17b 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -491,29 +491,29 @@ /obj/machinery/clonepod/update_overlays() . = ..() if(mess) - var/image/gib1 = image(CRYOMOBS, "gibup") - var/image/gib2 = image(CRYOMOBS, "gibdown") + var/mutable_appearance/gib1 = mutable_appearance(CRYOMOBS, "gibup") + var/mutable_appearance/gib2 = mutable_appearance(CRYOMOBS, "gibdown") gib1.pixel_y = 27 + round(sin(world.time) * 3) gib1.pixel_x = round(sin(world.time * 3)) gib2.pixel_y = 27 + round(cos(world.time) * 3) gib2.pixel_x = round(cos(world.time * 3)) . += gib2 . += gib1 - . += "cover-on" else if(occupant) - var/image/occupant_overlay + var/mutable_appearance/occupant_overlay var/completion = (flesh_number - unattached_flesh.len) / flesh_number if(unattached_flesh.len <= 0) - occupant_overlay = image(occupant.icon, occupant.icon_state) + occupant_overlay = mutable_appearance(occupant.icon, occupant.icon_state) occupant_overlay.copy_overlays(occupant) + . += "cover-on" else - occupant_overlay = image(CRYOMOBS, "clone_meat") + occupant_overlay = mutable_appearance(CRYOMOBS, "clone_meat") var/matrix/tform = matrix() tform.Scale(completion) tform.Turn(cos(world.time * 2) * 3) occupant_overlay.transform = tform - occupant_overlay.appearance_flags = 0 + occupant_overlay.appearance_flags = NONE occupant_overlay.dir = SOUTH occupant_overlay.pixel_y = 27 + round(sin(world.time) * 3) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 92927d047d..118145ed88 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -287,6 +287,7 @@ #define CRYO_PRESERVE 1 #define CRYO_OBJECTIVE 2 #define CRYO_IGNORE 3 +#define CRYO_DESTROY_LATER 4 /obj/machinery/cryopod/proc/should_preserve_item(obj/item/I) for(var/datum/objective_item/steal/T in control_computer.theft_cache) @@ -308,8 +309,8 @@ if(iscyborg(mob_occupant)) var/mob/living/silicon/robot/R = mob_occupant if(R.mmi?.brain) - cryo_items[R.mmi] = CRYO_IGNORE - cryo_items[R.mmi.brain] = CRYO_IGNORE + cryo_items[R.mmi] = CRYO_DESTROY_LATER + cryo_items[R.mmi.brain] = CRYO_DESTROY_LATER for(var/obj/item/I in R.module) // the tools the borg has; metal, glass, guns etc for(var/obj/item/O in I) // the things inside the tools, if anything; mainly for janiborg trash bags cryo_items[O] = should_preserve_item(O) @@ -318,7 +319,7 @@ //Drop all items into the pod. for(var/obj/item/I in mob_occupant) - if(cryo_items[I] == CRYO_IGNORE) + if(cryo_items[I] == CRYO_IGNORE || cryo_items[I] ==CRYO_DESTROY_LATER) continue cryo_items[I] = should_preserve_item(I) mob_occupant.transferItemToLoc(I, src, TRUE) @@ -334,17 +335,19 @@ if(QDELETED(I)) //edge cases and DROPDEL. continue var/preserve = cryo_items[I] - if(preserve == CRYO_IGNORE) + if(preserve == CRYO_DESTROY_LATER) continue - else if(preserve == CRYO_DESTROY) - qdel(I) - else if(control_computer?.allow_items) - control_computer.frozen_items += I - if(preserve == CRYO_OBJECTIVE) - control_computer.objective_items += I - I.moveToNullspace() - else - I.forceMove(loc) + if(preserve != CRYO_IGNORE) + if(preserve == CRYO_DESTROY) + qdel(I) + else if(control_computer?.allow_items) + control_computer.frozen_items += I + if(preserve == CRYO_OBJECTIVE) + control_computer.objective_items += I + I.moveToNullspace() + else + I.forceMove(loc) + cryo_items -= I //Update any existing objectives involving this mob. for(var/datum/objective/O in GLOB.objectives) @@ -405,6 +408,10 @@ mob_occupant.ghostize(FALSE, penalize = TRUE) QDEL_NULL(occupant) + for(var/I in cryo_items) //only "CRYO_DESTROY_LATER" atoms are left) + var/atom/A = I + if(!QDELETED(A)) + qdel(A) open_machine() name = initial(name) @@ -412,6 +419,7 @@ #undef CRYO_PRESERVE #undef CRYO_OBJECTIVE #undef CRYO_IGNORE +#undef CRYO_DESTROY_LATER /obj/machinery/cryopod/MouseDrop_T(mob/living/target, mob/user) if(!istype(target) || user.incapacitated() || !target.Adjacent(user) || !Adjacent(user) || !ismob(target) || (!ishuman(user) && !iscyborg(user)) || !istype(user.loc, /turf) || target.buckled) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 9adc93a4da..2b76a925e8 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -9,7 +9,6 @@ GLOBAL_LIST_EMPTY(PDAs) #define PDA_SCANNER_HALOGEN 4 #define PDA_SCANNER_GAS 5 #define PDA_SPAM_DELAY 2 MINUTES -#define PDA_STANDARD_OVERLAYS list("pda-r", "blank", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay") //pda icon overlays list defines #define PDA_OVERLAY_ALERT 1 @@ -33,14 +32,14 @@ GLOBAL_LIST_EMPTY(PDAs) armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) resistance_flags = FIRE_PROOF | ACID_PROOF - //Main variables var/owner = null // String name of owner var/default_cartridge = 0 // Access level defined by cartridge var/obj/item/cartridge/cartridge = null //current cartridge var/mode = 0 //Controls what menu the PDA will display. 0 is hub; the rest are either built in or based on cartridge. var/list/overlays_icons = list('icons/obj/pda_alt.dmi' = list("pda-r", "screen_default", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay")) - var/current_overlays = PDA_STANDARD_OVERLAYS + var/static/list/standard_overlays_icons = list("pda-r", "blank", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay") + var/list/current_overlays //set on Initialize. //variables exclusively used on 'update_overlays' (which should never be called directly, and 'update_icon' doesn't use args anyway) var/new_overlays = FALSE @@ -164,7 +163,7 @@ GLOBAL_LIST_EMPTY(PDAs) overlays_x_offset = new_offsets[1] overlays_y_offset = new_offsets[2] if(!(icon in overlays_icons)) - current_overlays = PDA_STANDARD_OVERLAYS + current_overlays = standard_overlays_icons return current_overlays = overlays_icons[icon] @@ -228,8 +227,11 @@ GLOBAL_LIST_EMPTY(PDAs) if(new_overlays) set_new_overlays() . += new_alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN] - var/mutable_appearance/overlay = new() + var/screen_state = new_alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN] + var/mutable_appearance/overlay = mutable_appearance(icon, screen_state) overlay.pixel_x = overlays_x_offset + overlay.pixel_y = overlays_y_offset + . += overlay if(id) overlay.icon_state = current_overlays[PDA_OVERLAY_ID] . += new /mutable_appearance(overlay) @@ -1223,7 +1225,6 @@ GLOBAL_LIST_EMPTY(PDAs) #undef PDA_SCANNER_HALOGEN #undef PDA_SCANNER_GAS #undef PDA_SPAM_DELAY -#undef PDA_STANDARD_OVERLAYS #undef PDA_OVERLAY_ALERT #undef PDA_OVERLAY_SCREEN diff --git a/code/game/objects/items/devices/PDA/PDA_types.dm b/code/game/objects/items/devices/PDA/PDA_types.dm index b604bec258..23ebaec3c2 100644 --- a/code/game/objects/items/devices/PDA/PDA_types.dm +++ b/code/game/objects/items/devices/PDA/PDA_types.dm @@ -193,8 +193,6 @@ /obj/item/pda/curator name = "curator PDA" icon_state = "pda-library" - overlays_icons = list('icons/obj/pda.dmi' = list("pda-r-library","blank","id_overlay","insert_overlay", "light_overlay", "pai_overlay"), - 'icons/obj/pda_alt.dmi' = list("pda-r","screen_default","id_overlay","insert_overlay", "light_overlay", "pai_overlay")) current_overlays = list("pda-r-library","blank","id_overlay","insert_overlay", "light_overlay", "pai_overlay") default_cartridge = /obj/item/cartridge/curator inserted_item = /obj/item/pen/fountain diff --git a/icons/obj/pda.dmi b/icons/obj/pda.dmi index 7d184c6459..8992f4a4a1 100644 Binary files a/icons/obj/pda.dmi and b/icons/obj/pda.dmi differ