Jump to content

[LITTLE PYTHON] ITEM_ANTIFLAG_DROP func


Guest Ezrekith

Recommended Posts

Guest Ezrekith

With this if your item has ITEM_ANTIFLAG_DROP antiflag the player can see it in the drop dialog if the player can drop the item or not.

Image at the end of the tutorial.

Open your uicommon.py

Search for this:

class QuestionDialogItem
!!!!!!!OR!!!!!!!
class QuestionDialog

In this function search for this:

		def Open(self):
			self.SetCenterPosition()
			self.SetTop()
			self.Show()

Add under:

	if item.IsAntiFlag(item.ANTIFLAG_DROP):
		self.acceptButton.Down()
		self.acceptButton.SetText("Can't drop")
		self.acceptButton.SetToolTipText("You can't drop this item!)

Open your uiscript/questiondialogitem.py

Search for:

					"name" : "accept",
					"type" : "button",

Change with this:

					"name" : "accept",
					"type" : "radio_button",

Gb-8xtVrSAyPI8uTqr2HSA.png.2b92ff4041cc6511e413a1863536c5f3.png

Edited by Ezrekith
Link to post
Share on other sites
  • 2 years later...
  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...