| 33 | | int width = 1024; int height = 1024; |
|---|
| 34 | | PrpRootObject dtmroot = automation.hackFactory.createAndAddDynamicTextMap(prp, "dustDynamicBookTexture", width, height); |
|---|
| 35 | | |
|---|
| 36 | | //replace the texture with our dynamictextmap: |
|---|
| 37 | | PrpRootObject layerroot = prp.findObject("Map #8251", Typeid.plLayer); |
|---|
| 38 | | layerroot.hasChanged = true; |
|---|
| 39 | | x0006Layer layer = layerroot.castTo(); |
|---|
| 40 | | layer.texture = dtmroot.getref(); |
|---|
| 41 | | |
|---|
| 42 | | //add ptAttribDynamicMap to the pythonfilemod. |
|---|
| 43 | | PrpRootObject pfmroot = prp.findObject("cPythMachineBrain", Typeid.plPythonFileMod); |
|---|
| 44 | | pfmroot.hasChanged = true; |
|---|
| 45 | | x00A2Pythonfilemod pfm = pfmroot.castTo(); |
|---|
| 46 | | pfm.addListing(Pythonlisting.createWithRef(9, 90, dtmroot.getref())); |
|---|
| | 32 | |
|---|
| | 33 | if(filename.toLowerCase().endsWith("nexus_district_nxusbookmachine.prp")) |
|---|
| | 34 | { |
|---|
| | 35 | //replace the texture with our dynamictextmap: |
|---|
| | 36 | //PrpRootObject layerroot = prp.findObject("Map #8251", Typeid.plLayer); |
|---|
| | 37 | PrpRootObject layerroot = prp.findObject("Map #825", Typeid.plLayer); |
|---|
| | 38 | layerroot.hasChanged = true; |
|---|
| | 39 | x0006Layer layer = layerroot.castTo(); |
|---|
| | 40 | Uruobjectref dtmref = Uruobjectref.createDefaultWithTypeNamePagePagetype(Typeid.plDynamicTextMap, "dustDynamicBookTexture", Pageid.createFromPrefixSuffix(-2, 64), Pagetype.createWithType(4)); |
|---|
| | 41 | //layer.texture = dtmroot.getref(); |
|---|
| | 42 | layer.texture = dtmref; |
|---|
| | 43 | |
|---|
| | 44 | //add ptAttribDynamicMap to the pythonfilemod. |
|---|
| | 45 | //PrpRootObject pfmroot = prp.findObject("cPythMachineBrain", Typeid.plPythonFileMod); |
|---|
| | 46 | //pfmroot.hasChanged = true; |
|---|
| | 47 | //x00A2Pythonfilemod pfm = pfmroot.castTo(); |
|---|
| | 48 | //pfm.addListing(Pythonlisting.createWithRef(9, 90, dtmroot.getref())); |
|---|
| | 49 | |
|---|
| | 50 | } |
|---|
| | 51 | if(filename.toLowerCase().endsWith("gui_district_kiblackbar.prp")) |
|---|
| | 52 | { |
|---|
| | 53 | //create the dynamictextmap |
|---|
| | 54 | int width = 1024; int height = 1024; |
|---|
| | 55 | PrpRootObject dtmroot = automation.hackFactory.createAndAddDynamicTextMap(prp, "dustDynamicBookTexture", width, height); |
|---|
| | 56 | |
|---|
| | 57 | //add ptAttribDynamicMap to the pythonfilemod. |
|---|
| | 58 | PrpRootObject pfmroot = prp.findObject("KIHandler", Typeid.plPythonFileMod); |
|---|
| | 59 | pfmroot.hasChanged = true; |
|---|
| | 60 | x00A2Pythonfilemod pfm = pfmroot.castTo(); |
|---|
| | 61 | pfm.addListing(Pythonlisting.createWithRef(9, 90, dtmroot.getref())); |
|---|
| | 62 | |
|---|
| | 63 | //create references to the dynamictextmaps used by the book gui. |
|---|
| | 64 | Uruobjectref bkref = Uruobjectref.createDefaultWithTypeNamePagePagetype(Typeid.plDynamicTextMap, "LeftDTMap2_dynText", Pageid.createFromPrefixSuffix(-2, 54), Pagetype.createWithType(4)); |
|---|
| | 65 | pfm.addListing(Pythonlisting.createWithRef(9, 91, bkref)); |
|---|
| | 66 | Uruobjectref bkref2 = Uruobjectref.createDefaultWithTypeNamePagePagetype(Typeid.plDynamicTextMap, "RightDTMap2_dynText", Pageid.createFromPrefixSuffix(-2, 54), Pagetype.createWithType(4)); |
|---|
| | 67 | pfm.addListing(Pythonlisting.createWithRef(9, 92, bkref2)); |
|---|
| | 68 | } |
|---|