-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIRROR] new syndicate item - bee smoker [MDB IGNORE] (#24450)
* new syndicate item - bee smoker (#78988) ## About The Pull Request this adds a new item for traitor botanists they can buy for 4 tc. it releases smoke which hypnotizes bees to follow ur every command, it can be used on a single bee or it can be used on a hive to hypnotize all the bees who live there. u can command the bees to enter or exit their beehive, and u can also command them to spiral around u where they will follow u and swirl around u to confuse whichever opponent u are fighting, and u can also command them to attack people. the bee smoker comes with some fuel but u can recharge it by putting cannabis into it. the stronger the weed the more fuel it will provide https://github.com/tgstation/tgstation/assets/138636438/18c9a350-8e24-4c49-abfa-dffb7622502f ## Why It's Good For The Game adds a traitor item which gives a new gameplay alternative for botanist and pacifist players. also i noticed the pet targetting datum was using some copy paste code so i made it a subtpye of the basic targetting datum ## Changelog :cl: add: added a new syndicate item - the bee smoker /:cl: --------- Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com> * new syndicate item - bee smoker --------- Co-authored-by: Ben10Omintrix <[email protected]> Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
- Loading branch information
1 parent
dc68835
commit 7f3f565
Showing
26 changed files
with
318 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 9 additions & 27 deletions
36
code/datums/ai/basic_mobs/targetting_datums/dont_target_friends.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
/// multiplier to decide how much fuel we add to a smoker | ||
#define WEED_WINE_MULTIPLIER 0.2 | ||
|
||
/obj/item/bee_smoker | ||
name = "bee smoker" | ||
desc = "A device which can be used to hypnotize bees!" | ||
icon = 'icons/obj/service/hydroponics/equipment.dmi' | ||
icon_state = "bee_smoker" | ||
inhand_icon_state = "bee_smoker" | ||
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi' | ||
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi' | ||
item_flags = NOBLUDGEON | ||
/// current level of fuel we have | ||
var/current_herb_fuel = 50 | ||
/// maximum amount of fuel we can hold | ||
var/max_herb_fuel = 50 | ||
/// are we currently activated? | ||
var/activated = FALSE | ||
/// sound to play when releasing smoke | ||
var/datum/looping_sound/beesmoke/beesmoke_loop | ||
///how much fuel it costs to use this item | ||
var/single_use_cost = 5 | ||
|
||
/obj/item/bee_smoker/Initialize(mapload) | ||
. = ..() | ||
beesmoke_loop = new(src) | ||
|
||
/obj/item/bee_smoker/attack_self(mob/user) | ||
. = ..() | ||
if(.) | ||
return TRUE | ||
if(!activated && current_herb_fuel <= 0) | ||
user.balloon_alert(user, "no fuel!") | ||
return TRUE | ||
alter_state() | ||
user.balloon_alert(user, "[activated ? "activated" : "deactivated"]") | ||
return TRUE | ||
|
||
/obj/item/bee_smoker/afterattack(atom/attacked_atom, mob/living/user, proximity) | ||
. = ..() | ||
|
||
if(!proximity) | ||
return | ||
|
||
. |= AFTERATTACK_PROCESSED_ITEM | ||
|
||
if(!activated) | ||
user.balloon_alert(user, "not activated!") | ||
return | ||
|
||
if(current_herb_fuel < single_use_cost) | ||
user.balloon_alert(user, "not enough fuel!") | ||
return | ||
|
||
current_herb_fuel -= single_use_cost | ||
playsound(src, 'sound/effects/spray2.ogg', 100, TRUE) | ||
var/turf/target_turf = get_turf(attacked_atom) | ||
new /obj/effect/temp_visual/mook_dust(target_turf) | ||
|
||
for(var/mob/living/basic/bee/friend in target_turf) | ||
if(friend.flags_1 & HOLOGRAM_1) | ||
continue | ||
friend.befriend(user) | ||
|
||
if(!istype(attacked_atom, /obj/structure/beebox)) | ||
return | ||
|
||
var/obj/structure/beebox/hive = attacked_atom | ||
for(var/mob/living/bee as anything in hive.bees) | ||
if(bee.flags_1 & HOLOGRAM_1) | ||
continue | ||
bee.befriend(user) | ||
|
||
/obj/item/bee_smoker/attackby(obj/item/herb, mob/living/carbon/human/user, list/modifiers) | ||
. = ..() | ||
if(.) | ||
return | ||
if(!istype(herb, /obj/item/food/grown/cannabis)) | ||
return | ||
var/obj/item/food/grown/cannabis/weed = herb | ||
if(isnull(weed.wine_power)) | ||
return TRUE | ||
if(current_herb_fuel == max_herb_fuel) | ||
user.balloon_alert(user, "already at maximum fuel!") | ||
return TRUE | ||
var/fuel_worth = weed.wine_power * WEED_WINE_MULTIPLIER | ||
current_herb_fuel = (current_herb_fuel + fuel_worth > max_herb_fuel) ? max_herb_fuel : current_herb_fuel + fuel_worth | ||
user.balloon_alert(user, "fuel added") | ||
qdel(weed) | ||
return TRUE | ||
|
||
/obj/item/bee_smoker/process(seconds_per_tick) | ||
current_herb_fuel-- | ||
if(current_herb_fuel <= 0) | ||
alter_state() | ||
|
||
/obj/item/bee_smoker/proc/alter_state() | ||
activated = !activated | ||
playsound(src, 'sound/items/welderdeactivate.ogg', 50, TRUE) | ||
|
||
if(!activated) | ||
beesmoke_loop.stop() | ||
QDEL_NULL(particles) | ||
STOP_PROCESSING(SSobj, src) | ||
return | ||
|
||
beesmoke_loop.start() | ||
START_PROCESSING(SSobj, src) | ||
particles = new /particles/smoke/bee_smoke | ||
|
||
/particles/smoke/bee_smoke | ||
lifespan = 0.4 SECONDS | ||
position = list(-12, 7, 0) | ||
velocity = list(0, 0.15, 0) | ||
fade = 2 | ||
|
||
#undef WEED_WINE_MULTIPLIER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.