mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge resolution, master into dev.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
/datum/game_mode/cult
|
||||
name = "cult"
|
||||
config_tag = "cult"
|
||||
restricted_jobs = list("Chaplain","AI", "Cyborg", "Lawyer", "Head of Security", "Captain")
|
||||
restricted_jobs = list("Chaplain","AI", "Cyborg", "Internal Affairs Agent", "Head of Security", "Captain")
|
||||
protected_jobs = list("Security Officer", "Warden", "Detective")
|
||||
required_players = 5
|
||||
required_players_secret = 15
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/datum/game_mode/revolution
|
||||
name = "revolution"
|
||||
config_tag = "revolution"
|
||||
restricted_jobs = list("Lawyer", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
|
||||
restricted_jobs = list("Internal Affairs Agent", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
|
||||
protected_jobs = list("Security Officer", "Warden", "Detective")
|
||||
required_players = 4
|
||||
required_players_secret = 15
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
name = "traitor"
|
||||
config_tag = "traitor"
|
||||
restricted_jobs = list("Cyborg")//They are part of the AI if he is traitor so are they, they use to get double chances
|
||||
protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain")//AI", Currently out of the list as malf does not work for shit
|
||||
protected_jobs = list("Security Officer", "Warden", "Detective", "Internal Affairs Agent", "Head of Security", "Captain")//AI", Currently out of the list as malf does not work for shit
|
||||
required_players = 0
|
||||
required_enemies = 1
|
||||
recommended_enemies = 4
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
access_tox_storage, access_teleporter, access_sec_doors,
|
||||
access_research, access_robotics, access_xenobiology, access_ai_upload,
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch)
|
||||
minimal_player_age = 7
|
||||
minimal_player_age = 14
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
@@ -50,6 +50,8 @@
|
||||
minimal_access = list(access_tox, access_tox_storage, access_research, access_xenoarch)
|
||||
alt_titles = list("Xenoarcheologist", "Anomalist", "Phoron Researcher", "Xenobotanist")
|
||||
|
||||
minimal_player_age = 14
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
|
||||
@@ -79,6 +81,8 @@
|
||||
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology)
|
||||
minimal_access = list(access_research, access_xenobiology)
|
||||
|
||||
minimal_player_age = 14
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
|
||||
@@ -108,6 +112,8 @@
|
||||
minimal_access = list(access_robotics, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access.
|
||||
alt_titles = list("Biomechanical Engineer","Mechatronic Engineer")
|
||||
|
||||
minimal_player_age = 7
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
|
||||
@@ -123,4 +129,4 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -325,7 +325,8 @@ var/global/list/frozen_items = list()
|
||||
time_entered = world.time
|
||||
|
||||
// Book keeping!
|
||||
log_admin("[key_name_admin(M)] has entered a stasis pod.")
|
||||
var/turf/location = get_turf(src)
|
||||
log_admin("[key_name_admin(M)] has entered a stasis pod. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
|
||||
message_admins("\blue [key_name_admin(M)] has entered a stasis pod.")
|
||||
|
||||
//Despawning occurs when process() is called with an occupant without a client.
|
||||
|
||||
@@ -532,23 +532,26 @@ About the new airlock wires panel:
|
||||
return ((src.wires & wireFlag) == 0)
|
||||
|
||||
/obj/machinery/door/airlock/proc/canAIControl()
|
||||
return ((src.aiControlDisabled!=1) && (!src.isAllPowerCut()));
|
||||
return ((src.aiControlDisabled!=1) && (!src.isAllPowerLoss()));
|
||||
|
||||
/obj/machinery/door/airlock/proc/canAIHack(var/user as mob)
|
||||
return (isAI(user) && src.aiControlDisabled==1 && !hackProof && !src.isAllPowerCut());
|
||||
/obj/machinery/door/airlock/proc/canAIHack()
|
||||
return ((src.aiControlDisabled==1) && (!hackProof) && (!src.isAllPowerLoss()));
|
||||
|
||||
/obj/machinery/door/airlock/proc/arePowerSystemsOn()
|
||||
if (stat & NOPOWER)
|
||||
return 0
|
||||
return (src.secondsMainPowerLost==0 || src.secondsBackupPowerLost==0)
|
||||
|
||||
/obj/machinery/door/airlock/requiresID()
|
||||
return !(src.isWireCut(AIRLOCK_WIRE_IDSCAN) || aiDisabledIdScanner)
|
||||
|
||||
/obj/machinery/door/airlock/proc/isAllPowerCut()
|
||||
var/retval=0
|
||||
/obj/machinery/door/airlock/proc/isAllPowerLoss()
|
||||
if(stat & NOPOWER)
|
||||
return 1
|
||||
if(src.isWireCut(AIRLOCK_WIRE_MAIN_POWER1) || src.isWireCut(AIRLOCK_WIRE_MAIN_POWER2))
|
||||
if(src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER1) || src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER2))
|
||||
retval=1
|
||||
return retval
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/door/airlock/proc/regainMainPower()
|
||||
if(src.secondsMainPowerLost > 0)
|
||||
@@ -639,9 +642,11 @@ About the new airlock wires panel:
|
||||
else
|
||||
flick("door_closing", src)
|
||||
if("spark")
|
||||
flick("door_spark", src)
|
||||
if(density)
|
||||
flick("door_spark", src)
|
||||
if("deny")
|
||||
flick("door_deny", src)
|
||||
if(density)
|
||||
flick("door_deny", src)
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/attack_ai(mob/user as mob)
|
||||
@@ -868,7 +873,7 @@ About the new airlock wires panel:
|
||||
t1 += "<a href='?src=\ref[src];signaler=[wires[wiredesc]]'>Attach signaler</a>"
|
||||
t1 += "<br>"
|
||||
|
||||
t1 += text("<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]", (src.locked ? "The door bolts have fallen!" : "The door bolts look up."), (src.lights ? "The door bolt lights are on." : "The door bolt lights are off!"), ((src.arePowerSystemsOn() && !(stat & NOPOWER)) ? "The test light is on." : "The test light is off!"), (src.aiControlDisabled==0 ? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."), (src.safe==0 ? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."), (src.normalspeed==0 ? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."))
|
||||
t1 += text("<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]", (src.locked ? "The door bolts have fallen!" : "The door bolts look up."), (src.lights ? "The door bolt lights are on." : "The door bolt lights are off!"), ((src.arePowerSystemsOn()) ? "The test light is on." : "The test light is off!"), (src.aiControlDisabled==0 ? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."), (src.safe==0 ? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."), (src.normalspeed==0 ? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."))
|
||||
|
||||
t1 += text("<p><a href='?src=\ref[];close=1'>Close</a></p>\n", src)
|
||||
|
||||
@@ -1171,7 +1176,7 @@ About the new airlock wires panel:
|
||||
beingcrowbarred = 1 //derp, Agouri
|
||||
else
|
||||
beingcrowbarred = 0
|
||||
if( beingcrowbarred && (operating == -1 || density && welded && operating != 1 && src.p_open && (!src.arePowerSystemsOn() || stat & NOPOWER) && !src.locked) )
|
||||
if( beingcrowbarred && src.p_open && (operating == -1 || (density && welded && operating != 1 && !src.arePowerSystemsOn() && !src.locked)) )
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
|
||||
if(do_after(user,40))
|
||||
@@ -1211,7 +1216,7 @@ About the new airlock wires panel:
|
||||
|
||||
del(src)
|
||||
return
|
||||
else if(arePowerSystemsOn() && !(stat & NOPOWER))
|
||||
else if(arePowerSystemsOn())
|
||||
user << "\blue The airlock's motors resist your efforts to force it."
|
||||
else if(locked)
|
||||
user << "\blue The airlock's bolts prevent it from being forced."
|
||||
@@ -1248,7 +1253,7 @@ About the new airlock wires panel:
|
||||
if( operating || welded || locked )
|
||||
return 0
|
||||
if(!forced)
|
||||
if( !arePowerSystemsOn() || (stat & NOPOWER) || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) )
|
||||
if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) )
|
||||
return 0
|
||||
use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people
|
||||
if(istype(src, /obj/machinery/door/airlock/glass))
|
||||
@@ -1263,7 +1268,7 @@ About the new airlock wires panel:
|
||||
if(operating || welded || locked)
|
||||
return
|
||||
if(!forced)
|
||||
if( !arePowerSystemsOn() || (stat & NOPOWER) || isWireCut(AIRLOCK_WIRE_DOOR_BOLTS) )
|
||||
if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_DOOR_BOLTS) )
|
||||
return
|
||||
if(safe)
|
||||
for(var/turf/turf in locs)
|
||||
@@ -1305,7 +1310,7 @@ About the new airlock wires panel:
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/proc/lock(var/forced=0)
|
||||
if (src.locked) return
|
||||
if (operating || src.locked) return
|
||||
|
||||
src.locked = 1
|
||||
for(var/mob/M in range(1,src))
|
||||
@@ -1313,9 +1318,9 @@ About the new airlock wires panel:
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/door/airlock/proc/unlock(var/forced=0)
|
||||
if (!src.locked) return 0
|
||||
if (operating || !src.locked) return
|
||||
|
||||
if(forced || src.arePowerSystemsOn()) //only can raise bolts if power's on
|
||||
if (forced || (src.arePowerSystemsOn())) //only can raise bolts if power's on
|
||||
src.locked = 0
|
||||
for(var/mob/M in range(1,src))
|
||||
M.show_message("You hear a click from the bottom of the door.", 2)
|
||||
|
||||
@@ -9,16 +9,19 @@ obj/machinery/door/airlock
|
||||
var/cur_command = null //the command the door is currently attempting to complete
|
||||
|
||||
obj/machinery/door/airlock/proc/can_radio()
|
||||
if( !arePowerSystemsOn() || (stat & NOPOWER) || isWireCut(AIRLOCK_WIRE_AI_CONTROL) )
|
||||
if(!arePowerSystemsOn())
|
||||
return 0
|
||||
return 1
|
||||
|
||||
obj/machinery/door/airlock/process()
|
||||
..()
|
||||
execute_current_command()
|
||||
if (arePowerSystemsOn())
|
||||
execute_current_command()
|
||||
|
||||
obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||
if (!can_radio()) return
|
||||
if (!arePowerSystemsOn()) return //no power
|
||||
|
||||
if (!can_radio()) return //no radio
|
||||
|
||||
if(!signal || signal.encryption) return
|
||||
|
||||
@@ -28,6 +31,9 @@ obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||
execute_current_command()
|
||||
|
||||
obj/machinery/door/airlock/proc/execute_current_command()
|
||||
if(operating)
|
||||
return //emagged or busy doing something else
|
||||
|
||||
if (!cur_command)
|
||||
return
|
||||
|
||||
|
||||
@@ -199,7 +199,9 @@
|
||||
|
||||
//checks if we are ready for undocking
|
||||
/datum/computer/file/embedded_program/airlock/multi_docking/proc/ready_for_undocking()
|
||||
return check_doors_secured()
|
||||
var/ext_closed = check_exterior_door_secured()
|
||||
var/int_closed = check_interior_door_secured()
|
||||
return (ext_closed || int_closed)
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/multi_docking/proc/open_doors()
|
||||
toggleDoor(memory["interior_status"], tag_interior_door, memory["secure"], "open")
|
||||
|
||||
@@ -328,7 +328,8 @@
|
||||
if (src.product_records.len == 0)
|
||||
dat += "<font color = 'red'>No product loaded!</font>"
|
||||
else
|
||||
var/list/display_records = src.product_records
|
||||
var/list/display_records = list()
|
||||
display_records += src.product_records
|
||||
|
||||
if(src.extended_inventory)
|
||||
display_records += src.hidden_records
|
||||
|
||||
@@ -6,43 +6,52 @@
|
||||
var/obj/machinery/computer/mech_bay_power_console/recharge_console
|
||||
var/obj/mecha/recharging_mecha = null
|
||||
|
||||
Entered(var/obj/mecha/mecha)
|
||||
. = ..()
|
||||
if(istype(mecha))
|
||||
mecha.occupant_message("<b>Initializing power control devices.</b>")
|
||||
init_devices()
|
||||
if(recharge_console && recharge_port)
|
||||
recharging_mecha = mecha
|
||||
recharge_console.mecha_in(mecha)
|
||||
return
|
||||
else if(!recharge_console)
|
||||
mecha.occupant_message("<font color='red'>Control console not found. Terminating.</font>")
|
||||
else if(!recharge_port)
|
||||
mecha.occupant_message("<font color='red'>Power port not found. Terminating.</font>")
|
||||
return
|
||||
/turf/simulated/floor/mech_bay_recharge_floor/Entered(var/obj/mecha/mecha)
|
||||
. = ..()
|
||||
if(istype(mecha))
|
||||
mecha.occupant_message("<b>Initializing power control devices.</b>")
|
||||
init_devices()
|
||||
if(recharge_console && recharge_port)
|
||||
recharging_mecha = mecha
|
||||
recharge_console.mecha_in(mecha)
|
||||
return
|
||||
else if(!recharge_console)
|
||||
mecha.occupant_message("<font color='red'>Control console not found. Terminating.</font>")
|
||||
else if(!recharge_port)
|
||||
mecha.occupant_message("<font color='red'>Power port not found. Terminating.</font>")
|
||||
return
|
||||
|
||||
Exited(atom)
|
||||
. = ..()
|
||||
if(atom == recharging_mecha)
|
||||
recharging_mecha = null
|
||||
if(recharge_console)
|
||||
recharge_console.mecha_out()
|
||||
return
|
||||
|
||||
proc/init_devices()
|
||||
recharge_console = locate() in range(1,src)
|
||||
recharge_port = locate(/obj/machinery/mech_bay_recharge_port, get_step(src, WEST))
|
||||
/turf/simulated/floor/mech_bay_recharge_floor/Exited(atom)
|
||||
. = ..()
|
||||
if(atom == recharging_mecha)
|
||||
recharging_mecha = null
|
||||
if(recharge_console)
|
||||
recharge_console.recharge_floor = src
|
||||
if(recharge_port)
|
||||
recharge_console.recharge_port = recharge_port
|
||||
recharge_console.mecha_out()
|
||||
return
|
||||
|
||||
/turf/simulated/floor/mech_bay_recharge_floor/proc/init_devices()
|
||||
if(!recharge_console)
|
||||
recharge_console = locate() in range(1,src)
|
||||
if(!recharge_port)
|
||||
recharge_port = locate() in get_step(src, WEST)
|
||||
|
||||
if(recharge_console)
|
||||
recharge_console.recharge_floor = src
|
||||
if(recharge_port)
|
||||
recharge_port.recharge_floor = src
|
||||
if(recharge_console)
|
||||
recharge_port.recharge_console = recharge_console
|
||||
return
|
||||
|
||||
recharge_console.recharge_port = recharge_port
|
||||
if(recharge_port)
|
||||
recharge_port.recharge_floor = src
|
||||
if(recharge_console)
|
||||
recharge_port.recharge_console = recharge_console
|
||||
return
|
||||
|
||||
// temporary fix for broken icon until somebody gets around to make these player-buildable
|
||||
/turf/simulated/floor/mech_bay_recharge_floor/attackby(obj/item/C as obj, mob/user as mob)
|
||||
..()
|
||||
if(floor_tile)
|
||||
icon_state = "recharge_floor"
|
||||
else
|
||||
icon_state = "support_lattice"
|
||||
|
||||
|
||||
/obj/machinery/mech_bay_recharge_port
|
||||
@@ -55,50 +64,50 @@
|
||||
var/obj/machinery/computer/mech_bay_power_console/recharge_console
|
||||
var/datum/global_iterator/mech_bay_recharger/pr_recharger
|
||||
|
||||
New()
|
||||
..()
|
||||
pr_recharger = new /datum/global_iterator/mech_bay_recharger(null,0)
|
||||
return
|
||||
/obj/machinery/mech_bay_recharge_port/New()
|
||||
..()
|
||||
pr_recharger = new /datum/global_iterator/mech_bay_recharger(null,0)
|
||||
return
|
||||
|
||||
proc/start_charge(var/obj/mecha/recharging_mecha)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
recharging_mecha.occupant_message("<font color='red'>Power port not responding. Terminating.</font>")
|
||||
return 0
|
||||
else
|
||||
if(recharging_mecha.cell)
|
||||
recharging_mecha.occupant_message("Now charging...")
|
||||
pr_recharger.start(list(src,recharging_mecha))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
proc/stop_charge()
|
||||
if(recharge_console && !recharge_console.stat)
|
||||
recharge_console.icon_state = initial(recharge_console.icon_state)
|
||||
pr_recharger.stop()
|
||||
return
|
||||
|
||||
proc/active()
|
||||
if(pr_recharger.active())
|
||||
/obj/machinery/mech_bay_recharge_port/proc/start_charge(var/obj/mecha/recharging_mecha)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
recharging_mecha.occupant_message("<font color='red'>Power port not responding. Terminating.</font>")
|
||||
return 0
|
||||
else
|
||||
if(recharging_mecha.cell)
|
||||
recharging_mecha.occupant_message("Now charging...")
|
||||
pr_recharger.start(list(src,recharging_mecha))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
power_change()
|
||||
if(powered())
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
stat |= NOPOWER
|
||||
pr_recharger.stop()
|
||||
return
|
||||
/obj/machinery/mech_bay_recharge_port/proc/stop_charge()
|
||||
if(recharge_console && !recharge_console.stat)
|
||||
recharge_console.icon_state = initial(recharge_console.icon_state)
|
||||
pr_recharger.stop()
|
||||
return
|
||||
|
||||
proc/set_voltage(new_voltage)
|
||||
if(new_voltage && isnum(new_voltage))
|
||||
pr_recharger.max_charge = new_voltage
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
/obj/machinery/mech_bay_recharge_port/proc/active()
|
||||
if(pr_recharger.active())
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/mech_bay_recharge_port/power_change()
|
||||
if(powered())
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
stat |= NOPOWER
|
||||
pr_recharger.stop()
|
||||
return
|
||||
|
||||
/obj/machinery/mech_bay_recharge_port/proc/set_voltage(new_voltage)
|
||||
if(new_voltage && isnum(new_voltage))
|
||||
pr_recharger.max_charge = new_voltage
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/datum/global_iterator/mech_bay_recharger
|
||||
@@ -106,23 +115,22 @@
|
||||
var/max_charge = 45
|
||||
check_for_null = 0 //since port.stop_charge() must be called. The checks are made in process()
|
||||
|
||||
process(var/obj/machinery/mech_bay_recharge_port/port, var/obj/mecha/mecha)
|
||||
if(!port)
|
||||
return 0
|
||||
if(mecha && mecha in port.recharge_floor)
|
||||
if(!mecha.cell) return
|
||||
var/delta = min(max_charge, mecha.cell.maxcharge - mecha.cell.charge)
|
||||
if(delta>0)
|
||||
mecha.give_power(delta)
|
||||
port.use_power(delta*150)
|
||||
else
|
||||
mecha.occupant_message("<font color='blue'><b>Fully charged.</b></font>")
|
||||
port.stop_charge()
|
||||
/datum/global_iterator/mech_bay_recharger/process(var/obj/machinery/mech_bay_recharge_port/port, var/obj/mecha/mecha)
|
||||
if(!port)
|
||||
return 0
|
||||
if(mecha && mecha in port.recharge_floor)
|
||||
if(!mecha.cell)
|
||||
return
|
||||
var/delta = min(max_charge, mecha.cell.maxcharge - mecha.cell.charge)
|
||||
if(delta>0)
|
||||
mecha.give_power(delta)
|
||||
port.use_power(delta*150)
|
||||
else
|
||||
mecha.occupant_message("<font color='blue'><b>Fully charged.</b></font>")
|
||||
port.stop_charge()
|
||||
return
|
||||
|
||||
|
||||
else
|
||||
port.stop_charge()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/mech_bay_power_console
|
||||
@@ -137,82 +145,90 @@
|
||||
var/turf/simulated/floor/mech_bay_recharge_floor/recharge_floor
|
||||
var/obj/machinery/mech_bay_recharge_port/recharge_port
|
||||
|
||||
proc/mecha_in(var/obj/mecha/mecha)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
mecha.occupant_message("<font color='red'>Control console not responding. Terminating...</font>")
|
||||
return
|
||||
if(recharge_port && autostart)
|
||||
var/answer = recharge_port.start_charge(mecha)
|
||||
if(answer)
|
||||
recharge_port.set_voltage(voltage)
|
||||
src.icon_state = initial(src.icon_state)+"_on"
|
||||
/obj/machinery/computer/mech_bay_power_console/proc/mecha_in(var/obj/mecha/mecha)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
mecha.occupant_message("<font color='red'>Control console not responding. Terminating...</font>")
|
||||
return
|
||||
if(recharge_port && autostart)
|
||||
var/answer = recharge_port.start_charge(mecha)
|
||||
if(answer)
|
||||
recharge_port.set_voltage(voltage)
|
||||
src.icon_state = initial(src.icon_state)+"_on"
|
||||
return
|
||||
|
||||
proc/mecha_out()
|
||||
/obj/machinery/computer/mech_bay_power_console/proc/mecha_out()
|
||||
if(recharge_port)
|
||||
recharge_port.stop_charge()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/mech_bay_power_console/power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = initial(icon_state)+"_broken"
|
||||
if(recharge_port)
|
||||
recharge_port.stop_charge()
|
||||
return
|
||||
|
||||
|
||||
power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = initial(icon_state)+"_broken"
|
||||
else if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
icon_state = initial(icon_state)+"_nopower"
|
||||
stat |= NOPOWER
|
||||
if(recharge_port)
|
||||
recharge_port.stop_charge()
|
||||
else if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
icon_state = initial(icon_state)+"_nopower"
|
||||
stat |= NOPOWER
|
||||
if(recharge_port)
|
||||
recharge_port.stop_charge()
|
||||
|
||||
set_broken()
|
||||
icon_state = initial(icon_state)+"_broken"
|
||||
stat |= BROKEN
|
||||
if(recharge_port)
|
||||
recharge_port.stop_charge()
|
||||
/obj/machinery/computer/mech_bay_power_console/set_broken()
|
||||
icon_state = initial(icon_state)+"_broken"
|
||||
stat |= BROKEN
|
||||
if(recharge_port)
|
||||
recharge_port.stop_charge()
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(..()) return
|
||||
var/output = "<html><head><title>[src.name]</title></head><body>"
|
||||
if(!recharge_floor)
|
||||
output += "<font color='red'>Mech Bay Recharge Station not initialized.</font><br>"
|
||||
else
|
||||
output += {"<b>Mech Bay Recharge Station Data:</b><div style='margin-left: 15px;'>
|
||||
<b>Mecha: </b>[recharge_floor.recharging_mecha||"None"]<br>"}
|
||||
if(recharge_floor.recharging_mecha)
|
||||
var/cell_charge = recharge_floor.recharging_mecha.get_charge()
|
||||
output += "<b>Cell charge: </b>[isnull(cell_charge)?"No powercell found":"[recharge_floor.recharging_mecha.cell.charge]/[recharge_floor.recharging_mecha.cell.maxcharge]"]<br>"
|
||||
output += "</div>"
|
||||
if(!recharge_port)
|
||||
output += "<font color='red'>Mech Bay Power Port not initialized.</font><br>"
|
||||
else
|
||||
output += "<b>Mech Bay Power Port Status: </b>[recharge_port.active()?"Now charging":"On hold"]<br>"
|
||||
|
||||
/*
|
||||
output += {"<hr>
|
||||
<b>Settings:</b>
|
||||
<div style='margin-left: 15px;'>
|
||||
<b>Start sequence on succesful init: </b><a href='?src=\ref[src];autostart=1'>[autostart?"On":"Off"]</a><br>
|
||||
<b>Recharge Port Voltage: </b><a href='?src=\ref[src];voltage=30'>Low</a> - <a href='?src=\ref[src];voltage=45'>Medium</a> - <a href='?src=\ref[src];voltage=60'>High</a><br>
|
||||
</div>"}
|
||||
*/
|
||||
|
||||
output += "</ body></html>"
|
||||
user << browse(output, "window=mech_bay_console")
|
||||
onclose(user, "mech_bay_console")
|
||||
/obj/machinery/computer/mech_bay_power_console/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(!recharge_floor || !recharge_port)
|
||||
var/turf/simulated/floor/mech_bay_recharge_floor/F = locate() in range(1,src)
|
||||
if(F)
|
||||
F.init_devices()
|
||||
|
||||
var/output = "<html><head><title>[src.name]</title></head><body>"
|
||||
if(!recharge_floor)
|
||||
output += "<font color='red'>Mech Bay Recharge Station not initialized.</font><br>"
|
||||
else
|
||||
output += {"<b>Mech Bay Recharge Station Data:</b><div style='margin-left: 15px;'>
|
||||
<b>Mecha: </b>[recharge_floor.recharging_mecha||"None"]<br>"}
|
||||
if(recharge_floor.recharging_mecha)
|
||||
var/cell_charge = recharge_floor.recharging_mecha.get_charge()
|
||||
output += "<b>Cell charge: </b>[isnull(cell_charge)?"No powercell found":"[recharge_floor.recharging_mecha.cell.charge]/[recharge_floor.recharging_mecha.cell.maxcharge]"]<br>"
|
||||
output += "</div>"
|
||||
if(!recharge_port)
|
||||
output += "<font color='red'>Mech Bay Power Port not initialized.</font><br>"
|
||||
else
|
||||
output += "<b>Mech Bay Power Port Status: </b>[recharge_port.active()?"Now charging":"On hold"]<br>"
|
||||
|
||||
/*
|
||||
output += {"<hr>
|
||||
<b>Settings:</b>
|
||||
<div style='margin-left: 15px;'>
|
||||
<b>Start sequence on succesful init: </b><a href='?src=\ref[src];autostart=1'>[autostart?"On":"Off"]</a><br>
|
||||
<b>Recharge Port Voltage: </b><a href='?src=\ref[src];voltage=30'>Low</a> - <a href='?src=\ref[src];voltage=45'>Medium</a> - <a href='?src=\ref[src];voltage=60'>High</a><br>
|
||||
</div>"}
|
||||
*/
|
||||
|
||||
Topic(href, href_list)
|
||||
if(href_list["autostart"])
|
||||
autostart = !autostart
|
||||
if(href_list["voltage"])
|
||||
voltage = text2num(href_list["voltage"])
|
||||
if(recharge_port)
|
||||
recharge_port.set_voltage(voltage)
|
||||
updateUsrDialog()
|
||||
return
|
||||
output += "</ body></html>"
|
||||
user << browse(output, "window=mech_bay_console")
|
||||
onclose(user, "mech_bay_console")
|
||||
return
|
||||
|
||||
// unused at the moment, also lacks any kind of exploit prevention
|
||||
/*
|
||||
/obj/machinery/computer/mech_bay_power_console/Topic(href, href_list)
|
||||
if(href_list["autostart"])
|
||||
autostart = !autostart
|
||||
if(href_list["voltage"])
|
||||
voltage = text2num(href_list["voltage"])
|
||||
if(recharge_port)
|
||||
recharge_port.set_voltage(voltage)
|
||||
updateUsrDialog()
|
||||
return
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,10 @@ obj/effect/decal/cleanable/liquid_fuel
|
||||
anchored = 1
|
||||
var/amount = 1 //Basically moles.
|
||||
|
||||
New(newLoc,amt=1)
|
||||
New(turf/newLoc,amt=1,nologs=0)
|
||||
if(!nologs)
|
||||
message_admins("Liquid fuel has spilled in [newLoc.loc.name] ([newLoc.x],[newLoc.y],[newLoc.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[newLoc.x];Y=[newLoc.y];Z=[newLoc.z]'>JMP</a>)")
|
||||
log_game("Liquid fuel has spilled in [newLoc.loc.name] ([newLoc.x],[newLoc.y],[newLoc.z])")
|
||||
src.amount = amt
|
||||
|
||||
//Be absorbed by any other liquid fuel in the tile.
|
||||
@@ -30,7 +33,7 @@ obj/effect/decal/cleanable/liquid_fuel
|
||||
var/turf/simulated/origin = get_turf(src)
|
||||
if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0))
|
||||
if(!locate(/obj/effect/decal/cleanable/liquid_fuel) in target)
|
||||
new/obj/effect/decal/cleanable/liquid_fuel(target, amount*0.25)
|
||||
new/obj/effect/decal/cleanable/liquid_fuel(target, amount*0.25,1)
|
||||
amount *= 0.75
|
||||
|
||||
flamethrower_fuel
|
||||
|
||||
@@ -14,7 +14,10 @@
|
||||
/obj/item/clothing/suit/space/rig
|
||||
)
|
||||
|
||||
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob)
|
||||
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if (!target_species)
|
||||
return //it shouldn't be null, okay?
|
||||
|
||||
@@ -38,6 +41,7 @@
|
||||
var/in_list = (target_species in I.species_restricted)
|
||||
if (excluding ^ in_list)
|
||||
user << "<span class='notice'>[I] is already modified.</span>"
|
||||
return
|
||||
|
||||
if(!isturf(O.loc))
|
||||
user << "<span class='warning'>[O] must be safely placed on the ground for modification.</span>"
|
||||
|
||||
@@ -13,7 +13,10 @@
|
||||
modes += "[C]"
|
||||
mode = pick(modes)
|
||||
|
||||
/obj/item/device/pipe_painter/afterattack(atom/A, mob/user as mob)
|
||||
/obj/item/device/pipe_painter/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(!istype(A,/obj/machinery/atmospherics/pipe) || istype(A,/obj/machinery/atmospherics/pipe/tank) || istype(A,/obj/machinery/atmospherics/pipe/vent) || istype(A,/obj/machinery/atmospherics/pipe/simple/heat_exchanging) || istype(A,/obj/machinery/atmospherics/pipe/simple/insulated) || !in_range(user, A))
|
||||
return
|
||||
var/obj/machinery/atmospherics/pipe/P = A
|
||||
|
||||
@@ -364,7 +364,9 @@ REAGENT SCANNER
|
||||
var/details = 0
|
||||
var/recent_fail = 0
|
||||
|
||||
/obj/item/device/reagent_scanner/afterattack(obj/O, mob/user as mob)
|
||||
/obj/item/device/reagent_scanner/afterattack(obj/O, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if (user.stat)
|
||||
return
|
||||
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
var/mob/living/carbon/human/H = loc
|
||||
|
||||
var/efficiency = H.get_pressure_protection() //you need to have a good seal for effective cooling
|
||||
var/efficiency = 1 - H.get_pressure_weakness() //you need to have a good seal for effective cooling
|
||||
var/env_temp = get_environment_temperature() //wont save you from a fire
|
||||
var/temp_adj = min(H.bodytemperature - max(thermostat, env_temp), max_cooling)
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
return 1
|
||||
|
||||
/obj/item/device/transfer_valve/attackby(obj/item/item, mob/user)
|
||||
var/turf/location = get_turf(src) // For admin logs
|
||||
if(istype(item, /obj/item/weapon/tank))
|
||||
if(tank_one && tank_two)
|
||||
user << "<span class='warning'>There are already two tanks attached, remove one first.</span>"
|
||||
@@ -31,6 +32,8 @@
|
||||
user.drop_item()
|
||||
item.loc = src
|
||||
user << "<span class='notice'>You attach the tank to the transfer valve.</span>"
|
||||
message_admins("[key_name_admin(user)] attached both tanks to a transfer valve. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
|
||||
log_game("[key_name_admin(user)] attached both tanks to a transfer valve.")
|
||||
|
||||
update_icon()
|
||||
nanomanager.update_uis(src) // update all UIs attached to src
|
||||
@@ -51,7 +54,7 @@
|
||||
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
|
||||
|
||||
bombers += "[key_name(user)] attached a [item] to a transfer valve."
|
||||
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve.")
|
||||
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
|
||||
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
|
||||
attacher = user
|
||||
nanomanager.update_uis(src) // update all UIs attached to src
|
||||
@@ -83,7 +86,7 @@
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
// auto update every Master Controller tick
|
||||
|
||||
@@ -52,15 +52,19 @@
|
||||
use(1)
|
||||
else
|
||||
return 1
|
||||
else
|
||||
|
||||
else if(!in_use)
|
||||
if(amount < 2)
|
||||
user << "\blue You need at least two rods to do this."
|
||||
return
|
||||
usr << "\blue Assembling grille..."
|
||||
in_use = 1
|
||||
if (!do_after(usr, 10))
|
||||
in_use = 0
|
||||
return
|
||||
var/obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc )
|
||||
usr << "\blue You assemble a grille"
|
||||
in_use = 0
|
||||
F.add_fingerprint(usr)
|
||||
use(2)
|
||||
return
|
||||
|
||||
@@ -236,76 +236,6 @@
|
||||
|
||||
return 0
|
||||
|
||||
/*
|
||||
* Glass shards - TODO: Move this into code/game/object/item/weapons
|
||||
*/
|
||||
/obj/item/weapon/shard/Bump()
|
||||
|
||||
spawn( 0 )
|
||||
if (prob(20))
|
||||
src.force = 15
|
||||
else
|
||||
src.force = 4
|
||||
..()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/shard/New()
|
||||
|
||||
src.icon_state = pick("large", "medium", "small")
|
||||
switch(src.icon_state)
|
||||
if("small")
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
if("medium")
|
||||
src.pixel_x = rand(-8, 8)
|
||||
src.pixel_y = rand(-8, 8)
|
||||
if("large")
|
||||
src.pixel_x = rand(-5, 5)
|
||||
src.pixel_y = rand(-5, 5)
|
||||
else
|
||||
return
|
||||
|
||||
/obj/item/weapon/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if ( istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
var/obj/item/stack/sheet/glass/NG = new (user.loc)
|
||||
for (var/obj/item/stack/sheet/glass/G in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
if(G.amount>=G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
usr << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheets."
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shard/Crossed(AM as mob|obj)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
M << "\red <B>You step in the broken glass!</B>"
|
||||
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
return
|
||||
|
||||
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
|
||||
var/datum/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
return
|
||||
H.Weaken(3)
|
||||
if(affecting.take_damage(5, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
..()
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -112,7 +112,9 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/implanter/compressed/afterattack(atom/A, mob/user as mob)
|
||||
/obj/item/weapon/implanter/compressed/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(A,/obj/item) && imp)
|
||||
var/obj/item/weapon/implant/compressed/c = imp
|
||||
if (c.scanned)
|
||||
|
||||
114
code/game/objects/items/weapons/shards.dm
Normal file
114
code/game/objects/items/weapons/shards.dm
Normal file
@@ -0,0 +1,114 @@
|
||||
// Glass shards
|
||||
|
||||
/obj/item/weapon/shard
|
||||
name = "glass shard"
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
icon_state = "large"
|
||||
sharp = 1
|
||||
edge = 1
|
||||
desc = "Could probably be used as ... a throwing weapon?"
|
||||
w_class = 2.0
|
||||
force = 5.0
|
||||
throwforce = 8.0
|
||||
item_state = "shard-glass"
|
||||
matter = list("glass" = 3750)
|
||||
attack_verb = list("stabbed", "slashed", "sliced", "cut")
|
||||
|
||||
/obj/item/weapon/shard/suicide_act(mob/user)
|
||||
viewers(user) << pick("\red <b>[user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide.</b>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/shard/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shard/Bump()
|
||||
|
||||
spawn( 0 )
|
||||
if (prob(20))
|
||||
src.force = 15
|
||||
else
|
||||
src.force = 4
|
||||
..()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/shard/New()
|
||||
|
||||
src.icon_state = pick("large", "medium", "small")
|
||||
switch(src.icon_state)
|
||||
if("small")
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
if("medium")
|
||||
src.pixel_x = rand(-8, 8)
|
||||
src.pixel_y = rand(-8, 8)
|
||||
if("large")
|
||||
src.pixel_x = rand(-5, 5)
|
||||
src.pixel_y = rand(-5, 5)
|
||||
else
|
||||
return
|
||||
|
||||
/obj/item/weapon/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if ( istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
var/obj/item/stack/sheet/glass/NG = new (user.loc)
|
||||
for (var/obj/item/stack/sheet/glass/G in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
if(G.amount>=G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
usr << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheets."
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shard/HasEntered(AM as mob|obj)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
M << "\red <B>You step on \the [src]!</B>"
|
||||
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
return
|
||||
|
||||
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
|
||||
var/datum/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
return
|
||||
H.Weaken(3)
|
||||
if(affecting.take_damage(5, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
..()
|
||||
|
||||
// Shrapnel
|
||||
|
||||
/obj/item/weapon/shard/shrapnel
|
||||
name = "shrapnel"
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
icon_state = "shrapnellarge"
|
||||
desc = "A bunch of tiny bits of shattered metal."
|
||||
|
||||
/obj/item/weapon/shard/shrapnel/New()
|
||||
|
||||
src.icon_state = pick("shrapnellarge", "shrapnelmedium", "shrapnelsmall")
|
||||
switch(src.icon_state)
|
||||
if("shrapnelsmall")
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
if("shrapnelmedium")
|
||||
src.pixel_x = rand(-8, 8)
|
||||
src.pixel_y = rand(-8, 8)
|
||||
if("shrapnellarge")
|
||||
src.pixel_x = rand(-5, 5)
|
||||
src.pixel_y = rand(-5, 5)
|
||||
else
|
||||
return
|
||||
@@ -68,6 +68,7 @@
|
||||
icon_type = "egg"
|
||||
name = "egg box"
|
||||
storage_slots = 12
|
||||
max_combined_w_class = 24
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/egg")
|
||||
|
||||
/obj/item/weapon/storage/fancy/egg_box/New()
|
||||
|
||||
@@ -65,7 +65,9 @@
|
||||
O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1)
|
||||
return
|
||||
|
||||
/obj/item/weapon/nullrod/afterattack(atom/A, mob/user as mob)
|
||||
/obj/item/weapon/nullrod/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if (istype(A, /turf/simulated/floor))
|
||||
user << "\blue You hit the floor with the [src]."
|
||||
call(/obj/effect/rune/proc/revealrunes)(src)
|
||||
@@ -231,7 +233,7 @@
|
||||
update_icon(user)
|
||||
|
||||
/obj/item/weapon/butterfly/switchblade
|
||||
name = "/proper switchblade"
|
||||
name = "switchblade"
|
||||
desc = "A classic switchblade with gold engraving. Just holding it makes you feel like a gangster."
|
||||
icon_state = "switchblade"
|
||||
|
||||
|
||||
@@ -47,13 +47,21 @@
|
||||
buckle_mob(M, user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/proc/afterbuckle(mob/M as mob) // Called after somebody buckled / unbuckled
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/stool/bed/proc/unbuckle()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
buckled_mob.update_canmove()
|
||||
|
||||
var/M = buckled_mob
|
||||
buckled_mob = null
|
||||
|
||||
afterbuckle(M)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
|
||||
@@ -103,6 +111,7 @@
|
||||
M.update_canmove()
|
||||
src.buckled_mob = M
|
||||
src.add_fingerprint(user)
|
||||
afterbuckle(M)
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
@@ -95,25 +95,40 @@
|
||||
/obj/structure/stool/bed/chair/comfy
|
||||
name = "comfy chair"
|
||||
desc = "It looks comfy."
|
||||
icon_state = "comfychair"
|
||||
color = rgb(255,255,255)
|
||||
var/image/armrest = null
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/New()
|
||||
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
|
||||
armrest.layer = MOB_LAYER + 0.1
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/afterbuckle()
|
||||
if(buckled_mob)
|
||||
overlays += armrest
|
||||
else
|
||||
overlays -= armrest
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/brown
|
||||
icon_state = "comfychair_brown"
|
||||
color = rgb(255,113,0)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/beige
|
||||
icon_state = "comfychair_beige"
|
||||
color = rgb(255,253,195)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/teal
|
||||
icon_state = "comfychair_teal"
|
||||
color = rgb(0,255,255)
|
||||
|
||||
/obj/structure/stool/bed/chair/office
|
||||
anchored = 0
|
||||
movable = 1
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/black
|
||||
icon_state = "comfychair_black"
|
||||
color = rgb(167,164,153)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/lime
|
||||
icon_state = "comfychair_lime"
|
||||
color = rgb(255,251,0)
|
||||
|
||||
/obj/structure/stool/bed/chair/office/Move()
|
||||
..()
|
||||
|
||||
@@ -18,12 +18,17 @@
|
||||
buckled_mob.dir = dir
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/relaymove(mob/user, direction)
|
||||
// Redundant check?
|
||||
if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained())
|
||||
if(user==pulling)
|
||||
pulling = null
|
||||
user.pulledby = null
|
||||
user << "\red You lost your grip!"
|
||||
return
|
||||
if(buckled_mob && pulling && user == buckled_mob)
|
||||
if(pulling.stat || pulling.stunned || pulling.weakened || pulling.paralysis || pulling.lying || pulling.restrained())
|
||||
pulling.pulledby = null
|
||||
pulling = null
|
||||
if(user.pulling && (user == pulling))
|
||||
pulling = null
|
||||
user.pulledby = null
|
||||
@@ -136,12 +141,12 @@
|
||||
if(propelled || (pulling && (pulling.a_intent == "hurt")))
|
||||
var/mob/living/occupant = buckled_mob
|
||||
unbuckle()
|
||||
|
||||
|
||||
if (pulling && (pulling.a_intent == "hurt"))
|
||||
occupant.throw_at(A, 3, 3, pulling)
|
||||
else if (propelled)
|
||||
occupant.throw_at(A, 3, propelled)
|
||||
|
||||
|
||||
occupant.apply_effect(6, STUN, 0)
|
||||
occupant.apply_effect(6, WEAKEN, 0)
|
||||
occupant.apply_effect(6, STUTTER, 0)
|
||||
|
||||
Reference in New Issue
Block a user