Jump to content

Merm Prince's name shows up as "Merm", not "Royal-In-Progress"


Hornete
  • Pending

image.png.6da02519b7230cc302fbaa928bfa8d94.png

Merm that become princes of the throne are supposed to have their named changed to "Royal-In-Progress". However this only works on forest-only worlds(aka one shard worlds) to the host, as the change in name only takes effect on the server side in mermkingmanager.lua
 

function MermKingManager:ShouldGoToThrone(merm, throne)
	if throne ~= nil and self:IsThroneValid(throne) then
		if self:GetKing() == nil and (self:GetCandidate(throne) == nil or self:IsThroneCandidate(merm, throne)) then
			if self:GetCandidate(throne) == nil then
				self.candidates[throne] = merm
				merm.nameoverride = "MERM_PRINCE"
                self.inst:ListenForEvent("onremove", OnCandidateRemoved, merm)
				self.inst:ListenForEvent("death", OnCandidateRemoved, merm)
			end
			return true
		end
	end

	return false
end



It would likely be better to define a displaynamefn function and then add/remove a tag when the Merm should inherit the name

local function DisplayNameFn(inst)
	return inst:HasTag("mermprince") and STRINGS.NAMES.MERM_PRINCE or nil
end

--fn
inst.displaynamefn = DisplayNameFn

 


Steps to Reproduce

1. Crown a merm on a one shard world
2. Notice the name change is working as properly
3. Repeat steps 1 and 2 on a forest + caves world
4. Notice the name change is NOT working properly.

  • Like 2
  • Sad Dupe 1
  • Potato Cup 1



User Feedback


There are no comments to display.



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...