mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
[MIRROR] Adds a fake emag emag act (#28317)
* Adds a fake emag emag act * modularizing --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
This commit is contained in:
co-authored by
MrMelbert
SpaceLoveSs13
parent
e4cfd4f0d6
commit
1bebedb328
@@ -9,12 +9,9 @@
|
||||
*/
|
||||
/obj/item/card/emag
|
||||
desc = "It's a card with a magnetic strip attached to some circuitry."
|
||||
// SKYRAT EDIT ADDITION COMMENT: Everyone knows what an emag is, both IC and OOC, they even make toy lookalikes.
|
||||
name = "cryptographic sequencer"
|
||||
icon_state = "emag"
|
||||
item_flags = NO_MAT_REDEMPTION | NOBLUDGEON
|
||||
special_desc_requirement = EXAMINE_CHECK_SYNDICATE // SKYRAT EDIT ADDITION
|
||||
special_desc = "An specially modified ID card used to break machinery and disable safeties. Notoriously used by Syndicate agents." // Skyrat edit
|
||||
slot_flags = ITEM_SLOT_ID
|
||||
worn_icon_state = "emag"
|
||||
var/prox_check = TRUE //If the emag requires you to be in range
|
||||
@@ -37,13 +34,14 @@
|
||||
icon_state = "hack_o_lantern"
|
||||
|
||||
/obj/item/card/emagfake
|
||||
desc = "It's a card with a magnetic strip attached to some circuitry." //SKYRAT EDIT CHANGE
|
||||
name = "cryptographic sequencer"
|
||||
icon_state = "emag"
|
||||
name = /obj/item/card/emag::name
|
||||
desc = /obj/item/card/emag::desc + " Closer inspection shows that this card is a poorly made replica, with a \"Donk Co.\" logo stamped on the back."
|
||||
icon = /obj/item/card/emag::icon
|
||||
icon_state = /obj/item/card/emag::icon_state
|
||||
worn_icon_state = /obj/item/card/emag::worn_icon_state
|
||||
slot_flags = ITEM_SLOT_ID
|
||||
worn_icon_state = "emag"
|
||||
special_desc_requirement = EXAMINE_CHECK_SYNDICATE_TOY // SKYRAT EDIT ADDITION - It's a toy, we're not hiding it.
|
||||
special_desc = "Closer inspection shows that this card is a poorly made replica, with a \"DonkCo\" logo stamped on the back." // SKYRAT EDIT ADDITION
|
||||
/// Whether we are exploding
|
||||
var/exploding = FALSE
|
||||
|
||||
/obj/item/card/emagfake/attack_self(mob/user) //for assistants with balls of plasteel
|
||||
if(Adjacent(user))
|
||||
@@ -51,9 +49,34 @@
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/card/emagfake/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50, TRUE)
|
||||
if(exploding)
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50, TRUE, frequency = 2)
|
||||
else if(obj_flags & EMAGGED)
|
||||
log_bomber(user, "triggered", src, "(rigged/emagged)")
|
||||
visible_message(span_boldwarning("[src] begins to heat up!"))
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 100, TRUE, frequency = 0.25)
|
||||
addtimer(CALLBACK(src, PROC_REF(blow_up)), 1 SECONDS, TIMER_DELETE_ME)
|
||||
exploding = TRUE
|
||||
else
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50, TRUE)
|
||||
return ITEM_INTERACT_SKIP_TO_ATTACK // So it does the attack animation.
|
||||
|
||||
/obj/item/card/emagfake/proc/blow_up()
|
||||
visible_message(span_boldwarning("[src] explodes!"))
|
||||
explosion(src, light_impact_range = 1, explosion_cause = src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/card/emagfake/emag_act(mob/user, obj/item/card/emag/emag_card)
|
||||
if(obj_flags & EMAGGED)
|
||||
return FALSE
|
||||
playsound(src, SFX_SPARKS, 50, TRUE, SILENCED_SOUND_EXTRARANGE)
|
||||
desc = /obj/item/card/emag::desc
|
||||
obj_flags |= EMAGGED
|
||||
if(user)
|
||||
balloon_alert(user, "rigged to blow")
|
||||
log_bomber(user, "rigged to blow", src, "(emagging)")
|
||||
return TRUE
|
||||
|
||||
/obj/item/card/emag/Initialize(mapload)
|
||||
. = ..()
|
||||
type_blacklist = list(typesof(/obj/machinery/door/airlock) + typesof(/obj/machinery/door/window/) + typesof(/obj/machinery/door/firedoor) - typesof(/obj/machinery/door/airlock/tram)) //list of all typepaths that require a specialized emag to hack.
|
||||
@@ -82,11 +105,9 @@
|
||||
* DOORMAG
|
||||
*/
|
||||
/obj/item/card/emag/doorjack
|
||||
desc = "This dated-looking ID card has been obviously and illegally modified with extra circuitry. Resembles the infamous \"emag\"." //SKYRAT EDIT CHANGE
|
||||
desc = "Commonly known as a \"doorjack\", this device is a specialized cryptographic sequencer specifically designed to override station airlock access codes. Uses self-refilling charges to hack airlocks."
|
||||
name = "modified ID card"
|
||||
icon_state = "doorjack"
|
||||
special_desc_requirement = EXAMINE_CHECK_SYNDICATE // SKYRAT EDIT ADDITION
|
||||
special_desc = "Identifies commonly as a \"doorjack\", this illegally modified ID card can disrupt airlock electronics. Has a self recharging cell. Used often by Syndicate agents." // SKYRAT EDIT ADDITION
|
||||
worn_icon_state = "doorjack"
|
||||
var/type_whitelist //List of types
|
||||
var/charges = 3
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// Note: Everyone knows what an emag is, both IC and OOC, they even make toy lookalikes.
|
||||
/obj/item/card/emag
|
||||
special_desc_requirement = EXAMINE_CHECK_SYNDICATE
|
||||
special_desc = "An specially modified ID card used to break machinery and disable safeties. Notoriously used by Syndicate agents."
|
||||
|
||||
// The 'closer inspection' extra desc for these goes in special_desc
|
||||
/obj/item/card/emagfake
|
||||
desc = /obj/item/card/emag::desc
|
||||
special_desc_requirement = EXAMINE_CHECK_SYNDICATE_TOY
|
||||
special_desc = "Closer inspection shows that this card is a poorly made replica, with a \"Donk Co.\" logo stamped on the back."
|
||||
|
||||
/obj/item/card/emag/doorjack
|
||||
desc = "This dated-looking ID card has been obviously and illegally modified with extra circuitry. Resembles the infamous \"emag\"."
|
||||
special_desc_requirement = EXAMINE_CHECK_SYNDICATE
|
||||
special_desc = "Identifies commonly as a \"doorjack\", this illegally modified ID card can disrupt airlock electronics. Has a self recharging cell. Used often by Syndicate agents."
|
||||
@@ -6455,6 +6455,7 @@
|
||||
#include "modular_skyrat\master_files\code\game\objects\items\AI_modules.dm"
|
||||
#include "modular_skyrat\master_files\code\game\objects\items\cards_ids.dm"
|
||||
#include "modular_skyrat\master_files\code\game\objects\items\dyekit.dm"
|
||||
#include "modular_skyrat\master_files\code\game\objects\items\emag.dm"
|
||||
#include "modular_skyrat\master_files\code\game\objects\items\hhmirror.dm"
|
||||
#include "modular_skyrat\master_files\code\game\objects\items\holy_weapons.dm"
|
||||
#include "modular_skyrat\master_files\code\game\objects\items\oxygen_candle.dm"
|
||||
|
||||
Reference in New Issue
Block a user