diff --git a/code/game/objects/structures/wrecks.dm b/code/game/objects/structures/wrecks.dm index 75f297fa558..4a6b0e01f3d 100644 --- a/code/game/objects/structures/wrecks.dm +++ b/code/game/objects/structures/wrecks.dm @@ -55,47 +55,6 @@ name = "wrecked motorcycle" desc = "An old pre-war motorcycle, rusted and destroyed with age and weathering." icon_state = "rust_light_no_wheels" - uses_left = 2 - inuse = FALSE - -/obj/structure/wreck/car/bike/welder_act(mob/living/user, obj/item/I) - . = TRUE - - if(inuse || uses_left <= 0) //this means that if mappers or admins want an nonharvestable version, set the uses_left to 0 - return - inuse = TRUE //one at a time boys, this isn't some kind of weird party - if(!I.tool_start_check(user, amount=0)) //this seems to be called everywhere, so for consistency's sake - inuse = FALSE - return //the tool fails this check, so stop - user.visible_message("[user] starts disassembling [src].") - for(var/i1 in 1 to 2) - if(!I.use_tool(src, user, 75, volume=100)) - user.visible_message("[user] stops disassembling [src].") - inuse = FALSE - return //you did something, like moving, so stop - var/fake_dismantle = pick("plating", "chassis", "suspension arm", "part of the frame") - user.visible_message("[user] slices through a [fake_dismantle].") - - var/turf/usr_turf = get_turf(user) //Bellow are the changes made by PR#256 - var/modifier = 0 - if(HAS_TRAIT(user,TRAIT_TECHNOPHREAK)) - modifier += rand(1,3) - var/obj/item/l = user.get_inactive_held_item() - if(istype(l,/obj/item/weldingtool)) - var/obj/item/weldingtool/WO = l - if(WO.tool_start_check(user, amount=3)) - WO.use(3) - modifier++ - for(var/i2 in 1 to (2+modifier)) - new /obj/item/salvage/low(usr_turf) - for(var/i3 in 1 to (1+modifier)) //this is just less lines for the same thing - if(prob(6)) - new /obj/item/salvage/high(usr_turf) - uses_left-- - inuse = FALSE //putting this after the -- because the first check prevents cheesing - if(uses_left <= 0) //I prefer to put any qdel stuff at the very end, with src being the very last thing - visible_message("[src] falls apart, the final components having been removed.") - qdel(src) /obj/structure/wreck/bus name = "wrecked bus" @@ -103,8 +62,8 @@ bound_width = 192 bound_height = 64 icon = 'icons/obj/vehicles/bus1.dmi' - uses_left = 4 - inuse = FALSE + var/uses_left = 4 + var/inuse = FALSE /obj/structure/wreck/bus/welder_act(mob/living/user, obj/item/I) . = TRUE @@ -177,8 +136,7 @@ icon_state = "bus1" bound_width = 32 bound_height = 32 - uses_left = 2 - inuse = FALSE + var/uses_left = 2 /obj/structure/wreck/bus/rusted/segmented1 name = "wrecked bus"