mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Action Button Update
- Refactors action button backend
- Action buttons are no longer checked on Life(), items are responsible
for adding/removing/updating them.
- Item action buttons are no longer a static action_button_name define,
items define actions_types, which is a list of paths.
- Items can now have multiple action buttons.
- This is handled by new arguments to ui_action_click, the first
parameter is the user, the second is the path of the action datum
that was invoked.
- Refactored how internals function
- You may now directly switch internals without breaking anything.
- The internals icon has been updated to be more consistent.
- Added action buttons for jetpacks
- Added action buttons for oxygen tanks
- Uses-based implants now qdel() themselves when they run out of uses.
This is somewhat a buff to traitor implants, but it's such a minor
change. The actual reasoning is so that the action buttons are properly
removed.
- Fixed a bug with the "Boo" spell which resulted in IsAvailable failing
for certain ghosts.
- You can now shift-click on movable HUD elements to reset them to the
proper position (thank fucking christ)
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
name = "implant"
|
||||
icon = 'icons/obj/implants.dmi'
|
||||
icon_state = "generic" //Shows up as the action button icon
|
||||
action_button_custom_type = /datum/action/item_action/hands_free
|
||||
origin_tech = "materials=2;biotech=3;programming=2"
|
||||
|
||||
actions_types = list(/datum/action/item_action/hands_free/activate)
|
||||
var/activated = 1 //1 for implant types that can be activated, 0 for ones that are "always on" like mindshield implants
|
||||
var/implanted = null
|
||||
var/mob/living/imp_in = null
|
||||
@@ -41,11 +41,13 @@
|
||||
return 0
|
||||
|
||||
|
||||
if(activated)
|
||||
action_button_name = "Activate [src.name]"
|
||||
src.loc = source
|
||||
imp_in = source
|
||||
implanted = 1
|
||||
if(activated)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Grant(source)
|
||||
if(istype(source, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = source
|
||||
H.sec_hud_set_implants()
|
||||
@@ -60,6 +62,10 @@
|
||||
imp_in = null
|
||||
implanted = 0
|
||||
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Grant(source)
|
||||
|
||||
if(istype(source, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = source
|
||||
H.sec_hud_set_implants()
|
||||
@@ -76,6 +82,6 @@
|
||||
return "No information available"
|
||||
|
||||
/obj/item/weapon/implant/dropped(mob/user)
|
||||
..()
|
||||
. = 1
|
||||
qdel(src)
|
||||
return .
|
||||
|
||||
@@ -8,12 +8,13 @@
|
||||
|
||||
|
||||
/obj/item/weapon/implant/freedom/activate()
|
||||
if(uses == 0) return 0
|
||||
if(uses != -1) uses--
|
||||
uses--
|
||||
to_chat(imp_in, "You feel a faint click.")
|
||||
if(iscarbon(imp_in))
|
||||
var/mob/living/carbon/C_imp_in = imp_in
|
||||
C_imp_in.uncuff()
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/weapon/implant/freedom/get_data()
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
return dat
|
||||
|
||||
/obj/item/weapon/implant/adrenalin/activate()
|
||||
if(uses < 1) return 0
|
||||
uses--
|
||||
to_chat(imp_in, "<span class='notice'>You feel a sudden surge of energy!</span>")
|
||||
imp_in.SetStunned(0)
|
||||
@@ -46,6 +45,8 @@
|
||||
imp_in.reagents.add_reagent("synaptizine", 10)
|
||||
imp_in.reagents.add_reagent("omnizine", 10)
|
||||
imp_in.reagents.add_reagent("stimulative_agent", 10)
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/weapon/implant/emp
|
||||
@@ -56,9 +57,10 @@
|
||||
uses = 2
|
||||
|
||||
/obj/item/weapon/implant/emp/activate()
|
||||
if(src.uses < 1) return 0
|
||||
src.uses--
|
||||
uses--
|
||||
empulse(imp_in, 3, 5)
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/implant/cortical
|
||||
name = "cortical stack"
|
||||
|
||||
Reference in New Issue
Block a user