Revert "ports hat throwing"

This commit is contained in:
Dahlular
2021-01-20 09:20:55 -07:00
committed by GitHub
parent e79656c1ba
commit 893bd14014
17 changed files with 10 additions and 84 deletions
-2
View File
@@ -42,8 +42,6 @@
#define VOICEBOX_DISABLED (1<<7) //The voicebox is currently turned off.
#define IGNORE_HAT_TOSS (1<<8) //Hats with negative effects when worn (i.e the tinfoil hat).
#define SCAN_REAGENTS (1<<9) // Allows helmets and glasses to scan reagents.
#define SNUG_FIT (1<<8) //Prevents knock-off from things like hat-throwing.
#define ANTI_TINFOIL_MANEUVER (1<<9) //Hats with negative effects when worn (i.e the tinfoil hat).
// Flags for the organ_flags var on /obj/item/organ
+1 -3
View File
@@ -145,9 +145,7 @@ GLOBAL_LIST_INIT(bitfields, list(
"VOICEBOX_TOGGLABLE" = VOICEBOX_TOGGLABLE,
"VOICEBOX_DISABLED" = VOICEBOX_DISABLED,
"IGNORE_HAT_TOSS" = IGNORE_HAT_TOSS,
"SCAN_REAGENTS" = SCAN_REAGENTS,
"SNUG_FIT" = SNUG_FIT,
"ANTI_TINFOIL_MANEUVER" = ANTI_TINFOIL_MANEUVER,
"SCAN_REAGENTS" = SCAN_REAGENTS
),
"tesla_flags" = list(
"TESLA_MOB_DAMAGE" = TESLA_MOB_DAMAGE,
-1
View File
@@ -43,7 +43,6 @@ SUBSYSTEM_DEF(throwing)
var/atom/movable/thrownthing
var/atom/target
var/turf/target_turf
var/target_zone
var/init_dir
var/maxrange
var/speed
-2
View File
@@ -627,8 +627,6 @@
TT.diagonals_first = diagonals_first
TT.force = force
TT.callback = callback
if(!QDELETED(thrower))
TT.target_zone = thrower.zone_selected
var/dist_x = abs(target.x - src.x)
var/dist_y = abs(target.y - src.y)
-44
View File
@@ -40,50 +40,6 @@
muzzle_var = NORMAL_STYLE
H.update_inv_head()
///Special throw_impact for hats to frisbee hats at people to place them on their heads/attempt to de-hat them.
/obj/item/clothing/head/throw_impact(atom/hit_atom, datum/thrownthing/thrownthing)
. = ..()
///if the thrown object's target zone isn't the head
if(thrownthing.target_zone != BODY_ZONE_HEAD)
return
///ignore any hats with the tinfoil counter-measure enabled
if(clothing_flags & ANTI_TINFOIL_MANEUVER)
return
///if the hat happens to be capable of holding contents and has something in it. mostly to prevent super cheesy stuff like stuffing a mini-bomb in a hat and throwing it
if(LAZYLEN(contents))
return
if(iscarbon(hit_atom))
var/mob/living/carbon/H = hit_atom
if(istype(H.head, /obj/item))
var/obj/item/WH = H.head
///check if the item has NODROP
if(HAS_TRAIT(WH, TRAIT_NODROP))
H.visible_message("<span class='warning'>[src] bounces off [H]'s [WH.name]!", "<span class='warning'>[src] bounces off your [WH.name], falling to the floor.</span>")
return
///check if the item is an actual clothing head item, since some non-clothing items can be worn
if(istype(WH, /obj/item/clothing/head))
var/obj/item/clothing/head/WHH = WH
///SNUG_FIT hats are immune to being knocked off
if(WHH.clothing_flags & SNUG_FIT)
H.visible_message("<span class='warning'>[src] bounces off [H]'s [WHH.name]!", "<span class='warning'>[src] bounces off your [WHH.name], falling to the floor.</span>")
return
///if the hat manages to knock something off
if(H.dropItemToGround(WH))
H.visible_message("<span class='warning'>[src] knocks [WH] off [H]'s head!</span>", "<span class='warning'>[WH] is suddenly knocked off your head by [src]!</span>")
if(H.equip_to_slot_if_possible(src, SLOT_HEAD, FALSE, TRUE))
H.visible_message("<span class='notice'>[src] lands neatly on [H]'s head!", "<span class='notice'>[src] lands perfectly onto your head!</span>")
return
if(iscyborg(hit_atom))
var/mob/living/silicon/robot/R = hit_atom
///hats in the borg's blacklist bounce off
if(!is_type_in_typecache(src, R.equippable_hats) || R.hat_offset == INFINITY)
R.visible_message("<span class='warning'>[src] bounces off [R]!", "<span class='warning'>[src] bounces off you, falling to the floor.</span>")
return
else
R.visible_message("<span class='notice'>[src] lands neatly on top of [R].", "<span class='notice'>[src] lands perfectly on top of you.</span>")
R.place_on_head(src) //hats aren't designed to snugly fit borg heads or w/e so they'll always manage to knock eachother off
/obj/item/clothing/head/worn_overlays(isinhands = FALSE)
. = list()
+2 -7
View File
@@ -13,14 +13,12 @@
/obj/item/clothing/head/collectable/slime
name = "collectable slime cap!"
desc = "It just latches right in place!"
clothing_flags = SNUG_FIT
icon_state = "slime"
dynamic_hair_suffix = ""
/obj/item/clothing/head/collectable/xenom
name = "collectable xenomorph helmet!"
desc = "Hiss hiss hiss!"
clothing_flags = SNUG_FIT
icon_state = "xenom"
/obj/item/clothing/head/collectable/chef
@@ -71,14 +69,13 @@
/obj/item/clothing/head/collectable/welding
name = "collectable welding helmet"
desc = "A collectable welding helmet. Now with 80% less lead! Not for actual welding. Any welding done while wearing this helmet is done so at the owner's own risk!"
clothing_flags = SNUG_FIT
icon_state = "welding"
item_state = "welding"
resistance_flags = NONE
/obj/item/clothing/head/collectable/slime
name = "collectable slime hat"
desc = "Just like a real brain slug!"
clothing_flags = SNUG_FIT
icon_state = "headslime"
item_state = "headslime"
@@ -124,7 +121,6 @@
/obj/item/clothing/head/collectable/hardhat
name = "collectable hard hat"
desc = "WARNING! Offers no real protection, or luminosity, but damn, is it fancy!"
clothing_flags = SNUG_FIT
icon_state = "hardhat0_yellow"
item_state = "hardhat0_yellow"
@@ -145,15 +141,14 @@
/obj/item/clothing/head/collectable/thunderdome
name = "collectable Thunderdome helmet"
desc = "Go Red! I mean Green! I mean Red! No Green!"
clothing_flags = SNUG_FIT
icon_state = "thunderdome"
item_state = "thunderdome"
resistance_flags = NONE
flags_inv = HIDEHAIR
/obj/item/clothing/head/collectable/swat
name = "collectable SWAT helmet"
desc = "That's not real blood. That's red paint." //Reference to the actual description
clothing_flags = SNUG_FIT
icon_state = "swat"
item_state = "swat"
resistance_flags = NONE
+1 -2
View File
@@ -9,7 +9,6 @@
var/on = FALSE
item_color = "yellow" //Determines used sprites: hardhat[on]_[item_color] and hardhat[on]_[item_color]2 (lying down sprite)
armor = list("melee" = 15, "bullet" = 5, "laser" = 20,"energy" = 10, "bomb" = 20, "bio" = 10, "rad" = 20, "fire" = 100, "acid" = 50)
clothing_flags = SNUG_FIT
flags_inv = 0
actions_types = list(/datum/action/item_action/toggle_helmet_light)
resistance_flags = FIRE_PROOF
@@ -159,4 +158,4 @@
/obj/item/clothing/head/hardhat/weldhat/dblue
icon_state = "hardhat0_dblue"
item_state = "hardhat0_dblue"
item_color = "dblue"
item_color = "dblue"
+1 -1
View File
@@ -10,7 +10,7 @@
heat_protection = HEAD
max_heat_protection_temperature = HELMET_MAX_TEMP_PROTECT
strip_delay = 60
clothing_flags = SNUG_FIT
resistance_flags = NONE
flags_cover = HEADCOVERSEYES
flags_inv = HIDEHAIR
-8
View File
@@ -67,14 +67,12 @@
desc = "A plastic replica of a Syndicate agent's space helmet. You'll look just like a real murderous Syndicate agent in this! This is a toy, it is not made for use in space!"
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
mutantrace_variation = MUTANTRACE_VARIATION
clothing_flags = SNUG_FIT
/obj/item/clothing/head/cueball
name = "cueball helmet"
desc = "A large, featureless white orb meant to be worn on your head. How do you even see out of this thing?"
icon_state = "cueball"
item_state="cueball"
clothing_flags = SNUG_FIT
flags_cover = HEADCOVERSEYES|HEADCOVERSMOUTH
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
@@ -83,7 +81,6 @@
desc = "A ball of white styrofoam. So festive."
icon_state = "snowman_h"
item_state = "snowman_h"
clothing_flags = SNUG_FIT
flags_cover = HEADCOVERSEYES
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
@@ -92,7 +89,6 @@
desc = "Fight for what's righteous!"
icon_state = "justicered"
item_state = "justicered"
clothing_flags = SNUG_FIT
flags_inv = HIDEHAIR|HIDEEARS|HIDEEYES|HIDEFACE|HIDEFACIALHAIR|HIDESNOUT
flags_cover = HEADCOVERSEYES
@@ -172,14 +168,12 @@
icon_state = "griffinhat"
item_state = "griffinhat"
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
clothing_flags = SNUG_FIT
/obj/item/clothing/head/bearpelt
name = "bear pelt hat"
desc = "Fuzzy."
icon_state = "bearpelt"
item_state = "bearpelt"
clothing_flags = SNUG_FIT
/obj/item/clothing/head/xenos
name = "xenos helmet"
@@ -187,7 +181,6 @@
item_state = "xenos_helm"
desc = "A helmet made out of chitinous alien hide."
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
clothing_flags = SNUG_FIT
/obj/item/clothing/head/fedora
name = "fedora"
@@ -309,7 +302,6 @@
desc = "When everything's going to crab, protecting your head is the best choice."
icon_state = "lobster_hat"
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
clothing_flags = SNUG_FIT
/obj/item/clothing/head/drfreezehat
name = "doctor freeze's wig"
@@ -29,7 +29,6 @@
visor_flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
resistance_flags = FIRE_PROOF
mutantrace_variation = MUTANTRACE_VARIATION
clothing_flags = SNUG_FIT
/obj/item/clothing/head/welding/attack_self(mob/user)
weldingvisortoggle(user)
@@ -116,7 +115,6 @@
item_state = "hardhat0_pumpkin"
item_color = "pumpkin"
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
clothing_flags = SNUG_FIT
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
brightness_on = 2 //luminosity when on
flags_cover = HEADCOVERSEYES
@@ -165,7 +163,6 @@
desc = "A helmet made out of a box."
icon_state = "cardborg_h"
item_state = "cardborg_h"
clothing_flags = SNUG_FIT
flags_cover = HEADCOVERSEYES
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
@@ -230,7 +227,6 @@
desc = "A crude helmet made out of bronze plates. It offers very little in the way of protection."
icon = 'icons/obj/clothing/clockwork_garb.dmi'
icon_state = "clockwork_helmet_old"
clothing_flags = SNUG_FIT
flags_inv = HIDEEARS|HIDEHAIR
armor = list("melee" = 5, "bullet" = 0, "laser" = -5, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = 20)
@@ -242,7 +238,6 @@
armor = list("melee" = 0, "bullet" = 0, "laser" = -5,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = -5, "fire" = 0, "acid" = 0)
equip_delay_other = 140
var/datum/brain_trauma/mild/phobia/paranoia
clothing_flags = ANTI_TINFOIL_MANEUVER
/obj/item/clothing/head/foilhat/equipped(mob/living/carbon/human/user, slot)
..()
@@ -4,7 +4,7 @@
name = "space helmet"
icon_state = "spaceold"
desc = "A special helmet with solar UV shielding to protect your eyes from harmful rays."
clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS | SNUG_FIT
clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS
item_state = "spaceold"
permeability_coefficient = 0.01
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 50, "fire" = 80, "acid" = 70)
@@ -5,7 +5,6 @@
icon_state = "hardsuit0-engineering"
item_state = "eng_helm"
max_integrity = 300
clothing_flags = SNUG_FIT
armor = list("melee" = 10, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 75, "fire" = 50, "acid" = 75)
var/basestate = "hardsuit"
var/brightness_on = 4 //luminosity when on
+1 -1
View File
@@ -4,7 +4,7 @@
icon_state = "bio"
desc = "A hood that protects the head and face from biological contaminants."
permeability_coefficient = 0.01
clothing_flags = THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT | SNUG_FIT
clothing_flags = THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 60, "fire" = 30, "acid" = 100)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDEFACE|HIDESNOUT
resistance_flags = ACID_PROOF
-2
View File
@@ -75,7 +75,6 @@
name = "goliath cloak hood"
icon_state = "golhood"
desc = "A protective & concealing hood."
clothing_flags = SNUG_FIT
armor = list("melee" = 35, "bullet" = 10, "laser" = 25, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60)
flags_inv = HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR
@@ -85,7 +84,6 @@
desc = "A suit of armour fashioned from the remains of an ash drake."
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe, /obj/item/twohanded/spear)
armor = list("melee" = 70, "bullet" = 30, "laser" = 50, "energy" = 40, "bomb" = 70, "bio" = 60, "rad" = 50, "fire" = 100, "acid" = 100)
clothing_flags = SNUG_FIT
hoodtype = /obj/item/clothing/head/hooded/cloakhood/drake
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
+2 -2
View File
@@ -58,7 +58,7 @@
name = "bomb hood"
desc = "Use in case of bomb."
icon_state = "bombsuit"
clothing_flags = THICKMATERIAL | SNUG_FIT
clothing_flags = THICKMATERIAL
armor = list("melee" = 20, "bullet" = 0, "laser" = 20,"energy" = 10, "bomb" = 100, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50)
flags_inv = HIDEFACE|HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
dynamic_hair_suffix = ""
@@ -123,7 +123,7 @@
name = "radiation hood"
icon_state = "rad"
desc = "A hood with radiation protective properties. The label reads, 'Made with lead. Please do not consume insulation.'"
clothing_flags = THICKMATERIAL | SNUG_FIT
clothing_flags = THICKMATERIAL
flags_inv = HIDEMASK|HIDEEARS|HIDEFACE|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 60, "rad" = 100, "fire" = 30, "acid" = 30)
strip_delay = 60
-1
View File
@@ -7,7 +7,6 @@
armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 100, "acid" = 100)
strip_delay = 50
equip_delay_other = 50
clothing_flags = SNUG_FIT
resistance_flags = FIRE_PROOF | ACID_PROOF
dog_fashion = /datum/dog_fashion/head/blue_wizard
@@ -4,7 +4,7 @@
desc = "Keeps the lil buzzing buggers out of your eyes."
icon_state = "beekeeper"
item_state = "beekeeper"
clothing_flags = THICKMATERIAL | SNUG_FIT
clothing_flags = THICKMATERIAL
/obj/item/clothing/suit/beekeeper_suit