mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
[MIRROR] Size Changing Apparel Adjusments & Runtime fixes (#10053)
Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f4b5f18698
commit
b76d4d7c12
@@ -214,6 +214,8 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/telecomms/proc/checkheat()
|
/obj/machinery/telecomms/proc/checkheat()
|
||||||
|
if(QDELETED(src))
|
||||||
|
return
|
||||||
// Checks heat from the environment and applies any integrity damage
|
// Checks heat from the environment and applies any integrity damage
|
||||||
var/datum/gas_mixture/environment = loc.return_air()
|
var/datum/gas_mixture/environment = loc.return_air()
|
||||||
var/damage_chance = 0 // Percent based chance of applying 1 integrity damage this tick
|
var/damage_chance = 0 // Percent based chance of applying 1 integrity damage this tick
|
||||||
|
|||||||
@@ -18,6 +18,10 @@
|
|||||||
drop_sound = 'sound/items/drop/device.ogg'
|
drop_sound = 'sound/items/drop/device.ogg'
|
||||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||||
|
|
||||||
|
/obj/item/circuitboard/Destroy()
|
||||||
|
QDEL_NULL(board_type)
|
||||||
|
return ..()
|
||||||
|
|
||||||
//Called when the circuitboard is used to contruct a new machine.
|
//Called when the circuitboard is used to contruct a new machine.
|
||||||
/obj/item/circuitboard/proc/construct(var/obj/machinery/M)
|
/obj/item/circuitboard/proc/construct(var/obj/machinery/M)
|
||||||
if(istype(M, build_path))
|
if(istype(M, build_path))
|
||||||
|
|||||||
@@ -78,9 +78,9 @@
|
|||||||
|
|
||||||
var/new_size
|
var/new_size
|
||||||
if(H.has_large_resize_bounds())
|
if(H.has_large_resize_bounds())
|
||||||
new_size = tgui_input_number(H, "Put the desired size (25-200%), or (1-600%) in dormitory areas.", "Set Size", H.size_multiplier * 100, RESIZE_MAXIMUM_DORMS * 100, RESIZE_MINIMUM_DORMS * 100)
|
new_size = tgui_input_number(H, "Put the desired size ([RESIZE_MINIMUM * 100]-[RESIZE_MAXIMUM * 100]%), or ([RESIZE_MINIMUM_DORMS * 100]-[RESIZE_MAXIMUM_DORMS * 100]%) in dormitory areas.", "Set Size", H.size_multiplier * 100, RESIZE_MAXIMUM_DORMS * 100, RESIZE_MINIMUM_DORMS * 100)
|
||||||
else
|
else
|
||||||
new_size = tgui_input_number(H, "Put the desired size (25-200%), or (1-600%) in dormitory areas.", "Set Size", H.size_multiplier * 100, RESIZE_MAXIMUM * 100, RESIZE_MINIMUM * 100)
|
new_size = tgui_input_number(H, "Put the desired size ([RESIZE_MINIMUM * 100]-[RESIZE_MAXIMUM * 100]%), or ([RESIZE_MINIMUM_DORMS * 100]-[RESIZE_MAXIMUM_DORMS * 100]%) in dormitory areas.", "Set Size", H.size_multiplier * 100, RESIZE_MAXIMUM * 100, RESIZE_MINIMUM * 100)
|
||||||
if(!new_size)
|
if(!new_size)
|
||||||
return //cancelled
|
return //cancelled
|
||||||
|
|
||||||
@@ -102,14 +102,11 @@
|
|||||||
to_chat(H,span_notice("The safety features of the uniform prevent you from choosing this size."))
|
to_chat(H,span_notice("The safety features of the uniform prevent you from choosing this size."))
|
||||||
return
|
return
|
||||||
|
|
||||||
else if(new_size)
|
if(new_size != H.size_multiplier)
|
||||||
if(new_size != H.size_multiplier)
|
if(!original_size)
|
||||||
if(!original_size)
|
original_size = H.size_multiplier
|
||||||
original_size = H.size_multiplier
|
H.resize(new_size/100, uncapped = H.has_large_resize_bounds(), ignore_prefs = TRUE) // Ignores prefs because you can only resize yourself
|
||||||
H.resize(new_size/100, uncapped = H.has_large_resize_bounds(), ignore_prefs = TRUE) // Ignores prefs because you can only resize yourself
|
H.visible_message(span_warning("The space around [H] distorts as they change size!"),span_notice("The space around you distorts as you change size!"))
|
||||||
H.visible_message(span_warning("The space around [H] distorts as they change size!"),span_notice("The space around you distorts as you change size!"))
|
|
||||||
else //They chose their current size.
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/clothing/under/hyperfiber/bluespace/mob_can_unequip(mob/M, slot, disable_warning = 0)
|
/obj/item/clothing/under/hyperfiber/bluespace/mob_can_unequip(mob/M, slot, disable_warning = 0)
|
||||||
. = ..()
|
. = ..()
|
||||||
@@ -227,7 +224,12 @@
|
|||||||
to_chat(H, span_warning("You must be WEARING the bracelet and have it uncovered to change your size."))
|
to_chat(H, span_warning("You must be WEARING the bracelet and have it uncovered to change your size."))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/new_size = tgui_input_number(user, "Put the desired size you wish to be while wearing the bracelet ([RESIZE_MINIMUM*100]-[RESIZE_MAXIMUM*100]%).", "Set Size", H.size_multiplier*100, RESIZE_MAXIMUM*100, RESIZE_MINIMUM*100)
|
var/new_size
|
||||||
|
if(H.has_large_resize_bounds())
|
||||||
|
new_size = tgui_input_number(H, "Put the desired size ([RESIZE_MINIMUM * 100]-[RESIZE_MAXIMUM * 100]%), or ([RESIZE_MINIMUM_DORMS * 100]-[RESIZE_MAXIMUM_DORMS * 100]%) in dormitory areas.", "Set Size", H.size_multiplier * 100, RESIZE_MAXIMUM_DORMS * 100, RESIZE_MINIMUM_DORMS * 100)
|
||||||
|
else
|
||||||
|
new_size = tgui_input_number(H, "Put the desired size ([RESIZE_MINIMUM * 100]-[RESIZE_MAXIMUM * 100]%), or ([RESIZE_MINIMUM_DORMS * 100]-[RESIZE_MAXIMUM_DORMS * 100]%) in dormitory areas.", "Set Size", H.size_multiplier * 100, RESIZE_MAXIMUM * 100, RESIZE_MINIMUM * 100)
|
||||||
|
|
||||||
if(!new_size)
|
if(!new_size)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -245,16 +247,13 @@
|
|||||||
H.update_icons() //Just want the matrix transform
|
H.update_icons() //Just want the matrix transform
|
||||||
return
|
return
|
||||||
|
|
||||||
if(new_size)
|
if(new_size != H.size_multiplier)
|
||||||
if(new_size != H.size_multiplier)
|
if(!original_size)
|
||||||
if(!original_size)
|
original_size = H.size_multiplier
|
||||||
original_size = H.size_multiplier
|
H.resize(new_size/100, ignore_prefs = TRUE) // Ignores prefs because you can only resize yourself
|
||||||
H.resize(new_size/100, ignore_prefs = TRUE) // Ignores prefs because you can only resize yourself
|
H.visible_message(span_notice("The space around [H] distorts as they change size!"), span_notice("The space around you distorts as you change size!"))
|
||||||
H.visible_message(span_notice("The space around [H] distorts as they change size!"), span_notice("The space around you distorts as you change size!"))
|
target_size = new_size/100
|
||||||
target_size = new_size/100
|
last_activated = world.time
|
||||||
last_activated = world.time
|
|
||||||
else //They chose their current size.
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
//Same as Nanotrasen Security Uniforms
|
//Same as Nanotrasen Security Uniforms
|
||||||
|
|||||||
@@ -336,6 +336,9 @@
|
|||||||
if(isnum(angle))
|
if(isnum(angle))
|
||||||
setAngle(angle)
|
setAngle(angle)
|
||||||
starting = get_turf(src)
|
starting = get_turf(src)
|
||||||
|
if(!starting)
|
||||||
|
qdel(src)
|
||||||
|
return
|
||||||
if(isnull(Angle)) //Try to resolve through offsets if there's no angle set.
|
if(isnull(Angle)) //Try to resolve through offsets if there's no angle set.
|
||||||
if(isnull(xo) || isnull(yo))
|
if(isnull(xo) || isnull(yo))
|
||||||
stack_trace("WARNING: Projectile [type] deleted due to being unable to resolve a target after angle was null!")
|
stack_trace("WARNING: Projectile [type] deleted due to being unable to resolve a target after angle was null!")
|
||||||
|
|||||||
Reference in New Issue
Block a user