292 {
293 if (player.m_CorpseState != 0)
294 return;
296 EntityAI players_head = player.GetInventory().FindPlaceholderForSlot( slot_id );
297
298 if ( players_head )
299 {
301 {
302 case LifeSpanState.BEARD_NONE:
303 {
304 players_head.SetObjectTexture( 0, "");
305 players_head.SetObjectMaterial( 0, "");
306
309
310 player.SetLifeSpanStateVisible(LifeSpanState.BEARD_NONE);
311
312 break;
313 }
314 case LifeSpanState.BEARD_MEDIUM:
315 {
316 players_head.SetObjectTexture( 0, "");
317 players_head.SetObjectMaterial( 0, "");
318
321
322 player.SetLifeSpanStateVisible(LifeSpanState.BEARD_MEDIUM);
323
324 break;
325 }
326
327 case LifeSpanState.BEARD_LARGE:
328 {
329 players_head.SetObjectTexture( 0, "");
330 players_head.SetObjectMaterial( 0, "");
331
334
335 player.SetLifeSpanStateVisible(LifeSpanState.BEARD_LARGE);
336
337 break;
338 }
339
340 case LifeSpanState.BEARD_EXTRA:
341 {
344
346 LifespanLevel prev_level = lifespan_levels.Get(LifeSpanState.BEARD_LARGE);
347
350
351 player.SetLifeSpanStateVisible(LifeSpanState.BEARD_EXTRA);
352
353 break;
354 }
355
356 default:
357 {
358 Print(
"Lifespan state missing");
359 break;
360 }
361 }
362 }
363 }
ref map< string, ref array< ref LifespanLevel > > m_LifespanLevels
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
provides access to slot configuration
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto void Print(void var)
Prints content of variable to console/log.