Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

New hooks #12

Closed
wants to merge 1 commit into from
Closed

New hooks #12

wants to merge 1 commit into from

Conversation

CoderCow
Copy link
Contributor

@CoderCow CoderCow commented Oct 4, 2012

Added hooks:
NpcHooks.UseDoor
NpcHooks.TriggerPressurePlate
ProjectileHooks.TriggerPressurePlate

I need these hooks to fully integrate my Advanced Circuits plugin into Terraria Server and would be thankful if you could merge these in.

@hakusaro
Copy link
Collaborator

hakusaro commented Oct 4, 2012

Sounds useful, if the code's okay.
On Oct 4, 2012 9:21 AM, "CoderCow" notifications@github.com wrote:

Added hooks:
NpcHooks.UseDoor
NpcHooks.TriggerPressurePlate
ProjectileHooks.TriggerPressurePlate

I need those hooks to fully integrate my Advanced Circuits plugin into

Terraria Server and would be thankful if you could merge these in.

You can merge this Pull Request by running:

git pull https://github.com/CoderCow/TerrariaAPI-Server master

Or view, comment on, or merge it at:

#12
Commit Summary

  • Added hooks:

File Changes

  • A Hooks/Classes/NpcUseDoorEventArgs.cs (29)
  • A Hooks/Classes/TriggerPressurePlateEventArgs.cs (37)
  • M Hooks/NpcHooks.cs (36)
  • M Hooks/ProjectileHooks.cs (19)
  • M Terraria/Collision.cs (24)
  • M Terraria/NPC.cs (80)
  • M Terraria/Player.cs (2)
  • M Terraria/Projectile.cs (2)
  • M TerrariaAPI-Server.csproj (335)

Patch Links

@CoderCow
Copy link
Contributor Author

CoderCow commented Oct 4, 2012

I also did some ingame testing and NPCs (friendly or mobs) walking over pressure plates as well as boulders that fall onto or roll over them raise the respective event.

NpcHooks.UseDoor is raised as a friendly NPC is about to open or close a door, same for mobs when they are about to open a door after they punched it several times. Though, if a mob punched a door several times but the door is unable to open because it is blocked, the event is spammed for each game frame as long as the npc stays close to that door. This should not be a big issue but I don't see a simple solution for that.

@k0rd
Copy link
Collaborator

k0rd commented Oct 4, 2012

If it becomes troublesome, we could always duplicate the first part of WorldGen.OpenDoor to check to see if the door is blocked to cut down on the event spam...

@CoderCow
Copy link
Contributor Author

CoderCow commented Oct 5, 2012

Yes, good idea.

@hakusaro
Copy link
Collaborator

hakusaro commented Oct 5, 2012

So I guess we'll wait on that?

NpcHooks.UseDoor
NpcHooks.TriggerPressurePlate
ProjectileHooks.TriggerPressurePlate
@CoderCow
Copy link
Contributor Author

CoderCow commented Oct 6, 2012

Updated and works fine.

@hakusaro
Copy link
Collaborator

hakusaro commented Oct 6, 2012

Should we API version this?

@Olink
Copy link
Collaborator

Olink commented Oct 7, 2012

Probably be wise :\

@CoderCow
Copy link
Contributor Author

CoderCow commented Jun 2, 2013

I'm sorry for all the delay, I guess?
As the API version was already ticked in the meantime, this seems to be out of question now.

@CoderCow CoderCow closed this Aug 3, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants