mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 17:52:36 +00:00
Re-adds the clown's PDA virus honking (#71035)
## About The Pull Request Re-adds the Clown's virus disk's ability to make machines, airlocks, and computers honk, which was removed in the transition from PDA to modular computer. Fun fact: This was broken for a long time, I had fixed it in https://github.com/tgstation/tgstation/pull/64443 before it got accidentally wiped off the face of the earth. To anyone who isn't aware: - Clown's virus disk has 5 charges - You can use these charges to install viruses in computers, airlocks, and machines if they're screwed open (computers dont need to) - This will make them honk when used. - You can get charges back by slipping people with the PDA while the virus disk is installed in it (which it is by default) - The max charges you can get at once is 5. ## Why It's Good For The Game A feature that was lost in the PDA to modular computer transition, now re-added. It's a cool feature and I personally would use it if I played bad jobs. Things actually working is a 🛩️ ## Changelog 🆑 fix: Clown PDA virus disk can once again be installed in machines, computers, and airlocks. /🆑
This commit is contained in:
@@ -67,6 +67,34 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/modular_computer/tablet/pre_attack(atom/target, mob/living/user, params)
|
||||
if(!inserted_disk || !ismachinery(target))
|
||||
return ..()
|
||||
|
||||
var/obj/machinery/target_machine = target
|
||||
if(!target_machine.panel_open && !istype(target, /obj/machinery/computer))
|
||||
return ..()
|
||||
|
||||
if(!istype(inserted_disk, /obj/item/computer_disk/virus/clown))
|
||||
return ..()
|
||||
var/obj/item/computer_disk/virus/clown/installed_cartridge = inserted_disk
|
||||
if(!installed_cartridge.charges)
|
||||
to_chat(user, span_notice("Out of virus charges."))
|
||||
return ..()
|
||||
|
||||
to_chat(user, span_notice("You upload the virus to [target]!"))
|
||||
var/sig_list = list(COMSIG_ATOM_ATTACK_HAND)
|
||||
if(istype(target,/obj/machinery/door/airlock))
|
||||
sig_list = list(COMSIG_AIRLOCK_OPEN, COMSIG_AIRLOCK_CLOSE)
|
||||
|
||||
installed_cartridge.charges--
|
||||
target.AddComponent(
|
||||
/datum/component/sound_player, \
|
||||
uses = rand(15,20), \
|
||||
signal_list = sig_list, \
|
||||
)
|
||||
return TRUE
|
||||
|
||||
/obj/item/modular_computer/tablet/interact(mob/user)
|
||||
. = ..()
|
||||
if(HAS_TRAIT(src, TRAIT_PDA_MESSAGE_MENU_RIGGED))
|
||||
|
||||
Reference in New Issue
Block a user