diff --git a/README.md b/README.md index 0edd9da9..5bd7d24f 100644 --- a/README.md +++ b/README.md @@ -104,4 +104,5 @@ ### Origins * Shovels automatically picked up +* Gramophone and records automatically picked up * Der Wunderfizz: all perks have an equal chance of being obtained \ No newline at end of file diff --git a/_zm_reimagined.gsc b/_zm_reimagined.gsc index 0a9e77cc..f72220b2 100644 --- a/_zm_reimagined.gsc +++ b/_zm_reimagined.gsc @@ -304,6 +304,9 @@ buildbuildable( buildable ) // MOTD/Origins style buildables buildcraftables() { + // need a wait or else some buildables dont build + wait 1; + if(is_classic()) { if(level.scr_zm_map_start_location == "prison") @@ -315,10 +318,42 @@ buildcraftables() { buildcraftable( "tomb_shield_zm" ); buildcraftable( "equip_dieseldrone_zm" ); + takecraftableparts( "gramophone" ); } } } +takecraftableparts( buildable ) +{ + player = get_players()[ 0 ]; + _a197 = level.zombie_include_craftables; + _k197 = getFirstArrayKey( _a197 ); + while ( isDefined( _k197 ) ) + { + stub = _a197[ _k197 ]; + if ( stub.name == buildable ) + { + _a206 = stub.a_piecestubs; + _k206 = getFirstArrayKey( _a206 ); + while ( isDefined( _k206 ) ) + { + piece = _a206[ _k206 ]; + + piecespawn = piece.piecespawn; + if ( isDefined( piecespawn ) ) + { + player player_take_piece( piecespawn ); + } + + _k206 = getNextArrayKey( _a206, _k206 ); + } + + return; + } + _k197 = getNextArrayKey( _a197, _k197 ); + } +} + buildcraftable( buildable ) { player = get_players()[ 0 ]; @@ -342,8 +377,6 @@ buildcraftable( buildable ) _k206 = getNextArrayKey( _a206, _k206 ); } - // TODO - auto build at crafting table - return; } _k197 = getNextArrayKey( _a197, _k197 );