mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-02-09 07:49:09 +00:00
## About The Pull Request Adds portable wind turbines that can be put in your back slot or anchored to the ground. They accept a cell-powered item and charge it while you walk, or when space wind passes over them. Can be purchased for 400 credits or crafted with 3 kitchen knives, plastic, and servos. Requires a capacitor to charge things, and higher tiers charge faster, faster walkspeed also charges faster. <img width="592" height="644" alt="im222age" src="https://github.com/user-attachments/assets/e9997536-5ee0-4417-a31c-cb58666d4d07" /> https://github.com/user-attachments/assets/1cf7fce5-d385-4e3e-be97-fb15e253c308 ## Why It's Good For The Game Sometimes you don't have a cell charger. And you need to charge something. Now you can charge something by running laps around the station. During a blob, rechargers are brought to the front lines to charge energy guns and such but what if the blob turns off the power? And what are bar-rp'ers to do? Kill two birds with one stone by having them run laps instead of sitting around doing nothing. Also its funny. ## Changelog 🆑 add: Added a portable wind turbine which can charge things when you walk around add: Added a signal that procs when an object resists space wind (from being anchored / pulled) sound: added woosh.ogg as a low "wooshing" noise image: added a wind turbine sprite /🆑 --------- Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
/**
|
|
* drag_pickup element; for allowing things to be picked up by dragging.
|
|
*
|
|
* Used for paper bins.
|
|
*/
|
|
/datum/element/drag_pickup
|
|
|
|
/datum/element/drag_pickup/Attach(datum/target)
|
|
if(!ismovable(target))
|
|
return ELEMENT_INCOMPATIBLE
|
|
RegisterSignal(target, COMSIG_MOUSEDROP_ONTO, PROC_REF(pick_up))
|
|
return ..()
|
|
|
|
/datum/element/drag_pickup/Detach(datum/source)
|
|
UnregisterSignal(source, COMSIG_MOUSEDROP_ONTO)
|
|
return ..()
|
|
|
|
/datum/element/drag_pickup/proc/pick_up(atom/source, atom/over, mob/user)
|
|
SIGNAL_HANDLER
|
|
|
|
var/mob/living/picker = user
|
|
if(!istype(picker) || !user.can_perform_action(source, FORBID_TELEKINESIS_REACH))
|
|
return
|
|
var/obj/pickup_object = source
|
|
if (pickup_object)
|
|
if (pickup_object.anchored)
|
|
return COMPONENT_CANCEL_MOUSEDROP_ONTO
|
|
|
|
if(over == picker)
|
|
INVOKE_ASYNC(picker, TYPE_PROC_REF(/mob/, put_in_hands), source)
|
|
else if(istype(over, /atom/movable/screen/inventory/hand))
|
|
var/atom/movable/screen/inventory/hand/Selected_hand = over
|
|
picker.putItemFromInventoryInHandIfPossible(source, Selected_hand.held_index)
|
|
return COMPONENT_CANCEL_MOUSEDROP_ONTO
|