I See Clearly Now: Laser pointer balance adjustments (#25588)

* Laser pointer fixes: remove felinid forced movement, chat notifications, add limited laser pointer type

* Comment formatting fixes

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>

* Trailing formatting fix

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>

* Modularise

* Make GCF vendor sell limited laserpointers

* Apply suggestions from code review

---------

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
Ephemeralis
2023-12-17 17:23:10 +00:00
committed by GitHub
co-authored by Bloop
parent face0a2d21
commit bc6a4d993b
5 changed files with 50 additions and 10 deletions
@@ -266,12 +266,14 @@
continue
if(target_felinid.body_position == STANDING_UP)
target_felinid.setDir(get_dir(target_felinid, targloc)) // kitty always looks at the light
if(prob(effectchance * diode.rating))
//SKYRAT EDIT REMOVAL BEGIN (removes forced felinid movement from laserpointers, also fixes the longstanding windoor negation glitch)
/* if(prob(effectchance * diode.rating))
target_felinid.visible_message(span_warning("[target_felinid] makes a grab for the light!"), span_userdanger("LIGHT!"))
target_felinid.Move(targloc)
log_combat(user, target_felinid, "moved with a laser pointer", src)
else
target_felinid.visible_message(span_notice("[target_felinid] looks briefly distracted by the light."), span_warning("You're briefly tempted by the shiny light..."))
else
SKYRAT EDIT REMOVAL END */
target_felinid.visible_message(span_notice("[target_felinid] looks briefly distracted by the light."), span_warning("You're briefly tempted by the shiny light...")) //SKYRAT EDIT CHANGE : indent this block if re-enabling above
else
target_felinid.visible_message(span_notice("[target_felinid] stares at the light."), span_warning("You stare at the light..."))
//The pointer is shining, change its sprite to show
@@ -290,9 +292,9 @@
laser.pixel_y = target.pixel_y + rand(-5,5)
if(outmsg)
to_chat(user, outmsg)
user.visible_message(span_danger("[user] points [src] at [target]!"), outmsg) //SKYRAT EDIT CHANGE - ORIGINAL: to_chat(user, outmsg)
else
to_chat(user, span_info("You point [src] at [target]."))
user.visible_message(span_notice("[user] points [src] at [target]."), span_notice("You point [src] at [target].")) //SKYRAT EDIT CHANGE - ORIGINAL: to_chat(user, span_info("You point [src] at [target]."))
//we have successfully shone our pointer, reduce our battery depending on whether we have an extra lens or not
energy -= crystal_lens ? 2 : 1
@@ -0,0 +1,37 @@
/obj/item/laser_pointer
//Whether the laser pointer is capable of receiving upgrades
var/upgradable = TRUE
/obj/item/laser_pointer/limited
//limited laser pointers cannot receive upgrades, mostly used in loadout
upgradable = FALSE
/obj/item/laser_pointer/limited/red
pointer_icon_state = "red_laser"
/obj/item/laser_pointer/limited/green
pointer_icon_state = "green_laser"
/obj/item/laser_pointer/limited/blue
pointer_icon_state = "blue_laser"
/obj/item/laser_pointer/limited/purple
pointer_icon_state = "purple_laser"
/obj/item/laser_pointer/screwdriver_act(mob/living/user, obj/item/tool)
if(!upgradable)
balloon_alert(user, "can't remove integrated diode!")
return
return ..()
/obj/item/laser_pointer/attackby(obj/item/attack_item, mob/user, params)
if(istype(attack_item, /obj/item/stock_parts/micro_laser) || istype(attack_item, /obj/item/stack/ore/bluespace_crystal))
if(!upgradable)
balloon_alert(user, "can't upgrade integrated parts!")
return
return ..()
/obj/item/laser_pointer/examine(mob/user)
. = ..()
if(!upgradable)
. += span_notice("The diode and the lens are both cheap, integrated components. This pointer cannot be upgraded.")
@@ -406,16 +406,16 @@ GLOBAL_LIST_INIT(loadout_toys, generate_loadout_items(/datum/loadout_item/toys))
/datum/loadout_item/toys/red_laser
name = "Red Laser Pointer"
item_path = /obj/item/laser_pointer/red
item_path = /obj/item/laser_pointer/limited/red
/datum/loadout_item/toys/green_laser
name = "Green Laser Pointer"
item_path = /obj/item/laser_pointer/green
item_path = /obj/item/laser_pointer/limited/green
/datum/loadout_item/toys/blue_laser
name = "Blue Laser Pointer"
item_path = /obj/item/laser_pointer/blue
item_path = /obj/item/laser_pointer/limited/blue
/datum/loadout_item/toys/purple_laser
name = "Purple Laser Pointer"
item_path = /obj/item/laser_pointer/purple
item_path = /obj/item/laser_pointer/limited/purple
@@ -5,7 +5,7 @@
"icon" = "hat-wizard",
"products" = list(
/obj/item/storage/briefcase/secure/white/wargame_kit = 3,
/obj/item/laser_pointer = 3,
/obj/item/laser_pointer/limited = 3,
),
),
list(
+1
View File
@@ -6195,6 +6195,7 @@
#include "modular_skyrat\master_files\code\game\objects\items\wiki_manuals.dm"
#include "modular_skyrat\master_files\code\game\objects\items\devices\anomaly_neutralizer.dm"
#include "modular_skyrat\master_files\code\game\objects\items\devices\chameleonproj.dm"
#include "modular_skyrat\master_files\code\game\objects\items\devices\laserpointer.dm"
#include "modular_skyrat\master_files\code\game\objects\items\devices\mod_link.dm"
#include "modular_skyrat\master_files\code\game\objects\items\devices\traitordevices.dm"
#include "modular_skyrat\master_files\code\game\objects\items\stacks\sheets\sheet_types.dm"