Merge branch 'master' into upstream-merge-37597
This commit is contained in:
@@ -23,8 +23,9 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
||||
#define ON_BORDER_1 (1<<9) // item has priority to check when entering or leaving
|
||||
#define DROPDEL_1 (1<<10) // When dropped, it calls qdel on itself
|
||||
#define PREVENT_CLICK_UNDER_1 (1<<11) //Prevent clicking things below it on the same turf eg. doors/ fulltile windows
|
||||
#define HOLOGRAM_1 (1<<12)
|
||||
#define TESLA_IGNORE_1 (1<<13) // TESLA_IGNORE grants immunity from being targeted by tesla-style electricity
|
||||
#define NO_EMP_WIRES_1 (1<<12)
|
||||
#define HOLOGRAM_1 (1<<13)
|
||||
#define TESLA_IGNORE_1 (1<<14) // TESLA_IGNORE grants immunity from being targeted by tesla-style electricity
|
||||
|
||||
|
||||
//turf-only flags
|
||||
@@ -65,7 +66,3 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
||||
#define ACID_PROOF (1<<5) //acid stuck on it doesn't melt it.
|
||||
#define INDESTRUCTIBLE (1<<6) //doesn't take damage
|
||||
#define FREEZE_PROOF (1<<7) //can't be frozen
|
||||
|
||||
#define EMP_PROTECT_SELF (1<<0)
|
||||
#define EMP_PROTECT_CONTENTS (1<<1)
|
||||
#define EMP_PROTECT_WIRES (1<<2)
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#define ON_BLUEPRINTS (1<<5) //Are we visible on the station blueprints at roundstart?
|
||||
#define UNIQUE_RENAME (1<<6) // can you customize the description/name of the thing?
|
||||
#define USES_TGUI (1<<7) //put on things that use tgui on ui_interact instead of custom/old UI.
|
||||
#define FROZEN (1<<8)
|
||||
|
||||
// If you add new ones, be sure to add them to /obj/Initialize as well for complete mapping support
|
||||
|
||||
@@ -18,6 +19,8 @@
|
||||
#define IN_INVENTORY (1<<1) //is this item equipped into an inventory slot or hand of a mob? used for tooltips
|
||||
#define FORCE_STRING_OVERRIDE (1<<2) // used for tooltips
|
||||
#define NEEDS_PERMIT (1<<3) //Used by security bots to determine if this item is safe for public use.
|
||||
#define SLOWS_WHILE_IN_HAND (1<<4)
|
||||
#define NO_MAT_REDEMPTION (1<<5) // Stops you from putting things like an RCD or other items into an ORM or protolathe for materials.
|
||||
|
||||
// Flags for the clothing_flags var on /obj/item/clothing
|
||||
|
||||
|
||||
@@ -1072,19 +1072,19 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
|
||||
// Used to make the frozen item visuals for Freon.
|
||||
if(resistance_flags & FREEZE_PROOF)
|
||||
return
|
||||
if(!(flags_2 & FROZEN_2))
|
||||
if(!(obj_flags & FROZEN))
|
||||
name = "frozen [name]"
|
||||
add_atom_colour(GLOB.freon_color_matrix, TEMPORARY_COLOUR_PRIORITY)
|
||||
alpha -= 25
|
||||
flags_2 |= FROZEN_2
|
||||
obj_flags |= FROZEN
|
||||
|
||||
//Assumes already frozed
|
||||
/obj/proc/make_unfrozen()
|
||||
if(flags_2 & FROZEN_2)
|
||||
if(obj_flags & FROZEN)
|
||||
name = replacetext(name, "frozen ", "")
|
||||
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, GLOB.freon_color_matrix)
|
||||
alpha += 25
|
||||
flags_2 &= ~FROZEN_2
|
||||
obj_flags &= ~FROZEN
|
||||
|
||||
|
||||
//Converts an icon to base64. Operates by putting the icon in the iconCache savefile,
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
// An item worn in the ear slot with this component will heal your ears each
|
||||
// Life() tick, even if normally your ears would be too damaged to heal.
|
||||
|
||||
/datum/component/earhealing
|
||||
var/mob/living/carbon/wearer
|
||||
|
||||
/datum/component/earhealing/Initialize()
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED), .proc/equippedChanged)
|
||||
|
||||
/datum/component/earhealing/proc/equippedChanged(mob/living/carbon/user, slot)
|
||||
if (slot == SLOT_EARS && istype(user))
|
||||
if (!wearer)
|
||||
START_PROCESSING(SSobj, src)
|
||||
wearer = user
|
||||
else
|
||||
if (wearer)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
wearer = null
|
||||
|
||||
/datum/component/earhealing/process()
|
||||
if (!wearer)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
if(!wearer.has_trait(TRAIT_DEAF))
|
||||
var/obj/item/organ/ears/ears = wearer.getorganslot(ORGAN_SLOT_EARS)
|
||||
if (ears)
|
||||
ears.deaf = max(ears.deaf - 1, (ears.ear_damage < UNHEALING_EAR_DAMAGE ? 0 : 1)) // Do not clear deafness while above the unhealing ear damage threshold
|
||||
ears.ear_damage = max(ears.ear_damage - 0.1, 0)
|
||||
@@ -0,0 +1,26 @@
|
||||
// A dummy parent type used for easily making components that target an item's wearer rather than the item itself.
|
||||
|
||||
/datum/component/wearertargeting
|
||||
var/datum/component/mobhook
|
||||
var/list/valid_slots = list()
|
||||
var/list/signals = list()
|
||||
var/datum/callback/callback = CALLBACK(GLOBAL_PROC, .proc/pass)
|
||||
var/mobtype = /mob/living
|
||||
|
||||
/datum/component/wearertargeting/Initialize()
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED), .proc/checkMobHook)
|
||||
|
||||
/datum/component/wearertargeting/Destroy()
|
||||
QDEL_NULL(mobhook)
|
||||
return ..()
|
||||
|
||||
/datum/component/wearertargeting/proc/checkMobHook(mob/user, slot)
|
||||
if ((slot in valid_slots) && istype(user, mobtype))
|
||||
if (mobhook && mobhook.parent != user)
|
||||
QDEL_NULL(mobhook)
|
||||
if (!mobhook)
|
||||
mobhook = user.AddComponent(/datum/component/redirect, signals, callback)
|
||||
else
|
||||
QDEL_NULL(mobhook)
|
||||
@@ -117,7 +117,7 @@
|
||||
decrease = max(0, decrease)
|
||||
if((is_wet() & TURF_WET_ICE) && t > T0C) //Ice melts into water!
|
||||
for(var/obj/O in T.contents)
|
||||
if(O.flags_2 & FROZEN_2)
|
||||
if(O.obj_flags & FROZEN)
|
||||
O.make_unfrozen()
|
||||
add_wet(TURF_WET_WATER, max_time_left())
|
||||
dry(TURF_WET_ICE)
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
equip_cooldown = 10
|
||||
energy_drain = 250
|
||||
range = MELEE|RANGED
|
||||
flags_2 = NO_MAT_REDEMPTION_2
|
||||
item_flags = NO_MAT_REDEMPTION
|
||||
var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock.
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/rcd/Initialize()
|
||||
|
||||
@@ -129,7 +129,7 @@ RLD
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
max_matter = 160
|
||||
flags_2 = NO_MAT_REDEMPTION_2
|
||||
item_flags = NO_MAT_REDEMPTION
|
||||
has_ammobar = TRUE
|
||||
var/mode = 1
|
||||
var/ranged = FALSE
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
user.forceMove(R)
|
||||
playsound(src, 'sound/items/zip.ogg', 15, 1, -3)
|
||||
return (OXYLOSS)
|
||||
..()
|
||||
..()
|
||||
|
||||
// Bluespace bodybag
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
icon_state = "bluebodybag_folded"
|
||||
unfoldedbag_path = /obj/structure/closet/body_bag/bluespace
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags_2 = NO_MAT_REDEMPTION_2
|
||||
item_flags = NO_MAT_REDEMPTION
|
||||
|
||||
|
||||
/obj/item/bodybag/bluespace/examine(mob/user)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
|
||||
flags_1 = NOBLUDGEON_1
|
||||
flags_2 = NO_MAT_REDEMPTION_2
|
||||
item_flags = NO_MAT_REDEMPTION
|
||||
var/prox_check = TRUE //If the emag requires you to be in range
|
||||
|
||||
/obj/item/card/emag/bluespace
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
slot_flags = null
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
flags_2 = SLOWS_WHILE_IN_HAND_2
|
||||
item_flags = SLOWS_WHILE_IN_HAND
|
||||
|
||||
/obj/item/nullrod/tribal_knife/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
icon_state = "holdingpack"
|
||||
item_state = "holdingpack"
|
||||
resistance_flags = FIRE_PROOF
|
||||
flags_2 = NO_MAT_REDEMPTION_2
|
||||
item_flags = NO_MAT_REDEMPTION
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 50)
|
||||
component_type = /datum/component/storage/concrete/bluespace/bag_of_holding
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
name = "trash bag of holding"
|
||||
desc = "The latest and greatest in custodial convenience, a trashbag that is capable of holding vast quantities of garbage."
|
||||
icon_state = "bluetrashbag"
|
||||
flags_2 = NO_MAT_REDEMPTION_2
|
||||
item_flags = NO_MAT_REDEMPTION
|
||||
|
||||
/obj/item/storage/bag/trash/bluespace/ComponentInitialize()
|
||||
. = ..()
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
/obj/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
|
||||
..()
|
||||
if(flags_2 & FROZEN_2)
|
||||
if(obj_flags & FROZEN)
|
||||
visible_message("<span class='danger'>[src] shatters into a million pieces!</span>")
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
for(var/obj/I in contents)
|
||||
if(I.resistance_flags & FREEZE_PROOF)
|
||||
return
|
||||
if(!(I.flags_2 & FROZEN_2)) //let it go
|
||||
if(!(I.obj_flags & FROZEN))
|
||||
I.make_frozen_visual()
|
||||
for(var/mob/living/L in contents)
|
||||
if(L.bodytemperature <= 50)
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
//melting
|
||||
if(isobj(AM) && air && air.temperature > T0C)
|
||||
var/obj/O = AM
|
||||
if(O.flags_2 & FROZEN_2)
|
||||
if(O.obj_flags & FROZEN)
|
||||
O.make_unfrozen()
|
||||
|
||||
/turf/proc/is_plasteel_floor()
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
inhand_x_dimension = 64
|
||||
inhand_y_dimension = 64
|
||||
actions_types = list()
|
||||
flags_2 = SLOWS_WHILE_IN_HAND_2
|
||||
item_flags = SLOWS_WHILE_IN_HAND
|
||||
var/datum/action/innate/dash/cult/jaunt
|
||||
var/datum/action/innate/cult/spin2win/linked_action
|
||||
var/spinning = FALSE
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
armour_penetration = 1000
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
anchored = TRUE
|
||||
flags_2 = SLOWS_WHILE_IN_HAND_2
|
||||
item_flags = SLOWS_WHILE_IN_HAND
|
||||
var/team = WHITE_TEAM
|
||||
var/reset_cooldown = 0
|
||||
var/anyonecanpickup = TRUE
|
||||
|
||||
@@ -1251,7 +1251,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(H.back)
|
||||
. += H.back.slowdown
|
||||
for(var/obj/item/I in H.held_items)
|
||||
if(I.flags_2 & SLOWS_WHILE_IN_HAND_2)
|
||||
if(I.item_flags & SLOWS_WHILE_IN_HAND)
|
||||
. += I.slowdown
|
||||
var/stambufferinfluence = (H.bufferedstam*(100/H.stambuffer))*0.2 //CIT CHANGE - makes stamina buffer influence movedelay
|
||||
var/health_deficiency = ((100 + stambufferinfluence) - H.health + (H.getStaminaLoss()*0.75))//CIT CHANGE - reduces the impact of staminaloss on movement speed and makes stamina buffer influence movedelay
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
// No running around with open laptops in hands.
|
||||
flags_2 = SLOWS_WHILE_IN_HAND_2
|
||||
item_flags = SLOWS_WHILE_IN_HAND
|
||||
|
||||
screen_on = 0 // Starts closed
|
||||
var/start_open = TRUE // unless this var is set to 1
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/minigun
|
||||
casing_ejector = FALSE
|
||||
flags_2 = SLOWS_WHILE_IN_HAND_2
|
||||
item_flags = NEEDS_PERMIT | SLOWS_WHILE_IN_HAND
|
||||
var/obj/item/minigunpack/ammo_pack
|
||||
|
||||
/obj/item/gun/ballistic/minigun/Initialize()
|
||||
@@ -145,5 +145,3 @@
|
||||
|
||||
/obj/item/gun/ballistic/minigun/dropped(mob/living/user)
|
||||
ammo_pack.attach_gun(user)
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
flags_2 = NO_MAT_REDEMPTION_2
|
||||
item_flags = NEEDS_PERMIT | NO_MAT_REDEMPTION
|
||||
|
||||
/obj/item/gun/magic/staff/change
|
||||
name = "staff of change"
|
||||
|
||||
@@ -392,7 +392,7 @@ Burning extracts:
|
||||
throw_speed = 2
|
||||
force = 15 //Heavy, but hard to wield.
|
||||
attack_verb = list("bashed","pounded","slammed")
|
||||
flags_2 = SLOWS_WHILE_IN_HAND_2
|
||||
item_flags = SLOWS_WHILE_IN_HAND
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/shapeshift/slimeform
|
||||
@@ -417,4 +417,4 @@ Burning extracts:
|
||||
|
||||
/mob/living/simple_animal/slime/transformedslime/Reproduce() //Just in case.
|
||||
to_chat(src, "<span class='warning'>I can't reproduce...</span>")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -27,14 +27,9 @@
|
||||
// genetic deafness prevents the body from using the ears, even if healthy
|
||||
if(C.has_trait(TRAIT_DEAF))
|
||||
deaf = max(deaf, 1)
|
||||
else
|
||||
if(C.ears && (C.ears.flags_2 & HEALS_EARS_2))
|
||||
deaf = max(deaf - 1, 1)
|
||||
ear_damage = max(ear_damage - 0.1, 0)
|
||||
// if higher than UNHEALING_EAR_DAMAGE, no natural healing occurs.
|
||||
if(ear_damage < UNHEALING_EAR_DAMAGE)
|
||||
ear_damage = max(ear_damage - 0.05, 0)
|
||||
deaf = max(deaf - 1, 0)
|
||||
else if(ear_damage < UNHEALING_EAR_DAMAGE) // if higher than UNHEALING_EAR_DAMAGE, no natural healing occurs.
|
||||
ear_damage = max(ear_damage - 0.05, 0)
|
||||
deaf = max(deaf - 1, 0)
|
||||
|
||||
/obj/item/organ/ears/proc/restoreEars()
|
||||
deaf = 0
|
||||
|
||||
Reference in New Issue
Block a user