Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dwasint committed Sep 23, 2023
1 parent ee1c321 commit 1459348
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 6 deletions.
26 changes: 24 additions & 2 deletions monkestation/code/game/objects/items/choice_beacon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
company_message = span_bold("Pet request received. Your friend is on the way.")
var/default_name = "Stinko"

var/static/list/pet_commands = list(
/datum/pet_command/idle,
/datum/pet_command/free,
/datum/pet_command/follow,
/datum/pet_command/point_targetting/fetch,
/datum/pet_command/play_dead,
)

/obj/item/choice_beacon/pet/generate_display_names()
var/static/list/pet_list
if(!pet_list)
Expand All @@ -20,8 +28,8 @@
/mob/living/simple_animal/parrot,
/mob/living/basic/butterfly,
/mob/living/basic/bee/friendly,
/mob/living/simple_animal/crab,
/mob/living/simple_animal/crab/spycrab,
/mob/living/basic/crab,
/mob/living/basic/crab/spycrab,
/mob/living/basic/pet/penguin/baby,
/mob/living/basic/pet/fox,
/mob/living/simple_animal/pet/cat,
Expand Down Expand Up @@ -63,6 +71,20 @@
your_pet.name = name
your_pet.real_name = name

if(isbasicmob(your_pet))
var/mob/living/basic/pet = your_pet
pet.befriend(user)
var/datum/component/obeys_commands/checking = pet.GetComponent(/datum/component/obeys_commands)
if(!checking)
pet.AddComponent(/datum/component/obeys_commands, pet_commands)

var/list/new_planning_subtree = list()
new_planning_subtree |= /datum/ai_planning_subtree/pet_planning

for(var/datum/ai_planning_subtree/listed_tree as anything in pet.ai_controller.planning_subtrees)
new_planning_subtree |= listed_tree.type
pet.ai_controller.replace_planning_subtrees(new_planning_subtree)

new /obj/effect/pod_landingzone(get_turf(src), pod)

uses--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
default_name = "Spy Crab"
company_source = "Mann Co."
company_message = "Prepare for infiltrator deployment."
donator_pet = /mob/living/simple_animal/crab/spycrab
donator_pet = /mob/living/basic/crab/spycrab

/obj/item/choice_beacon/pet/donator/void_mothroach
name = "Secret Beacon of the Stars"
Expand Down
4 changes: 2 additions & 2 deletions monkestation/code/modules/donator/code/mob/pets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
head_icon = 'monkestation/code/modules/donator/icons/mob/pets_held.dmi'
gold_core_spawnable = NO_SPAWN

/mob/living/simple_animal/crab/spycrab
/mob/living/basic/crab/spycrab
name = "spy crab"
desc = "hon hon hon"
icon = 'monkestation/code/modules/donator/icons/mob/pets.dmi'
Expand All @@ -20,7 +20,7 @@
icon_dead = "crab_dead"
gold_core_spawnable = NO_SPAWN

/mob/living/simple_animal/crab/spycrab/Initialize(mapload)
/mob/living/basic/crab/spycrab/Initialize(mapload)
. = ..()
var/random_icon = pick("crab_red","crab_blue")
icon_state = random_icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
var/room_width = 17
var/room_height = 10

/obj/effect/spawner/random_bar/New()
/obj/effect/spawner/random_arena_spawner/New()
if(!isnull(SSmapping.random_arena_spawners))
SSmapping.random_arena_spawners += src

Expand Down
18 changes: 18 additions & 0 deletions monkestation/code/modules/ghost_players/arena/fight_button.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
/obj/structure/fight_button/Initialize(mapload)
. = ..()
update_maptext()
register_context()

/obj/structure/fight_button/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()
context[SCREENTIP_CONTEXT_LMB] = "Join Duel"
context[SCREENTIP_CONTEXT_RMB] = "Leave Duel"
return CONTEXTUAL_SCREENTIP_SET

/obj/structure/fight_button/proc/update_maptext()
var/string = "Player One:[player_one ? "[player_one.real_name]" : "No One"] \n Player Two:[player_two ? "[player_two.real_name]" : "No One"] \n Weapon of Choice: [initial(weapon_of_choice.name)]\n Wager: [payout]"
Expand Down Expand Up @@ -67,6 +74,17 @@
update_maptext()
addtimer(CALLBACK(src, PROC_REF(prep_round)), 5 SECONDS)


/obj/structure/fight_button/attack_hand_secondary(mob/user, list/modifiers)
. = ..()
if(user == player_one)
break_off_game()
player_one = null

else if(user == player_two)
player_two.linked_button = null
player_two = null

/obj/structure/fight_button/proc/remove_user(mob/living/carbon/human/ghost/vanisher)
if(player_one == vanisher)
break_off_game()
Expand Down

0 comments on commit 1459348

Please sign in to comment.