Files
Aurora.3/code/game/turfs/simulated/floor_attackby.dm
T
AlberykandWerner 76b743a986 Adds the Aut'akh unathi (#5919)
* Base work for the unathi robot subspecies.

* Adds metabolism species, kidney vars, and the robot unathi organs.

* Moves some action buttons to organs, pretty much a bay port right now. Todo: the unathi and alien stuff should also go here.

* First autakh implant power.

* Fixes the organs action button this time.

* Finishes more implants, and interactions with flashs and vaurca.

* Prepare for great changes.

* Drops the real bomb, boss.

* He who fights with monsters.

* Far more work into augments and limb removing powers.

* Limb verbs should be good now.

* A LOT of work into the assited organ, allowing it to bleed and etc, as well adding a new chem that will stop bleeding in their case.

* Probably the last work on implants.

* Some extra touches.

* Some tweaks to the species.

* More fixes and adds kyre's sprites.

* More runtime fixes.

* Fixes the species name too.

* Fixes travis.

* Updates this file too to work with the new tools procs.

* Adds changelog

* Fixed changelog.

* Unathi hair and lore description.

* Some tweaks to this too.

* Locks away them for now, they will be released after we got all the events and etc done.

* Changes this chemical.

* Fixes an airlock runtime.

* Adds the non scan flag to the autakh, mostly due to some bizzare interactions with changelings and cloning.

* Organs removal changes; can't take out the organ if it is too damage.

* Restricts them back again.

* Robotic organs now have the proper icons and names.

* Adds sprites for their organs and some extra tweaks.

* Fixes this missing icon.

* emp should also now hurt assited organs.

* Tweaks more organ related things.

* Fixes the head not being properly set as well.

* Fixes their flags.

* fixes the flag for real this time.

* Poze's review.

* Changes the au'takh organ buttons to don't be animated.

* Helps with adminbus or something.

* Fowl's requested changes.

* Fixes a typo.

* Robotic limb's brute and burn mods are now controlled by the limb model.

* Fowl's changes once more.

* Stops some spam.

* More grammar.

* No eal.

* Skull's review.
2019-01-23 19:27:44 +01:00

97 lines
3.5 KiB
Plaintext

/turf/simulated/floor/attackby(obj/item/C as obj, mob/user as mob)
if(!C || !user)
return 0
if(flooring)
if(C.iscrowbar())
if(broken || burnt)
user << "<span class='notice'>You remove the broken [flooring.descriptor].</span>"
make_plating()
else if(flooring.flags & TURF_IS_FRAGILE)
user << "<span class='danger'>You forcefully pry off the [flooring.descriptor], destroying them in the process.</span>"
make_plating()
else if(flooring.flags & TURF_REMOVE_CROWBAR)
user << "<span class='notice'>You lever off the [flooring.descriptor].</span>"
make_plating(1)
else
return
playsound(src, 'sound/items/Crowbar.ogg', 80, 1)
return
else if(C.isscrewdriver() && (flooring.flags & TURF_REMOVE_SCREWDRIVER))
if(broken || burnt)
return
user << "<span class='notice'>You unscrew and remove the [flooring.descriptor].</span>"
make_plating(1)
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
return
else if(C.iswrench() && (flooring.flags & TURF_REMOVE_WRENCH))
user << "<span class='notice'>You unwrench and remove the [flooring.descriptor].</span>"
make_plating(1)
playsound(src, 'sound/items/Ratchet.ogg', 80, 1)
return
else if(istype(C, /obj/item/weapon/shovel) && (flooring.flags & TURF_REMOVE_SHOVEL))
user << "<span class='notice'>You shovel off the [flooring.descriptor].</span>"
make_plating(1)
playsound(src, 'sound/items/Deconstruct.ogg', 80, 1)
return
else if(C.iscoil())
user << "<span class='warning'>You must remove the [flooring.descriptor] first.</span>"
return
else
if(C.iscoil())
if(broken || burnt)
user << "<span class='warning'>This section is too damaged to support anything. Use a welder to fix the damage.</span>"
return
var/obj/item/stack/cable_coil/coil = C
coil.turf_place(src, user)
return
else if(istype(C, /obj/item/stack))
if(broken || burnt)
user << "<span class='warning'>This section is too damaged to support anything. Use a welder to fix the damage.</span>"
return
var/obj/item/stack/S = C
var/decl/flooring/use_flooring
for(var/flooring_type in flooring_types)
var/decl/flooring/F = flooring_types[flooring_type]
if(!F.build_type)
continue
if(ispath(S.type, F.build_type) || ispath(S.build_type, F.build_type))
use_flooring = F
break
if(!use_flooring)
return
// Do we have enough?
if(use_flooring.build_cost && S.get_amount() < use_flooring.build_cost)
user << "<span class='warning'>You require at least [use_flooring.build_cost] [S.name] to complete the [use_flooring.descriptor].</span>"
return
// Stay still and focus...
if(use_flooring.build_time && !do_after(user, use_flooring.build_time))
return
if(flooring || !S || !user || !use_flooring)
return
if(S.use(use_flooring.build_cost))
set_flooring(use_flooring)
playsound(src, 'sound/items/Deconstruct.ogg', 80, 1)
return
// Repairs.
else if(C.iswelder())
var/obj/item/weapon/weldingtool/welder = C
if(welder.isOn() && (is_plating()))
if(broken || burnt)
if(welder.remove_fuel(0,user))
user << "<span class='notice'>You fix some dents on the broken plating.</span>"
playsound(src, 'sound/items/Welder.ogg', 80, 1)
icon_state = "plating"
burnt = null
broken = null
else
user << "<span class='warning'>You need more welding fuel to complete this task.</span>"
/turf/simulated/floor/can_lay_cable()
return !flooring
/turf/simulated/can_have_cabling()
return TRUE