mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
some dozens lines about PDA/update_overlays and cryopods/MMIs.
This commit is contained in:
@@ -499,7 +499,6 @@
|
||||
gib2.pixel_x = round(cos(world.time * 3))
|
||||
. += gib2
|
||||
. += gib1
|
||||
. += "cover-on"
|
||||
else if(occupant)
|
||||
var/image/occupant_overlay
|
||||
var/completion = (flesh_number - unattached_flesh.len) / flesh_number
|
||||
@@ -520,7 +519,7 @@
|
||||
occupant_overlay.pixel_x = round(sin(world.time * 3))
|
||||
|
||||
. += occupant_overlay
|
||||
. += "cover-on"
|
||||
. += "cover-on"
|
||||
. += "panel"
|
||||
|
||||
/*
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Reference in New Issue
Block a user