mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-20 15:21:29 +00:00
- 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)
72 lines
2.2 KiB
Plaintext
72 lines
2.2 KiB
Plaintext
|
|
/obj/item/clothing/head/hardhat
|
|
name = "hard hat"
|
|
desc = "A piece of headgear used in dangerous working conditions to protect the head. Comes with a built-in flashlight."
|
|
icon_state = "hardhat0_yellow"
|
|
item_state = "hardhat0_yellow"
|
|
var/brightness_on = 4 //luminosity when on
|
|
var/on = 0
|
|
item_color = "yellow" //Determines used sprites: hardhat[on]_[color] and hardhat[on]_[color]2 (lying down sprite)
|
|
armor = list(melee = 15, bullet = 5, laser = 20, energy = 10, bomb = 20, bio = 10, rad = 20)
|
|
flags_inv = 0
|
|
actions_types = list(/datum/action/item_action/toggle_helmet_light)
|
|
|
|
/obj/item/clothing/head/hardhat/attack_self(mob/user)
|
|
on = !on
|
|
icon_state = "hardhat[on]_[item_color]"
|
|
item_state = "hardhat[on]_[item_color]"
|
|
|
|
if(on)
|
|
set_light(brightness_on)
|
|
else
|
|
set_light(0)
|
|
|
|
for(var/X in actions)
|
|
var/datum/action/A = X
|
|
A.UpdateButtonIcon()
|
|
|
|
|
|
/obj/item/clothing/head/hardhat/orange
|
|
icon_state = "hardhat0_orange"
|
|
item_state = "hardhat0_orange"
|
|
item_color = "orange"
|
|
|
|
/obj/item/clothing/head/hardhat/red
|
|
icon_state = "hardhat0_red"
|
|
item_state = "hardhat0_red"
|
|
item_color = "red"
|
|
name = "firefighter helmet"
|
|
flags = STOPSPRESSUREDMAGE
|
|
heat_protection = HEAD
|
|
max_heat_protection_temperature = FIRE_HELM_MAX_TEMP_PROTECT
|
|
cold_protection = HEAD
|
|
min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT
|
|
|
|
/obj/item/clothing/head/hardhat/white
|
|
icon_state = "hardhat0_white"
|
|
item_state = "hardhat0_white"
|
|
item_color = "white"
|
|
flags = STOPSPRESSUREDMAGE
|
|
heat_protection = HEAD
|
|
max_heat_protection_temperature = FIRE_HELM_MAX_TEMP_PROTECT
|
|
cold_protection = HEAD
|
|
min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT
|
|
|
|
|
|
/obj/item/clothing/head/hardhat/dblue
|
|
icon_state = "hardhat0_dblue"
|
|
item_state = "hardhat0_dblue"
|
|
item_color = "dblue"
|
|
|
|
/obj/item/clothing/head/hardhat/atmos
|
|
icon_state = "hardhat0_atmos"
|
|
item_state = "hardhat0_atmos"
|
|
item_color = "atmos"
|
|
name = "atmospheric technician's firefighting helmet"
|
|
desc = "A firefighter's helmet, able to keep the user cool in any situation."
|
|
flags = STOPSPRESSUREDMAGE
|
|
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
|
|
heat_protection = HEAD
|
|
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
|
cold_protection = HEAD
|
|
min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT |