mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-22 16:12:19 +00:00
Laser pointer fixes (#11590)
* Laser pointer fixes * Adds \the to some laser pointer stuff
This commit is contained in:
@@ -40,6 +40,7 @@
|
|||||||
|
|
||||||
/obj/item/device/laser_pointer/attack(mob/living/M, mob/user)
|
/obj/item/device/laser_pointer/attack(mob/living/M, mob/user)
|
||||||
laser_act(M, user)
|
laser_act(M, user)
|
||||||
|
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||||
|
|
||||||
/obj/item/device/laser_pointer/attackby(obj/item/W, mob/user)
|
/obj/item/device/laser_pointer/attackby(obj/item/W, mob/user)
|
||||||
if(istype(W, /obj/item/stock_parts/micro_laser))
|
if(istype(W, /obj/item/stock_parts/micro_laser))
|
||||||
@@ -64,12 +65,13 @@
|
|||||||
if(flag) //we're placing the object on a table or in backpack
|
if(flag) //we're placing the object on a table or in backpack
|
||||||
return
|
return
|
||||||
laser_act(target, user)
|
laser_act(target, user)
|
||||||
|
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||||
|
|
||||||
/obj/item/device/laser_pointer/proc/laser_act(var/atom/target, var/mob/living/user)
|
/obj/item/device/laser_pointer/proc/laser_act(var/atom/target, var/mob/living/user)
|
||||||
if( !(user in (viewers(7,target))) )
|
if( !(user in (viewers(7,target))) )
|
||||||
return
|
return
|
||||||
if (!diode)
|
if (!diode)
|
||||||
to_chat(user, "<span class='notice'>You point [src] at [target], but nothing happens!</span>")
|
to_chat(user, "<span class='notice'>You point \the [src] at \the [target], but nothing happens!</span>")
|
||||||
return
|
return
|
||||||
if (!user.IsAdvancedToolUser())
|
if (!user.IsAdvancedToolUser())
|
||||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||||
@@ -78,7 +80,8 @@
|
|||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
|
|
||||||
|
|
||||||
var/outmsg
|
var/selfmsg
|
||||||
|
var/othermsg
|
||||||
var/turf/targloc = get_turf(target)
|
var/turf/targloc = get_turf(target)
|
||||||
|
|
||||||
if(istype(target, /obj/machinery/camera))
|
if(istype(target, /obj/machinery/camera))
|
||||||
@@ -86,21 +89,24 @@
|
|||||||
|
|
||||||
if(prob(25))
|
if(prob(25))
|
||||||
C.emp_act(28)
|
C.emp_act(28)
|
||||||
outmsg = "<span class='notice'>You hit the lens of [C] with [src], temporarily disabling the camera!</span>"
|
selfmsg = "<span class='notice'>You hit the lens of \the [C] with \the [src], temporarily disabling the camera!</span>"
|
||||||
|
|
||||||
admin_attack_log(user, src,"hits the camera with a laser pointer", "EMPd a camera with a laser pointer")
|
admin_attack_log(user, src,"hits the camera with a laser pointer", "EMPd a camera with a laser pointer")
|
||||||
|
|
||||||
else
|
else
|
||||||
outmsg = "<span class='notice'>You fail to hit the lens of [C] with [src].</span>"
|
selfmsg = "<span class='notice'>You fail to hit the lens of \the [C] with \the [src].</span>"
|
||||||
|
othermsg = "<b>[user]</b> shines \the [src] at \the [C]."
|
||||||
|
|
||||||
if(iscarbon(target))
|
if(iscarbon(target))
|
||||||
if(user.zone_sel.selecting == BP_EYES)
|
if(user.zone_sel.selecting == BP_EYES)
|
||||||
var/mob/living/carbon/C = target
|
var/mob/living/carbon/C = target
|
||||||
if(C.eyecheck() <= 0 && prob(30))
|
if(C.eyecheck() <= 0 && prob(30))
|
||||||
outmsg = "<span class='notice'>You blind [C] with [src]</span>"
|
selfmsg = "<span class='notice'>You blind \the [C] with \the [src].</span>"
|
||||||
|
othermsg = "<b>[user]</b> shines \the [src] at \the [C]'s eyes'."
|
||||||
C.eye_blind = 3
|
C.eye_blind = 3
|
||||||
else
|
else
|
||||||
outmsg = "<span class='notice'>You fail to blind [C] with [src]</span>"
|
selfmsg = "<span class='notice'>You fail to blind \the [C] with \the [src].</span>"
|
||||||
|
othermsg = "<b>[user]</b> fails to blind \the [C] with \the [src]."
|
||||||
|
|
||||||
//laser pointer image
|
//laser pointer image
|
||||||
icon_state = "pointer_[pointer_icon_state]"
|
icon_state = "pointer_[pointer_icon_state]"
|
||||||
@@ -112,13 +118,13 @@
|
|||||||
I.pixel_x = target.pixel_x + rand(-5,5)
|
I.pixel_x = target.pixel_x + rand(-5,5)
|
||||||
I.pixel_y = target.pixel_y + rand(-5,5)
|
I.pixel_y = target.pixel_y + rand(-5,5)
|
||||||
|
|
||||||
if(outmsg)
|
if(selfmsg)
|
||||||
to_chat(user, outmsg)
|
user.visible_message(othermsg, selfmsg)
|
||||||
else
|
else
|
||||||
to_chat(user, "<span class='notice'>You point [src] at [target].</span>")
|
user.visible_message("<b>[user]</b> points \the [src] at \the [target].", "<span class='notice'>You point \the [src] at \the [target].</span>")
|
||||||
|
|
||||||
|
|
||||||
flick_overlay(I, showto, 10)
|
flick_overlay(I, showto, 15)
|
||||||
icon_state = "pointer"
|
icon_state = "pointer"
|
||||||
|
|
||||||
/obj/item/device/laser_pointer/Destroy()
|
/obj/item/device/laser_pointer/Destroy()
|
||||||
|
|||||||
41
html/changelogs/LaserPointersAgain.yml
Normal file
41
html/changelogs/LaserPointersAgain.yml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
################################
|
||||||
|
# Example Changelog File
|
||||||
|
#
|
||||||
|
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||||
|
#
|
||||||
|
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||||
|
# When it is, any changes listed below will disappear.
|
||||||
|
#
|
||||||
|
# Valid Prefixes:
|
||||||
|
# bugfix
|
||||||
|
# wip (For works in progress)
|
||||||
|
# tweak
|
||||||
|
# soundadd
|
||||||
|
# sounddel
|
||||||
|
# rscadd (general adding of nice things)
|
||||||
|
# rscdel (general deleting of nice things)
|
||||||
|
# imageadd
|
||||||
|
# imagedel
|
||||||
|
# maptweak
|
||||||
|
# spellcheck (typo fixes)
|
||||||
|
# experiment
|
||||||
|
# balance
|
||||||
|
# admin
|
||||||
|
# backend
|
||||||
|
# security
|
||||||
|
# refactor
|
||||||
|
#################################
|
||||||
|
|
||||||
|
# Your name.
|
||||||
|
author: TheGreyWolf
|
||||||
|
|
||||||
|
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||||
|
delete-after: True
|
||||||
|
|
||||||
|
# Any changes you've made. See valid prefix list above.
|
||||||
|
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||||
|
# SCREW THIS UP AND IT WON'T WORK.
|
||||||
|
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||||
|
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||||
|
changes:
|
||||||
|
- bugfix: "Laser pointers now show chat messages when pointed at things and have a click delay."
|
||||||
Reference in New Issue
Block a user