mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Refactors screen objects to /atom/movable (#24068)
* introduce helper + remove unused proc * we love compatibility * Update code/_onclick/hud/action_button.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/_onclick/hud/action_button.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/_onclick/hud/alert.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/_onclick/hud/blob_overmind.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/_onclick/hud/blob_overmind.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/_onclick/hud/blob_overmind.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/martial_arts/martial.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/mining/lavaland/loot/tendril_loot.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/mob/living/carbon/human/species/shadow.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/mob/living/carbon/human/species/shadow.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/mob/living/living_update_status.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/_onclick/hud/screen_objects.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/_onclick/hud/screen_objects.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/_onclick/hud/screen_objects.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/game/objects/items/weapons/storage/internal.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/game/machinery/computer/camera_advanced.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/game/machinery/computer/camera_advanced.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/game/objects/items/weapons/storage/internal.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/game/mecha/mecha.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * deconflict --------- Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
@@ -268,7 +268,7 @@
|
||||
if(!M.restrained() && !M.stat)
|
||||
playsound(loc, "rustle", 50, TRUE, -5)
|
||||
|
||||
if(istype(over_object, /obj/screen/inventory/hand))
|
||||
if(istype(over_object, /atom/movable/screen/inventory/hand))
|
||||
for(var/obj/item/part as anything in mod_parts)
|
||||
if(part.loc != src)
|
||||
to_chat(wearer, "<span class='warning'>Retract parts first!</span>")
|
||||
@@ -657,7 +657,7 @@
|
||||
if(!wearer)
|
||||
return
|
||||
if(!core)
|
||||
wearer.throw_alert("mod_charge", /obj/screen/alert/nocell)
|
||||
wearer.throw_alert("mod_charge", /atom/movable/screen/alert/nocell)
|
||||
return
|
||||
core.update_charge_alert()
|
||||
|
||||
|
||||
@@ -131,20 +131,20 @@
|
||||
/obj/item/mod/core/standard/update_charge_alert()
|
||||
var/obj/item/stock_parts/cell/charge_source = charge_source()
|
||||
if(!charge_source)
|
||||
mod.wearer.throw_alert("mod_charge", /obj/screen/alert/nocell)
|
||||
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/nocell)
|
||||
return
|
||||
var/remaining_cell = charge_amount() / max_charge_amount()
|
||||
switch(remaining_cell)
|
||||
if(0.75 to INFINITY)
|
||||
mod.wearer.clear_alert("mod_charge")
|
||||
if(0.5 to 0.75)
|
||||
mod.wearer.throw_alert("mod_charge", /obj/screen/alert/lowcell, 1)
|
||||
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 1)
|
||||
if(0.25 to 0.5)
|
||||
mod.wearer.throw_alert("mod_charge", /obj/screen/alert/lowcell, 2)
|
||||
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 2)
|
||||
if(0.01 to 0.25)
|
||||
mod.wearer.throw_alert("mod_charge", /obj/screen/alert/lowcell, 3)
|
||||
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 3)
|
||||
else
|
||||
mod.wearer.throw_alert("mod_charge", /obj/screen/alert/emptycell)
|
||||
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/emptycell)
|
||||
|
||||
/obj/item/mod/core/standard/emp_act(severity)
|
||||
cell?.emp_act(severity)
|
||||
@@ -276,13 +276,13 @@
|
||||
if(0.75 to INFINITY)
|
||||
mod.wearer.clear_alert("mod_charge")
|
||||
if(0.5 to 0.75)
|
||||
mod.wearer.throw_alert("mod_charge", /obj/screen/alert/lowcell, 1)
|
||||
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 1)
|
||||
if(0.25 to 0.5)
|
||||
mod.wearer.throw_alert("mod_charge", /obj/screen/alert/lowcell, 2)
|
||||
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 2)
|
||||
if(0.01 to 0.25)
|
||||
mod.wearer.throw_alert("mod_charge", /obj/screen/alert/lowcell, 3)
|
||||
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 3)
|
||||
else
|
||||
mod.wearer.throw_alert("mod_charge", /obj/screen/alert/emptycell)
|
||||
mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/emptycell)
|
||||
|
||||
/obj/item/mod/core/plasma/on_attackby(obj/item/attacking_item, mob/user, params)
|
||||
charge_plasma(attacking_item, user)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/// Overlay we add to each grabbed atom.
|
||||
var/image/kinesis_icon
|
||||
/// Our mouse movement catcher.
|
||||
var/obj/screen/fullscreen/cursor_catcher/kinesis/kinesis_catcher
|
||||
var/atom/movable/screen/fullscreen/cursor_catcher/kinesis/kinesis_catcher
|
||||
/// The sounds playing while we grabbed an object.
|
||||
var/datum/looping_sound/kinesis/soundloop
|
||||
///The pixel_X of whatever we were grabbing before hand.
|
||||
@@ -83,7 +83,7 @@
|
||||
pre_pixel_x = grabbed_atom.pixel_x
|
||||
pre_pixel_y = grabbed_atom.pixel_y
|
||||
beam.chain = beam.Beam(grabbed_atom, icon_state = "kinesis", icon='icons/effects/beam.dmi', time = 100 SECONDS, maxdistance = 15, beam_type = /obj/effect/ebeam, beam_sleep_time = 3)
|
||||
kinesis_catcher = mod.wearer.overlay_fullscreen("kinesis", /obj/screen/fullscreen/cursor_catcher/kinesis, 0)
|
||||
kinesis_catcher = mod.wearer.overlay_fullscreen("kinesis", /atom/movable/screen/fullscreen/cursor_catcher/kinesis, 0)
|
||||
kinesis_catcher.assign_to_mob(mod.wearer)
|
||||
soundloop.start()
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
@@ -249,7 +249,7 @@
|
||||
complexity = 0
|
||||
use_power_cost = DEFAULT_CHARGE_DRAIN * 5
|
||||
|
||||
/obj/screen/fullscreen/cursor_catcher/kinesis
|
||||
/atom/movable/screen/fullscreen/cursor_catcher/kinesis
|
||||
icon = 'icons/mob/screen_kinesis.dmi'
|
||||
icon_state = "kinesis"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user