This commit is contained in:
joep van der velden
2018-10-11 22:55:10 +02:00
parent 44ba995aa6
commit c96adec91f
4 changed files with 26 additions and 1 deletions
+4
View File
@@ -341,6 +341,10 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
/obj/item/proc/on_found(mob/finder as mob)
return
// called when the giver gives it to the receiver
/obj/item/proc/on_give(mob/living/carbon/giver, mob/living/carbon/receiver)
return
// called after an item is placed in an equipment slot
// user is mob that equipped it
// slot uses the slot_X defines found in setup.dm
+19 -1
View File
@@ -147,6 +147,14 @@
wield(user)
..()
/obj/item/twohanded/required/on_give(mob/living/carbon/giver, mob/living/carbon/receiver)
var/obj/item/twohanded/required/H = receiver.get_inactive_hand()
if(H != null) //Check if he can wield it
receiver.drop_item() //Can't wear it so drop it
to_chat(receiver, "<span class='notice'>[src] is too cumbersome to carry in one hand!</span>")
return
equipped(receiver,receiver.hand ? slot_l_hand : slot_r_hand)
/obj/item/twohanded/required/equipped(mob/user, slot)
..()
if(slot == slot_l_hand || slot == slot_r_hand)
@@ -438,7 +446,7 @@
if(on)
playsound(loc, 'sound/weapons/chainsawstart.ogg', 50, 1)
force = on ? force_on : initial(force)
throwforce = on ? force_on : initial(force)
throwforce = on ? force_on : initial(throwforce)
icon_state = "gchainsaw_[on ? "on" : "off"]"
if(hitsound == "swing_hit")
@@ -453,6 +461,16 @@
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/twohanded/required/chainsaw/attack_hand(mob/user)
. = ..()
force = on ? force_on : initial(force)
throwforce = on ? force_on : initial(throwforce)
/obj/item/twohanded/required/chainsaw/on_give(mob/living/carbon/giver, mob/living/carbon/receiver)
. = ..()
force = on ? force_on : initial(force)
throwforce = on ? force_on : initial(throwforce)
/obj/item/twohanded/required/chainsaw/doomslayer
name = "OOOH BABY"
desc = "<span class='warning'>VRRRRRRR!!!</span>"
+2
View File
@@ -211,6 +211,7 @@
layer = 5
w_class = WEIGHT_CLASS_HUGE
force = 10
force_wielded = 10
throwforce = 13
throw_speed = 2
throw_range = 4
@@ -222,6 +223,7 @@
icon_state = "plant-36"
/obj/item/twohanded/required/kirbyplants/equipped(mob/living/user)
. = ..()
var/image/I = image(icon = 'icons/obj/flora/plants.dmi' , icon_state = src.icon_state, loc = user)
I.override = 1
user.add_alt_appearance("sneaking_mission", I, player_list)
+1
View File
@@ -56,6 +56,7 @@
target.update_inv_l_hand()
target.update_inv_r_hand()
target.visible_message("<span class='notice'> [usr.name] handed \the [I.name] to [target.name].</span>")
I.on_give(usr, target)
if("No")
target.visible_message("<span class='warning'> [usr.name] tried to hand [I.name] to [target.name] but [target.name] didn't want it.</span>")
else