// Function from file: wormholes.dm public override bool start( ) { Tile_Simulated_Floor T = null; int? i = null; dynamic T2 = null; foreach (dynamic _a in Lang13.Enumerate(typeof(Game13), typeof(Tile_Simulated_Floor))) { T = _a; if (T.z == 1) { this.pick_turfs.Add(T); } } i = null; i = 1; while ((i ?? 0) <= (this.number_of_wormholes ?? 0)) { T2 = Rand13.PickFromTable(this.pick_turfs); this.wormholes.Add(new Obj_Effect_Portal_Wormhole(T2, null, null, -1)); i++; } return(false); }
// Function from file: supply.dm public void buy( ) { ByTable empty_turfs = null; Tile_Simulated_Floor T = null; double value = 0; int purchases = 0; SupplyOrder SO = null; if (!(GlobalVars.SSshuttle.shoppinglist.len != 0)) { return; } empty_turfs = new ByTable(); foreach (dynamic _a in Lang13.Enumerate(this.areaInstance, typeof(Tile_Simulated_Floor))) { T = _a; if (T.density || T.contents.len != 0) { continue; } empty_turfs.Add(T); } value = 0; purchases = 0; foreach (dynamic _b in Lang13.Enumerate(GlobalVars.SSshuttle.shoppinglist, typeof(SupplyOrder))) { SO = _b; if (!(empty_turfs.len != 0)) { break; } if (SO.pack.cost > GlobalVars.SSshuttle.points) { continue; } GlobalVars.SSshuttle.points -= SO.pack.cost; value += SO.pack.cost; GlobalVars.SSshuttle.shoppinglist.Remove(SO); GlobalVars.SSshuttle.orderhistory.Add(SO); SO.generate(GlobalFuncs.pick_n_take(empty_turfs)); this.investigate_log("Order #" + SO.id + " (" + SO.pack.name + ", placed by " + GlobalFuncs.key_name(SO.orderer_ckey) + ") has shipped.", "cargo"); if (SO.pack.dangerous) { GlobalFuncs.message_admins(new Txt().A(SO.pack.name).item().str(" ordered by ").item(GlobalFuncs.key_name_admin(SO.orderer_ckey)).str(" has shipped.").ToString()); } purchases++; } this.investigate_log("" + purchases + " orders in this shipment, worth " + value + " points. " + GlobalVars.SSshuttle.points + " points left.", "cargo"); return; }
// Function from file: xmas.dm public override bool start( ) { Obj_Structure_Flora_Tree_Pine xmas = null; Tile_Simulated_Floor T = null; int?i = null; Mob_Living_SimpleAnimal_Pet_Dog_Corgi_Ian Ian = null; Obj_Machinery_Computer_Security_Telescreen_Entertainment Monitor = null; foreach (dynamic _b in Lang13.Enumerate(typeof(Game13), typeof(Obj_Structure_Flora_Tree_Pine))) { xmas = _b; if (xmas.z != 1) { continue; } foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRangeExcludeThis(xmas, 1), typeof(Tile_Simulated_Floor))) { T = _a; i = null; i = 1; while ((i ?? 0) <= Rand13.Int(1, 5)) { new Obj_Item_Weapon_AGift(T); i++; } } } foreach (dynamic _c in Lang13.Enumerate(GlobalVars.mob_list, typeof(Mob_Living_SimpleAnimal_Pet_Dog_Corgi_Ian))) { Ian = _c; Ian.place_on_head(new Obj_Item_Clothing_Head_Helmet_Space_Santahat(Ian)); } foreach (dynamic _d in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Computer_Security_Telescreen_Entertainment))) { Monitor = _d; Monitor.icon_state = "entertainment_xmas"; } return(false); }
// Function from file: shuttle_loan.dm public override void end( ) { ByTable empty_shuttle_turfs = null; Tile_Simulated_Floor T = null; ByTable shuttle_spawns = null; dynamic pack = null; dynamic pack2 = null; dynamic pack3 = null; dynamic T2 = null; dynamic virus_type = null; dynamic T3 = null; int? i = null; Obj_Effect_Decal_Cleanable_Blood b = null; dynamic D = null; ByTable crate_types = null; dynamic crate = null; dynamic pack4 = null; double i2 = 0; dynamic decal = null; int false_positive = 0; Ent_Static T4 = null; dynamic spawn_type = null; if (GlobalVars.SSshuttle.shuttle_loan != null && GlobalVars.SSshuttle.shuttle_loan.dispatched) { GlobalVars.SSshuttle.shuttle_loan = null; empty_shuttle_turfs = new ByTable(); foreach (dynamic _a in Lang13.Enumerate(GlobalVars.SSshuttle.supply.areaInstance, typeof(Tile_Simulated_Floor))) { T = _a; if (T.density || T.contents.len != 0) { continue; } empty_shuttle_turfs.Add(T); } if (!(empty_shuttle_turfs.len != 0)) { return; } shuttle_spawns = new ByTable(); switch (this.dispatch_type) { case 1: pack = GlobalVars.SSshuttle.supply_packs[typeof(SupplyPack_Emergency_Specialops)]; pack.generate(GlobalFuncs.pick_n_take(empty_shuttle_turfs)); shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Syndicate)); shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Syndicate)); if (Rand13.PercentChance(75)) { shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Syndicate)); } if (Rand13.PercentChance(50)) { shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Syndicate)); } break; case 2: pack2 = GlobalVars.SSshuttle.supply_packs[typeof(SupplyPack_Organic_Party)]; pack2.generate(GlobalFuncs.pick_n_take(empty_shuttle_turfs)); shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Russian)); shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Russian_Ranged)); shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Bear)); if (Rand13.PercentChance(75)) { shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Russian)); } if (Rand13.PercentChance(50)) { shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Bear)); } break; case 3: pack3 = GlobalVars.SSshuttle.supply_packs[typeof(SupplyPack_Emergency_Specialops)]; pack3.generate(GlobalFuncs.pick_n_take(empty_shuttle_turfs)); shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider)); shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider)); shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider_Nurse)); if (Rand13.PercentChance(50)) { shuttle_spawns.Add(typeof(Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider_Hunter)); } T2 = Rand13.PickFromTable(empty_shuttle_turfs); empty_shuttle_turfs.Remove(T2); new Obj_Effect_Decal_Remains_Human(T2); new Obj_Item_Clothing_Shoes_SpaceNinja(T2); new Obj_Item_Clothing_Mask_Balaclava(T2); T2 = Rand13.PickFromTable(empty_shuttle_turfs); new Obj_Effect_Spider_Stickyweb(T2); T2 = Rand13.PickFromTable(empty_shuttle_turfs); new Obj_Effect_Spider_Stickyweb(T2); T2 = Rand13.PickFromTable(empty_shuttle_turfs); new Obj_Effect_Spider_Stickyweb(T2); T2 = Rand13.PickFromTable(empty_shuttle_turfs); new Obj_Effect_Spider_Stickyweb(T2); T2 = Rand13.PickFromTable(empty_shuttle_turfs); new Obj_Effect_Spider_Stickyweb(T2); break; case 5: virus_type = Rand13.Pick(new object [] { typeof(Disease_Beesease), typeof(Disease_Brainrot), typeof(Disease_Fluspanish) }); T3 = null; i = null; i = 0; while ((i ?? 0) < 10) { if (Rand13.PercentChance(15)) { shuttle_spawns.Add(typeof(Obj_Item_Weapon_ReagentContainers_Glass_Bottle)); } else if (Rand13.PercentChance(15)) { shuttle_spawns.Add(typeof(Obj_Item_Weapon_ReagentContainers_Syringe)); } else if (Rand13.PercentChance(25)) { shuttle_spawns.Add(typeof(Obj_Item_Weapon_Shard)); } T3 = GlobalFuncs.pick_n_take(empty_shuttle_turfs); b = new Obj_Effect_Decal_Cleanable_Blood(T3); D = Lang13.Call(virus_type); D.longevity = 1000; b.viruses.Add(D); D.holder = b; i++; } shuttle_spawns.Add(typeof(Obj_Structure_Closet_Crate)); shuttle_spawns.Add(typeof(Obj_Item_Weapon_ReagentContainers_Glass_Bottle_PierrotThroat)); shuttle_spawns.Add(typeof(Obj_Item_Weapon_ReagentContainers_Glass_Bottle_Magnitis)); break; case 4: crate_types = new ByTable(new object [] { typeof(SupplyPack_Emergency_Equipment), typeof(SupplyPack_Security_Supplies), typeof(SupplyPack_Organic_Food), typeof(SupplyPack_Emergency_Weedcontrol), typeof(SupplyPack_Engineering_Tools), typeof(SupplyPack_Engineering_Engiequipment), typeof(SupplyPack_Science_Robotics), typeof(SupplyPack_Science_Plasma), typeof(SupplyPack_Medical_Supplies) }); foreach (dynamic _b in Lang13.Enumerate(crate_types)) { crate = _b; pack4 = GlobalVars.SSshuttle.supply_packs[crate]; pack4.generate(GlobalFuncs.pick_n_take(empty_shuttle_turfs)); } foreach (dynamic _c in Lang13.IterateRange(1, 5)) { i2 = _c; decal = Rand13.Pick(new object [] { typeof(Obj_Effect_Decal_Cleanable_Flour), typeof(Obj_Effect_Decal_Cleanable_RobotDebris), typeof(Obj_Effect_Decal_Cleanable_Oil) }); Lang13.Call(decal, GlobalFuncs.pick_n_take(empty_shuttle_turfs)); } break; } false_positive = 0; while (shuttle_spawns.len != 0 && empty_shuttle_turfs.len != 0) { T4 = GlobalFuncs.pick_n_take(empty_shuttle_turfs); if (T4.contents.len != 0 && false_positive < 5) { false_positive++; continue; } spawn_type = GlobalFuncs.pick_n_take(shuttle_spawns); Lang13.Call(spawn_type, T4); } } return; }
// Function from file: special_shadowling_abilities.dm public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null) { thearea = thearea ?? Task13.User; dynamic H = null; string hatch_or_no = null; Obj_Item I = null; Tile_Simulated_Floor F = null; dynamic shadowturf = null; Obj_Structure_Alien_Resin_Wall_Shadowling R = null; int temp_flags = 0; dynamic newNameId = null; Obj_Structure_Alien_Resin_Wall_Shadowling W = null; Obj_Structure_Alien_Weeds_Node N = null; if (Lang13.Bool(thearea.stat) || !(thearea is Mob_Living_Carbon_Human) || !Lang13.Bool(thearea) || !GlobalFuncs.is_shadow(Lang13.Bool(thearea) || this.isinspace( ))) { return(false); } H = thearea; hatch_or_no = Interface13.Alert(H, "Are you sure you want to hatch? You cannot undo this!", null, "Yes", "No"); switch ((string)(hatch_or_no)) { case "No": H.WriteMsg("<span class='warning'>You decide against hatching for now."); this.charge_counter = this.charge_max; return(false); break; case "Yes": H.stunned = Double.PositiveInfinity; ((Ent_Static)H).visible_message("<span class='warning'>" + H + "'s things suddenly slip off. They hunch over and vomit up a copious amount of purple goo which begins to shape around them!</span>", "<span class='shadowling'>You remove any equipment which would hinder your hatching and begin regurgitating the resin which will protect you.</span>"); foreach (dynamic _a in Lang13.Enumerate(H, typeof(Obj_Item))) { I = _a; ((Mob)H).unEquip(I); } Task13.Sleep(50); F = null; shadowturf = GlobalFuncs.get_turf(thearea); foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInRangeExcludeThis(thearea, 1), typeof(Tile_Simulated_Floor))) { F = _b; new Obj_Structure_Alien_Resin_Wall_Shadowling(F); } foreach (dynamic _c in Lang13.Enumerate(shadowturf, typeof(Obj_Structure_Alien_Resin_Wall_Shadowling))) { R = _c; GlobalFuncs.qdel(R); new Obj_Structure_Alien_Weeds_Node( ); } temp_flags = H.status_flags; H.status_flags |= 4096; ((Ent_Static)H).visible_message("<span class='warning'>A chrysalis forms around " + H + ", sealing them inside.</span>", "<span class='shadowling'>You create your chrysalis and begin to contort within.</span>"); Task13.Sleep(100); ((Ent_Static)H).visible_message("<span class='warning'><b>The skin on " + H + "'s back begins to split apart. Black spines slowly emerge from the divide.</b></span>", "<span class='shadowling'>Spines pierce your back. Your claws break apart your fingers. You feel excruciating pain as your true form begins its exit.</span>"); Task13.Sleep(90); ((Ent_Static)H).visible_message("<span class='warning'><b>" + H + ", skin shifting, begins tearing at the walls around them.</b></span>", "<span class='shadowling'>Your false skin slips away. You begin tearing at the fragile membrane protecting you.</span>"); Task13.Sleep(80); GlobalFuncs.playsound(H.loc, "sound/weapons/slash.ogg", 25, 1); H.WriteMsg("<i><b>You rip and slice.</b></i>"); Task13.Sleep(10); GlobalFuncs.playsound(H.loc, "sound/weapons/slashmiss.ogg", 25, 1); H.WriteMsg("<i><b>The chrysalis falls like water before you.</b></i>"); Task13.Sleep(10); GlobalFuncs.playsound(H.loc, "sound/weapons/slice.ogg", 25, 1); H.WriteMsg("<i><b>You are free!</b></i>"); H.status_flags = temp_flags; Task13.Sleep(10); GlobalFuncs.playsound(H.loc, "sound/effects/ghost.ogg", 100, 1); newNameId = Rand13.PickFromTable(GlobalVars.possibleShadowlingNames); GlobalVars.possibleShadowlingNames.Remove(newNameId); H.real_name = newNameId; H.name = thearea.real_name; H.stunned = 0; H.WriteMsg("<i><b><font size=3>YOU LIVE!!!</i></b></font>"); foreach (dynamic _d in Lang13.Enumerate(Map13.FetchInRangeExcludeThis(H, 1), typeof(Obj_Structure_Alien_Resin_Wall_Shadowling))) { W = _d; GlobalFuncs.playsound(W, "sound/effects/splat.ogg", 50, 1); GlobalFuncs.qdel(W); } foreach (dynamic _e in Lang13.Enumerate(shadowturf, typeof(Obj_Structure_Alien_Weeds_Node))) { N = _e; GlobalFuncs.qdel(N); } ((Ent_Static)H).visible_message("<span class='warning'>The chrysalis explodes in a shower of purple flesh and fluid!</span>"); H.underwear = "Nude"; H.undershirt = "Nude"; H.socks = "Nude"; H.faction |= "faithless"; ((Mob)H).equip_to_slot_or_del(new Obj_Item_Clothing_Under_Shadowling(H), 14); ((Mob)H).equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Shadowling(H), 12); ((Mob)H).equip_to_slot_or_del(new Obj_Item_Clothing_Suit_Space_Shadowling(H), 13); ((Mob)H).equip_to_slot_or_del(new Obj_Item_Clothing_Head_Shadowling(H), 11); ((Mob)H).equip_to_slot_or_del(new Obj_Item_Clothing_Gloves_Shadowling(H), 10); ((Mob)H).equip_to_slot_or_del(new Obj_Item_Clothing_Mask_Gas_Shadowling(H), 2); ((Mob)H).equip_to_slot_or_del(new Obj_Item_Clothing_Glasses_Night_Shadowling(H), 9); ((Mob)H).set_species(typeof(Species_Shadow_Ling)); ((Mind)H.mind).remove_spell(this); Task13.Sleep(10); H.WriteMsg("<span class='shadowling'><b><i>Your powers are awoken. You may now live to your fullest extent. Remember your goal. Cooperate with your thralls and allies.</b></i></span>"); H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Targeted_Enthrall(null)); H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Targeted_Glare(null)); H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_AoeTurf_Veil(null)); H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Self_ShadowWalk(null)); H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_AoeTurf_Flashfreeze(null)); H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Self_CollectiveMind(null)); H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Self_ShadowlingRegenarmor(null)); H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Targeted_ShadowlingExtendShuttle(null)); break; } return(false); }
// Function from file: glowshroom.dm public void Spread( ) { int? i = null; ByTable possibleLocs = null; bool spreadsIntoAdjacent = false; Tile_Simulated_Floor earth = null; dynamic newLoc = null; int shroomCount = 0; int placeCount = 0; Obj_Effect_Glowshroom shroom = null; dynamic wallDir = null; Tile isWall = null; dynamic child = null; i = null; i = 1; while ((i ?? 0) <= (this.yield ?? 0)) { if (Rand13.PercentChance(((int)(1 / (this.generation * this.generation) * 100)))) { possibleLocs = new ByTable(); spreadsIntoAdjacent = false; if (Rand13.PercentChance(this.spreadIntoAdjacentChance)) { spreadsIntoAdjacent = true; } foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInView(this, 3), typeof(Tile_Simulated_Floor))) { earth = _a; if (spreadsIntoAdjacent || !Lang13.Bool(Lang13.FindIn(typeof(Obj_Effect_Glowshroom), Map13.FetchInView(earth, 1)))) { possibleLocs.Add(earth); } } if (!(possibleLocs.len != 0)) { break; } newLoc = Rand13.PickFromTable(possibleLocs); shroomCount = 0; placeCount = 1; foreach (dynamic _b in Lang13.Enumerate(newLoc, typeof(Obj_Effect_Glowshroom))) { shroom = _b; shroomCount++; } foreach (dynamic _c in Lang13.Enumerate(GlobalVars.cardinal)) { wallDir = _c; isWall = Map13.GetStep(newLoc, Convert.ToInt32(wallDir)); if (isWall.density) { placeCount++; } } if (shroomCount >= placeCount) { } else { child = Lang13.Call(this.type, newLoc); child.potency = Num13.MaxInt(this.potency + Rand13.Int(-3, 6), 0); child.yield = Num13.MaxInt((this.yield ?? 0) + Rand13.Int(-1, 2), 0); child.delay = Num13.MaxInt(this.delay + Rand13.Int(-30, 60), 0); child.endurance = Num13.MaxInt(((int)(this.endurance + Rand13.Int(-3, 6))), 1); child.generation = this.generation + 1; child.desc = new Txt("This is a ").st_nd_rd(child.generation).str(" generation ").item(child.name).str("!").ToString(); } } i++; } return; }
// Function from file: mine_items.dm public void load( ) { ByTable blacklist = null; dynamic start_turf = null; Tile cur_turf = null; int? x_size = null; int? y_size = null; ByTable walltypes = null; Type floor_type = null; ByTable room = null; Obj_Structure_Bed_Chair_Comfy C = null; Obj_Machinery_Sleeper S = null; Zone_Survivalpod L = null; Tile threshhold = null; dynamic ZZ = null; dynamic turfs = null; Tile_Simulated_Floor A = null; dynamic Z = null; blacklist = new ByTable(new object [] { typeof(Zone_Shuttle) }); start_turf = GlobalFuncs.get_turf(this.loc); x_size = 5; y_size = 5; walltypes = new ByTable(new object [] { typeof(Tile_Simulated_Wall) }); floor_type = typeof(Tile_Simulated_Floor_Wood); start_turf = Map13.GetTile(Convert.ToInt32(start_turf.x - 2), Convert.ToInt32(start_turf.y - 2), Convert.ToInt32(start_turf.z)); room = GlobalFuncs.spawn_room(start_turf, x_size, y_size, walltypes, floor_type, "Emergency Shelter"); start_turf = GlobalFuncs.get_turf(this.loc); cur_turf = Map13.GetTile(Convert.ToInt32(start_turf.x), Convert.ToInt32(start_turf.y - 2), Convert.ToInt32(start_turf.z)); new Obj_Machinery_Door_Airlock_Glass(cur_turf); cur_turf = Map13.GetTile(Convert.ToInt32(start_turf.x + 1), Convert.ToInt32(start_turf.y), Convert.ToInt32(start_turf.z)); new Obj_Structure_Table_Wood(cur_turf); new Obj_Item_Weapon_Storage_PillBottle_Dice(cur_turf); cur_turf = Map13.GetTile(Convert.ToInt32(start_turf.x + 1), Convert.ToInt32(start_turf.y - 1), Convert.ToInt32(start_turf.z)); C = new Obj_Structure_Bed_Chair_Comfy(cur_turf); C.dir = 1; cur_turf = Map13.GetTile(Convert.ToInt32(start_turf.x + 1), Convert.ToInt32(start_turf.y + 1), Convert.ToInt32(start_turf.z)); new Obj_Structure_Bed_Chair_Comfy(cur_turf); cur_turf = Map13.GetTile(Convert.ToInt32(start_turf.x - 1), Convert.ToInt32(start_turf.y - 1), Convert.ToInt32(start_turf.z)); S = new Obj_Machinery_Sleeper(cur_turf); S.dir = 4; cur_turf = Map13.GetTile(Convert.ToInt32(start_turf.x - 1), Convert.ToInt32(start_turf.y), Convert.ToInt32(start_turf.z)); new Obj_Structure_Table_Wood(cur_turf); new Obj_Item_Weapon_Storage_Box_Donkpockets(cur_turf); cur_turf = Map13.GetTile(Convert.ToInt32(start_turf.x - 1), Convert.ToInt32(start_turf.y + 1), Convert.ToInt32(start_turf.z)); new Obj_Structure_Table_Wood(cur_turf); new Obj_Machinery_Microwave(cur_turf); L = new Zone_Survivalpod(); threshhold = Map13.GetTile(Convert.ToInt32(start_turf.x), Convert.ToInt32(start_turf.y - 2), Convert.ToInt32(start_turf.z)); threshhold.ChangeTurf(typeof(Tile_Simulated_Floor_Wood)); threshhold.blocks_air = true; threshhold.oxygen = 21; threshhold.temperature = 293.41; threshhold.nitrogen = 82; threshhold.carbon_dioxide = 0; threshhold.toxins = 0; ZZ = GlobalFuncs.get_area(threshhold); if (!GlobalFuncs.is_type_in_list(ZZ, blacklist)) { L.contents.Add(threshhold); } threshhold.overlays.Cut(); turfs = room["floors"]; foreach (dynamic _a in Lang13.Enumerate(turfs, typeof(Tile_Simulated_Floor))) { A = _a; GlobalVars.SSair.remove_from_active(A); A.oxygen = 21; A.temperature = 293.41; A.nitrogen = 82; A.carbon_dioxide = 0; A.toxins = 0; A.air.copy_from_turf(A); GlobalVars.SSair.add_to_active(A); A.overlays.Cut(); Z = GlobalFuncs.get_area(A); if (!GlobalFuncs.is_type_in_list(Z, blacklist)) { L.contents.Add(A); } } return; }