mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Merge remote-tracking branch 'upstream/master' into instruments
This commit is contained in:
@@ -201,4 +201,37 @@
|
||||
icon_state = "memorizer"
|
||||
item_state = "nullrod"
|
||||
|
||||
/obj/item/device/flash/armimplant
|
||||
name = "photon projector"
|
||||
desc = "A high-powered photon projector implant normally used for lighting purposes, but also doubles as a flashbulb weapon. Self-repair protocals fix the flashbulb if it ever burns out."
|
||||
var/flashcd = 20
|
||||
var/overheat = 0
|
||||
var/obj/item/organ/internal/cyberimp/arm/flash/I = null
|
||||
|
||||
/obj/item/device/flash/armimplant/Destroy()
|
||||
I = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/flash/armimplant/burn_out()
|
||||
if(I && I.owner)
|
||||
to_chat(I.owner, "<span class='warning'>Your photon projector implant overheats and deactivates!</span>")
|
||||
I.Retract()
|
||||
overheat = FALSE
|
||||
addtimer(src, "cooldown", flashcd * 2)
|
||||
|
||||
/obj/item/device/flash/armimplant/try_use_flash(mob/user = null)
|
||||
if(overheat)
|
||||
if(I && I.owner)
|
||||
to_chat(I.owner, "<span class='warning'>Your photon projector is running too hot to be used again so quickly!</span>")
|
||||
return FALSE
|
||||
overheat = TRUE
|
||||
addtimer(src, "cooldown", flashcd)
|
||||
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
|
||||
update_icon(1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/flash/armimplant/proc/cooldown()
|
||||
overheat = FALSE
|
||||
|
||||
|
||||
/obj/item/device/flash/synthetic //just a regular flash now
|
||||
|
||||
@@ -247,6 +247,13 @@ var/global/list/default_medbay_channels = list(
|
||||
A.name = from
|
||||
A.role = role
|
||||
A.message = message
|
||||
var/jammed = FALSE
|
||||
for(var/obj/item/device/jammer/jammer in active_jammers)
|
||||
if(get_dist(get_turf(src), get_turf(jammer)) < jammer.range)
|
||||
jammed = TRUE
|
||||
break
|
||||
if(jammed)
|
||||
message = Gibberish(message, 100)
|
||||
Broadcast_Message(connection, A,
|
||||
0, "*garbled automated announcement*", src,
|
||||
message, from, "Automated Announcement", from, "synthesized voice",
|
||||
@@ -332,6 +339,12 @@ var/global/list/default_medbay_channels = list(
|
||||
var/datum/radio_frequency/connection = message_mode
|
||||
var/turf/position = get_turf(src)
|
||||
|
||||
var/jammed = FALSE
|
||||
for(var/obj/item/device/jammer/jammer in active_jammers)
|
||||
if(get_dist(position, get_turf(jammer)) < jammer.range)
|
||||
jammed = TRUE
|
||||
break
|
||||
|
||||
//#### Tagging the signal with all appropriate identity values ####//
|
||||
|
||||
// ||-- The mob's name identity --||
|
||||
@@ -345,6 +358,9 @@ var/global/list/default_medbay_channels = list(
|
||||
|
||||
var/jobname // the mob's "job"
|
||||
|
||||
if(jammed)
|
||||
message = Gibberish(message, 100)
|
||||
|
||||
// --- Human: use their actual job ---
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
@@ -146,3 +146,22 @@ effective or pretty fucking useless.
|
||||
attack_self(usr)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/item/device/jammer
|
||||
name = "radio jammer"
|
||||
desc = "Device used to disrupt nearby radio communication."
|
||||
icon_state = "jammer"
|
||||
var/active = FALSE
|
||||
var/range = 12
|
||||
|
||||
/obj/item/device/jammer/Destroy()
|
||||
active_jammers -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/device/jammer/attack_self(mob/user)
|
||||
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] the [src].</span>")
|
||||
active = !active
|
||||
if(active)
|
||||
active_jammers |= src
|
||||
else
|
||||
active_jammers -= src
|
||||
Reference in New Issue
Block a user