Merge pull request #12656 from Ghommie/Ghommie-cit826
Fixing two handed items and etcetera.
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
|
||||
/// Triggered on equip of the item containing the component
|
||||
/datum/component/two_handed/proc/on_equip(datum/source, mob/user, slot)
|
||||
if(require_twohands && slot == ITEM_SLOT_HANDS) // force equip the item
|
||||
if(require_twohands && slot == SLOT_HANDS) // force equip the item
|
||||
wield(user)
|
||||
if(!user.is_holding(parent) && wielded && !require_twohands)
|
||||
unwield(user)
|
||||
|
||||
@@ -29,6 +29,11 @@
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
update_icon()
|
||||
|
||||
/obj/item/rcl/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_updates_onmob)
|
||||
AddComponent(/datum/component/two_handed)
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/rcl/proc/on_wield(obj/item/source, mob/user)
|
||||
active = TRUE
|
||||
@@ -37,10 +42,6 @@
|
||||
/obj/item/rcl/proc/on_unwield(obj/item/source, mob/user)
|
||||
active = FALSE
|
||||
|
||||
/obj/item/rcl/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_updates_onmob)
|
||||
|
||||
/obj/item/rcl/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
|
||||
@@ -72,6 +72,11 @@
|
||||
TEXT_ATTACK_TYPE_PROJECTILE = 4
|
||||
)
|
||||
|
||||
/obj/item/dualsaber/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
|
||||
/obj/item/dualsaber/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=3, force_wielded=34, \
|
||||
|
||||
@@ -430,6 +430,7 @@ GLOBAL_LIST_INIT(snow_recipes, list ( \
|
||||
singular_name = "alien alloy sheet"
|
||||
sheettype = "abductor"
|
||||
merge_type = /obj/item/stack/sheet/mineral/abductor
|
||||
walltype = /turf/closed/wall/mineral/abductor
|
||||
|
||||
GLOBAL_LIST_INIT(abductor_recipes, list ( \
|
||||
new/datum/stack_recipe("alien bed", /obj/structure/bed/abductor, 2, one_per_turf = 1, on_floor = 1), \
|
||||
|
||||
@@ -828,12 +828,11 @@
|
||||
var/obj/item/toy/cards/singlecard/H = new/obj/item/toy/cards/singlecard(user.loc)
|
||||
if(holo)
|
||||
holo.spawned += H // track them leaving the holodeck
|
||||
choice = cards[1]
|
||||
choice = popleft(cards)
|
||||
H.cardname = choice
|
||||
H.parentdeck = src
|
||||
var/O = src
|
||||
H.apply_card_vars(H,O)
|
||||
src.cards -= choice
|
||||
H.pickup(user)
|
||||
user.put_in_hands(H)
|
||||
user.visible_message("[user] draws a card from the deck.", "<span class='notice'>You draw a card from the deck.</span>")
|
||||
|
||||
Reference in New Issue
Block a user