code folder. 221 files changed wew
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
//try to find a pre-processed blood-splatter. otherwise, make a new one
|
||||
var/index = "[REF(icon)]-[icon_state]"
|
||||
pic = blood_splatter_appearances[index]
|
||||
|
||||
if(!pic)
|
||||
var/icon/blood_splatter_icon = icon(initial(I.icon), initial(I.icon_state), , 1) //we only want to apply blood-splatters to the initial icon_state for each object
|
||||
blood_splatter_icon.Blend("#fff", ICON_ADD) //fills the icon_state with white (except where it's transparent)
|
||||
|
||||
@@ -23,33 +23,46 @@
|
||||
set_desc(steps.len)
|
||||
return
|
||||
|
||||
/datum/construction/proc/action(atom/used_atom,mob/user)
|
||||
/datum/construction/proc/action(obj/item/I, mob/user)
|
||||
return
|
||||
|
||||
/datum/construction/proc/check_step(atom/used_atom,mob/user) //check last step only
|
||||
var/valid_step = is_right_key(used_atom)
|
||||
/datum/construction/proc/check_step(obj/item/I, mob/user) //check last step only
|
||||
var/valid_step = is_right_key(I)
|
||||
if(valid_step)
|
||||
if(custom_action(valid_step, used_atom, user))
|
||||
if(custom_action(valid_step, I, user))
|
||||
next_step()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/construction/proc/is_right_key(atom/used_atom) // returns current step num if used_atom is of the right type.
|
||||
/datum/construction/proc/is_right_key(obj/item/I) // returns current step num if I is of the right type.
|
||||
var/list/L = steps[steps.len]
|
||||
if(istype(used_atom, L["key"]))
|
||||
if(check_used_item(I, L["key"]))
|
||||
return steps.len
|
||||
return 0
|
||||
|
||||
/datum/construction/proc/custom_action(step, used_atom, user)
|
||||
/datum/construction/proc/check_used_item(obj/item/I, key)
|
||||
if(!key)
|
||||
return FALSE
|
||||
|
||||
if(ispath(key) && istype(I, key))
|
||||
return TRUE
|
||||
|
||||
else if(I.tool_behaviour == key)
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
|
||||
/datum/construction/proc/custom_action(step, obj/item/I, user)
|
||||
return 1
|
||||
|
||||
/datum/construction/proc/check_all_steps(atom/used_atom,mob/user) //check all steps, remove matching one.
|
||||
/datum/construction/proc/check_all_steps(obj/item/I, mob/user) //check all steps, remove matching one.
|
||||
for(var/i=1;i<=steps.len;i++)
|
||||
var/list/L = steps[i];
|
||||
if(istype(used_atom, L["key"]))
|
||||
if(custom_action(i, used_atom, user))
|
||||
steps[i]=null;//stupid byond list from list removal...
|
||||
listclearnulls(steps);
|
||||
var/list/L = steps[i]
|
||||
if(check_used_item(I, L["key"]))
|
||||
if(custom_action(i, I, user))
|
||||
steps[i] = null//stupid byond list from list removal...
|
||||
listclearnulls(steps)
|
||||
if(!steps.len)
|
||||
spawn_result()
|
||||
return 1
|
||||
@@ -76,6 +89,9 @@
|
||||
holder.desc = step["desc"]
|
||||
return
|
||||
|
||||
/datum/construction/proc/drop_location()
|
||||
return holder.drop_location()
|
||||
|
||||
/datum/construction/reversible
|
||||
var/index
|
||||
|
||||
@@ -92,21 +108,21 @@
|
||||
set_desc(index)
|
||||
return
|
||||
|
||||
/datum/construction/reversible/is_right_key(atom/used_atom) // returns index step
|
||||
/datum/construction/reversible/is_right_key(obj/item/I) // returns index step
|
||||
var/list/L = steps[index]
|
||||
if(istype(used_atom, L["key"]))
|
||||
if(check_used_item(I, L["key"]))
|
||||
return FORWARD //to the first step -> forward
|
||||
else if(L["backkey"] && istype(used_atom, L["backkey"]))
|
||||
else if(check_used_item(I, L["backkey"]))
|
||||
return BACKWARD //to the last step -> backwards
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/construction/reversible/check_step(atom/used_atom,mob/user)
|
||||
var/diff = is_right_key(used_atom)
|
||||
/datum/construction/reversible/check_step(obj/item/I, mob/user)
|
||||
var/diff = is_right_key(I)
|
||||
if(diff)
|
||||
if(custom_action(index, diff, used_atom, user))
|
||||
if(custom_action(index, diff, I, user))
|
||||
update_index(diff)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/construction/reversible/custom_action(index, diff, used_atom, user)
|
||||
/datum/construction/reversible/custom_action(index, diff, obj/item/I, user)
|
||||
return 1
|
||||
|
||||
@@ -87,7 +87,6 @@
|
||||
description = "A respectable mid-sized shuttle that first saw service shuttling Nanotrasen crew to and from their asteroid belt embedded facilities."
|
||||
credit_cost = 3000
|
||||
|
||||
|
||||
/datum/map_template/shuttle/emergency/bar
|
||||
suffix = "bar"
|
||||
name = "The Emergency Escape Bar"
|
||||
@@ -110,18 +109,6 @@
|
||||
admin_notes = "This shuttle will likely crush escape, killing anyone there."
|
||||
credit_cost = -5000
|
||||
|
||||
/datum/map_template/shuttle/emergency/saltmine
|
||||
suffix = "saltmine"
|
||||
name = "The Saltmine"
|
||||
description = "Contains everything that upsets you."
|
||||
admin_notes = "Don't forget: You're here forever."
|
||||
credit_cost = 5000
|
||||
|
||||
/datum/map_template/shuttle/emergency/saltmine/prerequisites_met()
|
||||
if("revenant" in SSshuttle.shuttle_purchase_requirements_met)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/map_template/shuttle/emergency/luxury
|
||||
suffix = "luxury"
|
||||
name = "Luxury Shuttle"
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#define MAXIMUM_EMP_WIRES 3
|
||||
|
||||
/proc/is_wire_tool(obj/item/I)
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
return TRUE
|
||||
if(istype(I, /obj/item/wirecutters))
|
||||
if(!I)
|
||||
return
|
||||
|
||||
if(I.tool_behaviour == TOOL_WIRECUTTER || I.tool_behaviour == TOOL_MULTITOOL)
|
||||
return TRUE
|
||||
if(istype(I, /obj/item/device/assembly))
|
||||
var/obj/item/device/assembly/A = I
|
||||
if(A.attachable)
|
||||
return TRUE
|
||||
return
|
||||
|
||||
/atom
|
||||
var/datum/wires/wires = null
|
||||
@@ -244,29 +244,34 @@
|
||||
return
|
||||
var/target_wire = params["wire"]
|
||||
var/mob/living/L = usr
|
||||
var/obj/item/I = L.get_active_held_item()
|
||||
var/obj/item/I
|
||||
switch(action)
|
||||
if("cut")
|
||||
if(istype(I, /obj/item/wirecutters) || IsAdminGhost(usr))
|
||||
playsound(holder, I.usesound, 20, 1)
|
||||
I = L.is_holding_tool_quality(TOOL_WIRECUTTER)
|
||||
if(I || IsAdminGhost(usr))
|
||||
if(I)
|
||||
I.play_tool_sound(src, 20)
|
||||
cut_color(target_wire)
|
||||
. = TRUE
|
||||
else
|
||||
to_chat(L, "<span class='warning'>You need wirecutters!</span>")
|
||||
if("pulse")
|
||||
if(istype(I, /obj/item/device/multitool) || IsAdminGhost(usr))
|
||||
playsound(holder, 'sound/weapons/empty.ogg', 20, 1)
|
||||
I = L.is_holding_tool_quality(TOOL_MULTITOOL)
|
||||
if(I || IsAdminGhost(usr))
|
||||
if(I)
|
||||
I.play_tool_sound(src, 20)
|
||||
pulse_color(target_wire, L)
|
||||
. = TRUE
|
||||
else
|
||||
to_chat(L, "<span class='warning'>You need a multitool!</span>")
|
||||
if("attach")
|
||||
if(is_attached(target_wire))
|
||||
var/obj/item/O = detach_assembly(target_wire)
|
||||
if(O)
|
||||
L.put_in_hands(O)
|
||||
I = detach_assembly(target_wire)
|
||||
if(I)
|
||||
L.put_in_hands(I)
|
||||
. = TRUE
|
||||
else
|
||||
I = L.get_active_held_item()
|
||||
if(istype(I, /obj/item/device/assembly))
|
||||
var/obj/item/device/assembly/A = I
|
||||
if(A.attachable)
|
||||
|
||||
Reference in New Issue
Block a user