// Function from file: borghydro.dm public override bool attack(dynamic M = null, dynamic user = null, bool?def_zone = null) { Reagents R = null; double? fraction = null; dynamic trans = null; R = this.reagent_list[this.mode]; if (!Lang13.Bool(R.total_volume)) { user.WriteMsg("<span class='notice'>The injector is empty.</span>"); return(false); } if (!(M is Mob_Living_Carbon)) { return(false); } if (Lang13.Bool(R.total_volume) && ((Mob_Living)M).can_inject(user, true, this.bypass_protection)) { M.WriteMsg("<span class='warning'>You feel a tiny prick!</span>"); user.WriteMsg("<span class='notice'>You inject " + M + " with the injector.</span>"); fraction = Num13.MinInt(((int)((this.amount_per_transfer_from_this ?? 0) / (R.total_volume ?? 0))), 1); R.reaction(M, GlobalVars.INJECT, fraction); if (Lang13.Bool(M.reagents)) { trans = R.trans_to(M, this.amount_per_transfer_from_this); user.WriteMsg(new Txt("<span class='notice'>").item(trans).str(" unit").s().str(" injected. ").item(R.total_volume).str(" unit").s().str(" remaining.</span>").ToString()); } } return(false); }
// Function from file: borghydro.dm public virtual void regenerate_reagents( ) { Ent_Static R = null; double i = 0; Reagents RG = null; if (this.loc is Mob_Living_Silicon_Robot) { R = this.loc; if (R != null && Lang13.Bool(((dynamic)R).cell)) { foreach (dynamic _a in Lang13.IterateRange(1, this.reagent_ids.len)) { i = _a; RG = this.reagent_list[i]; if ((RG.total_volume ?? 0) < Convert.ToDouble(RG.maximum_volume)) { ((Obj_Item_Weapon_StockParts_Cell)((dynamic)R).cell).use(this.charge_cost); RG.add_reagent(this.reagent_ids[i], 5); } } } } return; }
// Function from file: pyrotechnics.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { double smoke_radius = 0; dynamic location = null; EffectSystem_SmokeSpread_Chem S = null; if (Lang13.Bool(holder.has_reagent("stabilizing_agent"))) { return; } holder.remove_reagent("smoke_powder", created_volume); smoke_radius = Num13.Round(Math.Sqrt((created_volume ?? 0) / 2), 1); location = GlobalFuncs.get_turf(holder.my_atom); S = new EffectSystem_SmokeSpread_Chem(); S.attach(location); GlobalFuncs.playsound(location, "sound/effects/smoke.ogg", 50, 1, -3); if (S != null) { S.set_up(holder, smoke_radius, 0, location); S.start(); } if (holder != null && Lang13.Bool(holder.my_atom)) { holder.clear_reagents(); } return; }
// Function from file: borghydro.dm public override void regenerate_reagents( ) { Ent_Static R = null; dynamic i = null; dynamic valueofi = null; Reagents RG = null; if (this.loc is Mob_Living_Silicon_Robot) { R = this.loc; if (R != null && Lang13.Bool(((dynamic)R).cell)) { foreach (dynamic _a in Lang13.Enumerate(this.modes)) { i = _a; valueofi = this.modes[i]; RG = this.reagent_list[valueofi]; if ((RG.total_volume ?? 0) < Convert.ToDouble(RG.maximum_volume)) { ((Obj_Item_Weapon_StockParts_Cell)((dynamic)R).cell).use(this.charge_cost); RG.add_reagent(this.reagent_ids[valueofi], 5); } } } } return; }
// Function from file: borghydro.dm public virtual void DescribeContents( ) { bool empty = false; Reagents RS = null; dynamic R = null; empty = true; foreach (dynamic _a in Lang13.Enumerate(this.reagent_list, typeof(Reagents))) { RS = _a; R = Lang13.FindIn(typeof(Reagent), RS.reagent_list); if (Lang13.Bool(R)) { Task13.User.WriteMsg(new Txt("<span class='notice'>It currently has ").item(R.volume).str(" unit").s().str(" of ").item(R.name).str(" stored.</span>").ToString()); empty = false; } } if (empty) { Task13.User.WriteMsg("<span class='warning'>It is currently empty! Allow some time for the internal syntheszier to produce more.</span>"); } return; }
// Function from file: borghydro.dm public override bool afterattack(dynamic target = null, dynamic user = null, bool?proximity_flag = null, string click_parameters = null) { Reagents R = null; dynamic trans = null; if (!(proximity_flag == true)) { return(false); } else if (Lang13.Bool(((Ent_Static)target).is_open_container()) && Lang13.Bool(target.reagents)) { R = this.reagent_list[this.mode]; if (!Lang13.Bool(R.total_volume)) { user.WriteMsg("<span class='warning'>" + this + " is currently out of this ingredient! Please allow some time for the synthesizer to produce more.</span>"); return(false); } if ((target.reagents.total_volume ?? 0) >= Convert.ToDouble(target.reagents.maximum_volume)) { user.WriteMsg("<span class='notice'>" + target + " is full.</span>"); return(false); } trans = R.trans_to(target, this.amount_per_transfer_from_this); user.WriteMsg(new Txt("<span class='notice'>You transfer ").item(trans).str(" unit").s().str(" of the solution to ").item(target).str(".</span>").ToString()); } return(false); }
// Function from file: pyrotechnics.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { dynamic location = null; Mob_Living_Carbon C = null; location = GlobalFuncs.get_turf(holder.my_atom); GlobalFuncs.playsound(location, "sound/effects/bang.ogg", 25, 1); foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.get_hearers_in_view((created_volume ?? 0) / 10, location), typeof(Mob_Living_Carbon))) { C = _a; if (C.check_ear_prot()) { continue; } C.show_message("<span class='warning'>BANG</span>", 2); C.Stun(5); C.Weaken(5); C.setEarDamage(C.ear_damage + Rand13.Int(0, 5), Num13.MaxInt(((int)(C.ear_deaf ?? 0)), 15)); if (C.ear_damage >= 15) { C.WriteMsg("<span class='warning'>Your ears start to ring badly!</span>"); } else if (C.ear_damage >= 5) { C.WriteMsg("<span class='warning'>Your ears start to ring!</span>"); } } return; }
// Function from file: slime_extracts.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { dynamic T = null; Mob_Living M = null; GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type); T = GlobalFuncs.get_turf(holder.my_atom); ((Ent_Static)T).visible_message("<span class='danger'>The slime extract begins to vibrate adorably !</span>"); Task13.Schedule(50, (Task13.Closure)(() => { if (holder != null && Lang13.Bool(holder.my_atom)) { GlobalFuncs.playsound(GlobalFuncs.get_turf(holder.my_atom), "sound/effects/phasein.ogg", 100, 1); foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRange(7, GlobalFuncs.get_turf(holder.my_atom)), typeof(Mob_Living))) { M = _a; M.bodytemperature -= 240; M.WriteMsg("<span class='notice'>You feel a chill!</span>"); } } return; })); return; }
// Function from file: pyrotechnics.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { dynamic location = null; EffectSystem_SparkSpread s = null; Mob_Living_Carbon C = null; location = GlobalFuncs.get_turf(holder.my_atom); s = new EffectSystem_SparkSpread(); s.set_up(2, 1, location); s.start(); foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.get_hearers_in_view((created_volume ?? 0) / 10, location), typeof(Mob_Living_Carbon))) { C = _a; if (C.flash_eyes()) { if (Map13.GetDistance(C, location) < 4) { C.Weaken(5); } else { C.Stun(5); } } } return; }
// Function from file: recipe.dm public int check_reagents(Reagents avail_reagents = null) { int _default = 0; dynamic r_r = null; bool aval_r_amnt = false; _default = 1; foreach (dynamic _a in Lang13.Enumerate(this.reagents)) { r_r = _a; aval_r_amnt = avail_reagents.get_reagent_amount(r_r); if (!(Math.Abs((aval_r_amnt ?1:0) - Convert.ToDouble(this.reagents[r_r])) < 0.5)) { if ((aval_r_amnt ?1:0) > Convert.ToDouble(this.reagents[r_r])) { _default = -1; } else { return(0); } } } if ((this.reagents != null ? this.reagents.len : 0) < avail_reagents.reagent_list.len) { return(-1); } return(_default); }
// Function from file: others.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { dynamic location = null; location = GlobalFuncs.get_turf(holder.my_atom); new Obj_Item_Weapon_Soap_Homemade(location); return; }
// Function from file: food_mixtures.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { dynamic location = null; location = GlobalFuncs.get_turf(holder.my_atom); new Obj_Item_Weapon_ReagentContainers_Food_Snacks_Meat_Slab_Synthmeat(location); return; }
// Function from file: others.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { dynamic location = null; location = GlobalFuncs.get_turf(holder.my_atom); new Obj_Item_Stack_Sheet_Mineral_Plasma(location); return; }
// Function from file: pyrotechnics.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { dynamic location = null; location = GlobalFuncs.get_turf(holder.my_atom); GlobalFuncs.empulse(location, Num13.Floor((created_volume ?? 0) / 24), Num13.Floor((created_volume ?? 0) / 14), true); holder.clear_reagents(); return; }
// Function from file: slime_extracts.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { Obj_Item_Slimepotion_Speed P = null; GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type); P = new Obj_Item_Slimepotion_Speed(); P.loc = GlobalFuncs.get_turf(holder.my_atom); return; }
// Function from file: others.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { dynamic location = null; location = GlobalFuncs.get_turf(holder.my_atom); new Mob_Living_SimpleAnimal_Pet_Dog_Corgi(location); base.on_reaction(holder, created_volume); return; }
// Function from file: slime_extracts.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { Obj_Item_Stack_Sheet_Mineral_Plasma P = null; GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type); P = new Obj_Item_Stack_Sheet_Mineral_Plasma(); P.amount = 3; P.loc = GlobalFuncs.get_turf(holder.my_atom); return; }
// Function from file: slime_extracts.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { Obj_Effect_Golemrune Z = null; GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type); Z = new Obj_Effect_Golemrune(); Z.loc = GlobalFuncs.get_turf(holder.my_atom); GlobalFuncs.notify_ghosts("Golem rune created in " + GlobalFuncs.get_area(Z) + ".", "sound/effects/ghost2.ogg", null, Z); return; }
// Function from file: pyrotechnics.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { dynamic T = null; int range = 0; T = GlobalFuncs.get_turf(holder.my_atom); range = Num13.MaxInt(1, Num13.MinInt(((int)(Math.Sqrt((created_volume ?? 0) / 2))), 6)); this.goonchem_vortex(T, false, range); return; }
// Function from file: slime_extracts.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { Mob_Living_SimpleAnimal_Slime S = null; GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type); S = new Mob_Living_SimpleAnimal_Slime(); S.loc = GlobalFuncs.get_turf(holder.my_atom); S.visible_message("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!</span>"); return; }
// Function from file: effects_foam.dm public EffectSystem_FoamSpread( ) { Reagents R = null; // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!; this.chemholder = GlobalFuncs.PoolOrNew(typeof(Obj)); R = new Reagents(1000); this.chemholder.reagents = R; R.my_atom = this.chemholder; return; }
// Function from file: slime_extracts.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { Mob_Living_SimpleAnimal_Slime S = null; GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type); S = new Mob_Living_SimpleAnimal_Slime(); S.colour = Rand13.Pick(new object [] { "grey", "orange", "metal", "blue", "purple", "dark purple", "dark blue", "green", "silver", "yellow", "gold", "yellow", "red", "silver", "pink", "cerulean", "sepia", "bluespace", "pyrite", "light pink", "oil", "adamantine", "black" }); S.loc = GlobalFuncs.get_turf(holder.my_atom); S.visible_message("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!</span>"); return; }
// Function from file: pyrotechnics.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { dynamic location = null; EffectSystem_ReagentsExplosion e = null; location = GlobalFuncs.get_turf(holder.my_atom); e = new EffectSystem_ReagentsExplosion(); e.set_up(Num13.Round((created_volume ?? 0) / 10, 1), location, 0, 0); e.start(); holder.clear_reagents(); return; }
// Function from file: slime_extracts.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { dynamic T = null; Obj_Item_Device_Flashlight_Slime F = null; GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type); T = GlobalFuncs.get_turf(holder.my_atom); ((Ent_Static)T).visible_message("<span class='danger'>The slime begins to emit a soft light. Squeezing it will cause it to grow brightly.</span>"); F = new Obj_Item_Device_Flashlight_Slime(); F.loc = GlobalFuncs.get_turf(holder.my_atom); return; }
// Function from file: slime_extracts.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { dynamic mob = null; Obj_Effect_Timestop T = null; GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type); mob = GlobalFuncs.get_mob_by_key(holder.my_atom.fingerprintslast); T = new Obj_Effect_Timestop(); T.loc = GlobalFuncs.get_turf(holder.my_atom); T.immune.Add(mob); T.timestop(); return; }
// Function from file: slime_extracts.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { dynamic T = null; GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type); T = GlobalFuncs.get_turf(holder.my_atom); ((Ent_Static)T).visible_message("<span class='danger'>The slime extract begins to vibrate violently !</span>"); Task13.Schedule(50, (Task13.Closure)(() => { this.chemical_mob_spawn(holder, 5, "Gold Slime"); return; })); return; }
// Function from file: food_mixtures.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { Obj_Item_Weapon_ReagentContainers_Food_Snacks_Carpmeat_Imitation S = null; S = new Obj_Item_Weapon_ReagentContainers_Food_Snacks_Carpmeat_Imitation(); S.loc = GlobalFuncs.get_turf(holder.my_atom); if (holder != null && Lang13.Bool(holder.my_atom)) { GlobalFuncs.qdel(holder.my_atom); } return; }
// Function from file: borghydro.dm public void add_reagent(dynamic reagent = null) { Reagents RG = null; dynamic R = null; this.reagent_ids.Or(reagent); RG = new Reagents(30); RG.my_atom = this; this.reagent_list.Add(RG); R = this.reagent_list[this.reagent_list.len]; R.add_reagent(reagent, 30); return; }
// Function from file: slime_extracts.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { Obj_Item_Weapon_Ore_BluespaceCrystal BC = null; GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type); if (Lang13.Bool(holder.my_atom)) { BC = new Obj_Item_Weapon_Ore_BluespaceCrystal(GlobalFuncs.get_turf(holder.my_atom)); BC.visible_message("<span class='notice'>The " + BC.name + " appears out of thin air!</span>"); } return; }
// Function from file: pyrotechnics.dm public override void on_reaction( Reagents holder = null, double? created_volume = null ) { dynamic T = null; int range = 0; if ( Lang13.Bool( holder.has_reagent( "stabilizing_agent" ) ) ) { return; } holder.remove_reagent( "sorium", created_volume ); T = GlobalFuncs.get_turf( holder.my_atom ); range = Num13.MaxInt( 1, Num13.MinInt( ((int)( Math.Sqrt( created_volume ??0 ) )), 6 ) ); this.goonchem_vortex( T, true, range ); return; }