Porting the twohanded component.

This commit is contained in:
Ghommie
2020-05-17 18:16:53 +02:00
parent 0a298c2361
commit 30ab79e09e
138 changed files with 2861 additions and 2601 deletions

View File

@@ -50,16 +50,13 @@
/mob/living/carbon/swap_hand(held_index)
. = ..()
if(!.)
var/obj/item/held_item = get_active_held_item()
to_chat(usr, "<span class='warning'>Your other hand is too busy holding [held_item].</span>")
return
if(!held_index)
held_index = (active_hand_index % held_items.len)+1
var/obj/item/item_in_hand = src.get_active_held_item()
if(item_in_hand) //this segment checks if the item in your hand is twohanded.
var/obj/item/twohanded/TH = item_in_hand
if(istype(TH))
if(TH.wielded == 1)
to_chat(usr, "<span class='warning'>Your other hand is too busy holding [TH]</span>")
return
var/oindex = active_hand_index
active_hand_index = held_index
if(hud_used)

View File

@@ -339,7 +339,7 @@
/obj/item/organ_storage,
/obj/item/borg/lollipop,
/obj/item/sensor_device,
/obj/item/twohanded/shockpaddles/cyborg)
/obj/item/shockpaddles/cyborg)
emag_modules = list(/obj/item/reagent_containers/borghypo/hacked)
ratvar_modules = list(
/obj/item/clockwork/slab/cyborg/medical,
@@ -910,7 +910,7 @@
/obj/item/borg/sight/meson,
/obj/item/storage/bag/ore/cyborg,
/obj/item/pickaxe/drill/cyborg,
/obj/item/twohanded/kinetic_crusher/cyborg,
/obj/item/kinetic_crusher/cyborg,
/obj/item/weldingtool/mini,
/obj/item/storage/bag/sheetsnatcher/borg,
/obj/item/t_scanner/adv_mining_scanner,
@@ -1027,7 +1027,7 @@
/obj/item/extinguisher/mini,
/obj/item/crowbar/cyborg,
/obj/item/reagent_containers/borghypo/syndicate,
/obj/item/twohanded/shockpaddles/syndicate,
/obj/item/shockpaddles/syndicate,
/obj/item/healthanalyzer/advanced,
/obj/item/surgical_drapes/advanced,
/obj/item/retractor,

View File

@@ -91,7 +91,7 @@
else
to_chat(user, "<span class='notice'>\the [src] already has this mop!</span>")
if(istype(W, /obj/item/twohanded/broom))
if(istype(W, /obj/item/broom))
if(bot_core.allowed(user) && open && broom == TRUE)
to_chat(user, "<span class='notice'>You add to \the [src] a broom speeding it up!</span>")
broom = TRUE

View File

@@ -158,7 +158,7 @@
var/client/C = L.client
SSmedals.UnlockMedal("Boss [BOSS_KILL_MEDAL]", C)
SSmedals.UnlockMedal("[medaltype] [BOSS_KILL_MEDAL]", C)
if(crusher_kill && istype(L.get_active_held_item(), /obj/item/twohanded/kinetic_crusher))
if(crusher_kill && istype(L.get_active_held_item(), /obj/item/kinetic_crusher))
SSmedals.UnlockMedal("[medaltype] [BOSS_KILL_MEDAL_CRUSHER]", C)
SSmedals.SetScore(BOSS_SCORE, C, 1)
SSmedals.SetScore(score_type, C, 1)

View File

@@ -317,7 +317,7 @@
suit = /obj/item/clothing/suit/armor/bone
gloves = /obj/item/clothing/gloves/bracer
if(prob(5))
back = pickweight(list(/obj/item/twohanded/bonespear = 3, /obj/item/twohanded/fireaxe/boneaxe = 2))
back = pickweight(list(/obj/item/spear/bonespear = 3, /obj/item/fireaxe/boneaxe = 2))
if(prob(10))
belt = /obj/item/storage/belt/mining/primitive
if(prob(30))
@@ -404,7 +404,7 @@
if(prob(5))
gloves = /obj/item/clothing/gloves/color/yellow
if(prob(10))
back = /obj/item/twohanded/spear
back = /obj/item/spear
else if(prob(80)) //Now they dont always have a backpack
back = /obj/item/storage/backpack
backpack_contents = list(/obj/item/stack/cable_coil = 1, /obj/item/assembly/flash = 1, /obj/item/storage/fancy/donut_box = 1, /obj/item/storage/fancy/cigarettes/cigpack_shadyjims = 1, /obj/item/lighter = 1)

View File

@@ -52,7 +52,7 @@
melee_damage_upper = 20
deathmessage = "collapses into a pile of bones, its gear falling to the floor!"
loot = list(/obj/effect/decal/remains/human,
/obj/item/twohanded/spear,
/obj/item/spear,
/obj/item/clothing/shoes/winterboots,
/obj/item/clothing/suit/hooded/wintercoat)

View File

@@ -493,17 +493,13 @@
mode()
/mob/living/simple_animal/swap_hand(hand_index)
. = ..()
if(!.)
return
if(!dextrous)
return ..()
return
if(!hand_index)
hand_index = (active_hand_index % held_items.len)+1
var/obj/item/held_item = get_active_held_item()
if(held_item)
if(istype(held_item, /obj/item/twohanded))
var/obj/item/twohanded/T = held_item
if(T.wielded == 1)
to_chat(usr, "<span class='warning'>Your other hand is too busy holding the [T.name].</span>")
return
var/oindex = active_hand_index
active_hand_index = hand_index
if(hud_used)

View File

@@ -745,7 +745,11 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
return FALSE
/mob/proc/swap_hand()
return
var/obj/item/held_item = get_active_held_item()
if(SEND_SIGNAL(src, COMSIG_MOB_SWAP_HANDS, held_item) & COMPONENT_BLOCK_SWAP)
to_chat(src, "<span class='warning'>Your other hand is too busy holding [held_item].</span>")
return FALSE
return TRUE
/mob/proc/activate_hand(selhand)
return