// Range: -1 Access: 0 Flags: ( 0, 4, 255 ) public static dynamic AStar( dynamic start = null, dynamic end = null, Mob_Living_SimpleAnimal atom = null, System.Reflection.MethodInfo dist = null, dynamic maxnodes = null, dynamic maxnodedepth = null, dynamic mintargetdist = null, System.Reflection.MethodInfo adjacent = null, Ent_Item_Weapon_Card_Id id = null, dynamic exclude = null, bool? simulated_only = null ) { Heap open = null; ByTable closed = null; ByTable path = null; dynamic cur = null; bool? closeenough = null; dynamic L = null; dynamic T = null; dynamic newg = null; PathNode PN = null; dynamic T2 = null; double? i = null; if ( maxnodedepth == null ) { maxnodedepth = 30; } if ( adjacent == null ) { adjacent = typeof(Tile).GetMethod( "reachableAdjacentTurfs" ); } if ( id == null ) { id = null; } if ( exclude == null ) { exclude = null; } if ( simulated_only == null ) { simulated_only = true; } if ( Lang13.Bool( maxnodes ) ) { if ( Lang13.Double( Lang13.call( Lang13.bindf( start, dist ), end ) ) > Lang13.Double( maxnodes ) ) { return 0; } maxnodedepth = maxnodes; } open = new Heap( typeof(GlobalFuncs).GetMethod( "HeapPathWeightCompare" ) ); closed = new ByTable(); path = null; start = GlobalFuncs.get_turf( start ); if ( !Lang13.Bool( start ) ) { return 0; } open.Insert( new PathNode( start, null, false, Lang13.call( Lang13.bindf( start, dist ), end ), false ) ); while (!open.IsEmpty() && !( path != null )) { cur = open.Pop(); closed.Add( cur.source ); closeenough = null; if ( Lang13.Bool( mintargetdist ) ) { closeenough = Lang13.Double( Lang13.call( Lang13.bindf( cur.source, dist ), end ) ) <= Lang13.Double( mintargetdist ); } if ( Lang13.Bool( maxnodedepth ) && Lang13.Double( cur.nt ) > Lang13.Double( maxnodedepth ) ) { continue; } if ( cur.source == end || closeenough == true ) { path = new ByTable(); path.Add( cur.source ); while (Lang13.Bool( cur.prevNode )) { cur = cur.prevNode; path.Add( cur.source ); } break; } L = Lang13.call( Lang13.bindf( cur.source, adjacent ), atom, id, simulated_only ); T = null; foreach (dynamic _a in L ) { T = _a; if ( T == exclude || closed.contains( T ) ) { continue; } newg = cur.g + Lang13.call( Lang13.bindf( cur.source, dist ), T ); if ( !Lang13.Bool( T.PNode ) ) { open.Insert( new PathNode( T, cur, Lang13.Bool( newg ), Lang13.call( Lang13.bindf( T, dist ), end ), Lang13.Bool( cur.nt + 1 ) ) ); } else if ( Lang13.Double( newg ) < Lang13.Double( T.PNode.g ) ) { T.PNode.prevNode = cur; T.PNode.g = newg; ((dynamic)T.PNode).calc_f(); T.PNode.nt = cur.nt + 1; open.ReSort( T.PNode ); } }; } PN = null; foreach (dynamic _b in open.L ) { if ( !( _b is PathNode ) ) { continue; } PN = _b; PN.source.PNode = null; }; T2 = null; foreach (dynamic _c in closed ) { T2 = _c; T2.PNode = null; }; if ( path != null ) { i = null; i = 1; while (( i ??0) <= path.len / 2) { path.Swap( ((int)( i )), ((int)( path.len - ( i ??0) + 1 )) ); i++; } } return path; }
// Range: -1 Access: 0 Flags: ( 0, 4, 255 ) public static void only_me( ) { Mob_Living_Carbon_Human H = null; Objective_Hijackclone hijack_objective = null; int obj_count = 0; Objective OBJ = null; dynamic slot_item_ID = null; dynamic slot_item_hand = null; Ent_Item_Weapon_Multisword multi = null; Ent_Item_Weapon_Card_Id W = null; if ( !( GlobalVars.ticker != null ) || !Lang13.Bool( GlobalVars.ticker.mode ) ) { Interface13.alert( "The game hasn't started yet!", null, null, null, null, null ); return; } H = null; foreach (dynamic _b in GlobalVars.player_list ) { if ( !( _b is Mob_Living_Carbon_Human ) ) { continue; } H = _b; if ( H.stat == 2 || !Lang13.Bool( ((dynamic)H).client ) ) { continue; } if ( GlobalFuncs.is_special_character( H ) != 0 ) { continue; } GlobalVars.ticker.mode.traitors += H.mind; H.mind.special_role = "" + H.real_name + " Prime"; hijack_objective = new Objective_Hijackclone(); hijack_objective.owner = H.mind; H.mind.objectives += hijack_objective; ((dynamic)H).write( "<B>You are the multiverse summoner. Activate your blade to summon copies of yourself from another universe to fight by your side.</B>" ); obj_count = 1; OBJ = null; foreach (dynamic _a in H.mind.objectives ) { if ( !( _a is Objective ) ) { continue; } OBJ = _a; ((dynamic)H).write( "<B>Objective #" + obj_count + "</B>: " + OBJ.explanation_text ); obj_count++; }; slot_item_ID = H.get_item_by_slot( 7 ); GlobalFuncs.qdel( slot_item_ID ); slot_item_hand = H.get_item_by_slot( 5 ); H.unEquip( slot_item_hand ); multi = new Ent_Item_Weapon_Multisword( H ); H.equip_to_slot_or_del( multi, 5 ); W = new Ent_Item_Weapon_Card_Id( H ); ((dynamic)W).icon_state = "centcom"; W.access = GlobalFuncs.get_all_accesses(); W.access += GlobalFuncs.get_all_centcom_access(); W.assignment = "Multiverse Summoner"; W.registered_name = H.real_name; W.update_label( H.real_name ); H.equip_to_slot_or_del( W, 7 ); }; GlobalFuncs.message_admins( "<span class='adminnotice'>" + GlobalFuncs.key_name_admin( Task13.user ) + " used THERE CAN BE ONLY ME!</span>" ); GlobalFuncs.log_admin( "" + GlobalFuncs.key_name( Task13.user ) + " used there can be only me." ); return; }
// Range: -1 Access: 0 Flags: ( 0, 4, 255 ) public static dynamic get_path_to( Mob_Living_SimpleAnimal_Bot start = null, dynamic end = null, Mob_Living_SimpleAnimal_Bot atom = null, System.Reflection.MethodInfo dist = null, bool maxnodes = false, int? maxnodedepth = null, bool? mintargetdist = null, System.Reflection.MethodInfo adjacent = null, Ent_Item_Weapon_Card_Id id = null, dynamic exclude = null, bool? simulated_only = null ) { dynamic path = null; if ( maxnodedepth == null ) { maxnodedepth = 30; } if ( adjacent == null ) { adjacent = typeof(Tile).GetMethod( "reachableAdjacentTurfs" ); } if ( id == null ) { id = null; } if ( exclude == null ) { exclude = null; } if ( simulated_only == null ) { simulated_only = true; } path = GlobalFuncs.AStar( start, end, atom, dist, maxnodes, maxnodedepth, mintargetdist, adjacent, id, exclude, simulated_only ); if ( !Lang13.Bool( path ) ) { path = new ByTable(); } return path; }