mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 10:22:13 +00:00
Merge pull request #4428 from Citadel-Station-13/upstream-merge-33419
[MIRROR] Lollipop dispensers can push lollipops into people's hands
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
add_logs(user, M, "stunned", src, "(INTENT: [uppertext(user.a_intent)])")
|
add_logs(user, M, "stunned", src, "(INTENT: [uppertext(user.a_intent)])")
|
||||||
|
|
||||||
/obj/item/borg/cyborghug
|
/obj/item/borg/cyborghug
|
||||||
name = "Hugging Module"
|
name = "hugging module"
|
||||||
icon_state = "hugmodule"
|
icon_state = "hugmodule"
|
||||||
desc = "For when a someone really needs a hug."
|
desc = "For when a someone really needs a hug."
|
||||||
var/mode = 0 //0 = Hugs 1 = "Hug" 2 = Shock 3 = CRUSH
|
var/mode = 0 //0 = Hugs 1 = "Hug" 2 = Shock 3 = CRUSH
|
||||||
@@ -336,6 +336,10 @@
|
|||||||
cooldown = world.time + 600
|
cooldown = world.time + 600
|
||||||
log_game("[user.ckey]([user]) used an emagged Cyborg Harm Alarm in ([user.x],[user.y],[user.z])")
|
log_game("[user.ckey]([user]) used an emagged Cyborg Harm Alarm in ([user.x],[user.y],[user.z])")
|
||||||
|
|
||||||
|
#define DISPENSE_LOLLIPOP_MODE 1
|
||||||
|
#define THROW_LOLLIPOP_MODE 2
|
||||||
|
#define THROW_GUMBALL_MODE 3
|
||||||
|
|
||||||
/obj/item/borg/lollipop
|
/obj/item/borg/lollipop
|
||||||
name = "lollipop fabricator"
|
name = "lollipop fabricator"
|
||||||
desc = "Reward good humans with this. Toggle in-module to switch between dispensing and high velocity ejection modes."
|
desc = "Reward good humans with this. Toggle in-module to switch between dispensing and high velocity ejection modes."
|
||||||
@@ -343,8 +347,9 @@
|
|||||||
var/candy = 30
|
var/candy = 30
|
||||||
var/candymax = 30
|
var/candymax = 30
|
||||||
var/charge_delay = 10
|
var/charge_delay = 10
|
||||||
var/charging = 0
|
var/charging = FALSE
|
||||||
var/mode = 1
|
var/mode = DISPENSE_LOLLIPOP_MODE
|
||||||
|
|
||||||
var/firedelay = 0
|
var/firedelay = 0
|
||||||
var/hitspeed = 2
|
var/hitspeed = 2
|
||||||
var/hitdamage = 0
|
var/hitdamage = 0
|
||||||
@@ -379,10 +384,22 @@
|
|||||||
var/obj/O = A
|
var/obj/O = A
|
||||||
if(O.density)
|
if(O.density)
|
||||||
return FALSE
|
return FALSE
|
||||||
new /obj/item/reagent_containers/food/snacks/lollipop(T)
|
|
||||||
|
var/obj/item/reagent_containers/food/snacks/lollipop/L = new(T)
|
||||||
|
|
||||||
|
var/into_hands = FALSE
|
||||||
|
if(ismob(A))
|
||||||
|
var/mob/M = A
|
||||||
|
into_hands = M.put_in_hands(L)
|
||||||
|
|
||||||
candy--
|
candy--
|
||||||
check_amount()
|
check_amount()
|
||||||
to_chat(user, "<span class='notice'>Dispensing lollipop...</span>")
|
|
||||||
|
if(into_hands)
|
||||||
|
user.visible_message("<span class='notice'>[user] dispenses a lollipop into the hands of [A].</span>", "<span class='notice'>You dispense a lollipop into the hands of [A].</span>", "<span class='italics'>You hear a click.</span>")
|
||||||
|
else
|
||||||
|
user.visible_message("<span class='notice'>[user] dispenses a lollipop.</span>", "<span class='notice'>You dispense a lollipop.</span>", "<span class='italics'>You hear a click.</span>")
|
||||||
|
|
||||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
@@ -427,29 +444,33 @@
|
|||||||
if(R.emagged)
|
if(R.emagged)
|
||||||
hitdamage = emaggedhitdamage
|
hitdamage = emaggedhitdamage
|
||||||
switch(mode)
|
switch(mode)
|
||||||
if(1)
|
if(DISPENSE_LOLLIPOP_MODE)
|
||||||
if(!proximity)
|
if(!proximity)
|
||||||
return FALSE
|
return FALSE
|
||||||
dispense(target, user)
|
dispense(target, user)
|
||||||
if(2)
|
if(THROW_LOLLIPOP_MODE)
|
||||||
shootL(target, user, click_params)
|
shootL(target, user, click_params)
|
||||||
if(3)
|
if(THROW_GUMBALL_MODE)
|
||||||
shootG(target, user, click_params)
|
shootG(target, user, click_params)
|
||||||
hitdamage = initial(hitdamage)
|
hitdamage = initial(hitdamage)
|
||||||
|
|
||||||
/obj/item/borg/lollipop/attack_self(mob/living/user)
|
/obj/item/borg/lollipop/attack_self(mob/living/user)
|
||||||
switch(mode)
|
switch(mode)
|
||||||
if(1)
|
if(DISPENSE_LOLLIPOP_MODE)
|
||||||
mode++
|
mode = THROW_LOLLIPOP_MODE
|
||||||
to_chat(user, "<span class='notice'>Module is now throwing lollipops.</span>")
|
to_chat(user, "<span class='notice'>Module is now throwing lollipops.</span>")
|
||||||
if(2)
|
if(THROW_LOLLIPOP_MODE)
|
||||||
mode++
|
mode = THROW_GUMBALL_MODE
|
||||||
to_chat(user, "<span class='notice'>Module is now blasting gumballs.</span>")
|
to_chat(user, "<span class='notice'>Module is now blasting gumballs.</span>")
|
||||||
if(3)
|
if(THROW_GUMBALL_MODE)
|
||||||
mode = 1
|
mode = DISPENSE_LOLLIPOP_MODE
|
||||||
to_chat(user, "<span class='notice'>Module is now dispensing lollipops.</span>")
|
to_chat(user, "<span class='notice'>Module is now dispensing lollipops.</span>")
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
#undef DISPENSE_LOLLIPOP_MODE
|
||||||
|
#undef THROW_LOLLIPOP_MODE
|
||||||
|
#undef THROW_GUMBALL_MODE
|
||||||
|
|
||||||
/obj/item/ammo_casing/caseless/gumball
|
/obj/item/ammo_casing/caseless/gumball
|
||||||
name = "Gumball"
|
name = "Gumball"
|
||||||
desc = "Why are you seeing this?!"
|
desc = "Why are you seeing this?!"
|
||||||
@@ -655,7 +676,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/item/borg/sight/xray
|
/obj/item/borg/sight/xray
|
||||||
name = "\proper x-ray Vision"
|
name = "\proper x-ray vision"
|
||||||
icon = 'icons/obj/decals.dmi'
|
icon = 'icons/obj/decals.dmi'
|
||||||
icon_state = "securearea"
|
icon_state = "securearea"
|
||||||
sight_mode = BORGXRAY
|
sight_mode = BORGXRAY
|
||||||
|
|||||||
Reference in New Issue
Block a user