code folder. 221 files changed wew
This commit is contained in:
@@ -121,6 +121,19 @@
|
||||
return I
|
||||
return FALSE
|
||||
|
||||
//Checks if we're holding a tool that has given quality
|
||||
//Returns the tool that has the best version of this quality
|
||||
/mob/proc/is_holding_tool_quality(quality)
|
||||
var/obj/item/best_item
|
||||
var/best_quality = INFINITY
|
||||
|
||||
for(var/obj/item/I in held_items)
|
||||
if(I.tool_behaviour == quality && I.toolspeed < best_quality)
|
||||
best_item = I
|
||||
best_quality = I.toolspeed
|
||||
|
||||
return best_item
|
||||
|
||||
|
||||
//To appropriately fluff things like "they are holding [I] in their [get_held_index_name(get_held_index_of_item(I))]"
|
||||
//Can be overriden to pass off the fluff to something else (eg: science allowing people to add extra robotic limbs, and having this proc react to that
|
||||
@@ -286,7 +299,7 @@
|
||||
return doUnEquip(I, force, null, TRUE, idrop)
|
||||
|
||||
//DO NOT CALL THIS PROC
|
||||
//use one of the above 2 helper procs
|
||||
//use one of the above 3 helper procs
|
||||
//you may override it, but do not modify the args
|
||||
/mob/proc/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE) //Force overrides NODROP_1 for things like wizarditis and admin undress.
|
||||
//Use no_move if the item is just gonna be immediately moved afterward
|
||||
|
||||
@@ -355,24 +355,21 @@
|
||||
/mob/living/silicon/robot/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weldingtool) && (user.a_intent != INTENT_HARM || user == src))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if (!getBruteLoss())
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
return
|
||||
if (WT.remove_fuel(0, user)) //The welder has 1u of fuel consumed by it's afterattack, so we don't need to worry about taking any away.
|
||||
if(src == user)
|
||||
to_chat(user, "<span class='notice'>You start fixing yourself...</span>")
|
||||
if(!do_after(user, 50, target = src))
|
||||
return
|
||||
if (!W.tool_start_check(user, amount=0)) //The welder has 1u of fuel consumed by it's afterattack, so we don't need to worry about taking any away.
|
||||
return
|
||||
if(src == user)
|
||||
to_chat(user, "<span class='notice'>You start fixing yourself...</span>")
|
||||
if(!W.use_tool(src, user, 50))
|
||||
return
|
||||
|
||||
adjustBruteLoss(-30)
|
||||
updatehealth()
|
||||
add_fingerprint(user)
|
||||
visible_message("<span class='notice'>[user] has fixed some of the dents on [src].</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
|
||||
return
|
||||
adjustBruteLoss(-30)
|
||||
updatehealth()
|
||||
add_fingerprint(user)
|
||||
visible_message("<span class='notice'>[user] has fixed some of the dents on [src].</span>")
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && wiresexposed)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -444,9 +441,8 @@
|
||||
spark_system.start()
|
||||
return
|
||||
else
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to unfasten [src]'s securing bolts...</span>")
|
||||
if(do_after(user, 50*W.toolspeed, target = src) && !cell)
|
||||
if(W.use_tool(src, user, 50, volume=50) && !cell)
|
||||
user.visible_message("[user] deconstructs [src]!", "<span class='notice'>You unfasten the securing bolts, and [src] falls to pieces!</span>")
|
||||
deconstruct()
|
||||
|
||||
|
||||
@@ -303,12 +303,10 @@
|
||||
if(!open)
|
||||
to_chat(user, "<span class='warning'>Unable to repair with the maintenance panel closed!</span>")
|
||||
return
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
|
||||
if(W.use_tool(src, user, 0, volume=40))
|
||||
adjustHealth(-10)
|
||||
user.visible_message("[user] repairs [src]!","<span class='notice'>You repair [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
|
||||
else
|
||||
if(W.force) //if force is non-zero
|
||||
do_sparks(5, TRUE, src)
|
||||
|
||||
@@ -101,8 +101,7 @@
|
||||
|
||||
if(ASSEMBLY_FOURTH_STEP)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
if(W.use_tool(src, user, 0, volume=40))
|
||||
name = "shielded frame assembly"
|
||||
to_chat(user, "<span class='notice'>You weld the vest to [src].</span>")
|
||||
build_step++
|
||||
@@ -183,9 +182,8 @@
|
||||
|
||||
if(8)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You start attaching the gun to the frame...</span>")
|
||||
if(do_after(user, 40*W.toolspeed, 0, src, 1))
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
name = "armed [name]"
|
||||
to_chat(user, "<span class='notice'>Taser gun attached.</span>")
|
||||
build_step++
|
||||
@@ -391,8 +389,7 @@
|
||||
switch(build_step)
|
||||
if(ASSEMBLY_FIRST_STEP)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(WT.remove_fuel(0, user))
|
||||
if(I.use_tool(src, user, 0, volume=40))
|
||||
add_overlay("hs_hole")
|
||||
to_chat(user, "<span class='notice'>You weld a hole in [src]!</span>")
|
||||
build_step++
|
||||
@@ -414,8 +411,7 @@
|
||||
build_step++
|
||||
|
||||
else if(istype(I, /obj/item/weldingtool)) //deconstruct
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(WT.remove_fuel(0, user))
|
||||
if(I.use_tool(src, user, 0, volume=40))
|
||||
cut_overlay("hs_hole")
|
||||
to_chat(user, "<span class='notice'>You weld the hole in [src] shut!</span>")
|
||||
build_step--
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
maxHealth = 30
|
||||
unsuitable_atmos_damage = 0
|
||||
wander = 0
|
||||
speed = -1
|
||||
speed = 0
|
||||
ventcrawler = VENTCRAWLER_ALWAYS
|
||||
healable = 0
|
||||
density = FALSE
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
if(istype(I, /obj/item/screwdriver) && stat != DEAD)
|
||||
if(health < maxHealth)
|
||||
to_chat(user, "<span class='notice'>You start to tighten loose screws on [src]...</span>")
|
||||
if(do_after(user,80*I.toolspeed,target=user))
|
||||
if(I.use_tool(src, user, 80))
|
||||
adjustBruteLoss(-getBruteLoss())
|
||||
visible_message("<span class='notice'>[user] tightens [src == user ? "[user.p_their()]" : "[src]'s"] loose screws!</span>", "<span class='notice'>You tighten [src == user ? "your" : "[src]'s"] loose screws.</span>")
|
||||
else
|
||||
@@ -91,12 +91,10 @@
|
||||
else if(istype(I, /obj/item/wrench) && user != src) //They aren't required to be hacked, because laws can change in other ways (i.e. admins)
|
||||
user.visible_message("<span class='notice'>[user] starts resetting [src]...</span>", \
|
||||
"<span class='notice'>You press down on [src]'s factory reset control...</span>")
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
if(!do_after(user, 50*I.toolspeed, target = src))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] resets [src]!</span>", \
|
||||
"<span class='notice'>You reset [src]'s directives to factory defaults!</span>")
|
||||
update_drone_hack(FALSE)
|
||||
if(I.use_tool(src, user, 50, volume=50))
|
||||
user.visible_message("<span class='notice'>[user] resets [src]!</span>", \
|
||||
"<span class='notice'>You reset [src]'s directives to factory defaults!</span>")
|
||||
update_drone_hack(FALSE)
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
pass_flags = PASSTABLE | PASSMOB
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
var/list/feedMessages = list("It clucks happily.","It clucks happily.")
|
||||
var/list/layMessage = list("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.")
|
||||
var/list/layMessage = EGG_LAYING_MESSAGES
|
||||
var/list/validColors = list("brown","black","white")
|
||||
gold_core_spawnable = FRIENDLY_SPAWN
|
||||
var/static/chicken_count = 0
|
||||
@@ -290,7 +290,7 @@
|
||||
if(!.)
|
||||
return
|
||||
if((!stat && prob(3) && eggsleft > 0) && egg_type)
|
||||
visible_message("[src] [pick(layMessage)]")
|
||||
visible_message("<span class='alertalien'>[src] [pick(layMessage)]</span>")
|
||||
eggsleft--
|
||||
var/obj/item/E = new egg_type(get_turf(src))
|
||||
E.pixel_x = rand(-6,6)
|
||||
|
||||
Reference in New Issue
Block a user