From ffbc1603fdf8f43cdc808505be70617677115843 Mon Sep 17 00:00:00 2001 From: VerySoft Date: Fri, 23 Sep 2022 17:49:30 -0400 Subject: [PATCH 1/4] TOOL! --- code/game/objects/micro_event.dm | 55 ++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 code/game/objects/micro_event.dm diff --git a/code/game/objects/micro_event.dm b/code/game/objects/micro_event.dm new file mode 100644 index 00000000000..888bc370902 --- /dev/null +++ b/code/game/objects/micro_event.dm @@ -0,0 +1,55 @@ +/obj/structure/portal_event/resize + name = "portal" + desc = "It leads to someplace else!" + icon = 'icons/obj/stationobjs_vr.dmi' + icon_state = "type-d-portal" + var/shrinking = TRUE + var/size_limit = 0.5 + +/obj/structure/portal_event/resize/attack_ghost(var/mob/observer/dead/user) + if(!target && user?.client?.holder) + if(tgui_alert(user, "Would you like to adjust the portal's size settings?", "Change portal size settings", list("No","Yes")) == "Yes") + var/our_message + if(tgui_alert(user, "Should this portal shrink people who are over the limit, or grow people who are under the limit?", "Change portal size settings", list("Shrink","Grow")) == "Shrink") + shrinking = TRUE + our_message = "What should the size limit be? Anyone over this limit will be shrunk to this size. (1 = 100%, etc)" + else + shrinking = FALSE + our_message = "What should the size limit be? Anyone under this limit will be grown to this size. (1 = 100%, etc)" + + size_limit = tgui_input_number(user, our_message, "Pick a Size", 1) + + return ..() + +/obj/structure/portal_event/resize/teleport(atom/movable/M as mob|obj) + if(!isliving(M)) + return ..() + var/mob/living/ourmob = M + if(shrinking) + if(ourmob.size_multiplier > size_limit) + ourmob.resize(size_limit, FALSE, TRUE, TRUE) + else + if(ourmob.size_multiplier < size_limit) + ourmob.resize(size_limit, FALSE, TRUE, TRUE) + + return ..() + +/obj/structure/portal_event/resize/preset_shrink_twentyfive + shrinking = TRUE + size_limit = 0.25 + +/obj/structure/portal_event/resize/preset_shrink_fifty + shrinking = TRUE + size_limit = 0.5 + +/obj/structure/portal_event/resize/preset_shrink_hundred + shrinking = TRUE + size_limit = 1 + +/obj/structure/portal_event/resize/preset_grow_hundred + shrinking = FALSE + size_limit = 1 + +/obj/structure/portal_event/resize/preset_grow_twohundred + shrinking = FALSE + size_limit = 2 From 2b79dc5d2625f39dd1e23204f063f891e9c1f3cc Mon Sep 17 00:00:00 2001 From: VerySoft Date: Fri, 23 Sep 2022 19:03:23 -0400 Subject: [PATCH 2/4] yeah door yeah --- code/game/objects/micro_event.dm | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/code/game/objects/micro_event.dm b/code/game/objects/micro_event.dm index 888bc370902..9aaae9bd652 100644 --- a/code/game/objects/micro_event.dm +++ b/code/game/objects/micro_event.dm @@ -53,3 +53,48 @@ /obj/structure/portal_event/resize/preset_grow_twohundred shrinking = FALSE size_limit = 2 + +///// TIMER DOOR ///// + +/obj/structure/timer_door + name = "door" + desc = "It's a door with no apparent control mechanism! It opens on a timer!" + icon = 'icons/obj/doors/Dooralien.dmi' + icon_state = "door_locked" + opacity = TRUE + density = TRUE + anchored = TRUE + + var/start_time + var/time_til_open = 5 MINUTES + +/obj/structure/timer_door/examine(mob/user, infix, suffix) + . = ..() + + var/ourtime = (((start_time + time_til_open) - world.time) * 0.1) + + . += "It will open in [ourtime] seconds!" + +/obj/structure/timer_door/Initialize() + START_PROCESSING(SSobj, src) + + start_time = world.time + +/obj/structure/timer_door/Destroy() + STOP_PROCESSING(SSobj, src) + visible_message("\The [src] opens up!") + playsound(src, 'sound/effects/bang.ogg', 75, 1) + return ..() + +/obj/structure/timer_door/process() + if(start_time + time_til_open < world.time) + qdel(src) + +/obj/structure/timer_door/ten + time_til_open = 10 MINUTES + +/obj/structure/timer_door/fifteen + time_til_open = 15 MINUTES + +/obj/structure/timer_door/twenty + time_til_open = 20 MINUTES From 9943eeaee5f7381ebab7211c42998dcccc85db26 Mon Sep 17 00:00:00 2001 From: VerySoft Date: Fri, 23 Sep 2022 19:11:58 -0400 Subject: [PATCH 3/4] dis important --- vorestation.dme | 1 + 1 file changed, 1 insertion(+) diff --git a/vorestation.dme b/vorestation.dme index 472deb4597c..2600a8d4b21 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1081,6 +1081,7 @@ #include "code\game\objects\explosion_recursive.dm" #include "code\game\objects\items.dm" #include "code\game\objects\items_vr.dm" +#include "code\game\objects\micro_event.dm" #include "code\game\objects\micro_structures.dm" #include "code\game\objects\mob_spawner_vr.dm" #include "code\game\objects\objs.dm" From c774000d732caf5859b1cb77a0aea55cfeadb152 Mon Sep 17 00:00:00 2001 From: VerySoft Date: Fri, 23 Sep 2022 19:41:56 -0400 Subject: [PATCH 4/4] a last tweak --- code/game/objects/micro_event.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/game/objects/micro_event.dm b/code/game/objects/micro_event.dm index 9aaae9bd652..f798d9b6aad 100644 --- a/code/game/objects/micro_event.dm +++ b/code/game/objects/micro_event.dm @@ -71,9 +71,8 @@ /obj/structure/timer_door/examine(mob/user, infix, suffix) . = ..() - var/ourtime = (((start_time + time_til_open) - world.time) * 0.1) - - . += "It will open in [ourtime] seconds!" + var/ourtime = (((start_time + time_til_open) - world.time) / 600) + . += "It will open in [ourtime] minutes!" /obj/structure/timer_door/Initialize() START_PROCESSING(SSobj, src)