OpenXcom Forum
OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Support => Topic started by: wcho035 on January 03, 2020, 03:15:52 am
-
Hi, today I am retesting my coding for facilities. I found an anomaly. In my small hanger coding for facilities.rul I have
- type: STR_SMALL_HANGAR
provideBaseFunc: [SMALLCRAFT]
spriteShape: 1
spriteFacility: 575
buildCost: 1
buildTime: 1
monthlyCost: 1
crafts: 1
mapName: XBASE_SMHANGER
So from the coding above provideBaseFunc provide "SMALLCRAFT" services.
My skyranger coding.
- type: STR_SKYRANGER
requiresBuyBaseFunc: [LARGECRAFT] <------
sprite: 0
fuelMax: 1500
damageMax: 150
speedMax: 760
accel: 2
soldiers: 14
vehicles: 3
costBuy: 500000
costRent: 500000
forceShowInMonthlyCosts: true
refuelRate: 50
transferTime: 72
score: 200
battlescapeTerrainData:
name: PLANE
mapDataSets:
- BLANKS
- PLANE
mapBlocks:
- name: PLANE
width: 10
length: 20
Uses "LARGECRAFT" services only a 2X2 hanger provides.
Yet please see screenshot.
Have I used the services from those functions correctly?
-
There is no bug or code issue here, just you expecting a feature that doesn't exist. Your skyranger requires a large hangar to buy by baseFuncs, and you have three at that base. Therefore, you can buy a skyranger at the base. That's all the baseFuncs do.
There are no different "types" of hangar - the facility is either a hangar or not a hangar. If it doesn't have a craft in it, then it's eligible for a new craft to be placed there. baseFuncs do not have anything to do with whether the craft is placed in that facility.
-
Thank you Ohartenstein23, I was retesting a old feature I had disabled. From memory, large craft can’t be purchase with small hanger but large. However if the large hanger get sold, only large craft get transfer to which ever available hanger including a small one.
I may have misunderstood the requirebuybaseFunc