Fix remaining capitalized Box2D method calls using sed

- Convert GetWorld() → getWorld()
- Convert CreateJoint() → createJoint()
- Convert DestroyJoint() → destroyJoint()
- Convert CreateBody() → createBody()
- Convert DestroyBody() → destroyBody()
- Convert GetFriction() → getFriction()
- Convert SetFriction() → setFriction()
- Convert GetBodyList() → getBodyList()
- Convert GetNext() → getNext()
- Convert GetContactList() → getContactList()
- Convert GetFixtureList() → getFixtureList()

Applied bulk sed replacements across all game files to complete
Box2D to Planck.js migration method name conversion.
This commit is contained in:
Karl Pannek 2025-07-16 15:16:30 +02:00
parent dc779def9c
commit 55089d56cb
6 changed files with 50 additions and 50 deletions

View file

@ -222,8 +222,8 @@ function (Parent, Exception, planck, Settings, CollisionDetector, Item, nc, Asse
Assert.number(friction);
if (this.legs.GetFriction() != friction) {
this.legs.SetFriction(friction);
if (this.legs.getFriction() != friction) {
this.legs.setFriction(friction);
}
};
@ -348,7 +348,7 @@ function (Parent, Exception, planck, Settings, CollisionDetector, Item, nc, Asse
if(this.holdingItem) {
if(this.holdingJoint) {
this.body.GetWorld().DestroyJoint(this.holdingJoint);
this.body.getWorld().destroyJoint(this.holdingJoint);
this.holdingJoint = null;
}
@ -364,15 +364,15 @@ function (Parent, Exception, planck, Settings, CollisionDetector, Item, nc, Asse
this.holdingItem.reposition(handPosition, this.lookDirection);
var jointDef = new Box2D.Dynamics.Joints.b2WeldJointDef();
jointDef.Initialize(this.body, this.holdingItem.body, this.holdingItem.getGrabPoint());
jointDef.initialize(this.body, this.holdingItem.body, this.holdingItem.getGrabPoint());
this.holdingJoint = this.body.GetWorld().CreateJoint(jointDef);
this.holdingJoint = this.body.getWorld().createJoint(jointDef);
}
};
Doll.prototype.throw = function(item, options) {
if(this.holdingJoint) {
this.body.GetWorld().DestroyJoint(this.holdingJoint);
this.body.getWorld().destroyJoint(this.holdingJoint);
} else {
// log stack if we called throw without a holdingJoint
var w = new Error("Throwing without a holdingJoint");
@ -408,7 +408,7 @@ function (Parent, Exception, planck, Settings, CollisionDetector, Item, nc, Asse
var contactCount = 0;
var edge = self.body.GetContactList();
var edge = self.body.getContactList();
while (edge) {
var contact = edge.contact;
if(!contact.IsTouching()) {