modular_citadel
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
<<<<<<< HEAD
|
||||
/obj/item/storage/wallet
|
||||
name = "wallet"
|
||||
desc = "It can hold a few small and personal things."
|
||||
icon_state = "wallet"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
resistance_flags = FLAMMABLE
|
||||
slot_flags = SLOT_ID
|
||||
slot_flags = ITEM_SLOT_ID
|
||||
|
||||
var/obj/item/card/id/front_id = null
|
||||
var/list/combined_access
|
||||
@@ -90,96 +89,3 @@
|
||||
if(item3_type)
|
||||
new item3_type(src)
|
||||
update_icon()
|
||||
=======
|
||||
/obj/item/storage/wallet
|
||||
name = "wallet"
|
||||
desc = "It can hold a few small and personal things."
|
||||
icon_state = "wallet"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
resistance_flags = FLAMMABLE
|
||||
slot_flags = ITEM_SLOT_ID
|
||||
|
||||
var/obj/item/card/id/front_id = null
|
||||
var/list/combined_access
|
||||
|
||||
/obj/item/storage/wallet/ComponentInitialize()
|
||||
. = ..()
|
||||
GET_COMPONENT(STR, /datum/component/storage)
|
||||
STR.max_items = 4
|
||||
STR.can_hold = typecacheof(list(
|
||||
/obj/item/stack/spacecash,
|
||||
/obj/item/card,
|
||||
/obj/item/clothing/mask/cigarette,
|
||||
/obj/item/flashlight/pen,
|
||||
/obj/item/seeds,
|
||||
/obj/item/stack/medical,
|
||||
/obj/item/toy/crayon,
|
||||
/obj/item/coin,
|
||||
/obj/item/dice,
|
||||
/obj/item/disk,
|
||||
/obj/item/implanter,
|
||||
/obj/item/lighter,
|
||||
/obj/item/lipstick,
|
||||
/obj/item/match,
|
||||
/obj/item/paper,
|
||||
/obj/item/pen,
|
||||
/obj/item/photo,
|
||||
/obj/item/reagent_containers/dropper,
|
||||
/obj/item/reagent_containers/syringe,
|
||||
/obj/item/screwdriver,
|
||||
/obj/item/stamp))
|
||||
|
||||
/obj/item/storage/wallet/Exited(atom/movable/AM)
|
||||
. = ..()
|
||||
refreshID()
|
||||
|
||||
/obj/item/storage/wallet/proc/refreshID()
|
||||
if(!(front_id in src))
|
||||
front_id = null
|
||||
for(var/obj/item/card/id/I in contents)
|
||||
LAZYINITLIST(combined_access)
|
||||
LAZYCLEARLIST(combined_access)
|
||||
if(!front_id)
|
||||
front_id = I
|
||||
combined_access |= I.access
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/wallet/Entered(atom/movable/AM)
|
||||
. = ..()
|
||||
refreshID()
|
||||
|
||||
/obj/item/storage/wallet/update_icon()
|
||||
var/new_state = "wallet"
|
||||
if(front_id)
|
||||
new_state = "wallet_[front_id.icon_state]"
|
||||
if(new_state != icon_state) //avoid so many icon state changes.
|
||||
icon_state = new_state
|
||||
|
||||
/obj/item/storage/wallet/GetID()
|
||||
return front_id
|
||||
|
||||
/obj/item/storage/wallet/GetAccess()
|
||||
if(LAZYLEN(combined_access))
|
||||
return combined_access
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/wallet/random
|
||||
icon_state = "random_wallet"
|
||||
|
||||
/obj/item/storage/wallet/random/PopulateContents()
|
||||
var/item1_type = pick( /obj/item/stack/spacecash/c10, /obj/item/stack/spacecash/c100, /obj/item/stack/spacecash/c1000, /obj/item/stack/spacecash/c20, /obj/item/stack/spacecash/c200, /obj/item/stack/spacecash/c50, /obj/item/stack/spacecash/c500)
|
||||
var/item2_type
|
||||
if(prob(50))
|
||||
item2_type = pick( /obj/item/stack/spacecash/c10, /obj/item/stack/spacecash/c100, /obj/item/stack/spacecash/c1000, /obj/item/stack/spacecash/c20, /obj/item/stack/spacecash/c200, /obj/item/stack/spacecash/c50, /obj/item/stack/spacecash/c500)
|
||||
var/item3_type = pick( /obj/item/coin/silver, /obj/item/coin/silver, /obj/item/coin/gold, /obj/item/coin/iron, /obj/item/coin/iron, /obj/item/coin/iron )
|
||||
|
||||
spawn(2)
|
||||
if(item1_type)
|
||||
new item1_type(src)
|
||||
if(item2_type)
|
||||
new item2_type(src)
|
||||
if(item3_type)
|
||||
new item3_type(src)
|
||||
update_icon()
|
||||
>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme
|
||||
|
||||
@@ -1,377 +1,3 @@
|
||||
<<<<<<< HEAD
|
||||
#define WELDER_FUEL_BURN_INTERVAL 13
|
||||
/obj/item/weldingtool
|
||||
name = "welding tool"
|
||||
desc = "A standard edition welder provided by Nanotrasen."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "welder"
|
||||
item_state = "welder"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
force = 3
|
||||
throwforce = 5
|
||||
hitsound = "swing_hit"
|
||||
usesound = list('sound/items/welder.ogg', 'sound/items/welder2.ogg')
|
||||
var/acti_sound = 'sound/items/welderactivate.ogg'
|
||||
var/deac_sound = 'sound/items/welderdeactivate.ogg'
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=30)
|
||||
var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2)
|
||||
var/status = TRUE //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
|
||||
var/max_fuel = 20 //The max amount of fuel the welder can hold
|
||||
var/change_icons = 1
|
||||
var/can_off_process = 0
|
||||
var/light_intensity = 2 //how powerful the emitted light is when used.
|
||||
var/progress_flash_divisor = 10
|
||||
var/burned_fuel_for = 0 //when fuel was last removed
|
||||
heat = 3800
|
||||
tool_behaviour = TOOL_WELDER
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/weldingtool/Initialize()
|
||||
. = ..()
|
||||
create_reagents(max_fuel)
|
||||
reagents.add_reagent("welding_fuel", max_fuel)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weldingtool/proc/update_torch()
|
||||
if(welding)
|
||||
add_overlay("[initial(icon_state)]-on")
|
||||
item_state = "[initial(item_state)]1"
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
|
||||
|
||||
/obj/item/weldingtool/update_icon()
|
||||
cut_overlays()
|
||||
if(change_icons)
|
||||
var/ratio = get_fuel() / max_fuel
|
||||
ratio = CEILING(ratio*4, 1) * 25
|
||||
add_overlay("[initial(icon_state)][ratio]")
|
||||
update_torch()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weldingtool/process()
|
||||
switch(welding)
|
||||
if(0)
|
||||
force = 3
|
||||
damtype = "brute"
|
||||
update_icon()
|
||||
if(!can_off_process)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
//Welders left on now use up fuel, but lets not have them run out quite that fast
|
||||
if(1)
|
||||
force = 15
|
||||
damtype = "fire"
|
||||
++burned_fuel_for
|
||||
if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL)
|
||||
use(1)
|
||||
update_icon()
|
||||
|
||||
//This is to start fires. process() is only called if the welder is on.
|
||||
open_flame()
|
||||
|
||||
|
||||
/obj/item/weldingtool/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (FIRELOSS)
|
||||
|
||||
|
||||
/obj/item/weldingtool/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
flamethrower_screwdriver(I, user)
|
||||
else if(istype(I, /obj/item/stack/rods))
|
||||
flamethrower_rods(I, user)
|
||||
else
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weldingtool/proc/explode()
|
||||
var/turf/T = get_turf(loc)
|
||||
var/plasmaAmount = reagents.get_reagent_amount("plasma")
|
||||
dyn_explosion(T, plasmaAmount/5)//20 plasma in a standard welder has a 4 power explosion. no breaches, but enough to kill/dismember holder
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weldingtool/attack(mob/living/carbon/human/H, mob/user)
|
||||
if(!istype(H))
|
||||
return ..()
|
||||
|
||||
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
|
||||
|
||||
if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != INTENT_HARM)
|
||||
if(src.use_tool(H, user, 0, volume=50, amount=1))
|
||||
if(user == H)
|
||||
user.visible_message("<span class='notice'>[user] starts to fix some of the dents on [H]'s [affecting.name].</span>",
|
||||
"<span class='notice'>You start fixing some of the dents on [H]'s [affecting.name].</span>")
|
||||
if(!do_mob(user, H, 50))
|
||||
return
|
||||
item_heal_robotic(H, user, 15, 0)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(!status && O.is_refillable())
|
||||
reagents.trans_to(O, reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>You empty [src]'s fuel tank into [O].</span>")
|
||||
update_icon()
|
||||
if(isOn())
|
||||
use(1)
|
||||
var/turf/location = get_turf(user)
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
if(get_fuel() <= 0)
|
||||
set_light(0)
|
||||
|
||||
if(isliving(O))
|
||||
var/mob/living/L = O
|
||||
if(L.IgniteMob())
|
||||
message_admins("[key_name_admin(user)] set [key_name_admin(L)] on fire")
|
||||
log_game("[key_name(user)] set [key_name(L)] on fire")
|
||||
|
||||
|
||||
/obj/item/weldingtool/attack_self(mob/user)
|
||||
if(src.reagents.has_reagent("plasma"))
|
||||
message_admins("[key_name_admin(user)] activated a rigged welder.")
|
||||
explode()
|
||||
switched_on(user)
|
||||
if(welding)
|
||||
set_light(light_intensity)
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
// Returns the amount of fuel in the welder
|
||||
/obj/item/weldingtool/proc/get_fuel()
|
||||
return reagents.get_reagent_amount("welding_fuel")
|
||||
|
||||
|
||||
// Uses fuel from the welding tool.
|
||||
/obj/item/weldingtool/use(used = 0)
|
||||
if(!isOn() || !check_fuel())
|
||||
return FALSE
|
||||
|
||||
if(used)
|
||||
burned_fuel_for = 0
|
||||
if(get_fuel() >= used)
|
||||
reagents.remove_reagent("welding_fuel", used)
|
||||
check_fuel()
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
|
||||
//Turns off the welder if there is no more fuel (does this really need to be its own proc?)
|
||||
/obj/item/weldingtool/proc/check_fuel(mob/user)
|
||||
if(get_fuel() <= 0 && welding)
|
||||
switched_on(user)
|
||||
update_icon()
|
||||
//mob icon update
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_hands(0)
|
||||
|
||||
return 0
|
||||
return 1
|
||||
|
||||
//Switches the welder on
|
||||
/obj/item/weldingtool/proc/switched_on(mob/user)
|
||||
if(!status)
|
||||
to_chat(user, "<span class='warning'>[src] can't be turned on while unsecured!</span>")
|
||||
return
|
||||
welding = !welding
|
||||
if(welding)
|
||||
if(get_fuel() >= 1)
|
||||
to_chat(user, "<span class='notice'>You switch [src] on.</span>")
|
||||
playsound(loc, acti_sound, 50, 1)
|
||||
force = 15
|
||||
damtype = "fire"
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
update_icon()
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more fuel!</span>")
|
||||
switched_off(user)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You switch [src] off.</span>")
|
||||
playsound(loc, deac_sound, 50, 1)
|
||||
switched_off(user)
|
||||
|
||||
//Switches the welder off
|
||||
/obj/item/weldingtool/proc/switched_off(mob/user)
|
||||
welding = 0
|
||||
set_light(0)
|
||||
|
||||
force = 3
|
||||
damtype = "brute"
|
||||
hitsound = "swing_hit"
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weldingtool/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "It contains [get_fuel()] unit\s of fuel out of [max_fuel].")
|
||||
|
||||
/obj/item/weldingtool/is_hot()
|
||||
return welding * heat
|
||||
|
||||
//Returns whether or not the welding tool is currently on.
|
||||
/obj/item/weldingtool/proc/isOn()
|
||||
return welding
|
||||
|
||||
// When welding is about to start, run a normal tool_use_check, then flash a mob if it succeeds.
|
||||
/obj/item/weldingtool/tool_start_check(mob/living/user, amount=0)
|
||||
. = tool_use_check(user, amount)
|
||||
if(. && user)
|
||||
user.flash_act(light_intensity)
|
||||
|
||||
// Flash the user during welding progress
|
||||
/obj/item/weldingtool/tool_check_callback(mob/living/user, amount, datum/callback/extra_checks)
|
||||
. = ..()
|
||||
if(. && user)
|
||||
if (progress_flash_divisor == 0)
|
||||
user.flash_act(min(light_intensity,1))
|
||||
progress_flash_divisor = initial(progress_flash_divisor)
|
||||
else
|
||||
progress_flash_divisor--
|
||||
|
||||
// If welding tool ran out of fuel during a construction task, construction fails.
|
||||
/obj/item/weldingtool/tool_use_check(mob/living/user, amount)
|
||||
if(!isOn() || !check_fuel())
|
||||
to_chat(user, "<span class='warning'>[src] has to be on to complete this task!</span>")
|
||||
return FALSE
|
||||
|
||||
if(get_fuel() >= amount)
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more welding fuel to complete this task!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
|
||||
if(welding)
|
||||
to_chat(user, "<span class='warning'>Turn it off first!</span>")
|
||||
return
|
||||
status = !status
|
||||
if(status)
|
||||
to_chat(user, "<span class='notice'>You resecure [src] and close the fuel tank.</span>")
|
||||
container_type = NONE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] can now be attached, modified, and refuelled.</span>")
|
||||
container_type = OPENCONTAINER
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
|
||||
if(!status)
|
||||
var/obj/item/stack/rods/R = I
|
||||
if (R.use(1))
|
||||
var/obj/item/flamethrower/F = new /obj/item/flamethrower(user.loc)
|
||||
if(!remove_item_from_storage(F))
|
||||
user.transferItemToLoc(src, F, TRUE)
|
||||
F.weldtool = src
|
||||
add_fingerprint(user)
|
||||
to_chat(user, "<span class='notice'>You add a rod to a welder, starting to build a flamethrower.</span>")
|
||||
user.put_in_hands(F)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one rod to start building a flamethrower!</span>")
|
||||
|
||||
/obj/item/weldingtool/ignition_effect(atom/A, mob/user)
|
||||
if(use_tool(A, user, 0, amount=1))
|
||||
return "<span class='notice'>[user] casually lights [A] with [src], what a badass.</span>"
|
||||
else
|
||||
return ""
|
||||
|
||||
/obj/item/weldingtool/largetank
|
||||
name = "industrial welding tool"
|
||||
desc = "A slightly larger welder with a larger tank."
|
||||
icon_state = "indwelder"
|
||||
max_fuel = 40
|
||||
materials = list(MAT_GLASS=60)
|
||||
|
||||
/obj/item/weldingtool/largetank/cyborg
|
||||
name = "integrated welding tool"
|
||||
desc = "An advanced welder designed to be used in robotic systems."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/weldingtool/largetank/flamethrower_screwdriver()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weldingtool/mini
|
||||
name = "emergency welding tool"
|
||||
desc = "A miniature welder used during emergencies."
|
||||
icon_state = "miniwelder"
|
||||
max_fuel = 10
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=10)
|
||||
change_icons = 0
|
||||
|
||||
/obj/item/weldingtool/mini/flamethrower_screwdriver()
|
||||
return
|
||||
|
||||
/obj/item/weldingtool/abductor
|
||||
name = "alien welding tool"
|
||||
desc = "An alien welding tool. Whatever fuel it uses, it never runs out."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "welder"
|
||||
toolspeed = 0.1
|
||||
light_intensity = 0
|
||||
change_icons = 0
|
||||
|
||||
/obj/item/weldingtool/abductor/process()
|
||||
if(get_fuel() <= max_fuel)
|
||||
reagents.add_reagent("welding_fuel", 1)
|
||||
..()
|
||||
|
||||
/obj/item/weldingtool/hugetank
|
||||
name = "upgraded industrial welding tool"
|
||||
desc = "An upgraded welder based of the industrial welder."
|
||||
icon_state = "upindwelder"
|
||||
item_state = "upindwelder"
|
||||
max_fuel = 80
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=120)
|
||||
|
||||
/obj/item/weldingtool/experimental
|
||||
name = "experimental welding tool"
|
||||
desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes."
|
||||
icon_state = "exwelder"
|
||||
item_state = "exwelder"
|
||||
max_fuel = 40
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=120)
|
||||
var/last_gen = 0
|
||||
change_icons = 0
|
||||
can_off_process = 1
|
||||
light_intensity = 1
|
||||
toolspeed = 0.5
|
||||
var/nextrefueltick = 0
|
||||
|
||||
/obj/item/weldingtool/experimental/brass
|
||||
name = "brass welding tool"
|
||||
desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch."
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
icon_state = "brasswelder"
|
||||
item_state = "brasswelder"
|
||||
|
||||
|
||||
/obj/item/weldingtool/experimental/process()
|
||||
..()
|
||||
if(get_fuel() < max_fuel && nextrefueltick < world.time)
|
||||
nextrefueltick = world.time + 10
|
||||
reagents.add_reagent("welding_fuel", 1)
|
||||
|
||||
#undef WELDER_FUEL_BURN_INTERVAL
|
||||
=======
|
||||
#define WELDER_FUEL_BURN_INTERVAL 13
|
||||
/obj/item/weldingtool
|
||||
name = "welding tool"
|
||||
@@ -744,4 +370,3 @@
|
||||
reagents.add_reagent("welding_fuel", 1)
|
||||
|
||||
#undef WELDER_FUEL_BURN_INTERVAL
|
||||
>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme
|
||||
|
||||
@@ -46,19 +46,11 @@
|
||||
qdel(I)
|
||||
for(var/obj/item/I in H.held_items)
|
||||
qdel(I)
|
||||
<<<<<<< HEAD
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt/highlander(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/radio/headset/heads/captain(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret/highlander(H), slot_head)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/pinpointer/nuke(H), slot_l_store)
|
||||
=======
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt/highlander(H), SLOT_W_UNIFORM)
|
||||
H.equip_to_slot_or_del(new /obj/item/radio/headset/heads/captain(H), SLOT_EARS)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret/highlander(H), SLOT_HEAD)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), SLOT_SHOES)
|
||||
H.equip_to_slot_or_del(new /obj/item/pinpointer/nuke(H), SLOT_L_STORE)
|
||||
>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme
|
||||
for(var/obj/item/pinpointer/nuke/P in H)
|
||||
P.attack_self(H)
|
||||
var/obj/item/card/id/W = new(H)
|
||||
|
||||
@@ -1,95 +1,46 @@
|
||||
<<<<<<< HEAD
|
||||
|
||||
//Ears: currently only used for headsets and earmuffs
|
||||
/obj/item/clothing/ears
|
||||
name = "ears"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
slot_flags = SLOT_EARS
|
||||
resistance_flags = NONE
|
||||
|
||||
/obj/item/clothing/ears/earmuffs
|
||||
name = "earmuffs"
|
||||
desc = "Protects your hearing from loud noises, and quiet ones as well."
|
||||
icon_state = "earmuffs"
|
||||
item_state = "earmuffs"
|
||||
strip_delay = 15
|
||||
equip_delay_other = 25
|
||||
resistance_flags = FLAMMABLE
|
||||
flags_2 = BANG_PROTECT_2|HEALS_EARS_2
|
||||
|
||||
/obj/item/clothing/ears/headphones
|
||||
name = "headphones"
|
||||
desc = "Unce unce unce unce. Boop!"
|
||||
icon = 'icons/obj/clothing/accessories.dmi'
|
||||
icon_state = "headphones"
|
||||
item_state = "headphones"
|
||||
slot_flags = SLOT_EARS | SLOT_HEAD | SLOT_NECK //Fluff item, put it whereever you want!
|
||||
actions_types = list(/datum/action/item_action/toggle_headphones)
|
||||
var/headphones_on = FALSE
|
||||
|
||||
/obj/item/clothing/ears/headphones/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/clothing/ears/headphones/update_icon()
|
||||
icon_state = "[initial(icon_state)]_[headphones_on? "on" : "off"]"
|
||||
item_state = "[initial(item_state)]_[headphones_on? "on" : "off"]"
|
||||
|
||||
/obj/item/clothing/ears/headphones/proc/toggle(owner)
|
||||
headphones_on = !headphones_on
|
||||
update_icon()
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(istype(H))
|
||||
H.update_inv_ears()
|
||||
H.update_inv_neck()
|
||||
H.update_inv_head()
|
||||
to_chat(owner, "<span class='notice'>You turn the music [headphones_on? "on. Untz Untz Untz!" : "off."]</span>")
|
||||
=======
|
||||
|
||||
//Ears: currently only used for headsets and earmuffs
|
||||
/obj/item/clothing/ears
|
||||
name = "ears"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
slot_flags = ITEM_SLOT_EARS
|
||||
resistance_flags = NONE
|
||||
|
||||
/obj/item/clothing/ears/earmuffs
|
||||
name = "earmuffs"
|
||||
desc = "Protects your hearing from loud noises, and quiet ones as well."
|
||||
icon_state = "earmuffs"
|
||||
item_state = "earmuffs"
|
||||
strip_delay = 15
|
||||
equip_delay_other = 25
|
||||
resistance_flags = FLAMMABLE
|
||||
flags_2 = BANG_PROTECT_2|HEALS_EARS_2
|
||||
|
||||
/obj/item/clothing/ears/headphones
|
||||
name = "headphones"
|
||||
desc = "Unce unce unce unce. Boop!"
|
||||
icon = 'icons/obj/clothing/accessories.dmi'
|
||||
icon_state = "headphones"
|
||||
item_state = "headphones"
|
||||
slot_flags = ITEM_SLOT_EARS | ITEM_SLOT_HEAD | ITEM_SLOT_NECK //Fluff item, put it whereever you want!
|
||||
actions_types = list(/datum/action/item_action/toggle_headphones)
|
||||
var/headphones_on = FALSE
|
||||
|
||||
/obj/item/clothing/ears/headphones/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/clothing/ears/headphones/update_icon()
|
||||
icon_state = "[initial(icon_state)]_[headphones_on? "on" : "off"]"
|
||||
item_state = "[initial(item_state)]_[headphones_on? "on" : "off"]"
|
||||
|
||||
/obj/item/clothing/ears/headphones/proc/toggle(owner)
|
||||
headphones_on = !headphones_on
|
||||
update_icon()
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(istype(H))
|
||||
H.update_inv_ears()
|
||||
H.update_inv_neck()
|
||||
H.update_inv_head()
|
||||
to_chat(owner, "<span class='notice'>You turn the music [headphones_on? "on. Untz Untz Untz!" : "off."]</span>")
|
||||
>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme
|
||||
|
||||
/obj/item/clothing/ears
|
||||
|
||||
name = "ears"
|
||||
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
throwforce = 0
|
||||
|
||||
slot_flags = ITEM_SLOT_EARS
|
||||
|
||||
resistance_flags = NONE
|
||||
|
||||
|
||||
/obj/item/clothing/ears/earmuffs
|
||||
|
||||
name = "earmuffs"
|
||||
|
||||
desc = "Protects your hearing from loud noises, and quiet ones as well."
|
||||
|
||||
icon_state = "earmuffs"
|
||||
|
||||
item_state = "earmuffs"
|
||||
|
||||
strip_delay = 15
|
||||
|
||||
equip_delay_other = 25
|
||||
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
flags_2 = BANG_PROTECT_2|HEALS_EARS_2
|
||||
|
||||
|
||||
/obj/item/clothing/ears/headphones
|
||||
|
||||
name = "headphones"
|
||||
|
||||
desc = "Unce unce unce unce. Boop!"
|
||||
|
||||
icon = 'icons/obj/clothing/accessories.dmi'
|
||||
|
||||
icon_state = "headphones"
|
||||
|
||||
item_state = "headphones"
|
||||
|
||||
@@ -1,71 +1,31 @@
|
||||
<<<<<<< HEAD
|
||||
/mob/living/carbon/monkey/can_equip(obj/item/I, slot, disable_warning = 0)
|
||||
switch(slot)
|
||||
if(slot_hands)
|
||||
if(SLOT_HANDS)
|
||||
if(get_empty_held_indexes())
|
||||
return TRUE
|
||||
return FALSE
|
||||
if(slot_wear_mask)
|
||||
if(SLOT_WEAR_MASK)
|
||||
if(wear_mask)
|
||||
return FALSE
|
||||
if( !(I.slot_flags & SLOT_MASK) )
|
||||
if( !(I.slot_flags & ITEM_SLOT_MASK) )
|
||||
return FALSE
|
||||
return TRUE
|
||||
if(slot_neck)
|
||||
if(SLOT_NECK)
|
||||
if(wear_neck)
|
||||
return FALSE
|
||||
if( !(I.slot_flags & SLOT_NECK) )
|
||||
if( !(I.slot_flags & ITEM_SLOT_NECK) )
|
||||
return FALSE
|
||||
return TRUE
|
||||
if(slot_head)
|
||||
if(SLOT_HEAD)
|
||||
if(head)
|
||||
return FALSE
|
||||
if( !(I.slot_flags & SLOT_HEAD) )
|
||||
if( !(I.slot_flags & ITEM_SLOT_HEAD) )
|
||||
return FALSE
|
||||
return TRUE
|
||||
if(slot_back)
|
||||
if(SLOT_BACK)
|
||||
if(back)
|
||||
return FALSE
|
||||
if( !(I.slot_flags & SLOT_BACK) )
|
||||
if( !(I.slot_flags & ITEM_SLOT_BACK) )
|
||||
return FALSE
|
||||
return TRUE
|
||||
return FALSE //Unsupported slot
|
||||
|
||||
|
||||
|
||||
=======
|
||||
/mob/living/carbon/monkey/can_equip(obj/item/I, slot, disable_warning = 0)
|
||||
switch(slot)
|
||||
if(SLOT_HANDS)
|
||||
if(get_empty_held_indexes())
|
||||
return TRUE
|
||||
return FALSE
|
||||
if(SLOT_WEAR_MASK)
|
||||
if(wear_mask)
|
||||
return FALSE
|
||||
if( !(I.slot_flags & ITEM_SLOT_MASK) )
|
||||
return FALSE
|
||||
return TRUE
|
||||
if(SLOT_NECK)
|
||||
if(wear_neck)
|
||||
return FALSE
|
||||
if( !(I.slot_flags & ITEM_SLOT_NECK) )
|
||||
return FALSE
|
||||
return TRUE
|
||||
if(SLOT_HEAD)
|
||||
if(head)
|
||||
return FALSE
|
||||
if( !(I.slot_flags & ITEM_SLOT_HEAD) )
|
||||
return FALSE
|
||||
return TRUE
|
||||
if(SLOT_BACK)
|
||||
if(back)
|
||||
return FALSE
|
||||
if( !(I.slot_flags & ITEM_SLOT_BACK) )
|
||||
return FALSE
|
||||
return TRUE
|
||||
return FALSE //Unsupported slot
|
||||
|
||||
|
||||
|
||||
>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme
|
||||
|
||||
Reference in New Issue
Block a user