mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-18 03:21:13 +01:00
1c8c0c2221
Fixes several runtimes from the past few weeks, some additional material repath regressions, and the fact that if I shoot you with a stream of ionized deuterium particles, it doesn't riddle you with cancer. changes: - bugfix: "Fixes emergency shields runtiming when hit by thrown objects." - bugfix: "Fixes several stale global list runtimes." - bugfix: "Fixes several health percentage checks that could use unset initial health values." - bugfix: "Fixes additional materials regressions in INDRA code." - bugfix: "Fixes invalid fuel injector depletion math." - bugfix: "Makes accelerated particles apply radiation damage to living mobs they pass through."
254 lines
6.9 KiB
Plaintext
254 lines
6.9 KiB
Plaintext
/*
|
|
* Contents:
|
|
* * Welding mask
|
|
* * Cakehat
|
|
* * Ushanka
|
|
* * Pumpkin head
|
|
* * Chicken mask
|
|
* * Warning cone
|
|
*/
|
|
|
|
/*
|
|
* Welding mask
|
|
*/
|
|
/obj/item/clothing/head/welding
|
|
name = "welding helmet"
|
|
desc = "A head-mounted face cover designed to protect the wearer completely from space-arc eye."
|
|
icon_state = "welding"
|
|
item_state = "welding"
|
|
item_state_slots = list(
|
|
slot_l_hand_str = "welding",
|
|
slot_r_hand_str = "welding"
|
|
)
|
|
matter = list(MATERIAL_STEEL = 3000, MATERIAL_GLASS = 1000)
|
|
var/up = 0
|
|
armor = list(
|
|
MELEE = ARMOR_MELEE_SMALL
|
|
)
|
|
flags_inv = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
|
|
body_parts_covered = HEAD|FACE|EYES
|
|
action_button_name = "Flip Welding Mask"
|
|
siemens_coefficient = 0.75 // what? it's steel.
|
|
w_class = WEIGHT_CLASS_NORMAL
|
|
var/base_state
|
|
flash_protection = FLASH_PROTECTION_MAJOR
|
|
tint = TINT_HEAVY
|
|
sprite_sheets = list(
|
|
BODYTYPE_TAJARA = 'icons/mob/species/tajaran/helmet.dmi',
|
|
BODYTYPE_UNATHI = 'icons/mob/species/unathi/helmet.dmi'
|
|
)
|
|
drop_sound = 'sound/items/drop/helm.ogg'
|
|
pickup_sound = 'sound/items/pickup/helm.ogg'
|
|
|
|
/obj/item/clothing/head/welding/attack_self()
|
|
if(!base_state)
|
|
base_state = icon_state
|
|
toggle()
|
|
|
|
|
|
/obj/item/clothing/head/welding/verb/toggle()
|
|
set category = "Object.Equipped"
|
|
set name = "Adjust Welding Mask"
|
|
set src in usr
|
|
|
|
if(!base_state)
|
|
base_state = icon_state
|
|
|
|
if(use_check_and_message(usr))
|
|
return
|
|
|
|
src.up = !src.up
|
|
if(!src.up)
|
|
body_parts_covered |= (EYES|FACE)
|
|
flags_inv |= (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
|
|
flash_protection = initial(flash_protection)
|
|
tint = initial(tint)
|
|
icon_state = base_state
|
|
item_state = base_state
|
|
to_chat(usr, "You flip the [src] down to protect your eyes.")
|
|
else
|
|
body_parts_covered &= ~(EYES|FACE)
|
|
flash_protection = FLASH_PROTECTION_NONE
|
|
tint = TINT_NONE
|
|
flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
|
|
icon_state = "[base_state]up"
|
|
item_state = "[base_state]up"
|
|
to_chat(usr, "You push the [src] up out of your face.")
|
|
update_clothing_icon() //so our mob-overlays
|
|
usr.update_action_buttons()
|
|
usr.handle_vision()
|
|
|
|
|
|
/*
|
|
* Cakehat
|
|
*/
|
|
/obj/item/clothing/head/cakehat
|
|
name = "cake-hat"
|
|
desc = "It's tasty looking!"
|
|
icon_state = "cake0"
|
|
item_state = "cake0"
|
|
var/onfire = 0
|
|
body_parts_covered = HEAD
|
|
|
|
/obj/item/clothing/head/cakehat/process()
|
|
if(!onfire)
|
|
STOP_PROCESSING(SSprocessing, src)
|
|
return
|
|
|
|
var/turf/location = src.loc
|
|
if(istype(location, /mob/))
|
|
var/mob/living/carbon/human/M = location
|
|
if(M.l_hand == src || M.r_hand == src || M.head == src)
|
|
location = M.loc
|
|
|
|
if (istype(location, /turf))
|
|
location.hotspot_expose(700, 1)
|
|
|
|
/obj/item/clothing/head/cakehat/attack_self(mob/user as mob)
|
|
src.onfire = !( src.onfire )
|
|
if (src.onfire)
|
|
src.force = 3
|
|
src.damtype = "fire"
|
|
src.icon_state = "cake1"
|
|
src.item_state = "cake1"
|
|
START_PROCESSING(SSprocessing, src)
|
|
else
|
|
src.force = null
|
|
src.damtype = "brute"
|
|
src.icon_state = "cake0"
|
|
src.item_state = "cake0"
|
|
return
|
|
/*
|
|
* Pumpkin head
|
|
*/
|
|
|
|
/obj/item/clothing/head/pumpkin
|
|
name = "carved pumpkin"
|
|
desc = "A pumpkin with a spooky face carved on it. Looks like it needs a candle."
|
|
icon_state = "pumpkin_carved"
|
|
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|BLOCKHAIR
|
|
body_parts_covered = HEAD|FACE|EYES
|
|
drop_sound = 'sound/items/drop/herb.ogg'
|
|
pickup_sound = 'sound/items/pickup/herb.ogg'
|
|
w_class = WEIGHT_CLASS_NORMAL
|
|
throwforce = 1
|
|
throw_speed = 0.5
|
|
|
|
/obj/item/clothing/head/pumpkin/attackby(obj/item/attacking_item, mob/user)
|
|
if(istype(attacking_item, /obj/item/flame/candle))
|
|
var/obj/item/flame/candle/c = attacking_item
|
|
var/candle_wax = c.wax
|
|
if(c.lit)
|
|
to_chat(user, SPAN_NOTICE("You should extinguish \the [attacking_item] first!"))
|
|
return
|
|
to_chat(user, "You add \the [attacking_item] to \the [src].")
|
|
playsound(src.loc, 'sound/items/drop/gloves.ogg', 50, 1)
|
|
qdel(attacking_item)
|
|
var/obj/item/clothing/head/pumpkin/lantern/L = new /obj/item/clothing/head/pumpkin/lantern(user.loc)
|
|
L.wax = candle_wax
|
|
user.put_in_hands(L)
|
|
qdel(src)
|
|
return
|
|
|
|
/obj/item/clothing/head/pumpkin/lantern
|
|
name = "jack o' lantern"
|
|
desc = "A pumpkin with a spooky face carved on it, with a candle inside. Believed to ward off evil spirits."
|
|
light_color = "#E09D37"
|
|
var/wax = 900
|
|
var/lit = 0
|
|
|
|
/obj/item/clothing/head/pumpkin/lantern/update_icon()
|
|
icon_state = "pumpkin_carved[lit ? "_lit" : ""]"
|
|
if(ismob(loc))
|
|
var/mob/living/M = loc
|
|
M.update_inv_head(0)
|
|
M.update_inv_l_hand(0)
|
|
M.update_inv_r_hand(1)
|
|
|
|
/obj/item/clothing/head/pumpkin/lantern/attackby(obj/item/attacking_item, mob/user)
|
|
..()
|
|
if(attacking_item.tool_behaviour == TOOL_WELDER)
|
|
var/obj/item/weldingtool/WT = attacking_item
|
|
if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool
|
|
light()
|
|
to_chat(user, SPAN_NOTICE("\The [user] casually lights \the [name] with [attacking_item]."))
|
|
else if(attacking_item.isFlameSource())
|
|
light()
|
|
to_chat(user, SPAN_NOTICE("\The [user] lights \the [name]."))
|
|
else if(istype(attacking_item, /obj/item/flame/candle))
|
|
var/obj/item/flame/candle/C = attacking_item
|
|
if(C.lit)
|
|
light()
|
|
to_chat(user, SPAN_NOTICE("\The [user] lights \the [name]."))
|
|
|
|
/obj/item/clothing/head/pumpkin/lantern/proc/light()
|
|
if(!src.lit)
|
|
src.lit = 1
|
|
playsound(src.loc, 'sound/items/cigs_lighters/cig_light.ogg', 50, 1)
|
|
//src.damtype = "fire"
|
|
set_light(CANDLE_LUM)
|
|
update_icon()
|
|
START_PROCESSING(SSprocessing, src)
|
|
|
|
/obj/item/clothing/head/pumpkin/lantern/process(mob/user)
|
|
if(!lit)
|
|
return
|
|
wax--
|
|
if(!wax)
|
|
new /obj/item/clothing/head/pumpkin(src.loc)
|
|
new /obj/item/trash/candle(src.loc)
|
|
if(istype(src.loc, /mob))
|
|
src.dropped(user)
|
|
to_chat(user, SPAN_NOTICE("The candle burns out."))
|
|
playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
|
|
STOP_PROCESSING(SSprocessing, src)
|
|
qdel(src)
|
|
update_icon()
|
|
if(istype(loc, /turf)) //start a fire if possible
|
|
var/turf/T = loc
|
|
T.hotspot_expose(700, 5)
|
|
|
|
/obj/item/clothing/head/pumpkin/lantern/attack_self(mob/user as mob)
|
|
if(lit)
|
|
lit = 0
|
|
to_chat(user, SPAN_NOTICE("You snuff out the flame."))
|
|
playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
|
|
update_icon()
|
|
set_light(0)
|
|
|
|
/*
|
|
* Chicken mask
|
|
*/
|
|
|
|
/obj/item/clothing/head/richard
|
|
name = "chicken mask"
|
|
desc = "You can hear the distant sounds of rhythmic electronica."
|
|
icon_state = "richard"
|
|
body_parts_covered = HEAD|FACE
|
|
flags_inv = BLOCKHAIR
|
|
|
|
/*
|
|
* Warning cone
|
|
*/
|
|
|
|
/obj/item/clothing/head/cone
|
|
name = "warning cone"
|
|
desc = "This cone is trying to warn you of something!"
|
|
icon_state = "cone"
|
|
item_state = "cone"
|
|
drop_sound = 'sound/items/drop/shoes.ogg'
|
|
pickup_sound = 'sound/items/pickup/shoes.ogg'
|
|
force = 1
|
|
throwforce = 3
|
|
throw_speed = 2
|
|
throw_range = 5
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
body_parts_covered = HEAD
|
|
attack_verb = list("warned", "cautioned", "smashed")
|
|
armor = list(melee = 5, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
|
|
|
|
/obj/item/clothing/head/cone/mechanics_hints(mob/user, distance, is_adjacent)
|
|
. += ..()
|
|
. += "It looks like you can wear it in your head slot."
|
|
|