mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 06:27:26 +01:00
Merge pull request #1010 from tigercat2000/GAAB
Generic Action/Action Button System
This commit is contained in:
@@ -21,8 +21,10 @@
|
||||
var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags
|
||||
var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags
|
||||
|
||||
var/icon_action_button //If this is set, The item will make an action button on the player's HUD when picked up. The button will have the icon_action_button sprite from the screen1_action.dmi file.
|
||||
var/action_button_name //This is the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. Note that icon_action_button needs to be set in order for the action button to appear.
|
||||
//If this is set, The item will make an action button on the player's HUD when picked up.
|
||||
var/action_button_name //It is also the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. If it's not set, there'll be no button.
|
||||
var/action_button_is_hands_free = 0 //If 1, bypass the restrained, lying, and stunned checks action buttons normally test for
|
||||
var/datum/action/item_action/action = null
|
||||
|
||||
//Since any item can now be a piece of clothing, this has to be put here so all items share it.
|
||||
var/flags_inv //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc.
|
||||
@@ -557,13 +559,7 @@
|
||||
//The default action is attack_self().
|
||||
//Checks before we get to here are: mob is alive, mob is not restrained, paralyzed, asleep, resting, laying, item is on the mob.
|
||||
/obj/item/proc/ui_action_click()
|
||||
if( src in usr )
|
||||
attack_self(usr)
|
||||
return
|
||||
else if(istype(src, /obj/item/clothing/accessory))
|
||||
if(istype(src.loc,/obj/item/clothing/under))
|
||||
attack_self(usr)
|
||||
|
||||
attack_self(usr)
|
||||
|
||||
/obj/item/proc/IsShield()
|
||||
return 0
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
slot_flags = SLOT_BELT
|
||||
m_amt = 50
|
||||
g_amt = 20
|
||||
icon_action_button = "action_flashlight"
|
||||
action_button_name = "Flashlight"
|
||||
var/on = 0
|
||||
var/brightness_on = 4 //luminosity when on
|
||||
|
||||
@@ -119,7 +119,6 @@
|
||||
brightness_on = 7 // Pretty bright.
|
||||
icon_state = "flare"
|
||||
item_state = "flare"
|
||||
icon_action_button = null //just pull it manually, neckbeard.
|
||||
var/fuel = 0
|
||||
var/on_damage = 7
|
||||
var/produce_heat = 1500
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
slot_flags = SLOT_BACK
|
||||
slowdown = 1
|
||||
action_button_name = "Equip/Unequip TED Gun"
|
||||
icon_action_button = "action_chronobackpack"
|
||||
var/obj/item/weapon/gun/energy/chrono_gun/PA = null
|
||||
var/list/erased_minds = list() //a collection of minds from the dead
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
w_class = 4
|
||||
origin_tech = "biotech=4"
|
||||
action_button_name = "Toggle Paddles"
|
||||
icon_action_button = "action_defibunit"
|
||||
|
||||
var/on = 0 //if the paddles are equipped (1) or on the defib (0)
|
||||
var/safety = 1 //if you can zap people with the defibs on harm mode
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/on = 0.0
|
||||
var/stabilization_on = 0
|
||||
var/volume_rate = 500 //Needed for borg jetpack transfer
|
||||
icon_action_button = "action_jetpack"
|
||||
action_button_name = "Toggle Jetpack"
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
slot_flags = SLOT_BACK
|
||||
slowdown = 1
|
||||
action_button_name = "Toggle Mister"
|
||||
icon_action_button = "action_waterbackpack"
|
||||
|
||||
var/obj/item/weapon/noz
|
||||
var/on = 0
|
||||
|
||||
Reference in New Issue
Block a user