mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-29 23:16:21 +01:00
Merge branch 'master' of https://github.com/VOREStation/Polaris into aro-sync-05-25-2018
# Conflicts: # code/__defines/misc.dm # code/controllers/master_controller.dm # code/game/machinery/computer3/computers/card.dm # code/game/objects/items/devices/communicator/UI.dm # code/game/objects/items/stacks/medical.dm # code/game/objects/structures/signs.dm # code/modules/admin/admin_verbs.dm # code/modules/client/client defines.dm # code/modules/client/client procs.dm # code/modules/clothing/clothing.dm # code/modules/clothing/under/accessories/holster.dm # code/modules/events/radiation_storm.dm # code/modules/mining/machine_processing.dm # code/modules/mob/living/carbon/human/species/station/prometheans.dm # code/modules/mob/living/living.dm # code/modules/mob/living/simple_animal/animals/bear.dm # code/modules/mob/living/simple_animal/animals/cat.dm # code/modules/mob/living/simple_animal/animals/parrot.dm # code/modules/mob/mob.dm # code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm # code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm # code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm # code/modules/reagents/reagent_dispenser.dm # config/example/config.txt # html/changelogs/.all_changelog.yml # interface/skin.dmf # maps/southern_cross/southern_cross-1.dmm # vorestation.dme
This commit is contained in:
@@ -653,8 +653,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "pda.tmpl", title, 520, 400, state = inventory_state)
|
||||
// add templates for screens in common with communicator.
|
||||
ui.add_template("atmosphericScan", "atmospheric_scan.tmpl")
|
||||
// when the ui is first opened this is the data it will use
|
||||
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
@@ -893,7 +894,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
if("Toggle Door")
|
||||
if(cartridge && cartridge.access_remote_door)
|
||||
for(var/obj/machinery/door/blast/M in world)
|
||||
for(var/obj/machinery/door/blast/M in machines)
|
||||
if(M.id == cartridge.remote_door_id)
|
||||
if(M.density)
|
||||
M.open()
|
||||
@@ -1247,19 +1248,24 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(issilicon(usr))
|
||||
return
|
||||
|
||||
if(can_use(usr) && !isnull(cartridge))
|
||||
cartridge.forceMove(get_turf(src))
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.put_in_hands(cartridge)
|
||||
mode = 0
|
||||
scanmode = 0
|
||||
if (cartridge.radio)
|
||||
cartridge.radio.hostpda = null
|
||||
to_chat(usr, "<span class='notice'>You remove \the [cartridge] from the [name].</span>")
|
||||
cartridge = null
|
||||
else
|
||||
if(!can_use(usr))
|
||||
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
|
||||
return
|
||||
|
||||
if(isnull(cartridge))
|
||||
to_chat(usr, "<span class='notice'>There's no cartridge to eject.</span>")
|
||||
return
|
||||
|
||||
cartridge.forceMove(get_turf(src))
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.put_in_hands(cartridge)
|
||||
mode = 0
|
||||
scanmode = 0
|
||||
if (cartridge.radio)
|
||||
cartridge.radio.hostpda = null
|
||||
to_chat(usr, "<span class='notice'>You remove \the [cartridge] from the [name].</span>")
|
||||
cartridge = null
|
||||
|
||||
/obj/item/device/pda/proc/id_check(mob/user as mob, choice as num)//To check for IDs; 1 for in-pda use, 2 for out of pda use.
|
||||
if(choice == 1)
|
||||
|
||||
@@ -468,7 +468,7 @@ var/list/civilian_cartridges = list(
|
||||
else
|
||||
JaniData["user_loc"] = list("x" = 0, "y" = 0)
|
||||
var/MopData[0]
|
||||
for(var/obj/item/weapon/mop/M in world)
|
||||
for(var/obj/item/weapon/mop/M in all_mops)
|
||||
var/turf/ml = get_turf(M)
|
||||
if(ml)
|
||||
if(ml.z != cl.z)
|
||||
@@ -481,7 +481,7 @@ var/list/civilian_cartridges = list(
|
||||
|
||||
|
||||
var/BucketData[0]
|
||||
for(var/obj/structure/mopbucket/B in world)
|
||||
for(var/obj/structure/mopbucket/B in all_mopbuckets)
|
||||
var/turf/bl = get_turf(B)
|
||||
if(bl)
|
||||
if(bl.z != cl.z)
|
||||
@@ -493,7 +493,7 @@ var/list/civilian_cartridges = list(
|
||||
BucketData[++BucketData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
|
||||
|
||||
var/CbotData[0]
|
||||
for(var/mob/living/bot/cleanbot/B in world)
|
||||
for(var/mob/living/bot/cleanbot/B in mob_list)
|
||||
var/turf/bl = get_turf(B)
|
||||
if(bl)
|
||||
if(bl.z != cl.z)
|
||||
@@ -505,7 +505,7 @@ var/list/civilian_cartridges = list(
|
||||
if(!CbotData.len)
|
||||
CbotData[++CbotData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
|
||||
var/CartData[0]
|
||||
for(var/obj/structure/janitorialcart/B in world)
|
||||
for(var/obj/structure/janitorialcart/B in all_janitorial_carts)
|
||||
var/turf/bl = get_turf(B)
|
||||
if(bl)
|
||||
if(bl.z != cl.z)
|
||||
|
||||
@@ -118,6 +118,8 @@
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "communicator.tmpl", "Communicator", 475, 700, state = key_state)
|
||||
// add templates for screens in common with communicator.
|
||||
ui.add_template("atmosphericScan", "atmospheric_scan.tmpl")
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
|
||||
@@ -0,0 +1,219 @@
|
||||
/obj/item/device/laser_pointer
|
||||
name = "laser pointer"
|
||||
desc = "Don't shine it in your eyes!"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "pointer"
|
||||
item_state = "pen"
|
||||
var/pointer_icon_state
|
||||
slot_flags = SLOT_BELT
|
||||
matter = list("glass" = 500,"metal" = 500)
|
||||
w_class = 2 //Increased to 2, because diodes are w_class 2. Conservation of matter.
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_COMBAT = 1)
|
||||
var/turf/pointer_loc
|
||||
var/energy = 8
|
||||
var/max_energy = 8
|
||||
var/effectchance = 20
|
||||
var/cooldown = 10
|
||||
var/last_used_time = 0
|
||||
var/recharging = 0
|
||||
var/recharge_locked = 0
|
||||
var/obj/item/weapon/stock_parts/micro_laser/diode //used for upgrading!
|
||||
|
||||
|
||||
/obj/item/device/laser_pointer/red
|
||||
pointer_icon_state = "red_laser"
|
||||
/obj/item/device/laser_pointer/green
|
||||
pointer_icon_state = "green_laser"
|
||||
/obj/item/device/laser_pointer/blue
|
||||
pointer_icon_state = "blue_laser"
|
||||
/obj/item/device/laser_pointer/purple
|
||||
pointer_icon_state = "purple_laser"
|
||||
|
||||
/obj/item/device/laser_pointer/New()
|
||||
..()
|
||||
diode = new(src)
|
||||
if(!pointer_icon_state)
|
||||
pointer_icon_state = pick("red_laser","green_laser","blue_laser","purple_laser")
|
||||
|
||||
/obj/item/device/laser_pointer/upgraded/New()
|
||||
..()
|
||||
diode = new /obj/item/weapon/stock_parts/micro_laser/ultra
|
||||
|
||||
|
||||
|
||||
/obj/item/device/laser_pointer/attack(mob/living/M, mob/user)
|
||||
laser_act(M, user)
|
||||
|
||||
/obj/item/device/laser_pointer/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/stock_parts/micro_laser))
|
||||
if(!diode)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
diode = W
|
||||
to_chat(user, "<span class='notice'>You install a [diode.name] in [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] already has a diode.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(diode)
|
||||
to_chat(user, "<span class='notice'>You remove the [diode.name] from the [src].</span>")
|
||||
diode.loc = get_turf(src.loc)
|
||||
diode = null
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/device/laser_pointer/afterattack(var/atom/target, var/mob/living/user, flag, params)
|
||||
if(flag) //we're placing the object on a table or in backpack
|
||||
return
|
||||
laser_act(target, user)
|
||||
|
||||
/obj/item/device/laser_pointer/proc/laser_act(var/atom/target, var/mob/living/user)
|
||||
if(!(user in (viewers(world.view,target))))
|
||||
return
|
||||
if(!(world.time - last_used_time >= cooldown))
|
||||
return
|
||||
if (!diode)
|
||||
to_chat(user, "<span class='notice'>You point [src] at [target], but nothing happens!</span>")
|
||||
return
|
||||
if (!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
//nothing happens if the battery is drained
|
||||
if(recharge_locked)
|
||||
to_chat(user, "<span class='notice'>You point [src] at [target], but it's still charging.</span>")
|
||||
return
|
||||
|
||||
var/outmsg
|
||||
var/turf/targloc = get_turf(target)
|
||||
|
||||
//human/alien mobs
|
||||
if(iscarbon(target))
|
||||
if(user.zone_sel.selecting == "eyes")
|
||||
var/mob/living/carbon/C = target
|
||||
|
||||
//20% chance to actually hit the eyes
|
||||
|
||||
if(prob(effectchance * diode.rating))
|
||||
add_attack_logs(user,C,"Tried blinding using [src]")
|
||||
|
||||
//eye target check, will return -1 to 2
|
||||
var/eye_prot = C.eyecheck()
|
||||
if(C.blinded)
|
||||
eye_prot = 4
|
||||
var/severity = (rand(0, 1) + diode.rating - eye_prot)
|
||||
var/mob/living/carbon/human/H = C
|
||||
var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES]
|
||||
if(!E)
|
||||
outmsg = "<span class='notice'>You shine [src] at [C], but they don't seem to have eyes.</span>"
|
||||
return
|
||||
|
||||
outmsg = "<span class='notice'>You shine [src] into [C]'s eyes.</span>"
|
||||
switch(severity)
|
||||
if(0)
|
||||
//rank 1 diode with basic eye protection (like sunglasses), or rank 2 with industrial protection (like welding goggles)
|
||||
to_chat(C, "<span class='info'>A small, bright dot appears in your vision.</span>")
|
||||
if(1)
|
||||
//rank 1 with no protection, rank 2 with basic protection, or rank 3 with industrial protection
|
||||
to_chat(C, "<span class='notice'>Something bright flashes in the corner of your vision.</span>")
|
||||
if(2)
|
||||
//rank 1 or 2 with no protection, rank 2 or 3 with basic protection, or rank 3 with industrial protection
|
||||
//alternatively, rank 1 with minor vulnerability (like night vision goggles)
|
||||
flick("flash", C.flash_eyes())
|
||||
to_chat(C, "<span class='danger'>A bright light shines across your eyes!</span>")
|
||||
if(3)
|
||||
//rank 1 with minor vulnerability, rank 2 or 3 with no protection, or rank 3 with basic protection
|
||||
if(prob(3 * diode.rating))
|
||||
C.Weaken(1)
|
||||
flick("flash", C.flash_eyes())
|
||||
E.damage += 1
|
||||
to_chat(C, "<span class='danger'>A bright light briefly blinds you!</span>")
|
||||
if(4)
|
||||
//rank 3 with no protection, or rank 2 with minor vulnerability
|
||||
if(prob(5 * diode.rating))
|
||||
C.Weaken(1)
|
||||
flick("e_flash", C.flash_eyes())
|
||||
E.damage += 2
|
||||
to_chat(C, "<span class='danger'>A blinding light burns your eyes!</span>")
|
||||
else
|
||||
outmsg = "<span class='notice'>You shine the [src] at [C], but miss their eyes.</span>"
|
||||
|
||||
//robots and AI
|
||||
else if(issilicon(target))
|
||||
var/mob/living/silicon/S = target
|
||||
//20% chance to actually hit the sensors
|
||||
if(prob(effectchance * diode.rating))
|
||||
flick("flash", S.flash_eyes(affect_silicon = TRUE))
|
||||
if (prob(3 * diode.rating))
|
||||
S.Weaken(1)
|
||||
to_chat(S, "<span class='warning'>Your sensors were blinded by a laser!</span>")
|
||||
outmsg = "<span class='notice'>You blind [S] by shining [src] at their sensors.</span>"
|
||||
add_attack_logs(user,S,"Tried disabling using [src]")
|
||||
else
|
||||
outmsg = "<span class='notice'>You shine the [src] at [S], but miss their sensors.</span>"
|
||||
|
||||
//cameras
|
||||
else if(istype(target, /obj/machinery/camera))
|
||||
var/obj/machinery/camera/C = target
|
||||
if(prob(effectchance * diode.rating))
|
||||
C.emp_act(4 - diode.rating)
|
||||
outmsg = "<span class='notice'>You shine the [src] into the lens of [C].</span>"
|
||||
add_attack_logs(user,C.name,"Tried disabling using [src]")
|
||||
else
|
||||
outmsg = "<span class='info'>You missed the lens of [C] with [src].</span>"
|
||||
|
||||
//cats!
|
||||
for(var/mob/living/simple_animal/cat/C in viewers(1,targloc))
|
||||
if (!(C.stat || C.buckled))
|
||||
if(prob(50) && !(C.client))
|
||||
C.visible_message("<span class='warning'>[C] pounces on the light!</span>", "<span class='warning'>You pounce on the light!</span>")
|
||||
step_towards(C, targloc)
|
||||
C.lay_down()
|
||||
spawn(10)
|
||||
C.lay_down()
|
||||
else
|
||||
C.set_dir(get_dir(C,targloc))
|
||||
C.visible_message("<span class='notice'>[C] watches the light.</span>", "<span class='notice'>Your attention is drawn to the mysterious glowing dot.</span>")
|
||||
|
||||
|
||||
//laser pointer image
|
||||
icon_state = "pointer_[pointer_icon_state]"
|
||||
var/list/showto = list()
|
||||
for(var/mob/M in viewers(world.view,targloc))
|
||||
if(M.client)
|
||||
showto.Add(M.client)
|
||||
var/image/I = image('icons/obj/projectiles.dmi',targloc,pointer_icon_state,cooldown)
|
||||
I.plane = PLANE_LIGHTING_ABOVE
|
||||
I.pixel_x = target.pixel_x + rand(-5,5)
|
||||
I.pixel_y = target.pixel_y + rand(-5,5)
|
||||
|
||||
if(outmsg)
|
||||
user.visible_message("<span class='info'>[user] points [src] at [target].</span>", outmsg)
|
||||
else
|
||||
user.visible_message("<span class='info'>[user] points [src] at [target].</span>", "<span class='info'>You point [src] at [target].</span>")
|
||||
|
||||
last_used_time = world.time
|
||||
energy -= 1
|
||||
if(energy <= max_energy)
|
||||
if(!recharging)
|
||||
recharging = 1
|
||||
processing_objects.Add(src)
|
||||
if(energy <= 0)
|
||||
to_chat(user, "<span class='warning'>You've overused the battery of [src], now it needs time to recharge!</span>")
|
||||
recharge_locked = 1
|
||||
|
||||
flick_overlay(I, showto, cooldown)
|
||||
spawn(cooldown)
|
||||
icon_state = "pointer"
|
||||
|
||||
/obj/item/device/laser_pointer/process()
|
||||
if(prob(20 - recharge_locked*5))
|
||||
energy += 1
|
||||
if(energy >= max_energy)
|
||||
energy = max_energy
|
||||
recharging = 0
|
||||
recharge_locked = 0
|
||||
..()
|
||||
@@ -1,167 +0,0 @@
|
||||
/obj/item/device/laser_pointer
|
||||
name = "laser pointer"
|
||||
desc = "Don't shine it in your eyes!"
|
||||
icon = 'icons/obj/device_alt.dmi'
|
||||
icon_state = "pointer"
|
||||
item_state = "pen"
|
||||
var/pointer_icon_state
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 500)
|
||||
w_class = ITEMSIZE_SMALL
|
||||
origin_tech = list(TECH_COMBAT = 1, TECH_MAGNET = 2)
|
||||
var/energy = 5
|
||||
var/max_energy = 5
|
||||
var/effectchance = 33
|
||||
var/recharging = 0
|
||||
var/recharge_locked = 0
|
||||
var/obj/item/weapon/stock_parts/micro_laser/diode //used for upgrading!
|
||||
|
||||
/obj/item/device/laser_pointer/red
|
||||
pointer_icon_state = "red_laser"
|
||||
/obj/item/device/laser_pointer/green
|
||||
pointer_icon_state = "green_laser"
|
||||
/obj/item/device/laser_pointer/blue
|
||||
pointer_icon_state = "blue_laser"
|
||||
/obj/item/device/laser_pointer/purple
|
||||
pointer_icon_state = "purple_laser"
|
||||
|
||||
/obj/item/device/laser_pointer/New()
|
||||
..()
|
||||
diode = new(src)
|
||||
if(!pointer_icon_state)
|
||||
pointer_icon_state = pick("red_laser","green_laser","blue_laser","purple_laser")
|
||||
|
||||
/obj/item/device/laser_pointer/upgraded/New()
|
||||
..()
|
||||
diode = new /obj/item/weapon/stock_parts/micro_laser/ultra
|
||||
|
||||
/obj/item/device/laser_pointer/Destroy()
|
||||
qdel_null(diode)
|
||||
processing_objects -= src
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/laser_pointer/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/stock_parts/micro_laser))
|
||||
if(!diode)
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
diode = W
|
||||
to_chat(user, "<span class='notice'>You install \a [diode] in [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>\The [src] already has a diode installed.</span>")
|
||||
|
||||
else if(isscrewdriver(W))
|
||||
if(diode)
|
||||
to_chat(user, "<span class='notice'>You remove \the [diode] from \the [src].</span>")
|
||||
diode.forceMove(drop_location())
|
||||
diode = null
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/device/laser_pointer/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
laser_act(target, user, click_parameters)
|
||||
|
||||
/obj/item/device/laser_pointer/proc/laser_act(atom/target, mob/living/user, click_parameters)
|
||||
if( !(user in (viewers(world.view, target))) )
|
||||
return
|
||||
if (!diode)
|
||||
to_chat(user, "<span class='notice'>You point \the [src] at \the [target], but nothing happens!</span>")
|
||||
return
|
||||
if (!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(HULK in H.mutations)
|
||||
to_chat(user, "<span class='warning'>Your fingers can't press the button!</span>")
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
//nothing happens if the battery is drained
|
||||
if(recharge_locked)
|
||||
to_chat(user, "<span class='notice'>You point \the [src] at \the [target], but it's still charging.</span>")
|
||||
return
|
||||
|
||||
var/outmsg
|
||||
var/turf/targloc = get_turf(target)
|
||||
|
||||
//human/alien mobs
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
if(user.zone_sel.selecting == O_EYES)
|
||||
add_attack_logs(user, C, "shone [src] in the eyes")
|
||||
|
||||
var/severity = 1
|
||||
if(prob(33))
|
||||
severity = 2
|
||||
else if(prob(50))
|
||||
severity = 0
|
||||
|
||||
//20% chance to actually hit the eyes
|
||||
if(prob(effectchance * diode.rating) && C.flash_eyes(severity))
|
||||
outmsg = "<span class='notice'>You blind [C] by shining [src] in their eyes.</span>"
|
||||
else
|
||||
outmsg = "<span class='warning'>You fail to blind [C] by shining [src] at their eyes!</span>"
|
||||
|
||||
//cameras
|
||||
else if(istype(target, /obj/machinery/camera))
|
||||
var/obj/machinery/camera/C = target
|
||||
if(prob(effectchance * diode.rating))
|
||||
C.emp_act(1)
|
||||
outmsg = "<span class='notice'>You hit the lens of [C] with [src], temporarily disabling the camera!</span>"
|
||||
add_attack_logs(user, C, "EMPed with [src]")
|
||||
else
|
||||
outmsg = "<span class='warning'>You miss the lens of [C] with [src]!</span>"
|
||||
|
||||
//cats!
|
||||
for(var/mob/living/simple_animal/cat/C in view(1, targloc))
|
||||
if(prob(50))
|
||||
C.visible_message("<span class='notice'>[C] pounces on the light!</span>", "<span class='warning'>LIGHT!</span>")
|
||||
C.Move(targloc)
|
||||
C.resting = TRUE
|
||||
C.update_canmove()
|
||||
else
|
||||
C.visible_message("<span class='notice'>[C] looks uninterested in your games.</span>", "<span class='warning'>You spot [user] shining [src] at you. How insulting!</span>")
|
||||
|
||||
//laser pointer image
|
||||
icon_state = "pointer_[pointer_icon_state]"
|
||||
var/image/I = image('icons/obj/projectiles_vr.dmi', targloc, pointer_icon_state)
|
||||
I.plane = ABOVE_PLANE
|
||||
var/list/click_params = params2list(click_parameters)
|
||||
if(click_params)
|
||||
if(click_params["icon-x"])
|
||||
I.pixel_x = (text2num(click_params["icon-x"]) - 16)
|
||||
if(click_params["icon-y"])
|
||||
I.pixel_y = (text2num(click_params["icon-y"]) - 16)
|
||||
else
|
||||
I.pixel_x = target.pixel_x + rand(-5,5)
|
||||
I.pixel_y = target.pixel_y + rand(-5,5)
|
||||
|
||||
if(outmsg)
|
||||
to_chat(user, outmsg)
|
||||
else
|
||||
to_chat(user, "<span class='info'>You point [src] at [target].</span>")
|
||||
|
||||
energy -= 1
|
||||
if(energy <= max_energy)
|
||||
if(!recharging)
|
||||
recharging = 1
|
||||
processing_objects.Add(src)
|
||||
if(energy <= 0)
|
||||
to_chat(user, "<span class='warning'>[src]'s battery is overused, it needs time to recharge!</span>")
|
||||
recharge_locked = TRUE
|
||||
|
||||
flick_overlay_view(I, targloc, 1 SECOND)
|
||||
sleep(1 SECOND)
|
||||
icon_state = "pointer"
|
||||
|
||||
/obj/item/device/laser_pointer/process()
|
||||
if(prob(20 - recharge_locked*5))
|
||||
energy += 1
|
||||
if(energy >= max_energy)
|
||||
energy = max_energy
|
||||
recharging = 0
|
||||
recharge_locked = FALSE
|
||||
..()
|
||||
@@ -1,3 +1,5 @@
|
||||
GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
|
||||
|
||||
/obj/item/device/paicard
|
||||
name = "personal AI device"
|
||||
icon = 'icons/obj/pda.dmi'
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
var/code = "electronic"
|
||||
origin_tech = list(TECH_BLUESPACE = 1)
|
||||
|
||||
GLOBAL_LIST_BOILERPLATE(all_beacons, /obj/item/device/radio/beacon)
|
||||
|
||||
/obj/item/device/radio/beacon/hear_talk()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user