From f89fdc044dc4b3af60ab9e1a41489df54352d704 Mon Sep 17 00:00:00 2001 From: cuddleandtea <105150564+cuddleandtea@users.noreply.github.com> Date: Tue, 16 Apr 2024 08:14:14 +0300 Subject: [PATCH] lightmaker --- code/modules/buildmode/submodes/lightmaker.dm | 31 ++++++++++++++++++ icons/misc/buildmode.dmi | Bin 3319 -> 3492 bytes shiptest.dme | 1 + 3 files changed, 32 insertions(+) create mode 100644 code/modules/buildmode/submodes/lightmaker.dm diff --git a/code/modules/buildmode/submodes/lightmaker.dm b/code/modules/buildmode/submodes/lightmaker.dm new file mode 100644 index 000000000000..97a7276e8742 --- /dev/null +++ b/code/modules/buildmode/submodes/lightmaker.dm @@ -0,0 +1,31 @@ +/datum/buildmode_mode/lightmaker + key = "lightmaker" + + var/light_range = 3 + var/light_power = 1 + var/light_color = COLOR_WHITE + +/datum/buildmode_mode/lightmaker/show_help(client/target_client) + to_chat(target_client, span_purple(examine_block( + "[span_bold("Left Click")] -> Create light\n\ + [span_bold("Right Click")] -> Delete light\n\ + [span_bold("Right Click on Build Mode Button")] -> Change light properties")) + ) + +/datum/buildmode_mode/lightmaker/change_settings(client/target_client) + var/choice = alert("Change the new light range, power or color?", "Light Maker", "Range", "Power", "Color", "Cancel") + switch(choice) + if("Range") + light_range = input(target_client, "Range of light", text("Input")) as num|null + if("Power") + light_power = input(target_client, "Power of light", text("Input")) as num|null + if("Color") + light_color = input(target_client, "Light color", text("Input")) as color|null + +/datum/buildmode_mode/lightmaker/handle_click(client/target_client, params, obj/object) + var/list/modifiers = params2list(params) + + if(LAZYACCESS(modifiers, LEFT_CLICK)) + object.set_light(light_range, light_power, light_color) + if(LAZYACCESS(modifiers, RIGHT_CLICK)) + object.set_light(0,0,0, COLOR_WHITE) diff --git a/icons/misc/buildmode.dmi b/icons/misc/buildmode.dmi index 3a73559091b2edeccd687eaf7f23812f0173595a..44698597b02cf83f38a5ea27baa6df2dc418e6c4 100644 GIT binary patch delta 2928 zcmV-$3y<{o8KfJ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79fad8 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -1846,6 +1846,7 @@ #include "code\modules\buildmode\submodes\basic.dm" #include "code\modules\buildmode\submodes\boom.dm" #include "code\modules\buildmode\submodes\copy.dm" +#include "code\modules\buildmode\submodes\lightmaker.dm" #include "code\modules\buildmode\submodes\delete.dm" #include "code\modules\buildmode\submodes\fill.dm" #include "code\modules\buildmode\submodes\map_export.dm"